/* =========================================
   VARIABLES Y CONFIGURACIÓN BASE
========================================= */
:root {
    --acento: #2e6091; 
    --acento-hover: #74ACDF;
    --texto-oscuro: #222222;
    --texto-gris: #555555;
    --fondo-claro: #f8f9fa;
    --blanco: #ffffff;
    --color-halo: #91a6b1;
    --glass-nav-bg: rgba(255, 255, 255, 0.384);
    --glass-nav-hover: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --card-bg: rgba(255, 255, 255, 0.3);
    --card-hover: rgba(255, 255, 255, 0.8);
    --card-border: rgba(255, 255, 255, 0.8);
    --split-bg: linear-gradient(135deg, #E8F0F8 0%, #e6eff9 50%, #ffffff 100%);
    --quote-bg: rgba(255, 255, 255, 0.45);
    --quote-text: #000000;
    --faq-title-color: #1d3f5f;
    --faq-hover-bg: rgba(46, 96, 145, 0.03);
}

@media (prefers-color-scheme: dark) {
    :root {
        --acento: #74ACDF; 
        --acento-hover: #a0c4ff;
        --texto-oscuro: #e4e7eb; 
        --texto-gris: #aab4be;
        --fondo-claro: #101418; 
        --blanco: #1a2026; 
        --color-halo: #74ACDF;
        --glass-nav-bg: rgba(16, 20, 24, 0.70);
        --glass-nav-hover: rgba(26, 32, 38, 0.95);
        --glass-border: rgba(152, 152, 152, 0.284);
        --card-bg: rgba(26, 32, 38, 0.4);
        --card-hover: rgba(36, 44, 52, 0.8);
        --card-border: rgba(255, 255, 255, 0.1);
        --split-bg: linear-gradient(135deg, #0a0d10 0%, #101418 50%, #151a1f 100%);
        --quote-bg: rgba(26, 32, 38, 0.5);
        --quote-text: #e4e7eb;
        --faq-title-color: #74ACDF;
        --faq-hover-bg: rgba(116, 172, 223, 0.08);
    }
    
    .navbar {
        background: rgba(12, 16, 20, 0.45); 
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9); 
    }

    /* Suavizamos el halo de luz de la navbar al hacer hover */
    .navbar::before {
        padding: 1px !important; /* Afina el grosor del borde (el original es de 2px) */
        
        /* Cambiamos el color a un azul más profundo y acortamos el haz de luz */
        background: conic-gradient(
            from var(--border-angle), 
            transparent 30%, 
            rgba(46, 96, 145, 0.8) 50%, 
            transparent 70%
        ) !important;
    }

    .nav-button-right {
        color: #e8eaed; 
        border-color: rgba(255, 255, 255, 0.06); 
    }
    
    .nav-button-right i,
    .nav-button-right .btn-text,
    .nav-button-right .btn-icon {
        color: #e8eaed; 
    }

    .nav-icons-left a {
        background-color: var(--glass-nav-bg) !important; 
        border: 1px solid #375169 !important; 
        color: #4c89c2 !important; 
    }

    .nav-icons-left a:hover,
    .nav-icons-left a:active {
        background-color: var(--glass-nav-hover) !important;
        /* Le damos un tono sutilmente azulado al borde para acompañar el hundimiento */
        border-color: rgba(116, 172, 223, 0.15) !important; 
        color: var(--acento-hover) !important;
        
        /* Sombra interna azulada combinada con un negro de refuerzo */
        box-shadow: 
            inset 0 4px 10px rgba(46, 96, 145, 0.4), /* El tono azul de tu --acento */
            inset 0 1px 3px rgba(0, 0, 0, 0.5),      /* Refuerzo oscuro para la profundidad */
            0 0 0 transparent !important;
        transform: translateY(2px) scale(0.95) !important;
    }

    .hero-content,
    .hero-content h1,
    .hero-content p {
        color: #d1d1d1 !important; 
    }

    .hero-content h2 {
        color: #cfd4d9 !important; 
    }
    
    .card-btn {
        background: var(--blanco) !important; 
        color: var(--acento) !important; 
        border: 1px solid rgba(255, 255, 255, 0.05); 
    }

    /* La nueva regla para revivir el hover */
    .card:hover .card-btn {
        background: var(--acento) !important; /* Fondo celeste */
        color: var(--blanco) !important;      /* Flecha oscura */
    }

    .faq-answer a {
        color: #a0c4ff !important; /* Un celeste claro para que resalte en el fondo oscuro */
        border-bottom-color: #a0c4ff !important;
    }

    .faq-answer a:hover {
        color: #ffffff !important; /* Blanco al pasar el mouse */
        border-bottom-color: #ffffff !important;
        background-color: rgba(255, 255, 255, 0.1);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--fondo-claro);
    color: var(--texto-oscuro);
    transition: background-color 0.4s ease, color 0.4s ease; 
}

/* =========================================
   NAVBAR Y EFECTOS
========================================= */
@property --border-angle {
    syntax: "<angle>";
    inherits: true;
    initial-value: 0turn;
}

.navbar {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    height: 75px;
    
    background: var(--glass-nav-bg);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 25px;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: background-color 0.4s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.navbar:hover {
    border-color: transparent;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    background: var(--glass-nav-hover);
}

.navbar::before {
    content: "";
    position: absolute;
    inset: -2px; 
    border-radius: 20px; /* Mantiene la misma curvatura del menú */
    padding: 2px; /* Este es el grosor del rayo de luz */
    background: conic-gradient(from var(--border-angle), transparent 15%, var(--color-halo) 50%, transparent 85%);
    
    /* Sistema de máscaras corregido para todos los navegadores */
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    
    z-index: -1;
    opacity: 0; 
    transition: opacity 0.3s ease;
    pointer-events: none; 
}

.navbar:hover::before {
    opacity: 1;
    animation: borderRotate 3s linear infinite;
}

@keyframes borderRotate {
    100% { --border-angle: 1turn; }
}

.nav-icons-left {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
}

.nav-icons-left a {
    color: #3e77b1; 
    font-size: 1.2rem;
    text-decoration: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.nav-icons-left a:hover,
.nav-icons-left a:active {
    background-color: rgba(0, 0, 0, 0.05); 
    color: #1d3f5f; 
    transform: translateY(2px) scale(0.95);
    box-shadow: 
        inset 0 3px 6px rgba(0, 0, 0, 0.15),
        inset 0 1px 3px rgba(0, 0, 0, 0.1),
        0 0 0 transparent;
    border-color: rgba(0, 0, 0, 0.05);
}

.nav-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-logo img {
    height: 66px;
    width: auto;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-logo:hover img {
    transform: scale(1.08) translateY(-2px); 
    filter: drop-shadow(0 8px 12px rgb(252, 253, 255)); 
}

.nav-button-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.btn-vinculos {
    background-color: rgba(57, 103, 149, 0.85); 
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: var(--blanco) !important;
    font-size: 0.95rem !important;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); 
    border: 1px solid rgba(255, 255, 255, 0.2); 
    transition: all 0.3s ease; 
}

.btn-vinculos:hover,
.btn-vinculos:active {
    background-color: rgba(46, 83, 120, 0.7); 
    color: var(--blanco) !important; 
    border-color: rgba(255, 255, 255, 0.05); 
    transform: translateY(2px) scale(0.98); 
    box-shadow: 
        inset 0 4px 8px rgba(0, 0, 0, 0.4),  
        inset 0 1px 3px rgba(0, 0, 0, 0.2),  
        0 0 0 transparent; 
}

/* =========================================
   WRAPPER COMPARTIDO (HERO + VINCULOS)
========================================= */
.hero-vinculos-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: var(--fondo-claro);
}

#blobs-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0; 
}

.blob-circle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform;
    opacity: 0.5;
    transition: background-color 2s ease;
}

/* =========================================
   SECCIÓN 1: HERO
========================================= */
.hero-section {
    min-height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 20px 40px;
    background: transparent; /* Transparente para ver las blobs */
}

/* MODIFICADO: Redujimos la opacidad para que se vean las blobs a través */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(13, 100, 175, 0.202), rgba(1, 45, 85, 0.729));
    z-index: 1;
}

.hero-content {
    max-width: 900px;
    color: var(--blanco);
    margin-top: 50px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.hero-content h2 {
    font-size: 1.2rem;
    font-weight: 300;
    color: #f1f1f1;
    margin-bottom: 30px;
    letter-spacing: 1px;
}

.hero-content p {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 15px;
    text-align: justify;
}

/* =========================================
   SECCIÓN 2: VÍNCULOS
========================================= */
.vinculos-section {
    min-height: 100vh;
    padding: 100px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: transparent; /* Transparente para ver las blobs */
}

.vinculos-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1000px;
    width: 100%;
    z-index: 1;
}

.card {
    text-decoration: none;
    color: var(--texto-oscuro);
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    transform-style: preserve-3d;
    transition: background-color 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.card:hover {
    background: var(--card-hover);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.253);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--acento);
    margin-bottom: 15px;
    display: block;
    transition: all 0.3s ease;
    transform: translateZ(40px);
}

.card:hover .card-icon {
    transform: translateZ(50px) scale(1.1);
}

.card:nth-child(1):hover .card-icon { color: #00575F; } 
.card:nth-child(2):hover .card-icon { color: #E78824; } 
.card:nth-child(3):hover .card-icon { color: #DE4A98; } 
.card:nth-child(4):hover .card-icon { color: #8E499B; } 

.card h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.card p {
    color: var(--texto-gris);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.card-btn {
    display: inline-block;
    background: rgba(255, 255, 255, 0.8);
    color: var(--acento);
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

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

/* =========================================
   SECCIÓN 3: CONVICCIÓN
========================================= */
.gallery-container {
    flex: 1;
    height: 100%;
    position: relative;
    border-radius: 30px; 
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    z-index: 2;
}

.gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0; 
}

@keyframes simpleFade {
    0% { opacity: 0; z-index: 1; }
    2% { opacity: 1; z-index: 2; }  
    10% { opacity: 1; z-index: 2; } 
    12% { opacity: 0; z-index: 1; } 
    100% { opacity: 0; z-index: 1; }
}

.quote-side {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}
.split-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    padding: 80px 5%;
    height: 550px; 
    position: relative;
    overflow: hidden;
    background: var(--split-bg);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.quote-glass-card {
    background: var(--quote-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 45px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    text-align: center;
    max-width: 520px;
    transition: background-color 0.4s ease, border-color 0.4s ease;
}

.quote-text {
    font-family: 'Montserrat', sans-serif;
    color: var(--quote-text); 
    font-size: 1.15rem;
    line-height: 1.7;
    font-weight: 500;
    margin-bottom: 25px;
    transition: color 0.4s ease;
}

.quote-author {
    display: block;
    font-family: 'Montserrat', sans-serif;
    color: var(--faq-title-color); 
    font-weight: 800; 
    font-size: 0.85rem; 
    letter-spacing: 2.5px;
    text-transform: uppercase;
}

.tilt-element {
    transition: transform 0.2s ease-out;
    transform-style: preserve-3d;
    will-change: transform;
}

/* =========================================
   SECCIÓN 4: FAQ (MINIMALISTA)
========================================= */
.faq-minimal-section {
    padding: 120px 20px;
    background-color: var(--fondo-claro);
    display: flex;
    justify-content: center;
}

.faq-minimal-container {
    max-width: 800px;
    width: 100%;
}

.faq-line-item {
    border-bottom: 1px solid rgba(85, 117, 149, 0.2); 
    border-left: 3px solid transparent; 
    background-color: transparent;
    transition: all 0.3s ease;
    border-radius: 0 8px 8px 0; 
}

.faq-minimal-container h2 {
    font-size: 2.5rem;
    color: var(--faq-title-color);
    margin-bottom: 50px;
    text-align: left; 
    font-weight: 700;
    transition: color 0.4s ease;
}

.faq-line-item:hover,
details[open].faq-line-item {
    background-color: var(--faq-hover-bg); 
    border-left-color: var(--acento); 
}

summary {
    padding: 25px 20px; 
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--faq-title-color);
    transition: color 0.3s ease;
}
summary::-webkit-details-marker { display: none; }

details[open] summary {
    color: var(--acento-hover);
}

.faq-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #557595;
    transition: transform 0.4s ease, color 0.3s ease;
}

details[open] .faq-icon {
    transform: rotate(45deg); 
    color: var(--acento-hover);
}

.faq-answer {
    padding: 0 20px 30px 20px; 
    color: var(--texto-gris);
    line-height: 1.8;
    font-size: 1.05rem;
    max-width: 95%; 
    opacity: 0;
    transform: translateY(-10px);
    animation: slideDownFade 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.faq-answer a {
    color: #1d3f5f;
    text-decoration: none;
    border-bottom: 1px solid #1d3f5f;
    padding-bottom: 2px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.faq-answer a:hover {
    background-color: rgba(29, 63, 95, 0.05);
    border-color: #557595;
    color: #557595;
}

.docentes-minimal-list {
    list-style: none;
    padding: 0;
    margin-top: 10px;
}

.docentes-minimal-list li {
    margin-bottom: 8px;
}

@keyframes slideDownFade {
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* =========================================
   FOOTER INSTITUCIONAL (MINIMALISTA)
========================================= */
.main-footer {
   background-color: #1d3f5f;
    color: #ffffff;
    padding: 80px 5% 60px 5%; 
}

.footer-minimal-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.footer-divider {
    width: 80%; 
    max-width: 600px; 
    height: 2px;
    background: #557595;
    margin: 0 auto 30px auto;
    opacity: 0.6;
}

.arg-flag {
    margin-bottom: 20px;
}

.arg-flag svg {
    width: 40px;   
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 3px;
}

.inst-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 5px;
}

.inst-dept {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 5px;
}

.inst-uni {
    font-size: 0.9rem;
    opacity: 0.7;
}

.inst-uni a {
    color: #ffffff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.3);
}

.inst-uni a:hover {
    color: #a0c4ff;
}

.btn-icon {
    display: none;
}

/* =========================================
   SECCIÓN CONMEMORATIVA (MEMORIA)
========================================= */
.memoria-section {
    padding: 60px 20px; /* Le da una altura similar a un footer */
    background-color: var(--fondo-claro);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    /* Una línea separadora muy sutil arriba para despegarlo de las FAQ */
    border-top: 1px solid rgba(255, 255, 255, 0); 
}

.memoria-container {
    max-width: 600px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px; /* Separación entre el banner y el texto */
}

.memoria-banner {
    width: 100%;
    max-width: 250px; /* Límite máximo establecido */
    height: auto;     /* Ajuste proporcional para celulares */
    opacity: 0.9;     /* Un poquito de transparencia para que no sea tan "duro" */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.memoria-banner:hover {
    opacity: 1;
    transform: scale(1.02); /* Un brevísimo efecto al pasar el mouse */
}

.memoria-text {
    font-family: 'Montserrat', sans-serif;
    color: var(--texto-oscuro);
    font-size: 1.1rem;
    line-height: 1.6;
    letter-spacing: 0.5px; /* Separa apenas las letras para dar tono institucional/solemne */
    margin: 0;
}

.memoria-text strong {
    font-weight: 600;
    color: var(--acento); /* Usa el azul/celeste de tu paleta para la primera frase */
    font-size: 1.2rem;
}

/* =========================================
   ADAPTACIÓN RESPONSIVE (MÓVIL Y TABLET)
========================================= */
@media (max-width: 992px) {
    .split-section {
        flex-direction: column;
        height: auto;
        padding: 50px 20px;
        gap: 30px;
    }
    
    .gallery-container {
        flex: none; 
        width: 100%;
        height: 300px; 
        min-height: 300px; 
    }
    
    .quote-side {
        width: 100%;
        flex: none;
    }
    
    .quote-glass-card {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .navbar {
        width: 95%;
        padding: 0 15px;
        grid-template-columns: 1fr auto 1fr;
    }
    
    .nav-icons-left a:not(:first-child) {
        display: none;
    }

    .hero-section {
        justify-content: flex-start; 
        text-align: left;
    }
    
    .hero-content p {
        text-align: left; 
    }

    .hero-content h1 {
        font-size: 1.5rem;
        white-space: normal;
    }
    
    .nav-button-right {
         display: flex;
    }
    
    .btn-text {
        display: none; 
    }
    
    .btn-icon {
        display: inline-block; 
        font-size: 1.2rem;
    }
    
    .btn-vinculos {
        padding: 10px 14px; 
    }

    .card {
        transition: all 0.2s ease-out; 
    }
    
    .card:active {
        background: var(--card-bg); 
        transform: scale(0.96); 
        box-shadow: 
            inset 0 4px 15px rgba(0, 0, 0, 0.08), 
            0 0 0 transparent; 
        border-color: var(--glass-border); 
    }
}