/* =========================================================================
   Arctic Campers — Mobile UX overrides
   Loaded AFTER /dist/css/style.css so these rules win.
   ========================================================================= */

/* ============================================================
   GLOBAL MOBILE TYPOGRAPHY SCALE
   Desktop uses h1=5rem, h2=2.8125rem, .heading-xl=3.75rem etc.
   Way too large for phones. Apply a coherent compact scale.
   ============================================================ */
@media (max-width: 767.98px) {
  h1, .h1 {
    font-size: 1.75rem !important;       /* 28px */
    line-height: 1.2 !important;
    letter-spacing: -0.01em;
  }
  h2, .h2 {
    font-size: 1.4rem !important;        /* 22px */
    line-height: 1.25 !important;
    letter-spacing: -0.005em;
  }
  h3, .h3 {
    font-size: 1.15rem !important;       /* ~18px */
    line-height: 1.3 !important;
  }
  h4, .h4 {
    font-size: 1rem !important;          /* 16px */
    line-height: 1.35 !important;
  }
  h5, .h5 {
    font-size: 0.95rem !important;
    line-height: 1.4 !important;
  }

  /* Special heading classes */
  .heading-xl {
    font-size: 1.65rem !important;       /* hero overlay */
    line-height: 1.2 !important;
  }
  .heading-bold {
    font-weight: 700 !important;
  }
  .heading-subline {
    font-size: 0.95rem !important;
    line-height: 1.4 !important;
    margin-bottom: 0.75rem !important;
  }
  .camper-portfolio-name {
    font-size: 1.0625rem !important;     /* 17px — visible without being chunky */
    line-height: 1.3 !important;
    margin-bottom: 0.5rem !important;
  }

  /* Body copy: tighten the default 1rem slightly for visual density */
  body, p, li, .text-default {
    line-height: 1.5;
  }
  p {
    margin-bottom: 0.85rem;
  }

  /* Section spacing: 4rem (64px) desktop → 1.75rem (28px) mobile.
     Exception: the hero-stack (hero → benefits → green band → camper grid)
     was designed to be flush; keep zero margin on those four. */
  section {
    margin-top: 1.75rem !important;
    margin-bottom: 1.75rem !important;
  }
  section.teaser-hero,
  section.teaser-icons-text,
  section.stage-notice,
  section.camper-listing {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  /* Tap targets: buttons + links inside cards a touch bigger */
  .btn {
    min-height: 44px;
    padding: 0.625rem 1.25rem;
  }
}

/* ----- Booking widget: breathing room on mobile ----- */
@media (max-width: 991.98px) {
  .nordiac-app--mini .select-location {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* ----- Benefits row (.teaser-icons-text): vertical checklist on mobile ----- */
@media (max-width: 767.98px) {
  .container-teaser-icons-text .row > .col-8 {
    flex: 0 0 auto;
    width: 100%;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  .container-teaser-icons-text .col {
    border-left: none !important;
    justify-content: flex-start !important;
    padding: 0.5rem 0 !important;
  }
  .container-teaser-icons-text .col:last-child {
    border-right: none !important;
  }
  .container-teaser-icons-text span {
    font-size: 0.875rem !important;
    line-height: 1.35 !important;
    letter-spacing: 0.5px;
  }
  .container-teaser-icons-text .col span span {
    display: inline !important;
  }
  .container-teaser-icons-text .icon-checkmark {
    margin-right: 0.75rem !important;
  }
  .container-teaser-icons-text .col + .col {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 0.75rem !important;
    margin-top: 0.25rem;
  }
  .teaser-icons-text {
    margin-top: 0 !important;
  }
}

/* ----- Stage-notice rotator: keep rotation, just give it enough room on mobile -----
   Desktop has H4 absolute-positioned LEFT and 30px fixed height.
   On mobile we let the rotator breathe: ~92px tall, H4 stacks above text,
   slight top bias so text sits a touch higher in the green band. */
@media (max-width: 767.98px) {
  .stage-notice {
    height: auto !important;
    min-height: 64px;
    padding: 0.5rem 1rem !important;
    align-items: center !important;
  }
  #fadeList {
    height: 52px !important;
    padding-top: 0 !important;
  }
  #fadeList li {
    text-align: center !important;
  }
  #fadeList li h4 {
    position: static !important;                /* take it out of absolute */
    left: auto !important;
    display: block;
    margin: 0 0 0.15rem 0 !important;
    font-size: 0.8125rem !important;
    letter-spacing: 1.2px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
  }
  #fadeList li .stage-notice--text {
    font-size: 0.875rem !important;
    line-height: 1.35 !important;
    padding: 0 0.25rem;
  }
  #fadeList li .stage-notice--text a {
    color: #fff !important;
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
    font-weight: 600 !important;
  }
}

/* ----- Hide camper filter UI on mobile ----- */
@media (max-width: 767.98px) {
  .camper-filter {
    display: none !important;
  }
}

/* ----- FlexTravel card: desktop-only negative-margin overlap -----
   Template now applies .flex-travel-section class instead of inline style.
   Desktop: pull card up to overlap the camper row above (the original effect).
   Mobile/tablet: normal flow, with small top padding so it doesn't sit
   directly against the green band. */
@media (min-width: 992px) {
  .flex-travel-section {
    margin-top: -11rem !important;
    padding-top: 0 !important;
  }
}
@media (max-width: 991.98px) {
  .flex-travel-section {
    margin-top: 0 !important;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
  }
}
/* Belt-and-braces: kill the global section margin on .flex-travel-section
   on mobile so it sits close under the camper grid */
@media (max-width: 767.98px) {
  section.flex-travel-section {
    margin-top: 0 !important;
  }
}

/* ----- Video poster image + teaser-image: fix squeezed aspect & absolute headline on mobile ----- */
@media (max-width: 991.98px) {
  .video .video-poster-image-wrap {
    display: block !important;
    width: 100%;
  }
  .video .video-poster-image-wrap img.img-fluid {
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }
  .teaser-image {
    margin-top: 0 !important;
    padding-top: 1rem !important;
  }
  /* Desktop puts the "Built for Norway" headline absolutely positioned
     (top:250px) over the video. Move it back into normal flow on mobile so
     it doesn't float into thin air. */
  .container-teaser-image-headline {
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    margin: 1rem 0 0.5rem !important;
    text-align: center !important;
    color: #11385b !important;
  }
  /* Re-color the surrounding container so it reads on light bg */
  .container-teaser-image-gray .text-white,
  .container-teaser-image .text-white {
    color: #11385b !important;
  }
}

/* ----- Camper listing: tighten gap below green band on mobile -----
   .container-fluid.py-5 inside .camper-listing adds 48px top padding. Way
   too much right after the green band on small screens. */
@media (max-width: 767.98px) {
  .camper-listing {
    padding-top: 0 !important;
  }
  .camper-listing > .container-fluid.py-5 {
    padding-top: 1.25rem !important;
    padding-bottom: 0.25rem !important;
  }
  /* Subline (h4) sits tight under the H2 instead of with desktop's wide gap */
  .camper-listing h2.text-center {
    font-size: 1.4rem;
    line-height: 1.25;
    padding: 0 0.5rem;
  }
  .camper-listing h4.heading-subline {
    font-size: 0.95rem;
    line-height: 1.35;
    padding: 0 0.75rem;
    margin-bottom: 0.5rem !important;
  }
}

/* ----- One-Way offer banner: redesign for mobile -----
   Desktop uses 230px fixed-height card with image as background and an
   overlay-positioned content panel (582px wide). On mobile this collapses
   awkwardly. Convert to stacked layout: image on top (natural aspect),
   blue card with title/text/CTA stacked below. */
@media (max-width: 767.98px) {
  /* Section spacing */
  .one-way-offers-banner {
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
  }
  /* Card container: auto-height stacked layout */
  .one-way-offers-banner .teaser-start,
  .one-way-offers-banner .teaser-start.teaser-start-variant-2 {
    height: auto !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    background: #11385b !important;
  }
  /* Image: natural aspect, full width, no positioning */
  .one-way-offers-banner .teaser-start img,
  .one-way-offers-banner .teaser-start img.img-fluid {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    max-height: 200px !important;
    object-fit: cover !important;
    object-position: center;
    display: block !important;
  }
  /* Overlay content: turn into a normal stacked card below image */
  .one-way-offers-banner .teaser-start .overlay,
  .one-way-offers-banner .teaser-start .overlay.overlay-container,
  .one-way-offers-banner .teaser-start.teaser-start-variant-2 .overlay-container {
    position: static !important;
    width: 100% !important;
    padding: 1.25rem 1.25rem 1.5rem !important;
    background: #11385b !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .one-way-offers-banner .teaser-start .overlay h2 {
    font-size: 1.15rem !important;
    line-height: 1.3 !important;
    margin-bottom: 0.5rem !important;
    color: #fff !important;
  }
  .one-way-offers-banner .teaser-start .overlay p {
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
    margin-bottom: 1rem !important;
    color: #fff !important;
  }
  /* Hide the desktop <br> inside the description on mobile so the line wraps naturally */
  .one-way-offers-banner .teaser-start .overlay p br {
    display: none;
  }
  /* CTA: full-width on mobile for better tap target */
  .one-way-offers-banner .teaser-start .overlay a {
    display: block;
    text-align: center;
  }
  .one-way-offers-banner .teaser-start .overlay button {
    width: 100%;
    padding: 0.85rem 1rem !important;
  }
  /* "18 Offers available" note: reposition as a small badge top-right of the image */
  .one-way-offers-banner .teaser-start .note {
    position: absolute !important;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 5;
    background: #ff7a00 !important;       /* arctic-orange */
    color: #fff !important;
    padding: 0.4rem 0.65rem !important;
    border-radius: 6px !important;
    min-width: auto !important;
    width: auto !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    line-height: 1.1 !important;
  }
  .one-way-offers-banner .teaser-start {
    position: relative !important;        /* anchor the absolute .note */
  }
  .one-way-offers-banner .teaser-start .note .h2 {
    font-size: 1.1rem !important;
    line-height: 1 !important;
    margin: 0 !important;
    color: #fff !important;
  }
  .one-way-offers-banner .teaser-start .note span {
    font-size: 0.65rem !important;
    line-height: 1.1 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .one-way-offers-banner .teaser-start .note span br {
    display: none;
  }
}
