/*
Theme Name: Santa Noeta Parent
Theme URI: https://santanoeta.com
Description: Parent theme for the Santa Noeta learning environment. Five child themes inherit from this base. Do not activate this theme directly — activate the appropriate child theme for each site.
Version: 1.1.0
Author: Steve Bronack, CSUSB
License: GNU General Public License v2 or later
Text Domain: santa-noeta
*/

/* ============================================================
   CSS CUSTOM PROPERTIES
   Child themes override these in their own style.css.
   ============================================================ */

:root {
  /* Colors — overridden by child themes */
  --color-primary:   #5B7B6E;
  --color-secondary: #C4956A;
  --color-accent:    #3D7A8A;
  --color-bg:        #FAF9F6;
  --color-bg-alt:    #EEF0EB;
  --color-text:      #2C2C2C;
  --color-text-muted:#6B7280;
  --color-border:    #D1D5DB;
  --color-white:     #FFFFFF;

  /* Typography */
  --font-heading: 'Lora', Georgia, serif;
  --font-body:    'Source Sans 3', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* Scale */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  /* Layout */
  --max-width-content: 720px;
  --max-width-wide:    1100px;
  --max-width-full:    1400px;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--color-accent); text-decoration: underline; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); font-weight: 600; }
h6 { font-size: var(--text-base); font-weight: 600; }

p { margin-bottom: var(--space-4); }

p:last-child { margin-bottom: 0; }

.text-muted { color: var(--color-text-muted); }
.text-small { font-size: var(--text-sm); }
.text-large { font-size: var(--text-lg); }

/* ============================================================
   LAYOUT
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container--narrow {
  max-width: var(--max-width-content);
}

.container--wide {
  max-width: var(--max-width-full);
}

.section {
  padding: var(--space-16) 0;
}

.section--sm {
  padding: var(--space-8) 0;
}

.section--lg {
  padding: var(--space-24) 0;
}

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

@media (max-width: 768px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
}

/* Flex utilities */
.flex { display: flex; }
.flex--center { align-items: center; justify-content: center; }
.flex--between { align-items: center; justify-content: space-between; }
.flex--gap { gap: var(--space-4); }

/* ============================================================
   SITE HEADER
   ============================================================ */

.site-header {
  background-color: var(--color-white);
  border-bottom: 3px solid var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  max-width: var(--max-width-full);
  margin: 0 auto;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}

.site-logo:hover { color: var(--color-accent); text-decoration: none; }

.site-logo img {
  height: 48px;
  width: auto;
}

/* Navigation */
.primary-nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-6);
  align-items: center;
}

.primary-nav a {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-2) 0;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  text-decoration: none;
}

.nav-cta {
  background-color: var(--color-primary);
  color: var(--color-white) !important;
  padding: var(--space-2) var(--space-4) !important;
  border-radius: var(--radius-sm);
  border-bottom: none !important;
}

.nav-cta:hover {
  background-color: var(--color-accent) !important;
  color: var(--color-white) !important;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .primary-nav { display: none; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; padding: var(--space-4) 0; }
  .site-header__inner { flex-wrap: wrap; }
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: var(--space-24) 0;
  position: relative;
  overflow: hidden;
}

.hero--image {
  background-size: cover;
  background-position: center;
}

.hero--image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero__eyebrow {
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-secondary);
  margin-bottom: var(--space-3);
}

.hero__title {
  font-size: var(--text-5xl);
  color: var(--color-white);
  margin-bottom: var(--space-6);
  line-height: 1.1;
}

.hero__subtitle {
  font-size: var(--text-xl);
  opacity: 0.9;
  margin-bottom: var(--space-8);
  line-height: 1.5;
}

.hero__actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn--primary {
  background-color: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.btn--primary:hover {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
  text-decoration: none;
}

.btn--outline {
  background-color: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}

.btn--outline:hover {
  background-color: var(--color-white);
  color: var(--color-primary);
  text-decoration: none;
}

.btn--secondary {
  background-color: var(--color-secondary);
  color: var(--color-white);
  border-color: var(--color-secondary);
}

/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition-base);
}

.card:hover { box-shadow: var(--shadow-md); }

.card__image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card__body { padding: var(--space-6); }

.card__eyebrow {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.card__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
}

.card__excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Staff / NPC bio card */
.bio-card {
  display: flex;
  gap: var(--space-6);
  align-items: flex-start;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6);
}

.bio-card__photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--color-primary);
}

.bio-card__title { font-size: var(--text-lg); margin-bottom: var(--space-1); }
.bio-card__role { font-size: var(--text-sm); color: var(--color-primary); font-weight: 600; margin-bottom: var(--space-3); }
.bio-card__bio { font-size: var(--text-sm); color: var(--color-text-muted); }
.bio-card__quote {
  font-style: italic;
  border-left: 3px solid var(--color-primary);
  padding-left: var(--space-4);
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text);
}

@media (max-width: 600px) {
  .bio-card { flex-direction: column; }
  .bio-card__photo { width: 80px; height: 80px; }
}

/* ============================================================
   NEWS / GAZETTE
   ============================================================ */

.news-ticker {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
  overflow: hidden;
}

.news-ticker__label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: var(--space-4);
  background: var(--color-accent);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */

.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-header__eyebrow {
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.section-header__title { margin-bottom: var(--space-4); }

.section-header__subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================================
   SITE FOOTER
   ============================================================ */

.site-footer {
  background-color: var(--color-text);
  color: var(--color-white);
  padding: var(--space-12) 0 var(--space-6);
  margin-top: var(--space-24);
}

.site-footer a { color: var(--color-secondary); }
.site-footer a:hover { color: var(--color-white); }

.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.site-footer__brand { font-family: var(--font-heading); }
.site-footer__tagline { font-size: var(--text-sm); opacity: 0.7; margin-top: var(--space-2); }

.site-footer__col-title {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-secondary);
  margin-bottom: var(--space-4);
}

.site-footer__col ul { list-style: none; }
.site-footer__col ul li { margin-bottom: var(--space-2); font-size: var(--text-sm); }

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  opacity: 0.6;
}

@media (max-width: 768px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__bottom { flex-direction: column; gap: var(--space-2); text-align: center; }
}

/* ============================================================
   UTILITIES
   ============================================================ */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.highlight-bar {
  border-left: 4px solid var(--color-primary);
  padding-left: var(--space-4);
  margin: var(--space-6) 0;
}

.tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  background-color: var(--color-bg-alt);
  color: var(--color-primary);
}

.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-8) 0;
}

/* ============================================================
   NETWORK SWITCHER BAR (top of every page — item #7a)
   ============================================================ */

.sn-netbar {
  background: var(--color-text);
  color: var(--color-white);
  font-size: var(--text-xs);
}

.sn-netbar__inner {
  max-width: var(--max-width-full);
  margin: 0 auto;
  min-height: 36px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-1) var(--space-6);
}

.sn-netbar__label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.6;
}

.sn-netbar__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  margin: 0;
}

.sn-netbar__list li { margin: 0; }

.sn-netbar__list a {
  color: var(--color-white);
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.sn-netbar__list a:hover { opacity: 1; color: var(--color-secondary); text-decoration: none; }

.sn-netbar__list .is-current span {
  color: var(--color-secondary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================================
   BREADCRUMBS (item #2)
   ============================================================ */

.breadcrumbs {
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
}

.breadcrumbs .container {
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

.breadcrumbs a { color: var(--color-text-muted); }
.breadcrumbs a:hover { color: var(--color-primary); text-decoration: underline; }
.breadcrumbs__sep { color: var(--color-text-muted); opacity: 0.6; }
.breadcrumbs [aria-current="page"] { color: var(--color-text); font-weight: 600; }

/* ============================================================
   PRIMARY NAV — nowrap labels + dropdown submenus (item #1)
   ============================================================ */

.primary-nav > ul > li { position: relative; white-space: nowrap; }

.primary-nav .menu-item-has-children > a::after {
  content: '\25BE'; /* ▾ */
  margin-left: 0.35em;
  font-size: 0.8em;
  opacity: 0.7;
}

.primary-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  flex-direction: column;
  gap: 0;
  background: var(--color-white);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-sm);
  border-top: 3px solid var(--color-primary);
  padding: var(--space-2) 0;
  margin: 0;
  list-style: none;
  z-index: 200;
}

.primary-nav li.menu-item-has-children:hover > .sub-menu,
.primary-nav li.menu-item-has-children:focus-within > .sub-menu { display: flex; }

.primary-nav .sub-menu li { white-space: nowrap; }

.primary-nav .sub-menu a {
  display: block;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  border-bottom: none;
  color: var(--color-text);
}

.primary-nav .sub-menu a:hover {
  background: var(--color-bg-alt);
  color: var(--color-primary);
  border-bottom: none;
  text-decoration: none;
}

@media (max-width: 768px) {
  /* Mobile: the whole nav is in the collapsed panel — show submenus inline (expanded). */
  .primary-nav .sub-menu {
    display: block;
    position: static;
    box-shadow: none;
    border-top: none;
    border-radius: 0;
    background: transparent;
    padding: 0 0 0 var(--space-4);
    min-width: 0;
  }
  .primary-nav .sub-menu a { color: var(--color-text); }
  .primary-nav .menu-item-has-children > a::after { content: ''; margin: 0; }
}

/* ============================================================
   EQUAL-HEIGHT GRID CARDS (item #6)
   ============================================================ */

.grid > .card { height: 100%; display: flex; flex-direction: column; }
.grid > .card .card__body { display: flex; flex-direction: column; flex: 1 1 auto; }
/* push a trailing CTA/button to the bottom so they line up across a row */
.card__body > .btn:last-child,
.card__body > p:last-child > .btn:only-child { margin-top: auto; }

/* ============================================================
   FOOTER — two-zone brand/network rebuild (item #7b)
   (overrides the earlier .site-footer__grid rules above)
   ============================================================ */

.site-footer__grid {
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: var(--space-8) var(--space-16);
}

.site-footer__note {
  font-size: var(--text-sm);
  opacity: 0.7;
  margin-top: var(--space-3);
  max-width: 40ch;
}

.site-footer__network-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  margin: 0;
}

.site-footer__network-list li { margin: 0; font-size: var(--text-sm); }
.site-footer__network-list .is-current span { color: var(--color-white); font-weight: 700; opacity: 0.9; }

@media (max-width: 768px) {
  .site-footer__grid { grid-template-columns: 1fr; }
}
