/* ============================================================
 * Roovio — Responsive styles
 *
 * Loaded after style.css (see functions.php). Holds every width-based
 * media query for the theme, organized PAGE BY PAGE. Desktop/base styles
 * live in style.css.
 *
 * Within each page, breakpoints are ordered largest → smallest so the
 * narrower query always wins at small viewports (mobile-last cascade).
 * Component breakpoint values (460/560/600/640/680/720/760/820/860/900/
 * 940/980/1024/1080) are preserved verbatim from the original design so the
 * layouts stay pixel-identical.
 *
 * Accessibility queries (prefers-reduced-motion) intentionally stay beside
 * their components in style.css and are not duplicated here.
 * ============================================================ */


/* ==========================================
   Global — Navigation
   ========================================== */
/* Tablet & mobile (≤1024px): inline links + CTA collapse into a rounded
   dropdown panel opened by the hamburger toggle. */
@media (max-width: 1024px) {
  .rv-nav__toggle {
    display: inline-flex;
  }

  .rv-nav__menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem 1.5rem;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 18px 60px rgba(145, 145, 145, 0.28);
  }

  .rv-nav__menu.is-open {
    display: flex;
  }

  .rv-nav__links {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.1rem;
  }

  .rv-nav__links a {
    font-size: 1rem;
  }

  .rv-nav__cta {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .rv-nav__word {
    font-size: 1.5rem;
  }

  .rv-nav__logo {
    width: 28px;
    height: 38px;
  }

  .rv-nav__inner {
    padding: 0.5rem 16px;
  }
}


/* ==========================================
   Global — Footer
   ========================================== */
@media (max-width: 900px) {
  /* Footer — link columns wrap full-width below the brand. */
  .rv-footer__links {
    width: 100%;
    gap: 40px 48px;
  }
}

@media (max-width: 640px) {
  /* Footer — stack everything on small screens. */
  .rv-footer__inner {
    padding: 48px 20px;
    gap: 36px;
  }

  .rv-footer__links {
    flex-direction: column;
    gap: 32px;
  }

  .rv-footer__brand,
  .rv-footer__subscribe,
  .rv-footer__form {
    width: 100%;
  }

  .rv-footer__bar {
    flex-direction: column-reverse;
    align-items: center;
    gap: 14px;
  }

  .rv-footer__legal {
    justify-content: center;
    text-align: center;
  }
}


/* ==========================================
   About
   ========================================== */
/* Values & team grids step down to two columns (≤1080px). */
@media (max-width: 1080px) {
  .ab-values__grid,
  .ab-team__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .rvw-container {
    padding: 0 20px 0 20px !important;
}

.rv-footer__inner {
    padding: 70px 20px 20px 20px;
}

}

/* Pillars & story fold to one column (≤900px). */
@media (max-width: 900px) {
  .ab-pillars__grid,
  .ab-story__grid {
    grid-template-columns: 1fr;
  }
}

/* "How it works" step flow stacks vertically (≤860px). */
@media (max-width: 860px) {
  .ab-how__flow {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .ab-how__flow::after {
    display: none;
  }

  .ab-flow-step {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
  }

  .ab-flow-step__node {
    min-height: 6.5rem;
  }

  .ab-flow-step__node::before,
  .ab-flow-step:nth-child(odd):not(:last-child) .ab-flow-step__bar-wrap::after,
  .ab-flow-step:nth-child(even):not(:last-child) .ab-flow-step__node::after,
  .ab-flow-step:last-child .ab-flow-step__bar-wrap::before {
    display: none;
  }
}

/* Values & team collapse to a single column (≤640px). */
@media (max-width: 640px) {
  .ab-values__grid,
  .ab-team__grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================
   Home (legacy landing)
   ========================================== */
/* Hero / how / why / creator collapse to a single column (≤980px). */
@media (max-width: 980px) {
  .rvw-hero__grid,
  .rvw-how__grid,
  .rvw-why__grid,
  .rvw-creator__grid {
    grid-template-columns: 1fr;
  }

  .rvw-hero-art,
  .rvw-how-art,
  .rvw-why-art {
    min-height: 20rem;
  }

  /* image stacks above steps, keep fixed height */
  .rvw-how-art {
    height: 20rem;
  }

  .rvw-3col {
    grid-template-columns: repeat(2, 1fr);
  }

  .rvw-creator-reels {
    position: static;
    width: auto;
    height: 24rem;
    margin: 2rem var(--gutter) 0;
  }

  .rvw-creator-spacer {
    display: none;
  }
}

/* Remaining two/three-column rows fold to one column (≤680px). */
@media (max-width: 680px) {
  .rvw-2col,
  .rvw-3col {
    grid-template-columns: 1fr;
  }
}


/* ==========================================
   Homepage
   ========================================== */
@media (max-width: 860px) {
  .rvw-hp-hiw__air {
    display: none;
  }

  .rvw-hp-frow {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .rvw-hp-frow--rev .rvw-hp-frow__media {
    order: 0;
  }

  .rvw-hp-itins__air {
    display: none;
  }

  .rvw-hp-itins__grid {
    grid-template-columns: 1fr;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
  }

  .rvw-hp-tml__grid {
    grid-template-columns: 1fr;
    max-width: 32rem;
  }

  .rvw-hp-cta__air {
    /* On tablet the container is ~full width; tuck the plane to the left edge
       (trail bleeding just off-screen) instead of the wide-screen calc. */
    left: -24px;
    width: clamp(200px, 34vw, 260px);
    top: -6px;
  }

  .rvw-hp-cta__photo {
    width: 100%;
  }

  .rvw-hp-cta__woman {
    max-width: 60%;
    right: -1rem;
    opacity: 0.9;
  }

  .rvw-hp-cta__body {
    max-width: 100%;
  }
}

@media (max-width: 560px) {
  .rvw-hp-hero__phone {
    height: 92%;
  }

  .rvw-hp-cta__woman {
    display: none;
  }

  .rvw-hp-cta__air {
    display: none;
  }

  .rvw-hp-cta__photo {
    opacity: 0.5;
  }
}


/* ==========================================
   Trip Listing
   ========================================== */
/* Featured "Hand-Picked" editorial mosaic (.rvw-fx-grid). Hero + two-card
   stack on desktop; hero goes full-width above a 2-up row on tablet, then a
   single column on mobile. */
@media (max-width: 980px) {
  .rvw-fx-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }

  .rvw-fx--lead {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 24rem;
  }

  .rvw-fx--sub {
    grid-column: auto;
    min-height: 17rem;
  }
}

@media (max-width: 620px) {
  .rvw-fx-grid {
    grid-template-columns: 1fr;
  }

  .rvw-fx--lead {
    min-height: 22rem;
  }

  .rvw-fx--sub {
    min-height: 16rem;
  }
}

/* Touch devices can't hover, so keep the supporting cards' dek visible. */
@media (hover: none) {
  .rvw-fx__reveal {
    grid-template-rows: 1fr;
  }

  .rvw-fx__revealin {
    opacity: 1;
    transform: none;
  }
}

/* Featured guide hero + featured trip-guide card stack (≤820px). */
@media (max-width: 820px) {
  .rvw-gf {
    grid-template-columns: 1fr;
  }

  .rvw-gf__media {
    min-height: 16rem;
  }

  .rvw-tg-f {
    grid-template-columns: 1fr;
  }

  .rvw-tg-f__media {
    min-height: 15rem;
  }
}

/* Listing head row stacks (≤680px). */
@media (max-width: 680px) {
  .rvw-tl-headrow {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* ==========================================
   Trip Detail
   ========================================== */
/* Itinerary body + aside collapse to one column, aside on top (≤940px). */
@media (max-width: 940px) {
  .rvw-igrid {
    grid-template-columns: 1fr;
  }

  .rvw-aside {
    position: static;
    order: -1;
  }
}

/* Activity segment: on tablet / mobile the info column is too narrow to hold the
   place name and the review pills on one line, so the fixed-width pills used to
   sit centered against a multi-line, shrunken title (overlap). Stack the pills
   BELOW the full-width title at every tablet + mobile width. */
@media (max-width: 1024px) {
  .rvw-seg2__toprow {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
  }

  /* Title takes the full width and wraps naturally (no longer flex-shrunk). */
  .rvw-seg2__title {
    flex: 0 0 auto;
    width: 100%;
  }

  /* Pills drop to their own line, left-aligned, wrapping if both don't fit. */
  .rvw-revpills {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* Day header + activity segment adapt on small screens. */
@media (max-width: 560px) {
  .rvw-dayhead {
    padding: 1.1rem 1.15rem;
  }

  .it-acts {
    padding: 0 1.15rem 0.4rem;
  }

  /* Segment image sits above its details. */
  .rvw-seg2__row {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .rvw-seg2__img {
    width: 100%;
    height: 12rem;
  }
}


/* ==========================================
   Trip Guide
   ========================================== */
/* Grid + table of contents collapse (≤980px). */
@media (max-width: 980px) {
  .rvw-gd-grid {
    grid-template-columns: 1fr;
  }

  .rvw-gd-toc {
    display: none;
  }

  /* "Best time to visit" strip: the desktop horizontal flex-wrap crams the label
     and items onto shared lines and breaks on narrow screens. Stack it — label on
     its own row, then one full-width item per row (matches the mobile design). */
  .rvw-besttime {
    flex-direction: column;
    align-items: stretch;
    gap: 1.1rem;
  }

  .rvw-besttime__l {
    margin-bottom: 0.1rem;
  }

  .rvw-bt {
    width: 100%;
  }
}

/* Collage hidden, cover reshapes (≤720px). */
@media (max-width: 720px) {
  .rvw-gd-collage {
    display: none;
  }

  .rvw-gd-cover {
    aspect-ratio: 16/10;
  }
}

/* Place rows + tips list stack (≤640px). */
@media (max-width: 640px) {
  .rvw-place {
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0.9rem;
  }

  .rvw-place__img {
    grid-column: 1/-1;
    aspect-ratio: 16/9;
    margin-top: 0.4rem;
  }

  .rvw-tips ul {
    grid-template-columns: 1fr;
  }
}


/* ==========================================
   Blog Listing
   ========================================== */
@media (max-width: 980px) {
  .rvw-blfeat {
    grid-template-columns: 1fr;
  }

  .rvw-blfeat__media {
    min-height: 16rem;
  }

  .rvw-blgrid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .rvw-blgrid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================
   Blog Detail
   ========================================== */
@media (max-width: 980px) {
  .rvw-bd-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .rvw-bd-rail {
    display: none;
  }

  .rvw-bd-related__grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================
   Reviews
   ========================================== */
/* Focus/detail split stacks (≤760px). */
@media (max-width: 760px) {
  .rvw-rr-focus {
    position: relative;
    grid-template-columns: 1fr;
    grid-template-rows: 13rem minmax(0, 1fr);
    height: auto;
    max-height: calc(100vh - 4rem);
    max-height: calc(100dvh - 4rem);
    width: 92vw;
  }

  .rvw-rr-focus__panel {
    position: static;
  }

  .rvw-rr-focus__scroll {
    padding-top: 1.2rem;
  }

  .rvw-rr-close {
    top: 0.75rem;
    right: 0.75rem;
  }

  .rvw-hp-search {
    margin-top: 100px;
}
}

/* Search row wraps, filter button fills (≤560px). */
@media (max-width: 560px) {
  .rvw-rr-searchrow {
    flex-wrap: wrap;
  }

  .rvw-rr-search {
    flex: 1 1 100%;
    min-width: 0;
  }

  .rvw-rr-filterbtn {
    flex: 0 0 100%;
    width: 100%;
    justify-content: center;
    padding: 0.85rem 1.3rem;
  }

  .rvw-hp-head {
    text-align: center;
}

.rvw-hp-cta-sec {
    padding: 50px 0;
}

.rv-footer__subscribe {
    margin-left: 0;
}

.rvw-hp-hero {
    padding-top: 150px;
}

}

/* Sort list single column (≤460px). */
@media (max-width: 460px) {
  .rvw-rr-sortlist {
    grid-template-columns: 1fr;
  }
}
