@import url('https://fonts.googleapis.com/css2?family=Alegreya:wght@500;600;700&family=Nunito:wght@400;500;600;700&display=swap');

:root {
  --primary: #0f5e6e;
  --primary-contrast: #ffffff;

  --bg: #272727;          /* outer page background */
  --surface: #ececec;     /* boxed sections, odd */
  --surface-alt-bg: #e2e2e2; /* boxed sections, even */
  --surface-alt: rgba(255, 255, 255, 0.55); /* cards / rows sitting on a section */
  --surface-alt-strong: rgba(255, 255, 255, 0.8);

  --text: #272727;
  --text-light: #5c5c5c;
  --border: rgba(0, 0, 0, 0.12);

  --radius: 10px;
  --radius-large: 18px;

  --max-width: 1200px;
  --gap: 2.5rem;
  --box-padding: clamp(2rem, 4vw, 3rem);
}

/* ==========================================================================
   Reset
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Nunito", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  padding: 0 0 var(--gap);
}

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

/* ==========================================================================
   Layout
   ========================================================================== */

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

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2 { font-family: "Alegreya", serif; }

h1, h2, h3, h4 {
  color: var(--text);
  margin-top: 0;
  margin-bottom: 1.75rem;
  line-height: 1.15;
  max-width: 760px;
}

h1 { font-size: clamp(2.5rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); }
h3 { font-size: 1.3rem; }

p, ul, ol { margin-top: 0; margin-bottom: 0; }

.lead {
  margin-bottom: 2rem;
  color: var(--text-light);
}

.eyebrow {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #555555;
}

/* ==========================================================================
   Hero (kept full-bleed — everything below it is boxed)
   ========================================================================== */

/* ==========================================================================
   Page shell — one continuous rectangle, no gaps, no rounded corners
   ========================================================================== */

.page-shell {
  width: min(var(--max-width), calc(100% - 4rem));
  margin: 0 auto;
}

.hero {
  background: var(--primary);
  color: var(--primary-contrast);
  padding: var(--box-padding);
}

.hero h1, .hero h2, .hero h3, .hero p { color: var(--primary-contrast); }
.hero .lead { color: rgba(255, 255, 255, 0.82); }
.hero .container { padding: 0; margin: 0; max-width: none; }

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2rem 0 0;
}

.badge {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  color: var(--primary-contrast);
  font-size: 0.95rem;
  font-weight: 600;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn, button.btn {
  display: inline-block;
  background: var(--primary);
  color: var(--primary-contrast);
  border: none;
  border-radius: var(--radius);
  padding: 0.75rem 1.5rem;
  font-family: "Nunito", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.btn:hover { opacity: 0.9; }
.hero .btn { background: var(--primary-contrast); color: var(--primary); }

/* ==========================================================================
   Page grid + boxed content sections
   ========================================================================== */

.page-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  align-items: stretch;
}

.main-content > section {
  background: var(--surface);
  padding: var(--box-padding);
  border-bottom: 1px solid var(--border);
}

.main-content > section:nth-child(even) {
  background: var(--surface-alt-bg);
}

.main-content > section:last-child { border-bottom: none; }

.main-content > section .container {
  padding: 0;
  margin: 0;
  max-width: none;
}

/* ==========================================================================
   Grid / cards
   ========================================================================== */

.grid { display: grid; gap: 1.25rem; }
.cards { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
}

.card h3:last-child, .card p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Problem list — full-width bordered rows (no filled cards)
   ========================================================================== */

.problem-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.problem-item {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-weight: 600;
}

/* ==========================================================================
   Curriculum / FAQ accordion
   ========================================================================== */

.accordion { margin-top: 2.5rem; }

.acc, .accordion-button {
  width: 100%;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.75rem;
  margin-bottom: 0.75rem;
  text-align: left;
  font-family: "Nunito", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.acc:hover, .accordion-button:hover { border-color: var(--primary); }

.acc.active, .accordion-button.active {
  background: var(--primary);
  color: var(--primary-contrast);
  border-color: var(--primary);
}

.panel, .accordion-panel {
  display: none;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: -0.25rem;
  margin-bottom: 1rem;
  padding: 1.75rem;
  color: var(--text-light);
}

/* ==========================================================================
   Instructors
   ========================================================================== */

.instructors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.instructor {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  height: 100%;
}

.instructor .lead, .instructor > div > p { max-width: none; }

.instructor-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-alt-strong);
  border: 1px solid var(--border);
}

.instructor-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   Sticky enrollment sidebar
   ========================================================================== */

.sidebar-col {
  background: var(--surface-alt-bg);
  border-left: 1px solid var(--border);
}

.sidebar { position: sticky; top: 0; padding: var(--box-padding) 1.75rem; }

.cohort-box {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.75rem;
}

.cohort-box h3 { margin-bottom: 1rem; }

.cohort-price { font-size: 2rem; font-weight: 700; margin: 1.5rem 0; color: var(--text); }

.currency-toggle {
  display: inline-flex;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  margin-bottom: 1.25rem;
}

.currency-toggle button {
  border: none;
  background: transparent;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-family: "Nunito", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-light);
}

.currency-toggle button.active { background: var(--primary); color: var(--primary-contrast); }

.cohort-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.85rem;
}

.cohort-option:last-of-type { border-bottom: none; }

.cohort-option input {
  accent-color: var(--primary);
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.cohort-seats {
  margin-left: auto;
  color: var(--text-light);
  font-size: 0.85rem;
  white-space: nowrap;
}

.promo-row { display: flex; gap: 0.5rem; margin: 1.25rem 0 0.5rem; }

.promo-field {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0.75rem;
  background: var(--surface-alt-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: "Nunito", sans-serif;
  font-size: 0.95rem;
}

.promo-apply {
  background: var(--surface-alt-strong);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  font-family: "Nunito", sans-serif;
  font-weight: 600;
  cursor: pointer;
}

.notice { font-size: 0.9rem; margin: 0.5rem 0; }
.notice.success { color: #1c8a52; }
.notice.error { color: #c0392b; }

.strike {
  text-decoration: line-through;
  color: var(--text-light);
  font-weight: 400;
  font-size: 1.1rem;
  margin-right: 0.5rem;
}

/* ==========================================================================
   Final CTA (full-bleed, like the hero)
   ========================================================================== */

.final-cta {
  background: var(--primary);
  color: var(--primary-contrast);
  padding: var(--box-padding);
}

.final-cta h1, .final-cta h2, .final-cta h3, .final-cta p { color: var(--primary-contrast); }
.final-cta .btn { background: var(--primary-contrast); color: var(--primary); margin-top: 1.5em; }
.final-cta .container { padding: 0; margin: 0; max-width: none; }

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  color: var(--text-light);
  padding: 3rem 0;
}

/* ==========================================================================
   Course index / homepage
   ========================================================================== */

.site-header {
  width: min(var(--max-width), calc(100% - 4rem));
  margin: 0 auto;
  background: var(--primary);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.site-title {
  color: var(--primary-contrast);
  font-family: "Alegreya", serif;
  font-size: 1.4rem;
  font-weight: 600;
  text-decoration: none;
}

.site-header .currency-toggle {
  margin-bottom: 0;
}


.course-index-hero {
  width: min(var(--max-width), calc(100% - 4rem));
  margin: 0 auto;
}

.course-index-hero .eyebrow {
  color: rgba(255, 255, 255, 0.7);
}

.course-index-hero h1 {
  max-width: 800px;
}

.course-index-hero .lead {
  margin-bottom: 0;
}


.course-index {
  width: min(var(--max-width), calc(100% - 4rem));
  margin: 0 auto;
  padding: var(--box-padding);
  background: var(--surface);
}

.course-index > .container {
  max-width: none;
  margin: 0;
  padding: 0;
}

.course-index h2 {
  margin-bottom: 2rem;
}


.course-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.course-card,
.course-list article,
.course-list .card {
  display: flex;
  flex-direction: column;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.course-card h2,
.course-card h3,
.course-list article h2,
.course-list article h3 {
  margin-bottom: 1rem;
}

.course-card p,
.course-list article p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.course-card ul,
.course-list article ul {
  padding-left: 1.25rem;
  margin: 0 0 2rem;
}

.course-card .btn,
.course-list article .btn {
  align-self: flex-start;
  margin-top: auto;
}

.course-tag {
  align-self: flex-start;
  margin-bottom: 1rem;
  padding: 0.35rem 0.75rem;
  background: var(--primary);
  color: var(--primary-contrast);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}


.site-footer {
  width: min(var(--max-width), calc(100% - 4rem));
  margin: 0 auto;
}

.site-footer a {
  color: var(--text);
  font-weight: 700;
}

.footer-secondary {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 960px) {
  .page-grid { display: block; }
  .sidebar-col { border-left: none; border-top: 1px solid var(--border); }
  .sidebar { position: static; }
}

@media (max-width: 768px) {
  .page-shell { width: calc(100% - 2.5rem); }
  .container { padding: 0 1.25rem; }
  .badges { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 768px) {
  .page-shell {
    width: calc(100% - 2.5rem);
  }

  .container {
    padding: 0 1.25rem;
  }

  .badges {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-header,
  .course-index-hero,
  .course-index,
  .site-footer {
    width: calc(100% - 2.5rem);
  }

  .site-header-inner {
    min-height: 64px;
  }

  .course-list {
    grid-template-columns: 1fr;
  }
}
