/**
 * Frontend — all-device responsive + touch
 * Phone / tablet / desktop / landscape / coarse pointer (touch)
 * Load after frontend-theme + frontend-layout (+ home marketing / booking when present).
 */
:root {
  --sh-touch-min: 44px;
  --sh-safe-top: env(safe-area-inset-top, 0px);
  --sh-safe-right: env(safe-area-inset-right, 0px);
  --sh-safe-bottom: env(safe-area-inset-bottom, 0px);
  --sh-safe-left: env(safe-area-inset-left, 0px);
}

/* —— Global shell —— */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

html,
body.sh-page {
  overflow-x: clip;
  max-width: 100%;
}

body.sh-page {
  padding-left: var(--sh-safe-left);
  padding-right: var(--sh-safe-right);
  overscroll-behavior-x: none;
  -webkit-tap-highlight-color: rgba(26, 95, 173, 0.12);
  touch-action: manipulation;
}

img,
video,
iframe,
svg {
  max-width: 100%;
  height: auto;
}

/* Prevent iOS zoom on focus (inputs < 16px zoom) */
.sh-page input,
.sh-page select,
.sh-page textarea {
  font-size: 16px;
}
@media (min-width: 768px) {
  .sh-page input,
  .sh-page select,
  .sh-page textarea {
    font-size: inherit;
  }
}

/* Containers: never overflow viewport */
.sh-page .container,
.sh-page .mx-auto {
  max-width: 100%;
  box-sizing: border-box;
}

/* —— Touch targets —— */
.sh-page a.sh-nav-link,
.sh-page .sh-cta-btn,
.sh-page .sh-header-menu-btn,
.sh-page .sh-topbar-social-link,
.sh-page button.sh-user-menu-trigger,
#mobileMenu a {
  min-height: var(--sh-touch-min);
  display: inline-flex;
  align-items: center;
}

.sh-header-menu-btn {
  min-width: var(--sh-touch-min);
  min-height: var(--sh-touch-min);
  justify-content: center;
  border-radius: 0.5rem;
}

.sh-mobile-menu__link {
  width: 100%;
  min-height: 48px !important;
}

#mobileMenu .sh-cta-btn {
  justify-content: center;
  min-height: 48px;
  margin-top: 0.35rem;
}

/* Hover only when device can hover (avoid sticky hover on touch) */
@media (hover: none) {
  .sh-page a:hover,
  .sh-page button:hover,
  .sh-nav-link:hover,
  .service-card:hover,
  .sh-home-dest-card:hover {
    text-decoration: none;
  }
  .sh-home-dest-card:hover {
    transform: none;
  }
}

@media (hover: hover) and (pointer: fine) {
  .sh-page a:hover { /* keep theme hovers */ }
}

/* Active press feedback for coarse pointers */
@media (pointer: coarse) {
  .sh-service-tabs .service-tab:active,
  .sh-page .service-card button:active,
  .sh-home-side-float__btn:active,
  .sh-cta-btn:active,
  .sh-booking-panel [class*="-btn-search"]:active,
  .sh-home-newsletter__btn:active {
    transform: scale(0.98);
    opacity: 0.92;
  }
}

/* —— Topbar —— */
@media (max-width: 639px) {
  .sh-topbar {
    padding-top: max(0.4rem, var(--sh-safe-top));
    font-size: 0.72rem;
  }
  .sh-topbar-left {
    gap: 0.35rem 0.65rem !important;
  }
  .sh-topbar-open {
    width: 100%;
  }
  .sh-topbar .sh-user-menu-name {
    max-width: 5.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .sh-topbar .sh-user-menu-dropdown {
    right: 0;
    left: auto;
    width: min(18rem, calc(100vw - 1.5rem - var(--sh-safe-left) - var(--sh-safe-right)));
  }
}

/* —— Header —— */
.sh-header-row {
  padding-left: max(0.75rem, var(--sh-safe-left));
  padding-right: max(0.75rem, var(--sh-safe-right));
}

@media (max-width: 1279px) {
  .sh-header-logo img {
    max-height: 2.75rem;
    width: auto;
  }
  .sh-header-logo .sh-tagline {
    display: none;
  }
}

@media (max-width: 479px) {
  .sh-header-logo img {
    max-height: 2.35rem;
  }
}

/* —— Hero —— */
@media (max-width: 639px) {
  .sh-home-hero-band {
    min-height: 0;
    padding-bottom: 1rem;
  }
  .sh-home-hero {
    padding: 1.35rem 0 0.35rem;
  }
  .sh-home-hero__title-navy {
    font-size: clamp(1.45rem, 7.5vw, 1.85rem);
  }
  .sh-home-hero__title-cta {
    font-size: clamp(1.55rem, 8vw, 2rem);
  }
  .sh-home-hero__sub {
    font-size: 0.92rem;
    margin-bottom: 1rem;
  }
  .sh-home-hero__trust {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem 0.5rem;
  }
  .sh-home-hero__trust li {
    font-size: 0.62rem;
  }
  .sh-home-hero__trust i {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.85rem;
  }
  .sh-home-hero__aside {
    padding: 1.1rem 1.05rem 1.15rem;
  }
  .sh-home-hero__aside-btn {
    min-height: var(--sh-touch-min);
  }
}

/* —— Booking widget —— */
.sh-service-tabs .service-tab {
  min-height: var(--sh-touch-min);
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

@media (max-width: 479px) {
  .sh-section--booking {
    padding-top: 0.85rem;
    padding-bottom: 1.1rem;
  }
  .sh-booking-shell {
    padding: 0 0.65rem;
  }
  .sh-booking-panel {
    padding: 0.75rem 0.7rem 0.95rem;
    border-radius: 0.85rem;
  }
  .sh-service-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
  }
  .sh-service-tabs .service-tab {
    font-size: 0.62rem;
    padding: 0.45rem 0.3rem !important;
    gap: 0.2rem;
    line-height: 1.15;
  }
  .sh-service-tabs .service-tab i {
    font-size: 0.85em;
  }
}

@media (min-width: 480px) and (max-width: 767px) {
  .sh-service-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Landscape phones: keep tabs usable */
@media (max-height: 480px) and (orientation: landscape) {
  .sh-home-hero-band {
    min-height: 0;
  }
  .sh-home-hero {
    padding-top: 0.75rem;
  }
  .sh-home-hero__trust {
    display: none;
  }
  .sh-service-tabs .service-tab {
    min-height: 2.35rem;
  }
}

.sh-booking-panel input,
.sh-booking-panel select,
.sh-booking-panel textarea,
.sh-booking-panel button:not(.service-tab) {
  min-height: 2.75rem;
}

.sh-booking-panel input,
.sh-booking-panel select,
.sh-booking-panel textarea {
  font-size: 16px !important;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.sh-booking-panel .search-form button[type="submit"],
.sh-booking-panel [class*="-btn-search"] {
  min-height: 48px !important;
  width: 100%;
  touch-action: manipulation;
}

/* Date / number native controls on iOS */
.sh-booking-panel input[type="date"],
.sh-booking-panel input[type="datetime-local"],
.sh-booking-panel input[type="number"],
.sh-booking-panel input[type="tel"] {
  min-height: 2.85rem;
}

/* —— Stats —— */
@media (max-width: 639px) {
  .sh-home-stats {
    padding: 0.85rem 0 1.1rem !important;
  }
  .sh-home-stats__value {
    font-size: 1.05rem;
  }
  .sh-home-stats__label {
    font-size: 0.65rem;
  }
  .sh-home-stats__icon {
    width: 2.1rem;
    height: 2.1rem;
    font-size: 0.85rem;
  }
}

/* —— Section heads / rows —— */
@media (max-width: 639px) {
  .sh-home-section-row {
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.75rem;
  }
  .sh-home-section-row h2 {
    font-size: 1.15rem;
  }
  .sh-home-view-all {
    min-height: 2.25rem;
    display: inline-flex;
    align-items: center;
  }
  .sh-section {
    padding-top: 1.35rem;
    padding-bottom: 1.35rem;
  }
  .sh-home #services .sh-section-head h2::before,
  .sh-home #services .sh-section-head h2::after {
    width: 1.25rem;
  }
  .sh-home #services .sh-section-head h2::before {
    right: calc(100% + 0.45rem);
  }
  .sh-home #services .sh-section-head h2::after {
    left: calc(100% + 0.45rem);
  }
}

/* —— Services cards —— */
.sh-home .service-card[data-service] button,
.sh-home .service-card[data-service] > button.w-full {
  min-height: var(--sh-touch-min) !important;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

@media (max-width: 639px) {
  .sh-home .service-card[data-service] {
    padding: 1.2rem 1rem 1.1rem !important;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .sh-home #services .sh-services-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* —— Destinations —— */
@media (max-width: 479px) {
  .sh-home-destinations__grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
  }
  .sh-home-dest-card {
    min-height: 11.5rem;
    border-radius: 1rem 1rem 0.65rem 0.65rem;
  }
  .sh-home-dest-card__label {
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    padding: 0.5rem 0.25rem 0.65rem;
  }
}

/* —— Offices —— */
@media (min-width: 640px) and (max-width: 1099px) {
  .sh-home-offices__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* —— Journey (touch scroll) —— */
.sh-home-journey__track {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  padding-bottom: 1.15rem;
  margin-inline: -0.25rem;
  padding-inline: 0.35rem;
}
.sh-home-journey__track::-webkit-scrollbar {
  height: 4px;
}
.sh-home-journey__track::-webkit-scrollbar-thumb {
  background: rgba(12, 35, 64, 0.25);
  border-radius: 999px;
}

@media (max-width: 639px) {
  .sh-home-journey__track {
    grid-auto-columns: minmax(7.25rem, 42vw);
  }
  .sh-home-journey__item {
    min-width: 7.25rem;
  }
  .sh-home-journey__title {
    font-size: 0.7rem;
  }
}

/* —— Reviews —— */
@media (max-width: 767px) {
  .sh-cr-featured {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
  .sh-cr-video-card {
    min-height: 12rem;
  }
  .sh-cr-google-card {
    padding: 1rem;
  }
  .sh-cr-form-fold > summary {
    min-height: var(--sh-touch-min);
    display: flex;
    align-items: center;
  }
}

/* —— Newsletter —— */
@media (max-width: 899px) {
  .sh-home-newsletter__banner::after {
    opacity: 0.45;
    width: min(50%, 10rem);
  }
  .sh-home-newsletter__form {
    flex-direction: column;
    align-items: stretch;
  }
  .sh-home-newsletter__form input[type="email"],
  .sh-home-newsletter__btn {
    width: 100%;
    min-height: 48px;
    font-size: 16px;
  }
  .sh-home-newsletter__copy h2 {
    font-size: 1rem;
  }
  .sh-home-newsletter {
    padding-left: max(0.75rem, var(--sh-safe-left));
    padding-right: max(0.75rem, var(--sh-safe-right));
  }
}

/* —— Side float: dock left on tiny screens; clear WA bubble —— */
.sh-home-side-float {
  z-index: 99990;
  padding-bottom: var(--sh-safe-bottom);
}

.sh-home-side-float__btn {
  min-height: var(--sh-touch-min);
  min-width: var(--sh-touch-min);
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

@media (max-width: 640px) {
  .sh-home-side-float {
    top: auto !important;
    bottom: calc(5.75rem + var(--sh-safe-bottom)) !important;
    right: 0 !important;
    left: auto !important;
    transform: none !important;
    gap: 0.4rem;
  }
  .sh-home-side-float__btn {
    padding: 0.7rem 0.75rem;
    border-radius: 0.55rem 0 0 0.55rem;
  }
}

/* Very small: icon column only, avoid covering content */
@media (max-width: 380px) {
  .sh-home-side-float {
    bottom: calc(5.25rem + var(--sh-safe-bottom)) !important;
  }
}

/* WhatsApp float — left dock; respect safe area */
.sh-wa-float {
  bottom: calc(1.25rem + var(--sh-safe-bottom)) !important;
  left: max(1rem, var(--sh-safe-left)) !important;
  min-height: 56px;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

@media (max-width: 640px) {
  .sh-wa-float {
    bottom: calc(0.85rem + var(--sh-safe-bottom)) !important;
    left: max(0.65rem, var(--sh-safe-left)) !important;
    padding-right: 14px;
    font-size: 13px;
  }
  .sh-wa-float__label {
    max-width: 5.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* —— Footer —— */
@media (max-width: 639px) {
  .sh-footer-mock-grid {
    grid-template-columns: 1fr !important;
    gap: 1.35rem;
  }
  .sh-footer-mock-offices {
    grid-template-columns: 1fr !important;
  }
  .sh-footer-mock-list a,
  .sh-footer-mock-contact-list a {
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
  }
  .sh-footer {
    padding-bottom: max(1.25rem, var(--sh-safe-bottom));
  }
}

/* —— Modals on small screens —— */
@media (max-width: 639px) {
  .sh-page .modal > div,
  .sh-page #loginModal > div,
  .sh-page #demoVideosModal > div {
    max-width: calc(100vw - 1.25rem) !important;
    margin-left: auto;
    margin-right: auto;
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* —— Tablet landscape / mid desktop —— */
@media (min-width: 768px) and (max-width: 1099px) {
  .sh-home-hero__grid {
    gap: 1rem;
  }
  .sh-booking-panel {
    padding: 1.1rem 1.15rem 1.2rem;
  }
}

/* —— Large touch tablets (iPad) —— */
@media (min-width: 768px) and (pointer: coarse) {
  .sh-service-tabs .service-tab {
    min-height: 48px;
  }
  .sh-nav-link {
    padding: 0.5rem 0.35rem;
  }
}

/* —— Print —— */
@media print {
  .sh-home-side-float,
  .sh-wa-float,
  .sh-topbar,
  .sh-header-menu-btn {
    display: none !important;
  }
}
