/* Importamos la fuente "Roboto" directamente desde Google */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

/* 1. RESETEO GENERAL */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f6f9;
    color: #333;
}

/* 2. BARRA SUPERIOR (HEADER) */
.header-bar {
    background-color: #ffffff;
    height: 60px;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.logo-container {
    margin-left: -1px;
    display: flex;
    align-items: center;
    height: 100%;
}

.logo-img {
    width: auto;
    height: 20px;
    object-fit: contain;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 19px;
    cursor: pointer;
    color: #5f6368;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
}

.icon-btn:hover {
    background-color: #f1f3f4;
}

/* ==========================================================================
   3. MENÚ LATERAL (SIDEBAR FINO, LOGO INTEGRADO Y "X" ALINEADA)
   ========================================================================== */
.sidebar {
    position: fixed;
    top: 0;
    /* Ajustado left y width al mismo tamaño (230px) para que abra perfecto */
    left: -230px;
    width: 200px;
    height: 100%;
    background-color: #ffffff;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    z-index: 200;
    padding: 15px;
    /* Ajustamos padding para dar más espacio interno */
    transition: left 0.3s ease;
}

.sidebar.active {
    left: 0;
}

/* NUEVO: Contenedor estricto para Logo y Equis juntos en horizontal */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    /* Logo a la izquierda, X a la derecha */
    align-items: center;
    /* Centrado vertical matemático */
    width: 100%;
    height: 45px;
    /* Altura congelada para evitar que la X se baje */
    margin-bottom: 25px;
    padding: 0 5px;
}

/* Caja del logo */
.sidebar-logo {
    display: flex;
    align-items: center;
    max-width: 130px;
    /* Frena los márgenes transparentes de la imagen */
    overflow: hidden;
}

.sidebar-logo .logo-img {
    width: 100%;
    height: auto;
    max-height: 20px;
    object-fit: contain;
    display: block;
}

/* CORRECCIÓN: Botón de cerrar la X reparado sin float */
.close-btn {
    font-size: 16px !important;
    padding: 0 !important;
    display: flex !important;
    /* Lo volvemos flexbox para clavar la X al centro */
    align-items: center !important;
    justify-content: center !important;
    height: 32px !important;
    /* Forzamos tamaño de botón circular perfecto */
    width: 32px !important;
    margin: 0 !important;
    /* Quitamos márgenes viejos que lo tiraban al piso */
}

.menu-links {
    list-style: none;
    margin-top: 10px;
    /* Reducido porque la cabecera ya ocupa espacio */
}

.menu-links li {
    margin-bottom: 8px;
    /* Menor separación para que sea más estilizado */
}

.menu-links a {
    text-decoration: none;
    color: #3c4043;
    font-size: 14px;
    /* Texto fino estilo Google */
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px 10px 22px;
    border-radius: 0 20px 20px 0;
    /* Bordes circulares tipo pestaña de Gmail */
    margin-left: -15px;
    /* Expande el sombreado hover hasta el borde izquierdo */
    width: calc(100% + 15px);
    transition: background 0.2s, color 0.2s;
}

.menu-links a:hover {
    background-color: #f1f3f4;
    /* Fondo gris suave */
    color: #1a73e8;
    /* Letras pasan al azul corporativo */
}

/* 4. CONTENIDO PRINCIPAL */
.main-content {
    margin-top: 100px;
    display: flex;
    justify-content: flex-start;
    padding: 0 20px;
}

/* ==========================================================================
   5. DISEÑO DE SECCIONES CONTINUAS (Estilo Base / Computadora)
   ========================================================================== */
html {
    scroll-behavior: smooth;
}

.legal-container {
    max-width: 1600px;
    /* Ajustado a 900px para evitar líneas infinitas en PC (Lectura óptima) */
    width: 100%;
    margin-left: 10px;
    margin-bottom: 80px;
}

.legal-section {
    margin-bottom: 50px;
    text-align: left;
    scroll-margin-top: 90px;
}

/* Títulos grandes en PC */
.legal-section h2 {
    font-size: 26px;
    color: #202124;
    margin-bottom: 15px;
    font-weight: 500;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
}

/* Subtítulos internos en PC */
.legal-section h3 {
    font-size: 18px;
    color: #202124;
    margin-top: 25px;
    margin-bottom: 12px;
    font-weight: 500;
}

/* Párrafos en PC */
.legal-section p {
    font-size: 16px;
    color: #3c4043;
    line-height: 1.7;
    margin-bottom: 15px;
}

/* Estilos para las Listas (Puntos/Viñetas) */
.legal-list {
    margin-left: 25px;
    margin-bottom: 20px;
    list-style-type: disc;
}

.legal-list li {
    font-size: 16px;
    color: #3c4043;
    line-height: 1.7;
    margin-bottom: 8px;
}

/* ==========================================================================
   6. DISEÑO PARA MÓVILES (Celulares)
   ========================================================================== */
@media (max-width: 768px) {
    .legal-container {
        margin-left: 0;
        margin-bottom: -20px;
        /* Ajustado para eliminar el espacio blanco masivo */
    }

    .legal-section h2 {
        font-size: 22px;
    }

    .legal-section h3 {
        font-size: 17px;
    }

    .legal-section p,
    .legal-list li {
        font-size: 15px;
        line-height: 1.6;
    }
}

footer {
    width: 100%;
    padding: 10px 0;
    /* Reducido de 20px a 10px para mejor estética en móviles */
    text-align: center;
    font-size: 14px;
    color: #666666;
    /* Un gris sutil para que no resalte más que el contenido */
}

footer p {
    margin: 0 !important;
}

main p:last-of-type,
section p:last-of-type,
div p:last-of-type {
    margin-bottom: 10px !important;
}

/* Contenedor para centrar la imagen de clasificaciones */
.classifications-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 40px;    /* Separa la imagen del texto de arriba */
    margin-bottom: 20px; /* Separa la imagen del footer */
}

/* Hace que la imagen sea totalmente responsiva en móviles y PC */
.classification-img-single {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;  /* Opcional: por si quieres darle bordes suavizados como tus otras secciones */
}
