/*
Theme Name: Ness Historical
Theme URI: https://nesshistorical.co.uk/
Author: Ness Historical Society
Description: A clean, accessible theme for Comunn Eachdraidh Nis.
Version: 1.0.12
Text Domain: ness-historical
*/

:root {
  --cen-ink: #17211d;
  --cen-green: #174f3b;
  --cen-green-light: #dce9e1;
  --cen-sea: #267b82;
  --cen-coral: #d56545;
  --cen-white: #ffffff;
  --cen-mist: #f3f6f4;
  --cen-border: #d7dfda;
  --cen-gold: #c79b46;
  --cen-width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--cen-ink);
  background: var(--cen-white);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.7;
}
a { color: var(--cen-green); text-underline-offset: 3px; }
a:hover { color: var(--cen-coral); }
img { display: block; max-width: 100%; height: auto; }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(23, 79, 59, .98); color: var(--cen-white); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.header-inner {
  width: min(calc(100% - 40px), var(--cen-width));
  min-height: 92px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.custom-logo { width: auto; max-height: 66px; }
.site-title { color: var(--cen-white); font-size: 25px; font-weight: 700; text-decoration: none; }
.header-support-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  margin-left: auto;
  border-radius: 4px;
  background: var(--cen-coral);
  color: white;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0,0,0,.16);
}
.header-support-button:hover { color: white; background: #e07151; transform: translateY(-1px); }
.menu-toggle { display: none; border: 1px solid rgba(255,255,255,.45); background: transparent; color: white; padding: 10px 14px; font: inherit; }
.primary-menu, .primary-menu ul { list-style: none; margin: 0; padding: 0; }
.primary-menu, .primary-menu > ul { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.primary-menu a {
  display: block;
  color: white;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  padding: 10px 11px;
  border-radius: 4px;
}
.primary-menu a:hover, .primary-menu .current-menu-item > a { color: white; background: rgba(255,255,255,.14); }

.page-hero { background: var(--cen-mist); border-bottom: 1px solid var(--cen-border); }
.page-hero-inner { width: min(calc(100% - 40px), var(--cen-width)); margin: auto; padding: 56px 0 48px; }
.page-hero h1 { max-width: 850px; margin: 0; color: var(--cen-green); font-family: Georgia, serif; font-size: clamp(40px, 6vw, 72px); line-height: 1.05; }

.content-wrap { width: min(calc(100% - 40px), 980px); margin: 0 auto; padding: 56px 0 84px; }
.entry-content > * { margin-top: 0; margin-bottom: 28px; }
.entry-content h2, .entry-content h3 { color: var(--cen-green); font-family: Georgia, serif; line-height: 1.2; }
.entry-content h2 { margin-top: 52px; font-size: clamp(30px, 4vw, 44px); }
.entry-content h3 { margin-top: 38px; font-size: 28px; }
.entry-content p, .entry-content li { max-width: 74ch; }
.entry-content figure { margin: 42px 0; }
.entry-content figure img { width: 100%; max-height: 680px; object-fit: contain; background: var(--cen-mist); }
.entry-content .wp-block-image img { border-radius: 4px; }
.entry-content img { border-radius: 4px; }
.entry-content a[href="#"] { color: inherit; text-decoration: none; cursor: default; }
.entry-content blockquote { margin: 40px 0; padding: 8px 0 8px 28px; border-left: 5px solid var(--cen-coral); font-family: Georgia, serif; font-size: 24px; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: 12px; border: 1px solid var(--cen-border); text-align: left; }
.entry-content .wp-block-button__link, .entry-content .button { display: inline-block; padding: 12px 20px; border-radius: 3px; background: var(--cen-green); color: white; text-decoration: none; }

.support-cen-intro {
  max-width: 880px;
  margin: 0 auto 34px;
  padding: 34px 0 12px;
}
.support-cen-intro h2 {
  margin: 0 0 14px;
  color: var(--cen-green);
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.02;
}
.support-cen-intro p {
  font-size: 20px;
}
.support-cen-section {
  display: grid;
  grid-template-columns: minmax(260px, .95fr) minmax(0, 1.05fr);
  gap: 34px;
  align-items: center;
  margin: 34px 0;
  padding: 30px;
  background: white;
  border: 1px solid var(--cen-border);
}
.support-cen-section-club {
  grid-template-columns: minmax(0, 1.08fr) minmax(260px, .92fr);
}
.support-cen-copy h2 {
  margin: 0 0 16px;
  color: var(--cen-green);
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.05;
}
.support-cen-copy p {
  font-size: 18px;
}
.support-cen-image img {
  display: block;
  width: 100%;
  height: auto;
}
.support-cen-section-membership .support-cen-image img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.support-cen-image-card {
  padding: 22px;
  background: #f7df58;
}
.support-highlight {
  margin: 20px 0;
  padding: 16px 18px;
  border-left: 5px solid var(--cen-teal);
  background: var(--cen-mist);
  font-weight: 700;
}
.support-actions {
  margin: 24px 0 18px;
}
.support-contact-line {
  margin-bottom: 0;
}

.contact-enquiry {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(320px, 1.1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
  padding: clamp(28px, 5vw, 52px);
  background: var(--cen-mist);
  border-left: 8px solid var(--cen-coral);
}
.section-kicker {
  margin: 0 0 14px;
  color: var(--cen-coral);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.contact-enquiry h2 {
  margin-top: 0;
  font-size: clamp(36px, 5vw, 56px);
}
.contact-form {
  display: grid;
  gap: 14px;
  padding: 24px;
  background: white;
  border: 1px solid var(--cen-border);
}
.contact-form label {
  color: var(--cen-green);
  font-weight: 800;
}
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--cen-border);
  border-radius: 4px;
  color: var(--cen-ink);
  font: inherit;
}
.contact-form select {
  min-height: 48px;
  padding: 0 12px;
  background: white;
}
.contact-form textarea {
  min-height: 160px;
  padding: 12px;
  resize: vertical;
}
.contact-form .button {
  border: 0;
  cursor: pointer;
}
.contact-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}
.contact-details div {
  padding: 22px;
  background: white;
  border: 1px solid var(--cen-border);
}
.contact-details h3 {
  margin-top: 0;
  font-size: 24px;
}
.contact-details p {
  margin-bottom: 0;
}

.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  min-height: 620px;
  background: var(--cen-green);
  color: white;
}
.home-hero-media { min-height: 620px; }
.home-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.home-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(34px, 6vw, 72px);
  background: linear-gradient(135deg, #174f3b 0%, #226958 100%);
}
.home-hero h1 {
  margin: 0 0 22px;
  font: 700 clamp(62px, 9vw, 104px)/.92 Georgia, serif;
  letter-spacing: 0;
}
.home-hero p { margin: 0; max-width: 34rem; font-size: clamp(21px, 2.4vw, 30px); line-height: 1.3; }
.home-actions, .home-band-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.15;
  text-decoration: none;
}
.button-primary { background: var(--cen-coral); color: white; }
.button-secondary { background: white; color: var(--cen-green); }
.button:hover { transform: translateY(-1px); }

.home-feature-grid {
  width: min(calc(100% - 40px), var(--cen-width));
  margin: -48px auto 0;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: white;
  box-shadow: 0 24px 70px rgba(23, 33, 29, .18);
}
.feature-link {
  display: grid;
  gap: 12px;
  min-height: 176px;
  padding: 26px;
  border-right: 1px solid var(--cen-border);
  color: var(--cen-ink);
  text-decoration: none;
}
.feature-link:last-child { border-right: 0; }
.feature-link span { color: var(--cen-coral); font-size: 15px; font-weight: 800; text-transform: uppercase; }
.feature-link strong { color: var(--cen-green); font: 700 25px/1.15 Georgia, serif; }
.feature-link:hover { background: var(--cen-mist); }

.home-split {
  width: min(calc(100% - 40px), var(--cen-width));
  margin: 82px auto;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 76px);
  align-items: center;
}
.home-split-reverse { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.home-split-reverse .home-split-copy { order: 2; }
.home-split h2, .home-band h2, .home-newsletter h2 {
  margin: 0 0 18px;
  color: var(--cen-green);
  font: 700 clamp(38px, 5vw, 64px)/1 Georgia, serif;
}
.home-split p, .home-band p, .home-newsletter p { margin: 0; max-width: 42rem; font-size: 20px; line-height: 1.55; }
.home-split-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; box-shadow: 0 18px 45px rgba(23, 33, 29, .14); }
.home-split-reverse .home-split-image img { aspect-ratio: 5 / 4; }
.text-link { display: inline-block; margin-top: 24px; color: var(--cen-green); font-weight: 800; }

.home-band {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  padding: 56px max(20px, calc((100vw - var(--cen-width)) / 2));
  background: var(--cen-green-light);
  border-top: 1px solid var(--cen-border);
  border-bottom: 1px solid var(--cen-border);
}

.home-newsletter {
  width: min(calc(100% - 40px), 860px);
  margin: 84px auto;
  padding: 52px;
  background: var(--cen-mist);
  border-left: 8px solid var(--cen-coral);
}
.home-newsletter .button { margin-top: 24px; }

.site-footer { background: var(--cen-ink); color: #dfe8e3; }
.footer-inner { width: min(calc(100% - 40px), var(--cen-width)); margin: auto; padding: 54px 0; display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }
.site-footer h2 { margin: 0 0 10px; color: white; font: 700 26px/1.2 Georgia, serif; }
.site-footer p { margin: 0; }
.site-footer a { color: white; }
.footer-meta { text-align: right; }

@media (max-width: 850px) {
  .header-inner { min-height: 86px; flex-wrap: wrap; padding: 10px 0; }
  .custom-logo { max-height: 58px; }
  .header-support-button { order: 3; width: 100%; margin-left: 0; }
  .menu-toggle { display: block; }
  .site-nav { display: none; order: 4; width: 100%; }
  .site-nav.is-open { display: block; }
  .primary-menu, .primary-menu > ul { align-items: stretch; flex-direction: column; gap: 0; padding: 8px 0 18px; }
  .primary-menu a { display: block; padding: 10px 0; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-meta { text-align: left; }
  .home-hero { grid-template-columns: 1fr; min-height: 0; }
  .home-hero-media { min-height: 320px; }
  .home-hero-copy { padding: 38px 20px 48px; }
  .home-feature-grid { margin-top: 0; grid-template-columns: 1fr; box-shadow: none; width: 100%; }
  .feature-link { min-height: 0; border-right: 0; border-bottom: 1px solid var(--cen-border); padding: 22px 20px; }
  .home-split, .home-split-reverse { grid-template-columns: 1fr; margin: 54px auto; }
  .home-split-reverse .home-split-copy { order: 0; }
  .home-band { display: block; padding: 42px 20px; }
  .home-newsletter { padding: 34px 24px; margin: 54px auto; }
  .support-cen-intro { padding-top: 12px; }
  .support-cen-section,
  .support-cen-section-club { grid-template-columns: 1fr; padding: 22px; }
  .support-cen-section-club .support-cen-image { order: -1; }
  .contact-enquiry,
  .contact-details { grid-template-columns: 1fr; }
  .contact-enquiry { padding: 28px 22px; }
  .contact-form { padding: 20px; }
}
