/* ===================================================================
   MOBILE-FIRST RESPONSIVE REFINEMENTS & SAFARI/IOS POLISH
   Tested at 320px, 375px, 390px, 430px, 768px, 1024px, 1440px
   =================================================================== */

/* Safe area inset support for modern smartphones */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .mobile-bottom-bar {
    padding-bottom: calc(6px + env(safe-area-inset-bottom));
  }
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }
}

@media (min-width: 992px) {
  body {
    padding-bottom: 0 !important;
  }
}

/* Ensure ZERO horizontal scroll on any viewport */
html, body {
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
}

/* Responsive Headings */
@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem !important;
    line-height: 1.2 !important;
  }
  
  .section-title {
    font-size: 1.75rem !important;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .btn-group {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .hero-image-frame img {
    height: 340px;
  }

  .floating-title {
    font-size: 0.9rem;
  }
  
  .floating-sub {
    font-size: 0.78rem;
  }
  
  .hero-floating-card {
    padding: 12px 14px;
    bottom: 12px;
    left: 12px;
    right: 12px;
    gap: 10px;
  }

  .service-image-box {
    height: 200px;
  }

  .contact-info-card,
  .contact-form-card {
    padding: 24px 18px;
  }

  .modal-card {
    margin: 10px;
  }

  .modal-body {
    padding: 20px 16px;
  }
}

/* Strict Mobile Bottom Bar Sizing & Zero Overflow */
.mobile-bottom-bar {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: row !important;
}

.mobile-bottom-item {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  max-width: 25% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.mobile-bottom-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.7rem;
}

@media (min-width: 992px) {
  .mobile-bottom-bar {
    display: none !important;
  }
}

/* Small Screens (320px - 360px) */
@media (max-width: 360px) {
  .hero-title {
    font-size: 1.75rem !important;
  }

  .section {
    padding: 48px 0;
  }

  .hero-superbadge-text {
    font-size: 0.75rem;
  }

  .brand-logo img {
    height: 42px;
  }

  .header-call-btn {
    padding: 7px 12px;
    font-size: 0.8rem;
  }

  .mobile-bottom-item svg {
    width: 18px;
    height: 18px;
  }

  .mobile-bottom-item span {
    font-size: 0.65rem;
  }
}
