/**
 * Mobile & touch enhancements (max-width: 639px unless noted).
 */
:root {
  --site-header-h: 7.5rem;
  --site-gutter: 1rem;
}

@supports (padding: env(safe-area-inset-top)) {
  :root {
    --site-safe-top: env(safe-area-inset-top, 0px);
    --site-safe-bottom: env(safe-area-inset-bottom, 0px);
  }
}

@media (max-width: 639px) {
  :root {
    --site-header-h: 6.625rem;
    --site-gutter: 1rem;
  }
}

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  overflow-x: clip;
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}

.site-main {
  padding-top: calc(var(--site-header-h) + var(--site-safe-top, 0px));
  min-height: calc(100vh - var(--site-header-h));
}

.site-header {
  padding-top: var(--site-safe-top, 0);
}

.site-header-top {
  min-height: 2.25rem;
  height: auto;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.site-header-top .max-w-7xl,
.site-header-main .max-w-7xl,
#mobile-nav .max-w-7xl {
  padding-left: var(--site-gutter);
  padding-right: var(--site-gutter);
}

.site-header-phone {
  max-width: 9.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-header-main {
  height: 3.75rem;
}

.site-header-lang {
  flex-shrink: 0;
  max-width: 50%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.site-header-lang::-webkit-scrollbar {
  display: none;
}

#mobile-nav.site-nav-open {
  display: block;
  max-height: min(70vh, calc(100dvh - var(--site-header-h) - var(--site-safe-top, 0px)));
  overflow-y: auto;
  overscroll-behavior: contain;
}

body.site-menu-open {
  overflow: hidden;
  touch-action: none;
}

.site-whatsapp-fab {
  bottom: calc(1rem + var(--site-safe-bottom, 0px));
  right: calc(1rem + env(safe-area-inset-right, 0px));
  padding: 0.75rem 1rem;
  max-width: calc(100vw - 2rem);
}

.site-whatsapp-fab .site-whatsapp-label {
  display: none;
}

@media (min-width: 380px) {
  .site-whatsapp-fab .site-whatsapp-label {
    display: inline;
  }
}

/* Hero overlap sections (home, services, routes, etc.) */
@media (max-width: 639px) {
  .bvp-hero-overlap {
    margin-top: calc(-1 * var(--site-header-h)) !important;
  }

  .bvp-hero-overlap.bvp-pt-130 {
    padding-top: calc(var(--site-header-h) + 1.25rem) !important;
  }

  .bvp-hero-overlap.bvp-pt-140 {
    padding-top: calc(var(--site-header-h) + 1.5rem) !important;
  }

  .bvp-hero-overlap.bvp-pt-150 {
    padding-top: calc(var(--site-header-h) + 1.75rem) !important;
  }

  .bvp-mobile-hero-title {
    font-size: 2rem !important;
    line-height: 1.15 !important;
    letter-spacing: -0.01em !important;
  }

  .bvp-hide-mobile {
    display: none !important;
  }

  /* Booking / form: full-width controls, comfortable tap targets */
  #home-booking-form select,
  #home-booking-form input[type="datetime-local"],
  #booking-quote-form select,
  #booking-quote-form input,
  #booking-quote-form textarea {
    font-size: 16px;
    min-height: 2.75rem;
  }

  #home-booking-form .lg\:col-span-12.flex,
  #booking-quote-form .grid {
    gap: 0.75rem;
  }

  /* Footer legal links */
  footer .flex-wrap {
    gap: 0.75rem 1.25rem;
  }

  .bvp-footer-collapse:not(.is-open) .bvp-footer-collapse-panel {
    display: none;
  }

  .bvp-footer-collapse.is-open .bvp-footer-collapse-icon {
    transform: rotate(180deg);
  }

  .bvp-footer-collapse.is-open .bvp-footer-collapse-panel {
    display: flex;
    padding-top: 0.25rem;
  }

  .bvp-home-booking-ctas {
    flex-direction: column !important;
    width: 100%;
  }

  .bvp-home-booking-ctas a,
  .bvp-home-booking-ctas button {
    width: 100%;
    justify-content: center;
  }

  /* Route list dual CTAs stack full width */
  .bvp-route-actions {
    width: 100%;
  }

  .bvp-route-actions a {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 639px) {
  .site-header-top .site-header-support-text {
    display: none;
  }
}

@media (min-width: 640px) {
  .site-whatsapp-fab {
    bottom: calc(1.5rem + var(--site-safe-bottom, 0px));
    right: calc(1.5rem + env(safe-area-inset-right, 0px));
  }
}

@media (min-width: 768px) {
  .bvp-footer-collapse .bvp-footer-collapse-panel {
    display: flex !important;
  }
}

/* Horizontal swipe rows (home destinations, rotalar list) */
@media (max-width: 767px) {
  .bvp-home-routes-scroll,
  .bvp-routes-page-scroll {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--site-gutter, 1rem);
    scrollbar-width: none;
    margin-inline: calc(-1 * var(--site-gutter, 1rem));
    padding-inline: var(--site-gutter, 1rem);
    padding-bottom: 0.35rem;
  }

  .bvp-home-routes-scroll::-webkit-scrollbar,
  .bvp-routes-page-scroll::-webkit-scrollbar {
    display: none;
  }

  .bvp-home-route-card {
    flex: 0 0 min(88vw, 21.5rem);
    max-width: min(88vw, 21.5rem);
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .bvp-routes-page-card {
    flex: 0 0 min(92vw, 22.5rem);
    max-width: min(92vw, 22.5rem);
    scroll-snap-align: start;
    scroll-snap-stop: always;
    align-self: stretch;
  }

  .bvp-routes-page-card > div {
    height: 100%;
  }

  .bvp-routes-page-card .font-headline-md {
    font-size: 1.125rem;
    line-height: 1.35;
  }

  .bvp-home-routes-wrap::after,
  .bvp-routes-page-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    right: calc(-1 * var(--site-gutter, 1rem));
    width: 4.5rem;
    height: 100%;
    background: linear-gradient(to left, #0f131c 12%, transparent);
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.35s ease;
  }

  [data-bvp-hscroll-wrap].is-hint-hidden::after,
  [data-bvp-hscroll-wrap].is-hint-hidden .bvp-hscroll-hint {
    opacity: 0;
    visibility: hidden;
  }

  .bvp-hscroll-hint {
    position: absolute;
    right: calc(var(--site-gutter, 1rem) * 0.35);
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.45rem 0.55rem 0.45rem 0.65rem;
    border-radius: 9999px;
    background: rgba(245, 158, 11, 0.92);
    color: #0f1419;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    transition: opacity 0.35s ease, visibility 0.35s ease;
    animation: bvp-hscroll-hint-nudge 1.6s ease-in-out infinite;
  }

  .bvp-hscroll-hint-icon {
    font-size: 1.35rem;
    line-height: 1;
  }

  @keyframes bvp-hscroll-hint-nudge {
    0%,
    100% {
      transform: translateY(-50%) translateX(0);
    }
    50% {
      transform: translateY(-50%) translateX(5px);
    }
  }
}

@media (min-width: 768px) {
  .bvp-home-routes-scroll {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .bvp-routes-page-scroll {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .bvp-routes-page-card {
    flex: unset;
    max-width: none;
    width: auto;
  }
}

@media (min-width: 1024px) {
  .bvp-home-routes-scroll {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Slightly reduce section vertical rhythm on phones */
@media (max-width: 639px) {
  .py-20 {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .py-24 {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .pb-24 {
    padding-bottom: 3.5rem;
  }
}
