/* ============================================
   Trail Life Troop TX-0139 — Stylesheet
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --crimson: #BA272C;
    --crimson-dark: #8E1E22;
    --tl-blue: #004B87;
    --tl-tan: #D8CCB7;
    --brown-dark: #3E2E18;
    --brown: #5C4A2F;
    --clay: #876237;
    --sand: #C4A76C;
    --cream: #D8CCB7;
    --white: #FAFAF7;
    --gray-100: #F0EDE6;
    --gray-200: #DDD8CE;
    --gray-500: #8C8578;
    --gray-700: #4A453D;
    --gray-900: #1E1B16;
    --green-forest: #2D5E2A;
    --green-pine: #3A7D37;

    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Open Sans', sans-serif;

    --nav-height: 72px;
    --section-padding: 100px;
    --container-width: 1140px;
    --container-narrow: 800px;

    --shadow-sm: 0 1px 3px rgba(30,27,22,0.08);
    --shadow-md: 0 4px 16px rgba(30,27,22,0.10);
    --shadow-lg: 0 8px 32px rgba(30,27,22,0.14);
    --radius: 8px;
    --radius-lg: 12px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
    /* Match the page background so navigations never flash pure white. */
    background: var(--white);
}

/* Cross-document view transitions — both the outgoing and incoming page must
 * opt in, so this mirrors the same at-rule in dashboard/dash.css and makes
 * public-page ↔ dashboard navigations crossfade too (Chrome 126+/Safari
 * 18.2+; older browsers ignore it). */
@view-transition {
    navigation: auto;
}
@media (prefers-reduced-motion: reduce) {
    ::view-transition-group(*),
    ::view-transition-old(*),
    ::view-transition-new(*) {
        animation: none !important;
    }
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--gray-900);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--tl-blue); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--crimson); }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 14px 32px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.25s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--crimson);
    color: #fff;
    border-color: var(--crimson);
}
.btn-primary:hover {
    background: var(--crimson-dark);
    border-color: var(--crimson-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.6);
}
.btn-outline:hover {
    background: rgba(255,255,255,0.12);
    border-color: #fff;
    color: #fff;
}

.btn-nav {
    padding: 10px 24px;
    font-size: 0.85rem;
    background: var(--crimson);
    color: #fff;
    border-color: var(--crimson);
    border-radius: var(--radius);
}
.btn-nav:hover {
    background: var(--crimson-dark);
    border-color: var(--crimson-dark);
    color: #fff;
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    background: rgba(30,27,22,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background 0.3s, box-shadow 0.3s;
}

.navbar.scrolled {
    background: rgba(30,27,22,0.97);
    box-shadow: var(--shadow-md);
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
}
.nav-brand:hover { color: #fff; }

.brand-logo {
    height: 44px;
    width: auto;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand-church {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
}

.brand-troop {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.04em;
    line-height: 1.1;
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 8px;
}

.nav-links li a {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.8);
    padding: 8px 16px;
    border-radius: var(--radius);
    transition: color 0.2s, background 0.2s;
}
.nav-links li a:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}


.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.nav-toggle span {
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
}

.nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--gray-900);
    background-image: url('img/tl-hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
    text-align: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(160deg, rgba(45,94,42,0.55) 0%, rgba(62,46,24,0.60) 50%, rgba(30,27,22,0.70) 100%),
        radial-gradient(ellipse at 30% 80%, rgba(186,38,45,0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 20%, rgba(135,98,55,0.12) 0%, transparent 50%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 120px 24px 80px;
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.75);
    margin-bottom: 20px;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.hero-description {
    font-size: 1.15rem;
    line-height: 1.7;
    max-width: 560px;
    margin: 0 auto 40px;
    color: rgba(255,255,255,0.85);
}

/* Hero verse was previously here. The Psalm 139 brand-origin story now lives
 * only on the dashboard (a rotating verse banner under the nav — see
 * dashboard/dash-menu.js + dashboard/dash.css). The public marketing pages
 * stay focused on prospective members; current members get the scripture
 * beat once they sign in. */

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}
.hero-scroll a {
    color: rgba(255,255,255,0.5);
    transition: color 0.2s;
    animation: bounce 2s infinite;
}
.hero-scroll a:hover { color: rgba(255,255,255,0.9); }

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
}

/* --- Sections --- */
.section {
    padding: var(--section-padding) 0;
}

.section-alt {
    background: var(--cream);
}

.section-dark {
    background: var(--brown-dark);
    color: #fff;
}

/* Section background rhythm
 *
 * Default class assignments alternate white / cream cleanly when the page
 * is in its "shipped" public state. Two conditional sections in the middle
 * (#upcoming-events, shown only when there are upcoming events; #announcements,
 * content-conditional) can land between Events and FAQ and break that rhythm
 * depending on whether events / announcements exist. These overrides re-balance:
 *
 *   - No upcoming, no announcements:   flip FAQ to white  (Events cream → FAQ white)
 *   - Upcoming, no announcements:      default works      (Events cream → Upcoming white → FAQ cream)
 *   - Upcoming, with announcements:    flip Announcements cream + FAQ white
 *                                      (Events cream → Upcoming white → Ann. cream → FAQ white)
 *   - No upcoming, with announcements: default works      (Events cream → Ann. white → FAQ cream)
 *
 * has-announcements / has-upcoming are added to <body> by the respective
 * loaders in index.html once they reveal their sections.
 */
body:not(.has-announcements):not(.has-upcoming) #faq {
    background: #fff;
}
body.has-upcoming.has-announcements #announcements {
    background: var(--cream);
}
body.has-upcoming.has-announcements #faq {
    background: #fff;
}

/* Announcements visibility — hidden by default, revealed once the loader in
 * index.html confirms there's content to show and adds body.has-announcements.
 * Replaces the older inline style="display:none" + JS-set display='' pattern;
 * keeps presentation in CSS and removes a fragile path where a JS error before
 * the reveal line would have left the section invisible despite content. */
#announcements { display: none; }
body.has-announcements #announcements { display: block; }
.section-dark .section-lead {
    color: rgba(255,255,255,0.8);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 16px;
}

.section-dark .section-header h2 {
    color: var(--tl-tan);
}

.section-lead {
    font-size: 1.1rem;
    color: var(--gray-700);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.7;
}

.small-caps {
    font-variant: small-caps;
    font-style: normal;
    letter-spacing: 0.05em;
}

.sc {
    font-size: 0.7em;
    letter-spacing: 0.05em;
}

/* --- About Section --- */
.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 60px;
}

.about-card {
    text-align: center;
    padding: 40px 28px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s, box-shadow 0.25s;
}
.about-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.about-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    color: var(--tl-blue);
}
.about-icon svg {
    width: 100%;
    height: 100%;
}

.about-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 12px;
    color: var(--brown-dark);
}

.about-card p {
    font-size: 0.95rem;
    color: var(--gray-700);
    line-height: 1.7;
}

.oath-block {
    max-width: 700px;
    margin: 0 auto;
}

.oath-block blockquote {
    text-align: center;
    padding: 40px;
    background: var(--brown-dark);
    border-radius: var(--radius-lg);
    color: #fff;
}

.oath-block blockquote p {
    font-size: 1.15rem;
    font-style: italic;
    line-height: 1.8;
    margin-bottom: 16px;
    color: rgba(255,255,255,0.9);
}

.oath-block cite {
    font-family: var(--font-heading);
    font-style: normal;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--sand);
}

/* --- Program Section --- */
.program-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 60px;
}

.program-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--gray-200);
    transition: transform 0.25s, box-shadow 0.25s;
}
.program-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.program-woodlands { border-top-color: var(--green-pine); }
.program-navigators { border-top-color: var(--clay); }
.program-adventurers { border-top-color: var(--crimson); }

.program-badge {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 50px;
    margin-bottom: 16px;
}
.program-woodlands .program-badge {
    background: rgba(58,125,55,0.1);
    color: var(--green-forest);
}
.program-navigators .program-badge {
    background: rgba(135,98,55,0.12);
    color: var(--clay);
}
.program-adventurers .program-badge {
    background: rgba(186,38,45,0.1);
    color: var(--crimson);
}

.program-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 8px;
    color: var(--brown-dark);
}

.program-groups {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-500);
    margin-bottom: 16px;
    letter-spacing: 0.02em;
}

.program-card > p:not(.program-groups) {
    font-size: 0.95rem;
    color: var(--gray-700);
    line-height: 1.7;
    margin-bottom: 20px;
}

.program-highlights {
    list-style: none;
    padding: 0;
}

.program-highlights li {
    position: relative;
    padding-left: 20px;
    font-size: 0.9rem;
    color: var(--gray-700);
    margin-bottom: 8px;
    line-height: 1.5;
}

.program-highlights li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray-200);
}

.program-woodlands .program-highlights li::before { background: var(--green-pine); }
.program-navigators .program-highlights li::before { background: var(--clay); }
.program-adventurers .program-highlights li::before { background: var(--crimson); }

/* --- Branches Block --- */
.branches-block {
    text-align: center;
    padding: 48px 32px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.branches-block h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--brown-dark);
    margin-bottom: 28px;
}

.branches-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.branch-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--cream);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--brown-dark);
}

.branch-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: var(--tl-blue);
    flex-shrink: 0;
}
.branch-icon svg {
    width: 100%;
    height: 100%;
}

/* --- Meetings Section --- */
.meetings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.meeting-card {
    text-align: center;
    padding: 40px 28px;
    background: var(--cream);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.meeting-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    color: var(--tl-blue);
}
.meeting-icon svg { width: 100%; height: 100%; }

.meeting-card h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--brown-dark);
    margin-bottom: 12px;
}

.meeting-detail {
    font-weight: 700;
    font-size: 1rem;
    color: var(--brown-dark);
    margin-bottom: 8px;
}

.meeting-card p {
    font-size: 0.95rem;
    color: var(--gray-700);
    line-height: 1.6;
}

.meeting-link {
    display: inline-block;
    margin-top: 12px;
    font-weight: 600;
    font-size: 0.9rem;
}

.meeting-phone {
    font-weight: 600;
    color: var(--brown-dark) !important;
    margin-top: 8px;
}

/* --- FAQ Section --- */
.faq-list {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--gray-200);
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--brown-dark);
    cursor: pointer;
    list-style: none;
    transition: color 0.2s;
}

.faq-item summary::-webkit-details-marker { display: none; }

/* --- FAQ pictures: small by default, tap to enlarge --- */
.faq-figs {
    display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end;
    margin: 18px 0 6px; padding: 0;
}
.faq-fig {
    border: 1px solid var(--gray-200, #DDD5C6); background: var(--white, #fff);
    border-radius: 10px; padding: 8px 10px 6px; cursor: zoom-in; font: inherit;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.faq-fig:hover { box-shadow: 0 4px 14px rgba(30,27,22,0.14); transform: translateY(-1px); }
.faq-fig img { height: 96px; width: auto; display: block; }
.faq-fig span {
    font-family: 'Oswald', sans-serif; font-size: 0.7rem; font-weight: 600;
    letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray-500, #8C8578);
}
.faq-figs figcaption {
    flex-basis: 100%; font-size: 0.8rem; color: var(--gray-500, #8C8578); font-style: italic;
}
.faq-light {
    position: fixed; inset: 0; z-index: 900; background: rgba(20,17,12,0.92);
    display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out;
}
.faq-light figure { margin: 0; text-align: center; max-width: 100%; max-height: 100%; }
.faq-light img { max-width: 100%; max-height: 78vh; display: block; margin: 0 auto; }
.faq-light figcaption {
    color: #F0EDE6; font-family: 'Oswald', sans-serif; font-size: 1rem;
    letter-spacing: 0.06em; text-transform: uppercase; margin-top: 14px;
}
.faq-light-x {
    position: absolute; top: max(14px, env(safe-area-inset-top)); right: 16px;
    width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer;
    background: rgba(255,255,255,0.14); color: #fff; font-size: 1.6rem; line-height: 1;
}

/* --- Per-question share link (quiet until hovered) --- */
.faq-item summary { position: relative; }
.faq-share {
    display: inline-flex; align-items: center; gap: 5px; vertical-align: middle;
    /* summary is a space-between flex row (title … arrow) — push the share
       control over to sit beside the arrow instead of floating mid-row. */
    margin-left: auto; margin-right: 14px;
    padding: 3px 7px; border: 0; border-radius: 14px; cursor: pointer;
    background: none; color: var(--gray-500, #8C8578); opacity: 0.45;
    transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.faq-share svg { width: 14px; height: 14px; }
.faq-share span { font-size: 0.72rem; font-weight: 600; }
.faq-item summary:hover .faq-share, .faq-share:focus-visible { opacity: 1; color: var(--tl-blue, #004B87); }
.faq-share.is-copied { opacity: 1; color: var(--green-pine, #2D5E2A); background: rgba(45,94,42,0.10); }
@media (max-width: 640px) {
    .faq-share { opacity: 0.75; }
    .faq-fig img { height: 76px; }
}

.faq-item summary::after {
    content: '+';
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--gray-500);
    transition: transform 0.3s;
    flex-shrink: 0;
    margin-left: 16px;
}

.faq-item[open] summary::after {
    content: '\2212';
}

.faq-item summary:hover {
    color: var(--crimson);
}

.faq-item p {
    padding: 0 0 20px;
    font-size: 0.95rem;
    color: var(--gray-700);
    line-height: 1.7;
}
.faq-item ul {
    padding: 0 0 16px 24px;
    font-size: 0.95rem;
    color: var(--gray-700);
    line-height: 1.7;
    list-style-position: inside;
}
.faq-item ul + p {
    padding-top: 8px;
}
.faq-item li {
    margin-bottom: 8px;
}
.faq-item blockquote.faq-oath {
    margin: 0 0 20px;
    padding: 16px 22px;
    border-left: 4px solid var(--brown-dark);
    background: rgba(0,0,0,0.03);
    border-radius: 8px;
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--gray-700);
}

/* --- Leadership Block (inside Program) --- */
.leadership-block {
    margin-top: 48px;
    text-align: center;
    padding: 48px 32px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.leadership-block h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--brown-dark);
    margin-bottom: 8px;
}
.leadership-lead {
    font-size: 0.95rem;
    color: var(--gray-500);
    margin-bottom: 32px;
}
.leadership-cta {
    margin-top: 40px;
    padding: 32px 28px;
    background: #f7f5ee;
    border-left: 4px solid #b0332d;
    border-radius: 6px;
    text-align: left;
}
.leadership-cta h4 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: #b0332d;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 10px;
}
.leadership-cta p {
    color: #444;
    line-height: 1.55;
    margin: 0 0 18px;
    max-width: 720px;
}
@media (min-width: 600px) {
    .leadership-cta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 24px;
        flex-wrap: wrap;
    }
    .leadership-cta-text { flex: 1; min-width: 300px; }
    .leadership-cta .btn { flex-shrink: 0; }
}

/* --- Donations CTA (public) ---
   The "Donate" nav link, the homepage "Support Grace Trail Life" band (#give),
   and the footer link.

   The homepage band sits between Meetings (white) and "What to Expect" (cream).
   Cream section background pairs cleanly against Meetings' white; the inner
   leadership-cta card flips to white so it still reads as a distinct featured
   card on the cream section background (rather than blending into it). */
section.donate-cta { background: var(--cream); }
section.donate-cta .leadership-cta { background: #fff; }

/* --- Calendar CTA (public) --- Nav + footer links to /calendar. */

/* --- Leadership Grid --- */
.leadership-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 32px;
    text-align: center;
}
.leader-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    grid-column: span 2;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}
.leader-photo {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 20px;
    background: var(--gray-100);
    border: 4px solid var(--gray-200);
    transition: border-color 0.3s, transform 0.3s;
}
.leader-card:hover .leader-photo {
    border-color: var(--tl-blue);
    transform: scale(1.03);
}
.leader-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.leader-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-200);
}
.leader-photo-placeholder svg {
    width: 64px;
    height: 64px;
}
.leader-name {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brown-dark);
    margin-bottom: 4px;
}
.leader-role {
    font-size: 0.85rem;
    color: var(--gray-500);
    line-height: 1.4;
}

@media (max-width: 900px) {
    .leadership-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }
    .leader-card { grid-column: auto; }
}
@media (max-width: 500px) {
    .leadership-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    .leader-card { grid-column: auto; }
    .leader-photo {
        width: 120px;
        height: 120px;
    }
}

/* --- Contact Section --- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.contact-card {
    display: block;
    text-align: center;
    padding: 40px 28px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-lg);
    color: #fff;
    transition: background 0.25s, transform 0.25s;
}
.contact-card:hover {
    background: rgba(255,255,255,0.10);
    transform: translateY(-4px);
    color: #fff;
}

.contact-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    color: var(--sand);
}
.contact-icon svg { width: 100%; height: 100%; }

.contact-card h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 12px;
    color: var(--tl-tan);
}

.contact-card p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
}

.contact-cta {
    text-align: center;
    padding: 28px 32px;
    background: rgba(255,255,255,0.06);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.08);
}

.contact-cta p {
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
}

.contact-cta strong {
    color: var(--sand);
}

/* --- Join CTA --- */
.join-cta {
    background: linear-gradient(135deg, #004B87 0%, #2D5E2A 100%);
    padding: 80px 0;
}

/* --- Footer --- */
.footer {
    background: var(--gray-900);
    color: rgba(255,255,255,0.6);
    padding: 48px 0 32px;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-troop {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.04em;
}

.footer-org {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
}

.footer-church {
    margin-top: 8px;
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--tl-blue); }

.footer-social {
    display: flex;
    gap: 16px;
    align-items: center;
}
.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: rgba(255,255,255,0.5);
    transition: color 0.2s;
}
.footer-social a:hover {
    color: #fff;
}
.footer-social svg {
    width: 22px;
    height: 22px;
}

.footer-login-btn {
    display: inline-block;
    padding: 8px 20px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff !important;
    background: var(--crimson);
    border: 2px solid var(--crimson);
    border-radius: var(--radius);
    transition: background 0.2s, border-color 0.2s;
}
.footer-login-btn:hover {
    background: var(--crimson-dark);
    border-color: var(--crimson-dark);
    color: #fff !important;
}

.footer-bottom {
    text-align: center;
}
.footer-bottom p {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.3);
}

/* --- Events Section --- */
.events-timeline {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 800px;
    margin: 0 auto 60px;
}

.event-card {
    display: flex;
    align-items: stretch;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
}
.event-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    width: 80px;
    background: var(--brown-dark);
    color: #fff;
    padding: 12px 8px;
    font-family: var(--font-heading);
    text-transform: uppercase;
    line-height: 1.2;
}

/* Event type color coding */
.event-trail .event-date { background: var(--green-forest); }
.event-meeting .event-date { background: var(--tl-blue); }
.event-campout .event-date { background: var(--clay); }
.event-service .event-date { background: var(--crimson); }

.event-type-tag {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 50px;
    margin-bottom: 6px;
}
.event-trail .event-type-tag {
    background: rgba(45,94,42,0.1);
    color: var(--green-forest);
}
.event-meeting .event-type-tag {
    background: rgba(0,75,135,0.1);
    color: var(--tl-blue);
}
.event-campout .event-type-tag {
    background: rgba(135,98,55,0.12);
    color: var(--clay);
}
.event-service .event-type-tag {
    background: rgba(186,38,45,0.1);
    color: var(--crimson);
}

.event-date .month {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.8);
}
.event-date .day {
    font-size: 1.75rem;
    font-weight: 700;
}
.event-date .year {
    font-size: 0.7rem;
    font-weight: 400;
    color: rgba(255,255,255,0.6);
}

.event-details {
    flex: 1;
    padding: 24px 28px;
}
.event-details h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--brown-dark);
    margin-bottom: 8px;
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.9rem;
    color: var(--gray-700);
}
.event-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}
.event-meta svg {
    width: 16px;
    height: 16px;
    color: var(--tl-blue);
    flex-shrink: 0;
}

.event-more-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 0;
    background: none;
    border: none;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--tl-blue);
    cursor: pointer;
    transition: color 0.2s;
}
.event-more-toggle:hover {
    color: var(--crimson);
}
.event-more-toggle svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s;
}
.event-more-toggle.open svg {
    transform: rotate(180deg);
}

.event-more {
    display: none;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--gray-200);
    font-size: 0.9rem;
    color: var(--gray-700);
    line-height: 1.7;
}
.event-more.open {
    display: block;
}
.event-more p {
    margin-bottom: 10px;
}
.event-more p:last-child {
    margin-bottom: 0;
}
.event-more strong {
    color: var(--brown-dark);
}

.events-recurring {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 40px 36px;
    max-width: 800px;
    margin: 0 auto;
}
.events-recurring h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--brown-dark);
    margin-bottom: 28px;
    text-align: center;
}

.recurring-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}
.recurring-lead {
    text-align: center;
    color: var(--gray-700);
    margin-bottom: 24px;
}

.recurring-item {
    text-align: center;
}
.recurring-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    color: var(--tl-blue);
}
.recurring-icon svg {
    width: 100%;
    height: 100%;
}
.recurring-item h4 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--brown-dark);
    margin-bottom: 6px;
}
.recurring-item p {
    font-size: 0.85rem;
    color: var(--gray-700);
    line-height: 1.6;
}

/* --- Contact Form --- */
.contact-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 32px;
    margin-bottom: 48px;
}

.contact-form-wrap {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
}
.contact-form-wrap h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--tl-tan);
    margin-bottom: 24px;
}

.interest-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.label-optional {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    opacity: 0.5;
    font-size: 0.7rem;
}
.contact-form-message {
    margin-top: 8px;
    font-size: 0.9rem;
    border-radius: var(--radius);
    padding: 0;
}
.contact-form-message:empty {
    display: none;
}
.contact-form-message.success {
    display: block;
    padding: 12px 16px;
    background: rgba(45,94,42,0.2);
    color: #8BC34A;
    border: 1px solid rgba(45,94,42,0.3);
}
.contact-form-message.error {
    display: block;
    padding: 12px 16px;
    background: rgba(186,39,44,0.2);
    color: #ef9a9a;
    border: 1px solid rgba(186,39,44,0.3);
}
/* Hide reCAPTCHA badge */
.grecaptcha-badge {
    visibility: hidden !important;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-group label {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tl-tan);
}
.form-group input,
.form-group textarea {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: #fff;
    transition: border-color 0.2s, background 0.2s;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255,255,255,0.35);
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--sand);
    background: rgba(255,255,255,0.12);
}
.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.contact-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    :root {
        --section-padding: 72px;
    }

    .about-grid,
    .program-grid,
    .meetings-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }

    .program-grid {
        max-width: 520px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .recurring-grid {
        grid-template-columns: 1fr;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }

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

    .footer-grid {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    .footer-social {
        justify-content: center;
    }
}

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

    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(30,27,22,0.97);
        padding: 24px;
        gap: 4px;
        transform: translateY(-120%);
        opacity: 0;
        transition: transform 0.35s ease, opacity 0.3s ease;
        pointer-events: none;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-links li a {
        display: block;
        padding: 12px 16px;
        font-size: 1rem;
    }

    .btn-nav {
        text-align: center;
        margin-top: 8px;
    }

    .hero h1 {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }

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

    .about-grid { margin-bottom: 40px; }

    .event-card {
        flex-direction: column;
    }

    .event-date {
        flex-direction: row;
        width: 100%;
        min-width: unset;
        padding: 10px 20px;
        gap: 8px;
        border-radius: 0;
    }
    .event-date .month { font-size: 0.8rem; }
    .event-date .day { font-size: 1.1rem; }
    .event-date .year { font-size: 0.75rem; }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }

    .branches-grid {
        gap: 10px;
    }

    .branch-item {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
}

/* --- Homepage event popup --- */
body.tl-popup-open { overflow: hidden; }
.tl-popup-overlay {
    position: fixed; inset: 0;
    background: rgba(30, 27, 22, 0.7);
    z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    animation: tlPopupFade 0.25s ease;
}
@keyframes tlPopupFade { from { opacity: 0; } to { opacity: 1; } }
.tl-popup {
    background: #fff;
    border-radius: 14px;
    max-width: 540px;
    width: 100%;
    max-height: 92vh;
    overflow: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    animation: tlPopupSlide 0.3s ease;
}
@keyframes tlPopupSlide { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.tl-popup-close {
    position: absolute; top: 12px; right: 14px;
    background: rgba(255,255,255,0.92);
    border: none;
    width: 32px; height: 32px;
    border-radius: 50%;
    font-size: 1.4rem; line-height: 1;
    color: #1E1B16;
    cursor: pointer;
    z-index: 2;
    transition: background 0.2s;
}
.tl-popup-close:hover { background: #fff; }
.tl-popup-image {
    display: block;
    width: 100%;
    max-height: 240px;
    object-fit: cover;
    border-radius: 14px 14px 0 0;
}
.tl-popup-body { padding: 28px 32px 32px; }
.tl-popup-date {
    font-family: 'Oswald', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #BA272C;
    font-weight: 600;
    margin-bottom: 6px;
}
.tl-popup-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #3E2E18;
    margin: 0 0 8px;
    line-height: 1.2;
}
.tl-popup-meta {
    font-size: 0.9rem;
    color: #4A453D;
    margin-bottom: 14px;
}
.tl-popup-desc {
    font-size: 0.92rem;
    color: #4A453D;
    line-height: 1.6;
    margin-bottom: 20px;
}
.tl-popup-desc.rich-text p { margin: 0 0 10px; }
.tl-popup-desc.rich-text p:last-child { margin-bottom: 0; }
.tl-popup-desc.rich-text a { color: #004B87; text-decoration: underline; }
.tl-popup-desc.rich-text ul, .tl-popup-desc.rich-text ol { margin: 0 0 10px 20px; }
.tl-popup-desc.rich-text img { max-width: 100%; height: auto; border-radius: 6px; margin: 8px 0; }
.tl-popup-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.tl-popup-actions .btn { flex: 1; min-width: 140px; text-align: center; }
/* .btn-outline is built for dark hero sections (white text on transparent),
   so inside the popup's white card it rendered as an invisible button. Give
   it ink and a visible edge here. */
.tl-popup-actions .btn-outline {
    background: transparent;
    color: var(--tl-blue, #004B87);
    border-color: var(--tl-blue, #004B87);
}
.tl-popup-actions .btn-outline:hover {
    background: rgba(0, 75, 135, 0.08);
    border-color: var(--tl-blue, #004B87);
    color: var(--tl-blue, #004B87);
}
@media (max-width: 480px) {
    .tl-popup-body { padding: 20px 22px 24px; }
    .tl-popup-title { font-size: 1.35rem; }
}

/* --- Persistent event banner (shown after popup is closed) --- */
/* --tl-banner-h is set by JS to the banner's real height so the navbar sits
   flush against it with no white gap (the banner height varies with text
   wrapping + device, so a hardcoded constant always mismatched). */
body.tl-banner-open { padding-top: var(--tl-banner-h, 56px); }
.tl-banner {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1001;
    display: flex;
    align-items: stretch;
    background: linear-gradient(90deg, #004B87 0%, #2D5E2A 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    animation: tlBannerSlide 0.3s ease;
}
@keyframes tlBannerSlide { from { transform: translateY(-100%); } to { transform: translateY(0); } }
.tl-banner-main {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    text-align: left;
    font: inherit;
    flex-wrap: wrap;
}
.tl-banner-main:hover { background: rgba(255,255,255,0.06); }
.tl-banner-label {
    font-family: 'Oswald', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(255,255,255,0.18);
    padding: 3px 8px;
    border-radius: 10px;
}
.tl-banner-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}
.tl-banner-date {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.88);
    font-weight: 600;
}
.tl-banner-loc {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.72);
}
.tl-banner-cta {
    margin-left: auto;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.tl-banner-close {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.75);
    font-size: 1.4rem;
    line-height: 1;
    padding: 0 18px;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}
.tl-banner-close:hover { color: #fff; background: rgba(0,0,0,0.15); }

@media (max-width: 640px) {
    .tl-banner-main { padding: 10px 14px; gap: 8px; font-size: 0.85rem; }
    .tl-banner-cta { display: none; }
    body.tl-banner-open { padding-top: var(--tl-banner-h, 64px); }
}

/* Nav bar adjustment when banner is shown — flush against the banner. */
body.tl-banner-open .navbar { top: var(--tl-banner-h, 56px); }
@media (max-width: 640px) {
    body.tl-banner-open .navbar { top: var(--tl-banner-h, 64px); }
}

/* Public homepage announcements grid */
.announcements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
    margin-top: 24px;
}
.ann-pub-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(30,27,22,0.06);
    border: 1px solid #DDD8CE;
    display: flex;
    flex-direction: column;
    transition: transform 0.15s, box-shadow 0.15s;
}
.ann-pub-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(30,27,22,0.12);
}
.ann-pub-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-color: #F0EDE6;
}
.ann-pub-card.no-image .ann-pub-image { display: none; }
.ann-pub-body {
    padding: 18px 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.ann-pub-date {
    font-family: 'Oswald', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: #8C8578;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
/* Draft announcements — only ever rendered for admins (see index.html) */
.ann-pub-card.is-draft {
    border-color: #E0B3AE;
    background: #FCF7F6;
}
.ann-pub-draft {
    display: inline-block;
    background: #b0332d;
    color: #fff;
    font-family: 'Oswald', sans-serif;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 1px 6px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: 1px;
}
.ann-pub-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #3E2E18;
    line-height: 1.25;
    margin: 0;
}
.ann-pub-excerpt {
    color: #4A453D;
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}


/* === Admin-only homepage blocks (revealed by body.tl-admin -- see index.html) === */
section.admin-only { display: none; }
body.tl-admin section.admin-only { display: block; }
.admin-only-tag {
    display: inline-block;
    margin-left: 6px;
    font-size: 0.78rem;
    font-style: italic;
    color: #B0332D;
}

/* Admin-preview banner: a small pill placed above a section heading so the
 * admin testing the page sees at a glance which sections will disappear at
 * public launch. Used on #upcoming-events and the #give donate band.
 * Skipped on #announcements since that section is content-conditional (it
 * shows for everyone when there are public announcements); per-item
 * <span class="ann-pub-draft">Draft</span> tags handle the admin-only
 * draft case there. */
.admin-preview-banner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--brown-dark);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 6px 12px;
    border-radius: 4px;
    margin-bottom: 14px;
}
.admin-preview-banner::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d4a13b;
    box-shadow: 0 0 0 3px rgba(212, 161, 59, 0.25);
}
/* Inside the dark contact section the banner stays the same; inside the
 * lighter donate band we want it tight to the leadership-cta block. */
.donate-cta .admin-preview-banner { margin-bottom: 18px; }

/* Upcoming Events list (homepage; admin preview for now) */
.ue-grid { display: flex; flex-direction: column; gap: 14px; max-width: 760px; margin: 0 auto; }
.ue-card {
    display: flex;
    align-items: stretch;
    background: #fff;
    border: 1px solid #DDD8CE;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(30,27,22,0.06);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
}
.ue-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(30,27,22,0.12); }
.ue-card .event-date { min-width: 78px; width: 78px; }
.ue-body { padding: 14px 18px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.ue-title { font-family: 'Oswald', sans-serif; font-size: 1.1rem; font-weight: 700; color: #3E2E18; line-height: 1.25; }
.ue-meta { font-size: 0.85rem; color: #8C8578; }
.ue-cancelled {
    display: inline-block;
    background: #b0332d;
    color: #fff;
    font-family: 'Oswald', sans-serif;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 1px 6px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: 2px;
}
.ue-empty { text-align: center; color: #8C8578; font-size: 0.95rem; padding: 8px 0; }
@media (max-width: 480px) {
    .ue-card { flex-direction: column; }
    .ue-card .event-date { flex-direction: row; width: 100%; min-width: unset; padding: 8px 16px; gap: 8px; justify-content: flex-start; }
}
