/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --teal: #2B6B7F;
  --teal-light: #5BB5C5;
  --teal-dark: #1E4F5E;
  --charcoal: #3A3A3C;
  --gray: #8C8E91;
  --gray-light: #F4F5F7;
  --gray-border: #E0E2E6;
  --white: #FFFFFF;
  --green: #34A853;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-w: 1120px;
  --radius: 8px;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--charcoal); line-height: 1.6; background: var(--gray-light); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* === Buttons === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem;
  font-weight: 600; font-size: 1rem; border: none; border-radius: var(--radius);
  cursor: pointer; transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  text-decoration: none; font-family: var(--font);
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn-header {
  background: var(--teal); color: var(--white);
  padding: 0.5rem 1rem; font-size: 0.8125rem;
}
.btn-header:hover { background: var(--teal-dark); }
.btn-notes[hidden] { display: none; }

.btn-primary {
  background: var(--teal); color: var(--white);
  padding: 0.875rem 2rem; font-size: 1.125rem;
}
.btn-primary:hover { background: var(--teal-dark); box-shadow: 0 4px 12px rgba(43,107,127,0.3); }

.btn-submit {
  width: 100%; background: var(--teal); color: var(--white);
  padding: 1rem; font-size: 1.125rem; position: relative;
}
.btn-submit:hover { background: var(--teal-dark); box-shadow: 0 4px 16px rgba(43,107,127,0.35); }
.btn-submit .btn-loading { display: none; }
.btn-submit.is-loading .btn-text { visibility: hidden; }
.btn-submit.is-loading .btn-loading { display: flex; position: absolute; inset: 0; align-items: center; justify-content: center; }

/* === Header === */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--white); transition: transform 0.3s;
  border-bottom: 1px solid var(--gray-border);
}
.site-header.is-hidden { transform: translateY(-100%); }

.header-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1.5rem;
}
.header-logo img { height: 32px; width: auto; }

/* === Hero === */
.hero {
  padding: 7rem 1.5rem 4rem;
  background: linear-gradient(135deg, var(--gray-light) 0%, var(--white) 50%, #E8F4F7 100%);
}

.hero-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 420px; gap: 3rem;
  align-items: start;
}

.eyebrow {
  display: inline-block; font-size: 0.8125rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--teal); margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: 2.75rem; font-weight: 800; line-height: 1.15;
  color: var(--charcoal); margin-bottom: 1rem;
}

.hero-sub {
  font-size: 1.125rem; color: #555; margin-bottom: 1.5rem; line-height: 1.7;
}

.benefit-list { list-style: none; margin-bottom: 1.75rem; }
.benefit-list li {
  display: flex; align-items: flex-start; gap: 0.75rem;
  font-size: 1.0625rem; margin-bottom: 0.75rem; color: var(--charcoal);
}
.check-icon { width: 22px; height: 22px; flex-shrink: 0; margin-top: 2px; }

.trust-strip { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.trust-strip span {
  font-size: 0.8125rem; font-weight: 600; color: var(--teal-dark);
  background: rgba(43,107,127,0.08); padding: 0.375rem 0.75rem; border-radius: 100px;
}

/* === Signup Form === */
.hero-form-wrap { scroll-margin-top: 5rem; }

.signup-form {
  background: var(--white); border-radius: 12px;
  padding: 2rem; border-top: 4px solid var(--teal);
  box-shadow: 0 8px 30px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  position: relative;
}
.signup-form h2 { font-size: 1.375rem; margin-bottom: 1.25rem; text-align: center; }

.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block; font-size: 0.875rem; font-weight: 600;
  margin-bottom: 0.375rem; color: var(--charcoal);
}
.form-group input {
  width: 100%; padding: 0.8rem 1rem; font-size: 1rem;
  border: 2px solid var(--gray-border); border-radius: var(--radius);
  font-family: var(--font); transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--white);
}
.form-group input:focus {
  outline: none; border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(43,107,127,0.15);
}
.form-group input.is-invalid { border-color: #D94F4F; }
.field-error {
  display: block; font-size: 0.8125rem; color: #D94F4F;
  min-height: 1.25rem; padding-top: 0.25rem;
}

.form-micro { text-align: center; font-size: 0.8125rem; color: var(--gray); margin-top: 0.75rem; }

.form-success { text-align: center; padding: 1.5rem 0; }
.form-success h3 { font-size: 1.375rem; color: var(--teal-dark); margin: 0.75rem 0 0.5rem; }
.form-success p { color: #555; }

.signup-form.is-submitted .form-group,
.signup-form.is-submitted h2,
.signup-form.is-submitted .btn-submit,
.signup-form.is-submitted .form-micro { display: none; }
.signup-form.is-submitted .form-success { display: block; }

/* === Course Section === */
.course { padding: 0 1.5rem 4rem; }

.course-pretitle {
  font-size: 2rem; font-weight: 800; text-align: center;
  margin-bottom: 2rem; color: var(--charcoal); padding-top: 4rem;
}
.course-pretitle.is-hidden { display: none; }

/* Dashboard */
.course-dashboard {
  background: var(--white); border-bottom: 1px solid var(--gray-border);
  padding: 1.25rem 0; margin-bottom: 2rem;
  border-radius: 12px 12px 0 0;
}
.course-dashboard[hidden] { display: none; }

.dashboard-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.dashboard-left h2 { font-size: 1.375rem; font-weight: 800; margin: 0; line-height: 1.2; }
.dashboard-subtitle { font-size: 0.875rem; color: var(--gray); }

.dashboard-progress { text-align: right; }
.progress-count { font-size: 0.875rem; font-weight: 600; color: var(--teal-dark); }
.progress-track {
  width: 200px; height: 6px; background: var(--gray-border);
  border-radius: 3px; margin-top: 0.375rem; overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0; background: var(--teal);
  border-radius: 3px; transition: width 0.5s ease;
}

/* Course Layout */
.course-layout {
  max-width: var(--max-w); margin: 0 auto;
}

/* Sidebar — hidden by default, shown on desktop after unlock */
.course-sidebar { display: none; }
.sidebar-mobile-strip { display: none; }

.sidebar-list {
  list-style: none; display: flex; flex-direction: column; gap: 0;
}

.sidebar-item {
  display: flex; align-items: center; gap: 0.875rem;
  padding: 0.875rem 1.25rem; cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.sidebar-item:hover { background: rgba(43,107,127,0.04); }
.sidebar-item.is-active {
  background: rgba(43,107,127,0.06); border-left-color: var(--teal);
}

.sidebar-status {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--gray-border); display: flex;
  align-items: center; justify-content: center; flex-shrink: 0;
  transition: border-color 0.2s, background 0.2s;
}
.sidebar-item.is-active .sidebar-status { border-color: var(--teal); }
.sidebar-item.is-complete .sidebar-status {
  border-color: var(--green); background: var(--green);
}

.status-num { font-size: 0.75rem; font-weight: 700; color: var(--gray); }
.sidebar-item.is-active .status-num { color: var(--teal); }
.sidebar-item.is-complete .status-num { color: var(--white); font-size: 0; }
.sidebar-item.is-complete .status-num::after { content: "\2713"; font-size: 0.875rem; }

.sidebar-label strong { display: block; font-size: 0.875rem; line-height: 1.3; }
.sidebar-meta { font-size: 0.75rem; color: var(--gray); }
.sidebar-item.is-locked .sidebar-label { opacity: 0.4; }
.sidebar-item.is-locked { cursor: default; }

/* Course Main — accordion style */
.course-main { position: relative; }

.course-lock {
  text-align: center; padding: 3rem 1.5rem;
  display: flex; flex-direction: column; align-items: center; gap: 1.25rem;
}
.course-lock.is-hidden { display: none; }

.lock-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(43,107,127,0.08); color: var(--teal-dark);
  padding: 0.625rem 1.25rem; border-radius: 100px;
  font-size: 0.9375rem; font-weight: 600;
}

/* Session Panels — accordion cards */
.session-panel {
  background: var(--white); border-radius: var(--radius);
  margin-bottom: 0.5rem; overflow: hidden;
  border: 1px solid var(--gray-border);
  transition: box-shadow 0.2s;
}

.session-header {
  padding: 1rem 1.25rem; cursor: pointer;
  display: flex; align-items: center; gap: 1rem;
  transition: background 0.15s;
}
.session-header:hover { background: var(--gray-light); }

.session-num-label {
  font-size: 0.75rem; font-weight: 700; color: var(--teal);
  text-transform: uppercase; letter-spacing: 0.05em;
  background: rgba(43,107,127,0.08); padding: 0.25rem 0.625rem;
  border-radius: 4px; white-space: nowrap;
}

.session-header h3 { font-size: 1.0625rem; margin: 0; flex: 1; }

.session-header::after {
  content: ""; width: 10px; height: 10px;
  border-right: 2px solid var(--gray); border-bottom: 2px solid var(--gray);
  transform: rotate(45deg); transition: transform 0.2s;
  flex-shrink: 0;
}
.session-panel.is-open .session-header::after { transform: rotate(-135deg); }

/* Expandable content */
.session-body {
  max-height: 0; overflow: hidden;
  transition: max-height 0.35s ease;
}
.session-panel.is-open .session-body {
  max-height: 2000px;
}

.session-body-inner { padding: 0 1.25rem 1.25rem; }

.session-desc {
  font-size: 0.9375rem; color: #555; line-height: 1.7;
  margin-bottom: 1rem;
}

.video-container {
  border-radius: 8px; overflow: hidden; background: #000;
  aspect-ratio: 16/9; max-width: 640px; margin-left: auto; margin-right: auto;
}
.video-container iframe, .video-player {
  width: 100%; height: 100%; border: 0; display: block;
}

.video-progress {
  height: 4px; background: var(--gray-border);
  border-radius: 2px; margin-top: 0.75rem; overflow: hidden;
}
.video-progress-bar {
  height: 100%; width: 0; background: var(--teal);
  border-radius: 2px; transition: width 0.5s ease;
}
.video-progress-bar.is-complete { background: var(--green); }

.video-complete {
  display: inline-flex; align-items: center; gap: 0.375rem;
  font-size: 0.8125rem; font-weight: 600; color: var(--green);
  margin-top: 0.5rem;
}
.video-complete[hidden] { display: none; }

/* Session nav buttons */
.session-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 1.25rem; padding-top: 1rem;
  border-top: 1px solid var(--gray-border);
}

.btn-next {
  background: var(--teal); color: var(--white);
  padding: 0.625rem 1.25rem; font-size: 0.875rem;
}
.btn-next:hover { background: var(--teal-dark); }

.btn-prev {
  background: none; color: var(--gray); border: 1px solid var(--gray-border);
  padding: 0.625rem 1.25rem; font-size: 0.875rem;
}
.btn-prev:hover { color: var(--charcoal); border-color: var(--charcoal); background: var(--gray-light); }

/* Session status in header */
.session-header .session-check {
  width: 20px; height: 20px; flex-shrink: 0;
}

/* Completed panels */
.session-panel.is-completed .session-num-label {
  background: rgba(52,168,83,0.1); color: var(--green);
}
.session-panel.is-completed .session-header h3::after {
  content: " \2713"; color: var(--green); font-weight: 700;
}

/* Locked panels */
.session-panel.is-locked .session-header { cursor: default; opacity: 0.45; }
.session-panel.is-locked .session-header:hover { background: none; }
.session-panel.is-locked .session-header::after { display: none; }

/* === Section Shared === */
.section-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.section-title {
  font-size: 2rem; font-weight: 800; text-align: center;
  margin-bottom: 0.75rem; color: var(--charcoal);
}

/* === Instructor === */
.instructor { padding: 5rem 1.5rem; background: var(--white); }

.instructor-layout {
  display: grid; grid-template-columns: 300px 1fr; gap: 3rem; align-items: center;
}
.instructor-photo img {
  border-radius: 12px; width: 100%;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.instructor-info .eyebrow { margin-bottom: 0.5rem; }
.instructor-info h2 { font-size: 2rem; margin-bottom: 0.25rem; }
.instructor-credentials { font-size: 0.9375rem; color: var(--gray); margin-bottom: 1rem; }
.instructor-info p { margin-bottom: 1.25rem; color: #555; }

.instructor-info blockquote {
  font-size: 1.125rem; font-style: italic; color: var(--teal-dark);
  border-left: 3px solid var(--teal); padding-left: 1.25rem; line-height: 1.7;
}

/* === FAQ === */
.faq { padding: 5rem 1.5rem; background: var(--gray-light); }

.faq-list { max-width: 720px; margin: 0 auto; }

.faq-item {
  background: var(--white); border-radius: var(--radius);
  margin-bottom: 0.75rem; overflow: hidden;
  border: 1px solid var(--gray-border);
}
.faq-item summary {
  padding: 1.125rem 1.5rem; font-weight: 600; font-size: 1.0625rem;
  cursor: pointer; list-style: none; display: flex;
  align-items: center; justify-content: space-between;
  transition: background 0.2s;
}
.faq-item summary:hover { background: var(--gray-light); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 1.5rem; color: var(--teal); font-weight: 300;
  transition: transform 0.2s;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { padding: 0 1.5rem 1.25rem; color: #555; line-height: 1.7; }

/* === Donation Modal === */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem; animation: fadeIn 0.3s ease;
}
.modal-overlay[hidden] { display: none; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

.modal {
  background: var(--white); border-radius: 16px;
  max-width: 560px; width: 100%; max-height: 90vh; overflow-y: auto;
  padding: 2.5rem; position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,0.2); animation: slideUp 0.35s ease;
}

.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none; font-size: 1.75rem;
  color: var(--gray); cursor: pointer; line-height: 1;
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: background 0.2s, color 0.2s;
}
.modal-close:hover { background: var(--gray-light); color: var(--charcoal); }

.modal-icon { text-align: center; margin-bottom: 1.25rem; }

.modal h2 {
  font-size: 1.375rem; font-weight: 800; text-align: center;
  color: var(--charcoal); margin-bottom: 0.5rem; line-height: 1.3;
}
.modal-lead { text-align: center; font-size: 1.0625rem; color: var(--teal); font-weight: 600; margin-bottom: 1.5rem; }
.modal-body p { font-size: 0.9375rem; color: #555; line-height: 1.7; margin-bottom: 1rem; }
.modal-ask { font-size: 1rem; color: var(--charcoal); margin-bottom: 0; }

.modal-actions {
  margin-top: 1.75rem; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
}
.btn-donate {
  background: var(--teal); color: var(--white);
  padding: 1rem 2.5rem; font-size: 1.125rem; border-radius: var(--radius); width: 100%;
}
.btn-donate:hover { background: var(--teal-dark); box-shadow: 0 4px 16px rgba(43,107,127,0.35); text-decoration: none; }

.modal-skip {
  background: none; border: none; color: var(--gray);
  font-size: 0.875rem; cursor: pointer; font-family: var(--font);
  padding: 0.5rem; transition: color 0.2s;
}
.modal-skip:hover { color: var(--charcoal); }

/* === Footer === */
.site-footer {
  background: #2A2A2C; padding: 3rem 1.5rem; color: rgba(255,255,255,0.6); font-size: 0.875rem;
}
.footer-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem;
}
.footer-logo { margin-bottom: 0.5rem; }
.footer-brand p { margin: 0; }
.footer-contact p { margin: 0 0 0.25rem; }
.footer-contact a { color: rgba(255,255,255,0.75); }
.footer-contact a:hover { color: var(--white); }
.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { color: rgba(255,255,255,0.6); }
.footer-links a:hover { color: var(--white); }

/* === Responsive === */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero h1 { font-size: 2.25rem; }
  .instructor-layout { grid-template-columns: 1fr; text-align: center; }
  .instructor-photo { max-width: 280px; margin: 0 auto; }
  .instructor-info blockquote { text-align: left; }
}

@media (max-width: 768px) {
  .header-inner { padding: 0.625rem 1rem; }
  .header-logo img { height: 28px; }

  .hero { padding: 4.5rem 1rem 2rem; }
  .hero-inner { display: flex; flex-direction: column; gap: 1.5rem; }
  .hero h1 { font-size: 1.75rem; margin-bottom: 0.625rem; }
  .hero-sub { font-size: 0.9375rem; margin-bottom: 1rem; line-height: 1.6; }
  .eyebrow { font-size: 0.75rem; margin-bottom: 0.5rem; }

  .benefit-list { margin-bottom: 1rem; }
  .benefit-list li { font-size: 0.9375rem; margin-bottom: 0.5rem; gap: 0.5rem; }
  .check-icon { width: 18px; height: 18px; }

  .trust-strip { gap: 0.375rem; margin-bottom: 0.25rem; }
  .trust-strip span { font-size: 0.6875rem; padding: 0.25rem 0.625rem; }

  .signup-form { padding: 1.25rem; border-radius: 10px; }
  .signup-form h2 { font-size: 1.1875rem; margin-bottom: 0.875rem; }
  .form-group { margin-bottom: 0.625rem; }
  .form-group label { font-size: 0.8125rem; margin-bottom: 0.25rem; }
  .form-group input { padding: 0.625rem 0.75rem; font-size: 0.9375rem; }
  .field-error { min-height: 0; font-size: 0.75rem; padding-top: 0.125rem; }
  .btn-submit { padding: 0.8rem; font-size: 1rem; }
  .form-micro { font-size: 0.75rem; margin-top: 0.5rem; }
  .hero-form-wrap { scroll-margin-top: 4rem; }

  .course { padding: 0 0.75rem 3rem; }
  .course-pretitle { font-size: 1.5rem; padding-top: 2.5rem; margin-bottom: 1.25rem; }

  .dashboard-inner { flex-direction: column; gap: 0.75rem; align-items: flex-start; }
  .progress-track { width: 100%; }
  .dashboard-progress { width: 100%; text-align: left; }

  .section-inner { padding: 0 1rem; }
  .section-title { font-size: 1.5rem; }

  .session-header { padding: 0.875rem 1rem; }
  .session-header h3 { font-size: 0.9375rem; }
  .session-body-inner { padding: 0 1rem 1rem; }

  .instructor, .faq { padding: 2.5rem 1rem; }
  .instructor-layout { grid-template-columns: 1fr; text-align: center; gap: 1.5rem; }
  .instructor-photo { max-width: 200px; margin: 0 auto; }
  .instructor-info h2 { font-size: 1.625rem; }
  .instructor-info blockquote { font-size: 1rem; text-align: left; padding-left: 1rem; }

  .faq-item summary { padding: 0.875rem 1rem; font-size: 0.9375rem; }
  .faq-item p { padding: 0 1rem 1rem; font-size: 0.9375rem; }

  .modal-overlay { padding: 1rem; align-items: flex-end; }
  .modal { padding: 1.75rem 1.25rem; border-radius: 16px 16px 0 0; max-height: 85vh; }
  .modal h2 { font-size: 1.1875rem; }

  .site-footer { padding: 2rem 1rem; }
  .footer-inner { flex-direction: column; gap: 1.25rem; }

  .btn-next, .btn-prev { font-size: 0.8125rem; padding: 0.5rem 1rem; }
}

@media (max-width: 380px) {
  .hero { padding: 4rem 0.75rem 1.5rem; }
  .hero h1 { font-size: 1.5rem; }
  .signup-form { padding: 1rem; }
}
