/* ==========================================================================
   Willmar Bible Church — Site stylesheet
   Shared design system for all pages (loaded from WillmarBible.Master).
   Typography: Fraunces (display) + Inter (body), loaded from Google Fonts
   with system-font fallbacks.
   ========================================================================== */

:root {
    --brand: #1e3a5f;          /* deep navy */
    --brand-dark: #142639;
    --brand-darker: #0e1c2b;
    --brand-light: #2e5985;
    --accent: #c9a227;         /* warm gold */
    --accent-bright: #e3bb3d;
    --accent-soft: #f3e9c8;
    --ink: #1f2933;
    --ink-soft: #52606d;
    --paper: #ffffff;
    --paper-soft: #f4f6f9;
    --line: #dde4ec;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 1px 2px rgba(20, 38, 57, 0.06), 0 6px 24px rgba(20, 38, 57, 0.07);
    --shadow-lift: 0 2px 4px rgba(20, 38, 57, 0.08), 0 14px 40px rgba(20, 38, 57, 0.13);
    --font-body: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: "Fraunces", Georgia, "Times New Roman", serif;
}

/* ---- Reset / base ---- */

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16.5px;
    line-height: 1.65;
    color: var(--ink);
    background-color: var(--paper-soft);
}

img { max-width: 100%; height: auto; }

iframe { max-width: 100%; }

a { color: var(--brand-light); }

a:hover { color: var(--brand); }

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--brand);
    line-height: 1.2;
    margin: 0 0 0.5em;
    letter-spacing: -0.01em;
}

::selection { background: var(--accent-soft); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---- Skip link (accessibility) ---- */

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--brand);
    color: #fff;
    padding: 10px 18px;
    z-index: 100;
    border-radius: 0 0 6px 0;
}

.skip-link:focus {
    left: 0;
    color: #fff;
}

/* ---- Header / masthead ---- */

.site-header {
    background:
        radial-gradient(1100px 420px at 80% -60%, rgba(201, 162, 39, 0.22), transparent 60%),
        linear-gradient(135deg, var(--brand-darker) 0%, var(--brand-dark) 45%, var(--brand) 100%);
    color: #fff;
    text-align: center;
    padding: 40px 16px 32px;
}

.site-header a {
    color: inherit;
    text-decoration: none;
}

.site-title {
    font-family: var(--font-display);
    font-size: clamp(30px, 5vw, 46px);
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #fff;
    margin: 0;
}

.site-tagline {
    margin: 8px 0 0;
    font-style: italic;
    font-family: var(--font-display);
    font-size: clamp(15px, 2.4vw, 19px);
    color: var(--accent-soft);
    letter-spacing: 0.04em;
}

/* ---- Navigation ---- */

.site-nav {
    background: rgba(14, 28, 43, 0.96);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 14px rgba(14, 28, 43, 0.35);
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.nav-links a {
    display: block;
    color: #dbe4ee;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    padding: 15px 17px;
    border-bottom: 3px solid transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    border-bottom-color: var(--accent);
}

.nav-links a.active {
    color: #fff;
    border-bottom-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
}

/* Mobile menu (CSS-only checkbox toggle) */

.nav-toggle-box { display: none; }

.nav-toggle {
    display: none;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    padding: 13px 18px;
    cursor: pointer;
    user-select: none;
    width: 100%;
    text-align: center;
}

.nav-toggle::before {
    content: "\2630\00a0\00a0"; /* hamburger */
}

@media (max-width: 700px) {
    .nav-toggle { display: block; }

    .nav-links {
        display: none;
        flex-direction: column;
    }

    .nav-links a {
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        border-left: 3px solid transparent;
    }

    .nav-links a.active,
    .nav-links a:hover {
        border-bottom-color: rgba(255, 255, 255, 0.08);
        border-left-color: var(--accent);
    }

    .nav-toggle-box:checked ~ .nav-links { display: flex; }
}

/* ---- Layout ---- */

.page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 36px 18px 56px;
}

.page-title {
    text-align: center;
    font-size: clamp(28px, 4vw, 36px);
    margin-bottom: 8px;
}

.page-intro {
    text-align: center;
    color: var(--ink-soft);
    max-width: 640px;
    margin: 0 auto 32px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 26px;
    align-items: start;
}

@media (max-width: 820px) {
    .grid-2 { grid-template-columns: 1fr; }
}

/* Eyebrow labels + section headings */

.eyebrow {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 10px;
}

.section-head {
    text-align: center;
    margin-bottom: 26px;
}

.section-head h2 {
    font-size: clamp(26px, 3.6vw, 34px);
    margin: 0;
}

/* ---- Cards ---- */

.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 26px 28px;
    margin-bottom: 26px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-lift);
}

.card > :last-child { margin-bottom: 0; }

.card-title {
    font-size: 22px;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 9px;
    margin-bottom: 16px;
}

/* ---- Buttons ---- */

.btn {
    display: inline-block;
    background: var(--brand);
    color: #fff;
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 15px;
    padding: 11px 24px;
    border-radius: 999px;
    border: 2px solid var(--brand);
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
    background: var(--brand-light);
    border-color: var(--brand-light);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(30, 58, 95, 0.25);
}

.btn-outline {
    background: transparent;
    color: var(--brand);
}

.btn-outline:hover {
    background: var(--brand);
    color: #fff;
}

.btn-gold {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--brand-darker);
}

.btn-gold:hover {
    background: var(--accent-bright);
    border-color: var(--accent-bright);
    color: var(--brand-darker);
    box-shadow: 0 6px 18px rgba(201, 162, 39, 0.35);
}

.btn-block {
    display: block;
    text-align: center;
}

/* ---- Hero (home page) ---- */

.hero {
    text-align: center;
    padding: 18px 0 44px;
}

.hero h1 {
    font-size: clamp(32px, 5.4vw, 52px);
    font-weight: 700;
    margin-bottom: 14px;
}

.hero p {
    color: var(--ink-soft);
    max-width: 640px;
    margin: 0 auto;
    font-size: clamp(16px, 2.2vw, 18.5px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 26px;
}

.hero-times {
    margin-top: 22px;
    font-size: 14.5px;
    letter-spacing: 0.02em;
    color: var(--ink-soft);
}

/* ---- Watch / latest YouTube video (home page) ---- */

.watch {
    background: linear-gradient(160deg, var(--brand-darker) 0%, var(--brand-dark) 60%, var(--brand) 100%);
    border-radius: calc(var(--radius) + 6px);
    padding: clamp(26px, 4.5vw, 46px);
    margin: 0 0 40px;
    box-shadow: var(--shadow-lift);
    scroll-margin-top: 80px;
}

.watch .section-head h2 { color: #fff; }

.watch .eyebrow { color: var(--accent-bright); }

.watch-grid {
    display: grid;
    grid-template-columns: 5fr 2fr;
    gap: clamp(20px, 3vw, 34px);
    align-items: start;
}

@media (max-width: 880px) {
    .watch-grid { grid-template-columns: 1fr; }
}

.video-frame {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45);
}

.video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-title {
    color: #fff;
    font-size: clamp(18px, 2.6vw, 23px);
    margin: 18px 0 2px;
}

.video-date {
    color: #b9c6d6;
    font-size: 14.5px;
    margin: 0;
}

.watch-side-title {
    color: var(--accent-soft);
    font-size: 17px;
    letter-spacing: 0.02em;
    margin-bottom: 14px;
}

.video-list { margin-bottom: 18px; }

.video-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    text-decoration: none;
    padding: 10px;
    margin: 0 -10px;
    border-radius: var(--radius-sm);
    transition: background-color 0.15s ease;
}

.video-item:hover { background: rgba(255, 255, 255, 0.08); }

.video-item img {
    width: 108px;
    flex-shrink: 0;
    border-radius: 7px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #000;
}

.video-item-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.video-item-title {
    color: #eef2f7;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-item:hover .video-item-title { color: #fff; }

.video-item-date {
    color: #93a3b5;
    font-size: 12.5px;
}

.watch .btn-outline {
    color: #eef2f7;
    border-color: rgba(255, 255, 255, 0.45);
}

.watch .btn-outline:hover {
    background: #fff;
    border-color: #fff;
    color: var(--brand-dark);
}

@media (max-width: 880px) {
    .video-item img { width: 128px; }
}

/* ---- Schedule (home page) ---- */

.schedule-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.schedule-list li {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 2px;
    border-bottom: 1px dashed var(--line);
}

.schedule-list li:last-child { border-bottom: none; }

.schedule-day { font-weight: 600; color: var(--brand); }

.schedule-time { color: var(--ink-soft); text-align: right; }

/* ---- Sermon listings ---- */

.sermon-item {
    padding: 12px 2px;
    border-bottom: 1px dashed var(--line);
}

.sermon-item:last-child { border-bottom: none; }

.sermon-date {
    display: block;
    font-size: 14px;
    color: var(--ink-soft);
}

.sermon-title-link {
    font-size: 17px;
    font-weight: 600;
}

/* Server-generated sermon tables (SeriesList) */

.sermon-table table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.sermon-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.sermon-table tr:first-child td {
    font-weight: 700;
    color: var(--brand);
    border-bottom: 2px solid var(--accent);
    white-space: nowrap;
}

.table-scroll { overflow-x: auto; }

/* Series links list (SeriesList / Series pages) */

.series-links p { margin: 0; }

.series-links a {
    display: block;
    padding: 11px 14px;
    border-bottom: 1px dashed var(--line);
    font-size: 18px;
    text-decoration: none;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: background-color 0.15s ease;
}

.series-links a:hover { background: var(--paper-soft); }

.message-list table { width: 100%; }

.message-list td { padding: 7px 4px; }

.message-list a { font-size: 17px; }

/* ---- Statement of Faith ---- */

.faith-item {
    background: var(--paper);
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    box-shadow: var(--shadow);
    padding: 18px 24px;
    margin-bottom: 16px;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.faith-item p { margin: 0 0 6px; }

.faith-ref {
    display: block;
    font-style: italic;
    font-size: 15px;
    color: var(--ink-soft);
}

/* ---- Contact ---- */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 820px;
    margin: 0 auto;
}

@media (max-width: 700px) {
    .contact-grid { grid-template-columns: 1fr; }
}

.contact-line {
    margin: 0 0 10px;
    font-size: 17px;
}

.contact-label {
    display: block;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-soft);
}

/* ---- Directions / map ---- */

.map-embed {
    position: relative;
    width: 100%;
    padding-bottom: 62%;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    margin: 18px 0;
}

.map-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.directions-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.directions-list li {
    padding: 12px 2px 12px 30px;
    border-bottom: 1px dashed var(--line);
    position: relative;
}

.directions-list li:last-child { border-bottom: none; }

.directions-list li::before {
    content: "\27A4"; /* arrow */
    position: absolute;
    left: 4px;
    color: var(--accent);
}

.directions-list strong { color: var(--brand); }

/* ---- Events ---- */

.event-card { text-align: center; }

.event-card .event-when {
    color: var(--brand-light);
    font-weight: 600;
    margin-bottom: 12px;
}

/* ---- Footer ---- */

.site-footer {
    background: linear-gradient(180deg, var(--brand-dark) 0%, var(--brand-darker) 100%);
    color: #c8d3e0;
    margin-top: 28px;
    padding: 44px 18px 30px;
    font-size: 15px;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

@media (max-width: 700px) {
    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.site-footer h3 {
    color: #fff;
    font-size: 16px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-family: var(--font-body);
    font-weight: 700;
    margin-bottom: 12px;
}

.site-footer p { margin: 0 0 6px; }

.site-footer a { color: var(--accent-soft); text-decoration: none; }

.site-footer a:hover { color: #fff; text-decoration: underline; }

.footer-bottom {
    max-width: 1100px;
    margin: 28px auto 0;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    text-align: center;
    font-size: 13px;
    color: #93a3b5;
}

/* ---- Utilities ---- */

.text-center { text-align: center; }

.muted { color: var(--ink-soft); }

.mt-0 { margin-top: 0; }
