/* --- ESTILOS GENERALES (BASE) --- */
/* --- <link rel="stylesheet" href="custom.css"> ---*/
body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    margin: 0;
    padding: 20px;
}


.tg-wrap {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.tg {
    width: 100%;
    border-collapse: collapse;
    border: none;
}

/* Cabecera de la tabla */
.tg tr:first-child {
    background-color: #8ed8c9; /* Color verde elegante */
    color: #ffffff;
    text-align: left;
    font-weight: bold;
}

/* Celdas generales */
.tg td {
    padding: 12px 15px;
    border: none;
    border-bottom: 1px solid #dddddd;
    font-size: 1.0em;
}

/* Filas alternas para mejor lectura */
.tg tr:nth-of-type(even) {
    background-color: #f3f3f3;
}

/* Efecto Hover al pasar el ratón 
.tg tr:not(:first-child):hover {
    background-color: #e6f7f4;
    cursor: default;*/
}

/* Ajustes específicos para las columnas */
.tg td:nth-child(1) { color: #444; font-size: 0.9em; width: 60px; } /* Número */
.tg td:nth-child(2) { font-weight: 500; color: #000; } /* Ruso */
.tg td:nth-child(3) { color: #444; font-style: italic; } /* Español */


/* --- RESPONSIVE (MÓVIL) --- */
@media screen and (max-width: 768px) {
    .tg-wrap { box-shadow: none; background: transparent; }
    
    /* Convertimos la tabla en bloques */
    .tg, .tg tbody, .tg tr, .tg td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    /* Ocultamos la fila de cabecera original */
    .tg tr:first-child {
        display: none;
    }

    /* Estilo de "Tarjeta" para cada fila */
    .tg tr {
        background: white;
        margin-bottom: 15px;
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        padding: 10px;
        border: 1px solid #eee;
    }

    .tg td {
        text-align: left;
        padding: 8px 10px;
        border-bottom: none;
        display: block;
    }

    /* Destacar el texto en ruso en móvil */
    .tg td:nth-child(2) {
        font-size: 1.5em;
        font-weight: bold;
        color: #009879;
        padding-top: 0;
    }
    
    /* Añadir esto para controlar el Español en móvil */
    .tg td:nth-child(3) {
    font-size: 1.1em; 
}
    
    /* El número pequeño arriba */
    .tg td:nth-child(1) {
        font-size: 0.8em;
        color: #aaa;
        padding-bottom: 0;
    }
}


/* --- IMPRESIÓN (PDF) --- */
@media print {
    @page {
        margin: 0;
        size: auto; /* Permite orientación automática */
    }

    body {
        margin: 0;
        padding: 0;
        background-color: white;
        -webkit-print-color-adjust: exact;
    }

    .tg-wrap {
        box-shadow: none;
        width: 100%;
        max-width: 100%;
    }

    /* Ocultar la cabecera (títulos de columnas) al imprimir */
    .tg tr:first-child {
        display: none !important;
    }

    /* Convertir tabla a Flexbox para centrado perfecto */
    .tg, .tg tbody {
        display: block;
        width: 100%;
    }

    .tg tr {
        display: flex; /* Usamos Flexbox para centrar */
        flex-direction: column;
        justify-content: center; /* Centrado Vertical */
        align-items: center;     /* Centrado Horizontal */
        height: 100vh;           /* Altura de toda la hoja */
        page-break-after: always; /* Salto de página después de cada fila */
        break-after: page;
        border: none !important;
        padding: 2cm;            /* Margen de seguridad */
        box-sizing: border-box;
        text-align: center;
        position: relative;
        background-color: #f3f3f3 !important;
    }

    .tg td {
        display: block;
        border: none !important;
        width: 100%;
        padding: 10px 0;
    }

    /* Estilos específicos para las "Diapositivas" de impresión */
    
    /* 1. Número: Lo ponemos pequeño en una esquina o arriba */
    .tg td:nth-child(1) {
        position: absolute;
        top: 2cm;
        left: 2cm;
        text-align: left;
        font-size: 14pt;
        color: #999;
        width: auto;
    }

    /* 2. Ruso: Muy grande y negrita */
    .tg td:nth-child(2) {
        font-size: 36pt; /* Tamaño grande */
        font-weight: bold;
        margin-bottom: 30px;
        /*font-family: 'Times New Roman', serif; /* Serif queda bien para lectura */
        font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
               sans-serif;
    }

    /* 3. Español: Grande pero un poco menos, cursiva */
    .tg td:nth-child(3) {
        font-size: 24pt;
        font-style: italic;
        color: #555;
        font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
               sans-serif;
    }
}