/* MULTI-PAGE ADDITIONS (v5 - Dark Mode Supported)
   Load after styles.css. Colours come from the tokens defined in styles.css.
   Contrast:
   Light: charcoal on apple 5.4:1 | evergreen on white 10.6:1
   Dark: primary #F5F7F3 on #1C3027 12.3:1 | accent #78B83A on #111B18 7.5:1
*/

/* ---------- Header and Portal Login ---------- */
.header-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

.btn-portal {
  min-height: 44px; padding: 8px 16px; font-size: 14px; font-weight: 600;
  background: var(--portal-btn-bg); color: var(--portal-btn-text);
  border: 2px solid var(--portal-btn-border); border-radius: var(--radius);
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
  transition: background-color .2s, border-color .2s, color .2s, transform .15s;
}
.btn-portal:hover { background: var(--apple); border-color: var(--apple); color: #111B18; }
.btn-portal:active { transform: translateY(1px); }
.btn-portal.is-pending {
  background: var(--bg-card); color: var(--muted); border: 2px dashed var(--line-strong); cursor: not-allowed;
}
.btn-portal .lbl-short { display: none; }

.btn-portal-desktop { display: inline-flex; }

.site-nav a[aria-current="page"] { background: var(--bg-alt); color: var(--apple); font-weight: 600; }

@media (max-width: 879px) {
  .btn-portal-desktop { display: none !important; }
}

@media (max-width: 479px) {
  .btn-portal .lbl-long { display: none; }
  .btn-portal .lbl-short { display: inline; }
  .btn-portal { padding: 8px 12px; }
}
@media (min-width: 880px) and (max-width: 1099px) {
  .site-nav a { padding: 8px 8px; font-size: 14px; }
  .site-nav ul { gap: 0; }
}

/* ---------- Tags for unconfirmed content ---------- */
.tag {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; border-radius: 999px; padding: 3px 8px; margin-right: 6px;
  line-height: 1.2; vertical-align: middle;
}
.tag-tbc { background: var(--bg-notice); color: var(--text-notice); border: 1px solid var(--line); }
.tag-draft { background: var(--mint-hl); color: var(--evergreen); }
[data-theme="dark"] .tag-draft { background: #284436; color: #C5E9A5; }

/* ---------- Section surfaces ---------- */
.section-white { background: var(--bg-card); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: linear-gradient(165deg, var(--mint-soft) 0%, var(--ivory) 70%);
  padding: clamp(48px, 6vw, 80px) 0 clamp(36px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
  transition: background .25s ease, border-color .25s ease;
}
[data-theme="dark"] .page-hero {
  background: linear-gradient(165deg, #17241E 0%, #111B18 70%);
}
.page-hero .lead { margin-bottom: 0; }
.page-title {
  font-family: var(--font-head); color: var(--text-head);
  font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.15; margin: 0 0 14px;
}

/* ---------- Homepage hero ---------- */
.hero-grid { display: grid; gap: 28px; }
.hero-grid .hero-inner { max-width: 780px; }

/* ---------- Layout helpers ---------- */
.two-up { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); margin-top: 28px; }
@media (min-width: 720px) { .two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.grid-cards { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); margin-top: 28px; }
@media (min-width: 620px) { .grid-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .grid-cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.prose { max-width: 68ch; margin-top: 8px; }
.prose p { margin: 0 0 14px; color: var(--text-main); }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow-sm); min-width: 0;
  transition: background-color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.card.accent { border-top: 4px solid var(--apple); }
.card h3 { color: var(--text-head); margin-bottom: 8px; }
.card p { color: var(--text-main); margin: 0 0 8px; }
.card .meta {
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 8px;
}

/* Homepage preview cards */
.preview-card { display: flex; flex-direction: column; }
.text-link {
  margin-top: auto; padding-top: 12px; font-weight: 600; color: var(--link-color);
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
  transition: color .2s;
}
.text-link::after { content: "\2192"; }
.text-link:hover { color: var(--apple); text-decoration: underline; }

/* ---------- Facts and requirements ---------- */
.facts {
  list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 620px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.facts li {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 18px 20px; box-shadow: var(--shadow-sm); min-width: 0;
  transition: background-color .25s ease, border-color .25s ease;
}
.facts strong {
  display: block; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); margin-bottom: 4px;
}
.facts span { color: var(--text-head); font-weight: 600; font-size: 16px; }

.dates { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.dates li { border-bottom: 1px solid var(--line); padding-bottom: 8px; color: var(--text-main); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--evergreen) 0%, var(--evergreen-deep) 100%);
  color: var(--white); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 40px);
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between;
  border: 1px solid transparent;
}
[data-theme="dark"] .cta-band {
  background: linear-gradient(135deg, #172C22 0%, #0E1D16 100%);
  border-color: var(--line);
}
.cta-band h2 { color: var(--white) !important; margin-bottom: 8px; }
.cta-band h2::after { background: var(--apple); }
.cta-band p { color: #D6EBDD; margin: 0; }

/* ---------- Gallery ---------- */
.gallery-page { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 880px) { .gallery-page { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Homepage photo slider ---------- */
.home-gallery-track {
  display: flex; gap: 16px; overflow-x: auto; margin-top: 0; padding: 4px 2px 16px;
  scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain;
  scrollbar-width: none; -ms-overflow-style: none;
}
.home-gallery-track::-webkit-scrollbar { display: none; }
.home-gallery-track figure { flex: 0 0 82%; scroll-snap-align: start; }
@media (min-width: 640px) { .home-gallery-track figure { flex-basis: calc((100% - 16px) / 2); } }
@media (min-width: 960px) { .home-gallery-track figure { flex-basis: calc((100% - 32px) / 3); } }

/* ---------- Footer ---------- */
.site-footer { padding: 40px 0; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr; } }
.site-footer p { margin: 0 0 8px; }
.site-footer a { color: var(--text-foot-link); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.foot-h {
  color: var(--apple) !important; text-transform: uppercase; font-size: 13px;
  letter-spacing: 0.06em; font-weight: 700; margin-bottom: 10px !important;
}
.foot-name { font-family: var(--font-head); font-size: 1.2rem; color: #FFFFFF !important; }

/* ---------- Gallery captions (shown on the photograph) ---------- */
.gallery-page figure {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); background: var(--bg-alt);
  border: 1px solid var(--line);
}
.gallery-page figure img, .gallery-page .photo-pending {
  border-radius: 0; box-shadow: none; transition: transform .4s ease;
}
.gallery-page figure:hover img { transform: scale(1.03); }
.photo-caption {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0;
  padding: 44px 16px 14px;
  color: #FFFFFF; font-size: 15px; font-weight: 600; line-height: 1.4;
  background: linear-gradient(to top, rgba(14, 29, 22, 0.95) 0%, rgba(14, 29, 22, 0) 100%);
}

/* ---------- Tag fix: keep the label on one line ---------- */
.tag, .tag-demo { white-space: nowrap; overflow-wrap: normal; word-break: normal; }

/* ---------- Privacy notice page ---------- */
.privacy-doc { max-width: 760px; }
.privacy-doc .meta { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin: 0 0 24px; }
.privacy-block { padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.privacy-block:last-child { border-bottom: none; }
.privacy-block h2 { font-size: 1.4rem; margin-bottom: 10px; color: var(--text-head); }
.privacy-block h2::after { display: none; }
.privacy-block p { margin: 0 0 10px; color: var(--text-main); }
