@import url('https://fonts.googleapis.com/css2?family=Uncial+Antiqua&display=swap');

/* =========================================
   1. VARIABLES Y CONFIGURACIÓN BASE
   ========================================= */
   :root {
    --stone-dark: #1f1f1f;
    --stone-medium: #4a4a4a;
    --stone-light: #f9f7f2;
    --parchment: #f0e6d2;
    --monastic-gold: #c5a059;
    --monastic-gold-hover: #b08d4b;
    --deep-red: #800000;
    --text-main: #2c2c2c;
}

body {
    font-family: Arial, Helvetica, 'Liberation Sans', 'DejaVu Sans', sans-serif;
    background-color: var(--stone-light);
    color: var(--text-main);
    font-size: 19px;
}

h1, h2, h3, h4, .navbar-brand h1 {
    font-family: Arial, Helvetica, 'Liberation Sans', 'DejaVu Sans', sans-serif;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--stone-dark);
}

/* =========================================
   2. HEADER Y NAVEGACIÓN
   ========================================= */
.monastic-header {
    background-color: #ffffff;
    border-bottom: 4px double var(--monastic-gold);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: relative;
}

.header-side-img {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    max-height: 90px;
    max-width: 150px;
    width: auto;
}

.header-side-img-left { left: 4rem; }
.header-side-img-right { right: 6rem; }

.logo { max-width: 120px; }

.monastic-title {
    font-size: 1.4rem;
    border-bottom: 2px solid var(--monastic-gold);
}

/* Estilos de los enlaces del menú */
.navbar-nav .nav-link {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--stone-medium) !important;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover, 
.navbar-nav .nav-link.active {
    color: var(--monastic-gold) !important;
    border-bottom: 2px solid var(--monastic-gold);
}

/* =========================================
   3. SECCIÓN HERO
   ========================================= */
.hero {
    height: 85vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Efecto Parallax */
    position: relative;
    color: #ffffff;
}

.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-home { background-image: url('portada.jpg'); }
/* (Añade el resto de tus clases de fondo hero-historia, hero-liturgia, etc. aquí) */

.ornament-white { text-shadow: 1px 1px 3px black; }
.latin-motto { text-shadow: 2px 2px 5px black; }

/* =========================================
   4. TARJETAS (CARDS)
   ========================================= */
.monastic-card {
    transition: transform 0.3s, box-shadow 0.3s;
    background: #ffffff;
    border: 1px solid #e0e0e0 !important;
    border-bottom: 3px solid var(--monastic-gold) !important;
}

.monastic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
}

.card-img-top {
    height: 250px;
    background-size: cover;
    background-position: center;
}

/* Imágenes de las tarjetas */
.card-img-historia { background-image: url('./imagenes/pater-silouane.JPG'); }
.card-img-vida { background-image: url('https://static.wixstatic.com/media/2f4977_84e92bbf8aee446db6a0722dfdd21eb0~mv2.jpg'); background-position: top center; }
.card-img-liturgia { background-image: url('./imagenes/liturgia-sv.png'); }
.card-img-camino { background-image: url('https://static.wixstatic.com/media/2f4977_d74e78c3d9924c6d8a57444fa0bf1f74~mv2.jpg'); background-position: top; }
.card-img-reinado { background-image: url('https://static.wixstatic.com/media/2f4977_4fd61e56d3894274a180fc45031285b8~mv2.jpg'); }
.card-img-patronos {
    background-image: url('https://static.wixstatic.com/media/2f4977_9f6742d118574acf8c380faa7255a2d7~mv2.jpg'),
                      radial-gradient(ellipse at center, #c4a45a 0%, #6b3e1a 60%, #2a1505 100%);
    background-size: 70%, cover;
    background-repeat: no-repeat, no-repeat;
    background-position: center center, center;
}

/* =========================================
   5. COMPONENTES Y UTILIDADES
   ========================================= */
.bg-parchment { background-color: var(--parchment); }

.btn-monastic {
    background-color: var(--monastic-gold);
    color: #ffffff;
    border: 2px solid var(--monastic-gold);
    transition: all 0.3s;
}

.btn-monastic:hover {
    background-color: transparent;
    color: var(--monastic-gold);
}

.btn-outline {
    border: 1px solid var(--stone-dark);
    color: var(--stone-dark);
}

.btn-outline:hover {
    background-color: var(--stone-dark);
    color: #ffffff;
}

.btn-text {
    color: var(--monastic-gold);
    transition: color 0.3s;
}

.btn-text:hover { color: var(--stone-dark); }

.separator {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(0,0,0,0), var(--monastic-gold), rgba(0,0,0,0));
    opacity: 1;
}

.ornament { color: var(--deep-red); }
.ornament-gold { color: var(--monastic-gold); }

.biblical-quote {
    font-style: italic;
    color: var(--stone-medium);
    border-left: 4px solid var(--monastic-gold);
    background-color: #fffcf5;
    padding: 1.5rem;
}

.social-links a:hover svg { stroke: var(--monastic-gold); }
.email-link:hover { color: var(--monastic-gold) !important; border-color: var(--monastic-gold) !important; }

/* Donaciones */
.cards-icons img {
    max-width: 180px;
    opacity: 0.9;
    filter: grayscale(20%);
    transition: all 0.3s;
}
.cards-icons img:hover {
    opacity: 1;
    filter: none;
}

/* =========================================
   AJUSTES RONDA 1 - TIPOGRAFÍA DEBIAN Y HERO
   ========================================= */

:root {
    --debian-sans: Arial, Helvetica, 'Liberation Sans', 'DejaVu Sans', sans-serif;
}

html,
body,
button,
input,
textarea,
select,
.navbar,
.btn,
.card,
footer {
    font-family: var(--debian-sans) !important;
}

body {
    font-size: 18px;
    line-height: 1.55;
    font-weight: 400;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand h1,
.card-title,
.latin-motto,
.translation {
    font-family: var(--debian-sans) !important;
    text-transform: none;
    letter-spacing: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 400;
}

.monastic-title {
    font-size: 1.32rem;
    font-weight: 400;
    line-height: 1.2;
    border-bottom-width: 1px;
}

.navbar-nav .nav-link {
    font-size: 0.95rem;
    font-weight: 400;
}

.hero-home .overlay {
    background: rgba(0, 0, 0, 0.38);
}

.hero-home .hero-content {
    max-width: 560px;
    padding: 1.05rem 1.35rem !important;
    margin-top: clamp(0.75rem, 3vh, 2rem) !important;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.36);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.24);
}

.hero-home .latin-motto {
    font-size: clamp(1.35rem, 3vw, 2.05rem) !important;
    line-height: 1.18;
    font-weight: 400 !important;
    margin-bottom: 0.35rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.75);
}

.hero-home .translation {
    font-size: clamp(0.95rem, 1.6vw, 1.12rem) !important;
    line-height: 1.35;
    margin-bottom: 0.2rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
}

.hero-home .ornament-white {
    font-size: 1.35rem !important;
    margin: 0.4rem 0 !important;
}

.hero-home .btn {
    font-size: 0.78rem;
    line-height: 1.2;
    padding: 0.45rem 0.8rem !important;
    font-weight: 400 !important;
    text-transform: none !important;
}

.hero-home .hero-content .d-flex {
    gap: 0.55rem !important;
    margin-top: 0.8rem !important;
}

@media (max-width: 576px) {
    body {
        font-size: 17px;
    }

    .hero-home .hero-content {
        max-width: calc(100% - 2rem);
        padding: 0.9rem 1rem !important;
    }
}


/* ===== RONDA 2: portada limpia, sin recuadro ===== */

.hero-home {
    min-height: 85vh;
    display: flex;
    align-items: center !important;
    justify-content: center !important;
    background-image:
        linear-gradient(rgba(0,0,0,0.28), rgba(0,0,0,0.28)),
        url('portada.jpg');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
}

.hero-home .overlay {
    display: none !important;
}

.hero-home .hero-content {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    max-width: 980px;
    width: 100%;
    margin-top: 0 !important;
    padding: 0 1.5rem !important;
}

.hero-home .latin-motto {
    font-size: clamp(2.2rem, 5vw, 4.1rem);
    line-height: 1.08;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0,0,0,0.68);
    margin-bottom: 0.6rem;
}

.hero-home .translation {
    font-size: clamp(1.1rem, 2vw, 1.7rem);
    line-height: 1.35;
    color: rgba(255,255,255,0.96) !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.65);
    margin-bottom: 1.7rem;
}

.hero-home .ornament-white {
    display: none !important;
}

.hero-home .d-flex {
    margin-top: 1.6rem !important;
}

.hero-home .btn {
    min-width: 240px;
    padding: 0.78rem 1.2rem !important;
    border-radius: 8px;
    border: 1.5px solid rgba(255,255,255,0.88) !important;
    background: rgba(255,255,255,0.08);
    color: #ffffff !important;
    text-transform: none !important;
    letter-spacing: 0;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
    backdrop-filter: blur(2px);
}

.hero-home .btn:hover {
    background: rgba(255,255,255,0.18) !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
}

@media (max-width: 768px) {
    .hero-home {
        min-height: 72vh;
        background-attachment: scroll;
    }

    .hero-home .hero-content {
        padding: 0 1rem !important;
    }

    .hero-home .btn {
        min-width: 220px;
    }
}


/* ===== RONDA 3: subir lema y botones en la portada ===== */

.hero-home {
    position: relative;
    align-items: unset !important;
    justify-content: unset !important;
}

.hero-home .hero-content {
    position: absolute !important;
    top: 25% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 2;
    max-width: 980px;
    width: min(92%, 980px);
}

.hero-home .latin-motto {
    margin-bottom: 0.45rem !important;
}

.hero-home .translation {
    margin-bottom: 1.35rem !important;
}

.hero-home .d-flex {
    margin-top: 1.2rem !important;
}

@media (max-width: 768px) {
    .hero-home .hero-content {
        top: 22% !important;
        width: 96%;
    }

    .hero-home .latin-motto {
        font-size: clamp(1.85rem, 8vw, 2.6rem);
    }

    .hero-home .translation {
        font-size: clamp(1rem, 4vw, 1.25rem);
    }
}


/* ===== RONDA 4: lema y botones al 18% desde arriba ===== */

.hero-home .hero-content {
    top: 18% !important;
}

@media (max-width: 768px) {
    .hero-home .hero-content {
        top: 18% !important;
    }
}


/* ===== RONDA 4: lema y botones al 10% desde arriba ===== */

.hero-home .hero-content {
    top: 18% !important;
}

@media (max-width: 768px) {
    .hero-home .hero-content {
        top: 18% !important;
    }
}


/* ===== RONDA 4: lema y botones al 10% desde arriba ===== */

.hero-home .hero-content {
    top: 28% !important;
}

@media (max-width: 768px) {
    .hero-home .hero-content {
        top: 18% !important;
    }
}


/* ===== RONDA 5: subir más el lema y los botones ===== */

.hero-home .hero-content {
    top: 7% !important;
}

@media (max-width: 768px) {
    .hero-home .hero-content {
        top: 7% !important;
    }
}


/* ===== RONDA 6: banda superior celeste suave tipo Proton ===== */

.monastic-header {
    background:
        linear-gradient(
            180deg,
            #f7fbff 0%,
            #eef7fc 55%,
            #e8f3fa 100%
        ) !important;
    border-bottom: 1px solid rgba(171, 133, 58, 0.45) !important;
    box-shadow: 0 2px 10px rgba(20, 60, 90, 0.08) !important;
}

.monastic-header .navbar {
    background: transparent !important;
}

.monastic-title {
    color: #242424 !important;
    border-bottom: 1px solid rgba(171, 133, 58, 0.75) !important;
}

.navbar-nav .nav-link {
    color: #3d4a53 !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #b78b35 !important;
    border-bottom-color: #b78b35 !important;
}

.logo {
    opacity: 0.92;
}


/* ===== RONDA 7: celeste suave extendido a toda la página ===== */

:root {
    --proton-celeste-1: #f3fbff;
    --proton-celeste-2: #e7f5fc;
    --proton-celeste-3: #dceff8;
    --proton-celeste-border: rgba(116, 157, 182, 0.22);
}

/* Fondo general */
body {
    background:
        linear-gradient(
            180deg,
            var(--proton-celeste-1) 0%,
            var(--proton-celeste-2) 42%,
            #f7fbfd 100%
        ) !important;
}

/* Banda superior: un poco más celeste */
.monastic-header {
    background:
        linear-gradient(
            180deg,
            #eef9ff 0%,
            #dff1fa 58%,
            #d5ebf6 100%
        ) !important;
    border-bottom: 1px solid rgba(171, 133, 58, 0.42) !important;
    box-shadow: 0 2px 12px rgba(30, 80, 110, 0.10) !important;
}

/* Zona principal */
main.container {
    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,0.34) 0%,
            rgba(255,255,255,0.18) 100%
        );
    border-radius: 18px;
}

/* Secciones claras */
.bg-parchment {
    background:
        linear-gradient(
            180deg,
            #f8fcff 0%,
            #edf7fc 100%
        ) !important;
    border: 1px solid var(--proton-celeste-border);
}

/* Tarjetas */
.monastic-card {
    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f4fbff 100%
        ) !important;
    border: 1px solid var(--proton-celeste-border) !important;
    border-bottom: 3px solid var(--monastic-gold) !important;
}

/* Cuerpo de tarjetas */
.card-body {
    background: rgba(255,255,255,0.64);
}

/* Separadores más delicados */
.separator {
    background-image:
        linear-gradient(
            to right,
            rgba(0,0,0,0),
            rgba(171,133,58,0.65),
            rgba(0,0,0,0)
        ) !important;
}

/* Textos secundarios un poco más suaves */
.text-muted {
    color: #65747d !important;
}


/* ===== RONDA 8: título y menú +2pt, sin subrayado en título ===== */

.monastic-title {
    font-size: calc(1.4rem + 2pt) !important;
    border-bottom: none !important;
    text-decoration: none !important;
}

.navbar-brand,
.navbar-brand:hover {
    text-decoration: none !important;
}

.navbar-nav .nav-link {
    font-size: calc(0.88rem + 2pt) !important;
}


/* ===== RONDA 9: laguna.jpg como fondo de la portada ===== */

.hero-home {
    background-image:
        linear-gradient(rgba(0,0,0,0.24), rgba(0,0,0,0.24)),
        url('./imagenes/laguna.jpg') !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}


/* ===== RONDA 10: mejor encuadre de laguna.jpg en portada ===== */

.hero-home {
    background-image:
        linear-gradient(rgba(0,0,0,0.18), rgba(0,0,0,0.18)),
        url('./imagenes/laguna.jpg') !important;

    background-size: cover !important;
    background-position: center 70% !important;
    background-repeat: no-repeat !important;
}

/* En pantallas anchas, dar más altura para que la foto respire */
@media (min-width: 992px) {
    .hero-home {
        min-height: 78vh !important;
    }
}

/* En pantallas angostas, conservar más cielo */
@media (max-width: 768px) {
    .hero-home {
        background-position: center top !important;
        min-height: 72vh !important;
    }
}


/* Ajuste fino: todavía más cielo */
.hero-home {
    background-position: center 0% !important;
}


/* ===== RONDA 11: desplazar levemente la foto de portada hacia la izquierda ===== */

.hero-home {
    background-position: 56% top !important;
}

@media (max-width: 768px) {
    .hero-home {
        background-position: 56% top !important;
    }
}


/* ===== RONDA 12: ampliar fondo y correr imagen hacia la izquierda ===== */

.hero-home {
    background-size: 108% auto !important;
    background-position: 42% top !important;
    background-repeat: no-repeat !important;
}

@media (max-width: 768px) {
    .hero-home {
        background-size: 125% auto !important;
        background-position: 38% top !important;
    }
}


/* ===== RONDA 13: fuente uncial para el título de cabecera ===== */

.navbar-brand h1.monastic-title,
h1.monastic-title {
    font-family: 'Manufacturing Consent', serif !important;
    color: #1a2a5e !important;
    letter-spacing: 0.08em !important;
    font-weight: 400 !important;
    font-size: calc(1.4rem + 5pt) !important;
}

/* ===== RONDA 14: fuente del párrafo comunidad ===== */

#comunidad p {
    font-family: 'Manufacturing Consent', serif !important;
    font-size: calc(1.5rem + 2pt) !important;
    font-weight: 400 !important;
    line-height: 1.35 !important;
}

/* ===== RONDA 15: reducir espacio entre título y menú ===== */

.navbar .navbar-nav {
    margin-top: -0.25rem !important;
}

.navbar .navbar-brand {
    margin-bottom: -0.25rem !important;
}

/* ===== RONDA 16: cabecera-ayuda-web.jpg como fondo definitivo de la portada ===== */
.hero-home {
    background-image:
        linear-gradient(rgba(0,0,0,0.24), rgba(0,0,0,0.24)),
        url('./imagenes/cabecera-ayuda-web.jpg') !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}


/* ===== RONDA 16: +1pt en todos los títulos h1–h6 ===== */

h1 { font-size: calc(2.5rem  + 1pt); }
h2 { font-size: calc(2rem    + 1pt); }
h3 { font-size: calc(1.75rem + 1pt); }
h4 { font-size: calc(1.5rem  + 1pt); }
h5 { font-size: calc(1.25rem + 1pt); }
h6 { font-size: calc(1rem    + 1pt); }


/* ===== RONDA 17: hero de Reinado de Cristo (coronacion-web.jpg) menos invasivo ===== */

.hero-reinado {
    min-height: 55vh;
    background-color: var(--stone-dark);
    background-position: center center;
    background-size: contain;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

/* En móvil "contain" deja demasiado espacio negro arriba/abajo; usar cover suave */
@media (max-width: 768px) {
    .hero-reinado {
        min-height: 40vh;
        background-size: cover;
        background-position: center 25%;
    }
}


/* ===== RONDA 18: botón flotante "Scroll to Top" ===== */

.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background-color: #1a2a5e;
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 999;
    transition: background-color 0.3s, box-shadow 0.3s;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.scroll-to-top:hover {
    background-color: #263c7e;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* ===== RONDA 19: Estilos del footer ===== */
#contacto {
    color: white;
}

#contacto p,
#contacto .text-secondary,
#contacto .text-light {
    color: white !important;
}

#contacto a {
    color: white;
}

#contacto a:hover {
    color: var(--monastic-gold);
}

/* ===== RONDA 20: corregir desborde horizontal del título en móvil =====
   El título, dentro de un flex column con align-items:center, no se
   ajustaba al ancho de la pantalla y se salía por la derecha, dejando
   toda la página desplazada/descentrada en el celular. */
@media (max-width: 576px) {
    .navbar-brand {
        max-width: 100%;
    }

    .navbar-brand h1.monastic-title,
    h1.monastic-title {
        max-width: 92vw !important;
        white-space: normal !important;
        word-wrap: break-word;
        font-size: clamp(1.15rem, 6.5vw, 1.6rem) !important;
        line-height: 1.25 !important;
    }

    /* El huemul y el cóndor decorativos se superponen entre sí y con el
       título en pantallas angostas; se ocultan y dejan solo el escudo. */
    .header-side-img {
        display: none !important;
    }

    /* Forzar el título en 2 líneas concretas: "...Señora" / "de Aysén" */
    .title-break {
        display: block !important;
    }

    .navbar-brand h1.monastic-title,
    h1.monastic-title {
        text-align: center !important;
    }
}

.title-break {
    display: none;
}

html, body {
    overflow-x: hidden;
}

/* ===== RONDA 21: evitar que sobren pestañas del menú al crecer la lista =====
   Con 12 pestañas, en anchos intermedios (justo antes de pasar al menú
   hamburguesa) un par de ellas ya no cabían en la línea y quedaban solas
   abajo, descentradas. Se achica letra y espacio solo en ese rango. */
@media (min-width: 992px) {
    .navbar-nav {
        gap: 0.3rem 0.5rem !important;
        flex-wrap: nowrap !important;
    }

    .navbar-nav .nav-link {
        font-size: calc(0.62rem + 1pt) !important;
        white-space: nowrap;
    }

    .navbar .container {
        max-width: 100% !important;
    }
}

/* ===== RONDA 22: extender a tabletas la protección de la cabecera =====
   Las correcciones de la RONDA 20 (ocultar huemul/cóndor y partir el
   título en dos líneas) sólo actuaban hasta 576px. Entre 577px y 991px
   —el rango de las tabletas— las imágenes decorativas ocupan unos 460px
   y dejan al título sin espacio suficiente, provocando la misma
   superposición que se corrigió en el móvil. El menú no necesita ajuste
   en este rango: Bootstrap ya lo convierte en botón de hamburguesa por
   debajo de 992px. */
@media (min-width: 577px) and (max-width: 991px) {
    .header-side-img {
        display: none !important;
    }

    .navbar-brand {
        max-width: 100%;
    }

    .navbar-brand h1.monastic-title,
    h1.monastic-title {
        max-width: 92vw !important;
        white-space: normal !important;
        word-wrap: break-word;
        text-align: center !important;
        line-height: 1.25 !important;
    }

    .title-break {
        display: block !important;
    }
}
