/* Wildlens professional mobile polish layer.
 * Loaded last so it refines responsive behavior without replacing desktop design.
 */
@media (max-width: 767px) {
  :root { --wl-mobile-gutter: 1rem; }
  html { overflow-x: hidden; scroll-padding-top: 5rem; }
  body { overflow-x: hidden; padding-bottom: calc(4.35rem + env(safe-area-inset-bottom)); }
  img, video, iframe { max-width: 100%; }
  button, a, select, input, textarea, summary { -webkit-tap-highlight-color: transparent; }
  button, .wl-button, a.wl-button { min-height: 44px; }

  /* Header and mobile menu */
  .wl-topbar__inner { min-height: 34px; padding: .42rem 0; gap: .6rem; }
  .wl-topbar__group { gap: .65rem; font-size: .61rem; }
  .wl-topbar__group:last-child { display: none; }
  .wl-header-shell { width: min(100% - 1.25rem, 1280px); }
  .wl-site-header__inner { min-height: 68px; gap: .65rem; }
  .wl-brand { gap: .48rem; }
  .wl-brand img, .wl-brand .custom-logo { max-height: 36px; max-width: 48px; }
  .wl-brand__copy strong { font-size: .9rem; letter-spacing: -.04em; }
  .wl-brand__copy small { display: block; max-width: 13rem; overflow: hidden; font-size: .38rem; text-overflow: ellipsis; white-space: nowrap; }
  .wl-header-actions { gap: .4rem; }
  .wl-icon-button, .wl-menu-toggle { width: 44px; height: 44px; border-radius: .8rem; }
  .wl-mobile-menu { max-height: calc(100dvh - 68px); overflow-y: auto; overscroll-behavior: contain; }
  .wl-mobile-menu__inner { width: min(100% - 1.5rem, 720px); padding: .75rem 0 calc(1rem + env(safe-area-inset-bottom)); }
  .wl-mobile-menu a, .wl-mobile-menu summary { min-height: 48px; padding: .8rem .35rem; font-size: .8rem; }
  .wl-mobile-menu details div { padding: .2rem 0 .65rem .75rem; }
  .wl-mobile-menu details div a { min-height: 44px; padding: .65rem .25rem; }
  .wl-mobile-menu__cta { min-height: 50px !important; margin-top: .8rem; }
  .wl-search-dialog { padding: 1rem; align-items: start; }
  .wl-search-dialog__panel { max-height: calc(100dvh - 2rem); overflow-y: auto; padding: 1.25rem; border-radius: 1.25rem; }
  .wl-search-dialog__top h2 { margin-bottom: 1rem; font-size: clamp(1.65rem, 8vw, 2.35rem); }
  .wl-search-dialog__form input, .wl-search-dialog__form button { min-height: 52px; }
  .wl-search-dialog__quick { gap: .4rem; }
  .wl-search-dialog__quick a { min-height: 40px; display: inline-flex; align-items: center; }

  /* Homepage hero, planner, rails and cards */
  .wl-homepage .wl-home-hero { min-height: 680px; }
  .wl-homepage .wl-home-hero__inner { min-height: 680px; padding: 5.5rem var(--wl-mobile-gutter) 2.5rem; align-items: end; }
  .wl-homepage .wl-home-hero__copy { max-width: 100%; }
  .wl-homepage .wl-home-hero__copy h1 { max-width: 9ch; font-size: clamp(2.65rem, 14vw, 4.1rem); line-height: .93; }
  .wl-homepage .wl-home-hero__lead { max-width: 35ch; font-size: .94rem; line-height: 1.6; }
  .wl-homepage .wl-home-hero__actions, .wl-homepage .wl-home-final-cta .flex { display: grid; grid-template-columns: 1fr; gap: .6rem; }
  .wl-homepage .wl-home-hero__actions a, .wl-homepage .wl-home-final-cta a { width: 100%; justify-content: center; }
  .wl-homepage .wl-home-hero__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin-top: 1.25rem; }
  .wl-homepage .wl-home-hero__facts div { padding-left: .7rem; }
  .wl-homepage .wl-home-hero__film { display: none; }
  .wl-homepage .wl-home-journey-nav { position: sticky; top: 0; z-index: 40; overflow-x: auto; justify-content: flex-start; gap: .35rem; padding: .45rem .75rem; scrollbar-width: none; }
  .wl-homepage .wl-home-journey-nav::-webkit-scrollbar { display: none; }
  .wl-homepage .wl-home-journey-nav a { flex: 0 0 auto; min-height: 40px; padding: .55rem .75rem; }
  .wl-homepage .wl-home-intro, .wl-homepage .wl-home-process, .wl-homepage .wl-home-journals { padding-block: 3rem; }
  .wl-homepage .wl-home-intro__grid { gap: 1.25rem; padding: 1.25rem; border-radius: 1.35rem; }
  .wl-homepage .wl-home-start-here { padding: 3rem 0; }
  .wl-homepage .wl-home-start-here__grid { display: grid; grid-template-columns: 1fr; gap: .7rem; }
  .wl-homepage .wl-home-start-card { min-height: 9.5rem; padding: 1.15rem; border-radius: 1.1rem; }
  .wl-homepage #safari-planner-form { grid-template-columns: 1fr !important; gap: .8rem !important; }
  .wl-homepage #safari-planner-form input, .wl-homepage #safari-planner-form select, .wl-homepage #safari-planner-form button { width: 100%; min-height: 50px; }
  .wl-homepage #style-filter-buttons { width: 100%; max-width: 100%; overflow-x: auto; justify-content: flex-start; padding: .35rem; border-radius: 1rem; scrollbar-width: none; }
  .wl-homepage #style-filter-buttons::-webkit-scrollbar { display: none; }
  .wl-homepage #style-filter-buttons button { flex: 0 0 auto; min-height: 42px; white-space: nowrap; }
  .wl-homepage [data-wl-rail] { display: flex !important; gap: .75rem !important; overflow-x: auto !important; overscroll-behavior-x: contain; padding: .25rem .05rem 1rem; scroll-padding-left: .05rem; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .wl-homepage [data-wl-rail]::-webkit-scrollbar { display: none; }
  .wl-homepage [data-wl-rail] > * { flex: 0 0 84vw; min-width: 0; scroll-snap-align: start; }
  .wl-homepage #destinations [data-wl-rail] > .group { height: 390px !important; flex-basis: 86vw; }
  .wl-homepage #tours [data-wl-rail] > .group, .wl-homepage .wl-home-tour-card { flex-basis: 82vw; }
  .wl-homepage .wl-home-journal-card { flex-basis: 82vw; }
  .wl-homepage .wl-home-tour-card, .wl-homepage .wl-home-journal-card, .wl-homepage .style-card { border-radius: 1.35rem !important; }
  .wl-homepage .wl-rail-tools { align-items: center; gap: .5rem; margin-bottom: .45rem; }
  .wl-homepage .wl-rail-button { width: 44px; height: 44px; }
  .wl-homepage .wl-home-faq-section summary { min-height: 56px; padding: .9rem 1rem; font-size: .9rem; }
  .wl-homepage .wl-home-faq-section details > div { padding: 0 1rem 1rem; }

  /* Destination explorer and rich guides */
  .wl-destinations-page .wl-container, .wl-destination-detail .wl-container { width: min(100% - 1.25rem, 1180px); }
  .wl-destinations-hero { min-height: 590px; }
  .wl-destinations-hero__inner { padding-top: 5.5rem; padding-bottom: 2.5rem; }
  .wl-destinations-hero h1, .wl-destination-detail__hero h1 { max-width: 10ch; font-size: clamp(2.65rem, 14vw, 4.4rem); line-height: .94; }
  .wl-destinations-hero__actions, .wl-destination-detail__actions { display: grid; grid-template-columns: 1fr; gap: .6rem; }
  .wl-destinations-hero__actions a, .wl-destination-detail__actions a { width: 100%; justify-content: center; }
  .wl-destination-grid, .wl-destinations-grid { grid-template-columns: 1fr !important; gap: .85rem; }
  .wl-destination-card, .wl-destinations-card { min-height: 340px; border-radius: 1.25rem; }
  .wl-destination-guide__hero, .wl-destination-detail__hero { min-height: 560px; }
  .wl-destination-detail__grid, .wl-destination-guide__grid { grid-template-columns: 1fr !important; gap: 1rem; }
  .wl-destination-detail__facts, .wl-destination-guide__facts { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: .6rem; }
  .wl-destination-detail__fact, .wl-destination-guide__fact { min-height: 86px; padding: .8rem; }
  .wl-compare-tray { right: .75rem; bottom: calc(4.35rem + env(safe-area-inset-bottom)); left: .75rem; border-radius: 1rem; }
  .wl-compare-tray__actions { gap: .45rem; }
  .wl-compare-tray button { min-height: 44px; }
  .wl-compare-modal { padding: .65rem; }
  .wl-compare-modal__panel { max-height: calc(100dvh - 1.3rem); border-radius: 1rem; }
  .wl-destinations-page .wl-filter-row { grid-template-columns: 1fr; }
  .wl-destinations-page .wl-filter-field input, .wl-destinations-page .wl-filter-field select { min-height: 50px; }

  /* Tour catalogue and single tour pages */
  .wl-catalog-page .wl-container { width: min(100% - 1.25rem, 1240px); }
  .wl-catalog-hero { min-height: 560px; }
  .wl-catalog-hero__inner { padding: 5.5rem 0 2.5rem; }
  .wl-catalog-hero h1 { max-width: 10ch; font-size: clamp(2.7rem, 14vw, 4.7rem); }
  .wl-catalog-hero p { font-size: .95rem; line-height: 1.6; }
  .wl-catalog-actions { gap: .6rem; }
  .wl-catalog-actions .wl-button { min-height: 50px; }
  .wl-catalog-proof { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-top: 2.25rem; }
  .wl-catalog-controls { padding: 3rem 0 1.5rem; }
  .wl-catalog-controls__head { gap: 1rem; }
  .wl-filter-panel { padding: .8rem; border-radius: 1rem; }
  .wl-filter-field input, .wl-filter-field select { min-height: 50px; font-size: .9rem; }
  .wl-filter-footer { margin-top: .7rem; }
  .wl-catalog-grid { gap: .85rem; }
  .wl-journey-card { border-radius: 1.1rem; }
  .wl-journey-card__media { aspect-ratio: 1.1; }
  .wl-journey-card__body { padding: 1rem; }
  .wl-journey-card__body h3 { font-size: 1.18rem; }
  .wl-journey-card__facts { gap: .4rem; }
  .wl-journey-card__facts span { padding: .55rem; }
  .wl-journey-card__footer { align-items: stretch; flex-direction: column; gap: .7rem; }
  .wl-journey-card__footer .wl-text-link { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: .7rem; background: var(--wl-forest, #12372d); color: #fff; }
  .wl-single-tour__hero { min-height: 540px; }
  .wl-single-tour__hero-content { padding-top: 5.5rem; }
  .wl-single-tour .wl-tour-facts { grid-template-columns: 1fr; gap: .6rem; }
  .wl-single-tour .wl-tour-fact-card--transport { grid-column: auto; }
  .wl-single-tour .wl-tour-fact-card { min-height: 84px; padding: .85rem; }
  .wl-single-tour .wl-tour-anchor-nav { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .wl-single-tour .wl-tour-anchor-nav::-webkit-scrollbar { display: none; }
  .wl-single-tour .wl-tour-anchor-nav a { flex: 0 0 auto; min-height: 44px; white-space: nowrap; }
  .wl-single-tour .wl-tour-enquiry__card { position: static; border-radius: 1.15rem; }
  .wl-tour-mobile-bar { padding: .45rem .65rem calc(.45rem + env(safe-area-inset-bottom)); }

  /* Footer, forms, and fixed conversion UI */
  .wl-footer-shell { width: min(100% - 1.25rem, 1280px); padding-top: 2.75rem; }
  .wl-footer-hero { border-radius: 1.25rem; }
  .wl-footer-hero__content { padding: 1.35rem; }
  .wl-footer-hero h3 { max-width: 14ch; font-size: clamp(1.9rem, 9vw, 3rem); }
  .wl-footer-hero__promises { padding: .8rem; border-top: 1px solid rgba(255,255,255,.1); border-left: 0; }
  .wl-footer-feature-grid { grid-template-columns: 1fr; }
  .wl-footer-dispatch, .wl-footer-planning-card { border-radius: 1.1rem; }
  .wl-footer-dispatch { grid-template-columns: 1fr; padding: 1.15rem; }
  .wl-footer-dispatch__form { grid-template-columns: 1fr; }
  .wl-footer-dispatch__form > button { width: 100%; min-height: 50px; }
  .wl-footer-directory { grid-template-columns: 1fr 1fr; gap: .7rem; padding: 2.5rem 0 1.5rem; }
  .wl-footer-brand, .wl-footer-links, .wl-footer-links--destinations, .wl-footer-contact { grid-column: span 2; }
  .wl-footer-card { padding: 1rem; border-radius: 1rem; }
  .wl-footer-base { grid-template-columns: 1fr; gap: .9rem; padding-bottom: 1rem; text-align: center; }
  .wl-footer-base nav { justify-content: center; gap: .65rem; }
  .wl-footer-base nav a, .wl-cookie-settings-trigger { min-height: 40px; display: inline-flex; align-items: center; }
  .wl-mobile-conversion-bar { right: .6rem; bottom: .6rem; left: .6rem; padding: .4rem; padding-bottom: calc(.4rem + env(safe-area-inset-bottom)); border-radius: .95rem; }
  .wl-mobile-conversion-bar a { min-height: 46px; font-size: .66rem; }
  .wl-cookie-banner { right: .6rem; bottom: calc(4.6rem + env(safe-area-inset-bottom)); left: .6rem; border-radius: 1rem; }
  .wl-cookie-banner__inner { padding: 1rem; }
  .wl-cookie-banner__actions { display: grid; grid-template-columns: 1fr; gap: .45rem; }
  .wl-cookie-button { width: 100%; min-height: 44px; }
}

@media (max-width: 390px) {
  .wl-brand__copy strong { font-size: .82rem; }
  .wl-brand__copy small { display: none; }
  .wl-icon-button, .wl-menu-toggle { width: 42px; height: 42px; }
  .wl-homepage .wl-home-hero__copy h1 { font-size: clamp(2.45rem, 13.5vw, 3.5rem); }
  .wl-catalog-proof { grid-template-columns: 1fr; }
  .wl-footer-directory { grid-template-columns: 1fr; }
  .wl-footer-brand, .wl-footer-links, .wl-footer-links--destinations, .wl-footer-contact { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .wl-homepage [data-wl-rail], .wl-mobile-menu, .wl-search-dialog__panel { scroll-behavior: auto !important; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media (max-width: 767px) {
  .wl-homepage input, .wl-homepage select, .wl-homepage textarea, .wl-catalog-page input, .wl-catalog-page select, .wl-catalog-page textarea, .wl-single-tour input, .wl-single-tour select, .wl-single-tour textarea, .wl-site-footer input, .wl-site-footer select, .wl-site-footer textarea { font-size: 16px !important; }
  .wl-single-tour .wl-mobile-conversion-bar { display: none !important; }
}

/* Final homepage-specific mobile pass for the actual flagship component classes. */
@media (max-width: 767px) {
  .wl-homepage .wl-flagship-hero { width: calc(100% - 12px); margin-inline: auto; }
  .wl-homepage .wl-flagship-hero__frame { min-height: min(760px, 88svh); border-radius: 1.25rem; }
  .wl-homepage .wl-flagship-hero__image { object-position: 66% center; }
  .wl-homepage .wl-flagship-hero__content { width: calc(100% - 1.1rem); min-height: min(760px, 88svh); padding: 5.8rem 0 1rem; }
  .wl-homepage .wl-flagship-hero__story { padding: 1.15rem 1rem 1rem; border-radius: 1.15rem; background: linear-gradient(145deg, rgba(4,25,21,.86), rgba(8,24,35,.72)); }
  .wl-homepage .wl-flagship-hero h1 { max-width: 9.2ch; font-size: clamp(2.85rem, 14.4vw, 4.35rem); }
  .wl-homepage .wl-flagship-hero__lead { max-width: 34ch; font-size: .92rem; }
  .wl-homepage .wl-flagship-hero__actions { gap: .55rem; }
  .wl-homepage .wl-flagship-hero__trust { margin-right: -.2rem; }
  .wl-homepage .wl-flagship-hero__reassurance { display: flex; flex-wrap: wrap; gap: .25rem .5rem; line-height: 1.45; }
  .wl-homepage .wl-home-journey-nav { top: 68px; border-bottom: 1px solid rgba(18,55,45,.12); background: rgba(251,250,247,.94); backdrop-filter: blur(16px); }
  .wl-homepage .wl-home-journey-nav .wl-home-shell { width: 100%; padding-inline: .65rem; }
  .wl-homepage .wl-home-journey-nav a { min-height: 42px; border-radius: 999px; }
  .wl-homepage .wl-home-promises__grid { grid-template-columns: 1fr !important; gap: .65rem; }
  .wl-homepage .wl-home-promise-card { min-height: 82px; padding: .95rem; border-radius: 1rem; }
  .wl-homepage .wl-home-process__grid { display: flex !important; overflow-x: auto; gap: .75rem; padding-bottom: .8rem; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .wl-homepage .wl-home-process__grid::-webkit-scrollbar { display: none; }
  .wl-homepage .wl-home-process-card { flex: 0 0 82vw; scroll-snap-align: start; border-radius: 1.15rem; }
  .wl-homepage .wl-home-planner-section .max-w-4xl { width: min(100% - 1.25rem, 960px); }
  .wl-homepage .wl-home-planner-section .bg-white { border-radius: 1.15rem; box-shadow: 0 18px 42px rgba(18,55,45,.1); }
  .wl-homepage .wl-home-section-heading h2, .wl-homepage .wl-home-process__intro h2 { max-width: 13ch; font-size: clamp(2rem, 9vw, 3rem); line-height: 1; }
  .wl-homepage .wl-home-start-card { min-height: 9.8rem; }
}

@media (max-width: 390px) {
  .wl-homepage .wl-flagship-hero__frame, .wl-homepage .wl-flagship-hero__content { min-height: 650px; }
  .wl-homepage .wl-flagship-hero h1 { font-size: clamp(2.65rem, 13.9vw, 3.65rem); }
  .wl-homepage .wl-home-journey-nav { top: 64px; }
}
