/* ================================================
    IGLESIA EVANGÉLICA PENTECOSTAL - IEPAI GERLI
    HOJA DE ESTILO PROFESIONAL COMPLETA
   ================================================ */

:root {
    /* Paleta de Colores */
    --primary-color: #0F172A;
    --secondary-color: #CAB87F;
    --accent-color: #3B82F6;
    --text-dark: #1E293B;
    --text-light: #F8FAFC;
    --text-dim: #94A3B8;
    --bg-light: #F1F5F9;
    --bg-white: #FFFFFF;
    --success: #22c55e;
    --error: #ef4444;

    /* Tipografía */
    --font-heading: 'Lora', serif;
    --font-body: 'Inter', sans-serif;

    /* Efectos */
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-gold: 0 10px 15px -3px rgba(202, 184, 127, 0.2);
}

/* 1. RESET & BASE
   ================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.7;
    background-color: var(--bg-white);
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    display: inline-block;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 2. TIPOGRAFÍA GLOBAL
   ================================================ */
h1,
h2,
h3,
h4,
.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
}

.section-title {
    font-size: clamp(2.2rem, 5vw, 3rem);
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.section-subtitle {
    font-size: 1rem;
    color: var(--secondary-color);
    margin-bottom: 4rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 600;
    display: block;
}

/* 3. UTILIDADES Y GRID 
   ================================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
}

.text-center {
    text-align: center;
}

.section {
    padding: 8rem 0;
    position: relative;
    z-index: 20;
    background-color: #FFFFFF;
    width: 100%;
}

.bg-light {
    background-color: #F1F5F9;
    z-index: 21;
}

.grid-2-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5rem;
    align-items: center;
}

.grid-3-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
}

/* 4. BOTONES
   ================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 38px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: #bfa866;
    transform: translateY(-3px);
    box-shadow: var(--shadow-gold);
}

.btn-outline {
    border-color: var(--text-light);
    color: var(--text-light);
}

.btn-outline:hover {
    background-color: var(--text-light);
    color: var(--primary-color);
}

/* 5. HEADER (CABECERA)
   ================================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 5000;
    background-color: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(15px);
    padding: 1.2rem 0;
    border-bottom: 1px solid rgba(202, 184, 127, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
}

.logo {
    font-size: 1.6rem;
    color: var(--text-light);
}

.logo .highlight {
    color: var(--secondary-color);
}

.nav-menu ul {
    display: flex;
    gap: 2.5rem;
}

.nav-menu a {
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--secondary-color);
}

.mobile-toggle {
    display: none;
    font-size: 2.2rem;
    color: var(--secondary-color);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 6000;
}

/* 6. HERO - CARRUSEL CSS
   ================================================ */
.hero {
    height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    background-color: #000;
    color: var(--text-light);
    overflow: hidden;
    z-index: 1;
}

.hero-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    animation: heroCarouselAnimation 24s linear infinite;
    transform: scale(1.05);
}

.hero-slide:nth-child(1) {
    background-image: url('../images/imagen1.jpeg');
    animation-delay: 0s;
}

.hero-slide:nth-child(2) {
    background-image: url('../images/imagen2.jpeg');
    animation-delay: 6s;
}

.hero-slide:nth-child(3) {
    background-image: url('../images/imagen3.jpeg');
    animation-delay: 12s;
}

.hero-slide:nth-child(4) {
    background-image: url('../images/imagen4.jpeg');
    animation-delay: 18s;
}

@keyframes heroCarouselAnimation {
    0% {
        opacity: 0;
        transform: scale(1.05);
    }

    4% {
        opacity: 1;
    }

    25% {
        opacity: 1;
    }

    29% {
        opacity: 0;
        transform: scale(1);
    }

    100% {
        opacity: 0;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 850px;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
}

/* 7. ABOUT & EFECTO ROLLOUT
   ================================================ */
.about-image {
    position: relative;
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: white;
}

.about-image img {
    transition: transform 1.5s cubic-bezier(0.2, 1, 0.3, 1);
}

.about-image:hover img {
    transform: scale(1.1) translateY(-15px);
}

.lead {
    font-size: 1.3rem;
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* 8. HORARIOS
   ================================================ */
.horarios-card {
    background: var(--bg-white);
    padding: 3rem;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-md);
}

.horarios-list li {
    display: flex;
    justify-content: space-between;
    padding: 1.2rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* 9. PRÉDICAS Y CARDS
   ================================================ */
.card {
    background: var(--bg-white);
    border-radius: 1.2rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-lg);
}

.card-media {
    height: 240px;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-size: 4rem;
}

.card-body {
    padding: 2.5rem;
}

.link-arrow {
    color: var(--secondary-color);
    font-weight: 700;
    margin-top: 1rem;
    display: block;
}

/* 10. CONTACTO Y FORMULARIO
   ================================================ */
.dark-section {
    background-color: var(--primary-color) !important;
    color: var(--text-light);
    position: relative;
    z-index: 30;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.8rem;
    color: white;
    margin-bottom: 1.2rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 3rem;
}

.social-links a {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-light);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
}

/* 11. FOOTER
   ================================================ */
.footer {
    padding: 5rem 0 3rem;
    background-color: #020617 !important;
    text-align: center;
    color: var(--text-dim);
    position: relative;
    z-index: 40;
}

/* 12. NUEVA SECCIÓN: GALERÍA FLICKR
   ================================================ */
.flickr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.flickr-item {
    position: relative;
    border-radius: 1.2rem;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    background-color: var(--bg-light);
}

.flickr-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.flickr-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-gold);
}

.flickr-item:hover img {
    transform: scale(1.1);
}

/* 13. RESPONSIVE Y FIX PARA CELULARES
   ================================================ */
@media (max-width: 992px) {
    .grid-2-col {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block !important;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--primary-color);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: 0.5s ease;
        z-index: 5500;
    }

    .nav-menu.active {
        right: 0 !important;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 3rem;
        text-align: center;
    }

    .nav-menu a {
        font-size: 1.8rem;
    }

    .section:not(.dark-section):not(.footer) {
        background-color: #FFFFFF !important;
        position: relative;
        z-index: 100;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .flickr-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}


@keyframes pulse-live {
    0% {
        border-color: #ff0000;
        box-shadow: 0 0 5px #ff0000;
    }

    50% {
        border-color: #aa0000;
        box-shadow: 0 0 20px #ff0000;
    }

    100% {
        border-color: #ff0000;
        box-shadow: 0 0 5px #ff0000;
    }
}

/* --- FIN DEL ARCHIVO --- */