html,
body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
    margin: 0;
    padding: 0;
}

:root {
    --primary-black: #050505;
    --secondary-black: #111111;
    --primary-maroon: #2C0A10;
    --secondary-maroon: #400E17;
    --accent-maroon: #5E1220;
    --gold: #F6D27E;
    --gold-light: #F9F7ED;
    --gold-dark: #C5A04E;
    --gold-glow: rgba(246, 210, 126, 0.4);
    --text-light: #F9F7ED;
    --text-muted: #D8CBB8;
    --nav-height: 90px;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--primary-black);
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23F6D27E' fill-opacity='0.03'%3E%3Cpath d='M40 40c0-8.8-7.2-16-16-16S8 31.2 8 40s7.2 16 16 16 16-7.2 16-16zm0 0c0-8.8 7.2-16 16-16s16 7.2 16 16-7.2 16-16 16-16-7.2-16-16zm-32 0c0-4.4-3.6-8-8-8s-8 3.6-8 8 3.6 8 8 8 8-3.6 8-8zm64 0c0-4.4 3.6-8 8-8s8 3.6 8 8-3.6 8-8 8-8-3.6-8-8zM24 24c0-4.4-3.6-8-8-8s-8 3.6-8 8 3.6 8 8 8 8-3.6 8-8zm32 0c0-4.4 3.6-8 8-8s8 3.6 8 8-3.6 8-8 8-8-3.6-8-8zM24 56c0-4.4-3.6-8-8-8s-8 3.6-8 8 3.6 8 8 8 8-3.6 8-8zm32 0c0-4.4 3.6-8 8-8s8 3.6 8 8-3.6 8-8 8-8-3.6-8-8z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 600;
}

.section-title {
    font-size: clamp(2rem, 5vw, 2.5rem);
    color: var(--gold);
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.text-center {
    text-align: center;
}

.text-white {
    color: var(--text-light) !important;
}

.mb-5 {
    margin-bottom: 3rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 1px;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(45deg, var(--gold-dark), var(--gold), var(--gold-light));
    background-size: 200% 200%;
    color: var(--primary-maroon);
    border: none;
    box-shadow: 0 4px 15px var(--gold-glow);
    font-weight: 700;
    text-transform: uppercase;
    animation: gradientShift 5s ease infinite;
}

.btn-primary:hover {
    background-position: 100% 50%;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px var(--gold-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--gold);
    border: 2px solid var(--gold);
    font-weight: 600;
}

.btn-secondary:hover {
    background: var(--gold-glow);
    color: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--gold-glow);
    border-color: var(--gold-light);
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

.bg-dark {
    background-color: var(--secondary-black);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 2px solid rgba(246, 210, 126, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
}

.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-primary {
    font-family: var(--font-heading);
    font-size: clamp(1rem, 4vw, 1.5rem);
    /* Fluid font size */
    color: var(--gold);
    line-height: 1;
    transition: font-size 0.3s ease;
}

@media (max-width: 768px) {
    .logo-primary {
        font-size: 1.2rem;
    }
}

@media (max-width: 380px) {
    .logo-primary {
        font-size: 1rem;
    }
}

.logo-secondary {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--text-light);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 4px;
    transition: font-size 0.3s ease;
}

@media (max-width: 768px) {
    .logo-secondary {
        font-size: 0.65rem;
        letter-spacing: 0.5px;
    }
}

@media (max-width: 380px) {
    .logo-secondary {
        font-size: 0.55rem;
        letter-spacing: 0;
    }
}

.nav-menu {
    display: flex;
    gap: 30px;
}

@media (max-width: 768px) {
    .nav-menu {
        gap: 20px;
    }
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--gold);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold);
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--gold);
    background: none;
    border: none;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    min-height: 100svh;
    /* iOS safe viewport height */
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    padding-top: var(--nav-height);
    padding-bottom: 60px;
    /* Added more space for mobile safety */
    background: radial-gradient(circle at center, rgba(30, 25, 10, 0.8) 0%, var(--primary-black) 80%);
    overflow: hidden;
    /* Added to clip the decorative pulseGlow element */
}

.hero::after {
    content: '';
    position: absolute;
    width: 150vw;
    height: 150vh;
    background: radial-gradient(circle, var(--gold-glow) 0%, transparent 60%);
    opacity: 0.15;
    animation: pulseGlow 15s infinite alternate ease-in-out;
    pointer-events: none;
}

@keyframes pulseGlow {
    0% {
        transform: scale(1) translate(0, 0);
    }

    100% {
        transform: scale(1.1) translate(2vw, 2vh);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    text-align: left;
}

.hero-left {
    flex: 0 0 35%;
    /* roughly 1/3 width */
    display: flex;
    justify-content: flex-end;
}

.hero-logo {
    height: auto;
    width: 100%;
    max-height: 400px;
    /* Don't let it get TOO massive on 4k screens */
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

.hero-divider {
    width: 2px;
    height: 200px;
    background: linear-gradient(to bottom, transparent, var(--gold), transparent);
    flex: 0 0 auto;
}

.hero-right {
    flex: 1;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--gold);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-family: var(--font-body);
}

.hero-title {
    font-size: clamp(2rem, 8vw, 4.5rem);
    /* Fluid typography */
    color: #fff;
    line-height: 1.1;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    letter-spacing: -1px;
}

.hero-text {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Leadership Section */
.layout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.quote-block {
    margin-top: 30px;
    padding-left: 20px;
    border-left: 4px solid var(--gold);
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.2rem;
    color: var(--gold-light);
}

.golden-border {
    border: 2px solid var(--gold);
    padding: 10px;
    border-radius: 8px;
    background-color: var(--secondary-black);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Sermons / FB Feed Section */
.sermons-section {
    background-color: var(--secondary-black);
}

.fb-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 540px;
    /* Increased to allow full iframe width + padding */
    margin: 30px auto 0;
    background: #fff;
    padding: 10px;
    /* Slight padding increase for better framing */
    border-radius: 8px;
    border: 2px solid var(--gold);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 15px rgba(246, 210, 126, 0.3);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.fb-wrapper iframe {
    width: 100%;
    /* Ensures iframe resizes nicely within container */
    max-width: 100%;
}

.fb-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), 0 0 30px var(--gold-glow);
    border-color: var(--gold-light);
}

/* Timeline / History Section */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    width: 2px;
    height: 100%;
    background: var(--gold);
    left: 50%;
    transform: translateX(-50%);
    top: 0;
}

.timeline-item {
    position: relative;
    margin-bottom: 60px;
    width: 50%;
    padding: 0 40px;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--primary-black);
    border: 3px solid var(--gold);
    border-radius: 50%;
    top: 0;
}

.timeline-item:nth-child(odd)::after {
    right: -8px;
}

.timeline-item:nth-child(even)::after {
    left: -8px;
}

.timeline-date {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 10px;
    font-weight: 600;
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.timeline-content p {
    color: var(--text-muted);
}

/* Contact Cards */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.contact-card {
    background: rgba(64, 14, 23, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(246, 210, 126, 0.1);
    padding: 40px 20px;
    border-radius: 12px;
    border-bottom: 3px solid var(--gold);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(246, 210, 126, 0.15), transparent);
    transform: skewX(-25deg);
    transition: all 0.7s ease;
}

.contact-card:hover::before {
    left: 200%;
}

.contact-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(246, 210, 126, 0.15);
    border-color: rgba(246, 210, 126, 0.4);
}

.contact-card i {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 20px;
}

.contact-card h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.contact-card p,
.social-link {
    color: var(--text-muted);
    text-decoration: none;
}

.social-link:hover {
    color: var(--gold);
}

/* Schedule Section */
.schedule-section {
    background-color: var(--secondary-black);
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.schedule-card {
    background: rgba(44, 10, 16, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 40px 20px;
    border-radius: 12px;
    border: 1px solid rgba(246, 210, 126, 0.2);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.schedule-card:hover {
    border-color: var(--gold);
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5), 0 0 15px var(--gold-glow);
}

.schedule-card h4 {
    font-size: 1.2rem;
    color: var(--gold);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.schedule-card .time {
    font-size: 1.8rem;
    font-family: var(--font-heading);
    color: var(--text-light);
}

.schedule-card .note {
    margin-top: 15px;
    font-size: 0.95rem;
    color: var(--gold-dark);
    font-style: italic;
}

/* Footer */
.footer {
    background-color: var(--primary-black);
    padding: 30px 0;
    border-top: 1px solid rgba(246, 210, 126, 0.1);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.fade-in {
    opacity: 0;
    transition: opacity 1s ease-in;
}

.fade-in.visible {
    opacity: 1;
}

.slide-up {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease-out;
}

.slide-up.visible {
    opacity: 1;
    transform: translateY(0);
}

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

    .timeline::before {
        left: 0;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        text-align: left !important;
        padding-left: 40px;
        padding-right: 0;
    }

    .timeline-item::after {
        left: -8px !important;
    }
}

@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 40px 20px 20px;
    }

    .hero-left {
        flex: 0 0 auto;
    }

    .hero-logo {
        max-height: 160px;
        width: auto;
    }

    .hero-divider {
        width: 150px;
        height: 2px;
        background: linear-gradient(to right, transparent, var(--gold), transparent);
        margin: 0 auto;
    }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
        margin-top: 10px;
    }

    .hero-buttons .btn {
        margin-left: 0 !important;
        width: 100%;
        max-width: 280px;
    }

    .hero-title {
        font-size: 2.4rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-text {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    .contact-grid,
    .schedule-grid {
        grid-template-columns: 1fr;
    }

    .mobile-toggle {
        display: block;
        padding: 10px;
    }

    .nav-container {
        padding: 0 15px;
    }

    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--nav-height));
        background-color: var(--primary-black);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        /* Changed from center to align items to top */
        padding-top: 10px;
        /* Added padding to start items near the top */
        transition: left 0.3s ease;
    }

    .nav-menu.active {
        left: 0;
    }
}

/* Small phones (iPhone SE, older iOS portrait) */
@media (max-width: 480px) {
    .hero-content {
        gap: 15px;
        padding: 30px 15px 15px;
    }

    .hero-logo {
        max-height: 120px;
    }

    .hero-title {
        font-size: 1.8rem;
        letter-spacing: 0;
        margin-bottom: 15px;
    }

    .hero-subtitle {
        font-size: 0.85rem;
        letter-spacing: 2px;
        margin-bottom: 10px;
    }

    .hero-text {
        font-size: 0.9rem;
        margin-bottom: 15px;
        line-height: 1.5;
    }

    .hero-divider {
        width: 80px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.85rem;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .logo-link {
        gap: 8px;
    }
}

/* Extra tight screens */
@media (max-width: 350px) {
    .hero-title {
        font-size: 1.6rem;
    }

    .nav-container {
        padding: 0 10px;
    }
}