/* =========================================================
   Responsive adjustments — النجار الباكستاني
   Mobile-first refinements layered on top of style.css
   ========================================================= */

/* ---------- Global mobile safety ---------- */
html, body { max-width: 100%; overflow-x: hidden; }
* { -webkit-tap-highlight-color: transparent; }

/* Prevent iOS auto-zoom on form focus: inputs need >=16px font */
@media (max-width: 991px) {
  .form-premium .form-control,
  .form-premium .form-select,
  .form-premium textarea { font-size: 16px; }
}

/* Respect safe areas on notch devices */
.floating-btns { padding-bottom: env(safe-area-inset-bottom); }
#cookie-consent { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }

@media (max-width: 1199px) {
  .hero-title { font-size: clamp(2.2rem, 5vw, 3.6rem); }
}

/* ---------- Tablet / large mobile (≤991px) ---------- */
@media (max-width: 991px) {
  .navbar-premium { padding: 14px 0; }
  .navbar-premium .navbar-collapse {
    background: rgba(28,24,21,0.97);
    margin-top: 14px; padding: 20px; border-radius: var(--radius-sm);
    max-height: 75vh; overflow-y: auto;
  }
  .navbar-premium .nav-link { padding: 12px 4px !important; font-size: 1.05rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .navbar-premium .nav-cta { text-align: center; justify-content: center; margin-top: 8px; }
  .navbar-toggler { padding: 8px 12px; min-width: 46px; min-height: 44px; }

  .hero-badge-float { display: none; }
  .owner-photo-wrap { margin-bottom: 30px; }
  .section-padding { padding: 70px 0; }

  .row.align-items-center.g-5 > div:first-child { margin-bottom: 10px; }

  .stats-section .stat-item { padding: 14px 10px; }

  .projects-swiper .swiper-button-next,
  .projects-swiper .swiper-button-prev { display: none; }
}

/* ---------- Mobile (≤767px) ---------- */
@media (max-width: 767px) {
  .hero { min-height: 100svh; text-align: center; }
  .hero-content { padding-top: 90px; }
  .hero-title { font-size: clamp(2rem, 8vw, 2.8rem); }
  .hero-subtitle { font-size: 1.05rem; margin-left: auto; margin-right: auto; }
  .hero-btns { justify-content: center; width: 100%; }
  .hero-btns a { flex: 1 1 auto; justify-content: center; min-width: 140px; }
  .hero-scroll-cue { display: none; }

  .section-title { font-size: 1.7rem; }
  .section-subtitle { font-size: 1rem; margin-left: auto; margin-right: auto; }
  .eyebrow { justify-content: center; display: flex; }

  .cta-section { padding: 40px 20px; border-radius: var(--radius-md); }
  .cta-section h2 { font-size: 1.6rem; }

  .filter-btns { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 10px; -webkit-overflow-scrolling: touch; }
  .filter-btn { flex: 0 0 auto; padding: 9px 18px; font-size: 0.9rem; }

  .floating-btns { bottom: 14px; left: 14px; gap: 10px; }
  .float-btn { width: 48px; height: 48px; font-size: 1.15rem; }

  .page-header { padding: 130px 0 60px; }
  .page-header h1 { font-size: 1.9rem; }

  .feature-row { padding: 16px 0; gap: 14px; }
  .feature-row .num { font-size: 1.3rem; min-width: 40px; }

  .process-step { padding: 20px 12px; }
  .process-step .step-circle { width: 70px; height: 70px; font-size: 1.4rem; }

  .owner-quote { font-size: 1.05rem; padding-right: 14px; }

  .contact-info-card { padding: 20px; flex-direction: row; text-align: right; }
  .contact-info-card .icon-wrap { width: 46px; height: 46px; font-size: 1.15rem; }

  .footer-premium { padding: 50px 0 0; text-align: center; }
  .footer-premium .social-icons { justify-content: center; }
  .footer-premium .col-lg-4, .footer-premium .col-lg-2 { margin-bottom: 24px; }

  .testimonials-swiper { padding-bottom: 10px; }
  .service-popup-close { top: 12px; left: 12px; }
  #service-popup > div { padding: 26px 22px; }

  .ba-handle::after { width: 40px; height: 40px; }

  .accordion-premium .accordion-button { padding: 16px 18px; font-size: 0.98rem; }
  .accordion-premium .accordion-body { padding: 0 18px 18px; font-size: 0.95rem; }
}

/* ---------- Small phones (≤575px) ---------- */
@media (max-width: 575px) {
  .premium-card { padding: 26px 20px; }
  .premium-card .icon-wrap { width: 58px; height: 58px; font-size: 1.5rem; margin-bottom: 18px; }
  .stat-number { font-size: 1.8rem; }
  .stat-label { font-size: 0.85rem; }
  .testimonial-card { padding: 22px; margin: 4px; }
  .hero-title { font-size: 1.9rem; }
  .btn-gold, .btn-outline-light-wood, .btn-dark-wood { padding: 13px 24px; font-size: 0.95rem; }
  .map-wrap iframe { height: 220px; }
  .error-code { font-size: 5rem; }
  #cookie-consent { flex-direction: column; text-align: center; padding: 16px; }
}

/* ---------- Landscape phones ---------- */
@media (max-width: 900px) and (orientation: landscape) {
  .hero { min-height: 100vh; }
  .hero-content { padding-top: 70px; }
  .page-header { padding: 110px 0 40px; }
}

/* ---------- Touch-friendly tap targets everywhere ---------- */
@media (hover: none) and (pointer: coarse) {
  .btn-gold, .btn-outline-light-wood, .btn-dark-wood, .filter-btn,
  .theme-toggle-btn, .float-btn, .navbar-toggler, .accordion-button {
    min-height: 44px;
  }
  .gallery-item .gallery-overlay { opacity: 1; background: linear-gradient(180deg, transparent 55%, rgba(28,24,21,0.92)); }
  .premium-card:hover, .gallery-item:hover img { transform: none; }
}
