/* ===================================
   MOBILE OVERHAUL — RAFAZ
   Clean responsive design for all pages
   Target: 360px–768px viewports
   =================================== */

/* ── BASE ── */
@media (max-width: 768px) {
  html { font-size: 15px; }
  body { overflow-x: hidden; }
  img { max-width: 100%; height: auto; }
  h1, h2, h3, h4, p { word-break: break-word; }
}

/* ══════════════════════════════════
   NAVIGATION — MOBILE
═══════════════════════════════════ */
@media (max-width: 768px) {
  /* Slim down the whole header */
  :root {
    --nav-strip-height: 28px;
    --nav-row-height:   58px;
    --header-height:    86px;
  }

  /* Info strip — tighter */
  .nav-strip { height: 28px; }
  .nav-strip-inner { font-size: 10.5px; padding: 0 1rem; gap: 0.75rem; }
  .nav-strip-left, .nav-strip-right { gap: 0.875rem; }
  .ns-hide-sm { display: none !important; }

  /* Main nav row */
  .nav-container {
    height: 58px;
    padding: 0 1rem;
  }

  /* Logo — tighter gap, smaller text */
  .logo {
    gap: 8px;
    font-size: 1.25rem;
  }
  .logo img { height: 32px !important; }
  .logo span { font-size: 1.125rem; letter-spacing: -0.01em; }

  /* Hamburger button */
  .mobile-menu-toggle {
    display: flex;
    width: 38px;
    height: 38px;
    padding: 0.375rem;
    flex-shrink: 0;
  }
  .mobile-menu-toggle span { width: 22px; height: 2.5px; }

  /* Mobile menu — full-height slide-in panel */
  .nav-menu {
    position: fixed;
    top: 86px;
    left: -100%;
    width: 82%;
    max-width: 320px;
    height: calc(100vh - 86px);
    background: white;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem 1.25rem 2rem;
    gap: 0;
    box-shadow: 4px 0 32px rgba(0,0,0,0.14);
    z-index: 999;
    overflow-y: auto;
    transition: left 0.28s cubic-bezier(.2,.7,.2,1);
    border-right: 1px solid #F1F5F9;
  }
  .nav-menu.active { left: 0; }
  .nav-menu li { width: 100%; }
  .nav-menu .nav-link {
    display: block;
    padding: 0.8125rem 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-bottom: 1px solid #F1F5F9;
    width: 100%;
    border-radius: 0;
    color: #0A1428;
  }
  .nav-menu .nav-link::after { display: none; }
  .nav-menu li:last-child { margin-top: 1rem; border-bottom: none; }
  .nav-menu .btn {
    width: 100%;
    text-align: center;
    padding: 0.8125rem 1rem;
    font-size: 0.9375rem;
    border-radius: 10px;
  }
}

/* ══════════════════════════════════
   HOMEPAGE — HERO
═══════════════════════════════════ */
@media (max-width: 768px) {
  .hp-hero {
    min-height: 75vh;
    background-position: 65% center;
  }
  .hp-hero-body {
    padding: 2.25rem 1.25rem 2rem;
    align-items: flex-start;
  }
  .hp-badge { margin-bottom: 1rem; font-size: 10px; }
  .hp-hero h1 {
    font-size: clamp(1.875rem, 7.5vw, 2.75rem);
    line-height: 1.1;
    margin-bottom: 0.875rem;
  }
  .hp-hero-sub {
    font-size: 0.9375rem;
    line-height: 1.65;
    margin-bottom: 1.75rem;
  }
  .hp-hero-btns {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
  }
  .hp-btn-primary,
  .hp-btn-outline {
    width: 100%;
    justify-content: center;
    padding: 0.9375rem 1.5rem;
    font-size: 0.9375rem;
  }

  /* Trust bar — 2 col */
  .hp-trustbar-inner {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 0.5rem;
    padding: 0.875rem 1.25rem;
  }
  .hp-trust-item { font-size: 11.5px; gap: 0.5rem; }
  .hp-trust-item svg { width: 16px; height: 16px; }
}

@media (max-width: 480px) {
  .hp-hero { min-height: 80vh; }
  .hp-hero h1 { font-size: 1.875rem; }
}

/* ── Marquee ── */
@media (max-width: 768px) {
  .hp-marquee-inner { padding: 0.75rem 1.25rem; gap: 1rem; }
  .hp-marquee-label { display: none; }
  .hp-marquee-track img { height: 22px; }
}

/* ══════════════════════════════════
   HOMEPAGE — SERVICES
═══════════════════════════════════ */
@media (max-width: 768px) {
  .hp-services { padding: 3.5rem 1.25rem; }
  .hp-section-hd { flex-direction: column; gap: 0.75rem; margin-bottom: 2rem; }
  .hp-section-hd h2 { font-size: clamp(1.625rem, 6vw, 2.25rem); }
  .hp-section-hd p { font-size: 0.9375rem; }
  .hp-view-all { display: none; }

  .hp-dept-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.875rem;
  }
  .hp-dept-body { padding: 0.875rem 1rem 1rem; }
  .hp-dept-body h3 { font-size: 1rem; margin-bottom: 0.25rem; }
  .hp-dept-body p { font-size: 12px; display: none; } /* hide desc on mobile for cleaner cards */
  .hp-dept-link { font-size: 12px; }
  .hp-dept-thumb { aspect-ratio: 1/1; }
}

@media (max-width: 380px) {
  .hp-dept-grid { grid-template-columns: 1fr; }
  .hp-dept-thumb { aspect-ratio: 16/9; }
  .hp-dept-body p { display: block; }
}

/* ══════════════════════════════════
   HOMEPAGE — EQUIPMENT
═══════════════════════════════════ */
@media (max-width: 768px) {
  .hp-equipment { padding: 3.5rem 1.25rem; }
  .hp-equip-hd { gap: 1rem; margin-bottom: 2rem; }
  .hp-equip-hd h2 { font-size: clamp(1.625rem, 6vw, 2.25rem); }
  .hp-equip-grid { grid-template-columns: 1fr; gap: 1rem; }
  .hp-equip-thumb { aspect-ratio: 16/9; }
  .hp-equip-body { padding: 1.25rem 1.375rem 1.375rem; }
  .hp-equip-body h3 { font-size: 1.25rem; }
  .hp-equip-cta {
    padding: 1.5rem;
    flex-direction: column;
    gap: 1.25rem;
  }
  .hp-equip-cta h4 { font-size: 1.25rem; }
  .hp-equip-cta-btns { flex-direction: column; }
  .hp-btn-white, .hp-btn-ghost { width: 100%; justify-content: center; }
}

/* ══════════════════════════════════
   HOMEPAGE — WHY RAFAZ
═══════════════════════════════════ */
@media (max-width: 768px) {
  .hp-why { padding: 3.5rem 1.25rem; }
  .hp-why-hd { flex-direction: column; align-items: flex-start; gap: 1.5rem; margin-bottom: 2rem; }
  .hp-why-hd h2 { font-size: clamp(1.625rem, 6vw, 2.25rem); }
  .hp-stats { grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
  .hp-stat-num { font-size: 1.75rem; }
  .hp-stat-label { font-size: 9.5px; }
  .hp-why-grid { grid-template-columns: 1fr; gap: 0.875rem; }
  .hp-why-card { padding: 1.375rem; }
}

/* ══════════════════════════════════
   HOMEPAGE — TESTIMONIALS
═══════════════════════════════════ */
@media (max-width: 768px) {
  .hp-testimonials { padding: 3.5rem 1.25rem; }
  .hp-testi-grid { grid-template-columns: 1fr; max-width: 100%; }
  .hp-testi-card { padding: 1.5rem; }
  .hp-testimonials-hd { margin-bottom: 2rem; }
  .hp-testimonials-hd h2 { font-size: clamp(1.625rem, 6vw, 2.25rem); }
}

/* ══════════════════════════════════
   HOMEPAGE — CTA
═══════════════════════════════════ */
@media (max-width: 768px) {
  .hp-cta { padding: 4rem 1.25rem; }
  .hp-cta-inner h2 { font-size: clamp(2rem, 7vw, 2.75rem); }
  .hp-cta-inner p { font-size: 0.9375rem; }
  .hp-cta-btns { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .hp-cta-btns a { text-align: center; justify-content: center; padding: 1rem 1.5rem; }
}

/* ══════════════════════════════════
   INNER PAGES — HERO
═══════════════════════════════════ */
@media (max-width: 768px) {
  .ip-hero-inner {
    grid-template-columns: 1fr;
    padding: 1.875rem 1.25rem 1.625rem;
    gap: 0;
  }
  .ip-hero-stat { display: none; }
  .ip-hero-text h1 { font-size: clamp(1.75rem, 6.5vw, 2.5rem); }
  .ip-hero-text p { font-size: 0.9375rem; }
  .ip-badge { font-size: 10px; }

  /* Dept pills */
  .ip-dept-nav { padding: 0.625rem 1.25rem; }
  .ip-dept-pill { font-size: 11.5px; padding: 0.35rem 0.75rem; }
}

/* ══════════════════════════════════
   INNER PAGES — STATS ROW
═══════════════════════════════════ */
@media (max-width: 768px) {
  .ip-stats-row { grid-template-columns: 1fr 1fr; }
  .ip-stat-cell { padding: 1.375rem 1rem; border-right: 1px solid rgba(255,255,255,0.06); }
  .ip-stat-cell:nth-child(2n) { border-right: none; }
  .ip-stat-cell-num { font-size: 2rem; }
  .ip-stat-cell-label { font-size: 9.5px; }
}

/* ══════════════════════════════════
   INNER PAGES — SECTIONS
═══════════════════════════════════ */
@media (max-width: 768px) {
  .ip-section { padding: 3rem 1.25rem; }
  .ip-section-hd { margin-bottom: 2rem; }
  .ip-section-hd h2 { font-size: clamp(1.625rem, 6vw, 2.25rem); }
  .ip-section-hd p { font-size: 0.9375rem; }

  .ip-story-grid { grid-template-columns: 1fr; gap: 2rem; }
  .ip-feature-grid { grid-template-columns: 1fr; gap: 0.875rem; }
  .ip-value-grid { grid-template-columns: 1fr; gap: 0.875rem; }
  .ip-value-card { padding: 1.375rem; }

  .ip-dept-section { padding: 2.5rem 1.25rem; }
  .ip-dept-row { grid-template-columns: 1fr; gap: 1.5rem; direction: ltr !important; }
  .ip-dept-img-wrap { aspect-ratio: 16/9; }
  .ip-dept-content h2 { font-size: clamp(1.5rem, 5.5vw, 2rem); }
  .ip-dept-content > p { font-size: 0.9375rem; }
  .ip-cap-pills { gap: 0.375rem; }
  .ip-cap-pill { font-size: 11px; padding: 0.25rem 0.625rem; }

  .ip-port-grid { grid-template-columns: 1fr 1fr; gap: 0.875rem; }
  .ip-port-body { padding: 0.875rem 1rem 1rem; }
  .ip-port-body h3 { font-size: 1rem; }
  .ip-port-body p { font-size: 12.5px; }

  .ip-contact-grid { grid-template-columns: 1fr; }
  .ip-faq-grid { grid-template-columns: 1fr; }
  .ip-testi-grid { grid-template-columns: 1fr; max-width: 100%; }

  /* Contact location card — stack */
  .ip-contact-card[style*="grid-template-columns"] {
    display: flex !important;
    flex-direction: column;
    gap: 1.5rem;
  }
  .ip-map-wrap { height: 220px; }
}

@media (max-width: 480px) {
  .ip-port-grid { grid-template-columns: 1fr; }
  .ip-section { padding: 2.5rem 1rem; }
}

/* ══════════════════════════════════
   INNER PAGES — QUOTE FORM
═══════════════════════════════════ */
@media (max-width: 768px) {
  .ip-form-card { padding: 1.375rem 1.125rem; }
  .ip-form-row { grid-template-columns: 1fr; gap: 0; }
  .ip-wa-card { padding: 1.75rem 1.25rem; }
  .ip-wa-card h2 { font-size: clamp(1.375rem, 5vw, 1.875rem); }
  .ip-wa-benefits { gap: 0.75rem; justify-content: flex-start; }
  .ip-wa-benefits span { font-size: 11.5px; }
}

/* ══════════════════════════════════
   INNER PAGES — CTA SECTION
═══════════════════════════════════ */
@media (max-width: 768px) {
  .ip-cta-section { padding: 3.5rem 1.25rem; }
  .ip-cta-inner h2 { font-size: clamp(1.75rem, 7vw, 2.5rem); }
  .ip-cta-inner p { font-size: 0.9375rem; }
  .ip-cta-btns { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .ip-cta-btns a { text-align: center; justify-content: center; }
}

/* ══════════════════════════════════
   FOOTER
═══════════════════════════════════ */
@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  .footer { padding: 3rem 1.25rem 2rem; }
}

/* ══════════════════════════════════
   WHATSAPP BUTTON
═══════════════════════════════════ */
@media (max-width: 640px) {
  .whatsapp-float-label { display: none; }
  .whatsapp-float {
    width: 52px;
    height: 52px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
  }
}

/* ══════════════════════════════════
   WHATSAPP MODAL
═══════════════════════════════════ */
@media (max-width: 480px) {
  .whatsapp-modal-content { border-radius: 20px 20px 0 0; }
  .whatsapp-modal.active { align-items: flex-end; padding: 0; }
  .whatsapp-modal-header { padding: 1.5rem 1.375rem 1.125rem; }
  .whatsapp-modal-buttons { padding: 0.5rem 1rem 0.875rem; }
  .whatsapp-choice-btn { padding: 0.9375rem 1rem; }
  .whatsapp-modal-note { padding: 0.75rem 1.375rem 1.375rem; }
}

/* Fix hero padding for slimmer mobile header */
@media (max-width: 768px) {
  .hp-hero,
  .ip-hero { padding-top: 86px; }
}
