/* ========================================================
   LOVABLE DESIGN SYSTEM STYLESHEET
   Accredited implementation based on DESIGN.md (Lovable)
   Warm Cream Foundation (#f7f4ed) • Charcoal (#1c1c1c)
   Camera Plain Typography • Inset Shadow Buttons • #eceae4 Borders
   Negative Letter-Spacing • Editorial Whitespace
   ======================================================== */

:root {
  /* ─── Lovable Color Palette (DESIGN.md) ─── */
  --bg-cream: #f7f4ed;            /* Signature warm cream/parchment foundation */
  --text-charcoal: #1c1c1c;       /* Organic warm near-black */
  --text-offwhite: #fcfbf8;       /* Button text on dark surfaces */
  --text-muted: #5f5f5d;          /* Secondary text, descriptions, captions */
  
  /* Opacity-driven neutral steps (DESIGN.md lines 28-36) */
  --charcoal-100: #1c1c1c;
  --charcoal-83: rgba(28, 28, 28, 0.83);
  --charcoal-82: rgba(28, 28, 28, 0.82);
  --charcoal-40: rgba(28, 28, 28, 0.4);
  --charcoal-04: rgba(28, 28, 28, 0.04);
  --charcoal-03: rgba(28, 28, 28, 0.03);

  /* Surface & Borders (DESIGN.md lines 37-40) */
  --border-subtle: #eceae4;       /* Passive card borders, dividers, outlines */
  --border-interactive: rgba(28, 28, 28, 0.4);

  /* Signature Button Inset Shadow (DESIGN.md line 46) */
  --btn-inset-shadow: rgba(255, 255, 255, 0.2) 0px 0.5px 0px 0px inset,
                      rgba(0, 0, 0, 0.2) 0px 0px 0px 0.5px inset,
                      rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;

  /* Focus & Interactive */
  --ring-blue: rgba(59, 130, 246, 0.5);
  --focus-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;

  /* Typography Stack (Plus Jakarta Sans Humanist Variable with Fallbacks) */
  --font-family: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Radii Scale (DESIGN.md lines 192-198) */
  --radius-micro: 4px;            /* Small buttons */
  --radius-standard: 6px;         /* Buttons, inputs, nav menu */
  --radius-compact: 8px;          /* Compact cards */
  --radius-card: 12px;            /* Standard cards, template showcases */
  --radius-container: 16px;       /* Large containers, footer */
  --radius-pill: 9999px;          /* Action pills, icon buttons, toggles */

  /* Structural aliases */
  --bg-body: var(--bg-cream);
  --bg-surface: var(--bg-cream);
  --bg-subtle: #f2eee5;
  --bg-card: #fcfbf8;
  --bg-input: #fcfbf8;
  --bg-modal: #fcfbf8;

  --text-main: var(--text-charcoal);
  --text-secondary: var(--text-muted);
  --text-inverse: var(--text-offwhite);

  --border: var(--border-subtle);
  --nav-height: 74px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Dark Mode Inversion ─── */
[data-theme="dark"] {
  --bg-cream: #141414;
  --text-charcoal: #f7f4ed;
  --text-offwhite: #141414;
  --text-muted: #9e9d99;

  --charcoal-100: #f7f4ed;
  --charcoal-83: rgba(247, 244, 237, 0.85);
  --charcoal-82: rgba(247, 244, 237, 0.82);
  --charcoal-40: rgba(247, 244, 237, 0.4);
  --charcoal-04: rgba(255, 255, 255, 0.05);
  --charcoal-03: rgba(255, 255, 255, 0.03);

  --border-subtle: #262523;
  --border-interactive: rgba(247, 244, 237, 0.4);

  --bg-body: #141414;
  --bg-surface: #1a1a19;
  --bg-subtle: #201f1d;
  --bg-card: #1c1c1b;
  --bg-input: #1a1a19;
  --bg-modal: #1c1c1b;

  --text-main: #f7f4ed;
  --text-secondary: #9e9d99;
  --text-inverse: #141414;
  --border: var(--border-subtle);

  --btn-inset-shadow: rgba(255, 255, 255, 0.1) 0px 0.5px 0px 0px inset,
                      rgba(0, 0, 0, 0.4) 0px 0px 0px 0.5px inset,
                      rgba(0, 0, 0, 0.2) 0px 1px 2px 0px;
}

/* ─── Reset & Base ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-family);
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-body);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5; /* DESIGN.md: 1.50 body line height */
  background-color: var(--bg-body);
  color: var(--text-main);
  transition: background-color 0.2s ease, color 0.2s ease;
  overflow-x: hidden;
  width: 100%;
}

main {
  flex: 1;
}

a {
  color: var(--text-main);
  text-decoration: underline; /* DESIGN.md: Underline decoration default */
  text-underline-offset: 3px;
  transition: var(--transition);
}

a:hover {
  opacity: 0.8;
}

.nav-link, .btn, .brand-logo-link, .card-link, .search-result-item, .footer-link {
  text-decoration: none !important;
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ========================================================
   TOP OFFER BANNER
   ======================================================== */
.top-offer-banner {
  background-color: var(--text-charcoal);
  color: var(--text-offwhite);
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 400;
  text-align: center;
  position: relative;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.offer-badge {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--text-offwhite);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.offer-cta-link {
  color: var(--text-offwhite);
  text-decoration: underline !important;
  font-weight: 600;
  margin-left: 6px;
}

.banner-close-btn {
  background: transparent;
  border: none;
  color: var(--text-offwhite);
  font-size: 18px;
  cursor: pointer;
  position: absolute;
  right: 18px;
  opacity: 0.7;
}

.banner-close-btn:hover {
  opacity: 1;
}

/* ========================================================
   NAVBAR (DESIGN.md lines 134-141: Fixed on cream background)
   ======================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background-color: var(--bg-cream);
  border-bottom: 1px solid var(--border-subtle);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  backdrop-filter: blur(8px);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 20px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
  display: block;
}

.brand-logo-img.logo-dark {
  display: none;
}

[data-theme="dark"] .brand-logo-img.logo-light {
  display: none;
}

[data-theme="dark"] .brand-logo-img.logo-dark {
  display: block;
  height: 48px;
  width: 48px;
  border-radius: 50%;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.brand-logo-link:hover {
  opacity: 1 !important;
}

.brand-logo-link:hover .brand-logo-img {
  transform: none !important;
}

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

.nav-link {
  padding: 6px 12px;
  border-radius: var(--radius-standard);
  font-size: 14.5px;
  font-weight: 400; /* DESIGN.md: 400 for links/UI */
  color: var(--text-charcoal);
  transition: var(--transition);
}

.nav-link:hover {
  background-color: var(--charcoal-04);
}

.nav-link.active {
  font-weight: 600;
  background-color: var(--charcoal-04);
}

/* Search Box */
.nav-search-container {
  position: relative;
  width: 240px;
}

.nav-search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  width: 15px;
  height: 15px;
  pointer-events: none;
}

.nav-search-input {
  width: 100%;
  padding: 8px 58px 8px 34px;
  font-size: 13.5px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-standard);
  color: var(--text-charcoal);
  outline: none;
  transition: var(--transition);
}

.nav-search-input:focus {
  border-color: var(--text-charcoal);
  box-shadow: var(--focus-shadow);
}

.search-shortcut-badge {
  position: absolute;
  right: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--charcoal-04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-micro);
  padding: 1px 5px;
  pointer-events: none;
}

/* Dynamic Live Search Dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 360px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: none;
  z-index: 150;
  max-height: 420px;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.search-dropdown.show {
  display: block;
}

.search-result-item {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover, .search-result-item:focus {
  background-color: var(--charcoal-04);
}

.search-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3px;
}

.search-result-type {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}

.search-result-badge {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background-color: var(--charcoal-04);
  border: 1px solid var(--border-subtle);
  color: var(--text-charcoal);
  font-weight: 600;
}

.search-result-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-charcoal);
  line-height: 1.3;
}

.search-result-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* Nav Right & Controls */
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-charcoal);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-standard);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  background: var(--charcoal-04);
}

.theme-icon-sun {
  display: none;
}
.theme-icon-moon {
  display: block;
}
[data-theme="dark"] .theme-icon-sun {
  display: block;
}
[data-theme="dark"] .theme-icon-moon {
  display: none;
}

/* ========================================================
   LOVABLE BUTTON PRIMITIVES (DESIGN.md lines 82-118)
   Signature Inset Shadow • 6px Radius • 8px 16px Padding
   ======================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 400; /* DESIGN.md: 400 for button labels */
  border-radius: var(--radius-standard); /* 6px */
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  white-space: nowrap;
}

/* Primary Dark with Signature Inset Shadow (DESIGN.md line 87) */
.btn-primary {
  background-color: var(--text-charcoal);
  color: var(--text-offwhite) !important;
  box-shadow: var(--btn-inset-shadow);
  border-color: transparent;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-primary:active {
  opacity: 0.8; /* DESIGN.md line 88 */
}

.btn-primary:focus-visible {
  box-shadow: var(--focus-shadow);
}

/* Ghost / Secondary Button (DESIGN.md line 92) */
.btn-outline {
  background-color: transparent;
  color: var(--text-charcoal);
  border: 1px solid var(--border-interactive);
}

.btn-outline:hover {
  background-color: var(--charcoal-04);
}

.btn-outline:active {
  opacity: 0.8;
}

/* Cream Surface Tertiary Button */
.btn-accent {
  background-color: var(--text-charcoal);
  color: var(--text-offwhite) !important;
  box-shadow: var(--btn-inset-shadow);
}

.btn-lg {
  padding: 10px 22px;
  font-size: 16px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13.5px;
}

/* User Profile Trigger */
.profile-menu-container {
  position: relative;
}

.profile-trigger-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  padding: 5px 12px;
  border-radius: var(--radius-standard);
  cursor: pointer;
  color: var(--text-charcoal);
  font-size: 13.5px;
  font-weight: 400;
}

.profile-avatar {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-micro);
  background: var(--text-charcoal);
  color: var(--text-offwhite);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 600;
}

.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-standard);
  padding: 6px;
  display: none;
  z-index: 120;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.profile-dropdown-menu.show {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 13.5px;
  color: var(--text-charcoal);
  border-radius: var(--radius-micro);
  transition: var(--transition);
}

.dropdown-item:hover {
  background: var(--charcoal-04);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 6px 0;
}

.hamburger-btn {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-charcoal);
}

.mobile-nav-drawer {
  display: none;
  background-color: var(--bg-cream);
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 24px 24px;
}

.mobile-nav-drawer.open {
  display: block;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ========================================================
   HERO SECTION - Split Layout with Dynamic Poster Carousel
   Inspired by Reference 2 (Two-column layout, left-aligned
   content vertically centered, right dynamic poster slider)
   ======================================================== */
.hero-section {
  padding: 72px 0 64px;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(254, 215, 170, 0.4) 0%, rgba(251, 207, 232, 0.3) 40%, rgba(224, 231, 255, 0.2) 75%, transparent 100%);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .hero-section {
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(245, 158, 11, 0.08) 0%, rgba(217, 70, 239, 0.05) 40%, rgba(99, 102, 241, 0.04) 75%, transparent 100%);
}

.hero-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  width: 100%;
}

/* Left Side - Main Content (Left-Aligned & Vertically Centered) */
.hero-left-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.hero-title {
  font-size: 54px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: var(--text-charcoal);
  margin: 0 0 16px 0;
  text-align: left;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-charcoal);
  margin: 0 0 20px 0;
  align-self: flex-start;
}

.hero-pill-badge {
  background: var(--text-charcoal);
  color: var(--text-offwhite);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.hero-pill-partner {
  font-size: 13px;
  font-weight: 500;
}

.hero-tagline {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 0 32px 0;
  line-height: 1.5;
  font-weight: 400;
  text-align: left;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

/* Right Side - Dynamic Poster Slider (Reference 2 Structure) */
.hero-right-poster {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-carousel {
  position: relative;
  width: 100%;
  max-width: 560px;
  border-radius: 16px;
  overflow: hidden;
  background: #0b0f19;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.45);
  user-select: none;
}

[data-theme="light"] .hero-carousel {
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.2);
}

.hero-carousel-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.hero-carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.985);
  transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1), transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 1;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  pointer-events: auto;
  z-index: 2;
}

.hero-slide-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.hero-slide-image-wrapper {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #020617;
}

.hero-slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.6s ease;
}

.hero-carousel:hover .hero-slide.active .hero-slide-img {
  transform: scale(1.02);
}

.hero-slide-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 24px 20px;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.65) 55%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
  text-align: left;
}

.hero-slide-title {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.3px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.hero-slide-desc {
  font-size: 13.5px;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.4;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-slide-accent {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
}

/* Carousel Subtle Arrow Controls */
.hero-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.25s ease, background 0.2s ease, transform 0.2s ease;
  padding: 0;
}

.hero-carousel:hover .hero-carousel-nav {
  opacity: 0.9;
}

.hero-carousel-nav:hover {
  opacity: 1;
  background: rgba(15, 23, 42, 0.95);
  transform: translateY(-50%) scale(1.08);
}

.hero-carousel-prev {
  left: 14px;
}

.hero-carousel-next {
  right: 14px;
}

/* Pagination Indicators */
.hero-carousel-dots {
  position: absolute;
  bottom: 12px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 10;
}

.hero-carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-carousel-dot.active {
  width: 22px;
  background: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

/* ========================================================
   STATS STRIP (DESIGN.md line 169: large metrics, muted gray text)
   ======================================================== */
.stats-strip {
  background-color: var(--bg-cream);
  border-bottom: 1px solid var(--border-subtle);
  padding: 32px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-item {
  position: relative;
}

.stat-item:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 15%;
  height: 70%;
  width: 1px;
  background-color: var(--border-subtle);
}

.stat-number {
  font-size: 40px;
  font-weight: 600; /* DESIGN.md line 169 */
  letter-spacing: -1.2px;
  color: var(--text-charcoal);
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
}

/* ========================================================
   SECTIONS & SECTION HEADERS (DESIGN.md line 61: 48px, -1.2px letter-spacing)
   ======================================================== */
.section {
  padding: 80px 0; /* Lovable generous section rhythm */
  background-color: var(--bg-cream);
  border-bottom: 1px solid var(--border-subtle);
}

.section-subtle {
  background-color: var(--bg-subtle);
}

.section-header {
  max-width: 760px;
  margin: 0 auto 48px;
  text-align: center;
}

.section-eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.section-title {
  font-size: 42px;
  font-weight: 600;
  letter-spacing: -1.2px; /* DESIGN.md line 61 */
  line-height: 1.12;
  color: var(--text-charcoal);
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.5;
  font-weight: 400;
}

/* ========================================================
   CARDS & GRIDS (DESIGN.md lines 120-125: 12px radius,
   1px solid #eceae4 border, NO SHADOWS)
   ======================================================== */
.courses-grid,
.bundles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.course-card,
.bundle-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-container); /* 16px */
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.course-card:hover,
.bundle-card:hover {
  border-color: rgba(28, 28, 28, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 10px 28px -6px rgba(0, 0, 0, 0.07);
}

[data-theme="dark"] .course-card:hover,
[data-theme="dark"] .bundle-card:hover {
  border-color: rgba(247, 244, 237, 0.35);
  box-shadow: 0 10px 28px -6px rgba(0, 0, 0, 0.45);
}

/* ─── Course Card Tech Brand Icons ─── */
.course-tech-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border-subtle);
  background: var(--charcoal-04);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.course-card:hover .course-tech-icon-box {
  transform: scale(1.06);
}

.tech-icon-klic-data-analytics-data-visualisation { background: rgba(217, 119, 6, 0.09); border-color: rgba(217, 119, 6, 0.22); }
.tech-icon-klic-advanced-excel { background: rgba(5, 150, 105, 0.09); border-color: rgba(5, 150, 105, 0.22); }
.tech-icon-klic-advanced-python { background: rgba(37, 99, 235, 0.09); border-color: rgba(37, 99, 235, 0.22); }
.tech-icon-klic-mobile-app-development { background: rgba(124, 58, 237, 0.09); border-color: rgba(124, 58, 237, 0.22); }
.tech-icon-klic-c-and-cpp-programming { background: rgba(2, 132, 199, 0.09); border-color: rgba(2, 132, 199, 0.22); }
.tech-icon-klic-advanced-java { background: rgba(220, 38, 38, 0.09); border-color: rgba(220, 38, 38, 0.22); }
.tech-icon-klic-database-management-systems-dbms { background: rgba(13, 148, 136, 0.09); border-color: rgba(13, 148, 136, 0.22); }

.course-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.category-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--charcoal-04);
  border: 1px solid var(--border-subtle);
  color: var(--text-charcoal);
  letter-spacing: 0.2px;
}

.category-badge.data-science {
  color: #0d9488;
  background: rgba(13, 148, 136, 0.08);
  border-color: rgba(13, 148, 136, 0.2);
}

.category-badge.software {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.2);
}

.klic-cert-pill {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--charcoal-04);
  border: 1px solid var(--border-subtle);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.course-title {
  font-size: 18.5px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-charcoal);
  line-height: 1.35;
  margin-bottom: 8px;
}

.course-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
  flex-grow: 1;
}

.course-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.course-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.course-price-wrap {
  display: flex;
  flex-direction: column;
}

.course-price {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-charcoal);
}

.course-price-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Featured Bundle */
.bundle-card.featured-bundle {
  border: 1.5px solid var(--text-charcoal);
  background: #fbf9f4;
}

[data-theme="dark"] .bundle-card.featured-bundle {
  border: 1.5px solid var(--text-charcoal);
  background: #1f1f1d;
}

.bundle-ribbon {
  display: inline-block;
  background: var(--text-charcoal);
  color: var(--text-offwhite);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 10px;
  width: fit-content;
  letter-spacing: 0.2px;
}

.bundle-savings-badge {
  background: rgba(22, 163, 74, 0.08);
  border: 1px solid rgba(22, 163, 74, 0.25);
  color: #16a34a;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.bundle-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.bundle-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text-charcoal);
  line-height: 1.3;
}

.bundle-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
}

.bundle-courses-list {
  list-style: none;
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.bundle-course-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-charcoal);
}

.check-icon {
  width: 16px;
  height: 16px;
  color: var(--text-charcoal);
  flex-shrink: 0;
  margin-top: 3px;
}

.bundle-pricing-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
}

.bundle-final-price {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.8px;
  color: var(--text-charcoal);
}

.bundle-original-price {
  font-size: 16px;
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: 400;
}

/* ========================================================
   TUTORIALS & BENEFITS (DESIGN.md: 12px radius, #eceae4 border)
   ======================================================== */
.tutorials-grid, .benefits-grid, .testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.tutorial-card, .benefit-card, .testimonial-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card); /* 12px */
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  box-shadow: none;
}

.tutorial-card:hover, .benefit-card:hover, .testimonial-card:hover {
  border-color: var(--border-interactive);
}

.tutorial-icon-box, .benefit-icon-box {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-standard);
  background: var(--charcoal-04);
  border: 1px solid var(--border-subtle);
  color: var(--text-charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.tutorial-title, .benefit-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--text-charcoal);
  margin-bottom: 8px;
  line-height: 1.3;
}

.tutorial-desc, .benefit-desc, .testimonial-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  flex-grow: 1;
}

.stars-row {
  color: var(--text-charcoal);
  font-size: 14px;
  margin-bottom: 10px;
  letter-spacing: 2px;
}

.student-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.student-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: var(--text-charcoal);
  color: var(--text-offwhite);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13.5px;
}

.student-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-charcoal);
}

.student-course {
  font-size: 12px;
  color: var(--text-muted);
}

/* ========================================================
   FINAL CTA BANNER
   ======================================================== */
.final-cta-section {
  padding: 80px 0;
  background-color: var(--bg-cream);
  border-bottom: 1px solid var(--border-subtle);
}

.final-cta-card {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-container);
  padding: 56px 36px;
}

.final-cta-title {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -1.2px;
  margin-bottom: 12px;
  color: var(--text-charcoal);
}

.final-cta-sub {
  font-size: 17px;
  max-width: 600px;
  margin: 0 auto 30px;
  color: var(--text-muted);
  font-weight: 400;
}

/* ========================================================
   FOOTER (DESIGN.md line 190: 1px solid #eceae4 border, 16px container)
   ======================================================== */
.site-footer {
  background-color: var(--bg-cream);
  border-top: 1px solid var(--border-subtle);
  padding: 56px 0 28px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.3fr 1.1fr;
  gap: 36px;
  margin-bottom: 44px;
}

.footer-col-title {
  font-size: 13.5px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-charcoal);
  margin-bottom: 14px;
}

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

.footer-link {
  font-size: 14px;
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--text-charcoal);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.45;
}

.footer-contact-item a:hover {
  color: var(--text-charcoal);
}

.footer-icon {
  width: 16px;
  height: 16px;
  color: var(--text-charcoal);
  flex-shrink: 0;
  margin-top: 3px;
}

.footer-blurb {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

.footer-socials {
  display: flex;
  gap: 10px;
}

.social-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-standard);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.social-btn:hover {
  border-color: var(--border-interactive);
}

.footer-bottom-bar {
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
}

/* ========================================================
   CATALOG FILTER CONTROLS
   ======================================================== */
.catalog-filter-bar {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 20px;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.filter-row-top, .filter-row-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.catalog-search-wrap {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.catalog-search-input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border-radius: var(--radius-standard);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-card);
  color: var(--text-charcoal);
  outline: none;
}

.catalog-search-input:focus {
  border-color: var(--text-charcoal);
  box-shadow: var(--focus-shadow);
}

.category-chips-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 400;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-charcoal);
  cursor: pointer;
  transition: var(--transition);
}

.filter-chip:hover {
  background: var(--charcoal-04);
}

.filter-chip.active {
  background: var(--text-charcoal);
  color: var(--text-offwhite);
  border-color: var(--text-charcoal);
}

.sort-select {
  padding: 7px 12px;
  border-radius: var(--radius-standard);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-card);
  color: var(--text-charcoal);
  font-size: 13px;
  outline: none;
}

.catalog-result-count {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-card);
  border: 1px dashed var(--border-subtle);
}

/* ========================================================
   CONTACT FORM & MODALS
   ======================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 36px;
}

.contact-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 32px;
}

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

.form-label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-charcoal);
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-standard);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-card);
  color: var(--text-charcoal);
  outline: none;
  font-size: 14px;
  transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--text-charcoal);
  box-shadow: var(--focus-shadow);
}

.form-input.is-invalid, .form-select.is-invalid {
  border-color: #ef4444;
}

.form-error-msg {
  font-size: 12px;
  color: #ef4444;
  margin-top: 4px;
}

.map-wrapper {
  margin-top: 20px;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  height: 280px;
}

.map-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.hp-field {
  display: none !important;
  visibility: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(28, 28, 28, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-container);
  padding: 32px;
  max-width: 480px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
}

.success-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-pill);
  background: var(--charcoal-04);
  color: var(--text-charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  border: 1px solid var(--border-subtle);
}

.modal-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.btn-whatsapp {
  background-color: #25d366;
  color: #ffffff !important;
  box-shadow: var(--btn-inset-shadow);
}

.btn-whatsapp:hover {
  opacity: 0.9;
}

.btn-email-action {
  background-color: var(--text-charcoal);
  color: var(--text-offwhite) !important;
  box-shadow: var(--btn-inset-shadow);
}

/* ========================================================
   TUTORIAL DETAIL & PDF VIEWER
   ======================================================== */
.pdf-viewer-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-top: 20px;
}

.pdf-toolbar {
  padding: 10px 18px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pdf-frame {
  width: 100%;
  height: 750px;
  border: none;
  background-color: var(--bg-subtle);
}

/* ========================================================
   ADMIN SIDEBAR & LAYOUT
   ======================================================== */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 250px;
  background-color: var(--bg-cream);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.admin-sidebar-header {
  padding: 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
}

.admin-nav {
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-standard);
  color: var(--text-charcoal);
  font-size: 14px;
  font-weight: 400;
  transition: var(--transition);
}

.admin-nav-item:hover {
  background-color: var(--charcoal-04);
}

.admin-nav-item.active {
  background-color: var(--text-charcoal);
  color: var(--text-offwhite);
  font-weight: 600;
  box-shadow: var(--btn-inset-shadow);
}

.admin-main {
  flex: 1;
  background-color: var(--bg-cream);
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  height: 64px;
  background-color: var(--bg-cream);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.admin-content {
  padding: 24px;
  flex: 1;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 20px;
}

.kpi-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.kpi-value {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.8px;
  color: var(--text-charcoal);
  line-height: 1.1;
}

.kpi-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 400;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--charcoal-04);
}

.table-responsive {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.data-table th {
  background: var(--charcoal-04);
  padding: 10px 14px;
  font-weight: 600;
  color: var(--text-charcoal);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-charcoal);
  vertical-align: middle;
}

.data-table tr:hover {
  background-color: var(--charcoal-04);
}

.status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 500;
  border: 1px solid var(--border-subtle);
}

.status-new {
  background: var(--charcoal-04);
  color: var(--text-charcoal);
}

.status-contacted {
  background: rgba(245, 158, 11, 0.1);
  color: #b45309;
}

.status-enrolled {
  background: rgba(22, 163, 74, 0.1);
  color: #15803d;
}

.status-closed {
  background: var(--charcoal-04);
  color: var(--text-muted);
}

/* ========================================================
   GRID HELPERS (Desktop Defaults)
   ======================================================== */
.about-story-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.about-klic-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.about-faculty-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.bundle-included-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.assessment-tiers-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.career-roles-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.mobile-search-container {
  display: none;
  position: relative;
  width: 100%;
  margin-bottom: 16px;
}

.mobile-search-container .search-dropdown {
  left: 0;
  right: 0;
  width: 100%;
}

.learn-sidebar-overlay {
  display: none;
}

.sidebar-close-btn {
  display: none;
}

/* ========================================================
   RESPONSIVE DESIGN ADAPTATIONS (Strictly scoped max-width)
   Ensures 100% desktop layout fidelity while optimizing mobile viewports
   ======================================================== */

/* Large Tablets & Small Desktops (<= 1024px) */
@media (max-width: 1024px) {
  .hero-split {
    gap: 32px;
  }
  .hero-title {
    font-size: 44px;
  }
  .hero-tagline {
    font-size: 16px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .courses-grid,
  .bundles-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
  }
}

/* Medium Tablets & iPads (<= 860px) */
@media (max-width: 860px) {
  .learn-toc-sidebar {
    display: none;
  }
  .mobile-drawer-bar {
    display: flex;
  }
  .learn-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    width: min(320px, 86vw);
    transform: translateX(-100%);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .learn-sidebar.open {
    transform: translateX(0);
  }
  .learn-sidebar-overlay {
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 999;
    display: none;
  }
  .learn-sidebar-overlay.open {
    display: block;
  }
  .sidebar-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-micro);
  }
  .sidebar-close-btn:hover {
    color: var(--text-charcoal);
    background: var(--charcoal-04);
  }
  .learn-main-content {
    max-width: 100%;
    padding: 24px 20px 60px;
  }
  .course-detail-layout {
    grid-template-columns: 1fr !important;
    gap: 32px;
  }
  .course-detail-layout > div:last-child {
    position: static !important;
    width: 100%;
  }
}

/* Small Tablets & Large Phones (<= 768px) */
@media (max-width: 768px) {

  /* ── Prevent ALL horizontal overflow ── */
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }

  /* ── Navigation & Header ── */
  .site-header {
    height: auto;
    min-height: var(--nav-height);
    flex-direction: column;
    align-items: stretch;
    overflow: hidden;
  }
  .container.navbar {
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .nav-center,
  .nav-search-container {
    display: none;
  }
  .hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  /* Mobile drawer — renders cleanly below the navbar bar */
  .mobile-nav-drawer {
    padding: 12px 16px 18px;
    border-top: 1px solid var(--border-subtle);
    width: 100%;
    overflow: hidden;
  }
  .mobile-search-container {
    display: block;
    margin-bottom: 12px;
  }
  .mobile-nav-links {
    gap: 2px;
  }
  .mobile-nav-links .nav-link {
    padding: 10px 12px;
    border-radius: var(--radius-standard);
    font-size: 15px;
    display: block;
    border-bottom: 1px solid var(--border-subtle);
  }
  .mobile-nav-links .nav-link:last-child {
    border-bottom: none;
  }

  /* ── Top Offer Banner ── */
  .top-offer-banner {
    font-size: 12.5px;
    padding: 8px 40px 8px 14px;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    gap: 5px;
    line-height: 1.4;
  }
  .banner-close-btn {
    top: 50%;
    transform: translateY(-50%);
    right: 10px;
  }

  /* ── Hero Section (Stacked on Mobile: Images/Carousel on Top, Centered Text Below) ── */
  .hero-section {
    padding: 28px 0 36px;
    overflow: hidden;
  }
  .hero-section .container {
    overflow: hidden;
  }
  .hero-split {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .hero-right-poster {
    order: 1;
    width: 100%;
  }
  .hero-left-content {
    order: 2;
    align-items: center;
    text-align: center;
    width: 100%;
  }
  .hero-title {
    font-size: clamp(28px, 6.5vw, 38px);
    letter-spacing: -0.8px;
    line-height: 1.15;
    word-break: break-word;
    hyphens: auto;
    text-align: center;
    padding: 0;
    margin: 4px auto 14px;
  }
  .hero-pill {
    max-width: calc(100% - 32px);
    white-space: normal;
    text-align: center;
    font-size: 12.5px;
    padding: 4px 10px;
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    line-height: 1.4;
    align-self: center;
    margin: 0 auto 18px;
  }
  .hero-pill-partner {
    display: none !important;
  }
  .hero-tagline {
    font-size: 15.5px;
    margin: 0 auto 24px;
    line-height: 1.55;
    text-align: center;
    padding: 0 4px;
    max-width: 480px;
  }
  .hero-cta-group {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
    width: 100%;
  }
  .hero-carousel {
    max-width: 100%;
  }
  .hero-carousel-nav {
    opacity: 0.85;
  }

  /* ── Stats Strip ── */
  .stats-strip {
    padding: 24px 0;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }
  .stat-item {
    padding: 16px 12px;
    border-right: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
  }
  .stat-item:nth-child(2n) {
    border-right: none;
  }
  .stat-item:nth-last-child(-n+2) {
    border-bottom: none;
  }
  .stat-item::after {
    display: none !important;
  }
  .stat-number {
    font-size: 30px;
    letter-spacing: -0.8px;
  }
  .stat-label {
    font-size: 12.5px;
  }

  /* ── Section Rhythm ── */
  .section {
    padding: 48px 0;
  }
  .section-header {
    margin-bottom: 28px;
    padding: 0 4px;
  }
  .section-title {
    font-size: clamp(24px, 6vw, 32px);
    letter-spacing: -0.7px;
    line-height: 1.2;
    word-break: break-word;
  }
  .section-subtitle {
    font-size: 14.5px;
    line-height: 1.55;
  }
  .section-eyebrow {
    font-size: 11.5px;
  }
  .final-cta-section {
    padding: 48px 0;
  }
  .final-cta-card {
    padding: 32px 20px;
    border-radius: var(--radius-card);
  }
  .final-cta-title {
    font-size: 26px;
    letter-spacing: -0.6px;
    line-height: 1.2;
  }
  .final-cta-sub {
    font-size: 14.5px;
    margin-bottom: 22px;
  }

  /* Grids Switch to 1 Column on Small Viewports */
  .courses-grid,
  .bundles-grid,
  .tutorials-grid,
  .benefits-grid,
  .testimonials-grid,
  .about-story-grid,
  .about-klic-grid,
  .about-faculty-grid,
  .bundle-included-grid,
  .assessment-tiers-grid,
  .career-roles-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  .course-card,
  .bundle-card,
  .tutorial-card,
  .benefit-card,
  .testimonial-card {
    padding: 20px 18px;
    width: 100%;
    box-sizing: border-box;
  }

  /* ── Catalog Filter & Search ── */
  .catalog-filter-bar {
    padding: 14px;
    gap: 10px;
    border-radius: var(--radius-standard);
  }
  .filter-row-top {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .filter-row-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .filter-row-bottom > * {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
  }
  .category-chips-group {
    width: 100%;
    gap: 6px;
    flex-wrap: wrap;
  }
  .filter-chip {
    padding: 5px 11px;
    font-size: 12.5px;
    flex-shrink: 0;
  }
  .catalog-search-wrap {
    width: 100%;
    min-width: 0;
  }
  .sort-select {
    width: 100%;
  }

  /* Forms & Modals */
  .contact-card {
    padding: 24px 20px;
  }
  .modal-backdrop {
    padding: 14px;
  }
  .modal-content {
    padding: 24px 20px;
    max-width: 100%;
  }
  .map-wrapper {
    height: 240px;
  }

  /* Syllabus Modal Dialog */
  .syllabus-modal-overlay {
    padding: 10px !important;
  }
  .syllabus-modal-dialog {
    max-width: 100% !important;
    max-height: 94vh !important;
    border-radius: 12px !important;
  }
  .syllabus-modal-header {
    padding: 16px 18px !important;
  }
  .syllabus-modal-body {
    padding: 18px 18px !important;
  }
  .syllabus-modal-footer {
    padding: 14px 18px !important;
    flex-direction: column !important;
    gap: 10px !important;
    align-items: stretch !important;
  }
  .syllabus-modal-footer .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Tutorial Lesson Bottom Navigation */
  .lesson-bottom-nav {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  .lesson-bottom-nav .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Admin Layout */
  .admin-layout {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
  .admin-nav {
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px 14px;
    gap: 6px;
    white-space: nowrap;
  }
  .admin-nav > div[style*="text-transform: uppercase"] {
    display: none;
  }
  .admin-nav-item {
    padding: 6px 12px;
    font-size: 13px;
    flex-shrink: 0;
  }
  .admin-topbar {
    padding: 0 16px;
    height: auto;
    min-height: 52px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .admin-content {
    padding: 18px 14px;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .table-responsive {
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  /* ── Footer ── */
  .site-footer {
    padding: 40px 0 22px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 28px;
  }
  .footer-bottom-bar {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

/* Standard Mobile Phones (<= 640px) */
@media (max-width: 640px) {
  .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  /* iOS Form Zoom Prevention (Inputs >= 16px) */
  .form-input,
  .form-select,
  .form-textarea,
  .nav-search-input,
  .catalog-search-input,
  .sidebar-search-input {
    font-size: 16px !important;
  }

  .hero-section {
    padding: 40px 0 28px;
  }
  .hero-title {
    font-size: clamp(24px, 7vw, 32px);
    letter-spacing: -0.5px;
  }
  .hero-tagline {
    font-size: 14.5px;
    margin-bottom: 20px;
    line-height: 1.55;
  }

  /* Code Block Responsive Sizing */
  pre[class*="language-"] {
    padding: 14px 14px !important;
    font-size: 12.5px !important;
  }
  .code-block-header {
    padding: 6px 12px;
    font-size: 11px;
  }
  .output-box {
    padding: 12px 14px;
    font-size: 12.5px;
  }

  .pdf-frame {
    height: 460px;
  }
  .pdf-toolbar {
    padding: 8px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* Small Smart Phones (<= 480px) */
@media (max-width: 480px) {
  /* ── Navbar ── */
  .container.navbar {
    padding-left: 12px;
    padding-right: 12px;
    gap: 8px;
  }
  .brand-logo-img {
    height: 36px;
  }
  [data-theme="dark"] .brand-logo-img.logo-dark {
    height: 36px;
    width: 36px;
  }
  .nav-right {
    gap: 6px;
  }
  .theme-toggle-btn {
    width: 32px;
    height: 32px;
  }
  .nav-right .btn-sm {
    padding: 5px 10px;
    font-size: 12.5px;
  }

  /* ── Hero: CTA Buttons Stack Full-Width ── */
  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    gap: 10px;
    padding: 0;
  }
  .hero-cta-group .btn {
    width: 100%;
    justify-content: center;
  }
  .btn-lg {
    padding: 11px 18px;
    font-size: 15px;
  }
  .hero-carousel-viewport {
    aspect-ratio: 16 / 11;
  }
  .hero-slide-caption {
    padding: 28px 14px 14px;
  }
  .hero-slide-title {
    font-size: 16.5px;
  }
  .hero-slide-desc {
    font-size: 12px;
  }

  /* ── Compact Cards ── */
  .course-card,
  .bundle-card,
  .tutorial-card,
  .benefit-card,
  .testimonial-card {
    padding: 16px 14px;
    border-radius: 12px;
  }

  /* ── Course Card Bottom ── */
  .course-card-bottom {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .course-price-wrap {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
  }
  .course-card-bottom > div:last-child {
    width: 100%;
    display: flex;
    gap: 8px;
  }
  .course-card-bottom > div:last-child .btn {
    flex: 1;
    justify-content: center;
    text-align: center;
  }

  /* ── Bundle Card ── */
  .bundle-card .bundle-pricing-row {
    flex-wrap: wrap;
    gap: 6px;
  }
  .bundle-final-price {
    font-size: 22px;
  }
  .bundle-card > div:last-child {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  .bundle-card > div:last-child .btn {
    width: 100%;
    justify-content: center;
  }

  /* ── Catalog Filter Chips ── */
  .category-chips-group {
    gap: 5px;
  }
  .filter-chip {
    padding: 4px 10px;
    font-size: 12px;
  }
  #clearAllCatalogFilters {
    width: 100%;
    justify-content: center;
    margin-top: 4px;
  }

  /* ── Stats Strip ── */
  .stats-grid {
    gap: 0;
  }
  .stat-number {
    font-size: 26px;
  }
  .stat-label {
    font-size: 12px;
  }

  /* ── Admin KPI ── */
  .kpi-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .kpi-card {
    padding: 16px;
  }
  .kpi-value {
    font-size: 24px;
  }

  /* ── Social Buttons ── */
  .social-btn {
    width: 36px;
    height: 36px;
  }

  /* ── Tutorial Card Meta Row ── */
  .tutorial-card .course-meta,
  .tutorial-card .tutorial-meta {
    flex-wrap: wrap;
    gap: 6px;
  }
}

/* Ultra-Compact / Narrow Mobile (<= 360px) */
@media (max-width: 360px) {
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }
  .container.navbar {
    padding-left: 10px;
    padding-right: 10px;
  }
  .brand-logo-img {
    height: 32px;
  }
  [data-theme="dark"] .brand-logo-img.logo-dark {
    height: 32px;
    width: 32px;
  }
  .hero-title {
    font-size: 22px;
    letter-spacing: -0.3px;
    line-height: 1.2;
  }
  .hero-tagline {
    font-size: 13.5px;
  }
  .section-title {
    font-size: 22px;
  }
  /* Single column stats on very small screens */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .stat-item {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
  .stat-item:last-child {
    border-bottom: none;
  }
  .course-card,
  .bundle-card {
    padding: 14px 12px;
  }
  .btn {
    font-size: 13.5px;
  }
  .nav-right .btn-sm {
    padding: 4px 8px;
    font-size: 12px;
  }
}
