:root {
    --pergamino: #F4EFE4;
    --pergamino-claro: #FBF8F2;
    --tinta: #1A1A1A;
    --oro: #B8893E;
    --rojo: #8B1E2D;
    --gris: #696969;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--pergamino-claro);
    color: var(--tinta);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

img {
    display: block;
    max-width: 100%;
}

.container {
    width: min(1200px, 92%);
    margin: auto;
}

/* ---------------- HEADER ---------------- */

header {
    position: relative;
    background: var(--pergamino-claro);
    border-bottom: 1px solid rgba(0,0,0,.06);
    z-index: 999;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100px;
}

/* --- Estructura del contenedor del Logo --- */
.logo {
    display: flex;
    align-items: center;
    gap: 12px; /* Espacio entre la cruz y el texto */
    text-decoration: none;
}

/* 1. Agrandar la imagen del logo según la proporción visual */
.logo-icon {
    height: 65px; /* Ajusta este valor si el PDF especificaba un tamaño exacto */
    width: auto;
}

/* Contenedor del texto de marca */
.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Nombre principal ("Tábano") */
.logo-title {
    font-family: 'Cinzel', serif;
    font-size: 24px;
    font-weight: 500;
    color: var(--tinta);
    line-height: 1;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Frase secundaria ("Cultura y Vida Cristiana") */
.logo-subtitle {
    font-family: 'Cinzel', serif; /* O 'Cormorant Garamond' si preferís la tipografía con serif clásica de los subtítulos */
    font-size: 9px;
    font-weight: 500;
    color: var(--oro); /* Color dorado institucional de tus variables */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

nav > ul {
    display: flex;
    gap: 32px;
    list-style: none;
    align-items: center; /* Soluciona el desalineado vertical de "Nosotros" */
}

nav a {
    font-family: 'Cinzel', serif; /* <-- AGREGADA */
    text-transform: uppercase;     /* <-- AGREGADA: Todo a mayúsculas como pide el PDF */
    letter-spacing: 1px;          /* <-- AGREGADA: Para que "respire" el texto */
    font-size: 14px;              /* Un toque más chica para que entre prolijo */
    font-weight: 500;            
    color: var(--tinta);         
    text-decoration: none;       
    transition: color .25s;      
}

nav a:hover, nav a.active {
    color: var(--rojo);
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--rojo);
}

/* --- LOGICA SUBMENÚ --- */

.has-submenu {
    position: relative;
}

.has-submenu > a {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Indicador de flecha sutil */
.has-submenu > a::after {
    content: "⌄";
    font-size: 11px;
    transition: transform .25s;
}

.has-submenu:hover > a::after {
    transform: rotate(180deg);
}

.submenu {
    position: absolute;
    top: calc(100% + 15px);
    left: 0; /* Alineado a la izquierda del botón Nosotros */
    width: 230px;
    background: var(--pergamino-claro);
    border-top: 3px solid var(--oro);
    list-style: none;
    padding: 8px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .25s, transform .25s, visibility .25s;
    z-index: 1000;
    
    /* Forzamos el comportamiento de lista vertical limpia */
    display: flex;
    flex-direction: column; 
}

.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.submenu li {
    width: 100%;
}

.submenu a {
    display: block;
    padding: 12px 20px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: var(--tinta);
    transition: all .2s ease;
}

.submenu a::after {
    display: none; /* Evita que herede la línea roja */
}

.submenu a:hover {
    background: var(--pergamino);
    color: var(--rojo);
    padding-left: 25px;
}

/* ---------------- HERO ---------------- */

.hero {
    height: 85vh;
    min-height: 600px;
    background: url("../img/home.jpg") center center no-repeat;
    background-size: cover;
    position: relative;
    display: flex;
    align-items: center;
}

.overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(10, 10, 10, 0.85) 0%, rgba(15, 15, 15, 0.6) 40%, rgba(0, 0, 0, 0) 100%);
}

.hero-content {
    position: relative;
    z-index: 5;
}

.hero-text {
    max-width: 620px;
    color: #fff;
}

.hero h1 {
    font-family: 'Cinzel', serif; /* <-- AGREGADA */
    font-size: 64px;             
    font-weight: 600;            
    text-transform: uppercase;    
    letter-spacing: 2px;         
    line-height: 1.1;            
    margin-bottom: 10px;         
}

.hero h2 {
    font-family: 'Cormorant Garamond', serif; /* <-- AGREGADA */
    font-style: italic;                       /* <-- AGREGADA */
    font-size: 32px;                         
    font-weight: 500;                         /* Reemplazá el color fijo #dfba7c por la variable */
    color: var(--oro);                       
    margin-bottom: 30px;                     
}

.hero-divider {
    display: flex;
    align-items: center;
    margin: 30px 0;
}

.hero-divider::before, .hero-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--rojo);
    max-width: 120px;
}

.hero-divider .cross {
    color: var(--rojo);
    margin: 0 15px;
    font-size: 18px;
}

.hero p {
    font-family: "Cormorant Garamond", serif;
    font-size: 23px;
    line-height: 1.5;
    font-weight: 400;
    color: #e0e0e0;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
    padding: 16px 36px;
    background: var(--rojo);
    color: white;
    text-decoration: none;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 500;
    transition: background .35s;
}

.btn:hover {
    background: #64101b;
}

/* ---------------- FRASE (QUOTE) ---------------- */

.quote {
    padding: 50px 0;
    background: var(--pergamino);
    border-top: 1px solid rgba(184, 137, 62, 0.2);
    border-bottom: 1px solid rgba(184, 137, 62, 0.2);
    position: relative;
}

.quote-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.quote p {
    text-align: center;
    font-family: "Cormorant Garamond", serif;
    font-size: 36px;
    font-style: italic;
    color: #333;
}

.quote .reference {
    font-size: 24px;
    font-family: "Cormorant Garamond", serif;
    color: #555;
    margin-left: 10px;
}

.ornament {
    color: var(--oro);
    font-size: 28px;
}

.ornament.flipped {
    transform: scaleX(-1);
    display: inline-block;
}

/* ---------------- FOOTER ---------------- */

footer {
    background: var(--pergamino);
    padding: 60px 0;
    position: relative;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1.2fr 1fr;
    gap: 40px;
    align-items: start;
}

.footer-col {
    display: flex;
    flex-direction: column;
    /* --- AGREGAR DESDE ACÁ --- */
    border-right: 2px solid rgba(184, 137, 62, 0.2); /* Línea fina con el color oro institucional al 20% de opacidad */
    padding-right: 20px; /* Despega el texto de la línea */
}

/* Quitamos la línea en la última columna (redes) para que no quede colgada a la derecha */
.footer-col.redes-col {
    border-right: none;
    padding-right: 0;
}

.contact-info {
    list-style: none;
}

.contact-info li {
    font-family: "Cormorant Garamond", serif;
    font-size: 18px;
    margin-bottom: 15px;
    color: #4a4a4a;
}

.col-image {
    display: flex;
    justify-content: center;
}

.pillar-img {
    height: 140px;
    opacity: 0.7;
}

.footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
    list-style: none;
}

.footer-links a {
    font-family: "Cormorant Garamond", serif;
    font-size: 19px;
    color: #4a4a4a;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--oro);
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.social-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--oro);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--oro);
    font-weight: bold;
    transition: all 0.3s;
}

.social-btn:hover {
    background: var(--oro);
    color: var(--pergamino);
}

.italics-gold {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    color: var(--oro);
    font-size: 18px;
}

.subscribe-link {
    font-family: "Cormorant Garamond", serif;
    color: var(--oro);
    text-decoration: none;
    font-size: 18px;
    display: inline-block;
    margin-top: 5px;
    border-bottom: 1px solid transparent;
    transition: border 0.2s;
}

.subscribe-link:hover {
    border-bottom: 1px solid var(--oro);
}

/* ---------------- RESPONSIVE ---------------- */

/* ---------------- RESPONSIVE ---------------- */

@media (max-width: 960px) {
    .nav {
        height: 80px;
        position: relative;
    }

    /* --- BOTÓN HAMBURGUESA --- */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 26px;
        height: 18px;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 1001;
    }

    .menu-toggle .bar {
        width: 100%;
        height: 2px;
        background-color: var(--tinta);
        transition: all 0.3s ease;
    }

    /* Animación a Cruz cuando está activo */
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* --- MENÚ DESPLEGABLE COMO CORTINA --- */
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--pergamino-claro);
        border-bottom: 2px solid var(--oro);
        max-height: 0;
        opacity: 0;
        visibility: hidden;
        overflow: hidden;
        transition: max-height 0.4s ease, opacity 0.3s ease, visibility 0.3s ease;
        z-index: 1000;
    }

    /* Cuando el JS le agrega la clase activa, se desliza */
    .nav-menu.active {
        max-height: 85vh; 
        opacity: 1;
        visibility: visible;
        overflow-y: auto; /* Por si las opciones exceden la pantalla corta */
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
        padding: 15px 0;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
    }

    .nav-menu a {
        display: block;
        padding: 15px 0;
        font-size: 16px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    }

    .nav-menu a.active::after {
        display: none; /* Quitamos la línea estática en mobile */
    }

    /* --- SUBMENÚ ACORDEÓN EN MOBILE (CORREGIDO) --- */
    .submenu {
        position: static !important;   /* Forzamos static para anular por completo el absolute de PC */
        top: 0;
        left: 0;
        transform: none !important;   /* Eliminamos el centrado horizontal de PC */
        width: 100% !important;
        box-shadow: none !important;
        background: rgba(0, 0, 0, 0.02) !important;
        max-height: 0;
        opacity: 0;
        visibility: hidden;
        overflow: hidden;
        border-top: none;
        border-left: 3px solid var(--oro);
        transition: max-height 0.3s ease, opacity 0.3s ease;
        display: flex;
        flex-direction: column;
    }

    /* Desactivamos el efecto hover de PC en mobile para que no rompa la estructura al tocar la pantalla */
    .nav-menu ul li:hover .submenu {
        position: static !important;
        transform: none !important;
        max-height: 0 !important;
        opacity: 0 !important;
        visibility: hidden !important;
    }

    /* Al hacer clic (clase activa de JS), se despliega de forma segura hacia abajo */
    .has-submenu.submenu-open .submenu,
    .has-submenu.submenu-open:hover .submenu {
        max-height: 500px !important; /* Aumentado para que entren bien los menús largos de Recursos */
        opacity: 1 !important;
        visibility: visible !important;
        padding: 10px 0 10px 20px !important; /* Le damos una sangría interna prolija de lectura */
    }

    .submenu a {
        padding: 12px 0 !important;
        font-size: 15px;
        color: var(--gris);
        text-align: left !important;  /* Forzamos alineación a la izquierda para los sublinks */
        width: 100% !important;
        display: block !important;
    }

    /* Bloqueamos cualquier mutación o salto visual raro en el hover mobile */
    .submenu a:hover,
    .submenu a:active {
        transform: none !important;
        background: transparent !important;
        padding-left: 5px !important; /* Pequeño desplazamiento sutil y controlado */
    }

    /* --- REDISEÑO DE LAS SECCIONES DEL CONTENIDO --- */
    .hero {
        height: auto;
        padding: 100px 0 80px 0;
    }

    .hero-text {
        width: 100%;
        text-align: center;
    }

    .hero h1 {
        font-size: 46px;
    }

    .hero h2 {
        font-size: 26px;
    }

    .hero-divider {
        justify-content: center;
    }

    .hero p {
        font-size: 18px;
    }

    .quote-container {
        flex-direction: column;
        gap: 15px;
    }

    .quote p {
        font-size: 24px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .col-image {
        display: none;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .social-icons {
        justify-content: center;
    }
}