@import "fonts-guild.css";

:root {
  --bg: #fcfbf8;
  --surface: #ffffff;
  --ink: #180c01;
  --cream: #f6f1ea;
  --border: #e5e0d5;
  --muted: #ece8df;
  --muted-fg: #7a7266;
  --hero-bg: #003057;
  --hero-fg: #ffffff;
  --hero-fg-muted: rgba(255, 255, 255, 0.72);
  --blue-accent: #00a3e0;
  --cta-red: #da291c;
  --red: #d92e27;
  --radius: 6px;

  --font-serif: "ABC Arizona Flare", Georgia, "Times New Roman", serif;
  --font-sans: "ABC Helveesti", Helvetica, Arial, sans-serif;
  --font-euclid: "Euclid Circular A", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.site-header .page-container {
  height: 64px;
  display: flex;
  align-items: center;
}
.site-header img {
  height: 32px;
  width: auto;
  display: block;
}

/* Hero */
.hero {
  background: var(--hero-bg);
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 0 0 24px 24px;
  overflow: hidden;
}
.hero .page-container {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: start;
  padding-top: 48px;
  padding-bottom: 48px;
}
.hero-eyebrow {
  font-family: var(--font-euclid);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hero-fg-muted);
  margin: 0 0 12px;
}
.hero h1 {
  font-family: var(--font-euclid);
  font-weight: 400;
  font-size: 44px;
  line-height: 1.1;
  color: var(--blue-accent);
  margin: 0 0 16px;
}
.hero p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--hero-fg);
  margin: 0 0 24px;
  max-width: 480px;
}
.hero-image {
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 3 / 2;
}
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.how-it-works {
  margin-bottom: 24px;
  max-width: 480px;
}
.how-it-works h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 10px;
  font-family: var(--font-euclid);
  color: var(--hero-fg);
}
.how-it-works ol {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--hero-fg);
  counter-reset: step;
}
.how-it-works li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 10px;
  counter-increment: step;
}
.how-it-works li:last-child {
  margin-bottom: 0;
}
.how-it-works li::before {
  content: counter(step);
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--hero-bg);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 16px;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  background: var(--cta-red);
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 26px;
  border-radius: 999px;
  text-decoration: none;
}
.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--hero-fg);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}
.btn-link-arrow {
  font-size: 14px;
}

.hero-note {
  font-size: 13px;
  line-height: 1.5;
  color: var(--hero-fg-muted);
  margin: 0 0 10px;
  max-width: 480px;
}
.hero-note:last-child {
  margin-bottom: 0;
}
.hero-note a {
  color: var(--hero-fg);
  font-weight: 600;
  text-decoration: underline;
}

/* Stats bar */
.stats-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: -32px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.stats-bar .stat {
  padding: 20px 24px;
}
.stats-bar .stat + .stat {
  border-left: 1px solid var(--border);
}
.stat-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-fg);
  margin-bottom: 6px;
}
.stat-value {
  font-size: 26px;
  font-weight: 600;
}

/* Main layout */
.main-wrap {
  padding-top: 40px;
  padding-bottom: 64px;
}
.catalog-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  align-items: start;
}

/* Sidebar */
.sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: sticky;
  top: 24px;
}
.field {
  margin-bottom: 18px;
}
.field label.field-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-fg);
  margin-bottom: 8px;
}

/* Search input (used in the toolbar over the cards) */
.search-input {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: var(--surface);
}
.search-input svg {
  flex: none;
  color: var(--muted-fg);
}
.search-input input {
  border: none;
  outline: none;
  font-size: 14px;
  width: 100%;
  font-family: var(--font-sans);
  background: transparent;
  color: var(--ink);
}

/* Multi-select dropdown */
.multiselect {
  position: relative;
}
.multiselect-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 8px 10px;
  font-size: 13.5px;
  font-family: var(--font-sans);
  cursor: pointer;
}
.multiselect-trigger svg {
  flex: none;
  color: var(--muted-fg);
}
.ms-trigger-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
.multiselect-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  z-index: 20;
}
.multiselect-panel.hidden {
  display: none;
}
.multiselect-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13.5px;
}
.multiselect-option:hover {
  background: var(--muted);
}
.multiselect-option input {
  margin: 0;
  flex: none;
}
.ms-option-label {
  flex: 1;
}
.ms-option-count {
  color: var(--muted-fg);
  font-size: 12px;
  flex: none;
}

.reset-btn {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 9px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
  color: var(--ink);
}
.reset-btn:hover {
  background: var(--muted);
}

.sidebar-note {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-top: 20px;
}
.sidebar-note-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.sidebar-note-icon {
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.sidebar-note-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.sidebar-note-body {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
}
.sidebar-note-body a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
}

/* Toolbar (search + sort, above the card grid) */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.toolbar .search-input {
  flex: 1;
}
.icon-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 10px;
  cursor: pointer;
  color: var(--ink);
  display: flex;
  flex: none;
}
select.sort-select {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13.5px;
  background: var(--surface);
  font-family: var(--font-sans);
  color: var(--ink);
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237a7266' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  flex: none;
}

/* Results header */
.results-header {
  margin-bottom: 16px;
}
.results-header h2 {
  font-size: 20px;
  margin: 0;
  font-weight: 600;
}

/* Cards */
.card-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.program-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}
.card-header {
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 700;
}
.card-header-credit {
  background: #e3efe3;
  color: #2f6b3a;
}
.card-header-noncredit {
  background: #f5e6c3;
  color: #755212;
}
.card-header-apprenticeship {
  background: #dbe8f7;
  color: #1f5aa8;
}

.card-body {
  padding: 16px;
}
.program-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.3;
  color: var(--ink);
  font-family: var(--font-sans);
}
.card-institution {
  font-size: 13.5px;
  color: #4a4438;
  margin-bottom: 12px;
}

.card-meta-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.card-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: #3c3327;
}
.card-meta-row svg {
  flex: none;
  color: var(--muted-fg);
}

.card-meta-row-stacked {
  align-items: flex-start;
}
.card-meta-row-stacked svg {
  margin-top: 2px;
}
.card-mode-lines {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-note {
  font-size: 13px;
  font-style: italic;
  color: var(--muted-fg);
  margin-bottom: 14px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.category-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid #b9d3ea;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11.5px;
  color: #2f5d8a;
  background: #eaf2fa;
  white-space: nowrap;
}
.code-line {
  font-size: 12px;
  color: var(--muted-fg);
  white-space: nowrap;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--muted-fg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
}
.site-footer .page-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.site-footer .footer-title {
  font-weight: 600;
  font-size: 15px;
  margin: 0 0 4px;
}
.site-footer .footer-sub {
  font-size: 13px;
  color: var(--muted-fg);
  margin: 0;
}
.footer-admin {
  text-align: right;
}
.footer-admin .footer-admin-label {
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-fg);
  margin: 0 0 4px;
}
.footer-admin svg {
  height: 20px;
  width: auto;
}

@media (max-width: 900px) {
  .hero .page-container {
    grid-template-columns: 1fr;
  }
  .hero-image {
    order: -1;
  }
  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 0;
  }
  .catalog-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
  }
  .card-list {
    grid-template-columns: 1fr;
  }
  .toolbar {
    flex-wrap: wrap;
  }
}
