:root {
    /* Brand palette — pulled from nav.css / footer.css (the warm dark canvas) */
    --bg: #15110d;
    --surface: #1d1812;
    --brand-gold: #FFD166;
    --gold-hover: #ffdd85;
    --text: #f4f1ec;
    --text-muted: #a8a39c;
    --border: rgba(255, 255, 255, 0.06);
}

html {
    background: var(--bg);
}

body {
    /* border: 2px solid red; */
    background: var(--bg);
    color: var(--text);
    /* match donations.css / contacts.css so type is consistent site-wide */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#sermons-section {
    max-width: 1100px;
    margin: 0 auto;
    /* bottom padding gives the last card row room to breathe above the footer */
    padding: 32px 24px 72px;
}

/* ---------- Hero ---------- */
.sermons-hero {
    /* border: 2px solid red; */
    position: relative;
    text-align: center;
    padding: 56px 16px 44px;
    overflow: hidden;
    /* soft feather so the hero's bottom edge blends into the page */
    box-shadow: 0 10px 6px -6px rgba(0, 0, 0, 0.55);
    border-radius: 16px;
    
}

.sermons-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 38%, rgba(255, 209, 102, 0.18), transparent 60%);
    pointer-events: none;
    z-index: 0;
    border-radius: 16px;
}

.sermons-hero h1,
.sermons-hero .sermons-tagline {
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.sermons-hero h1 {
    font-size: 2.6rem;
    margin: 0 0 12px;
    letter-spacing: 0.01em;
    text-shadow: 0 3px 16px rgba(0, 0, 0, 0.6);
}

.sermons-tagline {
    color: var(--text);
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.55;
    max-width: 700px;
    margin: 0 auto;
    text-wrap: balance;
}

/* ---------- Section labels ---------- */
.section-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.8rem;
    color: var(--brand-gold);
    margin: 40px 0 16px;
}

.month-heading {
    font-size: 1.4rem;
    margin: 48px 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

/* ---------- Cards ---------- */
.sermon-grid {
    /* border: 2px solid red; */
    display: grid;
    /* 2 columns on purpose — keeps thumbnails large and easy to identify */
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.sermon-card {
    /* border: 2px solid red; */
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.sermon-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 209, 102, 0.35);
}

.featured-card {
    max-width: 840px;
}

.sermon-video {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
}

.sermon-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ---------- Thumbnail facade (loads the player only on click) ---------- */
.yt-facade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: #000;
    cursor: pointer;
    display: block;
}

.yt-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.yt-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    border-radius: 14px;
    background: rgba(20, 17, 13, 0.72);
    transition: background 0.18s ease, transform 0.18s ease;
}

/* play triangle */
.yt-play::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 54%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 10px 0 10px 18px;
    border-color: transparent transparent transparent #fff;
}

.yt-facade:hover .yt-play,
.yt-facade:focus-visible .yt-play {
    background: var(--brand-gold);
    transform: translate(-50%, -50%) scale(1.08);
}

.yt-facade:hover .yt-play::before,
.yt-facade:focus-visible .yt-play::before {
    border-left-color: #15110d;
}

.sermon-title {
    font-size: 1.05rem;
    margin: 14px 4px 6px;
    color: var(--text);
}

.featured-card .sermon-title {
    font-size: 1.5rem;
}

.sermon-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0 4px 6px;
}

/* date lives in the title; the <time> tag stays for machine-readable semantics */
.sermon-date {
    display: none;
}

@media (max-width: 768px) {
    #sermons-section {
        padding: 20px 16px 0;
    }

    .sermons-hero h1 {
        font-size: 2rem;
    }

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