/* ==========================================================================
   Yugvex Tech Solutions - Full-Screen & Mobile Responsiveness System
   ========================================================================== */

/* Large Laptops & Desktops (1400px and below) */
@media (max-width: 1400px) {
  :root {
    --max-width: 1200px;
  }
}

/* Medium Laptops & Tablets (1250px and below) */
@media (max-width: 1250px) {
  .nav-menu {
    display: none !important;
  }

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

  .hero-grid {
    gap: 2.5rem;
  }
  
  .mega-menu {
    width: 700px;
  }

  .footer-grid {
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 2rem;
  }
}

/* Tablets (992px and below) */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-btn-group {
    justify-content: center;
  }

  .hero-trust-badges {
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero-visual {
    max-width: 600px;
    margin: 0 auto;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}

/* Mobile Devices (768px and below) */
@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }

  .section-padding {
    padding: 3.5rem 0;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .filter-bar-wrap {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
  }

  .filter-tags {
    justify-content: center;
  }

  .mockup-body {
    grid-template-columns: 1fr;
  }

  .floating-badge {
    position: relative;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    margin-top: 1rem;
    justify-content: center;
  }

  .services-grid, .products-grid, .templates-grid, .portal-kpi-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .glass-card, .product-card, .service-card, .feature-card {
    height: auto !important;
    min-height: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    word-break: break-word !alignment;
  }

  .product-tag, .badge-upcoming {
    display: inline-flex !important;
    align-items: center !important;
    max-width: 100% !important;
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    margin-bottom: 0.5rem !important;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .modal-content {
    padding: 1.5rem;
    margin: 1rem;
    max-height: 85vh;
  }
}

/* Small Phones & Micro Screens (480px and below) */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

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

  .logo-icon-box {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }

  .hero-content h1 {
    font-size: 1.85rem;
    line-height: 1.2;
  }

  .hero-description {
    font-size: 1rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .hero-btn-group, .product-card div[style*="display:flex"] {
    flex-direction: column !important;
    width: 100% !important;
    gap: 0.75rem !important;
  }

  .hero-btn-group .btn, .product-card .btn {
    width: 100% !important;
  }

  .mobile-nav-drawer {
    width: 100%;
    right: -100%;
  }

  .floating-whatsapp {
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
    bottom: 1.25rem;
    left: 1.25rem;
  }

  .stat-number {
    font-size: 2.25rem;
  }
}

/* Extra Micro Screens & Ultra-Small Devices (360px and below) */
@media (max-width: 360px) {
  .section-title {
    font-size: 1.5rem;
  }
  .btn-lg {
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
  }
}

/* Universal Mobile Safeguards & Page Stability */
html {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden !important;
  scroll-behavior: smooth;
}

body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden !important;
  position: relative;
  touch-action: manipulation;
  -webkit-overflow-scrolling: touch;
}

/* Ensure no child container causes horizontal scroll wobble or content overlap */
*, *::before, *::after {
  box-sizing: border-box;
}

img, video, iframe, svg, canvas {
  max-width: 100%;
  height: auto;
}

.glass-card, .product-card, .service-card, .hero-section, .section-padding {
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}

.product-modules-list, .filter-tags {
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
  gap: 0.5rem;
}

.badge-upcoming {
  max-width: 100%;
  box-sizing: border-box;
}

/* --- Mobile Quick-Jump Anchor Bar --- */
.mobile-quick-jump-bar {
  display: none;
}

@media (max-width: 768px) {
  .mobile-quick-jump-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    white-space: nowrap;
    width: 100vw;
    max-width: 100vw;
    padding: 0.6rem 1rem;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    position: relative;
    z-index: 995;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
  }

  .mobile-quick-jump-bar::-webkit-scrollbar {
    display: none;
  }

  .mobile-quick-jump-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
  }

  .mobile-quick-jump-pill:active,
  .mobile-quick-jump-pill:hover {
    background: var(--gradient-primary);
    color: #ffffff;
    border-color: transparent;
  }
}
