/* mobile-hotfixes-v6.css
   Purpose: Fix mobile-only layout issues WITHOUT touching header styling.
   Scope: Ready-to-Plan (home), Packages cards, Theme Parks media grid,
          Hotel gallery auto-scroll + hotel pages header cutoff (mobile only).
*/

/* ========== READY TO PLAN (Home) – mobile stability ========== */
@media (max-width: 900px){
  /* Ensure the whole Ready-to-Plan section can grow naturally */
  #ready-to-plan .section-inner,
  #ready-to-plan .readyplan-grid,
  #ready-to-plan .readyplan-card{
    min-width: 0 !important;
    overflow: visible !important;
  }

  /* Force 1-column stack and prevent strange overlap */
  #ready-to-plan .readyplan-grid{
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Make sure the left info card is not accidentally collapsed */
  #ready-to-plan .readyplan-card.readyplan-info{
    display: block !important;
  }

  /* Character strip: force visible on touch devices */
  #ready-to-plan .readyplan-character-stage,
  #ready-to-plan .character-rotator{
    display: grid !important;
    place-items: center !important;
    width: 100% !important;
  }
  #ready-to-plan .character-rotator{
    height: 220px !important;
    position: relative !important;
    z-index: 1 !important;
  }
  #ready-to-plan .character-rotator__img{
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    max-width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    position: relative !important;
    z-index: 1 !important;
  }

  /* Form: enforce single-column, full-width inputs */
  /* The markup is label + control pairs (not wrapped in .field),
     so a simple column flex-stack is the most robust on iOS/Android. */
  #ready-to-plan .readyplan-form-grid{
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }
  #ready-to-plan .readyplan-form-grid > *{
    min-width: 0 !important;
  }
  #ready-to-plan .readyplan-form-grid label{
    margin-top: 4px !important;
  }
  #ready-to-plan .readyplan-form-grid input,
  #ready-to-plan .readyplan-form-grid select,
  #ready-to-plan .readyplan-form-grid textarea{
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  #ready-to-plan select[multiple]{
    min-height: 120px !important;
    height: auto !important;
  }

  /* Parks multiselect chips: force wrap + prevent overflow on small screens */
  #ready-to-plan .parks-multiselect{
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }
  #ready-to-plan .park-check{
    width: 100% !important;
    border-radius: 16px !important;
  }
  /* IMPORTANT: Prevent checkboxes from being stretched full-width by global mobile rules */
  #ready-to-plan .park-check input[type="checkbox"],
  #ready-to-plan .park-check input[type="radio"]{
    width: auto !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
  }
  #ready-to-plan .park-check span{
    flex: 1 1 auto !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }
  #ready-to-plan .parks-reset{
    width: 100% !important;
    margin-left: 0 !important;
  }
}

/* ========== PACKAGES – card images missing on mobile ========== */
@media (max-width: 900px){
  /* Some mobile browsers fail to paint absolutely-positioned images when parent is transformed */
  .package-card--v3{
    transform: none !important;
  }
  .package-card--v3 .pc3-img{
    display: block !important;
    /* Override packages.css mobile crop rule — user wants full background images */
    inset: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    margin: 0 !important;
  }
  .package-card--v3 .pc3-img img{
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .package-card--v3 .pc3-bottom{ margin-top: 0 !important; }
}

/* ========== MOBILE STICKY HEADER – iOS Safari cut-off fix ========== */
/* On iOS, backdrop-filter + sticky can clip the header while scrolling.
   Do NOT change header design; only remove compositor effects on mobile. */
@media (max-width: 900px){
  @supports (-webkit-touch-callout: none){
    .site-header{
      -webkit-backdrop-filter: none !important;
      backdrop-filter: none !important;
      overflow: visible !important;
      transform: translateZ(0); /* stabilize paint */
    }
    .site-header .container,
    .site-header .container.nav{
      overflow: visible !important;
    }
  }
}

/* ========== THEME PARKS – media blocks escaping their box on mobile ========== */
@media (max-width: 900px){
  .park-box, .park-body, .park-media{
    min-width: 0 !important;
    overflow: hidden !important;
  }
  .park-media{
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
  .park-media > div{
    min-width: 0 !important;
  }
  /* Stabilize height using aspect-ratio so video/slider never spills out */
  .slider, .park-video-wrap{
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    overflow: hidden !important;
    border-radius: 16px !important;
  }
  .slider__img, .park-video{
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
  }
}

/* ========== HOTELS – Gallery: switch to slide-by-slide on mobile ========== */
/* Desktop keeps the continuous marquee. On mobile we use scroll-snap + JS auto-advance. */
@media (max-width: 900px){
  .gallery-wrap{
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }
  .gallery-track{
    animation: none !important;
    transform: none !important;
    will-change: auto !important;
    gap: 0 !important;
  }
  .gallery-track img{
    height: 260px !important;
    width: 100% !important;
    flex: 0 0 100% !important;
    scroll-snap-align: start;
  }
}

/* ========== HOTELS – mobile header cut off on hotel pages only ========== */
@media (max-width: 900px){
  body.page-dark .site-header{
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
  }
  body.page-dark{ overflow-x: hidden !important; }
}

/* ========== MOBILE – Compact & elegant white header (mobile ONLY) ==========
   Goal: keep header in ONE line and reduce height on mobile, without
   changing desktop/laptop headers. Also preserve the existing mobile menu
   behavior when body.nav-open is active.
*/
@media (max-width: 900px){
  /* Default (menu closed): single-row header */
  .site-header .container.nav{
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 8px !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    /* Prevent right-side clipping on small iPhones where other CSS sets
       width: calc(100% - 64px) and removes padding. */
    width: 100% !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
    box-sizing: border-box !important;
  }

  .site-header .nav-left{ flex: 0 0 auto !important; }
  .site-header .nav-right{ flex: 1 1 auto !important; min-width: 0 !important; justify-content: flex-end !important; gap: 8px !important; }

  /* Keep the Menu button visible; don't let it shrink off-canvas */
  .site-header .nav-toggle{ flex: 0 0 auto !important; }

  /* Scale logos down a bit to reduce header height */
  .site-header .nav-logo{
    height: 34px !important;
    max-height: 34px !important;
    width: auto !important;
  }
  .site-header .nav-secondary-logo-right{
    height: 28px !important;
    max-height: 28px !important;
    width: auto !important;
    margin: 0 2px !important;
  }

  /* Keep controls compact but still tappable */
  .site-header .btn.btn-primary{
    padding: 8px 14px !important;
    font-size: 14px !important;
    line-height: 1.05 !important;
    border-radius: 999px !important;
  }
  .site-header .nav-toggle{
    padding: 8px 14px !important;
    font-size: 14px !important;
    line-height: 1.05 !important;
    border-radius: 14px !important;
  }

  /* Mobile already hides nav-contact in css/mobile-fixes.css, but enforce */
  .site-header .nav-contact{ display: none !important; }

  /* When menu is open: allow wrapping so nav-links can drop below header row */
  body.nav-open .site-header .container.nav{
    flex-wrap: wrap !important;
    padding-bottom: 12px !important;
  }
}


/* === v5: Header background to match light-blue ↔ white center gradient (requested) === */
.site-header{
  background: linear-gradient(90deg,
    #8EC3EA 0%,
    #D7EDF9 28%,
    #FFFFFF 50%,
    #D7EDF9 72%,
    #8EC3EA 100%) !important;
  border-bottom: 1px solid rgba(0,0,0,0.06) !important;
}
/* Some pages force header white via home overrides; ensure our gradient wins */
.homepage-locked .site-header,
body.homepage-locked .site-header{
  background: linear-gradient(90deg,
    #8EC3EA 0%,
    #D7EDF9 28%,
    #FFFFFF 50%,
    #D7EDF9 72%,
    #8EC3EA 100%) !important;
}

/* Keep header inner row transparent to show gradient */
.site-header .container,
.site-header .nav-row,
.site-header .nav-wrap{
  background: transparent !important;
}

