/* ==========================================================================
   ClassIQ Responsive Media Queries
   Comprehensive Mobile, Tablet & Desktop Adaptations
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TABLET BREAKPOINT (max-width: 1024px)
   -------------------------------------------------------------------------- */
@media screen and (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 50px;
  }

  .hero-content {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

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

  .hero-subtitle {
    margin: 0 auto 32px auto;
  }

  .hero-visual-container {
    max-width: 440px;
    margin: 0 auto;
    min-height: 440px;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .solution-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .solution-content {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .solution-content .section-title {
    text-align: center !important;
  }

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

/* --------------------------------------------------------------------------
   2. STANDARD MOBILE & TABLET PORTRAIT (max-width: 768px)
   -------------------------------------------------------------------------- */
@media screen and (max-width: 768px) {
  .navbar {
    padding: 12px 0;
  }

  .nav-brand-group {
    gap: 0;
  }

  /* Mobile Drawer Navigation */
  .nav-links {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: #FFFFFF;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 20px 30px 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid var(--card-border);
    transform: translateY(-150%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition-normal), opacity var(--transition-fast);
    z-index: 999;
    gap: 8px;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    width: 100%;
    padding: 12px 16px;
    font-size: 1.05rem;
    border-radius: var(--radius-sm);
  }

  .hamburger-menu {
    display: flex !important;
    visibility:visible
  }

  .mobile-nav-actions {
    display: flex;
  }

  /* Hero Section Mobile Polish */
  .hero-section {
    padding: 36px 0 54px 0;
  }

  .hero-title {
    font-size: clamp(2rem, 7vw, 2.75rem);
    line-height: 1.16;
    letter-spacing: -1px;
    margin-bottom: 18px;
  }

  .hero-subtitle {
    font-size: 0.98rem;
    line-height: 1.6;
    margin-bottom: 28px;
  }

  .btn-lime {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
  }

  .hero-visual-container {
    max-width: 360px;
    min-height: 360px;
    margin: 0 auto;
  }

  .hero-3d-card {
    max-width: 320px;
  }

  .hero-avatar-glow-bg {
    width: 320px;
    height: 320px;
  }

  .hero-avatar-img {
    max-width: 290px;
  }

  /* Re-position 3D Orbiting Badges to prevent Viewport Overflow */
  .marketing-badge-3d {
    font-size: 0.8rem;
    padding: 8px 14px;
  }

  .marketing-badge-1 {
    top: 2%;
    right: 0px;
    transform: scale(0.85);
  }

  .marketing-badge-2 {
    top: 40%;
    left: 0px;
    transform: scale(0.85);
  }

  .marketing-badge-3 {
    bottom: 5%;
    right: 0px;
    transform: scale(0.85);
  }

  .badge-enrolled {
    left: 0px;
    bottom: 8%;
    padding: 10px 14px;
    gap: 10px;
    transform: scale(0.88);
  }

  .badge-enrolled-title {
    font-size: 0.85rem;
  }

  .badge-enrolled-sub {
    font-size: 0.75rem;
  }

  /* Corporate Partners Bar */
  .partners-section {
    padding: 40px 0;
  }

  .partners-header {
    margin-bottom: 24px;
  }

  .partners-title {
    font-size: 1.15rem;
  }

  .partners-ticker-track {
    gap: 16px;
  }

  .partner-item {
    padding: 8px 16px;
    min-width: 110px;
    height: 48px;
  }

  .partner-logo {
    height: 22px;
    max-width: 90px;
  }

  /* Features Grid */
  .features-section {
    padding: 54px 0;
  }

  .section-title {
    font-size: 1.75rem;
    margin-bottom: 32px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .feature-card {
    padding: 32px 20px;
  }

  /* All-In-One Solution Section */
  .solution-section {
    padding: 54px 0;
  }

  .solution-card-wrapper {
    padding: 24px 16px;
  }

  .solution-avatar-img {
    max-width: 280px;
  }

  .solution-list {
    margin: 24px 0 32px 0;
    align-items: center;
  }

  .solution-item {
    font-size: 1rem;
  }

  .solution-icon-box {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  /* Courses Dashboard Page (courses.html) */
  .dashboard-banner {
    padding: 28px 20px !important;
    margin: 20px 0 40px 0 !important;
    flex-direction: column !alignment: center;
    text-align: center;
    gap: 24px !important;
  }

  .dashboard-banner-title {
    font-size: clamp(1.75rem, 6.5vw, 2.25rem) !important;
  }

  .dashboard-avatar-img {
    max-width: 200px !important;
  }

  /* App-Style Horizontal Touch Scrollable Filter Pills */
  .filter-bar-container {
    margin-bottom: 24px !important;
  }

  .filter-pills {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px !important;
    gap: 8px !important;
    width: 100% !important;
    scrollbar-width: none; /* Hide firefox scrollbar */
  }

  .filter-pills::-webkit-scrollbar {
    display: none; /* Hide Chrome/Safari scrollbar */
  }

  .filter-pill {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    padding: 8px 18px !important;
    font-size: 0.85rem !important;
    scroll-snap-align: start;
  }

  #course-search-input {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 8px;
    font-size: 16px !important; /* Prevents iOS auto-zoom */
  }

  .courses-grid-container {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    margin-bottom: 50px !important;
  }

  .course-thumb-wrapper {
    height: 180px !important;
  }

  .course-body {
    padding: 18px 16px !important;
  }

  /* Footer */
  .footer-top {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .newsletter-form {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
  }

  /* Modals */
  .modal-card {
    width: calc(100vw - 32px);
    max-width: 400px;
    padding: 32px 20px;
    border-radius: var(--radius-md);
  }

  .auth-input {
    font-size: 16px !important; /* CRITICAL: Prevents iOS auto-zoom on input focus */
    padding: 12px 16px;
  }

  .modal-close-btn {
    width: 44px;
    height: 44px;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   3. SMALL SMARTPHONES (max-width: 576px)
   -------------------------------------------------------------------------- */
@media screen and (max-width: 576px) {
  /* Hide Desktop Header Buttons on small phones so header is super clean */
  .nav-actions .btn-dark {
    display: none;
  }

  .hero-visual-container {
    max-width: 300px;
    min-height: 310px;
  }

  .hero-3d-card {
    max-width: 280px;
  }

  .hero-avatar-glow-bg {
    width: 270px;
    height: 270px;
  }

  .hero-avatar-img {
    max-width: 250px;
  }

  .marketing-badge-3d {
    font-size: 0.72rem;
    padding: 6px 10px;
  }

  .marketing-badge-1 { top: 0; right: 0; }
  .marketing-badge-2 { top: 45%; left: -5px; }
  .marketing-badge-3 { bottom: 0; right: -5px; }

  .badge-enrolled {
    bottom: 2%;
    left: -5px;
    padding: 8px 12px;
  }
}

/* --------------------------------------------------------------------------
   4. ULTRA-SMALL SCREENS (max-width: 360px)
   -------------------------------------------------------------------------- */
@media screen and (max-width: 360px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .brand-logo {
    font-size: 1.35rem;
  }

  .brand-logo img {
    width: 36px;
    height: 36px;
  }
}
