/* ============================================================
   Responsive.css – Full Mobile-First Responsiveness
   ============================================================ */

/* ── Base Grid Utilities ── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2xl);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

/* ── Touch Targets ── */
button,
.btn,
input,
select,
textarea {
  min-height: 44px;
  touch-action: manipulation;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

/* Nav links remain inline */
.nav-link,
.mobile-nav-link,
.footer-links-col a {
  min-height: unset;
}

/* ── Inputs ── */
input[type="text"]:not(.search-box input):not(.auth-form input),
input[type="email"]:not(.auth-form input),
input[type="password"]:not(.auth-form input) {
  height: 48px;
  padding: 0 var(--space-lg);
  border-radius: var(--radius-input);
  border: 1px solid var(--color-glass-border);
  font-family: var(--font-family);
  font-size: var(--font-size-body);
  background-color: var(--color-white);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  width: 100%;
}

input:focus {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(78, 145, 209, 0.15);
  outline: none;
}

/* ============================================================
   Mobile Nav Drawer & Hamburger
   ============================================================ */

/* Hamburger – hidden on desktop */
.mobile-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  min-height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 200;
  flex-shrink: 0;
}

.hamburger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background-color: #fff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

.mobile-nav-toggle.open .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-nav-toggle.open .hamburger-bar:nth-child(2) {
  opacity: 0;
  width: 0;
}

.mobile-nav-toggle.open .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Backdrop overlay */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(3, 10, 30, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-nav-overlay.open {
  display: block;
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

/* Drawer slides in from right */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(340px, 88vw);
  height: 100vh;
  background: #040c24;
  z-index: 160;
  display: flex;
  flex-direction: column;
  padding-bottom: 40px;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
  visibility: hidden;
}

.mobile-nav-drawer.open {
  right: 0;
  pointer-events: auto;
  visibility: visible;
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 72px;
}

.mobile-nav-header .logo {
  color: #fff;
  text-decoration: none;
  min-height: unset;
}

.mobile-nav-header .logo span {
  color: #fff;
}

.mobile-nav-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 20px;
  cursor: pointer;
  width: 44px;
  height: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.2s;
}

.mobile-nav-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.mobile-nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  padding: 20px 24px;
  gap: 4px;
  flex: 1;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  font-size: 17px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
  min-height: 48px;
}

.mobile-nav-link:hover {
  background: rgba(59, 125, 232, 0.12);
  color: #fff;
}

.mobile-nav-cta {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ============================================================
   Tablet Breakpoint (max-width: 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .container {
    padding: 0 var(--space-xl);
  }

  .grid-2 {
    gap: var(--space-xl);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  section {
    padding: var(--space-3xl) 0;
  }
}

/* ============================================================
   Mobile Breakpoint (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {

  /* Show hamburger, hide desktop nav & auth */
  .mobile-nav-toggle {
    display: flex;
  }

  .nav-menu,
  .nav-auth {
    display: none !important;
  }

  /* Container */
  .container {
    padding: 0 20px;
  }

  section {
    padding: var(--space-2xl) 0;
  }

  /* Grids collapse to 1 column */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  /* Only full-width buttons in specific contexts, NOT nav buttons */
  .final-cta .btn,
  .course-checkout-pane .btn {
    width: 100%;
  }

  /* ── Hero ── */
  .hero {
    min-height: auto !important;
  }

  .hero-body {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 20px 16px 32px 16px !important;
    gap: 20px !important;
    max-width: 100% !important;
  }

  .hero-content {
    gap: 18px;
    max-width: 100%;
  }

  .hero-headline {
    font-size: clamp(30px, 9vw, 48px) !important;
  }

  .hero-headline-main,
  .hero-headline-italic {
    white-space: normal !important;
  }

  .hero-description {
    font-size: 15px;
    max-width: 100%;
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .btn-hero-cta {
    width: 100%;
    justify-content: center;
    padding: 16px 28px;
    font-size: 15px;
  }

  .hero-card-wrapper {
    width: 100%;
  }

  .hero-course-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 24px 20px !important;
  }

  .hero-bottom-bar {
    padding: 18px 20px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }

  .hero-bottom-divider {
    display: none !important;
  }

  .hero-bottom-right {
    text-align: left !important;
    white-space: normal !important;
  }

  /* ── Course Showcase ── */
  .course-showcase-card {
    grid-template-columns: 1fr !important;
    gap: var(--space-xl) !important;
    padding: var(--space-xl) !important;
  }

  .course-title {
    font-size: 28px !important;
  }

  .course-checklist {
    grid-template-columns: 1fr !important;
  }

  /* ── Projects ── */
  .projects-grid {
    grid-template-columns: 1fr !important;
    gap: var(--space-lg) !important;
  }

  /* ── Testimonials ── */
  .testimonial-card {
    width: 82vw;
    min-width: 260px;
    padding: var(--space-lg);
  }

  /* ── Section headers ── */
  .section-header h2 {
    font-size: clamp(24px, 7vw, 40px);
  }

  /* ── Final CTA ── */
  .final-cta {
    padding: var(--space-3xl) var(--space-lg) !important;
    border-radius: var(--radius-card) !important;
    margin: var(--space-2xl) 0 !important;
  }

  .final-cta h2 {
    font-size: clamp(22px, 7vw, 40px) !important;
  }

  /* ── Footer ── */
  .footer-top {
    grid-template-columns: 1fr !important;
    gap: var(--space-xl) !important;
  }

  /* ── Accordion ── */
  .accordion-meta {
    display: none;
  }

  .accordion-name {
    font-size: 15px;
  }

  /* ── Steps ── */
  .steps-grid {
    grid-template-columns: 1fr !important;
    gap: var(--space-xl) !important;
  }

  /* ── Header ── */
  header .container {
    height: 58px;
  }
}

/* ============================================================
   Small Mobile (max-width: 480px)
   ============================================================ */
@media (max-width: 480px) {
  .hero-body {
    padding: 16px 14px 28px 14px !important;
  }

  .hero-headline {
    font-size: clamp(26px, 10vw, 40px) !important;
  }

  .hero-chip {
    font-size: 12px;
    padding: 5px 12px;
  }

  .hero-course-card {
    padding: 18px 14px !important;
    border-radius: 18px !important;
  }

  .hero-card-features {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .price-amount {
    font-size: 36px;
  }

  .course-showcase-card {
    padding: var(--space-lg) !important;
  }

  .testimonial-card {
    width: 300px;
    margin-left: -150px;
    min-height: 230px;
    padding: var(--space-lg);
  }
  
  .testimonials-cylinder-viewport {
    height: 360px;
  }
  
  .testimonials-nav-btn {
    width: 38px;
    height: 38px;
  }
  
  .testimonials-nav-btn.prev-btn {
    left: 2px;
  }

  .testimonials-nav-btn.next-btn {
    right: 2px;
  }

  .container {
    padding: 0 16px;
  }

  section {
    padding: var(--space-xl) 0;
  }

  /* Responsive Course Card Banners */
  .card-banner {
    aspect-ratio: 2 / 1 !important;
    width: 100% !important;
    height: auto !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    padding: 12px !important;
  }

  .card-badge-top {
    font-size: 10px !important;
    padding: 3px 8px !important;
    top: 10px !important;
    left: 10px !important;
  }
}