/* ================================================================
   Igreja Manancial da Graca — Main Stylesheet
   "Uma chuva de bencaos pra voce!"
   ================================================================ */

/* ─── Custom Properties ─────────────────────────────────────── */
:root {
    /* Palette — extracted from logo gradient */
    --sky:        #45B5E8;
    --primary:    #1E6FBA;
    --navy:       #0D2B6B;
    --indigo:     #2E1A6B;
    --deep:       #060E2A;

    /* Neutrals */
    --white:      #FFFFFF;
    --off-white:  #EBF4FF;
    --ice:        #D4E9FB;
    --gray-100:   #F1F5F9;
    --gray-200:   #E2E8F0;
    --gray-400:   #94A3B8;
    --gray-600:   #64748B;
    --gray-800:   #1E293B;

    /* Accents */
    --gold:       #E8B931;
    --gold-soft:  #F5D76E;

    /* Typography */
    --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-body:    'Nunito', 'Segoe UI', sans-serif;

    /* Spacing scale */
    --space-xs:  0.5rem;
    --space-sm:  1rem;
    --space-md:  2rem;
    --space-lg:  4rem;
    --space-xl:  6rem;
    --space-2xl: 10rem;

    /* Layout */
    --max-width:  1280px;
    --header-h:   80px;

    /* Transitions */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Shadows */
    --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md:  0 4px 16px rgba(13,43,107,.12);
    --shadow-lg:  0 10px 40px rgba(13,43,107,.18);
    --shadow-glow: 0 0 30px rgba(69,181,232,.25);
}

/* ─── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    color: var(--gray-800);
    background: var(--white);
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--primary); text-decoration: none; transition: color .3s var(--ease-smooth); }
a:hover { color: var(--sky); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    color: var(--navy);
}
h1 { font-size: clamp(2.4rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

p  { margin-bottom: 1em; }
ul, ol { padding-left: 1.2em; }

::selection {
    background: var(--sky);
    color: var(--white);
}

/* ─── Utilities ─────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.section-label {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--sky);
    margin-bottom: var(--space-xs);
    position: relative;
    padding-left: 2.5rem;
}
.section-label::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    width: 2rem; height: 2px;
    background: var(--sky);
    transform: translateY(-50%);
}

.section-title {
    margin-bottom: var(--space-sm);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px; height: 3px;
    background: linear-gradient(90deg, var(--sky), var(--primary));
    margin-top: 0.8rem;
    border-radius: 2px;
}

.text-center .section-title::after {
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.85rem 2rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all .35s var(--ease-smooth);
    text-decoration: none;
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
}
.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(255,255,255,.15);
    opacity: 0;
    transition: opacity .35s;
}
.btn:hover::before { opacity: 1; }

.btn-primary {
    background: linear-gradient(135deg, var(--sky), var(--primary));
    color: var(--white);
    box-shadow: 0 4px 20px rgba(30,111,186,.35);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(30,111,186,.45);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,.5);
}
.btn-outline:hover {
    background: rgba(255,255,255,.1);
    border-color: var(--white);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-soft));
    color: var(--navy);
    box-shadow: 0 4px 20px rgba(232,185,49,.35);
}
.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(232,185,49,.45);
    color: var(--navy);
}

/* ─── SVG Wave Dividers ─────────────────────────────────────── */
.wave-divider {
    position: relative;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    margin-top: -1px;
}
.wave-divider svg {
    display: block;
    width: 100%;
    height: 80px;
}
.wave-divider.flip { transform: rotate(180deg); }

/* ─── Scroll-reveal Animations ──────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .8s var(--ease-smooth), transform .8s var(--ease-smooth);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity .8s var(--ease-smooth), transform .8s var(--ease-smooth);
}
.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}
.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity .8s var(--ease-smooth), transform .8s var(--ease-smooth);
}
.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}
.reveal-scale {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity .8s var(--ease-smooth), transform .8s var(--ease-smooth);
}
.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* stagger children */
.stagger > * { transition-delay: calc(var(--i, 0) * 0.1s); }

/* ================================================================
   HEADER
   ================================================================ */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: var(--header-h);
    display: flex;
    align-items: center;
    transition: background .4s var(--ease-smooth), box-shadow .4s var(--ease-smooth), backdrop-filter .4s;
}
.site-header.scrolled {
    background: rgba(6,14,42,.92);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    box-shadow: 0 2px 24px rgba(0,0,0,.25);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.site-branding img {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.3));
    transition: transform .3s var(--ease-bounce);
}
.site-branding:hover img { transform: scale(1.05); }
.site-branding .brand-text { display: flex; flex-direction: column; }
.site-branding .brand-name {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.15;
    letter-spacing: -0.01em;
}
.site-branding .brand-slogan {
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--sky);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: .85;
}

/* Navigation */
.main-nav ul {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    padding: 0;
    margin: 0;
}
.main-nav a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(255,255,255,.8);
    text-decoration: none;
    border-radius: 8px;
    transition: all .3s var(--ease-smooth);
    position: relative;
}
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 2px; left: 50%;
    width: 0; height: 2px;
    background: var(--sky);
    transition: all .3s var(--ease-smooth);
    transform: translateX(-50%);
    border-radius: 1px;
}
.main-nav a:hover { color: var(--white); }
.main-nav a:hover::after { width: 60%; }
.main-nav .current-menu-item a,
.main-nav .current_page_item a {
    color: var(--white);
}
.main-nav .current-menu-item a::after,
.main-nav .current_page_item a::after {
    width: 60%;
}

/* Mobile toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}
.menu-toggle span {
    display: block;
    width: 26px; height: 2px;
    background: var(--white);
    margin: 6px 0;
    transition: all .3s var(--ease-smooth);
    border-radius: 2px;
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

@media (max-width: 900px) {
    .menu-toggle { display: block; }

    .main-nav {
        position: fixed;
        inset: 0;
        background: rgba(6,14,42,.97);
        backdrop-filter: blur(20px);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        pointer-events: none;
        transition: opacity .4s var(--ease-smooth);
        z-index: 999;
    }
    .main-nav.open {
        opacity: 1;
        pointer-events: all;
    }
    .main-nav ul {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    .main-nav a {
        font-size: 1.6rem;
        font-family: var(--font-display);
        font-weight: 500;
        padding: 0.6rem 2rem;
    }
}

/* ================================================================
   HERO SECTION
   ================================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(175deg, var(--deep) 0%, var(--navy) 40%, var(--primary) 100%);
}

#rain-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Atmospheric overlays */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 20%, rgba(69,181,232,.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 30% 80%, rgba(46,26,107,.2) 0%, transparent 50%);
    z-index: 2;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: var(--space-md);
    max-width: 820px;
}

.hero-logo {
    width: 140px;
    height: auto;
    margin: 0 auto var(--space-md);
    filter: drop-shadow(0 4px 30px rgba(69,181,232,.4));
    animation: heroLogoFloat 6s ease-in-out infinite;
}

@keyframes heroLogoFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-12px) scale(1.02); }
}

.hero-church-name {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 6vw, 5rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.05;
    margin-bottom: 0.3em;
    text-shadow: 0 2px 40px rgba(0,0,0,.4);
    letter-spacing: -0.02em;
}
.hero-church-name span {
    display: block;
    background: linear-gradient(135deg, var(--white), var(--ice));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-slogan {
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 2.5vw, 1.7rem);
    font-weight: 400;
    font-style: italic;
    color: var(--sky);
    margin-bottom: var(--space-lg);
    opacity: 0;
    animation: sloganFadeIn 1.2s 0.8s forwards;
    text-shadow: 0 1px 20px rgba(69,181,232,.3);
}

@keyframes sloganFadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: sloganFadeIn 1s 1.4s forwards;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    animation: sloganFadeIn .8s 2s forwards;
}
.scroll-indicator span {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255,255,255,.5);
}
.scroll-indicator .chevron {
    width: 24px; height: 24px;
    border-right: 2px solid rgba(255,255,255,.4);
    border-bottom: 2px solid rgba(255,255,255,.4);
    transform: rotate(45deg);
    animation: scrollBounce 2s infinite;
}
@keyframes scrollBounce {
    0%, 100% { transform: rotate(45deg) translate(0,0); opacity: .4; }
    50%      { transform: rotate(45deg) translate(5px,5px); opacity: 1; }
}

/* ================================================================
   ABOUT SECTION
   ================================================================ */
.about-section {
    padding: var(--space-xl) 0;
    background: var(--off-white);
    position: relative;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--gray-600);
    line-height: 1.9;
}

.about-verse {
    margin-top: var(--space-md);
    padding: var(--space-md);
    background: linear-gradient(135deg, rgba(69,181,232,.08), rgba(30,111,186,.05));
    border-left: 4px solid var(--sky);
    border-radius: 0 12px 12px 0;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-style: italic;
    color: var(--navy);
    line-height: 1.6;
}

.about-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-decorative {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    position: relative;
}

.about-decorative .circle-outer {
    position: absolute;
    inset: 0;
    border: 2px dashed rgba(69,181,232,.3);
    border-radius: 50%;
    animation: rotateCircle 40s linear infinite;
}

.about-decorative .circle-inner {
    position: absolute;
    inset: 15%;
    border: 1px solid rgba(30,111,186,.15);
    border-radius: 50%;
    animation: rotateCircle 30s linear infinite reverse;
}

.about-decorative .cross-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 80px; height: 80px;
    color: var(--navy);
    opacity: .15;
}

@keyframes rotateCircle {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.about-decorative .verse-badge {
    position: absolute;
    bottom: 10%; right: 0;
    background: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-style: italic;
    color: var(--navy);
    max-width: 200px;
    line-height: 1.4;
}

@media (max-width: 900px) {
    .about-grid { grid-template-columns: 1fr; gap: var(--space-md); }
    .about-visual { order: -1; }
    .about-decorative { max-width: 280px; }
}

/* ================================================================
   SCHEDULE SECTION
   ================================================================ */
.schedule-section {
    padding: var(--space-xl) 0;
    background: linear-gradient(170deg, var(--navy) 0%, var(--deep) 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

/* Subtle background pattern */
.schedule-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(69,181,232,.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(46,26,107,.08) 0%, transparent 50%);
    pointer-events: none;
}

.schedule-section .section-title { color: var(--white); }
.schedule-section .section-title::after {
    background: linear-gradient(90deg, var(--gold), var(--gold-soft));
}

.schedule-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-lg);
    position: relative;
    z-index: 1;
}

.schedule-card {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 20px;
    padding: var(--space-md) var(--space-md) var(--space-md);
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all .4s var(--ease-smooth);
    position: relative;
    overflow: hidden;
}
.schedule-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--sky), var(--primary), var(--indigo));
    opacity: 0;
    transition: opacity .4s;
}
.schedule-card:hover {
    background: rgba(255,255,255,.1);
    border-color: rgba(69,181,232,.3);
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0,0,0,.3);
}
.schedule-card:hover::before { opacity: 1; }

.schedule-icon {
    width: 64px; height: 64px;
    margin: 0 auto var(--space-sm);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(69,181,232,.2), rgba(30,111,186,.1));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sky);
    transition: transform .3s var(--ease-bounce);
}
.schedule-card:hover .schedule-icon { transform: scale(1.1) rotate(-5deg); }

.schedule-icon svg { width: 30px; height: 30px; }

.schedule-card h3 {
    color: var(--white);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.schedule-time {
    font-size: 1rem;
    color: var(--sky);
    font-weight: 600;
}

.schedule-desc {
    font-size: 0.9rem;
    color: rgba(255,255,255,.6);
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .schedule-cards { grid-template-columns: 1fr; max-width: 400px; margin-inline: auto; }
}

/* ================================================================
   MINISTRIES SECTION
   ================================================================ */
.ministries-section {
    padding: var(--space-xl) 0;
    background: var(--white);
}

.ministries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.ministry-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: var(--space-md);
    text-align: center;
    transition: all .4s var(--ease-smooth);
    position: relative;
    overflow: hidden;
}
.ministry-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 0;
    background: linear-gradient(0deg, rgba(69,181,232,.06), transparent);
    transition: height .4s;
}
.ministry-card:hover {
    border-color: var(--sky);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}
.ministry-card:hover::after { height: 100%; }

.ministry-icon {
    width: 60px; height: 60px;
    margin: 0 auto var(--space-sm);
    border-radius: 50%;
    background: linear-gradient(135deg, var(--off-white), var(--ice));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    transition: transform .3s var(--ease-bounce);
    position: relative;
    z-index: 1;
}
.ministry-card:hover .ministry-icon { transform: scale(1.15); }

.ministry-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}
.ministry-card p {
    font-size: 0.9rem;
    color: var(--gray-600);
    position: relative;
    z-index: 1;
}

/* ================================================================
   GALLERY SECTION
   ================================================================ */
.gallery-section {
    padding: var(--space-xl) 0;
    background: var(--gray-100);
    overflow: hidden;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 240px;
    gap: 12px;
    margin-top: var(--space-lg);
}

/* Masonry-like layout via spanning */
.gallery-item:nth-child(1)  { grid-row: span 2; }
.gallery-item:nth-child(4)  { grid-column: span 2; }
.gallery-item:nth-child(7)  { grid-row: span 2; }

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: var(--navy);
}
.gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .6s var(--ease-smooth), filter .4s;
}
.gallery-item:hover img {
    transform: scale(1.08);
    filter: brightness(0.7);
}
.gallery-item .gallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .4s;
    z-index: 2;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay svg {
    width: 40px; height: 40px;
    color: var(--white);
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.3));
}

/* Placeholder items (no images yet) */
.gallery-placeholder {
    background: linear-gradient(135deg, var(--ice), var(--off-white));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    font-size: 2rem;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(6,14,42,.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s;
}
.lightbox.active { opacity: 1; pointer-events: all; }
.lightbox img {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.lightbox-close {
    position: absolute;
    top: 1.5rem; right: 1.5rem;
    width: 48px; height: 48px;
    background: rgba(255,255,255,.1);
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .3s;
}
.lightbox-close:hover { background: rgba(255,255,255,.2); }

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: 180px;
    }
    .gallery-item:nth-child(1) { grid-row: span 1; }
    .gallery-item:nth-child(4) { grid-column: span 1; }
    .gallery-item:nth-child(7) { grid-row: span 1; }
}

/* ================================================================
   EVENTS SECTION
   ================================================================ */
.events-section {
    padding: var(--space-xl) 0;
    background: var(--white);
}

.events-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.event-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all .4s var(--ease-smooth);
    border: 1px solid var(--gray-200);
}
.event-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.event-card-image {
    height: 200px;
    background: linear-gradient(135deg, var(--navy), var(--primary));
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.event-card-image img {
    width: 100%; height: 100%; object-fit: cover;
}
.event-card-image .event-placeholder-icon {
    color: rgba(255,255,255,.2);
    font-size: 3rem;
}

.event-date-badge {
    position: absolute;
    top: 1rem; left: 1rem;
    background: var(--gold);
    color: var(--navy);
    padding: 0.5rem 0.8rem;
    border-radius: 10px;
    text-align: center;
    font-weight: 700;
    line-height: 1.1;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.event-date-badge .day { display: block; font-size: 1.5rem; }
.event-date-badge .month { display: block; font-size: 0.65rem; text-transform: uppercase; letter-spacing: .1em; }

.event-card-body {
    padding: var(--space-md);
}
.event-card-body h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}
.event-card-body p {
    font-size: 0.9rem;
    color: var(--gray-600);
}

.event-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.8rem;
    font-size: 0.8rem;
    color: var(--gray-400);
}
.event-meta svg { width: 14px; height: 14px; flex-shrink: 0; }
.event-meta-item { display: flex; align-items: center; gap: 0.3rem; }

/* ================================================================
   SERMONS SECTION
   ================================================================ */
.sermons-section {
    padding: var(--space-xl) 0;
    background: linear-gradient(175deg, var(--deep) 0%, var(--navy) 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.sermons-section::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(69,181,232,.08), transparent 70%);
    top: -100px; right: -100px;
    pointer-events: none;
}

.sermons-section .section-title { color: var(--white); }
.sermons-section .section-title::after {
    background: linear-gradient(90deg, var(--gold), var(--gold-soft));
}

.sermons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.sermon-featured {
    grid-row: span 2;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 20px;
    overflow: hidden;
    transition: all .4s;
}
.sermon-featured:hover {
    border-color: rgba(69,181,232,.3);
    box-shadow: var(--shadow-glow);
}

.sermon-featured-image {
    height: 280px;
    background: linear-gradient(135deg, var(--indigo), var(--navy));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sermon-featured-image img { width: 100%; height: 100%; object-fit: cover; }

.sermon-play-btn {
    width: 70px; height: 70px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255,255,255,.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .3s var(--ease-bounce);
    position: absolute;
}
.sermon-play-btn:hover {
    background: var(--sky);
    border-color: var(--sky);
    transform: scale(1.1);
}
.sermon-play-btn svg { width: 28px; height: 28px; color: var(--white); margin-left: 3px; }

.sermon-featured-body { padding: var(--space-md); }
.sermon-featured-body h3 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}
.sermon-featured-body .sermon-speaker {
    color: var(--sky);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.sermon-featured-body p {
    color: rgba(255,255,255,.65);
    font-size: 0.95rem;
}

.sermon-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sermon-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    transition: all .3s;
    cursor: pointer;
}
.sermon-item:hover {
    background: rgba(255,255,255,.1);
    border-color: rgba(69,181,232,.2);
}

.sermon-item-play {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(69,181,232,.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .3s;
}
.sermon-item:hover .sermon-item-play { background: var(--sky); }
.sermon-item-play svg { width: 18px; height: 18px; color: var(--white); margin-left: 2px; }

.sermon-item-info { flex: 1; }
.sermon-item-info h4 { color: var(--white); font-size: 1rem; margin-bottom: 0.15rem; }
.sermon-item-info .sermon-meta { color: rgba(255,255,255,.5); font-size: 0.8rem; }

.sermon-item-duration {
    color: rgba(255,255,255,.4);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .sermons-grid { grid-template-columns: 1fr; }
    .sermon-featured { grid-row: span 1; }
}

/* ================================================================
   CONTACT SECTION
   ================================================================ */
.contact-section {
    padding: var(--space-xl) 0;
    background: var(--off-white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

.contact-info-list {
    list-style: none;
    padding: 0;
    margin-bottom: var(--space-md);
}
.contact-info-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-200);
}
.contact-info-list li:last-child { border-bottom: none; }
.contact-info-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--sky), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
}
.contact-info-icon svg { width: 20px; height: 20px; }
.contact-info-text h4 { font-size: 0.95rem; margin-bottom: 0.2rem; }
.contact-info-text p { font-size: 0.9rem; color: var(--gray-600); margin: 0; }

.social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: var(--space-sm);
}
.social-link {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy);
    transition: all .3s var(--ease-smooth);
}
.social-link:hover {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
    transform: translateY(-2px);
}

/* Contact Form */
.contact-form {
    background: var(--white);
    border-radius: 20px;
    padding: var(--space-md);
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.25rem;
}
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 0.4rem;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--gray-800);
    background: var(--gray-100);
    transition: border-color .3s, box-shadow .3s;
    outline: none;
}
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--sky);
    box-shadow: 0 0 0 4px rgba(69,181,232,.15);
    background: var(--white);
}
.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-map {
    margin-top: var(--space-md);
    border-radius: 16px;
    overflow: hidden;
    height: 250px;
    background: var(--ice);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gray-200);
}
.contact-map iframe {
    width: 100%; height: 100%; border: 0;
}
.contact-map .map-placeholder {
    color: var(--gray-400);
    text-align: center;
    font-size: 0.9rem;
}
.contact-map .map-placeholder svg {
    width: 48px; height: 48px;
    margin-bottom: 0.5rem;
    opacity: .5;
}

@media (max-width: 900px) {
    .contact-grid { grid-template-columns: 1fr; }
}

/* ================================================================
   CTA BANNER (between sections)
   ================================================================ */
.cta-banner {
    padding: var(--space-lg) 0;
    background: linear-gradient(135deg, var(--primary), var(--indigo));
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.cta-banner h2 {
    color: var(--white);
    margin-bottom: var(--space-sm);
}
.cta-banner p {
    color: rgba(255,255,255,.8);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto var(--space-md);
}

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
    background: var(--deep);
    color: rgba(255,255,255,.7);
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--sky), transparent);
}

.footer-main {
    padding: var(--space-xl) 0 var(--space-lg);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-lg);
}

.footer-brand .footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: var(--space-sm);
}
.footer-brand .footer-logo img { height: 45px; }
.footer-brand .footer-logo-text {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
}
.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.7;
    max-width: 300px;
}
.footer-brand .footer-social {
    display: flex;
    gap: 0.5rem;
    margin-top: var(--space-sm);
}
.footer-social-link {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.6);
    transition: all .3s;
}
.footer-social-link:hover {
    background: var(--sky);
    border-color: var(--sky);
    color: var(--white);
}

.footer-column h4 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--white);
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.6rem;
}
.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 30px; height: 2px;
    background: var(--sky);
    border-radius: 1px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}
.footer-column li {
    margin-bottom: 0.5rem;
}
.footer-column a {
    color: rgba(255,255,255,.6);
    font-size: 0.9rem;
    transition: color .3s, padding-left .3s;
}
.footer-column a:hover {
    color: var(--sky);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,.4);
}

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: 2rem; right: 2rem;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sky), var(--primary));
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all .4s var(--ease-smooth);
    z-index: 900;
}
.back-to-top.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}
.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.back-to-top svg { width: 22px; height: 22px; }

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-md);
    }
    .footer-brand { grid-column: span 2; }
}
@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; }
    .footer-brand { grid-column: span 1; }
}

/* ================================================================
   BLOG / ARCHIVE
   ================================================================ */
.page-header-banner {
    padding-top: calc(var(--header-h) + var(--space-lg));
    padding-bottom: var(--space-lg);
    background: linear-gradient(175deg, var(--deep), var(--navy));
    text-align: center;
    color: var(--white);
}
.page-header-banner h1 {
    color: var(--white);
    margin-bottom: 0.5rem;
}
.page-header-banner p {
    color: rgba(255,255,255,.65);
    font-size: 1.1rem;
}

.blog-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: var(--space-lg);
    padding: var(--space-xl) 0;
}
.blog-layout.no-sidebar { grid-template-columns: 1fr; max-width: 860px; margin: 0 auto; }

@media (max-width: 1024px) {
    .blog-layout { grid-template-columns: 1fr; }
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-md);
}

.post-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    transition: all .4s var(--ease-smooth);
}
.post-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.post-card-thumb {
    height: 200px;
    background: linear-gradient(135deg, var(--ice), var(--off-white));
    overflow: hidden;
}
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.post-card:hover .post-card-thumb img { transform: scale(1.05); }

.post-card-body {
    padding: 1.5rem;
}
.post-card-category {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--sky);
    margin-bottom: 0.5rem;
}
.post-card-body h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}
.post-card-body h3 a { color: var(--navy); }
.post-card-body h3 a:hover { color: var(--primary); }
.post-card-excerpt {
    font-size: 0.9rem;
    color: var(--gray-600);
}
.post-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
    font-size: 0.8rem;
    color: var(--gray-400);
}

/* ================================================================
   SINGLE POST (Devotional Style)
   ================================================================ */
.single-post-header {
    padding-top: calc(var(--header-h) + var(--space-xl));
    padding-bottom: var(--space-lg);
    background: linear-gradient(175deg, var(--deep), var(--navy));
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}
.single-post-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 80%, rgba(69,181,232,.1), transparent 50%),
        radial-gradient(ellipse at 70% 20%, rgba(46,26,107,.1), transparent 50%);
    pointer-events: none;
}

.single-post-header .container { position: relative; z-index: 1; }
.single-post-header .post-category {
    display: inline-block;
    background: rgba(69,181,232,.2);
    color: var(--sky);
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: var(--space-sm);
}
.single-post-header h1 {
    color: var(--white);
    max-width: 800px;
    margin: 0 auto var(--space-sm);
}
.single-post-meta {
    color: rgba(255,255,255,.6);
    font-size: 0.9rem;
}
.single-post-meta span + span::before {
    content: '|';
    margin: 0 0.8rem;
    opacity: .4;
}

.single-content {
    max-width: 760px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-md);
}

.single-content h2,
.single-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.single-content p {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--gray-800);
}

.single-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(69,181,232,.06), rgba(30,111,186,.03));
    border-left: 4px solid var(--sky);
    border-radius: 0 14px 14px 0;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-style: italic;
    color: var(--navy);
    line-height: 1.6;
}

.single-content img {
    border-radius: 12px;
    margin: 2rem 0;
}

.single-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.single-content a:hover { color: var(--sky); }

/* Post navigation */
.post-navigation {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 var(--space-md) var(--space-xl);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}
.post-nav-link {
    background: var(--gray-100);
    border-radius: 14px;
    padding: 1.25rem;
    transition: all .3s;
}
.post-nav-link:hover {
    background: var(--off-white);
    box-shadow: var(--shadow-sm);
}
.post-nav-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--sky);
    margin-bottom: 0.3rem;
}
.post-nav-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--navy);
}
.post-nav-link.next { text-align: right; }

/* ================================================================
   404 PAGE
   ================================================================ */
.page-404 {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(175deg, var(--deep), var(--navy));
    color: var(--white);
    padding: var(--space-md);
}
.page-404 .error-code {
    font-family: var(--font-display);
    font-size: clamp(6rem, 15vw, 12rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--sky), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: var(--space-sm);
}
.page-404 h1 { color: var(--white); margin-bottom: 0.5rem; }
.page-404 p { color: rgba(255,255,255,.6); margin-bottom: var(--space-md); }

/* ================================================================
   SIDEBAR
   ================================================================ */
.sidebar .widget {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: var(--space-md);
}
.sidebar .widget-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--off-white);
}

/* ================================================================
   GENERIC PAGE
   ================================================================ */
.page-content {
    max-width: 860px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-md);
}
.page-content p { font-size: 1.05rem; line-height: 1.8; }

/* ================================================================
   PAGINATION
   ================================================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: var(--space-lg) 0;
}
.pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    border-radius: 10px;
    border: 1px solid var(--gray-200);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-600);
    transition: all .3s;
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}

/* ================================================================
   RESPONSIVE FINE-TUNING
   ================================================================ */
@media (max-width: 600px) {
    :root {
        --space-lg: 3rem;
        --space-xl: 4rem;
    }

    .hero-logo { width: 100px; }

    .hero-actions { flex-direction: column; align-items: center; }

    .btn { width: 100%; max-width: 280px; justify-content: center; }

    .posts-grid { grid-template-columns: 1fr; }

    .post-navigation { grid-template-columns: 1fr; }
}

/* ================================================================
   PRINT
   ================================================================ */
@media print {
    .site-header, .site-footer, .hero, .back-to-top,
    .schedule-section, .contact-form { display: none; }
    body { font-size: 12pt; color: #000; }
    a { color: #000; text-decoration: underline; }
}
