/* ==========================================================================
   ANDALAN ENGINEERING DOOR - RESPONSIVE STYLESHEET
   Mobile-First & Breakpoint Adjustments (Mobile, Tablet, Desktop)
   ========================================================================== */

/* Universal Mobile Overflow Prevention */
html {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100% !important;
}

body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100% !important;
  position: relative !important;
}

*, *::before, *::after {
  box-sizing: border-box !important;
}

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

/* ==========================================================================
   TABLET & SMALL DESKTOP (Max 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero-grid {
    max-width: 100%;
  }

  .pintu-cards-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

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

  .procedure-steps-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

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

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

/* ==========================================================================
   TABLET & MOBILE (Max 768px)
   ========================================================================== */
@media (max-width: 768px) {
  /* Hide all tablet/mobile hidden elements */
  .hide-tablet {
    display: none !important;
  }

  .container {
    padding-left: 16px !important;
    padding-right: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Top Bar */
  .top-bar {
    padding: 6px 0;
  }
  .top-bar-left {
    display: none !important;
  }
  .top-bar .container {
    justify-content: flex-end !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* Navbar */
  .navbar {
    width: 100% !important;
    max-width: 100vw !important;
  }
  .navbar .container {
    height: 62px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .navbar-logo-img {
    height: 38px !important;
    max-width: 160px !important;
    width: auto !important;
  }
  .mobile-toggle {
    display: flex !important;
  }

  .nav-menu {
    position: fixed;
    top: 62px;
    left: 0;
    width: 100% !important;
    height: calc(100vh - 62px);
    background-color: var(--primary-900);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 20px;
    gap: 16px;
    border-top: 1px solid rgba(197, 160, 89, 0.25);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-smooth);
    z-index: 99;
    overflow-y: auto;
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-link {
    color: var(--text-on-dark);
    font-size: 1.05rem;
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  /* Hero Section */
  .hero-section {
    min-height: auto !important;
    padding: 0 !important;
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  .hero-parallax-bg {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    transform: none !important;
  }

  .hero-parallax-bg img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center 20% !important;
  }

  .hero-overlay-gradient {
    background:
      linear-gradient(to top, rgba(6,31,23,0.96) 0%, rgba(6,31,23,0.80) 50%, rgba(6,31,23,0.60) 100%) !important;
  }

  .hero-grid {
    padding: 85px 0 50px !important;
    width: 100% !important;
    max-width: 100% !important;
    align-items: flex-start !important;
    text-align: left !important;
  }

  .hero-badge-pill {
    max-width: 100% !important;
    white-space: normal !important;
    font-size: 0.7rem !important;
    letter-spacing: 0.8px !important;
    padding: 6px 12px !important;
    line-height: 1.4 !important;
    margin-bottom: 18px !important;
    word-break: break-word !important;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 2.75rem) !important;
    line-height: 1.15 !important;
    margin-bottom: 16px !important;
    word-break: break-word !important;
  }

  .hero-description {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    margin-bottom: 24px !important;
  }

  .hero-cta-group {
    flex-direction: column !important;
    width: 100% !important;
    gap: 12px !important;
    margin-bottom: 28px !important;
    align-items: stretch !important;
  }

  .hero-cta-group .btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 12px 18px !important;
    font-size: 0.92rem !important;
  }

  .hero-badges-row {
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
    align-items: stretch !important;
    padding-top: 20px !important;
  }

  .hero-trust-badge {
    width: 100% !important;
    justify-content: flex-start !important;
    padding: 8px 14px !important;
  }

  /* Core Values */
  .pintu-section {
    padding: 55px 0 !important;
    background-attachment: scroll !important;
  }

  .pintu-cards-container {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    width: 100% !important;
  }

  .pintu-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 26px 18px !important;
  }

  .pintu-card:nth-child(5) {
    grid-column: span 1 !important;
    max-width: 100% !important;
  }

  /* All Grids Collapse to 1fr on Mobile */
  .pillars-grid,
  .vm-grid,
  .products-grid,
  .procedure-steps-grid,
  .gallery-grid,
  .testimonials-grid,
  .contact-layout,
  .footer-top-grid,
  .blog-grid,
  .single-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    width: 100% !important;
  }

  /* Section Titles */
  .section-title {
    font-size: clamp(1.65rem, 6vw, 2.2rem) !important;
    line-height: 1.2 !important;
  }

  .section-subtitle {
    font-size: 0.92rem !important;
    line-height: 1.6 !important;
    margin-bottom: 28px !important;
  }

  /* TKDN Showcase */
  .tkdn-showcase {
    padding: 24px 16px !important;
    border-radius: var(--radius-md) !important;
  }

  .tkdn-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .tkdn-pill-item {
    padding: 12px 14px !important;
  }

  /* Contact Cards */
  .contact-info-card,
  .contact-form-box {
    padding: 24px 18px !important;
    border-radius: var(--radius-md) !important;
  }

  /* Partners Section */
  .partners-section {
    padding: 40px 0 !important;
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  /* Footer */
  .site-footer,
  .main-footer {
    padding: 50px 0 25px !important;
  }

  .footer-top-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  .footer-bottom {
    flex-direction: column !important;
    gap: 12px !important;
    text-align: center !important;
    align-items: center !important;
  }

  .footer-bottom-links {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 14px !important;
  }

  /* Floating WhatsApp */
  .floating-wa-btn,
  .floating-wa {
    bottom: 20px !important;
    right: 20px !important;
    width: 52px !important;
    height: 52px !important;
    padding: 0 !important;
  }
  .floating-wa-btn svg,
  .floating-wa svg {
    width: 26px !important;
    height: 26px !important;
  }
}

/* ==========================================================================
   EXTRA SMALL MOBILE (Max 480px)
   ========================================================================= */
@media (max-width: 480px) {
  .container {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .hero-title {
    font-size: 2rem !important;
  }

  .hero-badge-pill {
    font-size: 0.65rem !important;
    letter-spacing: 0.5px !important;
    padding: 5px 10px !important;
  }

  .btn {
    padding: 10px 16px !important;
    font-size: 0.88rem !important;
  }

  .pillar-card,
  .testimonial-card,
  .vm-card,
  .procedure-step-card,
  .pintu-card {
    padding: 20px 14px !important;
  }

  .single-post-article {
    padding: 18px 14px !important;
  }

  .product-thumb-holder {
    height: 260px !important;
  }
}
