/* ==============================================
   ESTILOS COMUNES - Cristo es Refugio
   Comparten: index.html, articulos.html, articulo-detalle.html
   ============================================== */

/* ===== VARIABLES DE COLOR ===== */
:root {
    --primary-black: #000000;
    --primary-yellow: #FFC71C;
    --secondary-white: #FFFFFF;
    --secondary-gray: #CCCCCC;
    --text-dark: #1a1a1a;
    --text-light: #f8f9fa;
}

/* ===== RESET Y BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background-color: var(--secondary-white);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
    font-family: 'Merriweather', serif;
    font-weight: 700;
}

/* ===== TÍTULOS DE SECCIÓN ===== */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}
.section-title:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--primary-yellow);
}
.text-center .section-title:after {
    left: 50%;
    transform: translateX(-50%);
}

/* ===== HEADER / NAVBAR (COMPORTAMIENTO EN HOME Y PÁGINAS INTERNAS) ===== */
.navbar {
    transition: all 0.4s ease;
    padding: 1rem 0;
    z-index: 1030;
}

/* --- Comportamiento en HOME (transparente al inicio) --- */
.navbar.home-nav {
    background-color: transparent;
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
}
.navbar.home-nav.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.navbar.home-nav.scrolled {
    background-color: rgba(0, 0, 0, 0.92) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    backdrop-filter: blur(8px);
    padding: 0.6rem 0;
}
.navbar.home-nav.show {
    background-color: rgba(0, 0, 0, 0.95) !important;
}

/* --- Comportamiento en PÁGINAS INTERNAS (siempre visible) --- */
.navbar.internal-nav {
    background-color: rgba(0, 0, 0, 0.92) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    backdrop-filter: blur(8px);
    padding: 0.6rem 0;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* --- Enlaces del menú (común) --- */
.navbar .nav-link {
    color: var(--secondary-white) !important;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    margin: 0 0.5rem;
    transition: color 0.3s;
    position: relative;
}
.navbar .nav-link:hover {
    color: var(--primary-yellow) !important;
}
.navbar .nav-link:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary-yellow);
    transition: width 0.3s;
}
.navbar .nav-link:hover:after {
    width: 100%;
}
.navbar .nav-link.active {
    color: var(--primary-yellow) !important;
}
.navbar .nav-link.active:after {
    width: 100%;
}

/* ===== BOTÓN AMARILLO ===== */
.btn-yellow {
    background-color: var(--primary-yellow);
    color: var(--primary-black) !important;
    font-weight: 700;
    padding: 0.6rem 1.8rem;
    border-radius: 50px;
    transition: all 0.3s;
    border: 2px solid var(--primary-yellow);
}
.btn-yellow:hover {
    background-color: transparent;
    color: var(--primary-yellow) !important;
    border-color: var(--primary-yellow);
    transform: scale(1.02);
}

/* ===== LOGOS ===== */
.navbar-brand img {
    height: 80px;
}
.hero-logo {
    max-width: 180px;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
}
.footer-logo {
    max-width: 140px;
}

/* ===== HERO CON VIDEO (SOLO HOME) ===== */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
}
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
}
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 1.5rem;
    max-width: 900px;
}
.hero-content h1 {
    font-size: 4.5rem;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.1;
    text-shadow: 0 8px 24px rgba(0,0,0,0.6);
}
.hero-content h1 span {
    color: var(--primary-yellow);
}
.hero-content p {
    font-size: 1.3rem;
    font-weight: 300;
    margin: 1.5rem 0 2.5rem;
    opacity: 0.9;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* ===== BOTÓN DEL HERO ===== */
.btn-hero {
    background-color: var(--primary-yellow);
    color: #000;
    font-weight: 700;
    padding: 0.9rem 3rem;
    border-radius: 50px;
    font-size: 1.2rem;
    transition: all 0.3s;
    border: 2px solid var(--primary-yellow);
    text-decoration: none;
    display: inline-block;
}
.btn-hero:hover {
    background: transparent;
    color: var(--primary-yellow);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 199, 28, 0.3);
}

/* ===== SECCIONES GENERALES ===== */
section {
    padding: 5rem 0;
}
.bg-light-gray {
    background-color: #f8f9fa;
}
.bg-dark-section {
    background-color: var(--primary-black);
    color: var(--secondary-white);
}
.bg-dark-section .section-title:after {
    background-color: var(--primary-yellow);
}

/* ===== SOBRE NOSOTROS ===== */
#sobre-nosotros p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #333;
}
#sobre-nosotros video {
    width: 100%;
    max-width: 400px;
    border-radius: 12px;
}

/* ===== TRES VERTIENTES ===== */
.card-vertiente {
    background: white;
    border: none;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    height: 100%;
    box-shadow: 0 12px 30px rgba(0,0,0,0.05);
    transition: all 0.3s;
    text-align: center;
    border-bottom: 6px solid var(--primary-yellow);
}
.card-vertiente:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}
.card-vertiente i {
    font-size: 3rem;
    color: var(--primary-yellow);
    margin-bottom: 1.2rem;
}
.card-vertiente h4 {
    font-weight: 700;
    margin-bottom: 0.8rem;
}

/* ===== GALERÍA ===== */
.gallery-grid img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 12px;
    transition: all 0.4s;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}
.gallery-grid img:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

/* ===== MISIÓN Y VISIÓN ===== */
.mv-block {
    background: rgba(255,255,255,0.04);
    border-left: 6px solid var(--primary-yellow);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    height: 100%;
    backdrop-filter: blur(4px);
}
.mv-block h3 {
    color: var(--primary-yellow);
    font-weight: 700;
    margin-bottom: 1.2rem;
}
.mv-block p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #ddd;
}

/* ===== ARTÍCULOS (COMÚN) ===== */
.card-articulo {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    transition: all 0.3s;
    height: 100%;
}
.card-articulo:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.1);
}
.card-articulo img {
    height: 200px;
    object-fit: cover;
    width: 100%;
}
.card-articulo .card-body {
    padding: 1.8rem;
}
.card-articulo .card-title {
    font-weight: 700;
    font-size: 1.2rem;
}
.card-articulo .card-text {
    color: #555;
}

/* ===== ENLACE CON FLECHA ===== */
.link-arrow {
    color: var(--primary-black);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
}
.link-arrow:hover {
    color: var(--primary-yellow);
}

/* ===== APOYO ===== */
.map-placeholder {
    background: #e9ecef;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px dashed #ccc;
}
.map-placeholder i {
    font-size: 4rem;
    color: var(--primary-yellow);
}

/* ===== INSTAGRAM EMBED ===== */
.instagram-embed-wrapper {
    background: white;
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}
.instagram-embed-wrapper iframe {
    border-radius: 12px;
    width: 100% !important;
    height: 480px;
}

/* ===== MODAL DE DONACIONES ===== */
.modal-donation .modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
}
.modal-donation .modal-header {
    border-bottom: 3px solid var(--primary-yellow);
    padding: 1.5rem 2rem;
}
.modal-donation .modal-body {
    padding: 2rem;
    max-height: 70vh;
    overflow-y: auto;
}
.modal-donation .modal-footer {
    border-top: none;
    padding: 1rem 2rem 1.5rem;
}

/* ===== TARJETAS DE BANCOS (MODAL) ===== */
.bank-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 1.2rem;
    border-left: 4px solid var(--primary-yellow);
    transition: all 0.2s;
}
.bank-card:hover {
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}
.bank-card .bank-title {
    font-weight: 700;
    color: var(--primary-black);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.bank-card .bank-title i {
    color: var(--primary-yellow);
    margin-right: 8px;
}
.bank-card .bank-detail {
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 0.2rem;
}
.bank-card .bank-detail strong {
    color: #000;
}
.bank-card .copy-btn {
    background: none;
    border: none;
    color: var(--primary-yellow);
    cursor: pointer;
    font-size: 0.85rem;
    transition: color 0.3s;
}
.bank-card .copy-btn:hover {
    color: #000;
}
.bank-card .label-tag {
    display: inline-block;
    background: var(--primary-yellow);
    color: #000;
    font-weight: 700;
    font-size: 0.7rem;
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 6px;
}

/* ===== FOOTER ===== */
footer {
    background: #0a0a0a;
    color: #aaa;
    padding: 3rem 0 2rem;
}
footer h5 {
    color: white;
    font-weight: 700;
    margin-bottom: 1.2rem;
}
footer a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s;
}
footer a:hover {
    color: var(--primary-yellow);
}
.social-icons a {
    display: inline-block;
    width: 44px;
    height: 44px;
    background: #1a1a1a;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 44px;
    margin-right: 10px;
    transition: all 0.3s;
    font-size: 1.2rem;
}
.social-icons a:hover {
    background: var(--primary-yellow);
    color: #000;
    transform: translateY(-3px);
}

/* ==============================================
   RESPONSIVE (COMÚN)
   ============================================== */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.8rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    .section-title {
        font-size: 2rem;
    }
    section {
        padding: 3rem 0;
    }
    .navbar-brand img {
        height: 60px;
    }
    .mv-block {
        padding: 1.5rem;
    }
    .instagram-embed-wrapper iframe {
        height: 380px;
    }
    #sobre-nosotros video {
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }
    .btn-hero {
        padding: 0.7rem 2rem;
        font-size: 1rem;
    }
    .modal-donation .modal-body {
        padding: 1.2rem;
    }
    .bank-card {
        padding: 1rem;
    }
    .instagram-embed-wrapper iframe {
        height: 300px;
    }
}