/* ================================================================
   church_website.css — Public church website
   ================================================================ */

:root {
    --navy:   #1d4261;
    --navy-d: #15334a;
    --gold:   #c9a227;
    --gold-l: #f0d98c;
    --light:  #f7f9fc;
    --text:   #2d2d2d;
    --muted:  #6b7a8d;
    --white:  #ffffff;
    --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

/* ===========================
   Loader
   =========================== */
.page-loader {
    position: fixed;
    inset: 0;
    background: var(--navy);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    z-index: 9999;
    transition: opacity 0.4s ease;
}

.page-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.page-loader .loader-logo {
    height: 56px;
    opacity: 0.9;
}

.page-loader .loader-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===========================
   Copy Toast
   =========================== */
.copy-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--navy);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    z-index: 9000;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    animation: fadeInUp 0.2s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateX(-50%) translateY(8px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===========================
   Navigation
   =========================== */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 800;
    background: rgba(29, 66, 97, 0.97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: background 0.3s;
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-brand {
    font-size: 16px;
    font-weight: 900;
    color: var(--white);
    text-decoration: none;
    letter-spacing: 1px;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin-left: auto;
}

.nav-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 6px 12px;
    border-radius: 20px;
    transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
    color: var(--white);
    background: rgba(255,255,255,0.1);
}

.nav-cta {
    background: var(--gold) !important;
    color: var(--navy) !important;
    font-weight: 700 !important;
}

.nav-cta:hover {
    background: var(--gold-l) !important;
    color: var(--navy) !important;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 20px;
    cursor: pointer;
    margin-left: auto;
    padding: 8px;
}

/* ===========================
   Hero
   =========================== */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--navy) 0%, #2a6496 60%, #1a3a55 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 80px 24px 60px;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(201, 162, 39, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.05) 0%, transparent 50%);
}

/* Hero video background */
.hero-video-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.hero-video-bg iframe,
.hero-video-bg video {
    position: absolute;
    top: 50%;
    left: 50%;
    /* Keep 16:9 and always cover the hero */
    width: 177.78vh;
    height: 56.25vw;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
    border: none;
    pointer-events: none;
}

/* Darken the overlay more when a video is playing */
.hero.has-video .hero-overlay {
    background: rgba(0, 0, 0, 0.55);
}

/* Hide the decorative dot pattern when video is present */
.hero.has-video::before { display: none; }

.hero-overlay {
    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.02'%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");
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.hero-logo {
    height: 72px;
    opacity: 0.9;
    filter: brightness(0) invert(1);
    margin-bottom: 8px;
}

.hero-name {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.15;
    letter-spacing: -0.5px;
}

.hero-location {
    font-size: 14px;
    color: rgba(255,255,255,0.65);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-location i { color: var(--gold); margin-right: 6px; }

.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-btn {
    height: 44px;
    padding: 0 24px;
    border-radius: 25px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: transform 0.15s, box-shadow 0.15s;
    background: var(--gold);
    color: var(--navy);
}

.hero-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(201,162,39,0.4); }

.hero-btn-outline {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.5);
    color: var(--white);
}

.hero-btn-outline:hover { background: rgba(255,255,255,0.1); box-shadow: none; }

/* ===========================
   Sections
   =========================== */
.section {
    padding: 72px 24px;
}

.section-alt {
    background: var(--light);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

.section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 8px;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    color: var(--navy);
    margin-bottom: 32px;
    font-weight: 700;
}

.section-sub {
    font-size: 13px;
    color: var(--muted);
    margin-top: -20px;
    margin-bottom: 24px;
}

.empty-msg {
    color: var(--muted);
    font-size: 13px;
}

/* ===========================
   About
   =========================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
    align-items: start;
}

.about-text p {
    font-size: 15px;
    line-height: 1.8;
    color: #444;
}

.about-meta {
    background: var(--navy);
    border-radius: var(--radius);
    padding: 24px;
    color: var(--white);
}

.meta-item {
    margin-bottom: 16px;
}

.meta-item:last-child { margin-bottom: 0; }

.meta-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 4px;
}

.meta-value {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
}

.video-wrapper {
    margin-top: 40px;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16/9;
    background: #000;
}

.video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ===========================
   Pastor Message
   =========================== */
.pastor-message-card {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    border: 1px solid #e8edf2;
    box-shadow: 0 2px 16px rgba(0,0,0,0.04);
    max-width: 800px;
}

.pastor-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
    font-size: 40px;
    flex-shrink: 0;
    overflow: hidden;
}

.pastor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pastor-message-text {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 16px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 16px;
}

.pastor-message-text::before { content: '\201C'; color: var(--gold); font-size: 2em; line-height: 0; vertical-align: -0.4em; margin-right: 4px; }
.pastor-message-text::after  { content: '\201D'; color: var(--gold); font-size: 2em; line-height: 0; vertical-align: -0.4em; margin-left: 4px; }

.pastor-message-name {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--navy);
    text-transform: uppercase;
}

/* ===========================
   Services Grid
   =========================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.service-card {
    background: var(--white);
    border: 1px solid #e0e8f0;
    border-radius: var(--radius);
    padding: 24px;
    border-top: 4px solid var(--gold);
    transition: box-shadow 0.2s;
}

.service-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }

.service-day {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 6px;
}

.service-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 4px;
}

.service-time {
    font-size: 24px;
    font-weight: 900;
    color: var(--navy);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.service-location {
    font-size: 12px;
    color: var(--muted);
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.5;
}

.service-location i { color: var(--gold); margin-top: 2px; flex-shrink: 0; }

/* ===========================
   People Grid (leadership / depts)
   =========================== */
.people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.person-card {
    background: var(--white);
    border: 1px solid #e8edf2;
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
    transition: box-shadow 0.2s, transform 0.2s;
}

.person-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); transform: translateY(-2px); }

.person-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #e8f0f8;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #b0c4d8;
    overflow: hidden;
}

.person-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.person-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 4px;
    line-height: 1.3;
}

.person-role {
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.3px;
}

/* ===========================
   Org Chart
   =========================== */
.orgchart-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e0e8f0;
    border-radius: var(--radius);
    background: var(--white);
    padding: 32px 24px;
}

.orgchart-canvas {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    min-width: max-content;
}

.org-level {
    display: flex;
    justify-content: center;
    gap: 16px;
    position: relative;
}

.org-level + .org-level {
    margin-top: 32px;
}

.org-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 120px;
}

.org-node-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #e8f0f8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #b0c4d8;
    overflow: hidden;
    border: 2px solid #dde8f0;
}

.org-node-avatar img { width: 100%; height: 100%; object-fit: cover; }

.org-node-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--navy);
    text-align: center;
    line-height: 1.3;
}

.org-node-role {
    font-size: 10px;
    color: var(--muted);
    text-align: center;
    line-height: 1.3;
}

.org-connector {
    width: 2px;
    height: 32px;
    background: #dde8f0;
    margin: 0 auto;
}

.org-branch {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ===========================
   Team list (worship / ushers)
   =========================== */
.team-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.team-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    border: 1px solid #e8edf2;
    border-radius: 32px;
    padding: 8px 16px 8px 8px;
}

.team-chip-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e8f0f8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #b0c4d8;
    overflow: hidden;
    flex-shrink: 0;
}

.team-chip-avatar img { width: 100%; height: 100%; object-fit: cover; }

.team-chip-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
}

/* ===========================
   Contact
   =========================== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.contact-card {
    display: flex;
    align-items: flex-start;
    overflow: hidden;
    gap: 16px;
    background: var(--white);
    border: 1px solid #e0e8f0;
    border-radius: var(--radius);
    padding: 20px;
}

.contact-card > div:last-child {
    min-width: 0;
    flex: 1;
}

.contact-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #e8f0f8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy);
    font-size: 18px;
    flex-shrink: 0;
    overflow: hidden;
}

.contact-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.contact-role {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 4px;
}

.contact-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.4;
    margin-bottom: 4px;
}

.contact-detail {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    word-break: break-all;
    overflow-wrap: anywhere;
    min-width: 0;
}

.contact-detail span {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-all;
}

.contact-detail i {
    color: var(--gold);
    width: 12px;
    flex-shrink: 0;
}

.socials-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: transform 0.15s, box-shadow 0.15s;
    border: 2px solid;
}

.social-link:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.12); }

.social-facebook  { color: #1877f2; border-color: #1877f2; }
.social-instagram { color: #e4405f; border-color: #e4405f; }
.social-youtube   { color: #ff0000; border-color: #ff0000; }
.social-website   { color: var(--navy); border-color: var(--navy); }

/* ===========================
   Footer
   =========================== */
.site-footer {
    background: var(--navy);
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 32px 24px;
    font-size: 13px;
}

.site-footer p:first-child {
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 6px;
}

.footer-sub {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    margin-top: 4px;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
    .about-meta {
        order: -1;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--navy-d);
        padding: 12px 0;
        gap: 0;
        border-top: 1px solid rgba(255,255,255,0.08);
    }

    .nav-links.open { display: flex; }

    .nav-links li { width: 100%; }

    .nav-links a {
        display: block;
        padding: 12px 24px;
        border-radius: 0;
        font-size: 13px;
    }

    .nav-toggle { display: block; }

    .site-nav { position: relative; }

    .hero { min-height: 80vh; padding-top: 100px; }

    .section { padding: 48px 16px; }

    .pastor-message-card { flex-direction: column; align-items: center; text-align: center; }

    .people-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
