/* ==========================================================================
   ESTILOS COFRADÍA SANTA VERA CRUZ ZAMORA
   Versión Final (Híbrida: Natural en Móvil / Alineada en PC / Logos Centrados)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. IMPORTACIÓN DE FUENTES
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Cinzel+Decorative:wght@400;700&display=swap');

/* --------------------------------------------------------------------------
   2. VARIABLES Y COLORES
   -------------------------------------------------------------------------- */
:root {
    /* --- COLORES CORPORATIVOS --- */
    --bs-primary: #89446a; 
    --bs-primary-rgb: 137, 68, 106;
    
    --bs-secondary: #4a4a4a; 
    --bs-secondary-rgb: 74, 74, 74;

    --bs-info: #99742E; 
    --bs-info-rgb: 153, 116, 46;

    /* --- TIPOGRAFÍA --- */
    --bs-body-font-family: 'Cinzel', serif;
    --bs-headings-font-family: 'Cinzel', serif; 
    
    --bs-border-radius: 4px; 
}

/* --------------------------------------------------------------------------
   3. ESTILOS GLOBALES
   -------------------------------------------------------------------------- */
body {
    background-color: #ffffff;
    color: #333333;
    font-family: var(--bs-body-font-family);
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--bs-headings-font-family) !important;
    font-weight: 700;
    color: var(--bs-primary);
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

p {
    color: #555;
    margin-bottom: 1.5rem;
    font-family: var(--bs-body-font-family);
    text-align: justify;   
    hyphens: auto;         
    -webkit-hyphens: auto;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

.letra-decorative {
    font-family: 'Cinzel Decorative', serif !important;
    display: inline !important; 
}

/* --------------------------------------------------------------------------
   4. CLASES DE UTILIDAD
   -------------------------------------------------------------------------- */
.text-gold { color: var(--bs-info) !important; }
.section-padding { padding-top: 5rem; padding-bottom: 5rem; }

.text-justify {
    text-align: justify !important;
    hyphens: auto;
    -webkit-hyphens: auto;
}

.divider-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}
.divider-icon::before, .divider-icon::after {
    content: "";
    height: 1px;
    background-color: var(--bs-info);
    width: 50px;
    margin: 0 15px;
    opacity: 0.5;
}

/* --------------------------------------------------------------------------
   5. NAVBAR
   -------------------------------------------------------------------------- */
.navbar {
    padding: 15px 0;
    transition: all 0.4s ease;
    z-index: 1030;
}

.navbar-brand {
    font-family: var(--bs-headings-font-family) !important;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-size: 1.2rem;
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.nav-link {
    font-family: var(--bs-body-font-family);
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: #ffffff !important;
}

.navbar.scrolled {
    background-color: var(--bs-primary);
    position: fixed;
    top: 0;
    width: 100%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.navbar .btn-outline-light {
    color: #fff;
    border-color: #fff;
    font-family: var(--bs-body-font-family);
}
.navbar .btn-outline-light:hover {
    background-color: #fff;
    color: var(--bs-primary) !important;
    border-color: #fff;
}

.logo-glow { filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.9)); }

/* --------------------------------------------------------------------------
   6. HERO SECTION
   -------------------------------------------------------------------------- */
.hero-section {
    position: relative;
    height: 100dvh;
    min-height: 550px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    background: linear-gradient(rgba(26, 26, 26, 0.8), rgba(137, 68, 106, 0.75)), 
                url('../img/hero-bg.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; 
}

.hero-section p, .hero-lemma, .hero-subtitle, .hero-title {
    text-align: center !important; 
}

.hero-title {
    font-family: var(--bs-headings-font-family) !important;
    font-size: 4rem;
    font-weight: 700;
    color: #ffffff !important;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.9);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.hero-lemma {
    font-family: var(--bs-body-font-family);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #f0f0f0;
}

.hero-subtitle {
    font-family: var(--bs-headings-font-family) !important;
    font-size: 2.5rem;
    color: var(--bs-info) !important;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.9);
}

.hero-logo {
    max-height: 400px;
    width: auto;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
    transition: filter 0.3s ease;
    margin-bottom: 1rem;
}

/* --------------------------------------------------------------------------
   7. SECCIÓN TRÁMITES
   -------------------------------------------------------------------------- */
.icon-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tramite-box p { text-align: center !important; }
.tramite-box:hover .icon-circle {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4) !important;
}

@media (min-width: 768px) {
    .border-start-lg { border-left: 1px solid rgba(255, 255, 255, 0.2); }
}

/* --------------------------------------------------------------------------
   8. SECCIÓN REDES SOCIALES
   -------------------------------------------------------------------------- */
.social-clean-card {
    border: 1px solid rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    top: 0;
}

.icon-social {
    font-size: 2.5rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-clean-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(137, 68, 106, 0.15) !important;
    border-color: var(--bs-info);
}

.social-clean-card:hover .icon-social {
    transform: scale(1.1);
    color: var(--bs-info) !important;
}
.social-clean-card:hover {
    background-color: var(--bs-primary);
    color: #fff;
    border-color: var(--bs-primary);
}

.btn-outline-primary {
    color: var(--bs-primary);
    border: 2px solid var(--bs-primary);
    background-color: transparent;
    font-family: var(--bs-body-font-family);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: var(--bs-primary);
    color: #ffffff;
    border-color: var(--bs-primary);
    box-shadow: 0 5px 15px rgba(137, 68, 106, 0.3); 
    transform: translateY(-2px);
}

.btn-outline-primary:focus, 
.btn-outline-primary:active {
    box-shadow: 0 0 0 0.25rem rgba(137, 68, 106, 0.5) !important;
    background-color: var(--bs-primary) !important;
    color: #ffffff !important;
}

/* 2. Botón Sólido Dorado (btn-info) */
.btn-info {
    --bs-btn-color: #ffffff; /* Texto en blanco para que contraste bien */
    --bs-btn-bg: #99742E;
    --bs-btn-border-color: #99742E;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: #806126; /* Un tono un poco más oscuro al pasar el ratón */
    --bs-btn-hover-border-color: #785A24;
    --bs-btn-focus-shadow-rgb: 153, 116, 46;
    --bs-btn-active-color: #ffffff;
    --bs-btn-active-bg: #785A24;
    --bs-btn-active-border-color: #6E5321;
}

/* 3. Botón de Contorno Dorado (btn-outline-info) */
.btn-outline-info {
    --bs-btn-color: #99742E;
    --bs-btn-border-color: #99742E;
    --bs-btn-hover-color: #ffffff; /* Al pasar el ratón, el texto se vuelve blanco... */
    --bs-btn-hover-bg: #99742E;    /* ...y el fondo se rellena de dorado */
    --bs-btn-hover-border-color: #99742E;
    --bs-btn-focus-shadow-rgb: 153, 116, 46;
    --bs-btn-active-color: #ffffff;
    --bs-btn-active-bg: #99742E;
    --bs-btn-active-border-color: #99742E;
}


/* --------------------------------------------------------------------------
   9. GALERÍA DE PASOS
   -------------------------------------------------------------------------- */
.paso-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    background-color: #fff;
    height: 100%; 
    display: flex;
    flex-direction: column;
}

.paso-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(137, 68, 106, 0.15);
}

.paso-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2; 
    overflow: hidden;
    background-color: #f8f9fa;
}

.paso-img-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to top, rgba(0,0,0,0.15) 0%, transparent 100%);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.paso-card:hover .paso-img-wrapper::after { opacity: 0.6; }
.paso-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    object-position: center center; 
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.paso-card:hover .paso-img-wrapper img { transform: scale(1.08); }

.paso-body { padding: 1.5rem; flex-grow: 1; text-align: left; }

.sculptor-wrapper {
    min-height: 25px; 
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: flex-start; 
    align-items: center;
}
.sculptor-tag {
    font-family: var(--bs-body-font-family);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--bs-info);
    font-weight: 700;
}

.paso-title {
    font-family: var(--bs-headings-font-family);
    font-size: 1.35rem;
    color: var(--bs-primary);
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.2;
    min-height: 3.2rem;
    text-align: justify; 
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.paso-description {
    color: #6c757d;
    font-family: var(--bs-body-font-family);
    font-size: 0.9rem;
    margin-bottom: 0;
    min-height: 4.5em;
    text-align: justify;   
    hyphens: auto;
    -webkit-hyphens: auto;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #333;
    font-family: var(--bs-body-font-family);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 2;
    backdrop-filter: blur(2px);
}
.status-badge.available { color: #198754; } 
.status-badge.waiting { color: #fd7e14; }

/* --------------------------------------------------------------------------
   10. TARJETAS DE NOTICIAS (RESPONSIVE & LOGOS)
   -------------------------------------------------------------------------- */

/* == ESTILOS BASE (MÓVIL) == */
/* En móvil se comportan natural: altura automática, sin recortes forzados */

.card {
    border: none;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    /* En móvil, no forzamos height 100% estricto */
    height: auto; 
}

.card-img-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    /* En móvil: Altura natural */
    height: auto; 
    aspect-ratio: auto; 
    background-color: #f8f9fa;
}

/* === NUEVO: ESTILOS PARA LOGOS CENTRADOS === */
/* Esta clase se activa con PHP cuando la imagen es un logo */
.card-img-wrapper.is-logo {
    display: flex;
    align-items: center;    /* Centrado Vertical */
    justify-content: center; /* Centrado Horizontal */
    background-color: #f8f9fa; /* Fondo gris claro */
}

/* La imagen del logo (controlada para que no se estire) */
.card-img-logo {
    width: auto !important;
    height: auto !important;
    max-width: 55%;  /* Tamaño ideal para que "respire" */
    max-height: 60%;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1)); /* Sombra elegante */
    transition: transform 0.3s ease;
}

/* Imagen Normal (Fotos) */
.card-modern .card-img-top {
    width: 100%;
    height: auto; 
    object-fit: contain;
    transition: transform 0.5s ease;
}

.card-body {
    padding: 1.5rem;
    display: flex;       
    flex-direction: column; 
}

/* Textos */
.card-title { 
    color: var(--bs-primary);
    font-family: var(--bs-headings-font-family);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.1rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.card-text { 
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.card-body .btn-link {
    margin-top: auto; 
    padding: 0;
    text-align: left;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

/* Efecto Hover general: Zoom en fotos y logos */
.card-modern:hover .card-img-wrapper img { 
    transform: scale(1.05); 
}
.card-modern:hover .card-img-logo {
    transform: scale(1.1); /* El logo hace un zoom un pelín mayor */
}

/* == ESTILOS PC / TABLET (MIN-WIDTH: 992px) == */
/* Aquí activamos la alineación perfecta */

@media (min-width: 992px) {
    .card {
        height: 100%; /* Forzamos altura igual */
    }

    .card-img-wrapper {
        /* Activamos el recorte 4:3 para alinear las cabeceras */
        /* Esto aplica tanto a fotos como a la caja del logo */
        aspect-ratio: 4 / 3; 
        height: auto; 
    }

    .card-modern .card-img-top {
        height: 100%;
        object-fit: cover; /* Rellenamos el hueco en fotos */
        object-position: top center; 
    }

    .card-body {
        flex-grow: 1; 
    }

    .card-title {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        min-height: 2.8rem;
    }

    .card-text {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}


/* --------------------------------------------------------------------------
   11. ESTILOS DE LISTAS (UL)
   -------------------------------------------------------------------------- */
ul:not(.navbar-nav):not(.pagination):not(.list-inline) {
    list-style: none;
    padding-left: 1.5rem;
}

ul:not(.navbar-nav):not(.pagination):not(.list-inline) li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
}

ul:not(.navbar-nav):not(.pagination):not(.list-inline) > li::before {
    content: "\f285"; 
    font-family: "bootstrap-icons";
    position: absolute;
    left: 0;
    top: 3px; 
    color: var(--bs-primary);
    font-weight: bold;
    font-size: 1rem;
    line-height: 1;
}

ul:not(.navbar-nav):not(.pagination):not(.list-inline) ul li::before {
    content: "\f583";
    font-family: "bootstrap-icons";
    font-size: 0.6em;
    top: 8px;
    color: var(--bs-primary);
}

li.no-bullet {
    padding-left: 0 !important;
    text-align: center;
}

li.no-bullet::before {
    content: none !important;
    display: none !important;
}

/* --------------------------------------------------------------------------
   12. BOTONES Y FOOTER
   -------------------------------------------------------------------------- */
.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    font-weight: 600;
    letter-spacing: 1px;
    padding: 0.6rem 1.5rem;
    font-family: var(--bs-body-font-family);
}
.btn-primary:hover {
    background-color: #6d3253;
    border-color: #6d3253;
    transform: translateY(-2px);
}
.btn-warning {
    background-color: var(--bs-info);
    border-color: var(--bs-info);
    color: #fff;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.btn-warning:hover {
    background-color: #b08d4b;
    border-color: #b08d4b;
    color: #fff;
}

.bg-solemn { background-color: var(--bs-primary) !important; color: white; }
.bg-gold { background-color: var(--bs-info) !important; color: white; }

footer {
    background-color: var(--bs-secondary) !important;
    color: #e0e0e0 !important;
    padding: 3rem 0;
    margin-top: auto;
}
footer h5 {
    font-family: var(--bs-headings-font-family) !important;
    color: var(--bs-info) !important;
    text-transform: uppercase;
    margin-bottom: 1.2rem;
}
footer p, footer li, footer span, footer .text-muted, footer a { color: #d3d3d3 !important; }
footer a:hover { color: #ffffff !important; text-decoration: underline; }

/* --------------------------------------------------------------------------
   13. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
    .hero-section {
        background-attachment: scroll !important;
    }
    .hero-title { font-size: 2.2rem !important; }
    .hero-subtitle { font-size: 1.5rem !important; }
    
    .navbar-collapse {
        background-color: var(--bs-primary);
        padding: 1rem;
        border-radius: 0 0 8px 8px;
    }
    
    .hero-logo {
        max-height: 300px;
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8));
    }
}

/* ==========================================================================
   AJUSTE FINAL PARA TODOS LOS MÓVILES (Hasta 767px de ancho)
   ========================================================================== */

@media (max-width: 767px) {
    /* 1. Título Principal (Cofradía de la Santa Vera Cruz) */
    .hero-title {
        font-size: clamp(1.2rem, 5vw, 1.6rem) !important; 
        line-height: 1.3 !important;
        padding: 0 10px !important;
        letter-spacing: 0 !important;
    }
    .hero-title .letra-decorative {
        font-size: 1.3em !important; 
        vertical-align: baseline !important;
    }

    /* 2. Lema (Disciplina y Penitencia) - ¡AQUÍ ESTABA EL ERROR! */
    .hero-lemma {
        display: block !important; /* Forzamos que sea un bloque independiente */
        font-size: clamp(0.85rem, 4vw, 1.1rem) !important; /* Ahora sí encogerá */
        letter-spacing: 1px !important;
        width: 100% !important;
        margin-bottom: 0.5rem !important;
    }
    .hero-lemma .letra-decorative {
        font-size: 1.3em !important;
    }

    /* 3. Subtítulo (Zamora) */
    .hero-subtitle {
        font-size: clamp(1rem, 4.5vw, 1.3rem) !important; 
        padding: 0 10px !important;
        margin-top: 5px !important;
    }
    .hero-subtitle .letra-decorative {
        font-size: 1.3em !important;
    }

    /* 4. Ajuste del Logo */
    .hero-logo {
        max-height: 25vh !important;
        margin-bottom: 1rem !important;
    }

    /* 5. Padding de seguridad */
    .hero-section {
        padding-top: 90px !important;
        padding-bottom: 30px !important;
        height: auto !important;
        min-height: 100dvh !important;
    }
}

/* PROHIBICIÓN GLOBAL DE CORTE DE PALABRAS PARA CUALQUIER PANTALLA */
.hero-title, 
.hero-subtitle, 
.hero-lemma {
    word-break: normal !important;
    overflow-wrap: normal !important;
    white-space: normal !important;
    hyphens: none !important;
    -webkit-hyphens: none !important;
}

/* ==========================================================================
   CABECERAS HERO (Efecto Degradado Editorial)
   ========================================================================== */
.header-watermark {
    position: relative;
    padding: 4rem 3rem; /* Más espacio para que respire */
    border-radius: 1rem; /* Bordes un poco más suaves y modernos */
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.08); /* Sombra elegante */
}

/* Capa 1: La imagen de fondo (alineada a la derecha) */
.header-watermark::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: var(--bg-watermark);
    background-size: cover;
    background-position: right center; /* Enfocamos la parte derecha de la foto */
    background-repeat: no-repeat;
    z-index: -2;
}

/* Capa 2: El degradado de izquierda (blanco) a derecha (transparente) */
.header-watermark::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    /* Blanco sólido a la izquierda para el texto, difuminándose hacia la derecha */
    background: linear-gradient(to right, rgba(255,255,255,1) 0%, rgba(255,255,255,0.85) 45%, rgba(255,255,255,0) 100%);
    z-index: -1;
}