/* Airlines.xyz — shared mobile / responsive polish */

html, body {
  max-width: 100%;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Cap aggressive rem scaling on small phones so type doesn't blow out */
@media (max-width: 640px) {
  html {
    font-size: clamp(14px, 4.2vw, 16px);
  }
}

@media (max-width: 639px) {
  .page-main {
    padding: 0.4rem;
    padding-bottom: calc(0.4rem + env(safe-area-inset-bottom, 0px));
  }

  .site-header {
    padding: 0.85rem 0.85rem 0;
    gap: 0.5rem;
  }

  .burger {
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    display: grid;
    place-items: center;
  }

  .header-center .mark {
    font-size: 0.9rem;
  }

  .header-center .mark svg {
    width: 1.25rem;
    height: 1.25rem;
  }

  /* Hero: natural stack, no clipped content */
  .hero {
    height: auto !important;
    min-height: 0;
    min-height: calc(100svh - 0.8rem);
    overflow: visible;
    border-radius: 1.25rem;
  }

  .hero-title-wrap {
    padding: 0.65rem 0.85rem 0;
  }

  #hero-title {
    font-size: clamp(1.65rem, 9.5vw, 2.55rem) !important;
    white-space: normal !important;
    line-height: 0.92;
    word-break: break-word;
  }

  .hero-center {
    flex: 0 0 auto;
    align-items: stretch;
    padding: 0.65rem 0.85rem 0;
  }

  .hero-search-wrap,
  .hero-chat-wrap {
    transform: none !important;
    max-width: 100%;
    width: 100%;
    margin: 0;
  }

  .hero-bottom {
    margin-top: 0.85rem;
    padding: 0 0.85rem calc(1rem + env(safe-area-inset-bottom, 0px));
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .hero-tagline {
    font-size: clamp(1.2rem, 6.5vw, 1.55rem);
    max-width: none;
  }

  .hero-right {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    justify-content: stretch;
  }

  .collection-slider,
  .membership-card {
    width: 100%;
    max-width: none;
  }

  .membership-card .glass-card {
    min-height: 6.75rem;
  }

  /* Keep prompt chips usable on mobile (horizontal scroll instead of hidden) */
  .ai-prompts {
    display: flex !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.45rem;
    padding-bottom: 0.15rem;
    scrollbar-width: none;
  }

  .ai-prompts::-webkit-scrollbar {
    display: none;
  }

  .ai-prompts > span {
    flex-shrink: 0;
    opacity: 0.7;
    font-size: 0.7rem;
    align-self: center;
  }

  .ai-chip {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .ai-fields {
    grid-template-columns: 1fr !important;
  }

  .ai-swap {
    display: none !important;
  }

  .ai-submit {
    min-height: 2.85rem;
  }

  /* Trust pin: less aggressive height on phones */
  .trust-scroll {
    height: calc(var(--trust-count, 3) * 85svh);
  }

  .trust-scroll .trust {
    padding: 1.75rem 1rem 2.75rem;
    min-height: calc(100svh - 0.8rem);
    border-radius: 1.25rem;
  }

  #trust-title {
    font-size: clamp(1.75rem, 8.5vw, 2.4rem) !important;
    margin-top: 1.25rem;
  }

  .ghost-row {
    gap: 0.25rem;
  }

  .coach-wrap {
    width: 9.5rem;
    margin: 1.1rem auto 0;
  }

  .trust-top {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .percent-badge,
  .badge-card {
    max-width: 100%;
  }

  /* Sections */
  .programs,
  .facilities,
  .testimonials,
  .stats {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .programs {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .programs h2,
  .facilities h2,
  .stats h2,
  .testimonials h2,
  .footer-cta-title {
    font-size: clamp(1.85rem, 9vw, 2.45rem) !important;
    word-break: break-word;
  }

  .program-inner {
    gap: 0.75rem;
    padding: 1.15rem 0;
    align-items: flex-start;
  }

  .program-idx {
    width: 1.75rem;
    padding-top: 0.2rem;
  }

  .program-copy h3 {
    font-size: 1.15rem !important;
  }

  .program-arrow {
    width: 2.35rem;
    height: 2.35rem;
    margin-top: 0.1rem;
  }

  /* Court cards: stack */
  .facilities-grid {
    grid-template-columns: 1fr !important;
    gap: 1.75rem;
  }

  .court-cards {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .court-card,
  .court-card:nth-child(2) {
    margin-bottom: 0;
    aspect-ratio: 16 / 11;
    max-height: 16rem;
  }

  /* Stats */
  .stats {
    padding-top: 3.25rem !important;
    padding-bottom: 3.25rem !important;
    border-radius: 1.25rem;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 1.75rem 1rem !important;
    margin-top: 2.25rem !important;
  }

  .stat-value {
    font-size: clamp(1.75rem, 8vw, 2.35rem) !important;
  }

  /* Flight results */
  .flight-results {
    padding: 1.25rem 0.9rem !important;
    border-radius: 1.25rem;
  }

  .flight-results-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .flight-card {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
    padding: 1rem;
  }

  .flight-price {
    text-align: left !important;
  }

  .flight-book {
    width: 100%;
    min-height: 2.75rem;
  }

  .flight-why {
    font-size: 0.8rem;
  }

  /* Agent / chat page extras */
  .flow-track {
    grid-template-columns: 1fr !important;
  }

  .flow-step {
    min-height: 0;
  }

  .agent-demo-grid,
  .compare-split,
  .compare-grid {
    grid-template-columns: 1fr !important;
  }

  .agent-side-card,
  .agent-side-body {
    min-height: 14rem;
  }

  .agent-thread {
    max-height: 18rem;
  }

  .priority-rail {
    margin-left: -0.25rem;
    margin-right: -0.25rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }

  .topic-grid,
  .quote-grid {
    grid-template-columns: 1fr !important;
  }

  .topic-card {
    min-height: 0;
  }

  /* Hero live chat on chat page */
  .hero-chat-panel .chat-thread {
    max-height: min(36vh, 16rem) !important;
    min-height: 8.5rem !important;
  }

  .hero-chat-quick {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .hero-chat-quick::-webkit-scrollbar {
    display: none;
  }

  .hero-chat-quick .ai-chip {
    flex-shrink: 0;
  }

  .chat-composer {
    flex-wrap: wrap;
  }

  .chat-composer .ai-submit {
    width: 100%;
  }

  /* Footer */
  .site-footer {
    padding: 2.5rem 1rem calc(2.5rem + env(safe-area-inset-bottom, 0px)) !important;
    border-radius: 1.25rem;
  }

  .footer-cta {
    gap: 1.25rem;
  }

  .footer-cta-title {
    font-size: clamp(2rem, 11vw, 2.75rem) !important;
  }

  .footer-cols {
    grid-template-columns: 1fr 1fr !important;
    gap: 1.75rem 1rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    gap: 1rem;
  }

  /* Menu overlay type */
  .menu-nav a {
    font-size: clamp(1.85rem, 9vw, 2.35rem) !important;
  }

  .menu-inner {
    padding: 1.15rem !important;
  }

  /* Modal */
  .modal {
    padding: 0.5rem;
    padding-bottom: env(safe-area-inset-bottom, 0.5rem);
  }

  .modal-panel {
    max-height: 90svh;
    border-radius: 1.25rem;
  }

  /* Search checklist / results loading */
  .search-checklist {
    max-width: 100%;
  }
}

@media (max-width: 389px) {
  #hero-title {
    font-size: clamp(1.45rem, 9vw, 2.1rem) !important;
  }

  .footer-cols {
    grid-template-columns: 1fr !important;
  }

  .stats-grid {
    gap: 1.35rem 0.75rem !important;
  }

  .ai-badge {
    font-size: 0.55rem;
    padding: 0.28rem 0.45rem;
  }
}

/* Tablet polish */
@media (min-width: 640px) and (max-width: 900px) {
  .court-cards {
    gap: 0.85rem;
  }

  .facilities-grid {
    gap: 1.75rem;
  }

  .hero-right {
    flex-wrap: wrap;
  }
}
