/* =========================================================
   20. SITE REDESIGN LAYER
   Shared components used across every page.
   ========================================================= */

button, input, select, textarea { font-family: var(--font-body); }

.skip-link {
    position: absolute; left: 16px; top: -64px; z-index: 2000;
    padding: 10px 18px; font-weight: 700; text-decoration: none;
    color: var(--forest-deep); background: var(--champagne);
    border-radius: var(--radius-sm); transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; color: var(--forest-deep); }

/* --- Page title band --- */
.page-hero {
    position: relative; overflow: hidden; text-align: center;
    padding: clamp(56px, 8vw, 96px) 24px clamp(44px, 6vw, 72px);
    background: var(--cream-deep); border-bottom: 1px solid var(--border);
}
.page-hero::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(circle at 15% 20%, rgba(168, 181, 160, 0.45) 0%, transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(198, 169, 107, 0.28) 0%, transparent 45%);
}
.page-hero > * { position: relative; }
.page-hero h1 { max-width: 20ch; margin: 0 auto; font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 600; letter-spacing: -0.02em; }
.page-hero h1::after { content: ''; display: block; width: 48px; height: 2px; margin: 20px auto 0; background: var(--champagne); }
.page-hero p { max-width: 56ch; margin: 20px auto 0; font-size: 1.15rem; color: var(--text-muted); }
.page-hero + .container { padding-top: clamp(40px, 5vw, 64px); }

/* --- Closing band (home) --- */
.band { padding: clamp(56px, 8vw, 96px) 24px; text-align: center; color: var(--cream); background: var(--forest-light); border-top: 1px solid rgba(198, 169, 107, 0.5); }
.band h2 { max-width: 22ch; margin: 0 auto 14px; color: var(--cream); }
.band p { max-width: 52ch; margin: 0 auto 28px; color: rgba(250, 245, 233, 0.85); }
.band-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.band .btn-outline { color: var(--cream) !important; border-color: rgba(250, 245, 233, 0.6); }
.band .btn-outline:hover { color: var(--forest-deep) !important; background: var(--champagne) !important; border-color: var(--champagne); }
.home-faq-section {
    max-width: none;
    margin: 0;
    padding: clamp(56px, 8vw, 96px) 24px;
    background: var(--cream);
    border-top: 1px solid var(--border);
}
.home-faq-section > .section-title,
.home-faq-section > .faq-list { max-width: 920px; margin-right: auto; margin-left: auto; }

/* --- Footer --- */
.site-footer { padding: 56px 24px 28px; text-align: left; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px 64px; max-width: var(--content-width); margin: 0 auto; }
.footer-logo { font-size: 28px; font-weight: 600; text-decoration: none; color: var(--cream); }
.footer-brand p { max-width: 36ch; margin-top: 10px; color: rgba(250, 245, 233, 0.75); }
.footer-links { display: grid; grid-template-columns: repeat(2, auto); gap: 10px 44px; align-content: start; }
.footer-links a { font-size: 15px; text-decoration: none; color: rgba(250, 245, 233, 0.88); }
.footer-links a:hover { color: var(--champagne); }
.footer-legal { max-width: var(--content-width); margin: 40px auto 0; padding-top: 20px; border-top: 1px solid rgba(198, 169, 107, 0.3); font-size: 13px; text-align: center; color: rgba(250, 245, 233, 0.65); }

/* --- Forms --- */
.form-card {
    max-width: 620px; padding: clamp(24px, 4vw, 40px);
    background-color: var(--surface) !important;
    border: 1px solid var(--border); border-top: 2px solid var(--champagne);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}
.form-group label, .admin-form label { display: block; margin-bottom: 6px; }
.admin-form { display: flex; flex-direction: column; gap: 14px; max-width: none; margin: 0; }

/* --- Get involved cards --- */
.card-stack { display: flex; flex-direction: column; justify-content: space-between; padding: 36px 30px; }
.check-list { list-style: none; margin: 0 0 24px; font-size: 0.98rem; }
.check-list li { position: relative; margin-bottom: 10px; padding-left: 28px; }
.check-list li::before {
    content: ''; position: absolute; left: 0; top: 0.35em; width: 16px; height: 16px;
    border: 1px solid var(--champagne); border-radius: 50%;
    background: var(--champagne-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.2 2.2 4.8-4.8' fill='none' stroke='%23243D32' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* --- About: story and team --- */
.story { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr); gap: clamp(32px, 6vw, 80px); margin-bottom: 72px; }
.story-aside { position: sticky; top: calc(var(--header-height) + 32px); align-self: start; }
.story-aside h2 { margin-bottom: 20px; }
.story-aside blockquote { padding-left: 20px; border-left: 2px solid var(--champagne); font-size: 1.2rem; font-style: italic; line-height: 1.5; color: var(--forest); }
.story-body p { margin-bottom: 1.3em; font-size: 1.0625rem; line-height: 1.85; }

.team-list { display: grid; gap: 28px; }
.team-card { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(24px, 4vw, 48px); padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.team-card:nth-child(even) { flex-direction: row-reverse; }
.team-photo { flex: 0 0 auto; width: min(100%, 260px); height: 260px; object-fit: cover; border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); }
.team-photo--blank { display: flex; align-items: center; justify-content: center; font-size: 4.5rem; font-weight: 600; color: var(--forest-deep); background: linear-gradient(135deg, var(--eucalyptus), var(--champagne)); }
.team-body { flex: 1 1 280px; min-width: 0; }
.team-body h3 { margin-bottom: 4px; }
.team-role { margin-bottom: 12px; font-size: 1rem; font-style: italic; color: var(--forest); }
.team-body p:last-child { margin-bottom: 0; }

/* --- Blog and gallery (admin upload box, article rows, photo grid) --- */
#adminUploadSection { display: none; max-width: 640px; margin: 0 auto 48px; padding: 28px; background: var(--eucalyptus-tint); border: 1px solid rgba(168, 181, 160, 0.7); border-radius: var(--radius-md); }
#adminUploadSection h3 { margin-bottom: 16px; font-size: 1.25rem; }
#adminUploadSection form { max-width: none; margin: 0; gap: 14px; }
#adminUploadSection label { display: block; margin-bottom: 6px; }
#uploadStatus { border-radius: var(--radius-sm); font-weight: 700; }

.blog-container { display: flex; flex-direction: column; gap: 28px; max-width: 920px; margin: 0 auto; }
.blog-row { display: flex; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-top: 2px solid var(--champagne); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.blog-image-wrapper { flex: 0 0 38%; min-height: 240px; }
.blog-image-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.blog-text-wrapper { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 28px 32px; }
.blog-text-wrapper h4 { margin-bottom: 6px; font-size: 1.5rem; line-height: 1.2; }
.blog-date { margin-bottom: 14px; font-size: 0.9rem; font-style: italic; color: var(--forest); }
.blog-text-wrapper p { margin-bottom: 16px; white-space: pre-line; }

.gallery-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.gallery-row { display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease); }
.gallery-row:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.gallery-image-wrapper { aspect-ratio: 4 / 3; overflow: hidden; }
.gallery-image-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.gallery-row:hover .gallery-image-wrapper img { transform: scale(1.04); }
.gallery-text-wrapper { padding: 16px 18px 18px; }
.gallery-text-wrapper h4 { margin-bottom: 0; font-size: 1.05rem; }
.gallery-text-wrapper p { display: none; }

.delete-blog-btn, .delete-photo-btn {
    width: fit-content; padding: 8px 18px; font-size: 13px; font-weight: 700; cursor: pointer;
    color: #8A2E2E; background: #FBEDEA; border: 1px solid #D9A39B; border-radius: var(--radius-pill);
    transition: background-color 0.25s ease, color 0.25s ease;
}
.delete-blog-btn:hover, .delete-photo-btn:hover { color: #fff; background: #A63D3D; }

.deleted-content-section {
    max-width: 920px;
    margin: 0 auto 36px;
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-left: 4px solid var(--forest);
    border-radius: var(--radius-md);
}
.deleted-content-section h2 { margin-bottom: 6px; font-size: 1.35rem; }
.deleted-content-section > p { margin-bottom: 14px; color: var(--text-primary); }
.deleted-content-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid var(--border);
}
.deleted-content-row .btn { flex: 0 0 auto; }
.content-preview-dialog {
    width: min(760px, calc(100vw - 32px));
    max-height: min(85vh, 900px);
    margin: auto;
    padding: clamp(20px, 4vw, 36px);
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: auto;
}
.content-preview-dialog::backdrop { background: rgba(26, 45, 36, 0.72); }
.content-preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.content-preview-heading h2 { margin: 0; font-size: 1.4rem; }
.blog-preview-article img { display: block; width: 100%; max-height: 420px; margin-bottom: 20px; object-fit: cover; border-radius: var(--radius-md); }
.blog-preview-article h3 { margin-bottom: 12px; }
.blog-preview-article > p:last-child { white-space: pre-line; }

@media (max-width: 768px) {
    .story { grid-template-columns: 1fr; }
    .story-aside { position: static; }
    .blog-row { flex-direction: column; }
    .blog-image-wrapper { flex: none; min-height: 0; aspect-ratio: 16 / 10; }
    .blog-text-wrapper { padding: 22px; }
    .content-preview-heading { align-items: flex-start; flex-direction: column; }
    .deleted-content-row { align-items: flex-start; }
    .footer-links { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: no-preference) {
    .page-hero > * { animation: fadeUp 0.8s var(--ease) backwards; }
    .page-hero > :nth-child(2) { animation-delay: 0.15s; }
    .gallery-row, .blog-row, .team-card { animation: fadeUp 0.7s var(--ease) backwards; }
}