/*
Theme Name: Senator Claire Chandler
Theme URI: https://www.senatorchandler.com.au/
Author: TWSG
Description: WordPress rebuild of senatorchandler.com.au (originally NationBuilder). Navy/gold political theme with built-in email list signup. No donation functionality.
Version: 1.1.6-staging
Requires at least: 6.0
Requires PHP: 7.4
License: Proprietary
Text Domain: senator-chandler
*/

:root {
  --navy: #0e1b35;
  --gold: #f8d568;
  --dark: #212529;
  --light: #f8f9fa;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Public Sans", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--dark);
  background: #fff;
  overflow-x: clip;
}

img { max-width: 100%; height: auto; vertical-align: middle; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: #000; text-decoration: underline; }

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
}
.btn:hover { text-decoration: none; }
.btn-primary { color: #fff; background: var(--navy); border-color: var(--navy); }
.btn-primary:hover { color: #fff; background: var(--navy-hover, #060b16); }
.btn-secondary { color: var(--dark); background: var(--gold); border-color: var(--gold); }
.btn-secondary:hover { background: var(--gold-hover, #f6ca3f); color: var(--dark); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: var(--navy);
  padding: 1.5rem 0;
  transition: padding 0.2s;
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}
.site-header.is-sticky { padding: 0.75rem 0; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.site-brand img { max-height: 56px; width: auto; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 0.25rem;
  padding: 0.4rem 0.7rem;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
}

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.site-nav > ul > li { position: relative; }
.site-nav a {
  display: block;
  padding: 0.5rem 1rem;
  color: #fff;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}
.site-nav a:hover { color: var(--gold); text-decoration: none; }

/* Dropdowns */
.site-nav li.menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  margin-left: 0.4em;
  vertical-align: 0.15em;
  border-top: 0.3em solid;
  border-right: 0.3em solid transparent;
  border-left: 0.3em solid transparent;
}
.site-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  min-width: 220px;
  background: #fff;
  border-radius: 0.25rem;
  padding: 0.5rem 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  flex-direction: column;
  align-items: stretch;
}
.site-nav li:hover > .sub-menu,
.site-nav li.is-open > .sub-menu { display: flex; }
.site-nav .sub-menu a { color: var(--dark); text-transform: none; font-size: 0.95rem; padding: 0.5rem 1.25rem; }
.site-nav .sub-menu a:hover { background: var(--light); color: var(--navy); }

/* ---------- Hero ---------- */
/* Matches the original theme: 100vh capped at 600px */
.hero {
  position: relative;
  height: 100vh;
  max-height: 600px;
  background-size: cover;
  background-position: center 20%;
  display: flex;
  align-items: flex-end;
}
.hero-caption { width: 100%; padding: 2.5rem 3rem 8.5rem; }
/* One translucent block behind both lines, like the original */
.hero-caption h1 {
  margin: 0;
  text-transform: uppercase;
  line-height: 1;
  display: inline-block;
  background: rgba(0, 0, 0, 0.5);
  padding: 1.25rem 2rem 1.5rem;
}
.hero-caption .top-line {
  display: inline-block;
  color: var(--gold);
  font-weight: 900;
  font-size: 5.625rem;
  line-height: normal;
  margin-bottom: -14px;
}
.hero-caption .bottom-line {
  display: inline-block;
  color: #fff;
  font-size: 3rem;
  font-weight: 600;
}

/* ---------- Signup band ---------- */
.home-signup {
  background: var(--navy);
  border-radius: 0.5rem;
  padding: 2rem 1.5rem;
  margin-top: -5rem;
  position: relative;
  z-index: 5;
}
.home-signup h3 {
  color: #fff;
  text-align: center;
  text-transform: uppercase;
  margin: 0 0 1.5rem;
  font-size: 1.5rem;
}

.scw-signup-form .scw-fields {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}
.scw-signup-form input[type="text"],
.scw-signup-form input[type="email"] {
  flex: 1 1 200px;
  max-width: 260px;
  padding: 0.55rem 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  font-family: inherit;
  font-size: 1rem;
}
.scw-signup-form .scw-submit { flex: 0 1 160px; }
.scw-signup-form .scw-hp { position: absolute; left: -9999px; }
.scw-msg { text-align: center; margin-top: 0.75rem; color: #fff; font-weight: 600; }
.scw-msg.error { color: #f5a3a3; }

/* Standalone (non-band) signup form, e.g. on pages */
.scw-signup-form.on-light .scw-msg { color: var(--navy); }
.scw-signup-form.on-light .scw-msg.error { color: #ffd6d6; }

/* ---------- Home about ---------- */
/* Image first in the markup: above the bio when stacked, right of it on desktop */
.home-about { padding: clamp(3rem, 7vw, 5rem) 0; }
.home-about .row { display: flex; align-items: center; gap: 3rem; flex-wrap: wrap; }
.home-about .col { flex: 1 1 400px; }
.home-about h2 { font-size: 2rem; font-weight: 800; }
@media (min-width: 992px) {
  .home-about .col-text { order: 1; }
  .home-about .col-img { order: 2; }
}

/* ---------- News grid ---------- */
.home-news { padding: clamp(3rem, 7vw, 5rem) 0; }
.home-news h2 { text-align: center; text-transform: uppercase; font-weight: 800; margin-bottom: 3rem; }
.news-grid { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: center; }
.news-grid .press-card { flex: 1 1 420px; max-width: 540px; }

.press-card { position: relative; background: var(--light); overflow: hidden; }
.press-card .image { position: relative; overflow: hidden; padding-top: 55.6%; display: block; }
.press-card .image img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.press-card:hover .image img { transform: scale(1.1); }
.press-card .overlay-bg {
  position: absolute;
  inset: 0;
  background: rgba(248, 213, 104, 0.5);
  border-bottom: 5px solid var(--navy);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.press-card .date { font-weight: 700; font-size: 0.9rem; margin: 0 0 0.25rem; }
.press-card .title { font-size: 1.4rem; font-weight: 700; margin: 0; padding-right: 4rem; }
.press-card .title a { color: var(--dark); }
.press-card .bottom-panel { margin-top: 1rem; }
.text-center { text-align: center; }

/* ---------- Page / archive / single ---------- */
.page-banner {
  background: var(--navy);
  color: #fff;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}
.page-banner h1 { margin: 0; text-transform: uppercase; font-weight: 800; }
.page-banner-image img { display: block; width: 100%; height: auto; }
.listing-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  margin: 0 0 1.75rem;
}

/* About Claire two-column layout + navy panel (mirrors the original page) */
.about-columns { display: flex; gap: 2.5rem; flex-wrap: wrap; align-items: flex-start; }
.about-columns > div { flex: 1 1 320px; }
.scw-navy-panel {
  background: var(--navy);
  color: #fff;
  padding: 2.5rem;
  margin-top: 2.5rem;
  border-radius: 0.25rem;
}
.scw-navy-panel p:last-child { margin-bottom: 0; }
.entry-content {
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 2rem);
  max-width: 860px;
  line-height: 1.7;
}
.entry-content img { border-radius: 0.25rem; margin: 1rem 0; }
.entry-content p { margin-bottom: 1.25rem; }
.entry-content h2, .entry-content h3 { margin-top: 2.25rem; margin-bottom: 1rem; }
.entry-content blockquote {
  border-left: 4px solid var(--gold);
  margin: 1.5rem 0;
  padding: 0.5rem 0 0.5rem 1.5rem;
  color: #495057;
}
.entry-content iframe, .news-list iframe, .speech-content iframe {
  max-width: 100%;
  border: 0;
}
.speech-content iframe { width: 100%; height: auto; aspect-ratio: 16 / 9; }

.news-list { padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 2rem); max-width: 860px; }
.news-list article { border-bottom: 1px solid #dee2e6; padding: clamp(1.75rem, 4vw, 2.5rem) 0; }
.news-list article:first-child { padding-top: 0; }
.news-list .date { font-weight: 700; font-size: 0.9rem; color: #6c757d; margin: 0 0 0.5rem; }
.news-list h2 { margin: 0 0 0.75rem; font-size: clamp(1.25rem, 3vw, 1.5rem); line-height: 1.35; }
.news-list h2 a { color: var(--dark); }
.news-list p { line-height: 1.65; }

.pagination { padding: 2rem 0; display: flex; gap: 0.5rem; justify-content: center; }
.pagination .page-numbers {
  padding: 0.4rem 0.85rem;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  color: var(--navy);
}
.pagination .page-numbers.current { background: var(--navy); color: #fff; border-color: var(--navy); }

.single-meta { color: #6c757d; font-weight: 600; margin-bottom: 1.5rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #fff; padding-top: 3rem; margin-top: 4rem; }
.site-footer .top {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-logo { flex: 0 1 300px; }
.footer-menu { flex: 1 1 220px; }
.footer-menu ul { list-style: none; margin: 0; padding: 0; }
.footer-menu a { color: #fff; display: inline-block; padding: 0.3rem 0; }
.footer-menu a:hover { color: var(--gold); }
.footer-social { flex: 0 1 200px; text-align: right; }
.footer-social h3 { margin: 0 0 0.75rem; }
.footer-social ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1rem; justify-content: flex-end; }
.footer-social a { color: var(--gold); font-size: 1.1rem; }
.site-footer .copyright {
  border-top: 1px solid rgba(255,255,255,0.2);
  margin-top: 2rem;
  padding: 1.25rem 0;
  text-align: center;
  font-size: 0.9rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; width: 100%; }
  .site-nav.is-open { display: block; }
  .site-nav > ul { flex-direction: column; align-items: stretch; padding-top: 1rem; }
  .site-nav .sub-menu { position: static; box-shadow: none; background: rgba(255,255,255,0.06); }
  .site-nav .sub-menu a { color: #fff; }
  .site-nav .sub-menu a:hover { background: none; color: var(--gold); }

  .hero-caption { text-align: center; padding: 2rem 1rem; }
  .hero-caption .top-line { font-size: 4.375rem; }
  .hero-caption .bottom-line { font-size: 2.375rem; }
  .home-signup { margin-top: 3rem; }
  .footer-social { text-align: left; }
  .footer-social ul { justify-content: flex-start; }
}

@media (max-width: 575px) {
  .hero { height: calc(100vh - 92px); }
  .hero-caption .top-line { font-size: 3.5rem; }
  .hero-caption .bottom-line { font-size: 1.8rem; }
  .press-card .title { padding-right: 0; font-size: 1.2rem; }

  /* Full-width form fields on phones */
  .scw-signup-form input[type="text"],
  .scw-signup-form input[type="email"] { max-width: 100%; flex-basis: 100%; }
  .scw-signup-form .scw-submit { flex: 1 1 100%; }
}


/* ---------- Page signup panel ---------- */
/* Blue panel matching the live site's contact panel (#3d5278, gold button). */
/* The form renders three separate .scw-fields rows, so gap cannot space them - */
/* the adjacent-sibling margin below is what puts air between the rows. */
.scw-signup-form .scw-fields { gap: 1rem; }
.scw-signup-form input[type="text"],
.scw-signup-form input[type="email"] { padding: 0.65rem 0.85rem; }

/* The intro paragraph immediately before the form becomes the panel heading. */
.entry-content p:has(+ .scw-signup-form.on-light) {
  background: #3d5278;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
  padding: 3rem 3rem 0;
}
.scw-signup-form.on-light {
  background: #3d5278;
  color: #fff;
  padding: 1.5rem 3rem 3rem;
}
.scw-signup-form.on-light .scw-fields { justify-content: flex-start; }
.scw-signup-form.on-light .scw-fields + .scw-fields { margin-top: 1rem; }
.scw-signup-form.on-light input[type="text"],
.scw-signup-form.on-light input[type="email"] { border-color: rgba(255,255,255,0.35); }
.scw-signup-form.on-light .scw-submit {
  background: var(--gold);
  color: var(--dark);
  border-color: var(--gold);
  border-radius: 0.25rem;
}
.scw-signup-form.on-light .scw-msg { color: #fff; }

/* Address on one line from tablet up. Below 768px the fields fall back to the */
/* theme's own wrapping, and below 576px to full width. min-width:0 lets the */
/* narrow State and Postcode shrink past their intrinsic input width. */
@media (min-width: 768px) {
  .scw-signup-form.on-light input[type="text"],
  .scw-signup-form.on-light input[type="email"] { max-width: none; min-width: 0; }
  .scw-signup-form.on-light .scw-fields { align-items: flex-end; }
.scw-signup-form.on-light .scw-field { max-width: none; min-width: 0; }
.scw-signup-form.on-light .scw-field-first_name,
.scw-signup-form.on-light .scw-field-last_name,
.scw-signup-form.on-light .scw-field-email { flex: 0 1 31%; }
.scw-signup-form.on-light .scw-field-address_street { flex: 0 1 33%; }
.scw-signup-form.on-light .scw-field-address_city { flex: 0 1 26%; }
.scw-signup-form.on-light .scw-field-address_state { flex: 0 1 13%; }
.scw-signup-form.on-light .scw-field-address_postcode { flex: 0 1 17%; }
}

/* Page banner: cap the height and crop, keeping the subject in frame. */
.page-banner-image img {
  height: clamp(240px, 30vw, 520px);
  object-fit: cover;
  object-position: center 20%;
}

/* ---------- Labelled fields ---------- */
/* Each input sits inside a <label class="scw-field"> with the field name above it, */
/* so the name stays visible once the placeholder (now an example) disappears. */
/* Required fields carry a gold asterisk, optional ones "(optional)". */
.scw-field {
display: flex;
flex-direction: column;
gap: 0.35rem;
flex: 1 1 200px;
max-width: 260px;
min-width: 0;
font-size: 0.9rem;
font-weight: 600;
}
.scw-field input[type="text"],
.scw-field input[type="email"] { flex: none; width: 100%; max-width: none; }
.scw-req { color: var(--gold); text-decoration: none; border: 0; cursor: help; }
.scw-opt { font-weight: 400; opacity: 0.8; font-size: 0.85em; }
.scw-signup-form input.is-invalid { border-color: #f5a3a3; box-shadow: 0 0 0 2px rgba(245, 163, 163, 0.45); }
/* Homepage band keeps its compact look: labels there are for screen readers only. */
.scw-signup-form:not(.on-light) .scw-label { position: absolute; left: -9999px; }
@media (max-width: 575px) {
.scw-field { max-width: 100%; flex-basis: 100%; }
}

/* About Claire: button at the foot of the navy panel */
.scw-navy-panel .scw-panel-cta { margin-top: 1.75rem; margin-bottom: 0; }
