
:root {
  --orange: #f37021;
  --orange-dark: #d95a12;
  --orange-light: #ffe4cf;
  --beige: #fdf3ea;
  --beige-soft: #fbeee0;
  --white: #ffffff;
  --text-dark: #2b2320;
  --text-muted: #6b5f57;
  --border-soft: #f0e2d4;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 3px 10px rgba(243, 112, 33, 0.08);
  --shadow-md: 0 8px 22px rgba(243, 112, 33, 0.12);
  --header-h: 92px;
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

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

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; color: var(--text-dark); }

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

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
  white-space: nowrap;
}

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

.btn-outline {
  background: transparent;
  color: var(--orange);
  border-color: var(--orange);
}
.btn-outline:hover {
  background: var(--orange);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-login {
  padding: 12px 28px;
  font-size: 0.95rem;
}

.btn-block { width: 100%; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
  transition: box-shadow 0.3s ease;
}
.site-header.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,0.06); }

.header-inner {
  width: 100%;
  height: var(--header-h);
  padding-inline: clamp(20px, 4vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text-dark);
  flex-shrink: 0;
}
.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}
.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.logo-text span { color: var(--orange); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 36px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-link {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 1rem;
  position: relative;
  padding: 6px 2px;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--orange);
  transition: width 0.25s ease;
}
.nav-link:hover, .nav-link.active { color: var(--orange); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-dark);
  cursor: pointer;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: min(640px, calc(100vh - var(--header-h)));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 44px 24px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(43, 35, 32, 0.45) 0%, rgba(43, 35, 32, 0.6) 100%);
}

.eyebrow {
  display: inline-block;
  background: var(--orange-light);
  color: var(--orange-dark);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.eyebrow.center { display: block; width: fit-content; margin: 0 auto 12px; }

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
}
.hero-content h1 {
  color: var(--white);
  font-size: clamp(2rem, 4vw + 1rem, 3.2rem);
  line-height: 1.15;
  margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.hero-content p {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 1vw + 0.7rem, 1.15rem);
  max-width: 480px;
  margin: 0 auto 26px;
}
.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Public enrollment status (landing page hero) */
.hero-enroll-status {
  margin: 28px auto 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  max-width: 100%;
}
.hero-enroll-status[hidden] { display: none; }
.hero-enroll-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-dark);
}
.hero-enroll-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #9a8f88;
  flex-shrink: 0;
}
.hero-enroll-status.open .hero-enroll-dot { background: #1f9254; box-shadow: 0 0 0 4px rgba(31, 146, 84, 0.18); }
.hero-enroll-status.upcoming .hero-enroll-dot { background: #d99a0b; }
.hero-enroll-status.closed .hero-enroll-dot { background: #c0392b; }
.hero-enroll-status.open #heroEnrollLabel { color: #1f9254; }
.hero-enroll-status.closed #heroEnrollLabel { color: #c0392b; }
.hero-enroll-term { font-size: 0.85rem; color: var(--text-dark); font-weight: 600; }
.hero-enroll-dates { font-size: 0.8rem; color: var(--text-muted); }

.btn-hero-outline {
  background: var(--white);
  color: var(--text-dark);
}
.btn-hero-outline:hover {
  background: var(--beige);
  transform: translateY(-2px);
}

/* ===== Section shared ===== */
.hero, .about, .levels, .contact { padding: 56px 0; scroll-margin-top: calc(var(--header-h) + 24px); }
.about { background: var(--white); }
.levels { background: var(--beige); }
.contact { background: var(--white); }

.section-head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 32px;
}
.section-head h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  margin-bottom: 10px;
}
.section-head p { color: var(--text-muted); font-size: 0.92rem; }

/* ===== Card grids ===== */
.card-grid {
  display: grid;
  gap: 18px;
}
.card-grid.two-col { grid-template-columns: repeat(2, 1fr); }
.card-grid.three-col { grid-template-columns: repeat(3, 1fr); }
.card-grid.four-col { grid-template-columns: repeat(4, 1fr); }

/* Horizontal scrolling strip for programs: one row of cards that scrolls
   sideways, so adding courses never makes the section taller. */
.program-track {
  display: flex;
  /* Centered when the cards fit; "safe" keeps the first card reachable when they overflow and scroll. */
  justify-content: center;
  justify-content: safe center;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 8px 4px 18px;
  scroll-padding-inline: 4px;
}
.program-track:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 4px;
  border-radius: var(--radius-md);
}
.program-track > .level-card {
  flex: 0 0 min(280px, 80vw);
  scroll-snap-align: start;
}
/* Empty, loading and error messages span the whole strip */
.program-track > p { flex: 0 0 100%; }

/* Program card (current design). Column layout keeps the chips at the
   bottom so cards with different numbers of majors still line up. */
.program-card {
  display: flex;
  flex-direction: column;
}
.program-card .program-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 8px;
}
.program-card h3 {
  color: var(--text-dark);
  line-height: 1.35;
  min-height: 2.7em; /* two lines, so titles don't push the chips around */
}
.program-card .program-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 14px 0 6px;
}
.program-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding: 0;
}
.program-chips li {
  background: var(--beige);
  border: 1px solid var(--border-soft);
  color: var(--text-dark);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  line-height: 1.3;
}

.info-card, .level-card {
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.info-card:hover, .level-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.level-card { background: var(--white); text-align: left; }

.icon-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--orange-light);
  color: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  margin-bottom: 14px;
}
.icon-box.round { border-radius: 50%; }
.icon-box.small {
  width: 34px;
  height: 34px;
  font-size: 0.85rem;
  margin-bottom: 0;
  flex-shrink: 0;
}

.info-card h3, .level-card h3 { font-size: 1rem; margin-bottom: 6px; }
.info-card p, .level-card p { color: var(--text-muted); font-size: 0.86rem; margin-bottom: 10px; }

.core-values-list {
  list-style: none;
}
.core-values-list li {
  position: relative;
  padding-left: 16px;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.6;
  margin-bottom: 6px;
}
.core-values-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange);
}

.level-major {
  color: var(--orange-dark) !important;
  font-weight: 600;
  font-size: 0.8rem !important;
  margin-bottom: 8px !important;
}

.level-major-list {
  list-style: none;
  margin-bottom: 10px;
}
.level-major-list li {
  color: var(--orange-dark);
  font-weight: 600;
  font-size: 0.8rem;
  line-height: 1.6;
}

/* ===== Contact ===== */
.contact { padding: 40px 0; }

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.contact-info-card {
  background: var(--beige-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 28px 24px 28px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.contact-info-item .icon-box { margin-bottom: 0; flex-shrink: 0; }
.contact-info-item h3 { font-size: 0.92rem; margin-bottom: 4px; }
.contact-info-item p { color: var(--text-muted); font-size: 0.86rem; margin-bottom: 0; }
.contact-info-item p a:hover { color: var(--orange); text-decoration: underline; }

.contact-map {
  min-height: 320px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-soft);
}
.contact-directions { display: none; } /* shown only in .contact-v2 */
.contact-map iframe {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
  display: block;
}

.form-group { margin-bottom: 12px; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.82rem;
  margin-bottom: 6px;
  color: var(--text-dark);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-soft);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-dark);
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-light);
}
.form-group input.field-invalid,
.form-group select.field-invalid,
.form-group textarea.field-invalid {
  border-color: #d94b3b;
}
.form-group input.field-invalid:focus,
.form-group select.field-invalid:focus,
.form-group textarea.field-invalid:focus {
  box-shadow: 0 0 0 3px rgba(217, 75, 59, 0.18);
}

/* ===== Messages (js/shared/field-errors.js, js/shared/auth-common.js) =====
   About one field: right under it. About the whole form: the status line under its button. */
.field-error { color: #d94b3b; font-size: 0.78rem; font-weight: 500; line-height: 1.35; margin: 5px 0 0; }
.field-success { color: #1f9254; font-size: 0.78rem; font-weight: 500; line-height: 1.35; margin: 5px 0 0; }
/* "(optional)" beside a label, e.g. Middle name and Suffix */
.label-optional { color: var(--text-muted); font-size: 0.76rem; font-weight: 400; }
.auth-status { margin-top: 14px; font-size: 0.85rem; min-height: 1.2em; }
.auth-status.success { color: #1f9254; }
.auth-status.error { color: #d94b3b; }
/* ===== Footer ===== */
.site-footer {
  background: #2b2320;
  color: #e9ddd3;
}

.footer-bottom {
  text-align: center;
  padding: 16px 0;
  font-size: 0.78rem;
  color: #a3947f;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .card-grid.two-col,
  .card-grid.three-col,
  .card-grid.four-col { grid-template-columns: repeat(2, 1fr); }
  .contact-layout { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 18px;
    border-bottom: 1px solid var(--border-soft);
    box-shadow: 0 12px 24px rgba(0,0,0,0.06);
    transform: translateY(-130%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  .main-nav.open { transform: translateY(0); opacity: 1; }
  .nav-link { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
  .nav-toggle { display: block; }

  .hero { min-height: 60vh; }

  .btn-login { display: none; }
}

@media (max-width: 620px) {
  .hero, .about, .levels, .contact { padding: 40px 0; }
  .card-grid.two-col,
  .card-grid.three-col,
  .card-grid.four-col { grid-template-columns: 1fr; }
}


/* ===== Contact v2 =====
   Scoped to .contact-v2 on the section, so removing that class in index.html
   restores the previous contact design. */
.contact-v2 .section-head { margin-bottom: 36px; }

.contact-v2 .contact-layout { align-items: stretch; gap: 20px; }

.contact-v2 .contact-info-card {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  justify-content: stretch;
}
.contact-v2 .contact-info-item {
  flex-direction: column;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.contact-v2 .contact-info-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
/* Facebook is the only link without an action, so it spans the full row */
.contact-v2 .contact-info-item#contactFacebookItem { grid-column: 1 / -1; }

.contact-v2 .contact-info-item .icon-box { margin-bottom: 0; }
.contact-v2 .contact-info-item h3 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.contact-v2 .contact-info-item p {
  color: var(--text-dark);
  font-size: 0.92rem;
  font-weight: 500;
  word-break: break-word;
}
.contact-v2 .contact-info-item p a { color: var(--text-dark); text-decoration: none; }
.contact-v2 .contact-info-item p a:hover,
.contact-v2 .contact-info-item p a:focus-visible {
  color: var(--orange);
  text-decoration: underline;
}

/* Map: "Get directions" floats over the bottom of the map */
.contact-v2 .contact-map { position: relative; }
.contact-v2 .contact-directions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: absolute;
  left: 14px;
  bottom: 14px;
  background: var(--orange);
  color: var(--white);
  font-weight: 600;
  font-size: 0.86rem;
  padding: 10px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.contact-v2 .contact-directions:hover,
.contact-v2 .contact-directions:focus-visible { filter: brightness(0.93); }

@media (max-width: 620px) {
  .contact-v2 .contact-info-card { grid-template-columns: 1fr; }
  .contact-v2 .contact-info-item#contactFacebookItem { grid-column: auto; }
}

/* Contact Us rows: one card with a divider between each detail */
.contact-v2 .contact-list {
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.contact-v2 .contact-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-soft);
}
.contact-v2 .contact-row:last-child { border-bottom: none; }
.contact-v2 .contact-row-icon {
  color: var(--orange);
  font-size: 1rem;
  text-align: center;
}
.contact-v2 .contact-row-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 4px;
}
.contact-v2 .contact-row-value {
  font-size: 0.98rem;
  color: var(--text-dark);
  line-height: 1.5;
  margin: 0;
  word-break: break-word;
}
.contact-v2 .contact-row-value a { color: inherit; text-decoration: none; }
.contact-v2 .contact-row-value a:hover { color: var(--orange); text-decoration: underline; }
.contact-v2 .contact-row-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  border: none;
  background: none;
  color: var(--orange-dark);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.contact-v2 .contact-row-action:hover { text-decoration: underline; }
.contact-v2 .contact-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  font-size: 0.82rem;
  font-weight: 600;
}
.contact-v2 .contact-open::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.contact-v2 .contact-open.is-open { color: #1f9254; }
.contact-v2 .contact-open.is-closed { color: var(--text-muted); }
@media (max-width: 620px) {
  .contact-v2 .contact-row { grid-template-columns: 28px 1fr; padding: 16px 18px; }
  .contact-v2 .contact-row-action { grid-column: 2; justify-self: start; padding-top: 0; }
}

/* Buttons respond instantly: no double-tap zoom wait on phones, and a quick
   pressed look so every click gets visible feedback right away. */
button, .btn { touch-action: manipulation; }
.btn:active:not(:disabled),
.btn-dark:active:not(:disabled),
.btn-light:active:not(:disabled),
.btn-danger:active:not(:disabled) { transform: scale(0.97); }
