/**
 * Home page — mobile landing (≤991px)
 * Loaded only on route: home
 */

@media (max-width: 991.98px) {
  .page-home {
    --bmga-brand: #d4483b;
    --bmga-brand-dark: #b83a2f;
    --bmga-ink: #1a1a2e;
    --bmga-muted: #5c6370;
    --bmga-sheet-radius: 24px;
    --bmga-sheet-shadow: 0 -12px 40px rgba(15, 23, 42, 0.12);
  }

  /* ---- Compact hero (search visible without long scroll) ---- */
  .page-home .hero-mobile-landing {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: clamp(320px, 52vh, 440px) !important;
    max-height: 460px;
    padding-top: calc(var(--bmga-sticky-top-height, 96px) + 0.75rem);
    padding-bottom: 2.75rem;
    overflow: hidden;
  }

  .page-home .hero-mobile-landing::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      180deg,
      rgba(8, 12, 22, 0.35) 0%,
      rgba(8, 12, 22, 0.15) 38%,
      rgba(8, 12, 22, 0.72) 100%
    );
    z-index: 1;
    pointer-events: none;
  }

  .page-home .hero-mobile-landing > .overlay {
    background: transparent !important;
    z-index: 0;
  }

  .page-home .hero-mobile-landing .parallax-wrap {
    opacity: 0.35;
    z-index: 0;
  }

  .page-home .hero-mobile-landing__inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 100%;
    padding: 0 1.25rem 0.5rem;
    text-align: left;
  }

  .page-home .hero-mobile-landing__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    margin-bottom: 0.75rem;
    backdrop-filter: blur(8px);
  }

  .page-home .hero-mobile-landing__eyebrow i {
    color: #ffc9c4;
    font-size: 0.65rem;
  }

  .page-home .hero-mobile-landing__title {
    font-size: clamp(1.65rem, 7vw, 2.15rem);
    font-weight: 800;
    line-height: 1.12;
    color: #fff;
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
  }

  .page-home .hero-mobile-landing__title em {
    font-style: normal;
    color: #ff8a7a;
  }

  .page-home .hero-mobile-landing__lead {
    font-size: 0.9375rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.82);
    margin: 0 0 1rem;
    max-width: 20rem;
  }

  .page-home .hero-mobile-landing__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
  }

  .page-home .hero-mobile-landing__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0 1.25rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9375rem;
    background: var(--bmga-brand);
    border: none;
    color: #fff !important;
    box-shadow: 0 8px 24px rgba(212, 72, 59, 0.45);
    text-decoration: none;
  }

  .page-home .hero-mobile-landing__cta:active {
    transform: scale(0.98);
  }

  .page-home .hero-mobile-landing__cta--ghost {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: none;
    min-width: 48px;
    padding: 0 0.85rem;
  }

  .page-home .hero-mobile-landing__scroll-hint {
    position: absolute;
    bottom: 0.65rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    pointer-events: none;
  }

  .page-home .hero-mobile-landing__scroll-hint i {
    animation: bmga-bounce 1.8s ease-in-out infinite;
  }

  @keyframes bmga-bounce {
    0%,
    100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(4px);
    }
  }

  /* ---- Search sheet overlaps hero (shared rule in travel-search-styles; reinforce on home) ---- */
  .page-home .landing-stack {
    margin-top: -3.25rem;
    position: relative;
    z-index: 5;
  }

  .page-home #bannerForm .container {
    padding-left: 0;
    padding-right: 0;
  }

  .page-home #bannerForm .search-card {
    border-radius: var(--bmga-sheet-radius) var(--bmga-sheet-radius) 0 0;
    box-shadow: var(--bmga-sheet-shadow);
    margin-top: 0 !important;
    padding: 1.35rem 1rem 1.5rem !important;
    border: 1px solid rgba(0, 0, 0, 0.04);
  }

  .page-home #bannerForm .search-card::before {
    content: "";
    display: block;
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: #e2e8f0;
    margin: 0 auto 1rem;
  }

  /* ---- Quick service chips ---- */
  .page-home .home-mobile-quick-services {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0 1rem 1rem;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .page-home .home-mobile-quick-services::-webkit-scrollbar {
    display: none;
  }

  .page-home .home-mobile-quick-services__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.25rem;
    border: none;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
    color: var(--bmga-ink);
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    min-width: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  }

  .page-home .home-mobile-quick-services__item i {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1rem;
    background: #fff5f4;
    color: var(--bmga-brand);
  }

  .page-home .home-mobile-quick-services__item.is-active {
    background: #fff5f4;
    box-shadow: 0 4px 16px rgba(212, 72, 59, 0.2);
    color: var(--bmga-brand);
  }

  .page-home .home-mobile-quick-services__item.is-active i {
    background: var(--bmga-brand);
    color: #fff;
  }

  .page-home .home-mobile-quick-services__item:active {
    transform: scale(0.96);
  }

  /* ---- Trust strip ---- */
  .page-home .home-mobile-trust {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0 1rem 1.25rem;
    margin: 0;
    list-style: none;
  }

  .page-home .home-mobile-trust li {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--bmga-muted);
    line-height: 1.25;
  }

  .page-home .home-mobile-trust li i {
    font-size: 1.1rem;
    color: var(--bmga-brand);
    margin-bottom: 0.15rem;
  }

  /* ---- Section headers (mobile) ---- */
  .page-home .home-mobile-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0 1rem;
    margin-bottom: 0.85rem;
  }

  .page-home .home-mobile-section-head h2 {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0;
    color: var(--bmga-ink);
    letter-spacing: -0.02em;
  }

  .page-home .home-mobile-section-head p {
    font-size: 0.8rem;
    color: var(--bmga-muted);
    margin: 0.2rem 0 0;
    line-height: 1.35;
  }

  .page-home .home-mobile-section-head__link {
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--bmga-brand);
    text-decoration: none;
    white-space: nowrap;
  }

  /* ---- Horizontal carousels ---- */
  .page-home .home-mobile-carousel {
    display: flex;
    gap: 0.85rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 1rem 1.25rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .page-home .home-mobile-carousel::-webkit-scrollbar {
    display: none;
  }

  .page-home .home-mobile-carousel > * {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .page-home .home-mobile-explore-wrap .explore-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 0.85rem;
    padding: 0 1rem 1.25rem;
    margin: 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .page-home .home-mobile-explore-wrap .explore-grid::-webkit-scrollbar {
    display: none;
  }

  .page-home .home-mobile-explore-wrap .explore-grid > [class*="col-"] {
    width: min(78vw, 280px);
    max-width: 280px;
    padding: 0;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .page-home .home-mobile-explore-wrap .location-card {
    height: 200px;
    border-radius: 18px;
  }

  .page-home .home-mobile-featured-wrap .featured-destinations-section {
    padding: 0;
    text-align: left;
  }

  .page-home .home-mobile-featured-wrap .featured-destinations-section > .container > h2,
  .page-home .home-mobile-featured-wrap .featured-destinations-section > .container > p {
    display: none;
  }

  .page-home .home-mobile-featured-wrap .featured-destinations-section > .container {
    padding: 0;
    max-width: 100%;
  }

  .page-home .home-mobile-featured-wrap .featured-destinations-section .row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 0.85rem;
    padding: 0 1rem 1.25rem;
    margin: 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .page-home .home-mobile-featured-wrap .featured-destinations-section .row::-webkit-scrollbar {
    display: none;
  }

  .page-home .home-mobile-featured-wrap .featured-destinations-section .row > [class*="col-"] {
    width: min(82vw, 300px);
    max-width: 300px;
    padding: 0;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .page-home .home-mobile-featured-wrap .fd-card {
    border-radius: 18px;
  }

  .page-home .home-mobile-featured-wrap .fd-card .card-img-container {
    height: 160px;
  }

  /* Explore block: hide desktop-centered intro on mobile home */
  .page-home .home-mobile-explore-wrap > .container > .text-center.mb-5 {
    display: none;
  }

  .page-home .home-mobile-explore-wrap > .container {
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
  }

  .page-home .home-mobile-explore-wrap .explore-grid {
    margin: 0;
  }

  /* Quote enquiry form — full width on mobile */
  .page-home .home-quote-section {
    width: 100%;
    max-width: 100%;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .page-home .quote-section,
  .page-home .quote-section__shell,
  .page-home .quote-section__card {
    width: 100%;
    max-width: 100%;
  }

  .page-home .quote-section__shell {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .page-home .home-mobile-explore-wrap,
  .page-home .home-mobile-featured-wrap {
    padding-top: 0.5rem;
  }
}

@media (min-width: 992px) {
  .page-home .ls-search {
    margin-top: -5.5rem;
    position: relative;
    z-index: 5;
  }

  .page-home .ls-search .search-card {
    width: 100%;
    max-width: none;
  }

  .page-home .home-quote-section .quote-section__shell,
  .page-home .home-quote-section .quote-section__card {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 575.98px) {
  .page-home .home-mobile-quick-services {
    grid-template-columns: repeat(5, 68px);
    justify-content: flex-start;
    padding-bottom: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .hero-mobile-landing__scroll-hint i {
    animation: none;
  }
}
