/* Mobile-first polish for Istanbul Highlights */
:root {
  color-scheme: dark;
  --mobile-nav-height: 68px;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--mobile-nav-height) + 12px);
}
body {
  min-width: 320px;
  overscroll-behavior-y: none;
}
button, a, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
}
button, a {
  touch-action: manipulation;
}
input, select, textarea {
  font-size: 16px;
}
[id] {
  scroll-margin-top: calc(var(--mobile-nav-height) + 14px);
}
.mobile-safe-nav {
  padding-top: env(safe-area-inset-top);
}
.mobile-safe-bottom {
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}
.mobile-menu-sheet {
  max-height: calc(100dvh - var(--mobile-nav-height) - env(safe-area-inset-top));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.mobile-modal-shell {
  padding-bottom: env(safe-area-inset-bottom);
}
.mobile-modal-panel {
  max-height: calc(100dvh - env(safe-area-inset-top));
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.scrollbar-none {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.scrollbar-none::-webkit-scrollbar {
  display: none;
}
#content-text,
.legal-copy {
  overflow-wrap: anywhere;
}
#content-text img,
.legal-copy img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}
#content-text iframe,
#content-text video {
  max-width: 100%;
}
@media (max-width: 639px) {
  :root { --mobile-nav-height: 64px; }
  input:not([type="hidden"]), select {
    min-height: 48px;
  }
  textarea {
    min-height: 96px;
  }
  .mobile-copy {
    text-align: left !important;
  }
  .mobile-hero {
    min-height: 100svh;
    height: auto !important;
    padding-top: calc(var(--mobile-nav-height) + env(safe-area-inset-top) + 1.25rem);
    padding-bottom: max(2.5rem, env(safe-area-inset-bottom));
  }
  .mobile-location-hero {
    min-height: 64svh;
    height: auto !important;
    padding-top: calc(var(--mobile-nav-height) + env(safe-area-inset-top) + 1rem);
    padding-bottom: 2rem;
  }
  .mobile-modal-shell {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  .mobile-modal-panel {
    width: 100%;
    border-radius: 1.5rem 1.5rem 0 0 !important;
    max-height: calc(100dvh - env(safe-area-inset-top) - .5rem);
  }
  .mobile-section {
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
  }
  .mobile-card-pad {
    padding: 1.25rem !important;
  }
  .mobile-touch {
    min-height: 44px;
  }
  #content-text {
    text-align: left !important;
    font-size: 15px;
    line-height: 1.78;
  }
  #content-text img {
    border-radius: 1rem;
    margin-left: 0;
    margin-right: 0;
  }
  .legal-copy {
    font-size: 15px;
    line-height: 1.75;
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 639px) {
  .home-hero-eyebrow {
    max-width: 23rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
  }
  .home-hero-title {
    font-size: clamp(2rem, 9.2vw, 2.65rem) !important;
    letter-spacing: -0.025em;
  }
  .home-hero-italic {
    font-size: .9em;
    line-height: 1.08;
  }
  .experience-modal-header h3 {
    font-size: 1.75rem !important;
    line-height: 1.08;
  }
  .experience-modal-header p {
    font-size: .92rem;
    line-height: 1.45;
    margin-top: .55rem;
  }
  .experience-selected {
    padding: .9rem 1rem !important;
  }
  .experience-selected > div:last-child {
    font-size: 1.2rem !important;
    line-height: 1.25;
  }
  .booking-card-media {
    height: 9.5rem !important;
  }
  .booking-card-body {
    padding: 1.2rem !important;
  }
  .booking-card-body h3 {
    margin-bottom: .5rem;
  }
  .booking-card-body p {
    line-height: 1.55;
  }
  .guide-content-card {
    border-radius: 1.5rem !important;
  }
  .audio-guide-card {
    padding: 1rem !important;
    gap: .85rem !important;
  }
  .audio-guide-copy {
    justify-content: flex-start;
  }
  .audio-guide-copy h4 {
    font-size: 1rem;
  }
  .audio-guide-copy p {
    font-size: .8rem;
  }
}

@media (max-width: 639px) {
  footer {
    padding-top: 2.25rem !important;
    padding-bottom: max(2.25rem, env(safe-area-inset-bottom)) !important;
  }
  footer a {
    color: rgb(156 163 175);
  }
  footer a:active {
    color: #C5A059;
  }
  footer p {
    line-height: 1.55;
  }
}

.trip-timeline {
  position: relative;
}
.trip-timeline-row {
  isolation: isolate;
}
.trip-timeline-thumb {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}
@media (max-width: 639px) {
  .trip-day-summary {
    position: sticky;
    top: calc(var(--mobile-nav-height) + env(safe-area-inset-top) + .5rem);
    z-index: 20;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(23, 28, 43, .94) !important;
  }
  .trip-timeline {
    padding-left: .15rem;
  }
  .trip-timeline-row {
    min-height: 6rem;
  }
  .trip-timeline-row + .trip-timeline-row::before {
    content: "";
    position: absolute;
    left: 2.45rem;
    top: -.8rem;
    width: 1px;
    height: .8rem;
    background: rgba(197, 160, 89, .32);
  }
  .trip-timeline-thumb {
    width: 4.25rem !important;
    height: 4.25rem !important;
  }
}

@media (max-width: 639px) {
  .trip-day-move-select {
    min-height: 36px !important;
    font-size: 12px !important;
    padding-right: 1.75rem;
  }
  #trip-place-suggestions button {
    min-height: 52px;
  }
  #trip-day-tabs {
    scroll-snap-type: x proximity;
  }
  #trip-day-tabs > button {
    scroll-snap-align: start;
  }
}
