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

:root {
  --red: #c0392b;
  --magenta: #9b1a6e;
  --gold: #e6a817;
  --purple: #7b3eb5;
  --green: #2a7d4f;
  --orange: #d95f2b;
  --beginner-bg: #ede0f7;
  --beginner-text: #5b2d8e;
  --inter-bg: #d4eddf;
  --inter-text: #1b5e38;
  --adv-bg: #fce8d5;
  --adv-text: #8c2c00;
  --neutral-bg: #f0f2f5;
  --neutral-text: #444;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Work Sans", sans-serif;
  background: #fff;
  color: #1a1a2e;
  min-height: 100vh;
}

/* ── HERO ── */
header {
  background: linear-gradient(135deg, #1a0633 0%, #4a0826 50%, #8c1a2e 100%);
  color: #fff;
  padding: 3.5rem 1.5rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.header-content {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}
.header-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}
header h1 {
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}
.header-sub {
  font-size: 1rem;
  opacity: 0.8;
  margin-bottom: 1.75rem;
}

/* legend */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.legend-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pill-beg {
  background: var(--beginner-bg);
  color: var(--beginner-text);
}
.pill-beg .dot {
  background: var(--purple);
}
.pill-int {
  background: var(--inter-bg);
  color: var(--inter-text);
}
.pill-int .dot {
  background: var(--green);
}
.pill-adv {
  background: var(--adv-bg);
  color: var(--adv-text);
}
.pill-adv .dot {
  background: var(--orange);
}
.pill-other {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.pill-other .dot {
  background: #aaa;
}

/* ── DAY TABS ── */
.day-tabs {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.day-tab {
  flex: 1;
  padding: 1rem 0.5rem;
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  border: none;
  background: transparent;
  color: #888;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition:
    color 0.2s,
    border-bottom 0.2s;
  border-bottom: 3px solid transparent;
  position: relative;
}
.day-tab.active {
  color: var(--magenta);
  border-bottom-color: var(--magenta);
}
.day-tab:hover:not(.active) {
  color: #444;
}

/* ── FILTER BAR ── */
.filter-bar {
  position: sticky;
  top: 53px; /* below the day-tabs */
  z-index: 99;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.filter-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #888;
  margin-right: 0.15rem;
  white-space: nowrap;
}
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  border: 1.5px solid #e5e7eb;
  background: transparent;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s,
    box-shadow 0.15s;
  white-space: nowrap;
}
.filter-btn .fdot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.4;
  flex-shrink: 0;
}
.filter-btn:hover {
  border-color: #ccc;
  color: #333;
}
.filter-btn.active-filter {
  border-color: transparent;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.filter-btn.active-filter .fdot {
  opacity: 1;
}
.filter-btn[data-level="all"].active-filter {
  background: #1a1a2e;
  color: #fff;
}
.filter-btn[data-level="beg"].active-filter {
  background: var(--beginner-bg);
  color: var(--beginner-text);
}
.filter-btn[data-level="beg"].active-filter .fdot {
  background: var(--purple);
}
.filter-btn[data-level="int"].active-filter {
  background: var(--inter-bg);
  color: var(--inter-text);
}
.filter-btn[data-level="int"].active-filter .fdot {
  background: var(--green);
}
.filter-btn[data-level="adv"].active-filter {
  background: var(--adv-bg);
  color: var(--adv-text);
}
.filter-btn[data-level="adv"].active-filter .fdot {
  background: var(--orange);
}
.filter-btn[data-level="special"].active-filter {
  background: #fff8e1;
  color: #7a5c00;
  border-color: var(--gold);
}

/* hidden card state */
.workshop-card.level-hidden {
  display: none;
}
/* collapse time-block when all cards inside are hidden */
.time-block.all-hidden {
  display: none;
}

/* ── SCHEDULE CONTAINER ── */
.schedule-section {
  display: none;
}
.schedule-section.active {
  display: block;
}

.day-header {
  background: linear-gradient(90deg, #f8f2fc, #fff4f8);
  border-left: 4px solid var(--magenta);
  padding: 1.25rem 1.5rem;
  margin: 0;
}
.day-header h2 {
  font-size: 1.5rem;
  color: var(--magenta);
}
.day-header p {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.2rem;
}

/* ── AGENDA ── */
.agenda {
  padding: 1.25rem 1rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.time-block {
  margin-bottom: 2rem;
}
.time-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.time-label-text {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
  white-space: nowrap;
}
.time-label-line {
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

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

/* ── WORKSHOP CARD ── */
.workshop-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem 1.1rem 1rem;
  cursor: pointer;
  text-align: left;
  transition:
    box-shadow 0.2s,
    transform 0.2s,
    border-color 0.2s;
  position: relative;
  overflow: hidden;
}
.workshop-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
}
.workshop-card.beg::before {
  background: var(--purple);
}
.workshop-card.int::before {
  background: var(--green);
}
/* Dual-level: split stripe purple (top) → green (bottom) */
.workshop-card.beg.int::before {
  background: linear-gradient(to bottom, var(--purple) 50%, var(--green) 50%);
}
.workshop-card.adv::before {
  background: var(--orange);
}
.workshop-card.other::before {
  background: #aaa;
}

.workshop-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  border-color: #ccc;
}
.workshop-card:focus-visible {
  outline: 2px solid var(--magenta);
  outline-offset: 2px;
}

.card-room {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 0.35rem;
}
.card-title {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
  color: #1a1a2e;
  margin-bottom: 0.4rem;
}
.card-instructors {
  font-size: 0.8rem;
  color: #555;
  margin-bottom: 0.55rem;
  line-height: 1.4;
}
.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.1rem;
}
.card-level-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.badge-beg {
  background: var(--beginner-bg);
  color: var(--beginner-text);
}
.badge-int {
  background: var(--inter-bg);
  color: var(--inter-text);
}
.badge-adv {
  background: var(--adv-bg);
  color: var(--adv-text);
}
.badge-other {
  background: var(--neutral-bg);
  color: var(--neutral-text);
}

.card-click-hint {
  position: absolute;
  bottom: 0.65rem;
  right: 0.85rem;
  font-size: 0.7rem;
  color: #ccc;
  font-weight: 500;
}

/* ── HEART / FAVORITES ── */
.card-heart {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  background: rgba(224, 87, 138, 0.1);
  border: 1.5px solid rgba(224, 87, 138, 0.2);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  color: rgba(224, 87, 138, 0.45);
  transition:
    color 0.15s,
    background 0.15s,
    border-color 0.15s,
    transform 0.15s;
  z-index: 2;
  user-select: none;
}
.card-heart:hover {
  color: #e0578a;
  background: rgba(224, 87, 138, 0.15);
  border-color: rgba(224, 87, 138, 0.5);
  transform: scale(1.15);
}
.card-heart.hearted {
  color: #e0578a;
  background: rgba(224, 87, 138, 0.12);
  border-color: rgba(224, 87, 138, 0.4);
}
/* Modal heart button */
.modal-heart {
  position: absolute;
  top: 1.1rem;
  right: 3.4rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #f3f4f6;
  font-size: 1.15rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  transition:
    background 0.15s,
    color 0.15s;
}
.modal-heart:hover {
  background: #fde8f0;
  color: #e0578a;
}
.modal-heart.hearted {
  color: #e0578a;
  background: #fde8f0;
}
.filter-sep {
  width: 1px;
  height: 18px;
  background: #e5e7eb;
  flex-shrink: 0;
  align-self: center;
}
.filter-btn[data-level="favorites"].active-filter {
  background: #fde8f0;
  color: #b02060;
  border-color: #e06090;
}
.filter-btn[data-level="favorites"].active-filter .fdot {
  background: #e0578a;
}
/* Empty-state for My Schedule */
.no-fav-msg {
  text-align: center;
  padding: 3.5rem 1rem 2rem;
  color: #bbb;
}
.no-fav-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}
.no-fav-msg p {
  font-size: 0.88rem;
  line-height: 1.6;
}

/* Special event (lunch Q&A) */
.workshop-card.special {
  background: linear-gradient(135deg, #fff8e1, #fff);
  border-color: var(--gold);
}
.workshop-card.special::before {
  background: var(--gold);
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal {
  background: #fff;
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
  transform: scale(0.95) translateY(12px);
  transition: transform 0.25s;
}
.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
}
.modal-day-time {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--magenta);
  margin-bottom: 0.4rem;
}
.modal-title {
  font-size: 1.5rem;
  line-height: 1.2;
  color: #1a1a2e;
  margin-bottom: 0.75rem;
}
.modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.modal-room-badge {
  background: #f3f4f6;
  color: #555;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
}
.modal-close {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #f3f4f6;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition:
    background 0.15s,
    color 0.15s;
}
.modal-close:hover {
  background: #e5e7eb;
  color: #222;
}

/* instructors section */
.modal-body {
  padding: 1.25rem 1.5rem 1.75rem;
}
.modal-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 1rem;
}

.instructor-card {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #f0f0f0;
}
.instructor-card:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.instructor-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  overflow: hidden;
}
.instructor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.instructor-info {
  flex: 1;
  min-width: 0;
}
.instructor-name {
  font-weight: 700;
  font-size: 1rem;
  color: #1a1a2e;
  margin-bottom: 0.15rem;
}
.instructor-subtitle {
  font-size: 0.78rem;
  color: var(--magenta);
  font-weight: 600;
  margin-bottom: 0.45rem;
}
.instructor-bio {
  font-size: 0.83rem;
  color: #555;
  line-height: 1.55;
}

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 2rem 1rem;
  background: #fafafa;
  border-top: 1px solid #eee;
  font-size: 0.78rem;
  color: #aaa;
}
footer a {
  color: var(--magenta);
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  header {
    padding: 2.5rem 1rem 2rem;
  }
  .agenda {
    padding: 1rem 0.75rem 2rem;
  }
  .sessions-grid {
    grid-template-columns: 1fr;
  }
  .modal-header {
    padding: 1.25rem 1.1rem 0.9rem;
  }
  .modal-body {
    padding: 1rem 1.1rem 1.5rem;
  }
  .instructor-avatar {
    width: 56px;
    height: 56px;
  }
}
