/*
Theme Name: LADWACA Modern
Theme URI: https://www.ladwaca.com/
Author: LADWACA / Codex
Description: A modern WordPress theme for Langstone & District Wildfowlers & Conservation Association.
Version: 1.4.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: ladwaca-modern
*/

:root {
  --ink: #17211d;
  --muted: #607067;
  --paper: #fbfaf6;
  --panel: #ffffff;
  --line: #dfe4dc;
  --marsh: #456452;
  --reed: #b8844a;
  --water: #31586a;
  --night: #0d1714;
  --shadow: 0 22px 60px rgba(15, 28, 22, .12);
  --radius: 8px;
  --container: 1180px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a { color: var(--water); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--reed); }

img { max-width: 100%; height: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 250, 246, .93);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.newsflash {
  overflow: hidden;
  background: var(--night);
  color: #f4ead8;
  border-bottom: 1px solid rgba(255,255,255,.12);
  white-space: nowrap;
}

.newsflash-track {
  display: inline-flex;
  gap: 56px;
  min-width: max-content;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  animation: ladwaca-newsflash-scroll 28s linear infinite;
}

.newsflash-track span::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 14px 1px 0;
  border-radius: 50%;
  background: var(--reed);
}

.newsflash:hover .newsflash-track {
  animation-play-state: paused;
}

@keyframes ladwaca-newsflash-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-33.333%); }
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  min-width: 255px;
}

.brand-mark {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand-title { display: block; font-weight: 800; line-height: 1.05; }
.brand-subtitle { display: block; color: var(--muted); font-size: 11px; line-height: 1.2; margin-top: 3px; }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  color: var(--ink);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  margin: 4px auto;
}

.primary-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-menu li { position: relative; }
.primary-menu a {
  display: block;
  padding: 9px 8px;
  color: var(--ink);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a {
  background: #eef3ec;
}

.primary-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 240px;
  margin: 8px 0 0;
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  list-style: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: .18s ease;
}

.primary-menu li:hover > .sub-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.hero {
  min-height: 620px;
  position: relative;
  display: grid;
  align-items: end;
  background:
    linear-gradient(90deg, rgba(8, 19, 16, .86), rgba(8, 19, 16, .48) 44%, rgba(8, 19, 16, .12)),
    url("assets/images/langstone-hero.png") center / cover no-repeat;
  color: #fff;
}

.hero-inner {
  width: min(var(--container), calc(100% - 44px));
  margin: 0 auto;
  padding: 110px 0 84px;
}

.eyebrow {
  color: #d7be8f;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: .12em;
  font-size: 12px;
}

.hero h1 {
  max-width: 780px;
  margin: 12px 0 18px;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(44px, 7vw, 84px);
  line-height: .96;
  letter-spacing: 0;
}

.hero p {
  max-width: 660px;
  color: rgba(255,255,255,.88);
  font-size: 20px;
  margin: 0 0 30px;
}

.button-row { display: flex; flex-wrap: wrap; gap: 12px; }

.button,
.wp-block-button__link,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: var(--marsh);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.35);
}

.section {
  padding: 76px 22px;
}

.section.alt { background: #eef2ed; }

.container {
  max-width: var(--container);
  margin: 0 auto;
}

.section-heading {
  max-width: 760px;
  margin: 0 0 30px;
}

.section-heading h2,
.entry-content h2,
.page-title {
  margin: 0 0 14px;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.05;
}

.lead {
  font-size: 19px;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 12px 34px rgba(23, 33, 29, .06);
}

.card h3 { margin: 0 0 8px; line-height: 1.2; }
.card p { color: var(--muted); margin: 0 0 16px; }
.card a { font-weight: 800; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: -46px;
  position: relative;
  z-index: 2;
}

.stat {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 22px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.stat strong {
  display: block;
  font-size: clamp(34px, 4vw, 46px);
  line-height: 1;
  color: var(--marsh);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.stat span { display: block; margin-top: 8px; color: var(--muted); font-weight: 700; }
.stat strong span { display: inline; margin: 0; color: inherit; }

.split {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 46px;
  align-items: center;
}

.feature-panel {
  background: var(--night);
  color: #fff;
  padding: 36px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feature-panel p { color: rgba(255,255,255,.78); }

.timeline {
  border-left: 2px solid var(--line);
  padding-left: 24px;
}

.timeline-item { margin-bottom: 24px; }
.timeline-item strong { color: var(--marsh); }

.page-hero {
  padding: 82px 22px 46px;
  background: #edf2ec;
  border-bottom: 1px solid var(--line);
}

.entry-content {
  max-width: 890px;
  margin: 0 auto;
  padding: 56px 22px 76px;
}

.entry-content > *:first-child { margin-top: 0; }
.entry-content h3 { margin-top: 34px; }

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 28px 0;
}

.media-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 12px 34px rgba(23, 33, 29, .06);
}

.media-card h3 {
  margin: 12px 0 8px;
}

.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--night);
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 28px 0;
}

.image-gallery figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
}

.image-gallery a,
.feature-image a {
  display: block;
  cursor: zoom-in;
}

.image-gallery img,
.feature-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-gallery img {
  aspect-ratio: 4 / 3;
}

.feature-image {
  margin: 28px 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
}

.feature-image img {
  max-height: 560px;
  object-fit: contain;
  background: #f7f7f2;
}

.media-link-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.media-link-list a {
  display: block;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-weight: 800;
  text-decoration: none;
}

.media-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin: 30px 0;
}

.media-index-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 12px 34px rgba(23, 33, 29, .06);
}

.media-index-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #dfe4dc;
}

.media-index-card span {
  display: block;
  padding: 16px;
}

.media-index-card strong,
.media-index-card em {
  display: block;
}

.media-index-card strong {
  font-size: 18px;
  line-height: 1.2;
}

.media-index-card em {
  margin-top: 8px;
  color: var(--muted);
  font-style: normal;
  font-weight: 600;
}

.media-index-card:hover {
  transform: translateY(-2px);
  border-color: var(--reed);
  color: var(--water);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(8, 15, 13, .88);
}

.lightbox img {
  max-width: min(1120px, 96vw);
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(0,0,0,.35);
}

.lightbox button {
  position: fixed;
  min-height: 42px;
  width: 42px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 30px;
  line-height: 1;
}

.lightbox-close {
  top: 18px;
  right: 18px;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 64px;
  font-size: 46px;
}

.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }

.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.library-card {
  display: flex;
  min-height: 94px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
}

.library-card:hover {
  border-color: var(--reed);
  color: var(--water);
}

.contact-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.contact-form label { font-weight: 800; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
}

.contact-form textarea { min-height: 150px; resize: vertical; }
.notice { padding: 14px 16px; border-radius: var(--radius); background: #e8f3e8; border: 1px solid #c9e2ca; }

.site-footer {
  background: var(--night);
  color: rgba(255,255,255,.78);
  padding: 42px 22px;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.site-footer a { color: #fff; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    inset: 71px 0 auto;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .primary-menu { display: block; padding: 10px 22px 18px; }
  .primary-menu .sub-menu {
    position: static;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    width: auto;
    margin: 0 0 0 18px;
    background: transparent;
    border: 0;
  }
  .hero { min-height: 560px; }
  .grid,
  .stats,
  .split { grid-template-columns: 1fr; }
  .stats { margin-top: 0; padding-top: 22px; }
}

@media (max-width: 560px) {
  .brand { min-width: 0; }
  .brand-mark { width: 46px; height: 46px; }
  .brand-subtitle { display: none; }
  .hero-inner { width: min(100% - 32px, var(--container)); padding-bottom: 60px; }
  .section { padding: 54px 16px; }
  .page-hero { padding: 58px 16px 34px; }
  .entry-content { padding-inline: 16px; }
}
