/*
Theme Name:   ZeroWaste+ Status
Theme URI:    https://zerowaste.plus
Author:       RiseUp Africa Inc.
Author URI:   https://zerowaste.plus
Description:  A clean, minimal WordPress theme designed to perfectly match the ZeroWaste+ Status Page plugin. Features the ZW+ brand palette (deep green #1A6B3C, navy #1B3A5C), Space Grotesk + DM Sans typography, and a fully responsive layout. Best used as a dedicated status site theme alongside the ZeroWaste+ Status Page plugin.
Version:      1.1.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  zerowaste-theme
Tags:         one-column, custom-menu, custom-logo, full-width-template, responsive-layout, translation-ready
*/

/* ──────────────────────────────────────────────────────────────────────
   ZeroWaste+ Status Theme — Global Styles
   Brand: Green #1A6B3C | Navy #1B3A5C
────────────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ── TOKENS ── */
:root {
  --zw-green:       #1A6B3C;
  --zw-green-dark:  #145430;
  --zw-green-light: #e8f5ed;
  --zw-navy:        #1B3A5C;
  --zw-navy-light:  #eef2f7;
  --gray-50:   #f8fafb;
  --gray-100:  #f1f5f2;
  --gray-200:  #dde8e2;
  --gray-400:  #8ba89b;
  --gray-600:  #4a6358;
  --gray-900:  #1c2b24;
  --body-font:    'DM Sans', system-ui, sans-serif;
  --heading-font: 'Space Grotesk', system-ui, sans-serif;
  --radius:    12px;
  --radius-sm:  8px;
  --shadow:     0 1px 4px rgba(26,107,60,.08), 0 4px 16px rgba(26,107,60,.07);
  --max-width:  960px;
  --side-pad:   clamp(14px, 4vw, 40px);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--zw-green); }
a:hover { color: var(--zw-green-dark); }

/* ── BASE ── */
html { scroll-behavior: smooth; }
body {
  font-family: var(--body-font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--gray-900);
  background: #f5f7f5;
  -webkit-font-smoothing: antialiased;
}

/* ── SITE LAYOUT ── */
.site { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1; }

/* ── SITE HEADER / NAVBAR ── */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 8px rgba(26,107,60,.07);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--side-pad);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Logo */
.site-branding {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
/* Custom logo image — size controlled by Customizer (default 40px tall) */
.site-branding--logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-branding--logo .custom-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  line-height: 1;
}
.site-branding--logo .custom-logo-link img.custom-logo,
.site-branding img.custom-logo {
  height: 40px;         /* default — overridden by inline CSS from Customizer */
  width: auto;
  max-width: 160px;     /* default — overridden by inline CSS from Customizer */
  object-fit: contain;
  display: block;
}
.site-branding .logo-leaf { font-size: 26px; line-height: 1; }
.site-branding .logo-name {
  font-family: var(--heading-font);
  font-size: clamp(16px, 3vw, 20px);
  font-weight: 700;
  color: var(--zw-green);
}
.site-branding .logo-name sup { font-size: .55em; vertical-align: super; }
.site-branding .logo-tag,
.site-branding--logo .logo-tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-400);
  background: var(--gray-100);
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: .03em;
  white-space: nowrap;
}

/* Nav */
.main-navigation ul { list-style: none; display: flex; align-items: center; gap: 4px; }
.main-navigation a {
  display: block;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background .15s, color .15s;
}
.main-navigation a:hover,
.main-navigation .current-menu-item a {
  background: var(--zw-green-light);
  color: var(--zw-green);
}
.nav-cta {
  background: var(--zw-navy) !important;
  color: #fff !important;
  padding: 8px 16px !important;
}
.nav-cta:hover { background: var(--zw-green) !important; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none; border: none;
  cursor: pointer; padding: 6px;
  color: var(--gray-600);
  font-size: 22px;
}
.mobile-nav {
  display: none;
  background: #fff;
  border-top: 1px solid var(--gray-200);
  padding: 8px var(--side-pad) 14px;
}
.mobile-nav.open { display: block; }
.mobile-nav ul { list-style: none; }
.mobile-nav a {
  display: block; padding: 10px 4px;
  font-size: 14px; font-weight: 600;
  color: var(--gray-600); text-decoration: none;
  border-bottom: 1px solid var(--gray-100);
}
.mobile-nav a:hover { color: var(--zw-green); }

/* ── PAGE / CONTENT WRAPPER ── */
.page-content-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 48px) var(--side-pad);
}
.content-area {
  background: #fff;
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 40px);
  box-shadow: var(--shadow);
}

/* ── PAGE TITLE (for non-status pages) ── */
.page-header {
  margin-bottom: clamp(20px, 4vw, 32px);
  padding-bottom: 16px;
  border-bottom: 2px solid var(--gray-200);
}
.page-title {
  font-family: var(--heading-font);
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 700;
  color: var(--zw-navy);
}

/* ── TYPOGRAPHY ── */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  font-family: var(--heading-font);
  color: var(--zw-navy);
  line-height: 1.25;
  margin: 1.4em 0 .6em;
}
.entry-content h1 { font-size: clamp(24px, 4vw, 34px); }
.entry-content h2 { font-size: clamp(19px, 3vw, 26px); }
.entry-content h3 { font-size: clamp(16px, 2.5vw, 20px); }
.entry-content p  { margin-bottom: 1em; }
.entry-content ul,
.entry-content ol { padding-left: 1.5em; margin-bottom: 1em; }
.entry-content li { margin-bottom: .4em; }
.entry-content a  { color: var(--zw-green); text-decoration: underline; }
.entry-content a:hover { color: var(--zw-green-dark); }

/* ── FULL-WIDTH PAGE (for status page — no sidebar, no padding box) ── */
body.page-template-status .content-area {
  background: transparent;
  box-shadow: none;
  padding: 0;
}
body.page-template-status .page-content-wrap {
  padding-top: 0;
  padding-bottom: 0;
}

/* ── STATUS BANNER STRIP (above nav, site-wide) ── */
.zw-global-status-bar {
  background: var(--zw-green);
  color: #fff;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  padding: 6px var(--side-pad);
  letter-spacing: .02em;
}
.zw-global-status-bar a { color: #fff; text-decoration: underline; }
.zw-global-status-bar.degraded   { background: #854d0e; }
.zw-global-status-bar.outage     { background: #991b1b; }

/* ── SITE FOOTER ── */
.site-footer {
  background: var(--zw-navy);
  color: rgba(255,255,255,.7);
  padding: clamp(28px, 5vw, 48px) var(--side-pad);
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: clamp(24px, 4vw, 40px);
}
.footer-brand .logo-name {
  font-family: var(--heading-font);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.footer-brand p { font-size: 13px; line-height: 1.6; }
.footer-col h4 {
  font-family: var(--heading-font);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 12px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 7px; }
.footer-col a  { color: rgba(255,255,255,.65); font-size: 13px; text-decoration: none; transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  max-width: var(--max-width);
  margin: clamp(20px, 4vw, 36px) auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: rgba(255,255,255,.45);
}
.footer-bottom a { color: rgba(255,255,255,.65); text-decoration: none; }
.footer-bottom a:hover { color: #fff; }
.footer-status-dot {
  display: inline-block; width: 8px; height: 8px;
  background: var(--col-green, #22c55e);
  border-radius: 50%; margin-right: 5px;
  animation: pulse 2.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}

/* ── WIDGETS ── */
.widget-area { margin-top: 28px; }
.widget { margin-bottom: 28px; }
.widget-title {
  font-family: var(--heading-font);
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--gray-400);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-200);
}

/* ── BUTTONS ── */
.btn, button[type="submit"], input[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--zw-navy); color: #fff;
  border: none; border-radius: var(--radius-sm);
  padding: 10px 22px;
  font-size: 14px; font-family: var(--body-font); font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: background .18s, transform .12s;
}
.btn:hover, button[type="submit"]:hover, input[type="submit"]:hover {
  background: var(--zw-green); color: #fff;
}
.btn-green { background: var(--zw-green); }
.btn-green:hover { background: var(--zw-green-dark); }

/* ── FORM INPUTS ── */
input[type="text"],
input[type="email"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px; font-family: var(--body-font);
  color: var(--gray-900);
  background: #fff;
  outline: none;
  transition: border-color .15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--zw-green); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .main-navigation { display: none; }
  .nav-toggle { display: block; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
