/* ========================================================================
   Wildfire Garden Corporate Learning - style.css
   Design: geometric_structured (geometric shapes, structured flex layouts)
   Brand: Navy (#0B2545), Teal (#1E9E8E), Accent (#F4F7FA)
   Fonts: Trebuchet MS (display), Verdana (body)
   ======================================================================== */

/* ===================== CSS RESET & NORMALIZE ===================== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { height: 100%; }
body, h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding-left: 1.2rem; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { background: none; border: none; color: inherit; font: inherit; padding: 0; cursor: pointer; }
:focus { outline: 2px solid #1E9E8E; outline-offset: 2px; }

/* ===================== CSS VARIABLES (with fallbacks in usage) ===================== */
:root {
  --wg-primary: #0B2545;
  --wg-secondary: #1E9E8E;
  --wg-accent: #F4F7FA;
  --wg-text: #0B2545;
  --wg-muted: #556987;
  --wg-white: #FFFFFF;
  --wg-border: #DFE6EE;
  --wg-shadow: 0 6px 18px rgba(11,37,69,0.08);
  --radius-2: 4px;
  --radius-3: 8px;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 20px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --space-8: 60px;
  --maxw: 1200px;
}

/* ===================== BASE TYPOGRAPHY ===================== */
body {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  color: var(--wg-text);
  background: var(--wg-white);
  line-height: 1.6;
  font-size: 16px;
}
h1, h2, h3 {
  font-family: "Trebuchet MS", "Segoe UI", Verdana, Arial, sans-serif;
  letter-spacing: 0.02em; /* geometric precision */
}
h1 { font-size: 40px; line-height: 1.2; }
h2 { font-size: 28px; line-height: 1.25; margin-bottom: var(--space-4); }
h3 { font-size: 20px; line-height: 1.3; }
p { font-size: 16px; color: var(--wg-text); }
small { font-size: 14px; color: var(--wg-muted); }
strong { font-weight: 700; }

/* Links */
a { color: var(--wg-secondary); }
a:hover { color: #177e71; }

/* ===================== LAYOUT PRIMITIVES (Flex-only) ===================== */
.container {
  display: flex; /* flex container to center content */
  width: 100%;
  justify-content: center;
  padding: 0 var(--space-4);
}
.content-wrapper {
  display: flex;
  flex-direction: column; /* mobile-first vertical */
  gap: var(--space-5);
  width: 100%;
  max-width: var(--maxw);
}

/* Global section spacing */
main > section { padding: var(--space-7) 0; }

/* MANDATORY SPACING CLASSES */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; }
.content-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.text-image-section { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.testimonial-card { display: flex; align-items: center; gap: 20px; padding: 20px; }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* ===================== HEADER & NAV ===================== */
header { position: sticky; top: 0; background: var(--wg-white); border-bottom: 1px solid var(--wg-border); z-index: 50; }
header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-3) 0; }
.logo { display: flex; align-items: center; }
.logo img { height: 36px; width: auto; }

.main-nav { display: none; align-items: center; gap: var(--space-4); }
.main-nav a {
  color: var(--wg-text);
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-2);
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.06em; /* angular feel */
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.main-nav a[aria-current="page"] { color: var(--wg-secondary); border-color: var(--wg-secondary); }
.main-nav a:hover { background: var(--wg-accent); border-color: var(--wg-border); }

/* Mobile burger */
.mobile-menu-toggle {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border: 2px solid var(--wg-primary);
  color: var(--wg-primary);
  border-radius: 6px;
  background: var(--wg-white);
  transition: background 0.2s ease, transform 0.2s ease;
}
.mobile-menu-toggle:hover { background: var(--wg-accent); transform: translateY(-1px); }

/* Mobile menu panel */
.mobile-menu {
  position: fixed; top: 0; right: 0; bottom: 0; width: 85%; max-width: 360px;
  background: var(--wg-accent);
  box-shadow: -8px 0 24px rgba(11,37,69,0.18);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 100;
  display: flex; flex-direction: column; padding: var(--space-5);
  gap: var(--space-4);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-close {
  align-self: flex-end;
  width: 40px; height: 40px; border: 2px solid var(--wg-primary);
  border-radius: 6px; background: var(--wg-white); color: var(--wg-primary);
}
.mobile-nav { display: flex; flex-direction: column; gap: var(--space-3); }
.mobile-nav a {
  padding: 12px 10px; background: var(--wg-white);
  border: 1px solid var(--wg-border);
  border-radius: var(--radius-2);
  color: var(--wg-text); font-weight: 600; letter-spacing: 0.04em;
}
.mobile-nav a[aria-current="page"] { border-color: var(--wg-secondary); color: var(--wg-secondary); }

/* ===================== HERO ===================== */
.hero { background: var(--wg-accent); position: relative; }
/* Geometric accent band */
.hero::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: var(--wg-secondary);
}
.hero h1 { color: var(--wg-primary); }
.hero p { color: var(--wg-muted); max-width: 70ch; }

.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

/* Trust bar */
.trust-bar { display: flex; flex-direction: column; gap: var(--space-3); padding-top: var(--space-4); border-top: 1px solid var(--wg-border); }
.trust-bar p { font-weight: 700; color: var(--wg-primary); }
.key-metrics { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.key-metrics > div {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 14px 16px; background: var(--wg-white); border: 1px solid var(--wg-border);
  border-radius: var(--radius-3); box-shadow: var(--wg-shadow);
  min-width: 140px; flex: 1 1 160px;
}
.key-metrics strong { font-size: 22px; color: var(--wg-primary); }
.key-metrics span { font-size: 14px; color: var(--wg-muted); }

/* ===================== BUTTONS ===================== */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 18px; border: 2px solid var(--wg-primary);
  color: var(--wg-primary); background: var(--wg-white);
  border-radius: 6px; /* subtle but angular */
  text-transform: uppercase; font-weight: 800; letter-spacing: 0.08em;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.button:hover { background: var(--wg-accent); box-shadow: var(--wg-shadow); transform: translateY(-1px); }
.button.primary { background: var(--wg-secondary); border-color: var(--wg-secondary); color: var(--wg-white); }
.button.primary:hover { background: #177e71; border-color: #177e71; }

/* ===================== CONTENT SECTIONS ===================== */
/* Feature and service grids (structured with flex) */
.feature-grid, .service-grid, .footer-columns {
  display: flex; flex-wrap: wrap; gap: var(--space-5); justify-content: space-between;
}
.text-section {
  background: var(--wg-white);
  border: 1px solid var(--wg-border);
  border-radius: var(--radius-3);
  padding: var(--space-5);
  box-shadow: var(--wg-shadow);
  display: flex; flex-direction: column; gap: var(--space-3);
  flex: 1 1 100%;
}
.text-section h3 { color: var(--wg-primary); }
.text-section p { color: var(--wg-text); }
.text-section ul { margin: 0; display: flex; flex-direction: column; gap: 8px; }

/* Testimonials - light background with dark text for contrast */
.testimonial-card {
  background: var(--wg-accent);
  border: 1px solid var(--wg-border);
  border-radius: var(--radius-3);
  box-shadow: var(--wg-shadow);
  color: var(--wg-text);
}
.testimonial-card p { font-style: italic; color: var(--wg-primary); }
.testimonial-card .client { color: var(--wg-muted); }

/* Lists inside content wrapper */
.content-wrapper > ul, .content-wrapper ul {
  display: flex; flex-direction: column; gap: 8px;
}

/* Breadcrumbs */
nav[aria-label="Breadcrumbs"] { display: flex; flex-wrap: wrap; gap: 8px; color: var(--wg-muted); font-size: 14px; }
nav[aria-label="Breadcrumbs"] a { color: var(--wg-secondary); }

/* ===================== FOOTER ===================== */
footer { background: var(--wg-primary); color: var(--wg-white); margin-top: var(--space-8); }
footer a { color: var(--wg-white); opacity: 0.9; }
footer a:hover { opacity: 1; }
footer .content-wrapper { padding: var(--space-7) 0; }
.footer-columns .text-section {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.15);
  color: var(--wg-white);
}
.footer-columns nav { display: flex; flex-direction: column; gap: 10px; }

/* ===================== COOKIE CONSENT BANNER & MODAL ===================== */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
  display: flex; justify-content: center;
  transform: translateY(120%); /* hidden by default */
  transition: transform 0.3s ease;
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-banner .cookie-inner {
  display: flex; flex-direction: column; gap: var(--space-3);
  width: 100%; max-width: var(--maxw);
  margin: var(--space-4);
  padding: var(--space-4);
  background: var(--wg-white);
  border: 2px solid var(--wg-primary);
  border-radius: 10px; box-shadow: 0 12px 30px rgba(11,37,69,0.2);
}
.cookie-buttons { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.cookie-buttons .accept { background: var(--wg-secondary); border-color: var(--wg-secondary); color: var(--wg-white); }
.cookie-buttons .reject { background: var(--wg-white); border-color: var(--wg-primary); color: var(--wg-primary); }
.cookie-buttons .settings { background: var(--wg-accent); border-color: var(--wg-primary); color: var(--wg-primary); }
.cookie-buttons .button { padding: 10px 16px; }

/* Cookie modal */
.cookie-modal-backdrop {
  position: fixed; inset: 0; background: rgba(11,37,69,0.5); z-index: 130;
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
.cookie-modal-backdrop.open { opacity: 1; pointer-events: auto; }
.cookie-modal {
  position: fixed; right: 0; top: 0; bottom: 0; width: 95%; max-width: 520px; z-index: 140;
  background: var(--wg-white); border-left: 6px solid var(--wg-secondary);
  box-shadow: -12px 0 32px rgba(11,37,69,0.25);
  transform: translateX(100%); transition: transform 0.3s ease;
  display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6);
}
.cookie-modal.open { transform: translateX(0); }
.cookie-modal .modal-header { display: flex; align-items: center; justify-content: space-between; }
.cookie-modal .modal-body { display: flex; flex-direction: column; gap: var(--space-4); }
.cookie-category { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--wg-border); }
/* Toggle switch */
.toggle { position: relative; width: 46px; height: 26px; border: 2px solid var(--wg-primary); border-radius: 20px; background: var(--wg-accent); transition: background 0.2s ease; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; background: var(--wg-primary); border-radius: 50%; transition: transform 0.2s ease, background 0.2s ease; }
.toggle.on { background: rgba(30,158,142,0.2); border-color: var(--wg-secondary); }
.toggle.on::after { transform: translateX(20px); background: var(--wg-secondary); }

/* ===================== UTILITIES & MICRO-INTERACTIONS ===================== */
.shadow { box-shadow: var(--wg-shadow); }
.badge { display: inline-flex; align-items: center; padding: 4px 10px; border: 1px solid var(--wg-border); border-radius: 999px; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }

/* Cards hover lift */
.text-section:hover, .testimonial-card:hover { transform: translateY(-2px); transition: transform 0.15s ease; }

/* ===================== RESPONSIVE (Mobile-first) ===================== */
@media (min-width: 600px) {
  h1 { font-size: 44px; }
  .cta-row { flex-direction: row; }
}

@media (min-width: 768px) {
  .main-nav { display: flex; }
  .mobile-menu-toggle { display: none; }

  /* Structured grids */
  .feature-grid .text-section, .service-grid .text-section {
    flex: 1 1 calc(50% - var(--space-5));
  }
  .footer-columns .text-section {
    flex: 1 1 calc(50% - var(--space-5));
  }

  /* Text-image sections */
  .text-image-section { flex-direction: row; }
}

@media (min-width: 1024px) {
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
  h3 { font-size: 22px; }

  .feature-grid .text-section, .service-grid .text-section {
    flex: 1 1 calc(33.333% - var(--space-5));
  }
  .footer-columns .text-section {
    flex: 1 1 calc(25% - var(--space-5));
  }
}

/* ===================== ACCESSIBILITY & STATES ===================== */
.button:focus, .main-nav a:focus, .mobile-nav a:focus { box-shadow: 0 0 0 3px rgba(30,158,142,0.35); }

/* ===================== PAGE-SPECIFIC TUNING ===================== */
/* Index: approach list spacing */
.hero + section .feature-grid, .service-grid { align-items: stretch; }

/* Case studies inline emphasis */
.service-grid .text-section p em { background: var(--wg-accent); padding: 2px 6px; border-radius: 4px; }

/* Resources library density */
[aria-current="page"] { font-weight: 800; }

/* Contact page buttons */
main a.button { align-self: flex-start; }

/* ===================== FORMS & INPUTS (general future-proofing) ===================== */
input, select, textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--wg-border); border-radius: var(--radius-2);
  font: inherit; color: var(--wg-text); background: var(--wg-white);
}
input:focus, select:focus, textarea:focus { border-color: var(--wg-secondary); box-shadow: 0 0 0 3px rgba(30,158,142,0.2); }

/* ===================== PRINT BASICS ===================== */
@media print {
  header, .mobile-menu, .cookie-banner, .cookie-modal, footer { display: none !important; }
  a { text-decoration: underline; }
}

/* ===================== SAFETY: Ensure minimum gaps ===================== */
.text-section, .testimonial-card { margin-bottom: 20px; }

/* ===================== END ===================== */
