/* === RESPONSIVE OVERRIDES === */
@media (max-width: 992px) {
  .hero-container {
    flex-direction: column;
    text-align: center;
  }
  .hero-buttons {
    justify-content: center;
  }
  .hero-content h1 {
    font-size: 2.8rem;
  }
  .hero-content p {
    margin: 0 auto 30px auto;
  }
}
@media (max-width: 768px) {

  .navbar, .navbar.scrolled, .navbar.glass-panel {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .mobile-menu-toggle {
    display: none !important;
  }

  .mobile-bottom-nav {
    display: flex;
  }
  .floating-whatsapp {
    bottom: 80px;
  }

  .hero {
    padding: 50px 0;
  }

  /* Hide Topbar on Mobile to save space */
  .topbar {
    display: none !important;
  }

  /* Full screen Hero on Mobile */
  .hero-slider {
    height: 100vh !important;
  }
  .hero-slide-overlay {
    background: linear-gradient(
      to top,
      rgba(15, 23, 42, 0.95),
      rgba(15, 23, 42, 0.5)
    ) !important;
  }
}

@media (max-width: 768px) {

  .navbar, .navbar.scrolled, .navbar.glass-panel {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .mv-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .mv-card p {
    line-height: 1.8;
  }
  .mv-icon {
    margin: 0 auto 20px auto;
  }
}

@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 768px) {

  .navbar, .navbar.scrolled, .navbar.glass-panel {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .footer-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 992px) {
  .auth-split-wrapper {
    flex-direction: column;
  }
  .auth-image-side {
    padding: 60px 20px;
    flex: none;
  }
  .auth-form-side {
    padding: 40px 20px;
  }
}

@media (max-width: 1024px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {

  .navbar, .navbar.scrolled, .navbar.glass-panel {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
  }
  .admin-sidebar.show {
    transform: translateX(0);
  }
  .admin-main {
    margin-left: 0;
  }
  .admin-topbar {
    padding: 0 15px;
  }
  .metrics-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {

  .navbar, .navbar.scrolled, .navbar.glass-panel {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  /* Premium Hamburger Menu Slide-Out */
  .mobile-menu-toggle {
    display: block !important;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--primary-color);
    cursor: pointer;
    z-index: 1001; /* Keep above overlay */
    position: relative;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    padding: 15px;
    margin-right: -15px;
  }

  .mobile-menu-toggle i,
  .mobile-menu-toggle span {
    pointer-events: none;
  }

  [data-theme="dark"] .mobile-menu-toggle {
    color: var(--text-dark);
  }

  .nav-links {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -100%; /* Hidden off-screen */
    width: 75%;
    max-width: 320px;
    height: 100vh;
    background: #ffffff;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
    padding: 90px 40px 40px 40px;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    align-items: flex-start;
  }

  [data-theme="dark"] .nav-links {
    background: #0f172a !important;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
  }

  .nav-links.active {
    right: 0; /* Slide in smoothly */
  }

  .nav-links a {
    font-size: 1.3rem;
    margin-bottom: 25px;
    width: 100%;
    display: block;
    font-weight: 600;
    opacity: 1;
    transform: none;
    transition: all 0.3s ease;
  }


  .nav-links .btn {
    margin-left: 0 !important;
    width: 100%;
    text-align: center;
    margin-top: 15px;
    padding: 15px;
  }

  .mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
  }
  .mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .nav-open .quick-action-pill {
    display: none !important;
  }

  /* Hero section text scaling */
  .hero-slide-content {
    padding: 25px;
    margin-left: 0;
    width: 90%;
    margin: 0 auto;
  }
  .hero-slide-content h1 {
    font-size: 2.2rem;
  }
  .hero-slide-content p {
    font-size: 1rem;
  }
}

@media (max-width: 992px) {
  .auth-split-wrapper {
    flex-direction: column !important;
  }

  .auth-image-side {
    flex: none !important;
    height: 250px; /* Fixed elegant height */
    padding: 20px;
    border-radius: 0 0 30px 30px; /* Beautiful curved bottom */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 10;
    position: relative;
  }

  .auth-image-content h2 {
    font-size: 1.8rem;
  }
  .auth-image-content p {
    font-size: 0.95rem;
  }

  .auth-form-side {
    padding: 40px 20px !important;
    align-items: center;
    justify-content: flex-start;
  }

  .auth-form-container {
    width: 100%;
    max-width: 500px;
    margin-top: 10px;
  }

  .auth-top-nav {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 20;
  }
}

@media (max-width: 768px) {

  .navbar, .navbar.scrolled, .navbar.glass-panel {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  #admin-menu-toggle {
    display: block;
  }
  .admin-sidebar {
    z-index: 100;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
  }
  .admin-search {
    display: none;
  }
}

@media (max-width: 768px) {

  .navbar, .navbar.scrolled, .navbar.glass-panel {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .desktop-only-link {
    display: none !important;
  }
}

@media (max-width: 768px) {

  .navbar, .navbar.scrolled, .navbar.glass-panel {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .hero-slide-content h1 {
    font-size: 2rem !important;
  }
  .hero-slide-content p {
    font-size: 1rem !important;
    margin-bottom: 20px !important;
  }
}

@media (max-width: 768px) {

  .navbar, .navbar.scrolled, .navbar.glass-panel {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .lead-modal-content {
    flex-direction: column;
    max-height: 90vh;
    overflow-y: auto;
  }
  .lead-modal-left {
    padding: 30px 20px;
    text-align: center;
  }
  .lead-modal-right {
    padding: 30px 20px;
  }
  .lead-modal-close {
    color: var(--text-light);
  }
}

@media (max-width: 768px) {

  .navbar, .navbar.scrolled, .navbar.glass-panel {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .courses-grid-detailed {
    grid-template-columns: 1fr;
  }
  .course-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }
  .course-actions {
    margin-left: 0;
  }
  .course-price {
    align-items: center;
  }
}

@media (max-width: 1024px) {
  .premium-course-row,
  .premium-course-row.reverse {
    flex-direction: column;
    margin-bottom: 80px;
  }
  .premium-course-img {
    width: 100%;
    height: 350px;
    border-radius: 20px 20px 0 0;
  }
  .z-layout-card,
  .premium-course-row.reverse .z-layout-card {
    width: 95%;
    margin-left: 0;
    margin-right: 0;
    margin-top: -50px;
    padding: 40px 30px;
    border-radius: 20px;
  }
  .z-layout-card h2 {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {

  .navbar, .navbar.scrolled, .navbar.glass-panel {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .premium-price-box {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }
  .premium-price-box .btn-large {
    justify-content: center;
  }
}

@media (max-width: 992px) {
  .contact-split-layout {
    flex-direction: column;
  }
  .premium-form .form-grid-2 {
    grid-template-columns: 1fr;
  }
  .contact-form-side {
    padding: 30px;
  }
}

/* === FLUID & PREMIUM MOBILE OPTIMIZATIONS === */
@media (max-width: 768px) {

  .navbar, .navbar.scrolled, .navbar.glass-panel {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  /* 1. Fluid Typography */
  body {
    font-size: 15px;
  }
  h1 {
    font-size: clamp(2rem, 8vw, 3rem) !important;
    line-height: 1.2;
  }
  h2 {
    font-size: clamp(1.5rem, 6vw, 2rem) !important;
  }

  /* 2. Hero Section */
  .hero-slider {
    height: 100dvh !important; /* Full modern mobile height */
    min-height: 0 !important;
  }
  .hero-slide-content {
    background: transparent !important;
    backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
    text-align: center;
    padding: 20px 15px !important;
    width: 100%;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
  }
  .hero-slide-content p {
    margin: 0 auto 25px auto !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 1.1rem !important;
    line-height: 1.5;
  }
  .hero-buttons {
    flex-direction: column;
    width: 100%;
    gap: 15px;
  }
  .hero-buttons .btn {
    width: 100%;
    border-radius: 50px !important; /* Pill shape */
    padding: 16px 20px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
  }

  /* 3. Horizontal Swipeable Grids (App-Like) */
  .features-grid,
  .courses-grid,
  .faculty-grid,
  .testimonials-grid,
  .courses-grid-detailed {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory;
    gap: 15px !important;
    padding-bottom: 25px !important;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    margin: 0 -15px !important; /* Edge to edge */
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  /* Hide scrollbar */
  .features-grid::-webkit-scrollbar,
  .courses-grid::-webkit-scrollbar,
  .faculty-grid::-webkit-scrollbar,
  .testimonials-grid::-webkit-scrollbar,
  .courses-grid-detailed::-webkit-scrollbar {
    display: none;
  }

  .feature-card,
  .course-card,
  .faculty-card,
  .testimonial-card,
  .premium-course-card {
    min-width: 85vw !important; /* Take up most of screen but show next card */
    max-width: 85vw !important;
    scroll-snap-align: center;
    margin: 0 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
  }

  [data-theme="dark"] .feature-card,
  [data-theme="dark"] .course-card,
  [data-theme="dark"] .faculty-card,
  [data-theme="dark"] .testimonial-card,
  [data-theme="dark"] .premium-course-card {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4) !important;
  }

  /* 4. Beautiful Navigation Drawer */
  .nav-links {
    width: 85% !important;
    max-width: none !important;
    padding: 100px 30px 40px 30px !important;
    border-radius: 30px 0 0 30px; /* Soft edges */
  }

  .nav-links a {
    font-size: 1.4rem !important;
    margin-bottom: 30px !important;
    color: var(--text-dark) !important;
  }

  [data-theme="dark"] .nav-links a {
    color: #ffffff !important;
  }

  /* Modern Bottom Nav Overrides */
  .mobile-bottom-nav {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(20px) !important;
    border-top: none !important;
    box-shadow: 0 -10px 20px rgba(0, 0, 0, 0.05) !important;
    padding-bottom: env(
      safe-area-inset-bottom,
      15px
    ) !important; /* iPhone Notch Safe */
    border-radius: 30px 30px 0 0 !important;
  }
  [data-theme="dark"] .mobile-bottom-nav {
    background: rgba(15, 23, 42, 0.9) !important;
    box-shadow: 0 -10px 20px rgba(0, 0, 0, 0.5) !important;
  }
  .bottom-nav-item {
    padding: 12px 0 !important;
  }
  .bottom-nav-item i {
    font-size: 1.4rem !important;
    margin-bottom: 4px !important;
  }
  .bottom-nav-item span {
    font-size: 0.75rem !important;
    font-weight: 500 !important;
  }

  /* 5. General Spacing */
  section {
    padding: 60px 0 !important;
  }
  .section-header {
    margin-bottom: 40px !important;
  }

  /* Fix premium course rows */
  .z-layout-card {
    border-radius: 20px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
  }
  [data-theme="dark"] .z-layout-card {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5) !important;
  }
}

/* Tiny Phones (iPhone SE) */
@media (max-width: 380px) {
  h1 {
    font-size: 2.2rem !important;
  }
  .feature-card,
  .course-card {
    min-width: 90vw !important;
    max-width: 90vw !important;
  }
}

/* === FLOATING QUICK ACTION PILL (MOBILE ONLY) === */
.mobile-quick-action-pill {
  display: none; /* Hidden on desktop */
}

@media (max-width: 768px) {

  .navbar, .navbar.scrolled, .navbar.glass-panel {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  

  .mobile-quick-action-pill {
    display: flex;
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    padding: 8px;
    border-radius: 50px;
    box-shadow:
      0 15px 35px rgba(0, 0, 0, 0.15),
      0 5px 15px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.6);
    width: 85%;
    max-width: 350px;
    transition: all 0.3s ease;
  }

  body.nav-open .mobile-quick-action-pill {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translate(-50%, 20px) !important;
  }

  [data-theme="dark"] .mobile-quick-action-pill {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
      0 15px 35px rgba(0, 0, 0, 0.5),
      0 5px 15px rgba(0, 0, 0, 0.3);
  }

  .pill-btn {
    flex: 1;
    text-align: center;
    padding: 12px 15px;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 40px;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
  }

  [data-theme="dark"] .pill-btn {
    color: var(--white);
  }

  .pill-btn.pill-primary {
    background: var(--secondary-color);
    color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
  }

  [data-theme="dark"] .pill-btn.pill-primary {
    color: #0f172a;
  }

  .pill-divider {
    width: 1px;
    height: 24px;
    background: rgba(0, 0, 0, 0.1);
    margin: 0 5px;
  }

  [data-theme="dark"] .pill-divider {
    background: rgba(255, 255, 255, 0.1);
  }
}
