/* ─────────────────────────────────────────────────────────────────────────────
   INBIOLOGY ACADEMY - ORIGINAL COMPLETE VANILLA STYLESHEET
   ───────────────────────────────────────────────────────────────────────────── */

/* Font imported via preconnected <link> in HTML for 3x faster parallel loading */

:root {
  --font-body: 'IBM Plex Sans Thai', sans-serif;
  --font-heading: 'Mitr', 'IBM Plex Sans Thai', sans-serif;

  /* Brand Palette */
  --c-navy: #B91C1C;
  /* Primary Red */
  --c-navy-light: #EF4444;
  /* Primary Red Light */
  --c-sky: #1E3A8A;
  /* Secondary Navy Blue */
  --c-sky-light: #E0F2FE;
  --c-red: #EF4444;
  /* Vibrant Red */
  --c-red-dark: #DC2626;
  --c-page: #F8FAFC;
  --c-white: #FFFFFF;
  --c-text-dark: #0F172A;
  --c-text-muted: #64748B;
  --c-border: #E2E8F0;

  --app-font-size: 15px;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--app-font-size);
  background-color: var(--c-page);
  color: var(--c-text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100vw;
}

/* Fast tap response on Safari iOS (eliminates 300ms tap freeze) */
a, button, input, select, textarea, [role="button"], .btn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* ─────────────────────────────────────────────────────────────────────────────
   GLOBAL CIRCLE PROTECTION — ป้องกันวงกลมกลายเป็นวงรีบนมือถือ
   Selector จับทุก element ที่มี inline style border-radius:50%
   ───────────────────────────────────────────────────────────────────────────── */
img[style*="border-radius:50%"],
div[style*="border-radius:50%"],
span[style*="border-radius:50%"],
button[style*="border-radius:50%"] {
  aspect-ratio: 1 / 1 !important;
  flex-shrink: 0 !important;
}

/* ─────────────────────────────────────────────────────────────────────────────
   GLOBAL UI CHROME & LABEL CARET PROTECTION

   Prevents text cursor / selection caret on labels, buttons, badges, tabs, etc.
   ───────────────────────────────────────────────────────────────────────────── */
label,
.form-label,
.form-section-title,
button,
.btn,
.btn-login,
.btn-submit,
.btn-otp-action,
.nav-link,
.dropdown-item,
.tab-btn,
.badge,
.status-badge,
.card-duration-badge,
.cart-icon-btn,
.logo-btn,
summary,
.course-tag,
.section-tag,
.stat-label,
.table-header,
.dash-tabs-scroll button {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

label,
.form-label {
  cursor: pointer;
}

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

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

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  letter-spacing: -0.01em;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Ambient Background Glows — Hardware-Accelerated Radial Gradients (0% GPU blur overhead) */
.ambient-glow-1 {
  position: fixed;
  top: 15%;
  left: 5%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(185, 28, 28, 0.04) 0%, rgba(185, 28, 28, 0.012) 40%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.ambient-glow-2 {
  position: fixed;
  bottom: 10%;
  right: 5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(30, 58, 138, 0.05) 0%, rgba(30, 58, 138, 0.015) 40%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-20px);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.25s ease-out forwards;
}

.animate-fade-in-up {
  animation: fadeInUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

/* ── MODERN MINIMAL HEADER / NAVBAR ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
  border-bottom-color: rgba(226, 232, 240, 0.9);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

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

.logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(185, 28, 28, 0.15));
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(248, 250, 252, 0.8);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.6);
}

.nav-link {
  padding: 7px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: #475569;
  border-radius: 9px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover {
  color: #B91C1C;
  background-color: rgba(254, 242, 242, 0.8);
}

.nav-link.active {
  color: #B91C1C;
  background-color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.cart-icon-btn {
  position: relative;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  color: #475569;
  transition: all 0.2s ease;
}

.cart-icon-btn:hover {
  background: #F1F5F9;
  color: #0F172A;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  background: #EF4444;
  color: white;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

.btn-login {
  background: #1E3A8A;
  color: white;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 18px;
  border-radius: 10px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(30, 58, 138, 0.18);
  white-space: nowrap;
}

.btn-login:hover {
  background: #1E40AF;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(30, 58, 138, 0.25);
}

/* Header & Nav Responsiveness Breakpoints */
@media (min-width: 941px) {
  .hamburger-btn {
    display: none !important;
  }
}

@media (max-width: 940px) {
  .desktop-nav {
    display: none !important;
  }

  .hamburger-btn {
    display: flex !important;
  }
}

/* Cart Icon Button */
.cart-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: white;
  border: 1px solid #E5E7EB;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.2s;
  padding: 0;
  flex-shrink: 0;
}
.cart-icon-btn:hover {
  background: #F9FAFB;
  border-color: #D1D5DB;
}
.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #EF4444;
  color: white;
  font-size: 10px;
  font-weight: 900;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  padding: 0 4px;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

/* User Badge in Header */
.header-user-badge {
  height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 12px;
  color: var(--c-navy);
  background: #FEF2F2;
  border: 1px solid rgba(185, 28, 28, 0.15);
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s;
}
.header-user-badge:hover {
  background: #FEE2E2;
}

/* Hamburger Button */
.hamburger-btn {
  width: 38px;
  height: 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 10px;
  cursor: pointer;
  background: white;
  border: 1px solid #E5E7EB;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.2s;
  padding: 0;
  flex-shrink: 0;
}
.hamburger-btn:hover {
  background: #F9FAFB;
  border-color: #D1D5DB;
}

.hamburger-line {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #4B5563;
  transition: all 0.25s;
}

@media (max-width: 640px) {
  .header-container {
    padding: 0 14px;
    height: 58px;
  }

  .logo-img {
    height: 36px;
  }

  .header-user-actions {
    gap: 4px !important;
  }

  .header-user-badge {
    height: 36px !important;
    max-width: 110px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 11px !important;
    padding: 0 8px !important;
  }

  .cart-icon-btn,
  .hamburger-btn {
    width: 36px !important;
    height: 36px !important;
  }

  .header-logout-btn {
    display: none !important;
  }
}

.admin-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 290px;
  background: white;
  border: 1px solid var(--c-border);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.14);
  padding: 8px;
  z-index: 99;
  max-height: 85vh;
  overflow-y: auto;
  display: none;
}

.dropdown-panel.show {
  display: block;
  animation: fadeIn 0.18s ease;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-align: left;
  background: transparent;
  color: var(--c-text-dark);
  transition: background 0.15s;
}

.dropdown-item:hover {
  background-color: #F9FAFB;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HERO SECTION — INBIOLOGY Illustration Hero
   Desktop/iPad: landscape bird bg + instructor glass card right (Everything on top of bird)
   Mobile: portrait bird bg + stacked clean layout
   ═══════════════════════════════════════════════════════════════════════════ */

.hero-section {
  padding-top: 130px;
  padding-bottom: 70px;
  overflow: hidden;
  position: relative;
  /* Desktop: landscape bird illustration */
  background: url('../hero-desktop.jpg') center 55% / cover no-repeat;
  min-height: 720px;
  display: flex;
  align-items: center;
  border-bottom: none !important;
}

/* Dark overlay — ซ้ายบนเข้มให้อ่านตัวหนังสือชัดเจน, ขวาล่างโปร่งให้เห็นภาพนกงดงาม */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    rgba(5, 15, 50, 0.65) 0%,
    rgba(5, 15, 50, 0.42) 40%,
    rgba(5, 15, 50, 0.12) 70%,
    rgba(5, 15, 50, 0.05) 100%
  );
  z-index: 1;
}

.hero-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
  width: 100%;
  position: relative;
  z-index: 2;
}

.hero-instructor-wrap {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.instructor-glass-card {
  width: 320px;
  max-width: 100%;
  border-radius: 28px;
  background: rgba(240, 246, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  padding: 22px;
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.18);
  margin: 0;
}

/* ─── Hero Kicker Pill & General Typography ──────────────────────────────── */
.hero-kicker-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.16);
  border: 1.2px solid rgba(255, 255, 255, 0.38);
  border-radius: 9999px;
  padding: 6px 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2px;
  margin-bottom: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.hero-kicker-pill .pill-dot {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 900;
}

.hero-main-title {
  font-size: clamp(38px, 5vw, 60px);
  font-weight: 950;
  color: #FFFFFF;
  line-height: 1.15;
  margin: 0;
  text-shadow: 0 4px 16px rgba(15, 23, 42, 0.6);
}

.hero-title-highlight {
  display: block;
  color: #FACC15;
  font-size: clamp(34px, 4.5vw, 54px);
  font-weight: 950;
  margin-top: 6px;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hero-title-sub {
  display: block;
  color: #FFFFFF;
  font-size: clamp(16px, 2.2vw, 22px);
  font-weight: 700;
  margin-top: 14px;
  opacity: 0.95;
}

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

.hero-btn-primary {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  color: white;
  font-weight: 850;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.35);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.45);
}

.hero-btn-secondary {
  background: rgba(59, 130, 246, 0.35);
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  color: white;
  font-weight: 800;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-btn-secondary:hover {
  transform: translateY(-2px);
  background: rgba(59, 130, 246, 0.5);
}

.hero-bottom-block {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Stats grid desktop */
.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: center;
}

/* ─── TABLET (641px–1024px) ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-section {
    min-height: 640px;
    padding-top: 110px;
  }

  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 0 24px;
    align-items: flex-start;
  }

  .hero-instructor-wrap {
    justify-content: flex-end !important;
    margin: 0 !important;
  }

  .instructor-glass-card {
    width: 280px;
    padding: 18px;
  }
}

/* ─── MOBILE (≤640px): portrait illustration, bird shifted up, cluster below bird ── */
@media (max-width: 640px) {
  .hero-section {
    /* Shift illustration UP by 95px so '= INBIOLOGY =' is closer to top edge */
    background: url('../hero-mobile.jpg') center -95px / cover no-repeat;
    min-height: 100svh;
    padding-top: 76px;
    padding-bottom: 74px; /* Space above wave divider */
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    align-items: stretch !important;
  }

  /* Mobile overlay — Clear on upper bird illustration, smooth dark blue over bottom cluster */
  .hero-section::before {
    background: linear-gradient(
      to bottom,
      rgba(5, 15, 50, 0.15) 0%,
      rgba(5, 15, 50, 0.0) 25%,
      rgba(5, 15, 50, 0.05) 45%,
      rgba(5, 15, 50, 0.55) 68%,
      rgba(5, 15, 50, 0.85) 100%
    );
  }

  .hero-grid {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    width: 100% !important;
    padding: 0 16px !important;
    box-sizing: border-box !important;
  }

  /* Full-height column pushing the entire cluster down below the bird */
  .hero-content-col {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    align-items: center !important;
    flex: 1 !important;
    width: 100% !important;
    min-height: calc(100svh - 150px) !important;
    position: relative !important;
    z-index: 5 !important;
    gap: 10px !important;
  }

  /* Top Title Block (Restored and placed right above buttons in the bottom cluster) */
  .hero-top-block {
    display: block !important;
    text-align: center !important;
    width: 100% !important;
    margin-bottom: 2px !important;
  }

  .hero-main-title {
    font-size: clamp(23px, 6.8vw, 28px) !important;
    line-height: 1.18 !important;
    margin: 0 !important;
    text-shadow: 0 4px 18px rgba(15, 23, 42, 0.85) !important;
    text-align: center !important;
  }

  .hero-title-highlight {
    font-size: clamp(20px, 6vw, 25px) !important;
    margin-top: 2px !important;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.5) !important;
  }

  .hero-title-sub {
    font-size: 11.5px !important;
    margin-top: 4px !important;
    opacity: 0.95 !important;
    text-align: center !important;
  }

  /* Bottom Actions & Stats Block */
  .hero-bottom-block {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 400px !important;
    margin: 0 auto !important;
    gap: 8px !important;
    position: relative !important;
    z-index: 15 !important;
  }

  /* Buttons on mobile - Centered side-by-side */
  .hero-actions-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    margin-top: 0 !important;
    width: 100% !important;
    justify-content: center !important;
  }

  .hero-actions-row a {
    height: 42px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 13px !important;
    font-weight: 850 !important;
    padding: 0 14px !important;
    border-radius: 12px !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    flex: 1 1 50% !important;
  }

  /* Stats grid on mobile - Sleek glass pill below the buttons */
  .hero-stats-grid {
    display: grid !important;
    grid-template-columns: 1.2fr 0.9fr 0.9fr !important;
    align-items: center !important;
    margin-top: 0 !important;
    padding: 8px 6px !important;
    background: rgba(255, 255, 255, 0.16) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.35) !important;
    border-radius: 16px !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14) !important;
    width: 100% !important;
    gap: 0 !important;
  }

  .hero-stats-grid > div {
    text-align: center !important;
    border-left: 1px solid rgba(255, 255, 255, 0.25) !important;
    padding: 0 4px !important;
  }

  .hero-stats-grid > div:first-child {
    border-left: none !important;
  }

  .hero-stats-grid .stat-num {
    font-size: 15px !important;
    font-weight: 950 !important;
    color: #FFFFFF !important;
    line-height: 1.1 !important;
    margin-bottom: 2px !important;
  }

  .hero-stats-grid .stat-lbl {
    font-size: 8.5px !important;
    font-weight: 700 !important;
    color: rgba(255, 255, 255, 0.92) !important;
    white-space: normal !important;
    line-height: 1.25 !important;
  }

  /* Hide instructor card in mobile hero (shown in dedicated section below) */
  .hero-instructor-wrap {
    display: none !important;
  }
}

/* Mobile-Only Teacher Ton Profile Section */
.mobile-instructor-section {
  display: none;
}

@media (max-width: 640px) {
  .mobile-instructor-section {
    display: block !important;
    padding: 24px 20px 8px;
    background: var(--c-page);
  }

  .m-stat-item {
    border-left: 1px solid #F1F5F9 !important;
    padding: 0 4px !important;
  }

  .m-stat-item:first-child {
    border-left: none !important;
  }

  .m-stat-val {
    font-size: 17px !important;
    font-weight: 950 !important;
    color: #1E3A8A !important;
    line-height: 1.1 !important;
    margin-bottom: 2px !important;
  }

  .m-stat-lbl {
    font-size: 10px !important;
    font-weight: 700 !important;
    color: #64748B !important;
    line-height: 1.2 !important;
  }

  /* Courses grid single column on mobile */
  .courses-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Category grid 2 columns on mobile */
  #category-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
}



/* COURSE CARDS GRID */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.course-card {
  background: var(--c-white);
  border-radius: 20px;
  border: 1px solid var(--c-border);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.course-card:hover {
  border-color: var(--c-navy);
  box-shadow: 0 20px 40px rgba(185, 28, 28, 0.12);
  transform: translateY(-6px);
}

/* MODALS */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.modal-overlay.show {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-box {
  position: relative;
  background: var(--c-white);
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-width: min(480px, calc(100vw - 32px));
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  z-index: 1000;
}

.modal-box.wide {
  max-width: min(840px, calc(100vw - 32px));
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--c-border);
  box-sizing: border-box;
}

.modal-body {
  padding: 24px;
  box-sizing: border-box;
}

/* Responsive Modal Layouts */
.course-modal-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 768px) {
  .course-modal-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
}

/* CART DRAWER */
.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  justify-content: flex-end;
}

.drawer-overlay.show {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

.drawer-panel {
  position: relative;
  background: var(--c-white);
  width: 100%;
  max-width: 360px;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.1);
  z-index: 201;
}

/* TOASTS */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  background: white;
  border: 1px solid #E5E7EB;
  max-width: 320px;
  animation: fadeInUp 0.3s ease;
}

/* ── REVIEWS MARQUEE & COMPACT STUDENT CARDS ── */
@keyframes marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.marquee-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 10px 0;
  mask-image: linear-gradient(to right, transparent, white 6%, white 94%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, white 6%, white 94%, transparent);
}

.marquee-content {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: marquee 24s linear infinite;
  will-change: transform;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Only pause on hover if device has a precise pointer (mouse), preventing sticky pause on phones */
@media (hover: hover) and (pointer: fine) {
  .marquee-content:hover {
    animation-play-state: paused;
  }
}

@media (max-width: 768px) {
  .marquee-content {
    animation-duration: 12s !important;
  }
}

.review-card-container {
  box-sizing: border-box;
  background: white;
  border-radius: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  width: 300px;
  max-width: 85vw;
  flex-shrink: 0;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid #E5E7EB;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  word-break: break-word;
  overflow-wrap: break-word;
}

.review-card-container:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(185, 28, 28, 0.08);
  border-color: rgba(185, 28, 28, 0.3);
}

.review-card-container-wide {
  width: 460px;
}

.student-image-box {
  width: 100%;
  height: 250px;
  background: #DEC8B3;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.student-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.3s ease;
}

.review-card-container:hover .student-image-box img {
  transform: scale(1.04);
}

.review-student-name {
  font-size: 16px;
  font-weight: 950;
  color: #B91C1C;
  margin: 0 0 4px;
}

.review-school {
  font-size: 13px;
  font-weight: 700;
  color: #4B5563;
  margin: 0 0 2px;
}

.review-score {
  font-size: 14px;
  font-weight: 900;
  color: #1E3A8A;
  margin: 0;
}

.review-text-quote {
  color: #4B5563;
  font-size: 12.5px;
  line-height: 1.6;
  margin: 12px 0 16px;
  text-align: center;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.review-click-btn {
  background: #B91C1C;
  color: white;
  font-weight: 800;
  font-size: 11px;
  padding: 8px 24px;
  border-radius: 20px;
  cursor: pointer;
  border: none;
  margin-top: auto;
  box-shadow: 0 4px 10px rgba(185, 28, 28, 0.2);
  transition: background 0.2s, transform 0.2s;
}

.review-click-btn:hover {
  background: #DC2626;
  transform: scale(1.03);
}

/* YOUTUBE LIVE CHAT STYLES */
.youtube-comment-item {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #1F1F1F;
}

.youtube-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

.youtube-username {
  font-size: 13px;
  font-weight: 700;
  color: #F1F1F1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.youtube-username-badge {
  background: #3EA6FF;
  color: black;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.youtube-time {
  font-size: 11px;
  color: #AAA;
  font-weight: 400;
}

.youtube-text {
  font-size: 13px;
  color: #F1F1F1;
  margin-top: 4px;
  line-height: 1.5;
}

.youtube-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.youtube-action-btn {
  background: none;
  border: none;
  color: #AAA;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.youtube-input-area {
  display: flex;
  gap: 16px;
}

.youtube-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid #303030;
  color: white;
  padding: 8px 0;
  font-size: 13px;
  outline: none;
}

.youtube-input:focus {
  border-bottom-color: #3EA6FF;
}

.youtube-comment-btn {
  background: #3EA6FF;
  color: black;
  border: none;
  padding: 8px 16px;
  border-radius: 18px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

/* CLASSROOM & ADMIN RESPONSIVE LAYOUTS */
.classroom-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .classroom-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }
  .classroom-grid > main {
    order: 1 !important;
    width: 100% !important;
  }
  .classroom-grid > aside {
    order: 2 !important;
    position: static !important;
    max-height: 480px !important;
    width: 100% !important;
  }
}

/* Admin & CMS Responsive Grids */
.admin-grid-3 {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
}
.admin-grid-4 {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1fr 1fr;
  gap: 12px;
}
.admin-grid-2 {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 12px;
}
.cms-lesson-form-grid {
  display: grid;
  grid-template-columns: 85px 2fr 100px 3fr auto;
  gap: 10px;
  align-items: end;
}
.cms-material-form-grid {
  display: grid;
  grid-template-columns: 2fr 1.4fr 1.2fr 2.5fr auto;
  gap: 10px;
  align-items: end;
}
.cms-lesson-row-grid {
  display: grid;
  grid-template-columns: 2fr 100px 3fr;
  gap: 10px;
  align-items: center;
}
.cms-material-row-grid {
  display: grid;
  grid-template-columns: 2.5fr 1.5fr 1fr;
  gap: 10px;
  align-items: center;
}
.approval-modal-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 900px) {
  .admin-grid-3,
  .admin-grid-4,
  .admin-grid-2 {
    grid-template-columns: 1fr 1fr !important;
  }
  .cms-lesson-form-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .cms-lesson-form-grid > div:nth-child(2),
  .cms-lesson-form-grid > div:nth-child(4),
  .cms-lesson-form-grid > button {
    grid-column: span 2 !important;
  }
  .cms-material-form-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .cms-material-form-grid > div:nth-child(1),
  .cms-material-form-grid > div:nth-child(4),
  .cms-material-form-grid > button {
    grid-column: span 2 !important;
  }
}

@media (max-width: 640px) {
  .admin-grid-3,
  .admin-grid-4,
  .admin-grid-2 {
    grid-template-columns: 1fr !important;
  }
  .cms-lesson-form-grid,
  .cms-material-form-grid,
  .cms-lesson-row-grid,
  .cms-material-row-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .cms-lesson-form-grid > div,
  .cms-lesson-form-grid > button,
  .cms-material-form-grid > div,
  .cms-material-form-grid > button {
    grid-column: span 1 !important;
    width: 100% !important;
  }
  .approval-modal-grid {
    grid-template-columns: 1fr !important;
    text-align: center;
  }
  .approval-modal-grid > div:first-child {
    margin: 0 auto;
  }
}

.student-dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
}

@media (max-width: 800px) {
  .student-dashboard-layout {
    grid-template-columns: 1fr;
  }
}

.enrolled-courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

/* LIVE COMMENTS SCROLLABLE CONTAINER */
#comments-list {
  max-height: 340px;
  overflow-y: auto;
  padding-right: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#comments-list::-webkit-scrollbar {
  width: 6px;
}

#comments-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

#comments-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
}

#comments-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* ── RESPONSIVE LAYOUT CLASSES (940px, 860px, 780px, 640px) ── */

/* Courses Page Layout */
.courses-page-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
}

@media (max-width: 860px) {
  .courses-page-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Checkout Page Layout */
.checkout-grid-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}

@media (max-width: 780px) {
  .checkout-grid-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Promo Flash Sale Banner Layout */
.promo-banner-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  align-items: center;
}

@media (max-width: 860px) {
  .promo-banner-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 24px !important;
  }
}

/* Promo Banner Slider Controls */
.promo-slider-container {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  width: 100%;
}

.promo-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(226, 232, 240, 0.9);
  color: #1E3A8A;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
  transition: all 0.2s ease;
  opacity: 0.85;
}

.promo-slider-arrow:hover {
  opacity: 1;
  background: white;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 8px 24px rgba(30, 58, 138, 0.2);
}

.promo-slider-arrow.prev {
  left: 14px;
}

.promo-slider-arrow.next {
  right: 14px;
}

@media (max-width: 640px) {
  .promo-slider-arrow {
    width: 36px;
    height: 36px;
    opacity: 0.9;
  }
  .promo-slider-arrow.prev {
    left: 8px;
  }
  .promo-slider-arrow.next {
    right: 8px;
  }
}

/* Promo Banner Slider Dots Pagination */
#promo-banner-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
}

.promo-slider-dot {
  min-height: 0 !important;
  max-height: 6px !important;
  height: 6px !important;
  width: 6px;
  padding: 0 !important;
  border: none !important;
  border-radius: 999px !important;
  cursor: pointer !important;
  outline: none !important;
  box-shadow: none !important;
  line-height: 0 !important;
  font-size: 0 !important;
  background: #CBD5E1;
  display: inline-block !important;
  vertical-align: middle;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease !important;
  flex-shrink: 0 !important;
}

.promo-slider-dot.active {
  width: 20px !important;
  background: #1E3A8A !important;
}

.promo-slider-dot:hover:not(.active) {
  background: #94A3B8 !important;
}


/* Student Dashboard Tabs & Profile Form */
.dash-tabs-scroll {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #E5E7EB;
  padding-bottom: 12px;
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.dash-tabs-scroll::-webkit-scrollbar {
  display: none;
}

/* Student Profile Form Styling (Responsive Desktop & Mobile) */
.profile-form-grid {
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 18px;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  box-sizing: border-box;
}

.profile-form-group {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.profile-label {
  display: block;
  font-size: 12.5px;
  font-weight: 800;
  color: #374151;
  margin-bottom: 6px;
  line-height: 1.4;
}

.profile-input {
  width: 100%;
  border: 1px solid #D1D5DB;
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 13.5px;
  outline: none;
  background: white;
  color: #1F2937;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-input:focus {
  border-color: var(--c-navy);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.profile-select {
  cursor: pointer;
}

.profile-birthdate-age-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  width: 100%;
}

.profile-span-2 {
  grid-column: span 2;
}

.profile-submit-container {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
  width: 100%;
}

.profile-submit-btn {
  background: var(--c-navy);
  color: white;
  font-weight: 850;
  font-size: 13.5px;
  padding: 12px 28px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(30, 58, 138, 0.25);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.profile-submit-btn:hover {
  background: #172554;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(30, 58, 138, 0.35);
}

/* Standardized Course Thumbnail Duration Badge (Rule 2) */
.card-duration-badge {
  position: absolute;
  bottom: 10px;
  right: 12px;
  background: #18181B;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 6px;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* ── SCROLL REVEAL (INTERSECTION OBSERVER) ── */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   TYPE SCALE & ACCESSIBILITY TOUCH TARGETS (AUDIT 3.1, 3.2, 3.3)
   ───────────────────────────────────────────────────────────────────────────── */
h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.25;
}

h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.95rem);
  line-height: 1.3;
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.35;
}

p {
  font-size: clamp(0.925rem, 1.15vw, 1rem);
  line-height: 1.65;
}

/* Accessibility Touch Targets Minimum (>= 44px) */
button:not(.promo-slider-dot),
.btn,
.btn-primary,
.btn-secondary,
.btn-trial,
.nav-link,
.tab-btn,
.faq-header-btn {
  min-height: 44px;
}

input,
select,
textarea {
  min-height: 44px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   UNIVERSAL FOOTER (AUDIT 2.1, 2.2)
   ───────────────────────────────────────────────────────────────────────────── */
.site-footer {
  background: #0B132B;
  color: #94A3B8;
  padding: 36px 24px 20px;
  position: relative;
  z-index: 10;
  margin-top: 48px;
  border-top: 1px solid #1E293B;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-clean-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 36px;
  flex-wrap: wrap;
}

.footer-brand-block {
  max-width: 420px;
}

.footer-quick-nav {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .site-footer {
    padding: 28px 18px 16px;
    margin-top: 36px;
  }

  .footer-clean-content {
    flex-direction: column;
    gap: 24px;
  }

  .footer-quick-nav {
    gap: 32px;
    width: 100%;
  }
}

.footer-col h4 {
  color: #F8FAFC;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.footer-col p {
  font-size: 13px;
  line-height: 1.55;
  color: #94A3B8;
  margin-bottom: 12px;
}

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

.footer-links a {
  color: #94A3B8;
  font-size: 13px;
  transition: color 0.15s ease, transform 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.footer-links a:hover {
  color: #FFFFFF;
  transform: translateX(3px);
}

.footer-social-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}

.footer-social-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #1E293B;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  transition: all 0.2s ease;
  border: 1px solid #334155;
  text-decoration: none;
}

.footer-social-btn:hover {
  background: #B91C1C;
  border-color: #B91C1C;
  transform: translateY(-2px);
  color: #FFFFFF;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 14px;
  color: #94A3B8;
}

.footer-bottom {
  border-top: 1px solid #1E293B;
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: #64748B;
}

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

.footer-legal-links a {
  color: #64748B;
  transition: color 0.2s ease;
}

.footer-legal-links a:hover {
  color: #CBD5E1;
  text-decoration: underline;
}

/* ─────────────────────────────────────────────────────────────────────────────
   BACK TO TOP FLOATING BUTTON (AUDIT 2.2)
   ───────────────────────────────────────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #B91C1C;
  color: #FFFFFF;
  border: none;
  box-shadow: 0 8px 24px rgba(185, 28, 28, 0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.back-to-top:hover {
  background: #991B1B;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 28px rgba(185, 28, 28, 0.45);
}

@media (max-width: 640px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   FAQ ACCORDION & FILTER STYLES (AUDIT 1.2)
   ───────────────────────────────────────────────────────────────────────────── */
.faq-category-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  justify-content: center;
}

.faq-cat-pill {
  padding: 10px 20px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.faq-cat-pill:hover,
.faq-cat-pill.active {
  background: #B91C1C;
  color: #FFFFFF;
  border-color: #B91C1C;
  box-shadow: 0 4px 12px rgba(185, 28, 28, 0.2);
}

.faq-item-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  margin-bottom: 14px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

.faq-header-btn {
  width: 100%;
  padding: 18px 24px;
  background: none;
  border: none;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.4;
}

.faq-icon-arrow {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748B;
  transition: transform 0.25s ease, background 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
  font-size: 13px;
}

.faq-item-card.open .faq-icon-arrow {
  transform: rotate(180deg);
  background: #FEE2E2;
  color: #B91C1C;
}

.faq-answer-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
  padding: 0 24px;
  color: #475569;
  font-size: 15px;
  line-height: 1.7;
}

.faq-item-card.open .faq-answer-body {
  max-height: 400px;
  padding: 0 24px 22px;
  transition: max-height 0.35s ease-in-out;
}

/* ─────────────────────────────────────────────────────────────────────────────
   LEGAL & POLICY CARD STYLES (AUDIT 1.2, 5.2, 5.3)
   ───────────────────────────────────────────────────────────────────────────── */
.policy-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 24px;
  padding: 44px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.03);
}

@media (max-width: 640px) {
  .policy-card {
    padding: 24px 20px;
  }
}

.policy-section {
  margin-bottom: 36px;
}

.policy-section:last-child {
  margin-bottom: 0;
}

.policy-section h3 {
  color: #0F172A;
  margin-bottom: 12px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.policy-section p,
.policy-section li {
  color: #475569;
  font-size: 15px;
  line-height: 1.7;
}

.policy-section ul,
.policy-section ol {
  padding-left: 20px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notice-box-blue {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 16px;
  padding: 20px;
  color: #1E3A8A;
  margin: 20px 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  line-height: 1.6;
  font-size: 14px;
}

.notice-box-amber {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 16px;
  padding: 20px;
  color: #92400E;
  margin: 20px 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  line-height: 1.6;
  font-size: 14px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   MOBILE-FIRST PROFESSIONAL RESPONSIVE DESIGN (PHONES 360px - 430px & TABLETS)
   Tailored specifically for mobile screens to eliminate overflow and wrapping bugs
   ───────────────────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {

  /* Prevent any element from exceeding phone screen width */
  *,
  *::before,
  *::after {
    max-width: 100%;
  }

  /* Page container paddings */
  .header-container {
    padding: 0 10px !important;
    height: 56px !important;
  }

  .logo-img {
    height: 32px !important;
  }

  .cart-icon-btn {
    padding: 6px 8px !important;
  }

  /* Compact User Controls in Header */
  .header-user-actions {
    gap: 5px !important;
  }

  .header-user-badge {
    max-width: 115px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 11.5px !important;
    padding: 5px 8px !important;
    font-weight: 750 !important;
  }

  .header-logout-btn {
    display: none !important;
  }

  /* Dropdown Menu Mobile Placement */
  .dropdown-menu {
    width: min(320px, 92vw) !important;
    right: 8px !important;
    top: 60px !important;
    padding: 12px 8px !important;
    border-radius: 16px !important;
  }

  /* Student Dashboard Mobile Layout */
  .student-dashboard-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    padding: 0 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .student-dashboard-layout aside {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 18px 14px !important;
    border-radius: 16px !important;
  }

  .student-dashboard-layout aside>div:first-child {
    width: 64px !important;
    height: 64px !important;
    font-size: 28px !important;
    margin-bottom: 8px !important;
  }

  .student-dashboard-layout > div > div {
    padding: 16px 12px !important;
    border-radius: 16px !important;
    box-sizing: border-box !important;
  }

  /* Profile Form 1-Column Responsive Mobile Flow */
  .profile-form-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    padding: 16px 12px !important;
    border-radius: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .profile-form-group,
  .profile-span-2 {
    width: 100% !important;
    grid-column: auto !important;
    box-sizing: border-box !important;
  }

  .profile-birthdate-age-row {
    flex-direction: row !important;
    gap: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .profile-input {
    font-size: 14px !important;
    min-height: 46px !important;
    padding: 10px 12px !important;
    box-sizing: border-box !important;
    border-radius: 10px !important;
  }

  .profile-submit-container {
    width: 100% !important;
    margin-top: 10px !important;
    display: flex !important;
  }

  .profile-submit-btn {
    width: 100% !important;
    min-height: 50px !important;
    font-size: 15px !important;
    padding: 14px 16px !important;
    white-space: nowrap !important;
    text-align: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    border-radius: 12px !important;
  }

  /* Floating Back-To-Top Safe Floating Position on Mobile */
  .back-to-top {
    bottom: 80px !important;
    right: 14px !important;
    width: 42px !important;
    height: 42px !important;
    font-size: 17px !important;
    z-index: 85 !important;
    box-shadow: 0 4px 16px rgba(185, 28, 28, 0.35) !important;
  }

  /* Order stats 2x2 grid on mobile */
  #order-stats-container {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .enrolled-courses-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .dash-tabs-scroll {
    gap: 6px !important;
    padding-bottom: 8px !important;
    margin-bottom: 16px !important;
  }

  .dash-tabs-scroll button {
    font-size: 11.5px !important;
    padding: 7px 12px !important;
    border-radius: 8px !important;
  }

  /* Checkout Mobile Layout */
  .checkout-grid-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    padding: 0 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .checkout-grid-layout>div {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 20px 16px !important;
    border-radius: 18px !important;
  }

  /* Courses Catalog Layout */
  .courses-page-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    padding: 0 12px !important;
  }

  .courses-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Hero Section Responsiveness */
  .hero-container {
    padding: 24px 14px !important;
  }

  .hero-buttons-row {
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
  }

  .hero-buttons-row a,
  .hero-buttons-row button {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  /* Modal Dialogs on Phone */
  .modal-dialog,
  .modal-content,
  #admin-approval-modal>div,
  #admin-reject-modal>div {
    width: min(94vw, 480px) !important;
    margin: 16px auto !important;
    padding: 20px 16px !important;
    border-radius: 18px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
  }

  /* Form Inputs on Mobile: Prevent iOS zoom and improve tap targets */
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="tel"],
  input[type="date"],
  input[type="number"],
  select,
  textarea {
    font-size: 14px !important;
    min-height: 44px;
    box-sizing: border-box !important;
  }

  /* Buttons on Mobile: Comfortable 44px+ tap target */
  button:not(.promo-slider-dot),
  .btn,
  .btn-submit,
  .btn-login {
    min-height: 44px;
  }

  /* Typography Adjustments */
  h1 {
    font-size: 24px !important;
    line-height: 1.3 !important;
  }

  h2 {
    font-size: 18px !important;
    line-height: 1.35 !important;
  }

  h3 {
    font-size: 15px !important;
    line-height: 1.4 !important;
  }
}