:root {
  --primary: #e33123;
  --primary-dark: #b82318;
  --secondary: #2a2560;
  --accent: #ff9f43;
  --surface: #ffffff;
  --surface-soft: #fff7f2;
  --bg: #fffaf7;
  --bg-alt: #f7f1ff;
  --text: #1f1c38;
  --text-soft: #625d7d;
  --text-muted: #8e88a7;
  --border: rgba(42, 37, 96, 0.1);
  --shadow-sm: 0 8px 20px rgba(31, 28, 56, 0.06);
  --shadow-md: 0 18px 44px rgba(31, 28, 56, 0.1);
  --shadow-lg: 0 32px 70px rgba(31, 28, 56, 0.14);
  --gradient-brand: linear-gradient(135deg, #e33123 0%, #ff8b45 100%);
  --gradient-soft: linear-gradient(135deg, #f4ecff 0%, #fff6ee 100%);
  --gradient-dark: linear-gradient(135deg, #241f54 0%, #352f78 100%);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 30px;
  --radius-xl: 42px;
  --radius-pill: 999px;
  --container: 1180px;
  --section-space: 110px;
  --font-primary: "Outfit", sans-serif;
  --transition: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  overflow-x: hidden;
}

body {
  font-family: var(--font-primary);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(244, 236, 255, 0.9), transparent 38%),
    radial-gradient(circle at top right, rgba(255, 232, 216, 0.8), transparent 30%),
    var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  width: 100%;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

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

ul {
  list-style: none;
}

.container {
  width: min(var(--container), calc(100% - 40px));
  margin: 0 auto;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: rgba(227, 49, 35, 0.08);
  border: 1px solid rgba(227, 49, 35, 0.12);
  color: var(--primary);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.section-badge-light {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff4ea;
}

.section-header {
  text-align: center;
  margin-bottom: 52px;
}

.section-title {
  margin-top: 18px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.section-title .highlight,
.hero-title .highlight {
  background: linear-gradient(135deg, #e33123 0%, #ff9f43 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-title .accent-text {
  color: var(--secondary);
}

.section-subtitle,
.hero-desc {
  margin-top: 18px;
  font-size: 1.05rem;
  color: var(--text-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-pill);
  padding: 15px 28px;
  font-family: inherit;
  font-size: 0.97rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--gradient-brand);
  color: white;
  box-shadow: 0 16px 30px rgba(227, 49, 35, 0.22);
}

.btn-secondary {
  background: rgba(42, 37, 96, 0.06);
  color: var(--secondary);
}

.btn-accent {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.btn-outline {
  background: transparent;
  color: var(--secondary);
  border: 1px solid rgba(42, 37, 96, 0.18);
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 12px 0;
  transition: background var(--transition), box-shadow var(--transition), backdrop-filter var(--transition);
}

.navbar.scrolled {
  background: rgba(255, 250, 247, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-sm);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.nav-logo span {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--secondary);
}

.nav-logo-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.nav-logo-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 600;
  transition: background var(--transition), color var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--secondary);
  background: rgba(42, 37, 96, 0.06);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  border: none;
  background: transparent;
}

.nav-hamburger span {
  width: 24px;
  height: 2px;
  background: var(--secondary);
  border-radius: 999px;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.nav-hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translateY(8.5px);
}

.nav-hamburger.active span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-8.5px);
}

.hero {
  padding: 40px 0 var(--section-space);
  background: #fff;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -18% auto;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(227, 49, 35, 0.14), transparent 68%);
  border-radius: 50%;
  z-index: 0;
}

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

.hero-copy {
  max-width: 100%;
  display: flex;
  flex-direction: column;
}

.hero-badge {
  order: 1;
}

.hero-title {
  order: 2;
}

.hero-desc {
  order: 3;
}

.hero-image {
  order: 4;
  margin: 30px 0;
}

.hero-actions {
  order: 5;
}

.hero-stats {
  order: 6;
}

@media (min-width: 992px) {
  .hero-copy {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    grid-template-areas:
      "badge image"
      "title image"
      "desc image"
      "actions image"
      "stats image";
    gap: 0 100px;
    align-items: center;
    text-align: left;
  }

  .hero-badge {
    grid-area: badge;
    order: unset;
  }

  .hero-title {
    grid-area: title;
    order: unset;
  }

  .hero-desc {
    grid-area: desc;
    order: unset;
  }

  .hero-actions {
    grid-area: actions;
    order: unset;
    margin-top: 30px;
  }

  .hero-stats {
    grid-area: stats;
    order: unset;
    margin-top: 40px;
  }

  .hero-image {
    grid-area: image;
    order: unset;
    margin: 0;
  }
}

.hero-title {
  margin-top: 12px;
  font-size: clamp(2.8rem, 5vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  font-weight: 900;
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-stats {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 500px;
}

.hero-stat {
  padding: 24px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(42, 37, 96, 0.1);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease;
}

.hero-stat:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.hero-stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--secondary);
}

.hero-stat-label {
  display: block;
  margin-top: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-soft);
  line-height: 1.4;
}

.hero-image {
  position: relative;
}

.hero-image-wrapper {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.1);
}

.main-hero-img {
  width: 100%;
  height: auto;
  transition: transform 0.6s ease;
}

.hero-image-wrapper:hover .main-hero-img {
  transform: none;
}

.hero-floating-badge {
  position: absolute;
  top: -30px;
  right: -20px;
  background: #fff;
  padding: 24px 32px;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  z-index: 2;
  border: 1px solid var(--border);
}

.badge-number {
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--secondary);
  line-height: 1;
}

.badge-text {
  font-size: 0.9rem;
  color: var(--text-soft);
  font-weight: 700;
  margin-top: 4px;
}

.hero-logos {
  margin-top: 80px;
  border-top: 1px solid var(--border);
  padding-top: 60px;
}

.logos-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #a0aec0;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  text-align: center;
  margin-bottom: 30px;
}

.logos-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 60px;
  flex-wrap: wrap;
}

.logos-row img {
  height: 32px;
  filter: grayscale(1) opacity(0.5);
  transition: all 0.3s ease;
}

.logos-row img:hover {
  filter: none;
  opacity: 1;
}

.logos-row img:hover {
  filter: none;
  opacity: 1;
}

.trust-strip {
  padding-bottom: calc(var(--section-space) * 0.85);
}

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

.trust-item {
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(42, 37, 96, 0.08);
  box-shadow: var(--shadow-sm);
  color: var(--secondary);
  font-weight: 700;
}

.story-section,
.proof-section,
.gallery,
.contact {
  padding: var(--section-space) 0;
}

.story-section {
  position: relative;
  overflow: hidden;
}

.story-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.93)),
    url("https://images.pexels.com/photos/7743256/pexels-photo-7743256.jpeg?auto=compress&cs=tinysrgb&w=1600") center/cover no-repeat;
  z-index: 0;
}

.story-grid {
  position: relative;
  z-index: 1;
}

.story-grid,
.franchise-grid,
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.story-mosaic {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  gap: 18px;
}

.story-photo {
  width: 100%;
  object-fit: cover;
  border-radius: 30px;
  box-shadow: var(--shadow-md);
}

.story-photo.tall {
  min-height: 540px;
  grid-row: span 2;
}

.story-photo.small {
  min-height: 240px;
}

.story-photo.wide {
  min-height: 280px;
}

.feature-list {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.feature-item {
  padding: 22px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.feature-item h3 {
  font-size: 1rem;
  margin-bottom: 8px;
  color: var(--secondary);
}

.feature-item p {
  font-size: 0.92rem;
  color: var(--text-soft);
}

.programs {
  padding: var(--section-space) 0;
  background: var(--bg-soft);
  overflow: hidden;
}

.programs-deck-container {
  position: relative;
  max-width: 450px;
  margin: 60px auto 0;
  perspective: 1000px;
  /* Prevent container from overflowing on narrow phones */
  width: min(450px, calc(100vw - 40px));
}

.programs-deck {
  position: relative;
  height: 480px;
  width: 100%;
}

.program-deck-card {
  position: absolute;
  inset: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  cursor: grab;
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.6s ease;
  transform-origin: center bottom;
  user-select: none;
  /* pan-y allows vertical page scroll while still detecting horizontal swipes */
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}

.program-deck-card.moving {
  transition: none;
  cursor: grabbing;
}

.program-deck-card:nth-last-child(2) {
  transform: translateY(20px);
  opacity: 0.8;
}

.program-deck-card:nth-last-child(3) {
  transform: translateY(40px);
  opacity: 0.6;
}

.program-deck-card .program-image {
  height: 260px;
  width: 100%;
  pointer-events: none;
}

.program-deck-card .program-caption {
  padding: 30px;
  text-align: center;
  pointer-events: none;
}

.deck-controls {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 40px;
}

.btn-round {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  padding: 0;
  box-shadow: var(--shadow-md);
}

.btn-round:active {
  transform: none;
}

.program-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.program-image-card:hover img {
  transform: none;
}

.program-caption {
  padding: 24px;
  text-align: center;
}

.program-caption h3 {
  font-family: var(--font-primary);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--secondary);
}

.learn-more {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.6;
  transition: var(--transition);
}

.program-image-card:hover .learn-more {
  opacity: 1;
}

/* Video Modal Styles */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.video-modal.active {
  opacity: 1;
  pointer-events: all;
}

.video-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
}

.video-modal-content {
  position: relative;
  width: min(1000px, 94%);
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
  transform: none;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.video-modal.active .video-modal-content {
  transform: none;
}

.video-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.video-modal-close:hover {
  background: var(--primary);
  transform: rotate(90deg);
}

.video-container {
  width: 100%;
  height: 100%;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Footer & Other tweaks */
.video-play-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  /* Always visible on touch devices — hover not available */
  opacity: 1;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

/* Only hide on devices that support true hover */
@media (hover: hover) {
  .video-play-hint {
    opacity: 0;
  }
  .gallery-item:hover .video-play-hint {
    opacity: 1;
  }
}

.video-play-hint svg {
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  transform: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (hover: hover) {
  .video-play-hint svg {
    transform: none;
  }
  .gallery-item:hover .video-play-hint svg {
    transform: none;
  }
}

/* Modal Styles */
.course-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.course-modal.active {
  opacity: 1;
  pointer-events: all;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  background: #fff;
  width: min(600px, 92%);
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 50px 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  transform: translateY(30px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.course-modal.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: var(--bg-soft);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--primary);
  color: white;
  transform: rotate(90deg);
}

.modal-body h2 {
  font-family: var(--font-secondary);
  font-size: 2.2rem;
  margin-bottom: 20px;
  color: var(--secondary);
}

.modal-body p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-soft);
  margin-bottom: 24px;
}

.modal-body ul {
  display: grid;
  gap: 16px;
  background: var(--bg-soft);
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.modal-body li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}

.modal-body li svg {
  color: var(--primary);
  margin-top: 2px;
  flex-shrink: 0;
}

@media (max-width: 991px) {
  .programs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .programs-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    padding: 40px 24px;
  }
}

.program-card:hover,
.proof-card:hover,
.gallery-card:hover,
.contact-panel:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.program-kicker {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: rgba(227, 49, 35, 0.08);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
}

.program-card h3,
.proof-card h3 {
  margin-top: 18px;
  font-size: 1.35rem;
  color: var(--secondary);
}

.program-card p,
.proof-card p {
  margin-top: 10px;
  color: var(--text-soft);
}

.program-features {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.program-features li {
  position: relative;
  padding-left: 18px;
  color: var(--text-soft);
  font-size: 0.94rem;
}

.program-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
}

.franchise-quick-view {
  padding: var(--section-space) 0;
  background: var(--bg-soft);
}

.quick-view-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  box-shadow: var(--shadow-lg);
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.quick-view-header {
  margin-bottom: 40px;
}

.quick-view-header p {
  color: var(--text-soft);
  margin-top: 12px;
  font-size: 1.1rem;
}

.quick-view-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 50px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 40px 0;
}

.quick-view-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.view-label {
  font-size: 0.8rem;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.view-value {
  font-size: 1.25rem;
  color: var(--secondary);
  font-weight: 800;
  font-family: var(--font-secondary);
}

.quick-view-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

@media (max-width: 768px) {
  .quick-view-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  .quick-view-card {
    padding: 40px 24px;
  }

  .quick-view-actions {
    flex-direction: column;
  }

  .quick-view-actions .btn {
    width: 100%;
  }
}

.gallery {
  background: #fff;
  position: relative;
  overflow: hidden;
  margin-top: 40px;
}

.gallery::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.9)),
    url("https://images.pexels.com/photos/31152359/pexels-photo-31152359.jpeg?auto=compress&cs=tinysrgb&w=1600") center/cover no-repeat;
  z-index: 0;
}

.gallery .container {
  position: relative;
  z-index: 1;
}

/* Use negative margins to break out of container on mobile for full-bleed scroll */
.gallery-reel-wrapper {
  overflow: visible;
}

.gallery-reel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 40px 0;
}

@media (max-width: 1200px) {
  .gallery-reel {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 991px) {
  .gallery-reel {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .gallery-reel {
    grid-template-columns: 1fr;
  }
}

.gallery-reel::-webkit-scrollbar {
  display: none;
}

.gallery-item {
  width: 100%;
  height: 420px;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s;
  scroll-snap-align: start;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Only apply lift/scale on devices with true hover (not touch) */
@media (hover: hover) {
  .gallery-item:hover {
    transform: translateY(-12px);
    box-shadow: 0 32px 70px rgba(31, 28, 56, 0.18);
    z-index: 10;
  }
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.item-overlay {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.92);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  pointer-events: none;
}

@media (max-width: 768px) {
  .gallery-reel {
    gap: 14px;
    padding: 32px 16px;
    margin: 0 -16px;
  }

  .gallery-item {
    flex: 0 0 min(240px, 72vw);
    height: 360px;
  }
}

@media (max-width: 480px) {
  .gallery-item {
    flex: 0 0 min(220px, 78vw);
    height: 330px;
  }
}

.proof-section {
  background: linear-gradient(180deg, #fff6ef 0%, #fff 100%);
}

.locations {
  padding: var(--section-space) 0;
  background: var(--gradient-dark);
  color: white;
  position: relative;
  overflow: hidden;
}

.locations::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(24, 20, 52, 0.94), rgba(42, 37, 96, 0.9)),
    url("https://images.pexels.com/photos/8423424/pexels-photo-8423424.jpeg?auto=compress&cs=tinysrgb&w=1600") center/cover no-repeat;
  z-index: 0;
}

.locations .container {
  position: relative;
  z-index: 1;
}

.locations .section-title,
.locations .section-subtitle {
  color: white;
}

.centre-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 30px;
}

.centre-map,
.location-card {
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.centre-map {
  min-height: 470px;
}

.map-placeholder {
  min-height: 470px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 36px;
  color: rgba(255, 255, 255, 0.78);
}

.map-placeholder h3 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: white;
}

.location-card {
  padding: 30px;
}

.location-map-pin {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  font-weight: 800;
  margin-bottom: 18px;
}

.location-card h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.location-address,
.location-info-item {
  color: rgba(255, 255, 255, 0.78);
}

.location-info {
  margin-top: 20px;
  display: grid;
  gap: 12px;
}

.centre-details .btn {
  width: 100%;
  margin-top: 18px;
}

.contact-grid {
  align-items: start;
}

.contact-panels {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.contact-panel,
.contact-form-wrapper {
  padding: 26px;
  border-radius: 30px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition);
}

.contact-panel h3 {
  color: var(--secondary);
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.contact-panel p,
.form-subtitle {
  color: var(--text-soft);
}

.contact-form h3 {
  font-size: 1.5rem;
  color: var(--secondary);
}

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

.form-group {
  margin-top: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(42, 37, 96, 0.12);
  background: #fff;
  font: inherit;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(227, 49, 35, 0.4);
  box-shadow: 0 0 0 4px rgba(227, 49, 35, 0.08);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-submit {
  width: 100%;
  margin-top: 18px;
}

.footer {
  padding: 70px 0 28px;
  background: #181434;
  color: rgba(255, 255, 255, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 36px;
}

.footer-brand .nav-logo {
  margin-bottom: 16px;
}

.footer-brand .nav-logo span,
.footer-col h4 {
  color: white;
}

.footer-desc {
  max-width: 320px;
  color: rgba(255, 255, 255, 0.68);
}

.footer-col h4 {
  margin-bottom: 14px;
}

.footer-col ul {
  display: grid;
  gap: 10px;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.66);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  font-size: 0.88rem;
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.input-error {
  border-color: rgba(227, 49, 35, 0.5) !important;
  box-shadow: 0 0 0 4px rgba(227, 49, 35, 0.08) !important;
}

.field-error {
  display: block;
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--primary);
}

.form-status {
  margin-top: 16px;
}

.form-status-success {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.form-status-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(227, 49, 35, 0.1);
  color: var(--primary);
}

.spinner {
  animation: spin 1s linear infinite;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  padding: 14px 18px;
  border-radius: 16px;
  color: white;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--transition), transform var(--transition);
  z-index: 1200;
}

.toast-success {
  background: #059669;
}

.toast-error {
  background: var(--primary);
}

.toast-show {
  opacity: 1;
  transform: translateY(0);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 50px;
  height: 50px;
  background: var(--gradient-brand);
  color: white;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(227, 49, 35, 0.35);
}

@media (max-width: 480px) {
  .back-to-top {
    right: 16px;
    bottom: 80px; /* Above toast if visible */
    width: 44px;
    height: 44px;
  }
}

.admin-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(24, 20, 52, 0.58);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  z-index: 1300;
}

.admin-panel-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.admin-panel {
  width: min(980px, calc(100% - 28px));
  max-height: 84vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
}

.admin-panel-header,
.admin-panel-footer {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(42, 37, 96, 0.08);
}

.admin-panel-footer {
  border-top: 1px solid rgba(42, 37, 96, 0.08);
  border-bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-panel-header h3 {
  color: var(--secondary);
}

.admin-close {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(42, 37, 96, 0.06);
  font-size: 1.5rem;
  cursor: pointer;
}

.admin-panel-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 18px 24px;
}

.admin-stat {
  padding: 18px;
  border-radius: 18px;
  background: var(--bg-alt);
}

.admin-stat-val {
  display: block;
  color: var(--secondary);
  font-size: 1.5rem;
  font-weight: 800;
}

.admin-stat-label {
  color: var(--text-soft);
  font-size: 0.88rem;
}

.admin-panel-body {
  overflow: auto;
  padding: 0 24px 24px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(42, 37, 96, 0.08);
  font-size: 0.9rem;
}

.admin-table thead {
  position: sticky;
  top: 0;
  background: white;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-slide-left {
  transform: translateX(-32px);
}

.reveal-slide-right {
  transform: translateX(32px);
}

.reveal-slide-left.visible,
.reveal-slide-right.visible {
  transform: translateX(0);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1024px) {

  .hero-grid,
  .story-grid,
  .franchise-grid,
  .contact-grid,
  .centre-layout {
    grid-template-columns: 1fr;
  }

  .story-copy,
  .franchise-copy {
    order: -1;
  }

  .hero-copy {
    max-width: 680px;
  }

  .trust-grid,
  .programs-grid,
  .proof-grid,
  .gallery-grid,
  .footer-grid,
  .feature-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  :root {
    --section-space: 72px;
  }

  .container {
    width: min(var(--container), calc(100% - 28px));
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 72px;
    left: 14px;
    right: 14px;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    background: rgba(255, 250, 247, 0.97);
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    /* Ensure it sits above the content */
    z-index: 999;
    backdrop-filter: blur(14px);
  }

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

  .nav-link {
    /* Bigger tap targets on mobile */
    padding: 14px 16px;
    font-size: 1rem;
    border-radius: 16px;
  }

  .nav-hamburger {
    display: flex;
    /* Larger tap area */
    padding: 10px;
  }

  .nav-hamburger span {
    width: 26px;
    height: 2.5px;
  }

  .nav-logo span {
    font-size: 1rem;
  }

  .nav-logo-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

  .hero-title {
    font-size: 2.2rem;
    line-height: 1.1;
    letter-spacing: -0.04em;
  }

  .hero::before {
    background:
      linear-gradient(180deg, rgba(255, 250, 247, 0.98) 0%, rgba(255, 250, 247, 0.95) 60%, rgba(255, 250, 247, 0.9) 100%),
      url("assets/images/hero-abacus.png") right -72px top 34px / min(72vw, 430px) no-repeat,
      radial-gradient(circle at top right, rgba(227, 49, 35, 0.08), transparent 34%),
      linear-gradient(135deg, #fff8f3 0%, #f6efff 100%);
  }

  .hero-actions,
  .trust-grid,
  .feature-list,
  .programs-grid,
  .proof-grid,
  .gallery-grid,
  .footer-grid,
  .admin-panel-stats,
  .form-row {
    grid-template-columns: 1fr;
  }

  /* Keep stats 2-column on mobile for better density */
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    gap: 12px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .story-photo.tall,
  .story-photo.small,
  .story-photo.wide,
  .gallery-card {
    min-height: 220px;
  }

  .contact-form-wrapper,
  .contact-panel,
  .program-card,
  .proof-card,
  .feature-item,
  .trust-item,
  .location-card {
    padding: 20px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-bottom-links {
    flex-wrap: wrap;
  }

  /* Core Courses deck — tighter on mobile */
  .programs-deck-container {
    margin-top: 40px;
    width: min(380px, calc(100vw - 40px));
  }

  .programs-deck {
    height: 420px;
  }

  .program-deck-card .program-image {
    height: 220px;
  }

  .deck-controls {
    margin-top: 28px;
    gap: 20px;
  }

  .btn-round {
    width: 52px;
    height: 52px;
  }

  /* Modal — full-screen friendly */
  .modal-content {
    width: min(560px, calc(100vw - 24px));
    padding: 36px 22px 30px;
    max-height: 88vh;
  }

  .modal-body h2 {
    font-size: 1.7rem;
  }

  /* Prevent iOS input zoom */
  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px;
  }

  /* Video modal full-screen on mobile */
  .video-modal-content {
    width: 100%;
    border-radius: 0;
    border-radius: 16px;
  }
}

@media (max-width: 991px) {
  .hero-grid {
    text-align: center;
  }

  .hero-copy {
    margin: 0 auto;
    align-items: center;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    max-width: 400px;
    gap: 12px;
  }

  .hero-stat {
    padding: 16px;
  }

  .hero-stat-value {
    font-size: 1.6rem;
  }

  .hero-stat-label {
    font-size: 0.8rem;
  }

  .hero-actions {
    justify-content: center;
  }

  .story-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .story-mosaic {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .story-photo {
    border-radius: 30px;
    box-shadow: var(--shadow-md);
    width: 100%;
  }

  .story-photo:last-child {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    border-radius: 30px;
    box-shadow: var(--shadow-md);
  }

  .story-photo.tall {
    grid-row: auto;
    min-height: 300px;
  }

  .story-media {
    width: 100%;
    margin: 0;
  }

  .feature-list {
    grid-template-columns: 1fr;
  }

  .hero-image {
    width: 100%;
    margin-top: 30px;
    margin-bottom: 30px;
  }

  .hero-image-wrapper {
    border-radius: 24px;
    box-shadow: var(--shadow-md);
  }

  .hero-floating-badge {
    right: 0;
    left: 50%;
    transform: translateX(-50%);
    top: -40px;
    width: max-content;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-top: 8px;
  }

  .hero::before {
    background:
      linear-gradient(180deg, rgba(255, 250, 247, 0.98) 0%, rgba(255, 250, 247, 0.95) 58%, rgba(255, 250, 247, 0.92) 100%),
      url("assets/images/hero-abacus.png") right -90px top 28px / 310px no-repeat,
      radial-gradient(circle at top right, rgba(227, 49, 35, 0.08), transparent 34%),
      linear-gradient(135deg, #fff8f3 0%, #f6efff 100%);
  }

  .hero-title {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px;
  }

  .toast {
    right: 12px;
    left: 12px;
    bottom: 12px;
    font-size: 0.9rem;
  }

  /* Smaller deck on tiny phones */
  .programs-deck-container {
    width: min(340px, calc(100vw - 32px));
  }

  .programs-deck {
    height: 390px;
  }

  .program-deck-card .program-image {
    height: 200px;
  }

  .program-caption h3 {
    font-size: 1.2rem;
  }

  /* Ensure section badge wraps gracefully */
  .section-badge {
    font-size: 0.78rem;
    padding: 8px 14px;
    text-align: center;
  }

  /* Quick-view card on tiny screens */
  .quick-view-card {
    padding: 30px 18px;
  }

  .quick-view-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 28px 0;
  }

  /* Gallery grid padding adjustment */
  .gallery-reel {
    padding: 28px 0;
    margin: 0;
    gap: 16px;
  }
}