/* ==========================================================================
   GOSHEN WEB X — UNIFIED DESIGN SYSTEM (main.css)
   Generated from: tokens.css + base.css + components.css + layout.css
   This is the ONLY stylesheet public pages should load.
   Do not add <style> blocks or extra Google Font links in individual
   page files — extend this file instead.
   ========================================================================== */

/* ==========================================================================
   GOSHEN WEB X — DESIGN TOKENS
   Single source of truth for color, type, spacing, radius, shadow.
   Every other stylesheet and every page MUST use these variables —
   never hardcode a hex color, a font stack, or a spacing value directly.
   ========================================================================== */

:root {
  /* ---- Brand color: canonical green scale ----
     #1A9E72 was already used 42x across the codebase before this refactor —
     kept as the single source of truth instead of inventing a new brand color. */
  --forest-deep:  #072A20;
  --forest:       #0B3D2E;
  --forest-mid:   #0F5239;
  --green:        #1A9E72;   /* primary brand green */
  --green-dark:   #0F7B4F;   /* darker accent, hovers */
  --green-light:  #D5EFE5;
  --green-dim:    #ECF7F2;
  --green-soft:   #E8F5EE;
  --green-line:   #B8DFC9;

  /* ---- Neutrals ---- */
  --ink:          #111C17;
  --ink-2:        #2D3F37;
  --ink-3:        #627A6F;
  --white:        #FFFFFF;
  --off-white:    #F8FAF9;
  --canvas:       #F2F6F4;
  --rule:         #E3EBE7;
  --border:       #E5E8E5;

  /* ---- Semantic text colors (use these in components) ---- */
  --text:         var(--ink);
  --text-2:       var(--ink-2);
  --text-3:       var(--ink-3);
  --bg:           var(--white);
  --bg-section:   var(--off-white);

  /* ---- Status colors ---- */
  --danger:       #e74c3c;
  --danger-bg:    #FDE8E8;
  --danger-text:  #9b1c1c;
  --warning:      #f39c12;
  --warning-bg:   #FDF3D0;
  --warning-text: #7c5a00;
  --success:      #1A9E72;
  --success-bg:   #D1FAE5;

  /* ---- Typography ----
     IBM Plex Sans is the single site-wide font (public + admin).
     IBM Plex Mono is reserved for code/numeric/technical accents. */
  --font-sans: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SF Mono', monospace;

  --text-xs:   12px;
  --text-sm:   14px;
  --text-base: 16px;
  --text-lg:   19px;
  --text-xl:   22px;
  --text-2xl:  28px;
  --text-3xl:  36px;
  --text-4xl:  46px;
  --text-5xl:  58px;
  --text-6xl:  64px;

  /* ---- Spacing scale (multiples of 4px) ---- */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* ---- Radius ---- */
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 14px;
  --radius-xl: 16px;
  --radius-full: 999px;

  /* ---- Shadow ---- */
  --shadow-sm: 0 2px 10px rgba(0,63,45,.08);
  --shadow-md: 0 8px 24px rgba(26,158,114,.12);
  --shadow-lg: 0 20px 60px rgba(0,63,45,.12), 0 4px 12px rgba(0,0,0,.06);

  /* ---- Layout ---- */
  --container-max: 1160px;
  --container-pad: 40px;
  --header-h: 88px;
  --nav-h: 66px;

  /* ---- Admin-only tokens (used only under body.admin) ---- */
  --admin-sidebar-w: 240px;
  --admin-bg: #f4f6f8;
}

/* Backward-compatible aliases.
   Older page templates (not yet migrated) may still reference these names —
   keeping them mapped to canonical tokens prevents visual breakage during
   the page-by-page rollout instead of requiring a single risky big-bang edit. */
:root {
  --sans: var(--font-sans);
  --mono: var(--font-mono);
  --font: var(--font-sans);
  --text2: var(--text-2);
  --text3: var(--text-3);
}
/* ==========================================================================
   BASE — reset, typography, layout primitives
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--forest);
}
p { margin: 0; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.container-narrow {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.section {
  padding: var(--space-24) 0;
}
.section-alt {
  background: var(--bg-section);
}
.section-sm {
  padding: var(--space-16) 0;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-3); }

/* Reveal utility — INTENTIONALLY INERT.
   Pages still use class="reveal" (many templates reference it), but content
   is shown instantly with no fade/slide-in. Navigating between pages should
   feel static — new content simply appears, no motion draws attention to
   the fact that a page changed. */
.reveal { opacity: 1; transform: none; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 768px) {
  :root { --container-pad: 20px; }
  .section { padding: var(--space-16) 0; }
}
/* ==========================================================================
   COMPONENTS — reusable across every public page
   Naming convention: .btn is the base class, always paired with ONE
   modifier for color (btn-primary / btn-outline / btn-white) and
   optionally ONE size modifier (btn-sm / btn-lg).
   ========================================================================== */

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--green) 0%, var(--forest-mid) 100%);
  color: var(--white);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-outline {
  background: transparent;
  color: var(--text-2);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--green); color: var(--green); }

.btn-white {
  background: var(--white);
  color: var(--forest);
}
.btn-white:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.btn-ghost-white {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,.35);
}
.btn-ghost-white:hover { background: rgba(255,255,255,.1); border-color: var(--white); }

.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #c0392b; }

.btn-sm { font-size: var(--text-xs); padding: 8px 16px; }
.btn-lg { font-size: var(--text-base); padding: 15px 32px; }

/* Legacy aliases so unmigrated pages using .btn-green / .btn-secondary keep working */
.btn-green { background: linear-gradient(135deg, var(--green) 0%, var(--forest-mid) 100%); color: var(--white); }
.btn-green:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-secondary { background: transparent; color: var(--text-2); border: 1.5px solid var(--border); }
.btn-solid-white { background: var(--white); color: var(--forest); }

/* ---- Cards ---- */
.card {
  background: var(--white);
  border: 1.5px solid var(--rule);
  border-radius: var(--radius);
  padding: var(--space-8);
  transition: all 0.2s ease;
}
.card:hover {
  border-color: var(--green);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.card-icon {
  width: 56px;
  height: 56px;
  background: var(--green-dim);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
}
.card-icon svg { width: 28px; height: 28px; stroke: var(--green); fill: none; stroke-width: 2; }
.card h3 { font-size: var(--text-xl); margin-bottom: var(--space-3); }
.card p { font-size: var(--text-base); color: var(--text-3); line-height: 1.7; }

/* ---- Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.badge-success { background: var(--success-bg); color: var(--forest); }
.badge-warning { background: var(--warning-bg); color: var(--warning-text); }
.badge-danger  { background: var(--danger-bg); color: var(--danger-text); }

/* ---- Page hero (generalizes about-hero / careers hero / etc.) ---- */
.page-hero {
  background: linear-gradient(135deg, var(--forest-deep) 0%, var(--forest) 100%);
  padding: 120px 0 80px;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(26,158,114,.5), transparent);
}
.page-hero h1 { font-size: var(--text-6xl); color: var(--white); margin-bottom: var(--space-5); }
.page-hero p { font-size: var(--text-xl); color: rgba(255,255,255,.85); max-width: 680px; margin: 0 auto; line-height: 1.7; }

/* ---- Photo hero (for pages with a real background image) ----
   Usage: <div class="img-hero" style="background-image:url('...')">
            <div class="img-hero-overlay"></div>
            <div class="img-hero-inner">...</div>
          </div>
   One consistent, generous hero treatment reused across any page that
   needs a photo backdrop, instead of each page inventing its own. */
.img-hero {
  position: relative;
  padding: 140px 0 110px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  min-height: 460px;
  display: flex;
  align-items: center;
}
.img-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(7,42,32,.92) 0%, rgba(11,61,46,.82) 100%);
  z-index: 1;
}
.img-hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  text-align: center;
  width: 100%;
}
.img-hero h1 { font-size: var(--text-6xl); color: var(--white); margin-bottom: var(--space-5); }
.img-hero p { font-size: var(--text-xl); color: rgba(255,255,255,.85); max-width: 640px; margin: 0 auto; line-height: 1.7; }

@media (max-width: 768px) {
  .img-hero { padding: 100px 0 72px; min-height: 360px; }
}

/* ---- Stats bar (generalizes about.php's stats-bar) ---- */
.stats-bar { background: var(--forest); padding: var(--space-16) 0; text-align: center; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 1120px; margin: 0 auto; gap: var(--space-12); }
.stat-item { border-right: 1px solid rgba(255,255,255,.1); }
.stat-item:last-child { border-right: none; }
.stat-number { font-size: var(--text-5xl); font-weight: 700; color: var(--white); margin-bottom: var(--space-2); letter-spacing: -0.03em; }
.stat-label { font-size: var(--text-base); color: rgba(255,255,255,.6); font-weight: 500; }

/* ---- Two-column layout (generalizes about.php's two-col) ---- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-20); align-items: center; max-width: 1080px; margin: 0 auto; }
.two-col h2 { font-size: var(--text-4xl); color: var(--forest); margin-bottom: var(--space-6); }
.two-col p { font-size: var(--text-lg); color: var(--text-2); line-height: 1.75; margin-bottom: var(--space-4); }
.col-image { background: var(--canvas); border-radius: var(--radius-xl); aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; border: 1px solid var(--rule); }
.col-image svg { width: 120px; height: 120px; stroke: var(--green); fill: none; stroke-width: 1.5; }

/* ---- Grid of cards (generalizes values-grid) ---- */
.card-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.card-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }

/* ---- Forms ---- */
.form-group { margin-bottom: var(--space-5); }
.form-label { display: block; font-size: var(--text-sm); font-weight: 600; color: var(--text-2); margin-bottom: var(--space-2); }
.form-input, .form-textarea, .form-select {
  width: 100%;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text);
  transition: border-color .2s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-dim);
}
.form-textarea { resize: vertical; min-height: 120px; }

/* ---- Alerts ---- */
.alert { padding: var(--space-4) var(--space-5); border-radius: var(--radius-sm); font-size: var(--text-sm); margin-bottom: var(--space-5); }
.alert-success { background: var(--success-bg); color: var(--forest); border: 1px solid var(--green-line); }
.alert-danger  { background: var(--danger-bg); color: var(--danger-text); border: 1px solid #f5b5b5; }
.alert-warning { background: var(--warning-bg); color: var(--warning-text); border: 1px solid #f5d77a; }

@media (max-width: 968px) {
  .two-col, .card-grid-3, .card-grid-2 { grid-template-columns: 1fr; gap: var(--space-10); }
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
}
/* ==========================================================================
   LAYOUT — site header, navigation, footer
   This is the ONLY place these selectors are defined. Do not redeclare
   .header-top, nav, .footer-* etc. inside any individual page again —
   that duplication is exactly what caused the header/footer conflicts.
   ========================================================================== */

/* ---- Header row 1: logo + login ---- */
.header-top {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 16px 32px;
  position: sticky;
  top: 0;
  z-index: 210;
}
.header-top-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-10);
}
.logo-section { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.logo-icon {
  width: 56px; height: 56px;
  background: var(--green);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--green-line);
  box-shadow: var(--shadow-sm);
}
.logo-icon img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }
.logo-icon svg { width: 28px; height: 28px; stroke: var(--white); fill: none; stroke-width: 1.5; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text strong { font-size: 18px; font-weight: 800; color: var(--forest); letter-spacing: -0.02em; }
.logo-text span { font-size: 12px; font-weight: 500; color: var(--text-3); letter-spacing: -0.01em; }

.header-actions { display: flex; align-items: center; gap: var(--space-4); margin-left: auto; }
.login-link {
  font-size: var(--text-sm); font-weight: 600; color: var(--text);
  text-decoration: none; padding: 8px 16px; border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.login-link:hover { color: var(--green); background: var(--green-soft); }

/* ---- Header row 2: navigation ---- */
.site-nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  width: 100%;
  z-index: 200;
  backdrop-filter: blur(10px);
}
.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  gap: var(--space-10);
}
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; flex: 1; margin: 0; padding: 0; }
.nav-links > li { position: relative; }
.nav-links > li > a {
  font-size: 15px; font-weight: 600; color: var(--text-2);
  padding: 20px 18px; display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none; border-bottom: 3px solid transparent;
  transition: all 0.2s; letter-spacing: -0.01em;
}
.nav-links > li > a:hover,
.nav-links > li > a.active { color: var(--green); border-bottom-color: var(--green); }
.nav-links > li > a.dropdown-trigger::after { content: '▼'; font-size: 10px; margin-left: 4px; transition: transform 0.2s; }
.nav-links > li:hover > a.dropdown-trigger::after { transform: rotate(180deg); }

/* Mega dropdown */
.mega-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: -32px;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--green);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px 48px;
  min-width: 950px;
  z-index: 300;
}
.nav-links > li:hover > .mega-dropdown { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-12); }
.mega-col { display: flex; flex-direction: column; gap: var(--space-5); }
.mega-item { display: flex; flex-direction: column; gap: var(--space-2); }
.mega-title { font-size: 16px; font-weight: 700; color: var(--forest); letter-spacing: -0.01em; }
.mega-desc { font-size: var(--text-sm); color: var(--text-3); line-height: 1.6; }
.mega-link { font-size: 13px; font-weight: 600; color: var(--green); text-decoration: none; transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px; width: fit-content; }
.mega-link:hover { color: var(--forest); gap: 10px; }
.mega-divider { height: 1px; background: var(--border); margin: var(--space-3) 0; }

.nav-actions { display: flex; align-items: center; gap: var(--space-3); margin-left: auto; flex-shrink: 0; }

/* Push page content below the fixed nav */
main, body > .container:first-of-type { padding-top: var(--nav-h); }

/* ---- Footer ---- */
footer {
  background: var(--ink);
  color: var(--white);
  margin-top: var(--space-20);
  padding: var(--space-16) 32px var(--space-10);
}
.footer-grid {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-10);
}
.footer-brand a { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--white); margin-bottom: var(--space-4); }
.footer-brand img { width: 36px; height: 36px; border-radius: var(--radius-sm); }
.footer-brand strong { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.footer-brand p { font-size: var(--text-sm); color: rgba(255,255,255,.7); line-height: 1.6; margin-bottom: var(--space-5); }
.footer-social { display: flex; gap: var(--space-3); }
.social-icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--white); text-decoration: none; font-weight: 600; font-size: 12px;
  transition: all 0.2s;
}
.social-icon:hover { background: var(--green); }
.fc-title { font-size: 12px; font-weight: 700; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .09em; margin-bottom: var(--space-4); }
.fc-links { display: flex; flex-direction: column; gap: var(--space-2); }
.fc-links a { font-size: var(--text-sm); color: rgba(255,255,255,.8); text-decoration: none; transition: color 0.2s; }
.fc-links a:hover { color: var(--green); }
.footer-bottom {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: rgba(255,255,255,.6);
}
.footer-legal { display: flex; gap: var(--space-6); }
.footer-legal a { color: rgba(255,255,255,.6); text-decoration: none; transition: color 0.2s; }
.footer-legal a:hover { color: var(--green); }

@media (max-width: 968px) {
  .site-nav { display: none; } /* mobile nav handled separately — flagged in migration notes */
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: var(--space-4); text-align: center; }
}
