:root {
  --red: #C8102E;
  --red-dark: #9e0c23;
  --red-light: #f5e6e9;
  --black: #111111;
  --gray-dark: #333;
  --gray: #666;
  --gray-light: #f4f4f4;
  --white: #ffffff;
  --border: #e5e5e5;
  --gold: #D4AF37;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--white);
  color: var(--black);
  min-height: 100vh;
}

/* NAV */
nav {
  background: var(--white);
  border-bottom: 3px solid var(--red);
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 0;
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.nav-logo-text span:first-child {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--black);
}

.nav-logo-text span:last-child {
  font-size: 11px;
  color: var(--red);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-badge-count {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray);
  font-weight: 500;
}

.badge-pill {
  background: var(--gold);
  color: white;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
}

/* HERO */
.hero {
  background: var(--black);
  padding: 72px 48px 56px;
  position: relative;
  overflow: hidden;
  background-image: url('../Pictures/students.jpg');
  background-size: cover;
  background-position: center 30%;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.82);
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 400px; height: 100%;
  background: linear-gradient(135deg, transparent 40%, rgba(200,16,46,0.15));
  pointer-events: none;
  z-index: 2;
}

.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  font-weight: 600;
  margin-bottom: 16px;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 900;
  color: var(--white);
  line-height: 1.05;
  max-width: 700px;
  margin-bottom: 20px;
  min-height: 2.2em;
}

.hero-title em {
  color: var(--red);
  font-style: normal;
}

.typewriter-cursor {
  display: inline-block;
  width: 3px;
  height: 0.85em;
  background: var(--red);
  margin-left: 4px;
  vertical-align: baseline;
  animation: blink 0.7s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.6);
  max-width: 500px;
  line-height: 1.6;
  margin-bottom: 36px;
}

.hero-stats {
  display: flex;
  gap: 40px;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--red);
}

.hero-stat-label {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* PROGRESS BAR */
.progress-banner {
  background: var(--red-light);
  border-bottom: 1px solid rgba(200,16,46,0.15);
  padding: 16px 48px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.progress-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--red-dark);
  white-space: nowrap;
}

.progress-track {
  flex: 1;
  height: 6px;
  background: rgba(200,16,46,0.15);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--red);
  border-radius: 3px;
  transition: width 0.8s ease;
}

.progress-pct {
  font-size: 13px;
  font-weight: 600;
  color: var(--red);
  white-space: nowrap;
}

/* MAIN LAYOUT */
.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 48px;
}

/* EVENT TABS */
.event-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 48px;
}

.event-tab {
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  color: var(--gray);
  transition: all 0.2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  letter-spacing: 0.02em;
}

.event-tab.active {
  color: var(--red);
  border-bottom-color: var(--red);
}

.event-tab.locked {
  color: #bbb;
  cursor: default;
}

.event-tab .coming-soon {
  font-size: 10px;
  background: var(--gray-light);
  border-radius: 4px;
  padding: 2px 6px;
  margin-left: 6px;
  color: #999;
  font-weight: 500;
}

/* UNIT */
.unit {
  margin-bottom: 56px;
}

.unit-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 24px;
}

.unit-number {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
  white-space: nowrap;
}

.unit-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--black);
}

.unit-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.unit-count {
  font-size: 12px;
  color: var(--gray);
  white-space: nowrap;
}

/* MODULE GRID */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.module-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: block;
  color: inherit;
}

.module-card:hover {
  border-color: var(--red);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200,16,46,0.1);
}

.module-card.completed {
  border-color: #27ae60;
  background: #f0faf4;
}

.module-card.locked {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

.module-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--red);
  opacity: 0;
  transition: opacity 0.2s;
}

.module-card:hover::before,
.module-card.active::before { opacity: 1; }
.module-card.completed::before { background: #27ae60; opacity: 1; }

.module-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.module-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--gray-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.module-status {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

.status-available {
  background: var(--red-light);
  color: var(--red);
}

.status-completed {
  background: #e6f7ed;
  color: #27ae60;
}

.status-locked {
  background: var(--gray-light);
  color: #aaa;
}

.module-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gray);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.module-title {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--black);
  line-height: 1.3;
  margin-bottom: 8px;
}

.module-desc {
  font-size: 13px;
  color: var(--gray);
  line-height: 1.5;
  margin-bottom: 16px;
}

.module-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: #aaa;
}

.module-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* BADGE SHELF */
.badge-section {
  background: var(--gray-light);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 56px;
}

.badge-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--black);
}

.badge-shelf {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 80px;
}

.badge-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: var(--white);
  border: 2px solid var(--border);
  transition: all 0.2s;
}

.badge-circle.earned {
  border-color: var(--gold);
  background: linear-gradient(135deg, #fff9e6, #fff3cc);
  box-shadow: 0 4px 12px rgba(212,175,55,0.3);
}

.badge-circle.locked-badge {
  filter: grayscale(1);
  opacity: 0.35;
}

.badge-name {
  font-size: 11px;
  text-align: center;
  color: var(--gray);
  font-weight: 500;
  line-height: 1.3;
}

/* COMING SOON SECTION */
.coming-soon-section {
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  margin-bottom: 32px;
}

.coming-soon-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.coming-soon-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: #ccc;
  margin-bottom: 8px;
}

.coming-soon-sub {
  font-size: 14px;
  color: #bbb;
}

/* PROMO SECTION */
.promo-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px 64px;
}

.promo-header {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--black);
  text-align: center;
  margin-bottom: 32px;
}

.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.promo-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--black);
  border-radius: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
  min-height: 340px;
}

.promo-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
}

.promo-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.3) 100%);
}

.promo-card:hover .promo-img {
  transform: scale(1.05);
}

.promo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}

.promo-content {
  position: relative;
  z-index: 1;
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 340px;
}

.promo-badge {
  display: inline-block;
  width: fit-content;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--red);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.promo-card.sandel .promo-badge {
  background: var(--gold);
  color: var(--black);
}

.promo-title {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 900;
  color: var(--white);
  margin-bottom: 12px;
}

.promo-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  line-height: 1.6;
  margin-bottom: 20px;
}

.promo-cta {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--red);
  padding: 10px 20px;
  border-radius: 8px;
  width: fit-content;
  transition: background 0.2s;
}

.promo-cta:hover {
  background: var(--red-dark);
}

.promo-card.sandel .promo-cta {
  background: var(--gold);
  color: var(--black);
}

.promo-card.sandel .promo-cta:hover {
  background: #c4a030;
}

/* FOOTER */
footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 32px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer .footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--black);
}

footer .footer-logo span {
  color: var(--red);
}

footer p {
  font-size: 12px;
  color: var(--gray);
}

/* MODULE PANEL (overlay) */
.module-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.module-overlay.open {
  display: flex;
}

.module-panel {
  background: white;
  border-radius: 20px;
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.panel-close {
  position: absolute;
  top: 20px; right: 20px;
  background: var(--gray-light);
  border: none;
  border-radius: 50%;
  width: 36px; height: 36px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  z-index: 10;
}

.panel-close:hover { background: var(--border); }

.panel-hero {
  background: var(--black);
  padding: 40px 48px 32px;
  border-radius: 20px 20px 0 0;
}

.panel-eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 600;
  margin-bottom: 10px;
}

.panel-title {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 900;
  color: white;
  margin-bottom: 16px;
}

.panel-desc {
  font-size: 15px;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
  max-width: 560px;
  margin-bottom: 24px;
}

.panel-meta-row {
  display: flex;
  gap: 24px;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

.panel-meta-row span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.panel-body {
  padding: 40px 48px;
}

.panel-section-title {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gray);
  margin-bottom: 20px;
}

.panel-lesson-list {
  list-style: none;
  margin-bottom: 32px;
}

.panel-lesson-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--gray-dark);
}

.panel-lesson-list li:last-child { border-bottom: none; }

.lesson-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--red-light);
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lesson-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.panel-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--red);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 16px 32px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-family: 'DM Sans', sans-serif;
  text-decoration: none;
}

.panel-cta:hover { background: var(--red-dark); }

/* TOAST */
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 768px) {
  nav, .hero, .main, footer, .promo-section { padding-left: 20px; padding-right: 20px; }
  .hero-stats { gap: 24px; }
  .module-grid { grid-template-columns: 1fr; }
  .promo-grid { grid-template-columns: 1fr; }
  .panel-hero, .panel-body { padding: 28px 24px; }
}
