/* CODAA — College of the Desert Adjunct Association
   One hand-written stylesheet. No framework, no build step. */

:root {
  /* sampled from the CODAA logo: red gradient #e50f2b → #9a0115, gold #f2bd29 */
  --maroon: #9a0115;
  --maroon-dark: #6e000f;
  --maroon-deep: #4a000a;
  --red-bright: #c41229;
  --gold: #f2bd29;
  --gold-light: #fdd35c;
  --ink: #221f1f;
  --ink-soft: #55504e;
  --paper: #faf8f5;
  --white: #ffffff;
  --line: #e6e0d8;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(34, 20, 10, .08);
  --shadow-lift: 0 8px 24px rgba(34, 20, 10, .14);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- reset-ish ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; }
a { color: var(--maroon); }
a:hover { color: var(--maroon-dark); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section-tint { background: #f2ede5; }
.center { text-align: center; }
.mt { margin-top: 40px; }
.muted { color: var(--ink-soft); }

h1, h2, h3 { line-height: 1.25; font-weight: 700; }
h1 { font-size: 2.2rem; margin: .2em 0; }
h2 { font-size: 1.6rem; margin: 0 0 .6em; }
h3 { font-size: 1.15rem; margin: 0 0 .4em; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--gold); color: var(--ink); padding: 8px 16px; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- top bar ---------- */
.topbar {
  background: var(--maroon-deep);
  color: #f0d9a8;
  font-size: .78rem;
  letter-spacing: .03em;
}
.topbar-inner {
  display: flex; justify-content: space-between; gap: 12px;
  padding-top: 6px; padding-bottom: 6px;
}
.topbar-affil { white-space: nowrap; }

/* ---------- header ---------- */
.site-header {
  background: linear-gradient(180deg, var(--red-bright), var(--maroon));
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 76px;
}
.brand { display: flex; align-items: center; text-decoration: none; }
.brand-logo { height: 56px; width: auto; display: block; }

.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav > ul { display: flex; align-items: center; gap: 2px; }
.site-nav .nav-link {
  display: inline-block; padding: 10px 13px;
  color: #fff; text-decoration: none; font-weight: 600; font-size: .92rem;
  background: none; border: 0; cursor: pointer; font-family: inherit;
  border-radius: 6px;
}
.site-nav .nav-link:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.nav-join {
  background: var(--gold) !important; color: var(--maroon-deep) !important;
  border-radius: 999px !important; padding: 8px 18px !important;
}
.nav-join:hover { background: var(--gold-light) !important; }
.caret { font-size: .7em; opacity: .8; }

.has-sub { position: relative; }
.sub {
  position: absolute; top: 100%; left: 0; min-width: 230px;
  background: var(--white); border-radius: 8px; box-shadow: var(--shadow-lift);
  padding: 8px !important; margin: 0;
  display: none; flex-direction: column; align-items: stretch; gap: 0 !important;
}
.has-sub:hover .sub, .has-sub:focus-within .sub, .has-sub.open .sub { display: flex; }
.sub li { width: 100%; }
.sub a {
  display: block; padding: 9px 14px; text-decoration: none;
  color: var(--ink); border-radius: 6px; font-size: .92rem;
}
.sub a:hover { background: var(--paper); color: var(--maroon); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 10px; }
.nav-toggle span {
  display: block; width: 24px; height: 3px; margin: 4px 0;
  background: #fff; border-radius: 2px; transition: .2s;
}

/* ---------- hero ---------- */
.hero { position: relative; color: #fff; overflow: hidden; }
.hero-media {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 65%;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(74, 0, 10, .92) 0%, rgba(110, 0, 15, .78) 45%, rgba(74, 0, 10, .45) 100%);
}
.hero-content { position: relative; padding: 90px 20px 96px; max-width: 1100px; }
.hero-kicker {
  text-transform: uppercase; letter-spacing: .18em; font-size: .8rem;
  color: var(--gold-light); font-weight: 700; margin: 0 0 10px;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.1rem); margin: 0 0 14px; max-width: 16em; }
.hero-lead { font-size: 1.15rem; max-width: 34em; margin: 0 0 26px; color: #f5ece0; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 999px;
  font-weight: 700; text-decoration: none; font-size: .95rem;
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.btn-gold { background: var(--gold); color: var(--maroon-deep); }
.btn-gold:hover { background: var(--gold-light); color: var(--maroon-deep); }
.btn-outline { border: 2px solid #fff; color: #fff; }
.btn-outline:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.btn-outline-dark { border: 2px solid var(--maroon); color: var(--maroon); }
.btn:not(.btn-gold):not(.btn-outline):not(.btn-outline-dark) {
  background: var(--maroon); color: #fff;
}
.btn-doc { background: var(--maroon); color: #fff; }

/* ---------- page hero ---------- */
.page-hero {
  background: linear-gradient(120deg, var(--maroon-deep), var(--maroon));
  color: #fff; padding: 44px 0 40px;
}
.page-hero h1 { margin: 0; }
.page-hero .hero-sub { margin: 10px 0 0; color: #f3e4c2; max-width: 44em; }
.page-hero .crumb { margin: 0 0 8px; font-size: .85rem; }
.page-hero .crumb a { color: var(--gold-light); text-decoration: none; }
.post-cats { margin: 12px 0 0; }

/* ---------- sections & cards ---------- */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 26px;
}
.section-head h2 { margin: 0; }
.more-link { font-weight: 700; text-decoration: none; white-space: nowrap; }

.card-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.card-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 18px 20px 22px; }
.card-date {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-soft); margin: 0 0 6px;
}
.card-body h3 a { text-decoration: none; color: var(--ink); }
.card-body h3 a:hover { color: var(--maroon); }
.card-excerpt { margin: 6px 0 0; font-size: .92rem; color: var(--ink-soft); }

/* ---------- tiles ---------- */
.tile-grid {
  display: grid; gap: 20px; margin-top: 30px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.tile {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px 22px; text-decoration: none; color: var(--ink);
  border-top: 4px solid var(--gold);
  transition: transform .15s, box-shadow .15s;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); color: var(--ink); }
.tile-icon { font-size: 1.9rem; display: block; margin-bottom: 10px; }
.tile h3 { color: var(--maroon); }
.tile p { margin: 0; font-size: .9rem; color: var(--ink-soft); }

/* ---------- documents ---------- */
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.doc-item a {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px; text-decoration: none; color: var(--ink);
  border-left: 4px solid var(--maroon);
  transition: transform .12s, box-shadow .12s;
}
.doc-item a:hover { transform: translateX(3px); box-shadow: var(--shadow-lift); }
.doc-icon { font-size: 1.4rem; line-height: 1.2; }
.doc-item strong { display: block; }
.doc-item small { color: var(--ink-soft); }
.doc-group { margin-bottom: 40px; }
.doc-group > h2 { border-bottom: 3px solid var(--gold); display: inline-block; padding-bottom: 4px; }

/* ---------- news list ---------- */
.cat-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.chip {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: var(--white); box-shadow: var(--shadow);
  text-decoration: none; color: var(--ink); font-size: .85rem; font-weight: 600;
}
.chip:hover { color: var(--maroon); }
.chip-active { background: var(--maroon); color: #fff !important; }
.chip-sm { font-size: .75rem; padding: 4px 12px; box-shadow: none; background: rgba(255,255,255,.15); color: #fff; }
.chip-sm:hover { color: var(--gold-light); }

.news-list { display: grid; gap: 22px; }
.news-row {
  display: grid; grid-template-columns: 200px 1fr; gap: 20px;
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; align-items: start;
}
.news-row:has(> div:only-child) { grid-template-columns: 1fr; }
.news-thumb { border-radius: 8px; overflow: hidden; display: block; aspect-ratio: 4 / 3; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-row h2 { font-size: 1.2rem; margin: 0 0 6px; }
.news-row h2 a { text-decoration: none; color: var(--ink); }
.news-row h2 a:hover { color: var(--maroon); }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 36px; }
.page-num {
  display: inline-block; min-width: 38px; text-align: center; padding: 8px 0;
  background: var(--white); border-radius: 8px; box-shadow: var(--shadow);
  text-decoration: none; color: var(--ink); font-weight: 600;
}
.page-num.current { background: var(--maroon); color: #fff; }

/* ---------- article prose ---------- */
.prose { max-width: 760px; margin: 0 auto; }
.prose-left { margin: 0; }
.prose img { border-radius: var(--radius); }
.prose figure { margin: 28px 0; }
.prose figcaption { font-size: .85rem; color: var(--ink-soft); text-align: center; }
.prose blockquote {
  border-left: 4px solid var(--gold); margin: 24px 0; padding: 4px 22px;
  color: var(--ink-soft); font-style: italic;
}
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.post-hero { width: 100%; margin-bottom: 28px; }
.prose .wp-block-image, .prose .wp-block-gallery { text-align: center; }
.prose .aligncenter { margin-left: auto; margin-right: auto; display: block; }

/* ---------- pdf embeds ---------- */
.pdf-card { margin: 30px 0; }
.pdf-embed {
  width: 100%; height: 560px; border: 1px solid var(--line);
  border-radius: var(--radius); background: #fff; display: block;
}
iframe.pdf-embed { border: 1px solid var(--line); }
.pdf-embed-tall { height: 75vh; min-height: 520px; margin-top: 30px; }
.pdf-card-actions { text-align: center; margin: 14px 0 0; }
.contract-feature { max-width: 760px; }

/* ---------- gallery ---------- */
.gallery-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.gallery-item { margin: 0; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.gallery-item figcaption { padding: 12px 14px; font-size: .85rem; color: var(--ink-soft); }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: flex;
  align-items: center; justify-content: center;
  background: rgba(20, 8, 4, .92); padding: 4vmin;
}
.lightbox img { max-width: 92vw; max-height: 90vh; border-radius: 8px; }
.lightbox-close {
  position: absolute; top: 16px; right: 20px; font-size: 2rem;
  background: none; border: 0; color: #fff; cursor: pointer;
}

/* ---------- footer ---------- */
.site-footer { background: var(--maroon-deep); color: #e9dcc4; margin-top: 40px; }
.footer-inner {
  display: grid; gap: 36px; padding: 48px 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.footer-brand {
  color: var(--gold-light); font-weight: 800; font-size: 1.5rem;
  letter-spacing: .08em; margin: 0 0 6px;
}
.footer-col h3 {
  color: var(--gold-light); font-size: .95rem;
  text-transform: uppercase; letter-spacing: .1em;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 6px 0; }
.footer-col a { color: #e9dcc4; text-decoration: none; }
.footer-col a:hover { color: var(--gold-light); }
.footer-col p { font-size: .92rem; }
.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, .15);
  padding: 16px 0; font-size: .8rem; color: #c9b896;
}
.footer-legal-inner {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.footer-legal a { color: var(--gold-light); text-decoration: none; }
.footer-legal a:hover { text-decoration: underline; }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--maroon-dark); box-shadow: var(--shadow-lift);
    max-height: calc(100vh - 100px); overflow-y: auto;
  }
  .site-nav.open { display: block; }
  .site-nav > ul { flex-direction: column; align-items: stretch; padding: 12px; gap: 2px; }
  .site-nav .nav-link { display: block; width: 100%; text-align: left; }
  .nav-join { text-align: center !important; margin-top: 6px; }
  .sub {
    position: static; display: none; box-shadow: none;
    background: rgba(0, 0, 0, .18); border-radius: 8px;
  }
  .has-sub.open .sub { display: flex; }
  .has-sub:hover .sub { display: none; } /* no hover menus on mobile */
  .has-sub.open .sub { display: flex !important; }
  .sub a { color: #f5ece0; }
  .sub a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
  .news-row { grid-template-columns: 1fr; }
  .news-thumb { max-height: 220px; }
  .topbar-inner { justify-content: center; }
  .topbar-inner span:first-child { display: none; }
  .hero-content { padding: 64px 20px 70px; }
}

@media print {
  .site-header, .topbar, .site-footer, .nav-toggle, .hero-ctas { display: none; }
  body { background: #fff; }
}
