/* Reset and Base Styles */
:root {
    /* Color Palette */
    --color-bg: #F5E6D3;
    /* Cream */
    --color-text: #1A202C;
    /* Dark Navy/Charcoal */
    --color-accent: #C5A059;
    /* Muted Gold/Brass */
    --color-secondary: #4A5568;
    /* Muted Gray */
    --color-white: #FFFFFF;
    --color-overlay: rgba(26, 32, 44, 0.95);

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;
    --section-padding: 7rem 0;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

main {
    position: relative;
    z-index: 1;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text);
}

a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-accent);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    width: 100%;
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-accent {
    color: var(--color-accent);
}

.mt-4 {
    margin-top: var(--spacing-xl);
}

.mb-4 {
    margin-bottom: var(--spacing-xl);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0.5rem 0;
    z-index: 1000;
    transition: all 0.3s ease;
    background-color: #E8D5B7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    background-image: 
        url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'             opacity='0.5'/%3E%3C/svg%3E"),
        repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.04) 0px,
            transparent 1px,
            transparent 2px,
            rgba(0, 0, 0, 0.04) 3px
        );
    background-size: 400px 400px, 100% 100%;
}

.navbar.scrolled {
    background-color: rgba(232, 213, 183, 0.85);
    backdrop-filter: blur(10px);
    padding: 0.25rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.navbar.scrolled .nav-brand .logo {
    height: 77px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    z-index: 1001;
}

.nav-brand .logo {
    height: 107px;
    width: auto;
    object-fit: contain;
    transition: height 0.3s ease;
    /* Remove filter - logo should display as-is with its original colors */
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
}

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background-color: var(--color-text);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    padding: 9rem 0 4rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-card {
    border: 1px solid var(--color-text);
    padding: 4rem 2rem;
    max-width: 900px;
    margin: 0 auto;
    background-color: #F8EDE0;
    box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.05);
    position: relative;
    --texture-x: 50%;
    --texture-y: 50%;
    --texture-opacity: 0;
    background-image: 
        url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.5'/%3E%3C/svg%3E"),
        repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.04) 0px,
            transparent 1px,
            transparent 2px,
            rgba(0, 0, 0, 0.04) 3px
        );
    background-size: 400px 400px, 100% 100%;
    overflow: hidden;
}

.hero-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: 
        url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.5'/%3E%3C/svg%3E"),
        repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.04) 0px,
            transparent 1px,
            transparent 2px,
            rgba(0, 0, 0, 0.04) 3px
        );
    background-size: 400px 400px, 100% 100%;
    opacity: var(--texture-opacity);
    transition: opacity 0.5s ease-in-out, -webkit-mask-image 0.3s ease-out, mask-image 0.3s ease-out;
    mask-image: radial-gradient(
        circle 500px at var(--texture-x) var(--texture-y),
        black 0%,
        black 25%,
        rgba(0, 0, 0, 0.9) 35%,
        rgba(0, 0, 0, 0.7) 45%,
        rgba(0, 0, 0, 0.5) 55%,
        rgba(0, 0, 0, 0.3) 65%,
        rgba(0, 0, 0, 0.15) 75%,
        rgba(0, 0, 0, 0.08) 85%,
        rgba(0, 0, 0, 0.03) 92%,
        transparent 100%
    );
    -webkit-mask-image: radial-gradient(
        circle 500px at var(--texture-x) var(--texture-y),
        black 0%,
        black 25%,
        rgba(0, 0, 0, 0.9) 35%,
        rgba(0, 0, 0, 0.7) 45%,
        rgba(0, 0, 0, 0.5) 55%,
        rgba(0, 0, 0, 0.3) 65%,
        rgba(0, 0, 0, 0.15) 75%,
        rgba(0, 0, 0, 0.08) 85%,
        rgba(0, 0, 0, 0.03) 92%,
        transparent 100%
    );
}

.hero-card::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 1px solid rgba(26, 32, 44, 0.2);
    pointer-events: none;
}

.hero-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-logo {
    height: 300px;
    width: auto;
    object-fit: contain;
    max-width: 100%;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    letter-spacing: 0.02em;
    margin-bottom: var(--spacing-md);
    color: var(--color-text);
    text-transform: uppercase;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

.subtitle {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    font-style: italic;
    color: var(--color-secondary);
    margin-bottom: var(--spacing-xl);
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
}

.subtitle em {
    font-family: var(--font-heading);
    font-size: 1rem;
    display: block;
    margin-bottom: var(--spacing-sm);
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.divider {
    width: 80px;
    height: 1px;
    background-color: var(--color-accent);
    margin: 1rem auto;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
}

.service-info {
    margin-top: var(--spacing-xl);
    display: grid;
    gap: var(--spacing-xl);
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.8s forwards;
}

.service-block {
    margin-bottom: var(--spacing-lg);
    transition: transform 0.3s ease;
    padding: 1rem;
    border-radius: 4px;
}

.service-block:hover {
    background-color: rgba(0, 0, 0, 0.02);
    transform: translateY(-2px);
}

.service-block h2 {
    font-size: 1.5rem;
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
}

.service-block .time {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.service-block .location {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--color-secondary);
}

.phone {
    font-family: var(--font-body);
    font-size: 1.2rem;
    margin-top: var(--spacing-lg);
    color: var(--color-text);
    font-weight: 600;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-card {
        padding: 2rem 1rem;
        margin: 0 1rem;
        width: auto;
    }

    .hero-logo {
        height: 225px;
    }

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

/* About Content inside Hero Card */
.about-content {
    margin-top: var(--spacing-xl);
}

.about-content .about-text {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto var(--spacing-xl);
    color: var(--color-text);
}

/* About Section (for other pages) */
.about {
    padding: var(--section-padding);
    background-color: #FFF5E6;
    /* Slightly darker cream */
}

.about-text {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto var(--spacing-xl);
    color: var(--color-text);
}

/* Page Header */
.page-header {
    margin-top: 8rem;
    padding: 2rem 0 0.5rem;
    text-align: center;
}

.page-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem;
}

/* Content Section */
.content-section {
    padding: 2rem 0 7rem 0;
}

.content-card {
    background-color: #F8EDE0;
    border: 1px solid var(--color-text);
    padding: 3rem 2rem;
    margin-bottom: var(--spacing-lg);
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.05);
    position: relative;
    --texture-x: 50%;
    --texture-y: 50%;
    --texture-opacity: 0;
    background-image: 
        url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.5'/%3E%3C/svg%3E"),
        repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.04) 0px,
            transparent 1px,
            transparent 2px,
            rgba(0, 0, 0, 0.04) 3px
        );
    background-size: 400px 400px, 100% 100%;
    overflow: hidden;
}

.content-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: 
        url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.5'/%3E%3C/svg%3E"),
        repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.04) 0px,
            transparent 1px,
            transparent 2px,
            rgba(0, 0, 0, 0.04) 3px
        );
    background-size: 400px 400px, 100% 100%;
    opacity: var(--texture-opacity);
    transition: opacity 0.5s ease-in-out, -webkit-mask-image 0.3s ease-out, mask-image 0.3s ease-out;
    mask-image: radial-gradient(
        circle 500px at var(--texture-x) var(--texture-y),
        black 0%,
        black 25%,
        rgba(0, 0, 0, 0.9) 35%,
        rgba(0, 0, 0, 0.7) 45%,
        rgba(0, 0, 0, 0.5) 55%,
        rgba(0, 0, 0, 0.3) 65%,
        rgba(0, 0, 0, 0.15) 75%,
        rgba(0, 0, 0, 0.08) 85%,
        rgba(0, 0, 0, 0.03) 92%,
        transparent 100%
    );
    -webkit-mask-image: radial-gradient(
        circle 500px at var(--texture-x) var(--texture-y),
        black 0%,
        black 25%,
        rgba(0, 0, 0, 0.9) 35%,
        rgba(0, 0, 0, 0.7) 45%,
        rgba(0, 0, 0, 0.5) 55%,
        rgba(0, 0, 0, 0.3) 65%,
        rgba(0, 0, 0, 0.15) 75%,
        rgba(0, 0, 0, 0.08) 85%,
        rgba(0, 0, 0, 0.03) 92%,
        transparent 100%
    );
}

.content-card::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 1px solid rgba(26, 32, 44, 0.1);
    pointer-events: none;
}

.content-card h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
    color: var(--color-text);
}

.content-card p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
    color: var(--color-secondary);
}

.content-card p:last-child {
    margin-bottom: 0;
}

.text-link {
    color: var(--color-accent);
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.3s ease;
}

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

.mt-2 {
    margin-top: 1.5rem;
}

/* Contact Grid */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.phone-link {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-accent);
}

/* Page Subtitle */
.page-subtitle {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-style: italic;
    color: var(--color-secondary);
    margin-top: var(--spacing-md);
}

/* Scripture References */
.scripture-ref {
    font-family: var(--font-heading);
    font-style: italic;
    color: var(--color-accent);
    padding: var(--spacing-md);
    background-color: rgba(197, 160, 89, 0.05);
    border-left: 3px solid var(--color-accent);
    margin-top: var(--spacing-md);
}

/* Sermon Grid */
.sermon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.sermon-card-placeholder {
    text-align: center;
    padding: 2rem;
    border: 1px solid rgba(26, 32, 44, 0.1);
    background-color: #F8EDE0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    --texture-x: 50%;
    --texture-y: 50%;
    --texture-opacity: 0;
    background-image: 
        url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.5'/%3E%3C/svg%3E"),
        repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.04) 0px,
            transparent 1px,
            transparent 2px,
            rgba(0, 0, 0, 0.04) 3px
        );
    background-size: 400px 400px, 100% 100%;
    overflow: hidden;
}

.sermon-card-placeholder::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: 
        url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.5'/%3E%3C/svg%3E"),
        repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.04) 0px,
            transparent 1px,
            transparent 2px,
            rgba(0, 0, 0, 0.04) 3px
        );
    background-size: 400px 400px, 100% 100%;
    opacity: var(--texture-opacity);
    transition: opacity 0.5s ease-in-out, -webkit-mask-image 0.3s ease-out, mask-image 0.3s ease-out;
    mask-image: radial-gradient(
        circle 500px at var(--texture-x) var(--texture-y),
        black 0%,
        black 25%,
        rgba(0, 0, 0, 0.9) 35%,
        rgba(0, 0, 0, 0.7) 45%,
        rgba(0, 0, 0, 0.5) 55%,
        rgba(0, 0, 0, 0.3) 65%,
        rgba(0, 0, 0, 0.15) 75%,
        rgba(0, 0, 0, 0.08) 85%,
        rgba(0, 0, 0, 0.03) 92%,
        transparent 100%
    );
    -webkit-mask-image: radial-gradient(
        circle 500px at var(--texture-x) var(--texture-y),
        black 0%,
        black 25%,
        rgba(0, 0, 0, 0.9) 35%,
        rgba(0, 0, 0, 0.7) 45%,
        rgba(0, 0, 0, 0.5) 55%,
        rgba(0, 0, 0, 0.3) 65%,
        rgba(0, 0, 0, 0.15) 75%,
        rgba(0, 0, 0, 0.08) 85%,
        rgba(0, 0, 0, 0.03) 92%,
        transparent 100%
    );
}

.sermon-card-placeholder:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.sermon-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

.sermon-card-placeholder h3 {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
}

.sermon-card-placeholder p {
    font-size: 1rem;
    color: var(--color-secondary);
    line-height: 1.6;
}

/* Service Times Inline */
.service-times-inline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
    padding: var(--spacing-lg);
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: 4px;
}

.service-times-inline div {
    padding: var(--spacing-md);
}

/* Buttons */
.links {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.btn,
.btn-outline {
    padding: 1rem 2rem;
    border-radius: 2px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
}

.btn {
    background-color: var(--color-text);
    color: var(--color-white);
    border: 1px solid var(--color-text);
}

.btn:hover {
    background-color: transparent;
    color: var(--color-text);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-text);
}

.btn-outline:hover {
    background-color: var(--color-text);
    color: var(--color-white);
    transform: translateY(-2px);
}

/* Footer */
footer {
    padding: var(--spacing-xl) 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.9rem;
    color: var(--color-secondary);
    background-color: var(--color-bg);
    position: relative;
    z-index: 1;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
    text-align: left;
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.footer-section p {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 100%;
        background-color: var(--color-bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        z-index: 1000;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

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

    .navbar .nav-brand .logo {
        height: 77px;
    }

    .navbar.scrolled .nav-brand .logo {
        height: 61px;
    }
}