/* ===== FONTS ===== */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&display=swap");

/* ===== CSS VARIABLES ===== */
:root {
    /* Brand colors from colors.svg */
    --cream: rgb(239, 232, 216);
    --teal: rgb(10, 87, 88);
    --red: rgb(129, 25, 31);

    /* Derived */
    --teal-light: rgba(10, 87, 88, 0.08);
    --teal-fade: rgba(10, 87, 88, 0.15);
    --red-light: rgba(129, 25, 31, 0.08);
    --red-fade: rgba(129, 25, 31, 0.15);
    --cream-dark: rgb(220, 212, 196);

    /* Neutrals */
    --text-primary: rgb(38, 30, 30);
    --text-secondary: rgba(38, 30, 30, 0.65);
    --text-muted: rgba(38, 30, 30, 0.45);
    --surface: rgba(255, 255, 255, 0.7);
    --surface-solid: rgb(255, 255, 255);
    --border: rgba(10, 87, 88, 0.12);

    /* Layout */
    --max-width: 1440px;
    --section-padding: clamp(3rem, 6vw, 5rem);
    --card-radius: 16px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--teal);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover {
    color: var(--red);
}

ul {
    list-style: none;
}

/* ===== BACKGROUND ===== */
.canvas-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: url("images/website-bg.png") center / cover no-repeat;
    opacity: 0.5;
}
.canvas-background::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(239, 232, 216, 0.3) 0%,
        rgba(255, 255, 255, 0.5) 50%,
        rgba(239, 232, 216, 0.4) 100%
    );
}

/* ===== LAYOUT UTILITY ===== */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 2rem);
}

section {
    padding: var(--section-padding) 0;
}

/* ===== HEADER / NAV ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid var(--border);
    transition: box-shadow var(--transition);
}
.site-header.scrolled {
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem clamp(1rem, 3vw, 2rem);
}

.logo a {
    display: flex;
    align-items: center;
}
.logo img {
    height: 65px;
    width: auto;
}

/* Desktop nav */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-links a {
    position: relative;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    border-radius: 8px;
    transition: all var(--transition);
    letter-spacing: 0.01em;
}
.nav-links a:hover {
    background: var(--teal-light);
    color: var(--teal);
}

.nav-links .btn-giving {
    background: var(--teal);
    color: #fff;
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    font-weight: 600;
    margin-left: 0.5rem;
}
.nav-links .btn-giving:hover {
    background: var(--red);
    color: #fff;
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}
.nav-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 200px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    animation: dropdown-in 0.2s ease-out;
}
.nav-dropdown:hover .dropdown-menu {
    display: block;
}
.dropdown-menu a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
}
.dropdown-menu a:hover {
    background: var(--teal-light);
}

@keyframes dropdown-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    border: none;
    background: none;
    z-index: 110;
}
.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition);
}
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav panel */
.mobile-nav {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 105;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity var(--transition);
}
.mobile-nav.open {
    display: flex;
    opacity: 1;
}
.mobile-nav a {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
    padding: 0.75rem 2rem;
    border-radius: 12px;
    transition: all var(--transition);
}
.mobile-nav a:hover {
    background: var(--teal-light);
    color: var(--teal);
}
.mobile-nav .btn-giving {
    margin-top: 1rem;
    background: var(--teal);
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: 100px;
    font-weight: 600;
}

/* ===== HERO ===== */
.hero {
    text-align: center;
    padding: clamp(4rem, 10vw, 8rem) 0 clamp(3rem, 6vw, 5rem);
}

.hero h1 {
    font-family: "Playfair Display", serif;
    font-size: clamp(3.5rem, 7vw, 5.6rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--teal);
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
    animation: fade-up 1s ease-out forwards;
    opacity: 0;
}
.hero h1 .accent {
    color: var(--red);
}

.hero p {
    font-size: clamp(1.05rem, 1.8vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.8;
    animation: fade-up 1s 0.15s ease-out forwards;
    opacity: 0;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fade-up 1s 0.3s ease-out forwards;
    opacity: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
    font-family: inherit;
}
.btn-primary {
    background: var(--teal);
    color: #fff;
}
.btn-primary:hover {
    background: rgb(8, 70, 71);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(10, 87, 88, 0.3);
}
.btn-outline {
    background: transparent;
    color: var(--teal);
    border: 2px solid var(--teal);
}
.btn-outline:hover {
    background: var(--teal);
    color: #fff;
    transform: translateY(-1px);
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== SECTION HEADERS ===== */
.section-header {
    text-align: center;
    margin-bottom: clamp(2rem, 4vw, 3rem);
}
.section-header h2 {
    font-family: "Playfair Display", serif;
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 600;
    color: var(--teal);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}
.section-header p {
    color: var(--text-secondary);
    font-size: clamp(0.95rem, 1.5vw, 1.05rem);
}
.section-divider {
    width: 50px;
    height: 3px;
    background: var(--red);
    border-radius: 3px;
    margin: 0.75rem auto 0;
}

/* ===== ABOUT / SCHEDULE CARDS ===== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(1.5rem, 3vw, 2rem);
}

.info-card {
    background: var(--surface);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    transition: all var(--transition);
}
.info-card:hover {
    border-color: rgba(10, 87, 88, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.info-card h3 {
    font-family: "Playfair Display", serif;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: 600;
    color: var(--teal);
    margin-bottom: 1rem;
}

.info-card p {
    color: var(--text-secondary);
    font-size: clamp(0.9rem, 1.3vw, 1rem);
    line-height: 1.8;
}

.schedule-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.6rem 0;
    font-size: clamp(0.9rem, 1.3vw, 0.95rem);
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}
.schedule-item:last-child {
    border-bottom: none;
}
.schedule-item .time {
    font-weight: 600;
    color: var(--teal);
    white-space: nowrap;
    min-width: 110px;
}
.schedule-item .label {
    color: var(--text-secondary);
}

.schedule-group-title {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--red);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--red-fade);
}
.schedule-group-title:first-child {
    margin-top: 0;
}

/* ===== SERMONS GRID ===== */
.sermons-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(1rem, 2vw, 1.5rem);
}

.sermon-card {
    background: var(--surface);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    overflow: hidden;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}
.sermon-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border-color: rgba(10, 87, 88, 0.25);
}

.sermon-card .thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--cream);
    overflow: hidden;
}
.sermon-card .thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}
.sermon-card:hover .thumbnail img {
    transform: scale(1.03);
}
.sermon-card .play-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 87, 88, 0.0);
    transition: background var(--transition);
}
.sermon-card:hover .play-icon {
    background: rgba(10, 87, 88, 0.15);
}
.play-icon svg {
    width: 48px;
    height: 48px;
    fill: white;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
    opacity: 0.9;
    transition: all var(--transition);
}
.sermon-card:hover .play-icon svg {
    opacity: 1;
    transform: scale(1.1);
}

.sermon-card .sermon-info {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.sermon-card .sermon-date {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--red);
    margin-bottom: 0.35rem;
}
.sermon-card .sermon-title {
    font-family: "Playfair Display", serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 0.5rem;
    flex: 1;
}
.sermon-card .sermon-speaker {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.sermon-card .badge-new {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--red);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.6rem;
    border-radius: 100px;
}

.sermons-cta {
    text-align: center;
    margin-top: 2rem;
}

/* Sermon loading state */
.sermons-loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ===== LATEST ACTIVITY ===== */
.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
}

.activity-card {
    background: var(--surface);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: clamp(1.5rem, 2.5vw, 2rem);
    transition: all var(--transition);
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}
.activity-card:hover {
    border-color: rgba(10, 87, 88, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.activity-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}
.activity-icon.event { background: var(--teal-light); }
.activity-icon.class { background: var(--red-light); }
.activity-icon.prayer { background: rgba(239, 232, 216, 0.6); }

.activity-content h3 {
    font-family: "Playfair Display", serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}
.activity-content .activity-meta {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--teal);
    margin-bottom: 0.4rem;
}
.activity-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.activity-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    margin-bottom: 0.5rem;
}
.activity-tag.event { background: var(--teal-fade); color: var(--teal); }
.activity-tag.class { background: var(--red-fade); color: var(--red); }
.activity-tag.prayer { background: rgba(239, 232, 216, 0.8); color: rgb(140, 120, 80); }

/* ===== FOOTER ===== */
.site-footer {
    background: var(--teal);
    color: rgba(255, 255, 255, 0.85);
    margin-top: var(--section-padding);
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: clamp(2.5rem, 5vw, 4rem) clamp(1rem, 3vw, 2rem);
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: clamp(2rem, 4vw, 3rem);
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.7;
    opacity: 0.8;
    margin-top: 1rem;
    max-width: 320px;
}
.footer-brand .footer-logo {
    height: 52px;
    filter: brightness(0) invert(1);
}

.footer-col h4 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1rem;
}
.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.footer-col a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    transition: color var(--transition);
}
.footer-col a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1.5rem clamp(1rem, 3vw, 2rem);
    text-align: center;
    max-width: var(--max-width);
    margin: 0 auto;
}
.footer-bottom p {
    font-size: 0.8rem;
    opacity: 0.5;
}

.social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}
.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: all var(--transition);
}
.social-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    color: #fff;
}
.social-links svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ===== INNER PAGE STYLES ===== */
.page-hero {
    text-align: center;
    padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 4vw, 3rem);
}
.page-hero h1 {
    font-family: "Playfair Display", serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--teal);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}
.page-hero p {
    color: var(--text-secondary);
    font-size: clamp(0.95rem, 1.5vw, 1.05rem);
    max-width: 600px;
    margin: 0 auto;
}

/* Content prose (values, about) */
.prose {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 2rem) var(--section-padding);
}
.prose h2 {
    font-family: "Playfair Display", serif;
    font-size: clamp(1.3rem, 2.2vw, 1.6rem);
    font-weight: 600;
    color: var(--teal);
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--teal-fade);
}
.prose h3 {
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}
.prose p {
    color: var(--text-secondary);
    font-size: clamp(0.9rem, 1.3vw, 1rem);
    line-height: 1.8;
    margin-bottom: 0.75rem;
}

/* Sermon archive grid (full page) */
.sermon-archive-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(1rem, 2vw, 1.5rem);
}

/* Embedded map */
.map-embed {
    width: 100%;
    aspect-ratio: 16 / 11.7;
    border-radius: var(--card-radius);
    border: 1px solid var(--border);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition);
}
.map-embed:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border-color: rgba(10, 87, 88, 0.25);
}
.map-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Facebook feed */
.fb-feed-wrapper {
    display: flex;
    justify-content: center;
}
.fb-feed-wrapper iframe {
    border: none;
    border-radius: var(--card-radius);
    overflow: hidden;
    max-width: 100%;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .menu-toggle {
        display: flex;
    }

    .hero h1 {
        font-size: clamp(2.8rem, 9vw, 3.8rem);
    }

    .sermons-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sermon-archive-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-brand p {
        max-width: 100%;
    }
    .footer-brand .footer-logo {
        margin: 0 auto;
    }
    .social-links {
        justify-content: center;
    }
    .footer-col h4 {
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    .sermons-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
