/* ==========================================================================
   iDrum Academy - Public Website
   ========================================================================== */

:root {
  --brand: #4a90e2;
  --brand-dark: #357abd;
  --brand-glow: rgba(74, 144, 226, 0.35);
  --ink: #1a2233;
  --ink-soft: #4a5568;
  --muted: #718096;
  --card-bg: rgba(255, 255, 255, 0.97);
  --card-border: rgba(255, 255, 255, 0.6);
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  --radius: 16px;
  --maxw: 1140px;
  --font-head: "Poppins", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.65;
  background-color: #0d1117;
  overflow-x: hidden;
}

/* --- Fixed background layer --- */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: url("assets/bg.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(8, 12, 22, 0.55) 0%,
    rgba(8, 12, 22, 0.65) 45%,
    rgba(8, 12, 22, 0.82) 100%
  );
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

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

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  padding: 12px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease, box-shadow 0.2s ease,
    color 0.2s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background-color: var(--brand);
  color: #fff;
  box-shadow: 0 8px 24px var(--brand-glow);
}

.btn-primary:hover {
  background-color: var(--brand-dark);
  box-shadow: 0 10px 30px var(--brand-glow);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  transform: translateY(-2px);
}

.btn-lg {
  font-size: 1.08rem;
  padding: 15px 34px;
}

.btn-block {
  width: 100%;
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.navbar.scrolled {
  background-color: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.logo-icon {
  display: inline-flex;
  color: var(--brand);
}

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

.logo-brand {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.5px;
}

.logo-sub {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.75);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  font-size: 0.98rem;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #fff;
}

.nav-portal {
  color: #fff;
  font-weight: 600 !important;
  opacity: 0.9;
}

.btn-nav-cta {
  padding: 9px 20px;
  font-size: 0.95rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2.5px;
  border-radius: 2px;
  background-color: #fff;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
}

/* Soft centered vignette to gently settle the imagery behind the text */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    80% 75% at 50% 45%,
    rgba(6, 10, 20, 0.5) 0%,
    rgba(6, 10, 20, 0.22) 55%,
    rgba(6, 10, 20, 0) 82%
  );
  pointer-events: none;
}

/* Framed "glass" panel that holds the hero copy for clean, even readability.
   The panel's fill/border/shadow live on ::after so we can blur that layer
   for a soft, feathered edge while the text above stays perfectly sharp. */
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 860px;
  padding: 48px 56px;
}

.hero-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 22px;
  background: radial-gradient(
    130% 130% at 50% 40%,
    rgba(8, 12, 22, 0.1) 0%,
    rgba(8, 12, 22, 0.5) 65%,
    rgba(8, 12, 22, 0.32) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  filter: blur(6px);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(124, 184, 255, 0.55);
  background: rgba(74, 144, 226, 0.18);
  color: #9cc8f5;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(0.62rem, 1.5vw, 0.74rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.2;
}

.hero-badge-icon {
  flex-shrink: 0;
  color: var(--brand);
}

.hero-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2.2rem, 5.4vw, 3.85rem);
  line-height: 1.08;
  color: #fff;
  letter-spacing: -1px;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.hero-accent {
  color: #7cb8ff;
}

.hero-subtitle {
  margin-top: 22px;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  color: rgba(255, 255, 255, 0.96);
  max-width: 660px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.hero-cta {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section {
  padding: 88px 0;
}

.section-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  color: #fff;
  text-align: center;
  letter-spacing: -0.5px;
  text-shadow: 0 3px 20px rgba(0, 0, 0, 0.45);
}

.section-title.left {
  text-align: left;
}

.section-subtitle {
  margin: 16px auto 0;
  max-width: 680px;
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}

.section-cta {
  margin-top: 48px;
  text-align: center;
}

/* --- Cards --- */
.card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s ease, border-color 0.4s ease;
}

/* ==========================================================================
   Feature grid
   ========================================================================== */
.feature-grid {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 30px 26px;
  text-align: left;
}

.feature-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(74, 144, 226, 0.15), rgba(74, 144, 226, 0.05));
  color: var(--brand);
  margin-bottom: 18px;
}

.feature-icon svg {
  width: 28px;
  height: 28px;
}

.feature-card h3 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--ink);
}

.feature-card p {
  color: var(--ink-soft);
  font-size: 0.97rem;
}

/* ==========================================================================
   Instructor
   ========================================================================== */
.instructor-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: center;
}

.instructor-image {
  height: 100%;
  min-height: 420px;
}

.instructor-photo {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  object-position: center 15%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
}

.image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, #2a3a55, #4a90e2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow);
}

.image-placeholder svg {
  width: 84px;
  height: 84px;
}

.image-placeholder span {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: 1px;
}

.instructor-text {
  padding: 40px;
}

.instructor-text .section-title.left {
  color: var(--ink);
  text-shadow: none;
}

.instructor-text p {
  color: #3d4a5c;
  margin-bottom: 16px;
}

.callout {
  margin: 20px 0 24px;
  padding: 18px 22px;
  border-left: 4px solid var(--brand);
  background-color: rgba(74, 144, 226, 0.1);
  border-radius: 0 10px 10px 0;
  font-family: var(--font-head);
  font-style: italic;
  font-size: 1.18rem;
  font-weight: 500;
  color: #2d3748;
}

.instructor-text p:last-child {
  margin-bottom: 0;
}

.instructor-facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 4px;
}

.instructor-facts li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background-color: rgba(74, 144, 226, 0.1);
  color: #2d3748;
  font-size: 0.88rem;
  font-weight: 500;
}

.instructor-registry {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

.rsl-badge-link {
  display: inline-block;
  border-radius: 10px;
  line-height: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rsl-badge-link img {
  display: block;
  height: 44px;
  width: auto;
  border-radius: 8px;
}

/* The MusicTeacher seal is compact/square, so show it larger than the wide RSL
   wordmark banner. The row is centre-aligned, so the shorter banner sits neatly
   against the taller seal. */
.rsl-badge-link.rsl-badge-seal img {
  height: 68px;
  border-radius: 0;
}

.rsl-badge-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.rsl-badge-caption {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--brand-dark);
  transition: color 0.2s ease;
}

.rsl-badge-caption:hover {
  color: var(--brand);
  text-decoration: underline;
}

/* ==========================================================================
   Pricing
   ========================================================================== */
.pricing-grid {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  align-items: stretch;
}

/* Compact the Programs section so all of it fits within one viewport height */
#programs {
  padding: 60px 0 44px;
}
#programs .section-subtitle {
  margin-top: 12px;
}
#programs .pricing-mode-wrap {
  margin-top: 26px;
}
#programs .pricing-card {
  padding: 28px 26px;
}
#programs .pricing-price {
  margin: 8px 0 14px;
}
#programs .pricing-card p {
  font-size: 0.93rem;
}
#programs .pricing-note {
  margin-top: 24px;
  padding: 12px 22px;
}
#programs .section-cta {
  margin-top: 26px;
}

.pricing-card {
  padding: 38px 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  position: relative;
  /* Slower than the shared .card transition for a smoother, more deliberate lift */
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.55s ease, border-color 0.55s ease;
}

.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  /* Fixed, uniform width across all three tiers; text stays on one line and centered */
  width: 250px;
  max-width: calc(100% - 24px);
  white-space: nowrap;
  text-align: center;
  background-color: var(--brand);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  padding: 6px 18px;
  border-radius: 999px;
  box-shadow: 0 6px 16px var(--brand-glow);
}

.pricing-name {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  transition: color 0.45s ease;
}

.pricing-price {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 2.8rem;
  color: var(--brand);
  margin: 14px 0 20px;
  line-height: 1;
}

.pricing-price span {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  margin-left: 4px;
}

.pricing-card p {
  color: var(--ink-soft);
  font-size: 0.97rem;
}

/* Note clarifying the cards are 1-on-1 pricing + group-lesson option */
.pricing-note {
  margin: 34px auto 0;
  max-width: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 15px 24px;
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.98rem;
  line-height: 1.5;
  /* Self-sufficient dark fill so the panel reads correctly even where iOS
     Safari can't blur the fixed background layer behind it. */
  background: rgba(10, 14, 24, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.pricing-note-tag {
  flex-shrink: 0;
  background-color: var(--brand);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 5px 13px;
  border-radius: 999px;
  box-shadow: 0 6px 16px var(--brand-glow);
}

.pricing-note strong {
  color: #fff;
  font-weight: 600;
}

.pricing-note a {
  color: var(--brand);
  font-weight: 600;
  transition: color 0.2s ease;
}

.pricing-note a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ==========================================================================
   Photo gallery
   ========================================================================== */
.gallery-carousel {
  margin-top: 52px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

/* JS carousel: 2-row strip that slides sideways. Photos 1–8 stay in the
   opening 4×2 view; 9–14 sit in the columns to the right. */
.has-js .gallery-viewport {
  overflow: hidden;
}

.has-js .gallery-grid {
  --gallery-gap: 18px;
  --gallery-visible: 4;
  --gallery-index: 0;
  --gallery-cols: 7;
  grid-template-rows: repeat(2, auto);
  grid-template-columns: repeat(
    var(--gallery-cols),
    calc((100% - (var(--gallery-visible) - 1) * var(--gallery-gap)) / var(--gallery-visible))
  );
  gap: var(--gallery-gap);
  transform: translateX(
    calc(-1 * var(--gallery-index) * (100% + var(--gallery-gap)) / var(--gallery-visible))
  );
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.has-js .gallery-item:nth-child(1)  { grid-column: 1; grid-row: 1; }
.has-js .gallery-item:nth-child(2)  { grid-column: 2; grid-row: 1; }
.has-js .gallery-item:nth-child(3)  { grid-column: 3; grid-row: 1; }
.has-js .gallery-item:nth-child(4)  { grid-column: 4; grid-row: 1; }
.has-js .gallery-item:nth-child(5)  { grid-column: 1; grid-row: 2; }
.has-js .gallery-item:nth-child(6)  { grid-column: 2; grid-row: 2; }
.has-js .gallery-item:nth-child(7)  { grid-column: 3; grid-row: 2; }
.has-js .gallery-item:nth-child(8)  { grid-column: 4; grid-row: 2; }
.has-js .gallery-item:nth-child(9)  { grid-column: 5; grid-row: 1; }
.has-js .gallery-item:nth-child(10) { grid-column: 6; grid-row: 1; }
.has-js .gallery-item:nth-child(11) { grid-column: 5; grid-row: 2; }
.has-js .gallery-item:nth-child(12) { grid-column: 6; grid-row: 2; }
.has-js .gallery-item:nth-child(13) { grid-column: 7; grid-row: 1; }
.has-js .gallery-item:nth-child(14) { grid-column: 7; grid-row: 2; }

.gallery-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.gallery-controls[hidden] {
  display: none;
}

.gallery-nav-btn {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.gallery-nav-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.45);
  transform: scale(1.05);
}

.gallery-nav-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.gallery-nav-btn:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}

.gallery-item {
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4 / 3;
  background: rgba(0, 0, 0, 0.25);
  box-shadow: var(--shadow);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s ease;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 40%,
    rgba(8, 12, 22, 0.55) 100%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
}

.gallery-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.42);
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-item:hover::after {
  opacity: 1;
}

.gallery-item:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 12, 22, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 72px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-img {
  max-width: min(1100px, 100%);
  max-height: calc(100vh - 96px);
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.8rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.05);
}

.lightbox-close {
  top: 20px;
  right: 20px;
}

.lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev:hover,
.lightbox-next:hover {
  transform: translateY(-50%) scale(1.05);
}

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testimonial-carousel {
  margin-top: 52px;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.testimonial-card {
  position: relative;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100%;
  box-sizing: border-box;
  /* Pre-promote to a composited layer so the browser doesn't have to
     re-rasterize text the instant a hover transform kicks in (that
     re-rasterization mid-transition is what caused the blurry text). */
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.testimonial-card.is-hidden {
  display: none;
}

.testimonial-card blockquote {
  color: var(--ink-soft);
  font-size: 1rem;
  font-style: italic;
  flex: 1 1 auto;
}

.testimonial-card figcaption {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  margin-top: auto;
}

.testimonial-card figcaption span {
  font-weight: 400;
  color: var(--muted);
}

.testimonial-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.testimonial-nav-btn {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.testimonial-nav-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.45);
  transform: scale(1.05);
}

.testimonial-nav-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* ==========================================================================
   Contact / Final CTA
   ========================================================================== */
.final-cta {
  padding-bottom: 100px;
}

.contact-card {
  max-width: 680px;
  margin: 44px auto 0;
  padding: 40px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 7px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
}

.req {
  color: #e53e3e;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d5dbe3;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background-color: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.18);
}

.form-group textarea {
  resize: vertical;
}

.form-status {
  margin-top: 16px;
  text-align: center;
  font-weight: 500;
  min-height: 1.4em;
}

.form-status.success {
  color: #2f855a;
}

.form-status.error {
  color: #c53030;
}

.btn[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background-color: rgba(9, 12, 20, 0.92);
  backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, 0.85);
  padding-top: 48px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr 1fr;
  gap: 32px;
  padding-bottom: 36px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.footer-info {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-info li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.footer-info a:hover {
  color: var(--brand);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--brand);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 20px 0;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}

/* ==========================================================================
   Hover & motion effects
   ========================================================================== */
.feature-card,
.pricing-card,
.testimonial-card,
.contact-card {
  position: relative;
}

.feature-card {
  overflow: hidden;
}

/* Feature cards: animated top accent + lift + icon flourish */
.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), #7cb8ff);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.38);
  border-color: rgba(74, 144, 226, 0.4);
}

.feature-icon {
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}

.feature-card:hover .feature-icon {
  background: linear-gradient(135deg, var(--brand), #7cb8ff);
  color: #fff;
  transform: scale(1.12) rotate(-6deg);
  box-shadow: 0 12px 24px var(--brand-glow);
}

.feature-card h3 {
  transition: color 0.3s ease;
}

.feature-card:hover h3 {
  color: var(--brand);
}

/* Pricing cards: lift + price pop + badge/title flourish.
   Guarded by (hover: hover) so touch devices don't get a "stuck" lifted
   card after a tap; the transitions themselves stay defined for all devices. */
.pricing-price {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.pricing-badge {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.5s ease;
}

@media (hover: hover) and (pointer: fine) {
  .pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.38);
    border-color: rgba(74, 144, 226, 0.4);
  }

  .pricing-card:hover .pricing-price {
    transform: scale(1.08);
  }

  .pricing-card:hover .pricing-name {
    color: var(--brand);
  }

  .pricing-card:hover .pricing-badge {
    transform: translateX(-50%) translateY(-4px);
    box-shadow: 0 10px 22px var(--brand-glow);
  }
}

/* Testimonial cards: soft glow + lift + gentle scale.
   scale() never triggers layout/reflow, so it enlarges the whole card
   (text included) without ever changing where lines wrap — unlike
   animating font-size, which reflows text at the new size. */
.testimonial-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  border-radius: var(--radius) 0 0 var(--radius);
  background: linear-gradient(180deg, var(--brand), #7cb8ff);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.testimonial-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px var(--brand-glow);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .testimonial-card:hover,
  .has-js .testimonial-card.visible:hover {
    transform: translateY(-6px) scale(1.015);
    box-shadow: 0 28px 52px rgba(0, 0, 0, 0.36);
    border-color: rgba(74, 144, 226, 0.4);
    z-index: 2;
  }

  .testimonial-card:hover::before,
  .has-js .testimonial-card.visible:hover::before {
    transform: scaleY(1);
  }

  .testimonial-card:hover::after,
  .has-js .testimonial-card.visible:hover::after {
    opacity: 1;
  }
}

/* Contact card + instructor image */
.contact-card:hover {
  box-shadow: 0 32px 68px rgba(0, 0, 0, 0.42);
}

.instructor-photo {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}

.instructor-photo:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 34px 70px rgba(0, 0, 0, 0.4);
}

.image-placeholder {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}

.image-placeholder:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 34px 70px rgba(0, 0, 0, 0.4);
}

/* Logo */
.logo {
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.04);
}

/* Primary button shine sweep */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -130%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transform: skewX(-22deg);
  transition: left 0.65s ease;
  pointer-events: none;
}

.btn-primary:hover::after {
  left: 140%;
}

.btn-secondary:hover {
  box-shadow: 0 10px 26px rgba(255, 255, 255, 0.15);
}

/* Animated nav-link underline */
.nav-links a:not(.btn):not(.nav-portal) {
  position: relative;
}

.nav-links a:not(.btn):not(.nav-portal)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.nav-links a:not(.btn):not(.nav-portal):hover::after {
  transform: scaleX(1);
}

/* ---- Scroll reveal (gated on .has-js to avoid flash of unstyled content) ---- */
.has-js .feature-card,
.has-js .testimonial-card,
.has-js .gallery-item,
.has-js .instructor-image,
.has-js .instructor-text,
.has-js .contact-card,
.has-js .section-cta,
.has-js .section-title,
.has-js .section-subtitle {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.has-js .feature-card.visible,
.has-js .testimonial-card.visible,
.has-js .gallery-item.visible,
.has-js .instructor-image.visible,
.has-js .instructor-text.visible,
.has-js .contact-card.visible,
.has-js .section-cta.visible,
.has-js .section-title.visible,
.has-js .section-subtitle.visible {
  opacity: 1;
  transform: none;
}

/* Pricing cards reveal with a fade only (no translate), so their badges
   don't clip against the card's top edge during the scroll-in animation */
.has-js .pricing-card {
  opacity: 0;
  transition: opacity 0.7s ease;
}

.has-js .pricing-card.visible {
  opacity: 1;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .instructor-grid {
    grid-template-columns: 1fr;
  }
  .instructor-image,
  .instructor-photo,
  .image-placeholder {
    min-height: 320px;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
  }
  .testimonial-grid {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }
  .testimonial-controls {
    margin-top: 22px;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .has-js .gallery-grid {
    --gallery-gap: 14px;
    --gallery-visible: 2;
  }
  .gallery-controls {
    margin-top: 22px;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Switch to the hamburger nav earlier (before the full link row starts
   wrapping/cramming against the logo on tablet-width screens). */
@media (max-width: 900px) {
  /* The mobile menu is a position:fixed child of .navbar, so the navbar must
     not create a containing block for it. backdrop-filter does exactly that,
     which collapses the panel against the 72px header and leaves a stray dark
     bar over the logo once the page is scrolled. Use a more opaque background
     instead of the blur here. */
  .navbar.scrolled {
    background-color: rgba(13, 17, 23, 0.95);
    backdrop-filter: none;
  }
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background-color: rgba(13, 17, 23, 0.97);
    backdrop-filter: blur(12px);
    padding: 12px 24px 24px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
    transform: translateY(-140%);
    visibility: hidden;
    transition: transform 0.32s ease, visibility 0s linear 0.32s;
  }
  .nav-links.open {
    transform: translateY(0);
    visibility: visible;
    transition: transform 0.32s ease, visibility 0s;
  }
  .nav-links a {
    width: 100%;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 1.05rem;
  }
  .btn-nav-cta {
    margin-top: 14px;
    width: 100%;
  }
}

@media (max-width: 720px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 110px 16px 72px;
  }
  .hero-inner {
    padding: 34px 26px;
    border-radius: 18px;
  }
  .hero-badge {
    letter-spacing: 0.08em;
    padding: 7px 12px 7px 10px;
  }
  .section {
    padding: 64px 0;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .contact-card,
  .instructor-text {
    padding: 28px 22px;
  }
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .has-js .gallery-grid {
    --gallery-gap: 12px;
    --gallery-visible: 2;
  }
  .lightbox {
    padding: 56px 16px;
  }
  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }
  .lightbox-prev {
    left: 8px;
  }
  .lightbox-next {
    right: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
    animation: none !important;
  }
  /* Ensure scroll-reveal content is always shown when motion is reduced */
  .has-js .feature-card,
  .has-js .pricing-card,
  .has-js .testimonial-card,
  .has-js .gallery-item,
  .has-js .instructor-image,
  .has-js .instructor-text,
  .has-js .contact-card,
  .has-js .section-cta,
  .has-js .section-title,
  .has-js .section-subtitle {
    opacity: 1 !important;
    transform: none !important;
  }
}
