/* ===========================
   808 DANCE, shared styles
   Dark theme, purple + yellow accents
   =========================== */

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

:root {
  --bg: #0A0A0D;
  --bg-alt: #151318;
  --bg-card: #1B1820;
  --purple: #7C2CE0;
  --purple-deep: #5A18B0;
  --yellow: #FFCC29;
  --yellow-dark: #E8B400;
  --white: #FFFFFF;
  --muted: #B4AFC0;
  --line: rgba(255,255,255,0.09);

  --font-body: 'Inter', sans-serif;
}

/* On mobile only, use a slightly less-blue purple (some phone screens render
   the desktop purple as too blue). Same variables, just redefined here. */
@media (max-width: 760px) {
  :root {
    --purple: #9A2CE0;
    --purple-deep: #7318B0;
  }
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--white);
  background: var(--bg);
  line-height: 1.65;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  margin-bottom: 12px;
}

.eyebrow {
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--yellow);
  margin-bottom: 10px;
  display: inline-block;
  position: relative;
  padding-left: 18px;
}
.eyebrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 3px;
  background: var(--purple);
}

.section { padding: 84px 0; background: var(--bg); }
.section--alt { background: var(--bg-alt); }
.center { text-align: center; }

.muted { color: var(--muted); }

/* Buttons */
.btn {
  display: inline-block;
  font-weight: 700;
  padding: 15px 36px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}
.btn:hover { transform: translateY(-2px); }

.btn--purple {
  background: linear-gradient(135deg, var(--purple), var(--purple-deep));
  color: var(--white);
}
.btn--purple:hover { }

.btn--yellow { background: var(--yellow); color: #1A1400; }
.btn--yellow:hover { background: var(--yellow-dark); }

.btn--outline { background: transparent; border-color: var(--yellow); color: var(--yellow); }
.btn--outline:hover { background: var(--yellow); color: #1A1400; }

.btn-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #000000;
  border-bottom: 1px solid var(--line);
}

.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 14px 24px;
  max-width: 1180px;
  margin: 0 auto;
}

.nav__logo { justify-self: start; }
.nav__logo img { height: 46px; }

.nav__links {
  display: flex;
  gap: 36px;
  list-style: none;
  justify-self: center;
}

.nav__links a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.4px;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.nav__links a:hover,
.nav__links a.active {
  border-color: var(--yellow);
  color: var(--white);
}

.nav__spacer { justify-self: end; width: 46px; }

.nav__toggle {
  display: none;
  align-items: center;
  flex-direction: row;
  gap: 8px;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  justify-self: end;
}

.nav__toggle-label {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--white);
  white-space: nowrap;
}

.nav__toggle-icon { display: block; flex-shrink: 0; }

@media (max-width: 760px) {
  .nav { grid-template-columns: 1fr auto; }
  .nav__spacer { display: none; }
  .nav__links {
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    width: 220px;
    background: #000;
    flex-direction: column;
    gap: 0;
    display: none;
    border: 1px solid var(--line);
    border-top: none;
  }
  .nav__links.open { display: flex; }
  .nav__links a { display: block; padding: 16px 24px; border-bottom: 1px solid var(--line); text-align: center; }
  .nav__toggle { display: flex; }

  /* Hero, matching smaller height across the photo hero and inner page heroes */
  .hero { min-height: 150px; }
  .hero::before { transform: scale(2); }
  .hero__inner { padding: 24px 20px; }
  .hero__logo img { max-width: 140px; margin-bottom: 20px; }
  .page-hero {
    min-height: 150px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Hero */
.hero {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: var(--bg);
  overflow: hidden;
}

.hero::before {
  /* Photo layer. scale() zooms without distorting, unlike stretching background-size. */
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('../assets/hero-bg.jpg');
  background-size: cover;
  background-position: center 50%;
  transform: scale(1.12);
}

.hero::after {
  /* Dark overlay so text stays readable over the background photo. */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,13,0.75), rgba(10,10,13,0.88)), radial-gradient(circle at 50% 30%, rgba(124,44,224,0.3), transparent 60%);
}

.hero__inner { position: relative; z-index: 1; padding: 36px 24px; }

.hero__logo img {
  max-width: 190px;
  margin: 0 auto 32px;
}

.hero__title {
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 18px;
}

.hero__tagline {
  font-size: 1rem;
  font-weight: 400;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 26px;
}

/* Stat strip */
.stat-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 26px 0;
  background: var(--bg-alt);
}
.stat-strip .stats {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: center;
  text-align: center;
}
.stat-strip strong {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--yellow);
}
.stat-strip span { font-size: 0.82rem; color: var(--muted); }

/* Testimonials carousel, continuous auto-scrolling loop */
.testimonial-carousel {
  position: relative;
  margin-top: 8px;
  overflow: hidden;
}

.testimonial-track {
  display: flex;
  gap: 20px;
  width: max-content;
  padding: 4px 4px 12px;
  animation: testimonialMarquee 42s linear infinite;
}

@keyframes testimonialMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.testimonial-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 18px 26px;
  flex: 0 0 auto;
  width: 500px;
  text-align: left;
}

.testimonial-card .stars { color: var(--yellow); margin-bottom: 12px; letter-spacing: 2px; font-size: 0.9rem; }
.testimonial-card p.quote { font-style: italic; margin-bottom: 16px; color: #E8E4F0; font-size: 0.95rem; }
.testimonial-card .name { font-weight: 700; font-size: 0.88rem; color: var(--muted); }

@media (max-width: 760px) {
  .testimonial-track { gap: 14px; animation-duration: 26s; }
  .testimonial-card { width: 82vw; padding: 16px 20px; }
  .testimonial-card p.quote { font-size: 0.88rem; margin-bottom: 12px; }
  .testimonial-card .stars { margin-bottom: 8px; }
}

/* Split link cards (Freestyle / Street) */
.split-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

#streetCard { background-image: url("../assets/gallery/street-card.jpg"); background-position: center 65%; }
#freestyleCard { background-image: url("../assets/gallery/freestyle-card.jpg"); background-position: center 66%; }

.split-card {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: flex-end;
  padding: 40px;
  color: var(--white);
  overflow: hidden;
  background-color: var(--bg-alt);
  background-size: cover;
  background-position: center;
}

.split-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,13,0.1), rgba(10,10,13,0.92));
}

.split-card__content { position: relative; z-index: 1; text-align: center; width: 100%; }
.split-card__content h3 { font-size: 2.2rem; margin-bottom: 14px; }

@media (max-width: 760px) { .split-cards { grid-template-columns: 1fr; } }

/* Locations */
.locations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 40px;
  justify-content: center;
}

.location-card {
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
}

.location-card iframe { width: 100%; height: 200px; border: 0; display: block; filter: invert(90%) hue-rotate(180deg) contrast(90%); }
.location-card__body { padding: 22px; }
.location-card__body h3 { font-size: 1.05rem; margin-bottom: 10px; }

.location-card__body .class-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  color: var(--muted);
}
.location-card__body .class-row:last-child { border-bottom: none; }

/* Welcome video */
.video-embed {
  max-width: 800px;
  margin: 32px auto 0;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-card);
}
.video-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Teacher */
.teacher-section { display: flex; gap: 40px; align-items: center; flex-wrap: wrap; }
.teacher-photo {
  flex: 0 0 200px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 3px solid var(--purple);
}
.teacher-text { flex: 1; min-width: 260px; }
.teacher-text p { color: var(--muted); }

/* Final CTA */
.section:has(.final-cta) { background: #000000; }

.final-cta {
  text-align: center;
  padding: 48px 40px;
  background: linear-gradient(135deg, var(--purple), var(--purple-deep));
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  position: relative;
  overflow: hidden;
}

/* Footer */
.site-footer { background: #000; border-top: 1px solid var(--line); padding: 50px 0 24px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; margin-bottom: 32px; }
.footer-grid h4 { font-size: 0.9rem; margin-bottom: 14px; color: var(--yellow); letter-spacing: 0.5px; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 8px; color: var(--muted); font-size: 0.88rem; }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 20px; text-align: center; font-size: 0.82rem; color: var(--muted); }

.social-links { display: flex; gap: 12px; }
.social-links a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.social-links a:hover { border-color: var(--yellow); color: var(--yellow); }
.social-links svg { width: 18px; height: 18px; }

@media (max-width: 760px) {
  .site-footer { padding: 40px 0 20px; }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 0;
    text-align: center;
    margin-bottom: 24px;
  }
  .footer-grid > div {
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
  }
  .footer-grid > div:first-child { padding-top: 0; }
  .footer-grid > div:last-child { border-bottom: none; padding-bottom: 0; }
  .footer-grid li { margin-bottom: 10px; }
  .social-links { justify-content: center; }
}

/* Inner page hero */
.page-hero {
  background: var(--bg-alt);
  padding: 64px 0;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { font-size: 3.4rem; font-weight: 900; }
@media (max-width: 760px) {
  /* Scales fluidly with viewport width so long titles like "Street, Commercial & Breaking" stay on one line */
  .page-hero h1 { font-size: clamp(1.15rem, calc(6.8vw - 0.2rem), 2.3rem); }
}

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-top: 36px; }
.gallery-grid .gallery-item {
  aspect-ratio: 4 / 5;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px dashed var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
  padding: 12px;
  overflow: hidden;
}
.gallery-grid .gallery-item img { width: 100%; height: 100%; object-fit: cover; }

/* Photo gallery, packed together with no gaps, natural photo sizes kept */
.photo-gallery {
  column-count: 4;
  column-gap: 0;
  margin-top: 36px;
}
.photo-gallery img {
  display: block;
  width: 100%;
  height: auto;
  break-inside: avoid;
}
@media (max-width: 900px) {
  .photo-gallery { column-count: 3; }
}
@media (max-width: 600px) {
  .photo-gallery { column-count: 2; }
}

/* Placeholder note */
.placeholder-note {
  background: rgba(255,204,41,0.08);
  border: 1px dashed var(--yellow-dark);
  color: var(--yellow);
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 0.85rem;
  margin: 24px 0;
}

/* Contact form */
.contact-form {
  display: grid;
  gap: 16px;
  max-width: 560px;
  border: 2px solid var(--purple);
  border-radius: 16px;
  padding: 28px;
}
.contact-form label { font-weight: 600; font-size: 0.85rem; margin-bottom: 6px; display: block; color: var(--muted); }
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 760px) { .contact-info-grid { grid-template-columns: 1fr; } }

/* Timetable */
.day-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.day-filter__label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--muted);
}
.day-filter__select {
  background: var(--bg-card);
  color: var(--white);
  border: 1px solid var(--purple);
  border-radius: 8px;
  padding: 9px 14px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
}
.day-filter__select:focus { outline: none; }

.timetable-table tr.day-filter-hidden { display: none !important; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.timetable-table { width: 100%; border-collapse: collapse; margin-top: 20px; background: var(--bg-card); border-radius: 10px; overflow: hidden; }
.timetable-table th, .timetable-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.timetable-table th { background: var(--purple); color: var(--white); text-transform: uppercase; letter-spacing: 0.5px; font-size: 0.74rem; }
.timetable-table tr:last-child td { border-bottom: none; }

/* Day-grouping heading row, only used on mobile (see media query below) —
   hidden by default so it has no effect on desktop. */
.timetable-table .day-divider { display: none; }

/* On mobile, turn each row into a stacked card instead of a wide table,
   so the timetable never needs a horizontal swipe. */
@media (max-width: 760px) {
  .table-scroll { overflow-x: visible; }
  .timetable-table thead { display: none; }
  .timetable-table, .timetable-table tbody, .timetable-table tr, .timetable-table td {
    display: block;
    width: 100%;
  }
  .timetable-table tr {
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
  }
  .timetable-table tr:last-child { margin-bottom: 0; }
  .timetable-table td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    text-align: right;
  }
  .timetable-table td:last-child { border-bottom: none; }
  .timetable-table td::before {
    content: attr(data-label);
    text-align: left;
    flex-shrink: 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.7rem;
    color: var(--purple);
  }

  /* Day heading, centred above each group of classes for that day */
  .timetable-table .day-divider {
    display: block;
    margin: 22px 0 8px;
    border: none;
    text-align: center;
  }
  .timetable-table .day-divider:first-child { margin-top: 14px; }
  .timetable-table .day-divider td {
    display: block;
    padding: 0;
    text-align: center;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    color: var(--white);
  }
  .timetable-table .day-divider td::before { content: none; }

  /* The day is now shown as the heading above, so hide it inside each card */
  .timetable-table td[data-label="Day"] { display: none; }
}

/* Booking embed (ClassForKids) */
.booking-embed {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.booking-embed iframe {
  width: 100%;
  height: 1500px;
  border: 0;
  display: block;
  background: #fff;
}
@media (max-width: 760px) {
  .booking-embed iframe { height: 1800px; }
}
