:root {
    --primary: #6366f1;
    --primary-light: #a5b4fc;
    --primary-dark: #4338ca;
    --secondary: #0ea5e9;
    --secondary-light: #7dd3fc;
    --accent: #f43f5e;
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-light: #94a3b8;
    --bg-main: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-sidebar: #0f172a;
    --border: rgba(226, 232, 240, 0.8);
    --radius: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 1rem;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

strong {
    color: var(--text-main);
    font-weight: 700;
}

/* LAYOUT */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: 300px;
    background: var(--bg-sidebar);
    color: #fff;
    position: fixed;
    height: 100dvh; /* dvh en lugar de vh para Safari iOS */
    left: 0;
    top: 0;
    overflow-y: auto;
    z-index: 1000;
    transition: all 0.3s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header {
    padding: 2.5rem 1.5rem;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.15) 0%, transparent 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-header .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.5));
}

.sidebar-header h2 {
    color: #fff;
    font-size: 1.5rem;
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.sidebar-header p {
    color: var(--text-light);
    font-size: 0.8rem;
    margin: 0.5rem 0 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.nav-menu {
    padding: 1.5rem 1rem;
    padding-bottom: 6rem; /* Extra padding para scroll móvil */
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-section-label {
    padding: 1.5rem 1.25rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-light);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.5;
}

.nav-link {
    color: #94a3b8;
    text-decoration: none;
    padding: 0.8rem 1.25rem;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    transform: translateX(4px);
}

.nav-section-label {
    padding: 1.5rem 1.25rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-light);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.5;
}

.dashboard-link {
    margin-top: 1rem;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.15), transparent);
    border-left: 3px solid var(--accent) !important;
}

.dashboard-link:hover {
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.15), transparent);
}

.nav-link.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.4);
}

/* SUB NAVIGATION */
.nav-group {
    display: flex;
    flex-direction: column;
}

.nav-sub-menu {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding-left: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    opacity: 0;
}

.nav-link.active + .nav-sub-menu,
.nav-sub-menu.expanded {
    max-height: 1000px;
    margin-top: 0.35rem;
    margin-bottom: 0.75rem;
    opacity: 1;
}

.sub-nav-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
}

.sub-nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}

.sub-nav-link.active-scroll {
    color: #fff;
    border-left-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    font-weight: 600;
}

/* MAIN CONTENT */
.main-wrapper {
    flex: 1;
    margin-left: 300px;
    padding-bottom: 4rem;
}

.hero {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.6) 0%, rgba(224, 231, 255, 0.6) 100%), url('assets/graficos/Image61.png');
    background-size: cover;
    background-position: center;
    padding: 6rem 3rem;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    min-height: 45vh;
    display: flex;
    align-items: center;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--primary-dark);
    letter-spacing: -2px;
    margin-bottom: 1rem;
}

.hero .subtitle {
    display: inline-block;
    font-size: 1.25rem;
    color: white;
    background: var(--primary-dark);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    max-width: 800px;
    box-shadow: 0 4px 15px rgba(67, 56, 202, 0.3);
    margin-top: 1.5rem;
    line-height: 1.4;
}

.hero-description {
    font-size: 1.4rem;
    color: var(--text-muted);
    font-weight: 400;
    max-width: 800px;
    margin-top: 2rem;
    line-height: 1.6;
    font-style: italic;
    opacity: 0.95;
}

/* CONTAINER & SECTIONS */
.container {
    max-width: 1100px;
    margin: -4rem auto 0;
    padding: 0 2rem;
    position: relative;
    z-index: 10;
}

.content-section {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 4rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin-bottom: 4rem;
    box-shadow: var(--shadow-xl);
    display: none; /* Controlled by JS */
}

.content-section.active {
    display: block;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.content-section h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
    color: var(--text-main);
    letter-spacing: -1px;
}

.content-section h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 3rem 0 1.5rem;
    color: var(--primary-dark);
}

/* STAT CARDS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.stat-card .stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.4;
}

/* CALLOUTS */
.callout {
    padding: 2rem;
    border-radius: var(--radius);
    margin: 2.5rem 0;
    border-left: 6px solid var(--primary);
    background: #f8fafc;
    position: relative;
    overflow: hidden;
}

.callout::before {
    content: '"';
    position: absolute;
    top: -10px;
    right: 20px;
    font-size: 5rem;
    color: var(--primary);
    opacity: 0.1;
    font-family: serif;
}

.callout p {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--primary-dark);
    font-style: italic;
    line-height: 1.5;
}

.conclusion-box {
    background: linear-gradient(to right, rgba(99, 102, 241, 0.05), rgba(255, 255, 255, 0.5));
    border-left: 4px solid var(--primary-dark);
    margin-top: 3.5rem;
    position: relative;
}

.conclusion-box::before {
    content: '🎯';
    position: absolute;
    top: -15px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.5;
}

/* IMAGES & CHARTS */
.grafico-wrapper {
    margin: 3rem 0;
    background: #fff;
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.grafico-wrapper.borderless {
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
}

.grafico-wrapper img {
    width: 100%;
    height: auto;
    border-radius: calc(var(--radius) - 8px);
    margin-bottom: 1rem;
    display: block;
}

.grafico-wrapper canvas {
    width: 100% !important;
    height: auto !important;
}

.grafico-caption {
    font-size: 0.9rem;
    color: var(--text-light);
    text-align: center;
    font-style: italic;
    font-weight: 500;
}

.pregunta-texto {
    color: #828afc; /* Lighter blue for better contrast on dark background */
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* PREMIUM DARK CHARTS */
.chart-premium-dark {
    background: #1a2234 !important; /* Refined navy to match screenshot */
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    padding: 2rem !important;
}

.chart-flex-container {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.chart-table-wrapper {
    flex: 1;
    min-width: 250px;
}

.chart-canvas-wrapper {
    flex: 2;
    min-width: 300px;
}

/* SEGMENTATION GRID */
.segmentation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.segmentation-card {
    background: #1a2234;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.segmentation-card .premium-table {
    font-size: 0.85rem;
}

.segmentation-card h4 {
    color: #7c7cfc;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1.5px;
    text-align: center;
    margin: 0;
    font-family: 'Outfit', sans-serif;
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
}

.premium-table strong {
    color: inherit;
}

.premium-table th {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 2px solid rgba(92, 96, 245, 0.3);
    color: #7c7cfc;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.premium-table td {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.premium-table .val-column {
    text-align: right;
    font-weight: 700;
    color: #fff;
}

.chart-premium-dark .grafico-caption {
    color: #7c7cfc !important; /* Light blue-purple for 'SEGMENTACIÓN POR SEXO' style */
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    font-family: 'Outfit', sans-serif;
}

.chart-premium-dark canvas {
    /* filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5)); */
}

/* HIGHLIGHT BOX (INSTITUTOS) */
.highlight-box {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(255, 255, 255, 0.8) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 2rem;
    border-radius: 20px;
    margin: 2.5rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.institutos-names {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--primary-dark);
    text-align: center;
    margin-top: 1rem !important;
}

.institutos-names strong {
    color: var(--primary);
    font-weight: 700;
}

/* LISTS */
ul, ol {
    margin-bottom: 2rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

/* AUTHOR LIST */
.author-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.author-item {
    background: #fff;
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.author-item strong {
    font-size: 1.1rem;
    color: var(--primary-dark);
}

.author-item span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* FOOTER */
.site-footer {
    text-align: center;
    padding: 6rem 2rem;
    margin-top: 4rem;
    background: var(--bg-sidebar);
    color: #fff;
}

.site-footer p {
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.welcome-title {
    font-size: 2.2rem;
    color: var(--primary-dark);
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.welcome-divider {
    width: 50px;
    height: 3px;
    background: var(--primary);
    margin: 0 auto 2rem;
    border-radius: 10px;
}

.welcome-pills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 3rem 0;
}

.welcome-pill {
    padding: 1.5rem;
    background: rgba(99, 102, 241, 0.03);
    border-radius: 1.5rem;
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: all 0.3s ease;
}

.welcome-pill:hover {
    transform: translateY(-5px);
    background: rgba(99, 102, 241, 0.05);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.1);
}

.pill-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.welcome-pill h3 {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.welcome-pill p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.welcome-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    font-weight: 400;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .welcome-pills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* WELCOME SECTION (INICIO) */
.welcome-container {
    max-width: 900px;
    margin: 0 auto;
}

.welcome-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

#inicio h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-tagline {
    font-size: 1.5rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 3.5rem;
    max-width: 700px;
}

.welcome-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.welcome-card.main {
    background: white;
    padding: 3rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.welcome-card h3 {
    margin-top: 0;
    font-size: 1.5rem;
}

.welcome-stats-mini {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.mini-card {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

.mini-card:hover {
    background: white;
    transform: translateX(10px);
}

.mini-card .val {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    font-family: 'Outfit';
    min-width: 80px;
}

.mini-card .lab {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.welcome-cta {
    margin-top: 2rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Outfit';
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.5);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(99, 102, 241, 0.6);
}

.welcome-authors-preview {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-light);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .hero h1 { font-size: 2.8rem; }
}

@media (max-width: 768px) {
    .hero { padding: 3rem 1.5rem; }
    .hero h1 { font-size: 2.2rem; }
    .container { margin-top: -1.5rem; padding: 0 1rem; }
    .content-section { padding: 2rem; }
    .author-grid { grid-template-columns: 1fr; }
    
    #inicio h1 { font-size: 2.5rem; }
    .welcome-grid { grid-template-columns: 1fr; }
}

/* DASHBOARD STYLES */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.db-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    min-height: 450px;
}

.db-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.db-card h3 {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.db-canvas-wrapper {
    flex: 1;
    position: relative;
    width: 100%;
}

/* --- SECCIÓN 8: BIBLIOGRAFÍA Y ANEXOS --- */
.biblio-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.biblio-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.biblio-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    transform: translateX(10px);
}

.biblio-card .bib-icon {
    font-size: 1.5rem;
    color: var(--primary-light);
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.biblio-card .bib-content {
    flex-grow: 1;
}

.biblio-card .bib-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-dim);
}

.biblio-card .bib-link {
    display: inline-block;
    margin-top: 0.75rem;
    color: var(--primary-light);
    text-decoration: none;
    font-size: 0.85rem;
    word-break: break-all;
    border-bottom: 1px solid transparent;
}

.biblio-card .bib-link:hover {
    border-bottom-color: var(--primary-light);
}

.annex-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.annex-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
}

.annex-card h4 {
    color: var(--primary-light);
    margin-bottom: 1rem;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.thanks-card {
    margin-top: 4rem;
    padding: 3rem;
    text-align: left;
    background: radial-gradient(circle at center, rgba(16, 185, 129, 0.05) 0%, transparent 70%);
    border-radius: 24px;
    border: 1px dashed rgba(16, 185, 129, 0.2);
}

.thanks-card h3 {
    color: var(--secondary-light);
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .biblio-card {
        flex-direction: column;
        gap: 0.75rem;
    }
    .biblio-card:hover {
        transform: none;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .db-card {
        min-height: 400px;
        padding: 1.5rem;
    }
}

/* EXCEPTIONALITY HIGHLIGHT */
.exceptionality-highlight {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 20px;
    padding: 3rem;
    margin: 3rem 0;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.exceptionality-highlight::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #6366f1, #0ea5e9, #f43f5e);
    border-radius: 22px;
    z-index: -1;
}

.exceptionality-highlight p {
    color: #e2e8f0;
    font-size: 1.25rem;
    line-height: 1.8;
    font-style: italic;
    font-family: 'Outfit', sans-serif;
    margin: 0;
    position: relative;
}

.exceptionality-highlight strong {
    color: inherit;
}

.exceptionality-highlight::before {
    content: '★';
    position: absolute;
    top: -20px;
    left: 40px;
    background: var(--accent);
    color: white;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
    box-shadow: 0 0 20px rgba(244, 63, 94, 0.5);
    z-index: 10;
}

/* CONCLUSIONS SECTION STYLES */
.conclusions-header {
    margin-bottom: 4rem;
}

.concl-main-card {
    background: linear-gradient(135deg, rgb(15, 23, 42) 0%, rgba(15, 23, 42, 0.98) 100%); /* Opaco al inicio para evitar sangrado */
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 3.5rem;
    margin-bottom: 3.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6);
}

.concl-main-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 8px; /* Un poco más grueso para presencia */
    height: 100%;
    background: var(--primary);
    box-shadow: 4px 0 15px rgba(99, 102, 241, 0.4);
}

.concl-main-card h3 {
    color: #fff;
    font-size: 2.2rem;
    margin-bottom: 2rem;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.5px;
    font-weight: 800;
}

.concl-main-card p {
    color: #f8fafc;
    font-size: 1.3rem;
    line-height: 1.8;
    margin-bottom: 0;
    font-weight: 400;
}

.concl-main-card strong, 
.concl-main-card b {
    color: var(--secondary-light); /* Color brillante para los destacados */
    font-weight: 700;
}

.concl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
}

/* Si hay un número impar de tarjetas, la última ocupa todo el ancho de forma responsiva */
.concl-grid .concl-sub-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.concl-sub-card {
    background: #1e293b; /* Totalmente opaco para evitar el efecto grisáceo */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.concl-sub-card:hover {
    transform: translateY(-8px);
    background: #0f172a;
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.concl-sub-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.concl-sub-card h4 {
    color: #fff;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
}

.concl-sub-card p {
    color: #cbd5e1;
    font-size: 1.15rem;
    line-height: 1.7;
    margin: 0;
}

.concl-sub-card strong,
.concl-sub-card b {
    color: #fff; /* Negrita en blanco sobre el fondo oscuro */
}

.concl-sub-card .highlight {
    color: var(--secondary-light);
    font-weight: 700;
    border-bottom: 1px dashed var(--secondary-light);
}

@media (max-width: 768px) {
    .concl-main-card {
        padding: 2rem;
    }
}


/* SECTION 7 & 8: PROPUESTAS Y ANEXOS */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    margin-bottom: 5rem;
}

.action-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.action-card:hover {
    background: rgba(30, 41, 59, 0.8);
    transform: translateY(-10px) scale(1.02);
    border-color: var(--primary-light);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.action-card .action-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.action-card h4 {
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
    font-family: 'Outfit', sans-serif;
}

.action-card p {
    color: #cbd5e1;
    line-height: 1.7;
    font-size: 1.05rem;
    margin-bottom: 0;
}

.action-card .sub-list {
    margin-top: 1.5rem;
    padding-left: 1.2rem;
    border-left: 2px solid rgba(99, 102, 241, 0.3);
    list-style: none;
}

.action-card .sub-list li {
    color: #94a3b8;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    position: relative;
    padding-left: 1.5rem;
}

.action-card .sub-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-light);
}

/* Simetría para tarjetas impares (la última ocupa todo el ancho) */
.action-grid .action-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

/* SITE FOOTER */
.site-footer {
    background: #0f172a;
    color: #4b5563;
    padding: 4rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
    width: 100%;
}

.site-footer p {
    margin: 0.5rem 0;
}


.site-footer strong {
    color: #94a3b8;
}

/* --- ESTILOS DE ANEXOS Y CUESTIONARIOS --- */
.qa-container {
    background: rgba(255, 255, 255, 0.03);
    padding: 2.5rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
}

.question-item {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.question-item p {
    margin: 0 0 0.4rem 0;
    line-height: 1.5;
}

.question-item p:last-child {
    margin-bottom: 0;
}

.question-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.question-label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 0.75rem;
}

.option-group {
    list-style: none;
    padding-left: 0.5rem;
}

.option-group li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: #cbd5e1;
}

.option-group li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--secondary);
    font-weight: bold;
}

.info-note {
    background: rgba(99, 102, 241, 0.05);
    border-left: 4px solid var(--secondary);
    padding: 1.25rem;
    border-radius: 0 1rem 1rem 0;
    margin-top: 1rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #94a3b8;
}

.info-note strong {
    color: var(--secondary-light);
}

.annex-link-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    margin-bottom: 2.5rem;
}

.annex-link-box span {
    font-size: 1.5rem;
}

.annex-link-box a {
    color: var(--secondary-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.annex-link-box a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* --- NAVEGACIÓN MÓVIL (Toggle & Overlay) --- */
.mobile-toggle {
    display: none; /* Oculto en desktop */
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    width: 50px;
    height: 50px;
    background: var(--primary);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    z-index: 2000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mobile-toggle .bar {
    width: 25px;
    height: 3px;
    background: #fff;
    border-radius: 4px;
    transition: all 0.3s ease;
}

/* Transformed Hamburger */
.mobile-toggle.active {
    background: var(--accent);
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.4);
}

.mobile-toggle.active .bar:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.mobile-toggle.active .bar:nth-child(2) { opacity: 0; }
.mobile-toggle.active .bar:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 950;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 1024px) {
    .mobile-toggle {
        display: flex;
    }

    .sidebar {
        left: -320px; /* Escondido */
        width: 300px;
        box-shadow: none;
    }

    .sidebar.active {
        left: 0;
        box-shadow: 20px 0 50px rgba(0,0,0,0.3);
    }

    .main-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
    }

    .welcome-card.main h1 {
        font-size: 2.2rem;
    }

    .concl-grid, .annex-grid, .action-grid {
        grid-template-columns: 1fr !important;
    }

    .biblio-card {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-sub-menu {
        margin-left: 1rem;
        padding-left: 0.5rem;
    }
}

/* NAVIGATION BETWEEN SECTIONS */
.next-section-nav {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px dashed var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
}

.next-section-nav .btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.next-section-nav .btn span {
    font-size: 1.4rem;
    transition: transform 0.3s ease;
}

.next-section-nav .btn:hover span {
    transform: translateX(5px);
}

