/* ═══════════════════════════════════════════════════════════
   SHAC — Custom styles
   Editorial heritage look: Fraunces serif headings, Inter body,
   image-forward layouts and generous whitespace.
   Inspired by the National Trust — but SHAC's own identity.
   ═══════════════════════════════════════════════════════════ */

/* ── Design tokens ── */
:root {
  /* Heritage palette */
  --shac-green:        #1F5C3D;   /* deep island green */
  --shac-green-dark:   #163F2B;
  --shac-green-light:  #EAF1EB;
  --shac-gold:         #C8A24B;   /* warm accent, craft/heritage */
  --shac-cream:        #FBF9F4;   /* paper / off-white */
  --shac-stone:        #F1EDE5;   /* soft stone */
  --shac-ink:          #20211E;   /* near-black, warm */
  --shac-muted:        #5C5E57;
  --shac-border:       #E2DDD2;

  --font-heading: 'Fraunces', 'Georgia', serif;
  --font-body:    'Inter', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;

  /* Override Bootstrap's font variables so ALL Bootstrap components (buttons,
     cards, forms, tables, navbar, etc.) use Inter, not the system stack —
     keeps typography consistent across every page. */
  --bs-font-sans-serif: 'Inter', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  --bs-body-font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;

  --container-max: 1180px;
}

/* ── Base ── */
body {
  font-family: var(--font-body);
  color: var(--shac-ink);
  background-color: #fff;
  font-size: 1.06rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-optical-sizing: auto;
  letter-spacing: -0.01em;
  line-height: 1.18;
  color: var(--shac-ink);
}

/* ── Body copy: Inter everywhere ─────────────────────────────────────────────
   Some CMS blocks (Mobirise "mbr-*") wrap body text inside heading tags or mark
   it as a thin/grey "lead", which made copy look like different fonts across
   pages. These rules normalise ALL body copy to Inter, weight 400, the same
   size and colour — while real headings stay Fraunces. */
p, li, td, th, dd, dt, blockquote, figcaption, .card-text, label,
input, select, textarea, .form-control, .btn, .nav-link {
  font-family: var(--font-body);
}

/* Body text that CMS blocks place inside a heading tag, or in an mbr wrapper,
   should read as normal body copy (not a heading, not a thin grey lead). */
h1 p, h2 p, h3 p, h4 p, h5 p, h6 p,
.mbr-text, .mbr-text p, .mbr-section-subtitle > p, .mbr-section-title > p {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.06rem;
  line-height: 1.75;
  letter-spacing: normal;
  color: var(--shac-ink);
}

h1, .display-1, .display-2, .display-3 { font-weight: 600; }

p { margin-bottom: 1.1rem; }

a {
  color: var(--shac-green);
  text-decoration: none;
  transition: color .15s ease;
}
a:hover { color: var(--shac-green-dark); text-decoration: underline; }

.lead { font-family: var(--font-body); font-size: 1.15rem; font-weight: 400; line-height: 1.7; color: var(--shac-ink); }

/* Subtle text accent */
.text-shac-green { color: var(--shac-green) !important; }
.text-shac-gold  { color: var(--shac-gold)  !important; }
.bg-shac-green   { background-color: var(--shac-green) !important; }
.bg-shac-cream   { background-color: var(--shac-cream) !important; }
.bg-shac-stone   { background-color: var(--shac-stone) !important; }

/* ── Navbar ── */
.navbar {
  background-color: #fff !important;
  border-bottom: 1px solid var(--shac-border);
  padding: 0.5rem 1.25rem;
  box-shadow: 0 1px 12px rgba(0,0,0,0.04);
}
.navbar-brand .text-uppercase,
.navbar-brand .font-weight-bold {
  font-family: var(--font-heading);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none !important;
  color: var(--shac-green);
  line-height: 1.2;
}
.nav-link {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--shac-ink) !important;
  letter-spacing: 0;
  padding: 0.5rem 1rem !important;
  position: relative;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 1rem; right: 1rem; bottom: 0.35rem;
  height: 2px;
  background: var(--shac-green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }
.nav-link:hover, .nav-link.active { color: var(--shac-green) !important; }

/* ── Buttons ── */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 4px;
  padding: 0.7rem 1.6rem;
  transition: background-color .18s ease, border-color .18s ease, transform .12s ease;
}
.btn:active { transform: translateY(1px); }

.btn-custom-green,
.btn-shac-primary,
.btn-primary {
  background-color: var(--shac-green) !important;
  color: #fff !important;
  border: 2px solid var(--shac-green) !important;
}
.btn-custom-green:hover,
.btn-shac-primary:hover,
.btn-primary:hover {
  background-color: var(--shac-green-dark) !important;
  border-color: var(--shac-green-dark) !important;
  color: #fff !important;
}

.btn-shac-outline,
.btn-outline-light {
  background-color: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.85);
}
.btn-shac-outline:hover,
.btn-outline-light:hover {
  background-color: #fff;
  color: var(--shac-green);
  border-color: #fff;
}

/* ── Hero (home page) ── */
.hero-section {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}
.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15,30,20,0.78) 0%,
    rgba(15,30,20,0.30) 45%,
    rgba(15,30,20,0.08) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 1.5rem 4.5rem;
  max-width: 760px;
  text-align: left;
}
.hero-content h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 600;
  line-height: 1.05;
  color: #fff;
  margin-bottom: 1.1rem;
  text-shadow: 0 2px 18px rgba(0,0,0,0.35);
}
.hero-content .lead {
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  color: rgba(255,255,255,0.94);
  font-weight: 400;
  margin-bottom: 1.8rem;
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
}

/* ── Section rhythm / spacing ── */
section,
.home-section { scroll-margin-top: 90px; }

.section-pad   { padding: 5rem 0; }
.section-pad-sm { padding: 3rem 0; }

.container,
.container-fluid > .container { max-width: var(--container-max); }

/* Eyebrow label above headings */
.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--shac-gold);
  margin-bottom: 0.6rem;
  display: inline-block;
}

.section-heading {
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  font-weight: 600;
  color: var(--shac-ink);
  margin-bottom: 1.5rem;
}
.section-heading::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  background: var(--shac-gold);
  margin-top: 0.9rem;
  border-radius: 2px;
}
.text-center .section-heading::after { margin-left: auto; margin-right: auto; }

/* ── Streamfield "About" / title blocks tidy-up ── */
.mbr-section-title strong { font-weight: 600; }
section[id^="content"] .display-4,
.title h3.display-4 {
  font-family: var(--font-heading);
  font-weight: 600;
}

/* photo-left / photo-right blocks — bigger images, calmer text */
#block_left_photo_text_about img,
section[id*="photo"] img {
  border-radius: 6px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.10);
}

/* ── Cards ── */
.card {
  border: 1px solid var(--shac-border);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow .25s ease, transform .25s ease;
  background: #fff;
}
.card:hover {
  box-shadow: 0 16px 40px rgba(0,0,0,0.12);
  transform: translateY(-4px);
}
.card-img-top {
  object-fit: cover;
  height: 220px;
  width: 100%;
}
.card-body { padding: 1.4rem 1.5rem 1.6rem; }
.card-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.card-text { color: var(--shac-muted); }

/* ── Latest blog section ── */
.latest-blog-posts {
  background-color: var(--shac-cream);
  padding: 5rem 0 !important;
  border-top: 1px solid var(--shac-border);
}
.latest-blog-posts h2 {
  font-family: var(--font-heading);
  margin-bottom: 2rem;
}

/* ── Facebook feed ── */
.facebook-feed {
  background-color: var(--shac-stone);
  padding: 5rem 0;
  border-top: 1px solid var(--shac-border);
}
.facebook-feed-container { display: flex; justify-content: center; width: 100%; overflow: hidden; }
.facebook-feed-wrapper { max-width: 500px; width: 100%; }
.fb-page, .fb-page span, .fb-page iframe { width: 100% !important; }

/* ── Footer ── */
footer {
  background-color: var(--shac-green) !important;
  color: rgba(255,255,255,0.92);
  padding-top: 1rem;
}
footer h5 {
  font-family: var(--font-heading) !important;
  color: var(--shac-gold) !important;
  text-transform: none !important;
  letter-spacing: 0.01em !important;
  font-size: 1.15rem !important;
}
footer p, footer td { color: rgba(255,255,255,0.85) !important; }
footer a, footer a span { color: rgba(255,255,255,0.9) !important; }
footer a:hover, footer a:hover span { color: #fff !important; text-decoration: none; }
footer .table { color: rgba(255,255,255,0.85) !important; border-color: rgba(255,255,255,0.18) !important; }
footer .table td { border-color: rgba(255,255,255,0.15) !important; }

/* ── Page hero (non-home pages) ── */
.page-hero {
  background-color: var(--shac-green);
  color: #fff;
  padding: 3.5rem 0;
}
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3.2rem); }
.page-hero .lead { color: rgba(255,255,255,0.9); }

/* ── Tables ── */
.table thead th {
  background-color: var(--shac-green);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.02em;
  border: none;
}

/* ── Breadcrumb ── */
.breadcrumb-item + .breadcrumb-item::before { color: var(--shac-muted); }
.breadcrumb-item.active { color: var(--shac-muted); }

/* ── Top banner ── */
.top-banner {
  background-color: var(--shac-green);
  color: #fff;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
}

/* ── Images: sensible defaults ── */
.rounded-shac { border-radius: 8px; }
.img-shadow   { box-shadow: 0 14px 40px rgba(0,0,0,0.12); }

/* ── Current exhibition feature ── */
.exhibition-section { background-color: var(--shac-cream); border-top: 1px solid var(--shac-border); }
.exhibition-figure { position: relative; }
.exhibition-credit {
  font-size: 0.78rem;
  color: var(--shac-muted);
  margin-top: 0.5rem;
  font-style: italic;
}
.exhibition-text { font-size: 1.08rem; }

/* ── Featured film banner ── */
.featured-film { padding: 0; }
.featured-film-link {
  position: relative;
  display: block;
  min-height: 420px;
  overflow: hidden;
  text-decoration: none;
}
.featured-film-link:hover { text-decoration: none; }
.featured-film-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.featured-film-link:hover .featured-film-bg { transform: scale(1.04); }
.featured-film-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,30,20,0.82) 0%, rgba(15,30,20,0.35) 60%, rgba(15,30,20,0.25) 100%);
}
.featured-film-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  min-height: 420px;
  padding: 2.5rem 1rem 3rem;
  color: #fff;
}
.featured-film-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 1rem;
  max-width: 700px;
  text-shadow: 0 2px 14px rgba(0,0,0,0.4);
}
.featured-film-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--shac-green);
  color: #fff;
  font-weight: 600;
  padding: 0.7rem 1.5rem;
  border-radius: 4px;
  transition: background .2s ease;
}
.featured-film-link:hover .featured-film-cta { background: var(--shac-green-dark); }
.featured-film-cta .play { font-size: 0.9rem; }

/* ── Archive filter chips ── */
.active-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem; }
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--shac-green-light);
  border: 1px solid var(--shac-green);
  color: var(--shac-green-dark);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.9rem;
}
.filter-chip a {
  color: var(--shac-green-dark);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  font-size: 1.1rem;
}
.filter-chip a:hover { color: #b00; }

/* ── Heritage Trail highlight banner ── */
.trail-highlight {
  position: relative;
  min-height: 440px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.trail-highlight-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.trail-highlight-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(15,30,20,0.80) 0%, rgba(15,30,20,0.55) 45%, rgba(15,30,20,0.25) 100%);
}
.trail-highlight-content {
  position: relative;
  z-index: 2;
  color: #fff;
  max-width: 640px;
  padding: 3.5rem 1rem;
}
.trail-highlight-title {
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  font-weight: 600;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 1rem;
  text-shadow: 0 2px 14px rgba(0,0,0,0.4);
}
.trail-highlight-text {
  font-size: 1.12rem;
  color: rgba(255,255,255,0.94);
  margin-bottom: 1.5rem;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}
/* When no background image is set, fall back to a solid heritage green */
.trail-highlight:not(:has(.trail-highlight-bg)) { background: var(--shac-green); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .section-pad { padding: 3.25rem 0; }
  .hero-section { min-height: 70vh; }
  .hero-content { padding-bottom: 3rem; }
}
