/*
Theme Name: Magna Park Corby
Theme URI: https://magnaparkcorby.co.uk
Author: SEC Newgate UK
Description: Custom lightweight theme for the Magna Park Corby engagement website, including the Community Liaison Group (CLG) minutes section. No page-builder or plugin dependencies.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: magnapark-corby
*/

/* ---------------------------------------------------------------------------
   Tokens
--------------------------------------------------------------------------- */
:root {
  --green: #0A9748;
  --green-dark: #05733B;
  --green-deep: #0B2A1D;
  --green-tint: #E8F4EE;
  --amber: #E8862B;
  --ink: #16241D;
  --body: #37473F;
  --muted: #64756D;
  --bg: #F5F7F6;
  --card: #FFFFFF;
  --line: #DFE8E3;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(11, 42, 29, 0.10);
  --shadow-lg: 0 24px 60px rgba(11, 42, 29, 0.16);
  --font: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --container: 1160px;
  --header-h: 76px;
}

/* ---------------------------------------------------------------------------
   Base
--------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--body);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  font-weight: 900;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.6em;
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); }
h4 { font-size: 1.15rem; }
p { margin: 0 0 1.2em; }
.screen-reader-text {
  position: absolute !important;
  clip-path: inset(50%);
  width: 1px; height: 1px;
  overflow: hidden;
  word-wrap: normal !important;
}
.skip-link:focus {
  clip-path: none;
  width: auto; height: auto;
  z-index: 10000;
  top: 8px; left: 8px;
  background: var(--green-deep);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
.section--alt { background: #fff; }

/* ---------------------------------------------------------------------------
   Buttons
--------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover {
  background: var(--green-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(10, 151, 72, 0.35);
}
.btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.14); box-shadow: none; }
.btn--outline {
  background: transparent;
  border-color: var(--green);
  color: var(--green-dark);
}
.btn--outline:hover { background: var(--green-tint); color: var(--green-dark); box-shadow: none; }
.btn--sm { padding: 9px 18px; font-size: 0.88rem; }

/* ---------------------------------------------------------------------------
   Header
--------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, rgba(6, 20, 14, 0.55), rgba(6, 20, 14, 0));
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(11, 42, 29, 0.96);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 24px rgba(11, 42, 29, 0.25);
}
.site-header__inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-header__logo img { height: 30px; width: auto; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.site-nav li { position: relative; }
.site-nav a {
  display: block;
  padding: 10px 14px;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 999px;
  transition: background 0.15s ease;
}
.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a { background: rgba(255, 255, 255, 0.14); color: #fff; }
.site-nav .menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  margin-left: 8px;
  border: 4px solid transparent;
  border-top-color: currentColor;
  transform: translateY(2px);
}
.site-nav .sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 250px;
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: block;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.site-nav li:hover > .sub-menu,
.site-nav li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.site-nav .sub-menu a {
  color: var(--ink);
  border-radius: 6px;
  font-weight: 600;
  padding: 9px 12px;
}
.site-nav .sub-menu a:hover { background: var(--green-tint); color: var(--green-dark); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: #fff;
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.site-header.is-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
.site-header.is-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: rgba(11, 42, 29, 0.98);
    padding: 12px 24px 28px;
    display: none;
    max-height: calc(100vh - var(--header-h));
    overflow: auto;
  }
  .site-header.is-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; gap: 2px; }
  .site-nav .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.06);
    margin: 4px 0 8px 12px;
    padding: 4px;
  }
  .site-nav .sub-menu a { color: #d9e5df; }
  .site-nav .sub-menu a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
}

/* ---------------------------------------------------------------------------
   Hero (front page)
--------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--green-deep);
}
.hero__media,
.hero__media iframe,
.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  pointer-events: none;
}
.hero__media iframe {
  /* oversize the 16:9 iframe so it covers like background-size: cover */
  top: 50%; left: 50%;
  width: max(100vw, 177.78vh);
  height: max(100vh, 56.25vw);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero__media iframe.is-live { opacity: 1; }
.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 20, 14, 0.55) 0%, rgba(6, 20, 14, 0.25) 40%, rgba(11, 42, 29, 0.82) 100%);
}
.hero__content {
  position: relative;
  z-index: 2;
  padding: 140px 24px 90px;
  max-width: 900px;
}
.hero__logo { margin: 0 auto 28px; max-width: min(640px, 86%); }
.hero__kicker {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.hero__content p.hero__sub {
  color: #E4EEE9;
  font-size: clamp(1.02rem, 1.6vw, 1.25rem);
  max-width: 700px;
  margin: 0 auto 34px;
}
.hero__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero__scroll {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: #fff;
  opacity: 0.75;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------------------
   Page hero (inner pages)
--------------------------------------------------------------------------- */
.page-hero {
  position: relative;
  padding: calc(var(--header-h) + 84px) 0 64px;
  background:
    linear-gradient(115deg, rgba(6, 26, 17, 0.93) 0%, rgba(9, 58, 34, 0.88) 55%, rgba(10, 151, 72, 0.55) 130%),
    var(--green-deep) center / cover no-repeat;
  background-blend-mode: normal;
  color: #fff;
}
.page-hero--img { background-size: cover; background-position: center; }
.page-hero__crumb {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8FD6AE;
  margin-bottom: 12px;
}
.page-hero h1 { color: #fff; margin-bottom: 0; }
.page-hero__intro { color: #D6E5DD; max-width: 720px; margin: 16px 0 0; font-size: 1.08rem; }

/* ---------------------------------------------------------------------------
   Content typography (.prose)
--------------------------------------------------------------------------- */
.prose { max-width: 780px; }
.prose--wide { max-width: none; }
.prose h2 {
  position: relative;
  padding-top: 18px;
  margin-top: 1.6em;
}
.prose h2::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 56px; height: 4px;
  border-radius: 2px;
  background: var(--green);
}
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 0.5em; }
.prose img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 1.6em 0;
}
.prose .wp-block-columns { display: flex; gap: 28px; flex-wrap: wrap; }
.prose .wp-block-column { flex: 1 1 300px; min-width: 0; }
.prose figure { margin: 1.6em 0; }
.prose figure img { margin: 0; }
.prose figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 10px; }
.prose blockquote {
  margin: 1.6em 0;
  padding: 18px 24px;
  border-left: 4px solid var(--green);
  background: var(--green-tint);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink);
  font-weight: 600;
}

/* Lead paragraph helper (add class "is-lead" to a paragraph block) */
.prose .is-lead { font-size: 1.18rem; color: var(--ink); }


/* ---------------------------------------------------------------------------
   Cards & grids (usable as Gutenberg group/columns classNames)
--------------------------------------------------------------------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
}
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

/* Stat cards — used on About MPC / home */
.mpc-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 2em 0;
}
@media (max-width: 560px) { .mpc-stats { grid-template-columns: 1fr; } }
.mpc-stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 22px;
  box-shadow: var(--shadow);
}
.mpc-stat__num {
  font-size: 2.1rem;
  font-weight: 900;
  color: var(--green-dark);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.mpc-stat p { margin: 0; font-size: 0.95rem; color: var(--muted); }

/* Tile links (home page quick links) */
.tile {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 240px;
  border-radius: var(--radius);
  overflow: hidden;
  color: #fff;
  background: var(--green-deep) center / cover no-repeat;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: #fff; }
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 20, 14, 0) 30%, rgba(6, 20, 14, 0.85) 100%);
}
.tile__label {
  position: relative;
  z-index: 1;
  padding: 22px;
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.tile__label small {
  display: block;
  font-weight: 600;
  font-size: 0.82rem;
  color: #B9D6C6;
  margin-top: 4px;
}

/* ---------------------------------------------------------------------------
   CLG meetings
--------------------------------------------------------------------------- */
.clg-list { display: grid; gap: 18px; margin-top: 8px; }
.clg-item {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 26px;
}
.clg-item__date {
  flex: 0 0 auto;
  width: 74px; height: 74px;
  border-radius: var(--radius-sm);
  background: var(--green-tint);
  color: var(--green-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  line-height: 1.1;
}
.clg-item__date .m { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; }
.clg-item__date .y { font-size: 1.25rem; }
.clg-item__body { flex: 1 1 240px; }
.clg-item__body h3 { margin: 0 0 4px; font-size: 1.15rem; }
.clg-item__body p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.clg-item__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.clg-item__actions .is-missing {
  color: var(--muted);
  font-size: 0.88rem;
  align-self: center;
}
.clg-tor {
  margin-top: 30px;
  padding: 22px 26px;
  border-radius: var(--radius);
  background: var(--green-deep);
  color: #D6E5DD;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.clg-tor strong { color: #fff; }

/* ---------------------------------------------------------------------------
   Maps (transport page)
--------------------------------------------------------------------------- */
.map-block { margin: 2.2em 0; }
.map-canvas {
  height: 520px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  z-index: 1;
}
.map-canvas--sm { height: 420px; }
.map-legend {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  margin: 14px 2px 0;
  font-size: 0.92rem;
  color: var(--muted);
}
.map-legend span { display: inline-flex; align-items: center; gap: 9px; }
.map-legend i {
  width: 14px; height: 14px;
  border-radius: 50%;
  display: inline-block;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.map-legend i.dot-orange { background: var(--amber); }
.map-legend i.dot-green { background: var(--green); }
.mpc-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  color: #fff;
  font-weight: 900;
  font-size: 12px;
  font-family: var(--font);
}
.mpc-pin--green { background: var(--green); }
.mpc-pin--orange { background: var(--amber); }

/* ---------------------------------------------------------------------------
   Subscribe band
--------------------------------------------------------------------------- */
.subscribe {
  background:
    linear-gradient(115deg, rgba(6, 26, 17, 0.95), rgba(9, 88, 46, 0.9)),
    var(--green-deep);
  color: #fff;
  border-radius: var(--radius);
  padding: 48px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 36px;
  align-items: center;
  box-shadow: var(--shadow-lg);
}
.subscribe h2 { color: #fff; margin-bottom: 8px; }
.subscribe p { color: #C9DCD2; margin: 0; }
.subscribe-form { display: flex; gap: 10px; flex-wrap: wrap; }
.subscribe-form input[type="email"] {
  flex: 1 1 240px;
  padding: 14px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: var(--font);
  font-size: 1rem;
  outline: none;
}
.subscribe-form input[type="email"]::placeholder { color: #A9C4B6; }
.subscribe-form input[type="email"]:focus { border-color: #fff; background: rgba(255, 255, 255, 0.16); }
.subscribe-form .hp-field { position: absolute; left: -9999px; opacity: 0; }
.subscribe__notice {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 700;
}
@media (max-width: 800px) { .subscribe { grid-template-columns: 1fr; padding: 34px 26px; } }

/* ---------------------------------------------------------------------------
   Footer
--------------------------------------------------------------------------- */
.site-footer {
  margin-top: 80px;
  background: var(--green-deep);
  color: #B9CDC2;
  font-size: 0.95rem;
}
.site-footer a { color: #DCE9E2; }
.site-footer a:hover { color: #fff; }
.site-footer__main {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.1fr;
  gap: 48px;
  padding: 64px 0 48px;
}
@media (max-width: 900px) { .site-footer__main { grid-template-columns: 1fr; gap: 34px; } }
.site-footer__logo img { height: 34px; width: auto; margin-bottom: 18px; }
.site-footer h4 {
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-menu ul { list-style: none; margin: 0; padding: 0; }
.footer-menu li { margin-bottom: 9px; }
.footer-menu .sub-menu { margin: 9px 0 0 14px; }
.site-footer__contact p { margin: 0 0 10px; }
.site-footer__credit {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.site-footer__credit .credit-logo { height: 34px; width: auto; opacity: 0.9; }
.site-footer__credit .credit-logo--glp { height: 26px; }
.site-footer__credit small { color: #8AA396; }

/* ---------------------------------------------------------------------------
   Reveal animation
--------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------------------------------------------------------------------------
   WP alignment & misc compatibility
--------------------------------------------------------------------------- */
.alignwide { max-width: var(--container); margin-left: auto; margin-right: auto; }
.alignfull { width: 100%; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-block-button__link { background: var(--green); border-radius: 999px; }
.entry-content > *:last-child { margin-bottom: 0; }
