/* ========================================================
   PASTURE OF LIFE — Public Website Styles
   ======================================================== */

:root {
    --primary:   #1a3a5c;
    --accent:    #2e7d32;
    --gold:      #f9a825;
    --light-bg:  #f8f9fa;
}

/* ─── Global ──────────────────────────────────────────── */
body { font-family: 'Segoe UI', system-ui, sans-serif; color: #333; }
a { color: var(--accent); }
a:hover { color: var(--primary); }

/* ─── Page Loader ─────────────────────────────────────── */
#pageLoader {
    position: fixed;
    inset: 0;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity .5s ease, visibility .5s ease;
}
#pageLoader img {
    width: 130px;
    animation: loaderPulse 1.1s ease-in-out infinite;
}
#pageLoader.hide {
    opacity: 0;
    visibility: hidden;
}
@keyframes loaderPulse {
    0%, 100% { transform: scale(1);    opacity: 1; }
    50%       { transform: scale(1.1); opacity: .7; }
}

/* ─── Navbar ──────────────────────────────────────────── */
.site-logo  { height: 48px; width: auto; object-fit: contain; }
.footer-logo { height: 56px; width: auto; object-fit: contain; display: block; }
.navbar-brand { font-weight: 800; font-size: 1.3rem; }
.navbar-dark .navbar-brand { color: #fff; }
.site-navbar { background: linear-gradient(90deg, var(--primary), #1e4d6e); box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.site-navbar .nav-link { color: rgba(255,255,255,.85) !important; font-weight: 500; transition: color .2s; }
.site-navbar .nav-link:hover, .site-navbar .nav-link.active { color: var(--gold) !important; }

/* ─── Hero Carousel ──────────────────────────────────── */
.hero-carousel { position: relative; overflow: hidden; }

.carousel-slide-img {
    width: 100%;
    height: 88vh;
    object-fit: cover;
    object-position: center;
    display: block;
}

.carousel-slide-caption {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 2rem;
}

.slide-content {
    max-width: 720px;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(2px);
    border-radius: 16px;
    padding: 2.5rem 3rem;
}

.slide-content h1 {
    font-size: clamp(2rem, 5vw, 3.6rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #fff;
    min-height: 1.2em;
}

/* Typing cursor */
.slide-heading::after {
    content: '|';
    animation: blink .7s step-end infinite;
    font-weight: 300;
    opacity: .8;
}
.slide-heading.typed::after { display: none; }

@keyframes blink {
    0%, 100% { opacity: .8; }
    50%       { opacity: 0; }
}

.slide-content p {
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    color: rgba(255,255,255,.92);
    margin-bottom: 1.75rem;
}

.carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.7);
    background-clip: unset;
    opacity: .7;
    transition: all .3s;
}
.carousel-indicators .active {
    background-color: var(--gold);
    border-color: var(--gold);
    opacity: 1;
    width: 28px;
    border-radius: 5px;
}

.carousel-control-prev,
.carousel-control-next {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,.15);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 1rem;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,.2);
    transition: background .2s;
}
.carousel-control-prev:hover,
.carousel-control-next:hover { background: rgba(255,255,255,.3); }

@media (max-width: 768px) {
    .carousel-slide-img { height: 60vh; }
    .slide-content h1 { font-size: 1.8rem; }
}

/* ─── Welcome Home ───────────────────────────────────── */
.welcome-home-section { background: #fff; }
.welcome-eyebrow {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: .5rem;
}
.welcome-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--primary);
    margin-bottom: .5rem;
}
.welcome-body {
    font-size: 1.1rem;
    color: #555;
    max-width: 680px;
    line-height: 1.8;
}

/* ─── Sunday Service ──────────────────────────────────── */
.sunday-section { overflow: hidden; }
.sunday-left {
    background: var(--primary);
    min-height: 520px;
}
.sunday-left-inner {
    padding: 4rem 3.5rem;
    max-width: 540px;
}
.sunday-eyebrow {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: .5rem;
}
.sunday-title {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: .5rem;
}
.sunday-divider {
    width: 50px;
    height: 3px;
    background: var(--gold);
    border-radius: 2px;
    margin: 1rem 0;
}
.sunday-body { color: rgba(255,255,255,.85); font-size: 1.05rem; line-height: 1.8; }
.sunday-right {
    background: #0d2137;
    min-height: 520px;
    display: flex;
    align-items: stretch;
    position: relative;
}
.sunday-video {
    width: 100%;
    height: 100%;
    min-height: 520px;
    object-fit: cover;
    display: block;
}
.sunday-right-portrait {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.sunday-video-portrait {
    max-height: 520px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,.45);
    display: block;
}
.sunday-video-label {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 2;
}

/* ─── Bishop Section ──────────────────────────────────── */
.bishop-section { background: var(--light-bg); }
.bishop-img {
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
    box-shadow: 0 12px 48px rgba(0,0,0,.15);
    object-fit: cover;
}
.bishop-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: .25rem;
}
.bishop-body {
    font-size: 1.05rem;
    color: #555;
    line-height: 1.85;
    margin-bottom: 1.5rem;
}

/* ─── What We Believe ─────────────────────────────────── */
.believe-section { background: var(--primary); }
.believe-section .welcome-eyebrow { color: var(--gold); }
.believe-section .section-title   { color: #fff; }
.believe-section .section-subtitle { color: rgba(255,255,255,.75); }
.believe-section .section-divider  { background: var(--gold); }
.believe-card {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 16px;
    padding: 2.5rem 1.75rem;
    transition: background .25s, transform .25s;
    color: #fff;
}
.believe-card:hover {
    background: rgba(255,255,255,.13);
    transform: translateY(-5px);
}
.believe-icon {
    width: 68px;
    height: 68px;
    background: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.7rem;
    color: var(--primary);
}
.believe-title { font-size: 1.15rem; font-weight: 700; margin-bottom: .75rem; color: #fff; }
.believe-body  { font-size: .92rem; color: rgba(255,255,255,.78); line-height: 1.7; margin: 0; }

@media (max-width: 991.98px) {
    .sunday-left-inner { padding: 3rem 2rem; }
    .sunday-video { min-height: 320px; }
    .sunday-left  { min-height: auto; }
    .sunday-right { min-height: 320px; }
}
@media (max-width: 575.98px) {
    .sunday-left-inner { padding: 2.5rem 1.5rem; }
}

/* ─── Section headings ───────────────────────────────── */
.section-title { font-size: 2rem; font-weight: 700; color: var(--primary); }
.section-subtitle { color: #6c757d; max-width: 600px; }
.section-divider { width: 60px; height: 4px; background: var(--accent); border-radius: 2px; margin: .75rem auto 1.5rem; }

/* ─── Cards ───────────────────────────────────────────── */
.card { border: none; border-radius: 12px; box-shadow: 0 2px 15px rgba(0,0,0,.07); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0,0,0,.12); }
.card-img-top { border-radius: 12px 12px 0 0; }

/* ─── Service times ───────────────────────────────────── */
.service-card { border-left: 5px solid var(--accent); border-radius: 0 12px 12px 0; }
.service-card .service-day { font-size: 1.3rem; font-weight: 800; color: var(--primary); }
.service-card .service-time { color: var(--accent); font-weight: 600; }

/* ─── Sermon card ─────────────────────────────────────── */
.sermon-thumbnail { width: 100%; height: 180px; object-fit: cover; border-radius: 12px 12px 0 0; }
.sermon-play-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); background: rgba(255,255,255,.9); border: none; border-radius: 50%; width: 56px; height: 56px; font-size: 1.5rem; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s; }
.sermon-play-btn:hover { background: #fff; }

/* ─── Event card ──────────────────────────────────────── */
.event-date-badge { background: var(--primary); color: white; border-radius: 10px; padding: .5rem .75rem; text-align: center; min-width: 55px; }
.event-date-badge .day { font-size: 1.4rem; font-weight: 800; line-height: 1; }
.event-date-badge .month { font-size: .65rem; letter-spacing: 1px; text-transform: uppercase; opacity: .85; }

/* ─── Donate section ─────────────────────────────────── */
.donate-hero { background: linear-gradient(135deg, var(--primary), var(--accent)); color: white; border-radius: 20px; }

/* ─── Footer ──────────────────────────────────────────── */
.site-footer { background: #0d1f35; color: rgba(255,255,255,.7); }
.site-footer h6, .footer-heading { color: white; font-weight: 700; margin-bottom: 1rem; letter-spacing: .03em; text-transform: uppercase; font-size: .75rem; }
.site-footer a { color: rgba(255,255,255,.65); text-decoration: none; transition: color .2s; }
.site-footer a:hover { color: var(--gold); }
.footer-links li { margin-bottom: .45rem; }
.footer-bottom { background: rgba(0,0,0,.2); border-top: 1px solid rgba(255,255,255,.08); }
.footer-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff !important;
    font-size: 1.05rem;
    transition: transform .2s, opacity .2s;
    text-decoration: none;
}
.footer-social-btn:hover { transform: translateY(-3px); opacity: .85; color: #fff !important; }

/* ─── Utilities ───────────────────────────────────────── */
.btn-church-primary { background: linear-gradient(135deg, var(--primary), var(--accent)); color: white; border: none; padding: .75rem 2rem; border-radius: 50px; font-weight: 600; transition: opacity .2s; }
.btn-church-primary:hover { opacity: .9; color: white; }
.btn-church-outline { border: 2px solid white; color: white; padding: .7rem 2rem; border-radius: 50px; font-weight: 600; background: transparent; transition: all .2s; }
.btn-church-outline:hover { background: white; color: var(--primary); }

.bg-church { background: linear-gradient(135deg, var(--primary), var(--accent)); }
.text-church { color: var(--primary); }
.text-accent { color: var(--accent); }
.bg-light-green { background: #e8f5e9; }

/* ─── Announcement ticker ─────────────────────────────── */
.announcement-bar { background: var(--gold); color: #333; font-weight: 600; padding: .4rem 0; }

/* ─── Map placeholder ─────────────────────────────────── */
.map-placeholder { background: #e9ecef; border-radius: 12px; height: 260px; display: flex; align-items: center; justify-content: center; color: #6c757d; }

/* ─── Shared image classes ────────────────────────────── */
.card-img-cover { width: 100%; height: 200px; object-fit: cover; border-radius: 12px 12px 0 0; display: block; }
.blog-hero-img  { width: 100%; max-height: 400px; object-fit: cover; border-radius: 12px; display: block; }
.reading-img    { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.donate-submit  { padding: 1rem !important; font-size: 1.25rem !important; }

/* ─── Gallery (legacy .gallery-item kept for compatibility) ── */
.gallery-item {
    aspect-ratio: 1 / 1;
    cursor: pointer;
    overflow: hidden;
    border-radius: 12px;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; display: block; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(transparent 50%, rgba(0,0,0,.6));
    opacity: 0; transition: opacity .25s;
    display: flex; align-items: flex-end; padding: .6rem;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* ─── Gallery grid (gallery.php) ─────────────────────── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}
@media (min-width: 480px)  { .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; } }
@media (min-width: 768px)  { .gallery-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; } }
@media (min-width: 992px)  { .gallery-grid { grid-template-columns: repeat(5, 1fr); gap: 12px; } }
@media (min-width: 1200px) { .gallery-grid { grid-template-columns: repeat(6, 1fr); gap: 12px; } }
.gallery-cell {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    background: #e9ecef;
}
.gallery-cell img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.gallery-cell-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.65) 0%, transparent 55%);
    opacity: 0;
    transition: opacity .25s;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
}
.gallery-cell:hover img { transform: scale(1.07); }
.gallery-cell:hover .gallery-cell-overlay { opacity: 1; }

/* Group cards on about page */
.group-card { transition: transform .25s, box-shadow .25s; }
.group-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.12) !important; }

/* ─── Contact circles ─────────────────────────────────── */
.contact-circle {
    width: 48px; height: 48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* ─── Sermon / media thumbnail ────────────────────────── */
.sermon-thumbnail { width: 100%; height: 180px; object-fit: cover; border-radius: 12px 12px 0 0; display: block; }

/* ─── Reviews section ─────────────────────────────────── */
.review-card { border-radius: 16px; transition: transform .25s, box-shadow .25s; }
.review-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,.12) !important; }

/* ─── Group cards ─────────────────────────────────────── */
.group-card { transition: transform .25s, box-shadow .25s; }
.group-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.1) !important; }

/* ─── Touch targets (accessibility) ──────────────────── */
@media (pointer: coarse) {
    .btn, .nav-link, .sidebar-link { min-height: 44px; }
    .minister-photo-thumb { min-width: 56px; min-height: 56px; }
}

/* ──────────────────────────────────────────────────────
   RESPONSIVE BREAKPOINTS
   ────────────────────────────────────────────────────── */

/* ── Tablet landscape & below (< 992px) ── */
@media (max-width: 991.98px) {
    .carousel-slide-img { height: 70vh; }
    .slide-content { padding: 2rem 2.25rem; }
    .sunday-left-inner { padding: 3rem 2rem; }
    .sunday-video, .sunday-left, .sunday-right { min-height: 360px; }
    .bishop-img { max-width: 340px; }
    .site-logo  { height: 40px; }
}

/* ── Tablet portrait & below (< 768px) ── */
@media (max-width: 767.98px) {
    /* Carousel */
    .carousel-slide-img { height: 58vh; }
    .slide-content { padding: 1.5rem 1.75rem; max-width: 95%; }
    .carousel-control-prev,
    .carousel-control-next { width: 36px; height: 36px; margin: 0 .4rem; }

    /* Page hero banners */
    .page-hero { padding: 2.25rem 0 !important; }
    .page-hero h1 { font-size: clamp(1.5rem, 5vw, 2rem) !important; }
    .page-hero .lead { font-size: 1rem !important; }

    /* Section */
    .section-title   { font-size: 1.6rem; }
    .welcome-title   { font-size: 1.8rem; }
    .welcome-body    { font-size: 1rem; }

    /* Sunday section */
    .sunday-left, .sunday-right { min-height: auto; }
    .sunday-left-inner { padding: 2.5rem 1.5rem; }
    .sunday-video { min-height: 280px; }

    /* Bishop */
    .bishop-section .row { text-align: center; }
    .bishop-section .section-divider { margin: 1rem auto; }
    .bishop-img { max-width: 280px; margin: 0 auto; }

    /* Cards */
    .card-img-cover  { height: 180px; }
    .blog-hero-img   { max-height: 260px; }
    .sermon-thumbnail { height: 160px; }

    /* Gallery */
    .gallery-item { border-radius: 8px; }

    /* Map */
    .map-placeholder { height: 200px; }

    /* Footer */
    .footer-middle-cols { flex: 0 0 50% !important; max-width: 50% !important; }

    /* Navbar Give button */
    .nav-give-btn { width: 100%; text-align: center; margin-top: .5rem; }

    /* General */
    .site-logo { height: 36px; }
}

/* ── Mobile (< 576px) ── */
@media (max-width: 575.98px) {
    /* Carousel */
    .carousel-slide-img { height: 52vh; }
    .slide-content { padding: 1.25rem; border-radius: 10px; }
    .slide-content h1 { font-size: 1.5rem !important; min-height: auto; }
    .slide-content p  { font-size: .92rem; margin-bottom: 1.25rem; }
    .slide-content .btn { padding: .45rem 1.4rem; font-size: .85rem; }
    .carousel-indicators { bottom: 8px; }

    /* Welcome */
    .welcome-home-section { padding: 2.5rem 0 !important; }
    .welcome-title { font-size: 1.6rem; }

    /* Sunday */
    .sunday-left-inner { padding: 2rem 1.25rem; }
    .sunday-video { min-height: 230px; }

    /* Believe cards */
    .believe-card { padding: 1.75rem 1.25rem; }

    /* Bishop */
    .bishop-img { max-width: 240px; }
    .bishop-name { font-size: 1.25rem; }

    /* Stat cards */
    .stat-card { padding: .7rem .8rem; }
    .stat-card .stat-number { font-size: 1.25rem; }
    .stat-card .stat-icon   { font-size: 1.25rem; }

    /* Cards & images */
    .card-img-cover  { height: 160px; }
    .sermon-thumbnail { height: 150px; }
    .blog-hero-img   { max-height: 210px; border-radius: 8px; }
    .reading-img     { width: 64px; height: 64px; }

    /* Contact circles */
    .contact-circle  { width: 40px; height: 40px; }
    .contact-circle i { font-size: 1rem !important; }

    /* Map */
    .map-placeholder { height: 170px; }

    /* Donate */
    .donate-purpose .col-6 { flex: 0 0 50%; }
    .donate-submit { padding: .7rem !important; font-size: 1rem !important; }

    /* Section title */
    .section-title { font-size: 1.45rem; }

    /* Buttons */
    .btn-church-primary { padding: .6rem 1.5rem; font-size: .9rem; }
    .btn-church-outline { padding: .55rem 1.5rem; font-size: .9rem; }

    /* Footer collapse middle cols */
    .footer-middle-cols { flex: 0 0 100% !important; max-width: 100% !important; }
    .footer-logo { height: 44px; }
    .site-logo   { height: 32px; }

    /* Gallery */
    .gallery-item { border-radius: 6px; }
}

/* ── Very small phones (< 400px) ── */
@media (max-width: 399px) {
    .slide-content { padding: 1rem; }
    .slide-content h1 { font-size: 1.3rem !important; }
    .carousel-control-prev, .carousel-control-next { display: none; }
    .donate-purpose .col-6 { flex: 0 0 100%; }
}
