/* ============================================================
   iTeachAI Academy — Responsive Audit Overlay (2026-05-12)
   Appended to fix mobile + small-laptop layout regressions.
   Mobile-first additions; everything else inherits style.css.
   Belle, on behalf of Janette Camacho.
   ============================================================ */

/* ----- 1. NAV: Burger menu under 900px, full nav at 900+ ----- */

/* Burger button — hidden on desktop, visible at <=900 */
.nav-burger {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.nav-burger:focus { outline: 2px solid rgba(220, 180, 190, 0.9); outline-offset: 2px; }
.nav-burger:hover { background: rgba(255, 255, 255, 0.06); }

.nav-burger-icon,
.nav-burger-icon::before,
.nav-burger-icon::after {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.15s ease, top 0.2s ease;
  position: relative;
  content: '';
}
.nav-burger-icon { position: relative; }
.nav-burger-icon::before { position: absolute; top: -7px; left: 0; }
.nav-burger-icon::after  { position: absolute; top:  7px; left: 0; }

/* X state */
body.nav-open .nav-burger-icon { background: transparent; }
body.nav-open .nav-burger-icon::before { top: 0; transform: rotate(45deg); }
body.nav-open .nav-burger-icon::after  { top: 0; transform: rotate(-45deg); }

/* Below 1100px: collapse nav, show burger, slide-down menu.
   1024 (iPad landscape) still wraps with 6 links + brand;
   we keep burger up to 1099.98 to guarantee a single-line clean nav. */
@media (max-width: 1099.98px) {
  .site-header { padding: 0 16px !important; height: 60px; }
  .site-header .logo { font-size: 17px; gap: 8px; }
  .site-header .logo-img { height: 30px; width: 30px; }

  .nav-burger { display: inline-flex; }

  .site-header nav {
    position: fixed;
    top: 60px;
    right: 0;
    left: 0;
    background: rgba(28, 10, 16, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 24px;
    border-top: 1px solid rgba(187, 129, 139, 0.2);
    border-bottom: 1px solid rgba(187, 129, 139, 0.2);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s ease, opacity 0.2s ease, visibility 0s linear 0.25s;
    z-index: 99;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }

  body.nav-open .site-header nav {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    transition: transform 0.25s ease, opacity 0.2s ease, visibility 0s linear 0s;
  }

  .site-header nav a {
    display: block;
    padding: 16px 24px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.92) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    min-height: 44px;
    line-height: 1.4;
    white-space: nowrap;
  }
  .site-header nav a:last-child { border-bottom: none; }
  .site-header nav a::after { display: none !important; }
  .site-header nav a:hover { background: rgba(187, 129, 139, 0.12); color: #fff !important; }

  /* Body lock when menu open */
  body.nav-open { overflow: hidden; }
}

/* Above 1100px: ensure desktop nav is tight enough not to wrap */
@media (min-width: 1100px) and (max-width: 1280px) {
  .site-header { padding: 0 20px; }
  .site-header nav { gap: 18px; }
  .site-header nav a { font-size: 13px; white-space: nowrap; }
}

/* Slim mobile (<=480): tighter header */
@media (max-width: 480px) {
  .site-header { padding: 0 12px !important; height: 56px; }
  .site-header .logo { font-size: 16px; }
  .site-header .logo span { display: inline; }
  .site-header nav { top: 56px; }
}

/* ----- 2. HERO TITLE: Fluid type with clamp() ----- */
/* Smooth scale from 28px (360w) to 64px (1280w+). Eliminates 36->64 jump. */
.catalog-hero-title {
  font-size: clamp(28px, 5.4vw, 64px) !important;
  line-height: 1.12 !important;
}
.catalog-hero-subtitle {
  font-size: clamp(15px, 2vw, 20px) !important;
  line-height: 1.7 !important;
  padding: 0 8px;
}
.catalog-hero-note {
  font-size: clamp(11px, 1.4vw, 13px) !important;
}
.catalog-hero-stats { flex-wrap: wrap; gap: clamp(20px, 4vw, 48px); justify-content: center; }
.catalog-hero-stat-number { font-size: clamp(24px, 4vw, 36px) !important; }

/* Hero padding tightens on mobile */
@media (max-width: 768px) {
  .catalog-hero { padding: 60px 16px 48px !important; min-height: 360px !important; }
  .catalog-hero-stats { padding-top: 32px !important; gap: 20px !important; }
  .catalog-hero .search-filter-bar { padding: 14px 14px !important; margin-top: 28px !important; }
}

/* ----- 3. PAGE H1: Fluid for other hero variants ----- */
h1 { letter-spacing: -0.02em; }
.page-title,
.section-title,
.about-hero h1,
.contact-hero h1,
.cert-hero h1 {
  font-size: clamp(24px, 4.2vw, 44px) !important;
  line-height: 1.18 !important;
}

/* ----- 4. COURSE CARDS GRID: Self-tuning columns ----- */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(16px, 2vw, 24px);
}
@media (max-width: 480px) {
  .course-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* ----- 5. FORM INPUTS: Prevent iOS zoom-on-focus ----- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="time"],
select,
textarea {
  font-size: max(16px, 1rem);
}
/* Keep visual size compact on desktop only */
@media (min-width: 901px) {
  .compact-input, .filter-input { font-size: 14px; }
}

/* ----- 6. BUTTONS: ≥44px tap targets on mobile ----- */
@media (max-width: 768px) {
  .btn,
  .btn-xl,
  button.btn,
  a.btn {
    min-height: 44px;
    padding-top: 12px;
    padding-bottom: 12px;
    font-size: 14px !important;
  }
  .btn-xl {
    padding: 14px 28px !important;
    font-size: 15px !important;
  }
  /* CTAs that should be full-width on mobile */
  .hero-cta-wrap .btn,
  .catalog-hero-cta .btn,
  .auth-card .btn {
    width: 100%;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
  }
}

/* ----- 7. CATALOG TABS: horizontal scroll instead of cramming ----- */
.catalog-tabs-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.catalog-tabs {
  display: inline-flex;
  flex-wrap: nowrap;
  min-width: 100%;
}
.catalog-tab { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 768px) {
  .catalog-tab { padding: 12px 14px; font-size: 13px; min-height: 44px; }
}

/* ----- 8. AUTH / LOGIN: padding fix + max-width ----- */
.auth-card {
  width: 100%;
  max-width: 440px;
  margin: 24px auto;
}
@media (max-width: 480px) {
  .auth-card { margin: 16px 8px; padding: 24px 18px !important; border-radius: 12px; }
}

/* ----- 9. PREVENT HORIZONTAL OVERFLOW ----- */
html, body { overflow-x: hidden; }
img, video, iframe, svg { max-width: 100%; height: auto; }

/* ----- 10. FOOTER + GRIDS: collapse cleanly ----- */
.outcomes-grid,
.about-values-grid,
.contact-cards-grid,
.contact-help-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: clamp(16px, 2vw, 24px) !important;
}
.contact-form-row {
  grid-template-columns: 1fr !important;
}
@media (min-width: 600px) {
  .contact-form-row { grid-template-columns: 1fr 1fr !important; }
}

/* ----- 11. LESSON / COURSE OVERVIEW: better mobile flow ----- */
@media (max-width: 768px) {
  .course-overview-layout { flex-direction: column; padding: 16px 12px; gap: 16px; }
  .course-overview-sidebar { width: 100%; position: static; }
  .course-overview-main { width: 100%; }
  .lesson-content { padding: 16px; font-size: 16px; line-height: 1.7; }
  .lesson-content h2 { font-size: 22px; margin-top: 24px; }
  .lesson-content h3 { font-size: 18px; }
}

/* ----- 12. MODALS: full-width on mobile, centered on desktop ----- */
@media (max-width: 600px) {
  .modal,
  .modal-card,
  .dialog,
  .auth-card {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 12px !important;
    margin: 8px !important;
  }
}

/* ----- 13. FL/CT STUDY GUIDE TAB BAR — wrap properly ----- */
/* These pages are at /materials/{state}/ which we cannot edit, but the
   shell here doesn't host them. Documented in Open Items. */

/* ----- 14. CONTAINER PADDING — eliminate edge-bleed at all widths ----- */
.container,
.catalog-section,
.cta-register,
.about-section,
.contact-section {
  padding-left: clamp(12px, 3vw, 32px);
  padding-right: clamp(12px, 3vw, 32px);
}

/* ----- 15. AVOID OVERFLOWING TEXT on long words/URLs ----- */
.course-card-body h3,
.lesson-content,
.about-bio,
.contact-form {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ============================================================
   END responsive-fix.css
   ============================================================ */
