* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 18px; /* Base de referencia (1rem = 16px) */
}


body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #ffffff;
    color: #2e2e2e;
    line-height: 1.6;
    font-size: 1rem; /* 16px */
}

.container {
    display: flex;
    height: 100vh;
    overflow: hidden;

}

/* Barra lateral izquierda */
.sidebar {
    width: 280px;
    background-color: #F9D13E;
    border-right: 1px solid #ffffff;
    overflow-y: auto;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
}

.logo-section {
    padding: 30px 20px;
    text-align: center;
  /*  border-bottom: 1px solid #760626;*/
}

.logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
 /*   background-color: #d4cdb8;*/
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.site-title {
    color: #000000;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.site-subtitle {
    color: #000000;
    font-size: 16px;
    margin-top: 5px;
}

.site-subtitle a {
    color: #303F52;
    text-decoration: none;
}

.site-subtitle a:hover {
    color: #222222;
    text-decoration: none;
    background-color: #DEC03A;
}





.search-box {
    padding: 15px 20px;
 /*   border-bottom: 1px solid #EBDE6C;*/
}

.search-box input {
    width: 100%;
    padding: 8px 12px;
    background-color: #F7EDB5;
    border: 1px solid #C4AE2F;
    border-radius: 4px;
    font-size: 13px;
    color: #2e2e2e;
}

.search-box input::placeholder {
    color: #999;
}

.nav-section {
    padding: 20px 0;
}

.nav-section-title {
    padding: 7px 20px;
    color: #5C4825;
    font-size: 16px;
    font-weight: 600;
}

.nav-item {
    padding: 7px 20px 7px 35px;
    color: #1d1d1d;
    font-size: 0.8125rem; /* 13px */
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    user-select: none;
}

.nav-item.has-submenu:before {
    content: "▸";
    position: absolute;
    left: 20px;
    color: #6B4F16;
    font-size: 15px;
    transition: transform 0.2s;
}

.nav-item.has-submenu.expanded:before {
    transform: rotate(90deg);
}

.nav-item:not(.has-submenu):before {
    content: "•";
    position: absolute;
    left: 22px;
    color: #6B4F16;
    font-size: 12px;
}

.nav-item:hover {
    background-color: #C7C2B7;
}

.nav-item.active {
  /*  background-color: #F9D13E;*/
    font-weight: 500;
}

/* Submenú */
.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: #F9D13E;
}

.submenu.show {
    max-height: 800px;
    transition: max-height 0.4s ease-in;
}

.submenu-item {
    padding: 6px 20px 6px 50px;
    color: #1b1a1a;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.submenu-item:before {
    content: "•";
    position: absolute;
    left: 40px;
    color: #777777;
    font-size: 15px;
}

.submenu-item:hover {
    background-color: #d4cdb8;
}

.submenu-item.active {
    background-color: #d4cdb8;
    font-weight: 500;
    color: #2e2e2e;
}

/* Contenido principal */
.main-content {
    margin-left: 280px;
    flex: 1;
    overflow-y: auto;
    padding: 40px 60px;
    background-color: #ffffff;
}

.content-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #d4cdb8;
}

.page-title {
    font-size: 42px;
    font-weight: 300;
    color: #2e2e2e;
    margin-bottom: 15px;
    letter-spacing: -0.031rem;
}

.page-meta {
    font-size: 0.8rem; /* 12.8px */
    color: #777;
}

.page-meta a {
    color: #a2822a;
    text-decoration: none;
}

.page-meta a:hover {
    text-decoration: underline;
}

.content-section {
    margin-bottom: 40px;
}

.content-section h2 {
    font-size: 28px;
    font-weight: 400;
    color: #2e2e2e;
    margin-bottom: 1.25rem; /* 20px */
}

.content-section h3 {
    font-size: 1.25rem; /* 20px */
    font-weight: 500;
    color: #2e2e2e;
    margin: 1.56rem 0 0.94rem;
}

.content-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #2e2e2e;
    margin: 20px 0 10px;
}

.content-section p {
    font-size: 0.9375rem; /* 15px */
    line-height: 1.8;
    color: #3e3e3e;
    margin-bottom: 15px;
}

.content-section ul,
.content-section ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.content-section li {
    font-size: 1rem; /* 16px */
    line-height: 1.8;
    color: #3e3e3e;
    margin-bottom: 8px;
}

.highlight-box {
    background-color: #F8F0FA;
 /*   border-left: 3px solid #E5AEF2;*/
    border-radius: 12px;     /* bordes redondeados */
    padding: 20px;
    margin: 20px 0;
    font-style: italic;
}

.info-box {
    background-color: #F4F8FA;
    border-left: 3px solid #C4C6C7;
    padding: 20px;
    margin: 20px 0;
}

.warning-box {
    background-color: #FAFAE7;
/*  border-left: 3px solid #DBDB84;*/
    border-radius: 12px;     /* bordes redondeados */
    padding: 18px;
    margin: 18px 0;
}

.tag {
    display: inline-block;
    background-color: #F5F5F5;
    color: #353434;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 14px;
    margin-right: 7px;
    margin-top: 10px;
}

.data-table {
    width: 100%;
    min-width: 600px; /* Ancho mínimo para mantener legibilidad */
    border-collapse: collapse;
    margin: 0; /* El margen lo controla el wrapper */
    background-color: white;
    font-size: 0.9rem; /* 14.4px */
}

.data-table th {
    background-color: #E5F8F8;
    color: #2e2e2e;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #CAE8E8;
    white-space: nowrap; /* Evita que los títulos se rompan */
}

.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #B6E0E0;
    vertical-align: top;
}

.data-table tr:hover {
    background-color: #F5FFFF;
}

.data-table tr:last-child td {
    border-bottom: none;
}


/* Scrollbar personalizada */
.sidebar::-webkit-scrollbar,
.main-content::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track,
.main-content::-webkit-scrollbar-track {
    background: #e8e3d3;
}

.sidebar::-webkit-scrollbar-thumb,
.main-content::-webkit-scrollbar-thumb {
    background: #DEC21B;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
    }



    .table-wrapper {   
        border: 1px solid #e8e3d3;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

    }
    
    .data-table {
        min-width: 500px; /* Reducir un poco el ancho mínimo en móviles */
        font-size: 0.9rem; /* 15px */
        /* font-size: 13px; */
    }
    
    .data-table th,
    .data-table td {
    padding: 8px 10px;
    }
    
    .data-table th {
        font-size: 0.9rem; /* 15px */
        /* font-size: 12px;*/
    }

}



/* ============================================
   BOTÓN HAMBURGUESA PARA MÓVILES
   ============================================ */

.hamburger-menu {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background-color: #F9D13E;
    border: 2px solid #C4AE2F;
    border-radius: 8px;
    width: 50px;
    height: 50px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.hamburger-menu:hover {
    background-color: #EBDE6C;
    transform: scale(1.05);
}

.hamburger-menu:active {
    transform: scale(0.95);
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #000000;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Animación del menú hamburguesa cuando está abierto */
.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}




/* Overlay oscuro para móviles cuando el menú está abierto */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block !important;
    opacity: 1;
}

/* ============================================
   RESPONSIVE PARA MÓVILES
   ============================================ */

@media (max-width: 768px) {
    /* Aumentar tamaño base de fuente en 30% para móviles */
    html {
        font-size: 23.4px; /* 18px + 30% = 23.4px */
    }

    /* Mostrar botón hamburguesa */
    .hamburger-menu {
        display: flex;
    }

    /* Sidebar oculto por defecto en móviles */
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        width: 280px;
        height: 100vh;
        z-index: 999;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    /* Sidebar visible cuando está activo */
    .sidebar.active {
        left: 0 !important;
    }

    /* Contenido principal ocupa todo el ancho */
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 80px 20px 20px 20px;
    }

    /* Ajustar tamaño de títulos para móviles */
    .page-title {
        font-size: 1.56rem; /* ~36px con la nueva base */
    }

    .content-section h2 {
        font-size: 1.3rem; /* ~30px con la nueva base */
    }

    .content-section h3 {
        font-size: 1.1rem; /* ~26px con la nueva base */
    }

    .content-section h4 {
        font-size: 0.95rem; /* ~22px con la nueva base */
    }

    .content-section p,
    .content-section li {
        font-size: 0.85rem; /* ~20px con la nueva base */
    }

    /* Tablas responsive */
    .data-table {
        font-size: 0.75rem; /* ~17.5px con la nueva base */
    }

    .data-table th,
    .data-table td {
        padding: 8px;
    }
}

/* Para tablets y pantallas medianas */
@media (max-width: 1024px) and (min-width: 769px) {


    .main-content {
        padding: 30px 40px;
    }

    .page-title {
        font-size: 36px;
    }
}

/* Para pantallas muy pequeñas (móviles en vertical) */
@media (max-width: 480px) {
    /* Aumentar tamaño base de fuente en 30% para móviles pequeños */
    html {
        font-size: 23.4px; /* 18px + 30% = 23.4px */
    }

    .hamburger-menu {
        top: 15px;
        left: 15px;
        width: 45px;
        height: 45px;
    }

    .main-content {
        padding: 70px 15px 15px 15px;
    }

    .page-title {
        font-size: 1.35rem; /* ~31.5px con la nueva base */
    }

    .logo-section {
        padding: 20px 15px;
    }

    .logo {
        width: 80px;
        height: 80px;
    }
    
    .logo img {
        width: 60px;
        height: 60px;
    }

    .site-title {
        font-size: 0.875rem; /* 14px */
    }

    .site-subtitle {
        font-size: 11px;
    }

    /* Tags más pequeños */
    .tag {
        font-size: 12px;
        padding: 3px 8px;
    }

    /* Cajas de información más compactas */
    .highlight-box,
    .info-box,
    .warning-box {
        padding: 15px;
        margin: 12px 0;
        font-size: 0.75rem; /* ~17.5px con la nueva base */
    }
}