/* css variables for consistent theming */
:root {
  --primary:    #5B21B6;
  --accent:     #8B5CF6;
  --bg:         #F9F9F9;
  --card-bg:    #FFFFFF;
  --text-dark:  #1A1A1A;
  --text-muted: #6B7280;
  --border:     #E5E7EB;
}

/* reset default browser margin and padding */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* base body styles */
body {
  font-family: 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-dark);
  line-height: 1.6;
}

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

/* max width wrapper, centred on the page */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* navbar - sticks to top while scrolling */
.navbar {
  position: sticky;
  top: 0; z-index: 100;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  height: 64px;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo { font-size: 1.3rem; font-weight: 700; color: var(--primary); }

.nav-links { list-style: none; display: flex; gap: 32px; }

.nav-links a {
  color: var(--text-dark);
  font-size: 0.95rem;
  position: relative;
  transition: color 0.3s ease;
}

/* animated underline that grows on hover */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active { color: var(--primary); font-weight: 600; }
.nav-links a:hover::after { width: 100%; }

/* hidden on desktop, shown on mobile */
.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--text-dark);
}

/* full width hero banner at the top of the page */
.class-hero { width: 100%; }

.hero-img {
  height: 320px;
  position: relative;
  display: flex;
  align-items: flex-end;
}

/* yoga class hero background image */
.yoga-hero-gradient {
  background: url('https://images.unsplash.com/photo-1588286840104-8957b019727f?w=1400&q=80&fit=crop') center/cover no-repeat;
  background-color: #004D40;
}

/* gradient overlay - darker at bottom so class name text is readable */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(0,0,0,0.70) 0%,
    rgba(0,0,0,0.25) 100%);
}

/* class name and badge row, positioned above the overlay */
.hero-info {
  position: relative;
  z-index: 1;
  padding: 28px 40px;
  color: #fff;
}

.hero-info h1 {
  font-size: 2.2rem;
  margin-bottom: 14px;
}

.hero-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* frosted glass badge for instructor, duration, level */
.badge {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.4);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  backdrop-filter: blur(4px);
}

/* 3fr 2fr grid - main content on the left, sticky sidebar on the right */
.details-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 32px;
  padding: 40px 0 60px;
  align-items: start;
}

/* each content block in the left column */
.section-block {
  margin-bottom: 36px;
}

.section-block h2 {
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}

.section-block p {
  color: var(--text-muted);
  margin-bottom: 12px;
  font-size: 0.95rem;
}

/* benefits list with divider lines between items */
.benefits-list {
  list-style: none;
  padding: 0;
}

.benefits-list li {
  padding: 8px 0;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-dark);
}

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

/* instructor card with shadow */
.instructor-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.instructor-inner {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-top: 16px;
}

/* circular avatar showing instructor initials */
.instructor-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4C1D95, #7C3AED);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.instructor-info h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: var(--primary);
}

.instructor-info p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.instructor-info .experience {
  font-size: 0.88rem;
  color: var(--text-dark);
}

/* sticky sidebar - stays visible while the user scrolls the left column */
.sidebar {
  position: sticky;
  top: 84px; /* 64px navbar height + 20px gap */
  background: var(--card-bg);
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  border: 1px solid var(--border);
}

.sidebar h3 {
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 20px;
}

/* wrapper allows horizontal scroll on very narrow screens */
.table-wrapper {
  overflow-x: auto;
  margin-bottom: 24px;
}

.slots-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.slots-table th {
  background: var(--bg);
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.slots-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dark);
  vertical-align: middle;
}

.slots-table small { color: var(--text-muted); font-size: 0.78rem; }

.slots-table tbody tr { transition: background 0.2s ease; }
.slots-table tbody tr:hover { background: #F5F3FF; }

/* colour coded slot status badges */
.status {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-block;
}

.status.open      { background: #EDE9FE; color: #5B21B6; }
.status.limited   { background: #FFF3E0; color: #E65100; }
.status.available { background: #E3F2FD; color: #1565C0; }

/* full width book button at the bottom of the sidebar */
.btn-book {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.btn-book:hover {
  background: #3B0764;
  transform: translateY(-2px);
}

/* footer */
.footer {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 24px;
  font-size: 0.9rem;
}

/* mobile - sidebar goes static, grid becomes single column */
@media (max-width: 768px) {
  .hamburger { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--card-bg);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }

  .nav-links.nav-open { display: flex; }

  .nav-links li a {
    display: block;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
  }

  /* stack columns vertically */
  .details-grid {
    grid-template-columns: 1fr;
  }

  /* sidebar no longer needs to stick when it's below the content */
  .sidebar { position: static; }

  .hero-info { padding: 20px; }
  .hero-info h1 { font-size: 1.5rem; }
}
