/* ==========================================================================
   Mobile experience — app-style bottom tab bar and phone-sized spacing.
   Loaded after the other stylesheets on every public page.
   ========================================================================== */

.mobile-tabbar { display: none; }

@media (max-width: 840px) {
  /* ---- Bottom tab bar ---------------------------------------------------- */
  .mobile-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.08);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .mobile-tabbar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 4px 2px;
    color: var(--color-ink-soft);
    font-size: 11.5px;
    font-weight: 600;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-tabbar__item:hover { text-decoration: none; color: var(--color-primary); }
  .mobile-tabbar__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 30px;
    border-radius: 999px;
    transition: background 0.15s ease;
  }
  .mobile-tabbar__item.is-active { color: var(--color-primary-dark); }
  .mobile-tabbar__item.is-active .mobile-tabbar__icon { background: var(--color-primary-tint); }

  /* Leave room so the last content and the footer aren't hidden. */
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }

  /* WhatsApp stays as one floating button above the tab bar; the call
     button moves into the page (hero, header bar, contact page). */
  .floating-contact { bottom: calc(80px + env(safe-area-inset-bottom)); right: 12px; }
  .floating-contact__btn--call { display: none; }
  .floating-contact__btn { width: 50px; height: 50px; }
}

@media (max-width: 640px) {
  /* ---- Header: keep the brand name visible -------------------------------- */
  .brand__text { display: inline-flex !important; }
  .brand__text strong, .brand__name { font-size: 15px; }
  .brand__tagline { display: none !important; }
  .brand__mark { width: 38px; height: 38px; }

  /* ---- Readable, compact type --------------------------------------------- */
  h1, .h1 { font-size: 1.85rem; line-height: 1.2; }
  .section-header { margin-bottom: var(--space-5); }
  .section-header .lede, .lede { font-size: 1rem; }
  main.container { padding-top: 20px !important; }

  /* ---- Homepage hero --------------------------------------------------------- */
  .home-hero { padding-block: var(--space-8) var(--space-8) !important; }
  .home-hero h1 { font-size: 2rem; margin: var(--space-3) 0; }
  .home-hero__pill { font-size: 12.5px; }
  .home-hero .lede { font-size: 0.98rem; }
  .home-hero__actions { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px !important; }
  .home-hero__actions > :first-child { grid-column: 1 / -1; }
  .home-hero__actions .btn { padding: 12px 14px; font-size: 15px; justify-content: center; }
  .home-hero__stats { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px !important; }
  .home-hero__stat { padding: 12px; }

  /* ---- Listing filters: two compact columns instead of a tall stack ------- */
  form.card .grid.grid-3 { grid-template-columns: 1fr 1fr; gap: 12px; }
  form.card .grid.grid-3 > :last-child { grid-column: 1 / -1; }
  form.card .grid.grid-3 .btn { width: 100%; justify-content: center; }
  form.card { padding: var(--space-4); }
  form.card label { font-size: 13px; }

  .country-notice { flex-wrap: wrap; gap: 8px; padding: 10px 12px; font-size: 14px; }
  .country-notice__actions { margin-left: 0; width: 100%; }
  .country-notice__actions select, .country-notice select { width: 100% !important; }

  /* ---- Cards ------------------------------------------------------------------ */
  .grid.grid-3, .grid.grid-4 { gap: 14px; }

  /* ---- Comfortable tap targets ------------------------------------------- */
  .btn { min-height: 44px; }
  input, select, textarea { font-size: 16px; } /* stops iOS zoom on focus */
}

@media (max-width: 640px) {
  /* Header row fits a 360px phone: smaller gaps and controls. */
  .site-header__row { gap: 8px; }
  .site-header__actions { gap: 4px; }
  .country-switcher__toggle { padding: 6px 8px; }
  .nav-toggle { padding: 6px 8px; }
}
@media (max-width: 380px) {
  .brand__text { display: none !important; }
}
