@charset "UTF-8";

/* ============================================================
   1. Importar Fuentes
   ============================================================ */
@import url('https://fonts.googleapis.com/css?family=Montserrat:400,600,700,800&display=swap');

/* ============================================================
   2. Reset CSS
   ============================================================ */

/* Reset básico para eliminar estilos por defecto */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

* :where(:not(html, iframe, canvas, img, svg, video, audio):not(svg *, symbol *)) {
    all: unset;
    display: revert;
}

/* Ajustes para el tamaño de texto en navegadores móviles */
html {
    -moz-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Reaplicar el cursor para enlaces y botones */
a, button {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

/* Eliminar estilos por defecto de listas */
ol, ul, menu, summary {
    list-style: none;
}

/* Estilos para tablas */
table {
    border-collapse: collapse;
    width: 100%;
}

th, td {
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    text-align: left;
}

/* Imágenes Responsivas */
img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
}

/* Añadimos una nueva regla para limitar el ancho máximo de las imágenes */
.content-container img {
    margin: 0 auto; /* Esto centrará las imágenes si son más pequeñas que el contenedor */
    padding: 10px;
}

/* ============================================================
   3. Variables de CSS
   ============================================================ */
:root {
    --primary-color: rgb(35, 87, 0);
    --secondary-color: #834adb;
    --accent-color: #79bd2c;
    --text-color: #333;
    --background-color: #fafafa;
    --header-height: 80px;
    --footer-padding: 50px 16px;
    --card-height: 150px;
    --divider-color: #e0e0e0;
    --btn-bg-color: #79bd2c;
    --btn-text-color: #fff;
    --font-family: 'Montserrat', sans-serif;
}

/* ============================================================
   4. Estilos Base
   ============================================================ */
body, html {
    height: 100%;
    padding: 20px;
    font-family: var(--font-family);
    color: var(--text-color);
    background-color: var(--background-color);
    font-size: 16px;
    line-height: 1.5;
}

.container, .content-container {
    max-width: 90vw;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ============================================================
   5. Tipografía
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin: 1.5rem 0 1rem;
    line-height: 1.2;
    color: var(--text-color);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

p {
    font-size: 1.125rem; /* 18px */
    line-height: 1.6;
    margin-bottom: 1.2em;
}

ul li, ol li {
    margin-bottom: 0.75rem;
}

/* ============================================================
   6. Layout (Encabezado, Principal, Pie de Página)
   ============================================================ */

/* Wrapper general */
.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Encabezado */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--primary-color);
    color: #fff;
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Distribuye el espacio entre el logo y el título */
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header .logo {
    flex: 0 0 auto;
}

.header .logo img {
    width: auto;
    height: 60px;
}

.header h1 {
    flex: 1;
    text-align: center;
    font-size: 1.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
    margin: 0;
    animation: blink 3s infinite; /* Restauramos la animación */
}

/* Principal */
.main {
    flex: 1 0 auto;
    padding-top: calc(var(--header-height) + 20px); /* Espacio para el encabezado fijo */
}

/* Pie de Página */
.footer {
    background-color: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: var(--footer-padding);
}

/* ============================================================
   7. Tarjetas (Cards)
   ============================================================ */
.cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px 0;
}

.card {
    display: flex;
    background-color: #fff;
    border-radius: 10px;
    height: var(--card-height);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card .icon {
    flex: 0 0 60px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card .icon img {
    width: 30px;
    height: auto;
}

.card .grid {
    display: grid;
    grid-template-columns: 1.2fr 0.1fr 1fr 0.1fr 1fr 0.1fr 1fr;
    gap: 20px;
    align-items: center;
    width: 100%;
    padding: 0 1rem;
}

.card .divider {
    width: 1px;
    height: 80px;
    background-color: var(--divider-color);
}

.card .main_icon {
    height: 100%;
}

.card .main_icon a {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 15px;
}

.card .main_icon a img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card .name p {
    font-size: 1.125rem; /* 18px */
    font-weight: bold;
    margin-bottom: 5px;
    text-align: left;
}

.card .stars {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    max-width: 100px; /* Limitamos el ancho máximo */
    gap: 2px;
    width: auto; /* Aseguramos que el ancho se ajuste al contenido */
}

.card .stars img {
    width: 15px;
    height: 15px;
    flex: 0 0 auto; /* Evita que las estrellas se estiren o encojan */
}

.card .title ul {
    list-style: none;
    padding-left: 0;
}

.card .title ul li {
    position: relative;
    padding-left: 25px;
    background: url('../imagenes/tick.svg') no-repeat left center;
    background-size: 14px;
    font-size: 0.875rem; /* 14px */
    line-height: 1.4;
    margin-bottom: 5px;
}

.card .button {
    display: flex;
    align-items: center;
}

.card .button .btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--accent-color);
    color: var(--btn-text-color);
    font-size: 1rem; /* 16px */
    font-weight: bold;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    text-align: center;
}

.card .button .btn:hover {
    background-color: var(--btn-hover-color);
}

/* ============================================================
   8. Tablas
   ============================================================ */
.table-mexicana {
    overflow-x: auto;
    margin: 20px 0;
}

table th {
    background-color: var(--secondary-color);
    color: #fff;
    font-size: 1.125rem; /* 18px */
    text-align: center;
}

table tr:nth-child(even) {
    background-color: #f9f9f9;
}

table tr td:hover {
    background-color: #e3e3e3;
}

/* ============================================================
   9. Responsividad (Media Queries)
   ============================================================ */

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
    .header h1 {
        font-size: 1.5rem;
    }

    .card {
        height: auto; /* Cambiamos de altura fija a automática */
        min-height: 300px; /* Establecemos una altura mínima */
    }

    .card .grid {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px; /* Aumentamos el espacio entre elementos */
        padding: 20px 1rem; /* Aadimos padding vertical */
    }

    .card .divider {
        display: none;
    }

    .card .button .btn {
        max-width: 150px;
    }

    /* Asegura que las imágenes principales ocupen toda la altura */
    .card .main_icon a img {
        height: 100%;
        object-fit: cover;
    }

    .card .grid {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .card .stars {
        width: auto; /* Aseguramos que el ancho se ajuste al contenido en dispositivos móviles */
    }
}

/* Dispositivos móviles estándar (max-width: 768px) */
@media (max-width: 768px) {
    body {
        padding: 10px;
        font-size: 0.875rem; /* 14px */
    }

    .container, .content-container {
        padding: 0 10px; /* Añadimos padding horizontal */
    }

    .header {
        height: 60px;
        padding: 0 0.5rem;
    }

    .header .logo {
        flex: 0 0 50px; /* Reducimos aún más el tamaño del logo en pantallas pequeñas */
    }

    .header h1 {
        font-size: 1.2rem; /* Reducimos aún más el tamaño de la fuente en pantallas pequeñas */
    }

    .main {
        padding-top: calc(var(--header-height) - 20px); /* Ajuste para encabezado más pequeño */
    }

    h1 {
        font-size: 2rem;
        margin: 1rem 0;
    }

    h2 {
        font-size: 1.75rem;
        margin: 1.25rem 0;
    }

    h3 {
        font-size: 1.5rem;
        margin: 1rem 0;
    }

    .cards .card {
        flex-direction: column;
        height: auto;
        padding: 15px;
        position: relative;
        margin-bottom: 20px;
        width: 100%; /* Aseguramos que la tarjeta ocupe todo el ancho disponible */
    }

    .cards .card .grid {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 0;
    }

    .cards .card .main_icon {
        height: auto; /* Cambiamos de height: 100% a auto */
    }

    .cards .card .main_icon a {
        position: static; /* Cambiamos de relative a static */
        height: auto; /* Altura automática */
    }

    .cards .card .main_icon a img {
        position: static; /* Cambiamos de absolute a static */
        height: auto; /* Altura automática */
        max-height: 200px; /* Limitamos la altura máxima */
        width: 100%;
        object-fit: cover;
    }

    .cards .card .name,
    .cards .card .stars,
    .cards .card .title {
        width: 100%; /* Aseguramos que estos elementos ocupen todo el ancho */
    }

    .cards .card .button {
        width: 100%;
        text-align: center;
        margin-top: 15px;
    }

    .cards .card .btn {
        width: 100%;
        max-width: none; /* Eliminamos el max-width */
        padding: 12px 20px;
    }

    .table-responsive {
        margin: 10px 0;
    }

    table th, table td {
        padding: 0.5rem;
        font-size: 0.875rem; /* 14px */
    }
}

/* Dispositivos muy pequeños (max-width: 480px) */
@media (max-width: 480px) {
    .header .logo {
        flex: 0 0 40px; /* Reducimos aún más el logo en pantallas muy pequeñas */
    }

    .header h1 {
        font-size: 1rem; /* Reducimos aún más la fuente en pantallas muy pequeñas */
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    p, ul li, ol li {
        font-size: 0.875rem; /* 14px */
    }

    .cards {
        padding: 10px 0;
    }

    .cards .card {
        padding: 10px;
    }

    .cards .card .btn {
        padding: 10px 15px; /* Reducimos un poco el padding del botón */
    }
}

/* ============================================================
   10. Animaciones
   ============================================================ */
@keyframes blink {
    0%, 100% {
        text-shadow: 0 0 10px rgb(255, 255, 255);
    }
    50% {
        text-shadow: 0 0 10px rgba(255, 255, 255, 0);
    }
}

@media (min-width: 1200px) {
    .content-container img {
        max-width: 80%;
        padding: 20px;
    }
}

@media (min-width: 1600px) {
    .content-container img {
        max-width: 70%;
        padding: 20px;
    }
}

/* Ajuste para pantallas más grandes */
@media (min-width: 1024px) {
    .card .grid {
        grid-template-columns: 1.2fr 0.1fr 1fr 0.1fr 1fr 0.1fr 1fr;
        gap: 10px; /* Reducimos el gap para un mejor control del espacio */
        align-items: center;
        width: 100%;
        padding: 0 1rem;
    }

    .card .name,
    .card .stars,
    .card .title,
    .card .button {
        justify-self: start; /* Alinea estos elementos  al inicio de su celda en el grid */
    }
}