/* Top-Center Semi-Transparent Oval Back to Top Button */
#backToTopBtn {
    position: fixed;
    top: 90px; /* Positions it clearly below your fixed header bar */
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999; /* Ensures it sits above all cards and headers */
    display: none; /* Controlled by JavaScript */
    padding: 10px 22px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px; /* Smooth oval pill shape */
    background-color: rgba(27, 67, 50, 0.85); /* Semi-transparent Still Rooted green */
    backdrop-filter: blur(8px); /* Frosted glass effect */
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
    align-items: center;
    gap: 6px;
}

#backToTopBtn span {
    font-size: 16px;
    line-height: 1;
}

#backToTopBtn:hover {
    background-color: rgba(45, 106, 79, 0.95);
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

#backToTopBtn {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex; /* keep it as flex so it can transition properly */
}

#backToTopBtn.show {
    opacity: 1;
    visibility: visible;
}

/* Smooth scrolling across the site */
html {
    scroll-behavior: smooth;
}


/* =========================================================
   19. REFINEMENTS
   Typography, spacing and surface polish layered over the
   rules above. Palette and layout are unchanged.
   ========================================================= */

body { font-size: 1.0625rem; line-height: 1.7; }

h1, h2, h3 { font-weight: 600; letter-spacing: -0.015em; text-wrap: balance; }
h1 { line-height: 1.08; }
h4 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 700; letter-spacing: 0; }
p  { text-wrap: pretty; }
strong { font-weight: 700; }

/* --- Header: slightly translucent forest with a champagne hairline --- */
header {
    background: rgba(36, 61, 50, 0.95) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(198, 169, 107, 0.6) !important;
    box-shadow: 0 10px 28px -16px rgba(26, 45, 36, 0.55);
}
.logo { font-size: 26px; font-weight: 600; }
.nav-link { padding: 10px 12px; font-size: 14.5px; }

/* --- Hero --- */
.hero { padding: clamp(88px, 12vw, 148px) 24px clamp(80px, 10vw, 128px); }
.hero h1 {
    max-width: 14ch;
    font-size: clamp(3rem, 7.5vw, 5.5rem);
    font-weight: 600;
    letter-spacing: -0.025em;
}
.hero p { max-width: 54ch; font-size: 1.2rem; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* --- Sections --- */
.container { padding-block: clamp(48px, 7vw, 88px); }
.section-title { font-weight: 600; letter-spacing: -0.02em; }
.section-title::after { width: 48px; margin-top: 18px; }

/* --- Cards: calmer accent, roomier padding --- */
.card { padding: 32px; border-radius: var(--radius-lg); border-top-width: 2px !important; }
.card:hover { transform: translateY(-2px); }
.card h3 { font-size: clamp(1.25rem, 1vw + 1rem, 1.55rem); }
.card .card-link {
    display: inline-block;
    margin-top: 14px;
    font-weight: 700;
    color: var(--forest) !important;
    text-decoration-color: var(--champagne);
}

/* --- Buttons --- */
.btn { padding: 13px 28px; font-weight: 700; letter-spacing: 0.01em; }
.btn-outline { border-width: 1.5px; }
.btn-ghost {
    display: inline-block;
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--forest);
    background: transparent;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn-ghost:hover { background: var(--champagne-tint); border-color: var(--champagne); }

/* --- Forms --- */
form { max-width: 560px; }
label { font-size: 13.5px; letter-spacing: 0.01em; }
input, textarea, select { padding: 13px 15px; line-height: 1.4; }
textarea { min-height: 120px; resize: vertical; }

/* --- Footer --- */
footer { padding: 40px 24px; font-size: 13.5px; border-top-width: 1px !important; }

/* --- Back-to-top: was a stray green, now on palette --- */
#backToTopBtn {
    font-family: var(--font-body);
    color: var(--cream);
    background-color: rgba(36, 61, 50, 0.92);
    border-color: rgba(198, 169, 107, 0.55);
}
#backToTopBtn:hover { background-color: var(--forest-light); }

/* --- Status banners ---
   main.js sets Bootstrap-style green/red inline. The browser reports
   those inline colours as rgb(), so these selectors retheme them
   without editing the script. */
#authStatus[style*="rgb(212, 237, 218)"],
#formStatus[style*="rgb(212, 237, 218)"] {
    color: var(--forest) !important;
    background-color: var(--eucalyptus-tint) !important;
    border-color: var(--eucalyptus) !important;
}
#authStatus[style*="rgb(248, 215, 218)"],
#formStatus[style*="rgb(248, 215, 218)"] {
    color: #8A2E2E !important;
    background-color: #FBEDEA !important;
    border-color: #D9A39B !important;
}
#formStatus { border-radius: var(--radius-md) !important; font-weight: 700; }

@media (max-width: 768px) {
    body { font-size: 1rem; }
    .card { padding: 24px; }
    .hero h1 { font-size: clamp(2.6rem, 12vw, 3.5rem); }
}

/* --- Loading skeletons --- */
.skeleton {
    display: block;
    background: linear-gradient(90deg, var(--champagne-tint) 25%, var(--surface) 50%, var(--champagne-tint) 75%);
    background-size: 200% 100%;
    border-radius: var(--radius-sm);
}
.skeleton-line { width: 100%; height: 0.9rem; margin-top: 0.8rem; }
.skeleton-line--short { width: 55%; }
.skeleton-title { width: 64%; height: 1.4rem; margin-bottom: 0.8rem; }
.skeleton-circle { width: 72px; height: 72px; border-radius: 50%; }
.skeleton-image { width: 100%; aspect-ratio: 4 / 3; }
.skeleton-card { overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }

.skeleton-team-photo { flex: 0 0 auto; width: min(100%, 260px); height: 260px; aspect-ratio: 1; }
.skeleton-team-body { flex: 1 1 280px; min-width: 0; }
.skeleton-gallery-image { height: 100%; }
.skeleton-blog-image { height: 100%; min-height: 240px; }
.calendar-skeleton-cell { cursor: default !important; pointer-events: none; }
.calendar-skeleton-number { width: 1.75rem; height: 0.9rem; margin-bottom: 12px; }
.calendar-skeleton-event { width: 85%; height: 0.7rem; }
.events-skeleton-card { display: flex; align-items: flex-start; gap: 16px; }
.events-skeleton-date { flex: 0 0 55px; height: 58px; }
.events-skeleton-content { flex: 1; min-width: 0; }
.data-state-message { grid-column: 1 / -1; margin: 0; color: var(--text-muted); text-align: center; }
#blogGrid .data-state-message { width: 100%; }
#calendarDaysGrid > .calendar-skeleton-cell:hover { background: var(--surface) !important; }

.event-calendar-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.event-calendar-actions .btn-ghost { padding: 10px 16px; text-align: center; text-decoration: none; }
.event-calendar-actions[hidden] { display: none !important; }
.event-calendar-actions a[aria-disabled="true"] { pointer-events: none; }
.event-list-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

@media (prefers-reduced-motion: no-preference) {
    .skeleton { animation: skeleton-shimmer 1.5s ease-in-out infinite; }

    @keyframes skeleton-shimmer {
        to { background-position: -200% 0; }
    }
}

/* --- Frequently asked questions --- */
.faq-section { max-width: 920px; margin: clamp(56px, 8vw, 96px) auto 0; scroll-margin-top: calc(var(--header-height) + 24px); }
.faq-section > .section-title { margin-bottom: 28px; text-align: center; }
.faq-list { display: grid; gap: 14px; }
.faq-item { overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--champagne); border-radius: var(--radius-md); }
.faq-item summary { position: relative; padding: 20px 56px 20px 22px; color: var(--forest); font-weight: 700; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { position: absolute; top: 50%; right: 24px; width: 10px; height: 10px; border-right: 2px solid var(--forest); border-bottom: 2px solid var(--forest); content: ''; transform: translateY(-70%) rotate(45deg); }
.faq-item summary:hover { background: var(--champagne-tint); }
.faq-item summary:focus-visible { z-index: 1; outline: 3px solid var(--forest); outline-offset: -4px; }
.faq-answer { padding: 0 22px 20px; color: var(--text-primary); }
.faq-answer p { margin: 0; }
.faq-more-link { margin-top: 20px; text-align: center; }

@media (prefers-reduced-motion: no-preference) {
    .faq-item summary::after { transition: transform 0.2s var(--ease); }
    .faq-item[open] summary::after { transform: translateY(-30%) rotate(225deg); }
    .faq-item[open] .faq-answer { animation: faq-reveal 0.22s var(--ease) both; }

    @keyframes faq-reveal {
        from { opacity: 0; transform: translateY(-4px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

@media (max-width: 640px) {
    .skeleton-team-photo { width: 100%; height: auto; aspect-ratio: 4 / 3; }
    .skeleton-blog-image { min-height: 0; aspect-ratio: 16 / 10; }
    .faq-item summary { padding: 18px 48px 18px 18px; }
    .faq-answer { padding: 0 18px 18px; }
}


