/* Desktop - Mobile Hidden Elements */
.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1050;
}

.mobile-nav,
.mobile-nav-overlay {
  display: none;
}

/* ─── Tablets landscape / small laptops (≤ 1024px) ─────────── */
@media (max-width: 1024px) {
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .mega-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
  }

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

/* ─── Tablets portrait / large phones (≤ 768px) ────────────── */
@media (max-width: 768px) {
  :root {
    --space-16: 48px;
    --space-24: 64px;
  }

  .desktop-nav {
    display: none;
  }

  .header-actions .btn {
    display: none;
  }

  .hamburger {
    display: block;
  }

  /* Mobile Navigation Panel */
  .mobile-nav {
    display: block;
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: var(--bg-dark);
    z-index: 1040;
    padding: 80px var(--space-6) var(--space-6);
    transition: right 0.3s ease;
    overflow-y: auto;
    border-left: 1px solid var(--glass-border);
  }

  .mobile-nav.open {
    right: 0;
  }

  .mobile-nav-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 1030;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  body.nav-open {
    overflow: hidden;
  }

  .mobile-nav-links {
    list-style: none;
    padding: 0;
  }

  .mobile-nav-links > li {
    border-bottom: 1px solid var(--glass-border);
  }

  .mobile-nav-links > li > a {
    display: block;
    padding: var(--space-4) 0;
    font-size: 1.1rem;
    font-family: var(--font-heading);
    color: var(--text-primary);
  }

  .mobile-nav-links .dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .mobile-dropdown {
    display: none;
    padding-left: var(--space-4);
    padding-bottom: var(--space-4);
  }

  .mobile-nav-links li.open .mobile-dropdown {
    display: block;
  }

  .mobile-dropdown a {
    display: block;
    padding: var(--space-2) 0;
    color: var(--text-secondary);
  }

  .grid-cols-3,
  .grid-cols-2 {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }

  .site-header {
    padding: 0.85rem 0;
  }

  .site-header .container {
    padding: 0 16px;
  }

  .logo img {
    height: 2.25rem;
  }

  .mobile-nav {
    width: min(88vw, 360px);
    right: calc(-1 * min(88vw, 360px));
    padding-top: 88px;
  }

  .mobile-nav.open {
    right: 0;
  }

  section {
    overflow-x: hidden;
  }

  .hero-slider-section,
  .hero-section,
  .about-hero,
  .contact-hero,
  .service-hero,
  [class$="-hero"] {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .hero-slider-section h1,
  .hero-slider-section h2 {
    font-size: clamp(2rem, 8vw, 2.6rem) !important;
  }

  .hero-slider-section .container.grid-cols-2,
  .hero-slider-section .container.grid {
    gap: 24px !important;
  }

  .hero-slider-section .hero-image-wrap img {
    max-height: 320px !important;
    object-fit: cover;
  }

  body:not(.nav-open) section [style*="display: flex"],
  body:not(.nav-open) section [style*="display:flex"] {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  body:not(.nav-open) section [style*="justify-content: center"] {
    justify-content: flex-start !important;
  }

  body:not(.nav-open) section [style*="gap: 40px"],
  body:not(.nav-open) section [style*="gap:40px"] {
    gap: 24px !important;
  }

  body:not(.nav-open) section [style*="min-width: 300px"] {
    min-width: 0 !important;
  }
}

/* ─── Phones (≤ 480px) ──────────────────────────────────────── */
@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section-header h2 {
    font-size: 1.6rem;
  }
}
