/*
Theme Name: SWEK Community Static
Theme URI: https://www.swek.wa.gov.au/
Author: Shire of Wyndham East Kimberley
Author URI: https://www.swek.wa.gov.au/
Description: Standalone community directory & events theme for the Shire of Wyndham East Kimberley. Self-contained — installs and works on its own with no extra plugins. Creates its pages and menu automatically on activation.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
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: swek-community-static
Tags: community, directory, accessibility-ready, custom-menu, featured-images, translation-ready
*/

/* =====================================================================
   SWEK Community — standalone static theme
   Fresh, self-contained stylesheet. No frameworks, no dependencies.
   ===================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --green: #1f5c3d;
  --green-dark: #164229;
  --teal: #2b7a78;
  --ochre: #c96b1e;
  --burnt: #a8481b;
  --cream: #faf5ec;
  --cream-2: #f3ead9;
  --white: #ffffff;
  --ink: #2a2a28;
  --ink-soft: #56564f;
  --line: #e4dccb;
  --focus: #0b4b8f;

  --font: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --radius: 16px;
  --pill: 999px;
  --shadow: 0 8px 24px rgba(31, 45, 30, .08);
  --shadow-lg: 0 14px 34px rgba(31, 45, 30, .15);
  --wrap: 1180px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { line-height: 1.2; color: var(--green-dark); margin: 0 0 .5em; }
a { color: var(--burnt); }
a:hover { color: var(--green); }
ul { margin: 0; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -60px; z-index: 200;
  background: var(--green); color: #fff; padding: .75rem 1.25rem; border-radius: 12px;
  text-decoration: none; transition: top .2s ease;
}
.skip-link:focus { top: 1rem; color: #fff; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.note { color: var(--burnt); font-style: italic; font-size: .95rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.5rem; border: 2px solid transparent;
  border-radius: var(--pill); font-weight: 600; font-size: 1rem; cursor: pointer;
  text-decoration: none; transition: background-color .2s, color .2s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover { background: var(--green-dark); color: #fff; }
.btn--secondary { background: var(--teal); color: #fff; }
.btn--secondary:hover { background: #22615f; color: #fff; }
.btn--ghost { background: transparent; color: var(--green); border-color: var(--green); }
.btn--ghost:hover { background: var(--green); color: #fff; }
.btn--block { display: flex; width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--cream); border-bottom: 1px solid var(--line);
}
.site-header__inner {
  max-width: var(--wrap); margin: 0 auto; padding: .75rem 1.25rem;
  display: flex; align-items: center; gap: 1rem;
}
.brand { text-decoration: none; line-height: 1.05; margin-right: auto; }
.brand__eyebrow { display: block; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ochre); font-weight: 700; }
.brand__name { display: block; font-weight: 800; color: var(--green-dark); font-size: 1.05rem; }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; background: transparent; border: 2px solid var(--green);
  border-radius: 12px; cursor: pointer;
}
.nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after {
  content: ""; display: block; width: 22px; height: 2px; background: var(--green); position: relative;
}
.nav-toggle__bar::before { position: absolute; top: -7px; }
.nav-toggle__bar::after { position: absolute; top: 7px; }

.nav { display: none; }
body.nav-open .nav { display: block; width: 100%; }
.nav__list { list-style: none; padding: .5rem 0 0; margin: 0; display: flex; flex-direction: column; gap: .15rem; }
.nav__list a { display: block; padding: .7rem .5rem; text-decoration: none; color: var(--ink); font-weight: 600; border-radius: 8px; }
.nav__list a:hover, .nav__list a[aria-current="page"] { color: var(--green); background: var(--cream-2); }
.header-actions { display: flex; align-items: center; gap: .6rem; padding-top: .5rem; }

/* ---------- Search bar ---------- */
.search {
  display: flex; align-items: stretch; gap: .5rem; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: var(--pill);
  padding: .35rem .35rem .35rem 1rem;
}
.search__icon { display: inline-flex; align-items: center; color: var(--teal); }
.search__input { flex: 1 1 200px; border: 0; background: transparent; font-size: 1rem; padding: .6rem .25rem; min-height: 44px; }
.search__input:focus { outline: none; }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; background: linear-gradient(135deg, #6b4a2a 0%, #c96b1e 55%, #a8481b 100%); z-index: 0; }
.hero__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,25,18,.78), rgba(20,25,18,.3) 65%, rgba(20,25,18,.08)); }
.hero__inner { position: relative; z-index: 1; max-width: var(--wrap); margin: 0 auto; padding: 3rem 1.25rem 5rem; }
.hero h1 { color: #fff; font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); max-width: 16ch; }
.hero__lead { font-size: 1.15rem; max-width: 54ch; color: #f4efe6; margin: 0 0 1.5rem; }
.hero__search { max-width: 640px; margin-bottom: 1.5rem; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero__ctas .btn--ghost { color: #fff; border-color: #fff; }
.hero__ctas .btn--ghost:hover { background: #fff; color: var(--green); }
.hero__wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 70px; z-index: 1; display: block; }

/* ---------- Sections ---------- */
.section { padding: 3rem 0; }
.section__title { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.125rem); color: var(--ochre); margin-bottom: 1.5rem; }
.section__title--center { text-align: center; }
.section__head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.section__head .actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* ---------- Category shortcuts ---------- */
.cats { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
.cat {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem .75rem;
  text-align: center; text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
  min-height: 120px; transition: box-shadow .2s, transform .15s;
}
.cat:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); color: var(--green); }
.cat__icon { font-size: 1.9rem; color: var(--teal); }
.cat__label { font-weight: 700; font-size: .95rem; }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }

.feature { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.feature__media { height: 150px; background: linear-gradient(135deg, var(--teal), var(--green)); }
.feature--events .feature__media { background: linear-gradient(135deg, var(--ochre), var(--burnt)); }
.feature--new .feature__media { background: linear-gradient(135deg, var(--green), var(--teal)); }
.feature__body { padding: 1.25rem; position: relative; }
.feature__body h3 { font-size: 1.3rem; margin-bottom: .4rem; }
.feature__body h3 a { text-decoration: none; color: var(--green-dark); }
.feature__body h3 a::after { content: ""; position: absolute; inset: 0; }
.feature__arrow { position: absolute; right: 1.25rem; bottom: 1.1rem; color: var(--ochre); font-size: 1.3rem; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: box-shadow .2s, transform .15s; }
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card__media { position: relative; aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--cream-2), var(--line)); }
.card__badge { position: absolute; top: .75rem; left: .75rem; background: var(--ochre); color: #fff; padding: .25rem .75rem; border-radius: var(--pill); font-size: .72rem; font-weight: 700; }
.card__body { padding: 1.1rem 1.25rem 1.25rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card__eyebrow { margin: 0; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--teal); }
.card__date { margin: 0; font-size: .9rem; color: var(--burnt); font-weight: 600; }
.card__date span { display: block; font-weight: 500; color: var(--ink-soft); }
.card__title { margin: 0; font-size: 1.15rem; }
.card__title a { text-decoration: none; color: var(--green-dark); }
.card__title a:hover { color: var(--ochre); }
.card__meta { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .9rem; color: var(--ink-soft); }
.card__excerpt { margin: 0; font-size: .95rem; }
.card__cta { margin-top: auto; font-weight: 700; color: var(--green); text-decoration: none; display: inline-flex; gap: .35rem; }
.card__cta:hover { color: var(--ochre); }

/* ---------- Popular + explore ---------- */
.popular { display: grid; gap: 2rem; grid-template-columns: 1fr; }
.chips { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); }
.chip { display: flex; align-items: center; min-height: 48px; padding: .5rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-weight: 600; }
.chip:hover { border-color: var(--teal); color: var(--green); }
.explore { border-radius: var(--radius); overflow: hidden; background: var(--green); color: #fff; }
.explore__media { min-height: 180px; background: linear-gradient(135deg, #6b4a2a, var(--ochre)); }
.explore__body { padding: 1.5rem; }
.explore__body h2 { color: #fff; }
.explore__body p { color: #eef3ea; margin: 0 0 1.25rem; }

/* ---------- New to town band ---------- */
.newtown { background: var(--cream-2); }
.newtown__links { list-style: none; padding: 0; margin: 1rem 0 1.5rem; display: grid; gap: .5rem; }
.newtown__links a { font-weight: 600; }

/* ---------- Archive layout + filters ---------- */
.page-head { padding: 2rem 0 0; }
.page-head h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); }
.page-head p { font-size: 1.1rem; color: var(--ink-soft); max-width: 60ch; }
.layout { display: grid; gap: 2rem; grid-template-columns: 1fr; padding: 1.5rem 0 3rem; }
.count { font-weight: 700; margin: 0 0 1rem; }

.filters { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.filters__head { display: flex; align-items: center; justify-content: space-between; }
.filters__head h2 { margin: 0; font-size: 1.15rem; }
.filters__toggle { display: inline-flex; background: var(--cream-2); border: 1px solid var(--line); border-radius: var(--pill); padding: .5rem 1rem; cursor: pointer; min-height: 44px; }
.filters__body { margin-top: 1rem; }
.fgroup { margin-bottom: 1.25rem; border: 0; padding: 0; }
.fgroup > legend, .flabel { font-weight: 700; margin-bottom: .5rem; display: block; padding: 0; }
.finput { width: 100%; min-height: 44px; padding: .5rem .75rem; border: 1px solid var(--line); border-radius: 10px; font-size: 1rem; background: #fff; }
.foptions { display: grid; gap: .4rem; }
.foption { display: flex; align-items: center; gap: .6rem; min-height: 40px; cursor: pointer; }
.foption input { width: 20px; height: 20px; }
.factions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* ---------- Breadcrumbs ---------- */
.crumbs { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem; padding: 0; margin: 0 0 1rem; font-size: .9rem; }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: .5rem; color: var(--ink-soft); }
.crumbs a { color: var(--teal); text-decoration: none; }
.crumbs [aria-current="page"] { color: var(--ink-soft); }

/* ---------- Forms ---------- */
.form { max-width: 760px; margin-top: 1.5rem; }
.form fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; margin: 0 0 1.5rem; background: #fff; }
.form legend { font-weight: 800; font-size: 1.15rem; color: var(--green-dark); padding: 0 .5rem; }
.row { margin-bottom: 1rem; }
.row label { display: block; font-weight: 600; margin-bottom: .35rem; }
.form-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.form input, .form select, .form textarea {
  width: 100%; min-height: 48px; padding: .6rem .75rem; border: 1px solid var(--line);
  border-radius: 10px; font-size: 1rem; font-family: inherit; background: #fff;
}
.form textarea { min-height: 110px; }
.hint { font-size: .85rem; color: var(--ink-soft); margin: .35rem 0 0; }
.check { display: flex; gap: .6rem; align-items: flex-start; margin-bottom: .75rem; font-weight: 500; }
.check input { margin-top: .3rem; width: 20px; height: 20px; }
.req { color: var(--burnt); }

/* ---------- Prose ---------- */
.prose { max-width: 72ch; }
.prose h2 { color: var(--ochre); margin-top: 2rem; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin: .35rem 0; }

/* ---------- Acknowledgement ---------- */
.acknowledgement { background: var(--cream-2); border-top: 1px solid var(--line); }
.acknowledgement__inner { max-width: 900px; margin: 0 auto; padding: 2.5rem 1.25rem; text-align: center; }
.acknowledgement h2 { color: var(--ochre); font-size: 1.5rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green); color: #eef3ea; }
.site-footer__inner { max-width: var(--wrap); margin: 0 auto; padding: 3rem 1.25rem 1.5rem; display: grid; gap: 2rem; grid-template-columns: 1fr; }
.site-footer h2 { color: #fff; font-size: 1.05rem; margin-bottom: .75rem; }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: .5rem; }
.site-footer a { color: #d9e6db; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-tag { color: #cfe0d2; }
.footer-social { display: flex; gap: .75rem; margin-top: 1rem; }
.footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.12); }
.site-footer__bar { border-top: 1px solid rgba(255,255,255,.18); }
.site-footer__bar .inner { max-width: var(--wrap); margin: 0 auto; padding: 1.25rem; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.footer-legal { list-style: none; display: flex; flex-wrap: wrap; gap: 1rem; padding: 0; margin: 0; }

/* ---------- Responsive ---------- */
@media (min-width: 600px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .form-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .cats { grid-template-columns: repeat(4, 1fr); }
  .chips { grid-template-columns: repeat(2, 1fr); }
  .newtown__links { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .nav { display: flex !important; align-items: center; justify-content: flex-end; gap: 1.5rem; flex: 1; }
  .nav__list { flex-direction: row; align-items: center; padding: 0; gap: .25rem; }
  .header-actions { padding-top: 0; }
  .cats { grid-template-columns: repeat(4, 1fr); }
  .popular { grid-template-columns: 3fr 2fr; align-items: start; }
  .layout { grid-template-columns: 300px 1fr; }
  .filters__toggle { display: none; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
  .site-footer__inner { grid-template-columns: 1.5fr 1fr 1fr 1.2fr; }
}
@media (min-width: 1200px) {
  .cats { grid-template-columns: repeat(8, 1fr); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .btn:hover, .card:hover, .cat:hover { transform: none; }
}
