/* Shared responsive overrides for tablet and mobile devices */

html,
body {
  overflow-x: hidden;
}

img,
iframe {
  max-width: 100%;
}

@media (max-width: 1199px) {
  .wrap {
    width: min(94%, var(--max));
  }
}

/* Tablet portrait: 768x1024 and similar */
@media (min-width: 721px) and (max-width: 1024px) and (orientation: portrait) {
  .topbar-inner {
    min-height: auto;
    padding: 10px 0;
    gap: 10px;
    flex-wrap: nowrap;
  }

  .brand {
    flex: 1;
    min-width: 0;
    gap: 8px;
  }

  .brand-logo {
    width: clamp(96px, 14vw, 128px);
  }

  .brand strong {
    font-size: clamp(0.7rem, 1.2vw, 0.82rem);
    line-height: 1.15;
  }

  .brand-subtitle,
  .brand span {
    font-size: 0.74rem;
    line-height: 1.25;
  }

  .nav {
    gap: 12px;
  }

  .nav a {
    font-size: 0.86rem;
  }

  .topbar .btn,
  .topbar-cta {
    padding: 10px 14px;
    font-size: 0.67rem;
    white-space: nowrap;
  }

  .hero-copy {
    top: clamp(20px, 5vw, 42px);
    padding: clamp(16px, 2.4vw, 22px);
  }

  .hero-intro-photo img {
    height: clamp(420px, 56vw, 560px);
  }

  .fairplay-banner {
    height: clamp(340px, 48vw, 460px);
  }

  .cleaning-gallery img,
  .laundry-gallery img,
  .detail-media img {
    height: clamp(180px, 26vw, 300px);
  }

  .calendar-box iframe {
    height: 460px;
  }
}

/* Tablet landscape: iPad and similar */
@media (min-width: 820px) and (max-width: 1180px) and (orientation: landscape) {
  .topbar-inner {
    min-height: auto;
    padding: 10px 0;
    gap: 12px;
  }

  .brand-logo {
    width: clamp(120px, 13vw, 150px);
  }

  .nav {
    gap: 14px;
  }

  .nav a {
    font-size: 0.9rem;
  }

  .topbar .btn,
  .topbar-cta {
    padding: 10px 16px;
    font-size: 0.72rem;
  }

  .hero-copy {
    top: clamp(24px, 4vw, 48px);
    max-width: min(92%, 980px);
  }

  .hero-intro-photo img {
    height: clamp(360px, 42vw, 500px);
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .service-copy,
  .detail-card,
  .form-card,
  .calendar-card {
    padding: clamp(18px, 2.4vw, 26px);
  }
}

/* Mobile general */
@media (max-width: 720px) {
  .topbar .brand {
    align-items: center;
    gap: 8px;
  }

  .topbar .brand-text,
  .topbar .brand-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }

  .topbar .brand strong {
    font-size: 0.8875rem;
    letter-spacing: 0.03em;
    line-height: 1.1;
  }

  .topbar .brand .brand-subtitle,
  .topbar .brand .brand-meta span {
    display: block !important;
    font-size: 0.78rem;
    line-height: 1.2;
    opacity: 0.92;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero-intro-photo img {
    height: clamp(360px, 62vh, 560px);
  }

  .hero-copy {
    top: 14px;
  }

  .fairplay-banner {
    height: clamp(340px, 58vh, 540px);
  }

  .fairplay-content {
    width: min(94%, var(--max));
  }

  .service-actions .btn,
  .actions .btn,
  .btn-row .btn {
    min-height: 46px;
  }

  .modal {
    padding: 12px;
  }

  .modal-card {
    width: 100%;
    max-height: 94vh;
  }

  .calendar-box iframe {
    height: min(58vh, 420px);
  }

  .mobile-float-quote {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
  }
}

/* Small phones */
@media (max-width: 480px) {
  .wrap {
    width: min(95%, var(--max));
  }

  .hero-copy,
  .service-copy,
  .detail-card,
  .form-card,
  .calendar-card,
  .contact-box,
  .channel {
    padding: 16px;
  }

  .topbar-inner {
    gap: 6px;
  }

  .brand-logo {
    width: clamp(70px, 22vw, 90px);
  }

  .topbar .brand strong {
    font-size: 0.8175rem;
    letter-spacing: 0.02em;
  }

  .topbar .brand .brand-subtitle,
  .topbar .brand .brand-meta span {
    font-size: 0.73rem;
  }

  .hero h1,
  h1 {
    line-height: 1.05;
  }

  .service h3,
  .detail-card h2,
  .channel h3 {
    line-height: 1.12;
  }

  .mobile-float-quote {
    font-size: 0.7rem;
    padding: 11px 14px;
  }
}

/* Very short screens in landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-intro-photo img,
  .fairplay-banner {
    height: clamp(260px, 82vh, 380px);
  }

  .mobile-float-quote {
    bottom: 10px;
  }
}
