@layer content-refinements {
  main
    :is(
      section,
      article,
      hr,
      blockquote,
      .intro-aside,
      .value,
      .contact,
      .day,
      .tour-facts span,
      .tour-route-ribbon,
      .journey-stops li,
      .journey-inclusions h3,
      .journey-inclusions li,
      .overview-glance,
      .overview-glance__facts,
      .overview-glance__facts li,
      .overview-practical p,
      .overview-fact,
      .overview-essentials,
      .overview-essentials__list > div,
      .overview-essentials-v2__secondary,
      .overview-essentials-v2__item,
      .overview-editorial-v4__block,
      .overview-editorial-v4__route,
      .overview-editorial-v4__facts,
      .journey-stops-row,
      .journey-heading--highlights,
      .journey-highlight-city,
      .tour-expect,
      .tour-decision-card__details,
      .booking-process,
      .booking-process li,
      .aq-aside-group,
      .aq-step,
      .faq-proof details,
      .all-tours-collection__head,
      .blog-grid,
      .blog-note,
      .blog-post-author,
      .related-grid,
      .fun-facts,
      .editorial-media figcaption,
      .journey-route-map figcaption,
      .legal-updated,
      .legal-resources,
      .legal-panels,
      .legal-terms-section,
      .legal-terms-contact,
      .legal-terms-brand,
      .legal-terms-important,
      .tour-destination-context,
      .home-final-actions,
      .journey-panel-booking-cta
    ) {
    border: 0 !important;
  }
  main hr {
    display: none !important;
  }
  main :is(.eyebrow, .journey-stops li, .overview-practical p)::before,
  main .eyebrow::after,
  main .journey-day::after,
  main .journey-day > b:first-child::before,
  main .journey-day > b:first-child::after {
    content: none !important;
    display: none !important;
  }
  :is(
    .site-contact-cta,
    .site-contact-cta__strip,
    .site-contact-cta__item,
    .site-contact-cta__action,
    .site-contact-cta__social-block,
    .prefooter-nav__destinations,
    .site-footer,
    .footer-meta,
    .footer-links,
    .footer-bottom,
    .footer-connect,
    .footer-contact
  ) {
    border: 0 !important;
  }
  .site-contact-cta {
    height: auto !important;
    min-height: 0 !important;
    padding: 48px 0 14px !important;
    margin: 0 !important;
    isolation: isolate !important;
  }
  .site-contact-cta::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 0 !important;
    background: rgba(0, 0, 0, 0.16) !important;
    pointer-events: none !important;
  }
  .site-contact-cta__inner,
  .site-contact-cta .prefooter-nav__destinations--reveal {
    position: relative !important;
    z-index: 1 !important;
  }
  .site-contact-cta__inner {
    transform: none !important;
  }
  .site-contact-cta__header {
    margin: 0 auto 20px !important;
  }
  .site-contact-cta__eyebrow {
    display: none !important;
  }
  .site-contact-cta__header h2 {
    font-size: clamp(30px, 3vw, 42px) !important;
    line-height: 1.08 !important;
    margin: 0 auto !important;
  }
  .site-contact-cta__subtitle {
    margin: 10px auto 0 !important;
    line-height: 1.35 !important;
  }
  .site-contact-cta__strip {
    gap: 8px 16px !important;
  }
  .site-contact-cta
    :is(.site-contact-cta__item, .site-contact-cta__action, .site-contact-cta__social-block) {
    min-height: 76px !important;
    padding: 10px 8px !important;
    gap: 0 !important;
    align-items: center !important;
    text-align: center !important;
  }
  .site-contact-cta__label {
    margin: 0 0 5px !important;
    line-height: 1.2 !important;
  }
  .site-contact-cta__value {
    line-height: 1.25 !important;
  }
  .site-contact-cta .prefooter-nav__destinations--reveal {
    display: flex !important;
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    width: min(1180px, calc(100% - 32px)) !important;
    margin: 22px auto 0 !important;
    padding: 0 !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px 16px !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
    z-index: 4 !important;
  }
  .site-contact-cta .prefooter-nav__destinations--reveal :is(a, span) {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    font-size: inherit !important;
    line-height: inherit !important;
    margin: 0 !important;
    padding: 3px 0 !important;
    min-height: 0 !important;
  }
  body.has-contact-reveal-destinations nav.prefooter-nav .prefooter-nav__destinations {
    display: none !important;
  }
  @media (max-width: 959px) {
    .site-contact-cta__header h2 {
      font-size: 30px !important;
      line-height: 1.06 !important;
    }
    .site-contact-cta__subtitle {
      font-size: 16px !important;
      line-height: 1.25 !important;
    }
    .site-contact-cta__strip {
      grid-template-columns: 1fr !important;
    }
    .site-contact-cta
      :is(.site-contact-cta__item, .site-contact-cta__action, .site-contact-cta__social-block) {
      min-height: 0 !important;
    }
    .site-contact-cta__whatsapp {
      width: auto !important;
    }
    .site-contact-cta .prefooter-nav__destinations--reveal > span {
      width: 100% !important;
      text-align: center !important;
    }
  }
  @media (min-width: 960px) {
    .site-contact-cta .prefooter-nav__destinations--reveal {
      position: absolute !important;
      left: 50% !important;
      transform: translateX(-50%) !important;
      margin: 0 !important;
    }
  }
  @media (max-width: 959px) {
    .site-contact-cta {
      padding: 18px 0 6px !important;
    }
    .site-contact-cta
      :is(.site-contact-cta__item, .site-contact-cta__action, .site-contact-cta__social-block) {
      padding: 2px 0 !important;
    }
    .site-contact-cta__whatsapp {
      min-height: 34px !important;
      padding: 5px 14px !important;
    }
    .site-contact-cta__socials a {
      width: 30px !important;
      height: 30px !important;
    }
    .site-contact-cta .prefooter-nav__destinations--reveal {
      margin-top: 8px !important;
      gap: 2px 10px !important;
    }
    nav.prefooter-nav .prefooter-nav__inner {
      padding-block: 4px !important;
    }
    .site-footer {
      padding: 6px 0 3px !important;
    }
    .site-footer .footer-grid {
      row-gap: 3px !important;
      gap: 3px !important;
    }
    .site-footer .footer-meta {
      gap: 1px !important;
      padding-top: 0 !important;
      margin-top: 0 !important;
    }
    .site-footer .footer-brand img {
      width: min(168px, 52vw) !important;
      max-height: 54px !important;
    }
    .site-footer .footer-payments--mobile {
      margin-top: 1px !important;
      margin-bottom: 0 !important;
    }
  }
  html
    body[data-page="tour"]
    main.tour-page
    .tour-destination-cards-section
    article.tour-destination-card {
    border: 0 !important;
    box-shadow: 0 4px 14px rgba(23, 58, 79, 0.14) !important;
  }
    html body section.site-contact-cta .site-contact-cta__subtitle,
    html body section.site-contact-cta .site-contact-cta__label {
      display: none !important;
    }
  @media (max-width: 959px) {
    .site-contact-cta {
      padding-top: 48px !important;
    }
    .site-contact-cta__header {
      margin-bottom: 20px !important;
    }
    .site-contact-cta__subtitle {
      margin-top: 12px !important;
    }
    .site-contact-cta__strip {
      gap: 16px !important;
    }
    .site-contact-cta__label {
      margin-bottom: 8px !important;
    }
  }
  @media (min-width: 960px) {
    .site-contact-cta {
      padding-top: calc(48px + 8.4vh + var(--contact-desktop-extra-padding, 0px)) !important;
      padding-bottom: calc(52px + 8.4vh + var(--contact-desktop-extra-padding, 0px)) !important;
    }
    .site-contact-cta .prefooter-nav__destinations--reveal {
      bottom: 8px !important;
    }
  }
@media (max-width: 959px) and (hover: none) {
  html body[data-page="tour"] main.tour-page--editorial > .tour-cover
  .tour-cover__actions--shared > a.button.button:is(:hover:where(html[data-hover-enabled="true"] *), :focus:where(:focus-visible, input, select, textarea, [contenteditable]), :active) {
    background-color: rgba(5, 18, 24, 0.2) !important;
    background-image: linear-gradient(145deg, rgba(8, 20, 26, 0.19), rgba(8, 20, 26, 0.08) 48%, rgba(3, 12, 17, 0.22)) !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
  }
}
  @media (max-width: 959px) {
    html body[data-page="tour"] main.tour-page--editorial > .tour-cover > .tour-cover__next {
      background: transparent !important;
      border-color: #fff !important;
      color: #fff !important;
      -webkit-text-fill-color: #fff !important;
    }
  }
  @media (max-width: 959px) {
    html body .tour-rail-pagination.carousel-pagination--mobile-top {
      position: static !important;
      order: 2 !important;
      margin: 0 auto 12px !important;
      padding: 4px 16px !important;
      width: 100% !important;
    }
    html body :is([data-tour-rail], [data-blog-rail], [data-destination-rail]) {
      order: 3 !important;
    }
    html body .carousel-mobile-more {
      order: 4 !important;
      display: flex !important;
      justify-content: center !important;
      width: 100% !important;
      margin: 18px auto 0 !important;
      padding: 0 18px !important;
    }
    html body .carousel-mobile-more > a.button {
      position: static !important;
      inset: auto !important;
      order: initial !important;
      align-self: center !important;
      margin: 0 !important;
      transform: none !important;
      translate: none !important;
      width: auto !important;
      max-width: 100% !important;
    }
  }
  html body :is([data-blog-rail], [data-destination-rail])
    > :is(.tour-blog-card, .tour-destination-card) {
    border-radius: 4px !important;
  }
  html body :is([data-blog-rail], [data-destination-rail])
    :is(.tour-blog-card__image, .tour-blog-card__image img) {
    border-radius: 4px 4px 0 0 !important;
  }
  html body[data-page="tour"] .journey-tabs-wrap::after,
  html body[data-page="tour"] .journey-tabs-scroll > a::after {
    content: none !important;
    display: none !important;
  }
  @media (min-width: 960px) {
    html body[data-page="destination"] .destination-tour-grid:is(
      :has(> .tour-card:nth-child(2):last-child),
      :has(> .tour-card:nth-child(4):last-child)
    ) {
      display: flex !important;
      flex-wrap: wrap !important;
      justify-content: center !important;
      gap: 24px !important;
      width: min(100%, 864px) !important;
      max-width: 864px !important;
      margin-inline: auto !important;
    }
  }
  html body section.destination-full-tour-carousel {
    position: relative !important;
    padding: 64px 0 !important;
    background-color: #173a4f !important;
    background-image:
      linear-gradient(rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.34)),
      url("assets/home-most-booked-seville-night-reveal-v138.webp") !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
  }
  html body .destination-full-tour-carousel::before,
  html body .destination-full-tour-carousel::after {
    content: none !important;
  }
  html body .destination-full-tour-carousel .section-head {
    align-items: center !important;
    margin-bottom: 24px !important;
  }
  html body .destination-full-tour-carousel .section-head .display {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    text-shadow: none !important;
  }
  html body .destination-full-tour-carousel a.home-tours-all-button {
    background: #fff !important;
    border-color: #fff !important;
    color: #173a4f !important;
    -webkit-text-fill-color: #173a4f !important;
  }
  @media (max-width: 959px) {
    html body section.destination-full-tour-carousel {
      padding: 36px 0 !important;
      background-attachment: scroll !important;
    }
    html body .destination-full-tour-carousel .section-head {
      display: flex !important;
      flex-direction: column !important;
      align-items: center !important;
      text-align: center !important;
    }
  }
  html body:is([data-page="blog"], [data-page="blog-article"], [data-page="destination"])
    section.destination-full-tour-carousel {
    border-bottom: 96px solid #fff !important;
  }
}

/* Homepage: use the desert photo behind Our Most Booked Tours only. */
@media (min-width: 960px) {
  html body.home-page section.home-most-booked {
    background-image:
      linear-gradient(rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.34)),
      url("./assets/contact-desert.webp?v=asset-q85-20260928") !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
  }
}
@media (max-width: 959px) {
  html body.home-page section.home-most-booked {
    background-image:
      linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
      url("./assets/contact-desert.webp?v=asset-q85-20260928") !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-attachment: scroll !important;
  }
}

/* Keep the travel-guides heading and its CTA clear on the tour-page background. */
html body[data-page="tour"] .tour-destination-cards-section .tour-blog-section__title-row .display {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
html body[data-page="tour"] .tour-destination-cards-section a.tour-travel-guides-all-button {
  background: #fff !important;
  background-color: #fff !important;
  background-image: none !important;
  border-color: #fff !important;
  color: #173a4f !important;
  -webkit-text-fill-color: #173a4f !important;
}

/* Final responsive refinements for tour travel guides and their lower background. */
@media (min-width: 960px) {
  html body[data-page="tour"] #more-tours .section-head .eyebrow {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
  }
  html body[data-page="tour"] .tour-destination-cards-section a.tour-travel-guides-all-button {
    background: #fff !important;
    background-color: #fff !important;
    background-image: none !important;
    border-color: #fff !important;
    color: #173a4f !important;
    -webkit-text-fill-color: #173a4f !important;
  }
  /* The legacy parallax animation moved this photo on every scroll frame. */
  html body[data-page="tour"] #more-tours::before {
    transform: none !important;
    will-change: auto !important;
  }

  /* Match the Contact image so the desktop photo continues across both sections. */
  html body.home-page .home-blog-section {
    background-image:
      linear-gradient(rgba(0, 0, 0, .46), rgba(0, 0, 0, .46)),
      url("./assets/contact-cta-medinas-sea-hq.webp") !important;
    background-size: cover !important;
    background-position: 50% 50% !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
  }
  html body.home-page .site-contact-cta {
    background-image: url("./assets/contact-cta-medinas-sea-hq.webp") !important;
    background-position: 50% 50% !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
  }
}
@media (max-width: 959px) {
  html body[data-page="tour"] .tour-destination-cards-section .tour-blog-section__title-row .display {
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
  }
  html body[data-page="tour"] .tour-destination-cards-section a.tour-travel-guides-all-button {
    background: #fff !important;
    background-color: #fff !important;
    background-image: none !important;
    border-color: #fff !important;
    color: #173a4f !important;
    -webkit-text-fill-color: #173a4f !important;
  }
}

/* Each tour carries its own desktop hero photo through the lower sections and Contact. */
html body[data-page="tour"][data-tour="living-map-of-al-andalus"] {
  --tour-page-background-photo: url("./assets/tour-hero-living-map-alhambra-v138.webp");
  --tour-page-mobile-background-photo: url("./assets/mobile-tour-headers/living-map-alhambra-colonnade-mobile-v5-optimized-1080.webp");
}
html body[data-page="tour"][data-tour="eight-centuries-great-andalusi-journey"] {
  --tour-page-background-photo: url("./assets/tour-hero-eight-centuries-ronda-bridge-desktop-v2.webp");
  --tour-page-mobile-background-photo: url("./assets/mobile-tour-headers/eight-centuries-ronda-aerial-mobile-v5-optimized-1080.webp");
}
html body[data-page="tour"][data-tour="three-capitals-one-legacy"] {
  --tour-page-background-photo: url("./assets/tour-hero-three-capitals-cordoba-desktop-v1.webp");
  --tour-page-mobile-background-photo: url("./assets/mobile-tour-headers/three-capitals-one-legacy-mobile-optimized-1080.webp");
}
html body[data-page="tour"][data-tour="two-shores-of-iberia"] {
  --tour-page-background-photo: url("./assets/tour-hero-two-shores-sintra-desktop-v2.webp");
  --tour-page-mobile-background-photo: url("./assets/mobile-tour-headers/two-shores-coast-aerial-mobile-v5-optimized-1080.webp");
}
html body[data-page="tour"][data-tour="minarets-and-alps"] {
  --tour-page-background-photo: url("./assets/tour-hero-minarets-alps-wettstein.webp");
  --tour-page-mobile-background-photo: url("./assets/mobile-tour-headers/minarets-alps-omid-mobile-optimized-1080.webp");
}
html body[data-page="tour"][data-tour="strait-of-memory"] {
  --tour-page-background-photo: url("./assets/tour-hero-strait-memory-hq.webp");
  --tour-page-mobile-background-photo: url("./assets/mobile-tour-headers/strait-medina-mobile-v2-optimized-1080.webp");
}
html body[data-page="tour"][data-tour="western-al-andalus"] {
  --tour-page-background-photo: url("./assets/tour-hero-western-al-andalus-hq.webp");
  --tour-page-mobile-background-photo: url("./assets/mobile-tour-headers/western-al-andalus-seville-palace-mobile-v3-optimized-1080.webp");
}
html body[data-page="tour"][data-tour="medinas-mountains-and-sea"] {
  --tour-page-background-photo: url("./assets/tour-hero-medinas-mountains-sea-hq.webp");
  --tour-page-mobile-background-photo: url("./assets/mobile-tour-headers/medinas-mountains-sea-mobile-v4-optimized-1080.webp");
}
@media (min-width: 960px) {
  html body[data-page="tour"] #more-tours::before {
    background-image: var(--tour-page-background-photo) !important;
    background-position: center center !important;
    background-size: cover !important;
    background-attachment: fixed !important;
  }
  html body[data-page="tour"] section.home-most-booked {
    background-image:
      linear-gradient(rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.08)),
      var(--tour-page-background-photo) !important;
    background-color: #173a4f !important;
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
  }
  html body[data-page="tour"] .tour-destination-cards-section {
    position: relative !important;
    z-index: 1 !important;
    padding-block: clamp(42px, 5vw, 68px) !important;
    border: 0 !important;
    background-color: #173a4f !important;
    background-image:
      linear-gradient(rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.08)),
      var(--tour-page-background-photo) !important;
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
  }
  html body[data-page="tour"] .tour-destination-cards-section .tour-blog-section__head :is(.eyebrow, .display) {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
  }
  html body[data-page="tour"] .tour-destination-cards-section a.tour-travel-guides-all-button {
    background: #e9e5da !important;
    background-color: #e9e5da !important;
    border-color: #e9e5da !important;
    color: #173a4f !important;
    -webkit-text-fill-color: #173a4f !important;
  }
  html body[data-page="tour"] .home-most-booked .section-head :is(.eyebrow, .display) {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
  }
  html body[data-page="tour"] .mobile-footer-composition > .site-contact-cta {
    background-color: #173a4f !important;
    background-image:
      linear-gradient(rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.08)),
      var(--tour-page-background-photo) !important;
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
  }
  html body[data-page="tour"] .mobile-footer-composition > .site-contact-cta::before,
  html body[data-page="tour"] .mobile-footer-composition > .site-contact-cta::after {
    content: none !important;
    display: none !important;
  }
}

/* Mobile tour pages use the same fixed-photo layer as About and Services. */
@layer mobile-footer {
  @media (max-width: 959px) {
    html body[data-page="tour"] .shell {
      position: relative !important;
      isolation: isolate !important;
      background: transparent !important;
      background-color: transparent !important;
      background-image: none !important;
    }
    html body[data-page="tour"] .shell::before {
      content: "" !important;
      display: block !important;
      position: fixed !important;
      inset: 0 !important;
      width: 100% !important;
      height: 100vh !important;
      height: 100lvh !important;
      z-index: -1 !important;
      pointer-events: none !important;
      background:
        linear-gradient(rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.08)),
        var(--tour-page-mobile-background-photo) center / cover no-repeat !important;
    }
    html body[data-page="tour"] main.tour-page--editorial {
      background: transparent !important;
      background-color: transparent !important;
      background-image: none !important;
    }
    /* Keep the itinerary and booking reading surfaces in their page color. */
    html body[data-page="tour"] main.tour-page--editorial > .journey-tabs-wrap,
    html body[data-page="tour"] main.tour-page--editorial > #journey-overview,
    html body[data-page="tour"] main.tour-page--editorial > #journey-itinerary,
    html body[data-page="tour"] main.tour-page--editorial > #journey-highlights,
    html body[data-page="tour"] main.tour-page--editorial > #journey-gallery,
    html body[data-page="tour"] main.tour-page--editorial > #journey-details,
    html body[data-page="tour"] main.tour-page--editorial > #journey-booking {
      background: var(--section-cream, #f5f5f7) !important;
      background-color: var(--section-cream, #f5f5f7) !important;
      background-image: none !important;
    }
    html body[data-page="tour"] #more-tours {
      background: transparent !important;
      background-color: transparent !important;
      background-image: none !important;
    }
    html body[data-page="tour"] #more-tours::before {
      content: none !important;
      display: none !important;
    }
    html body[data-page="tour"] #more-tours::after {
      background: transparent !important;
    }
    html body[data-page="tour"] .tour-destination-cards-section,
    html body[data-page="tour"] section.home-most-booked {
      background: transparent !important;
      background-color: transparent !important;
      background-image: none !important;
      background-attachment: scroll !important;
    }
    html body[data-page="tour"] .tour-destination-cards-section .tour-blog-section__head :is(.eyebrow, .display),
    html body[data-page="tour"] .home-most-booked .section-head :is(.eyebrow, .display) {
      color: #fff !important;
      -webkit-text-fill-color: #fff !important;
    }
    html body[data-page="tour"] .mobile-footer-composition,
    html body[data-page="tour"] .mobile-footer-composition > .site-contact-cta {
      background: transparent !important;
      background-color: transparent !important;
      background-image: none !important;
    }
    html body[data-page="tour"] .mobile-footer-composition > .site-contact-cta::before,
    html body[data-page="tour"] .mobile-footer-composition > .site-contact-cta::after {
      content: none !important;
      display: none !important;
    }
  }
}

/* Tour detail covers use the full viewport with the copy and primary links centered. */
@media (min-width: 960px) {
  html body[data-page="tour"] main.tour-page--editorial > .tour-cover {
    height: 100vh !important;
    height: 100svh !important;
    min-height: 100svh !important;
  }
  html body[data-page="tour"] main.tour-page--editorial > .tour-cover .tour-cover__inner {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: min(1320px, calc(100% - 80px)) !important;
    height: 100% !important;
    min-height: 100svh !important;
    padding: 48px 0 !important;
  }
  html body[data-page="tour"] main.tour-page--editorial > .tour-cover .tour-cover__copy {
    width: min(820px, 90vw) !important;
    margin-inline: auto !important;
    text-align: center !important;
  }
  html body[data-page="tour"] main.tour-page--editorial > .tour-cover .eyebrow {
    justify-content: center !important;
    margin-inline: auto !important;
    text-align: center !important;
  }
  html body[data-page="tour"] main.tour-page--editorial > .tour-cover h1,
  html body[data-page="tour"] main.tour-page--editorial > .tour-cover .subtitle {
    margin-inline: auto !important;
    text-align: center !important;
  }
  html body[data-page="tour"] main.tour-page--editorial > .tour-cover .tour-facts,
  html body[data-page="tour"] main.tour-page--editorial > .tour-cover .tour-cover__actions {
    justify-content: center !important;
    margin-inline: auto !important;
  }
  /* Keep Next Tour in its existing corner position. */
}
@media (max-width: 959px) {
  html body[data-page="tour"] main.tour-page--editorial > .tour-cover {
    min-height: 100svh !important;
  }
  html body[data-page="tour"] main.tour-page--editorial > .tour-cover .tour-cover__inner {
    min-height: 100svh !important;
  }
  html body[data-page="tour"] main.tour-page--editorial > .tour-cover .tour-cover__copy {
    text-align: center !important;
  }
  html body[data-page="tour"] main.tour-page--editorial > .tour-cover .tour-cover__actions {
    width: min(100%, 480px) !important;
    margin-inline: auto !important;
    justify-items: center !important;
  }
}

/* Keep desktop tour hero content centered independently of page-specific offsets. */
@media (min-width: 960px) and (hover: hover) and (pointer: fine) {
  html body[data-page="tour"] main.tour-page--editorial > .tour-cover .tour-cover__inner {
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    inset-inline: 0 !important;
    width: min(1320px, calc(100% - 80px)) !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 0 !important;
    margin-inline: auto !important;
    padding: 48px 0 calc(var(--journey-tabs-height) + 48px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }
  html body[data-page="tour"] main.tour-page--editorial > .tour-cover .tour-cover__copy {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    width: min(820px, 90vw) !important;
    max-width: 820px !important;
    margin-inline: auto !important;
    transform: none !important;
    text-align: center !important;
  }
  html body[data-page="tour"] main.tour-page--editorial > .tour-cover .tour-cover__copy :is(.eyebrow, h1, .subtitle, .tour-facts, .tour-cover__actions) {
    margin-inline: auto !important;
    text-align: center !important;
  }
  html body[data-page="tour"] main.tour-page--editorial > .tour-cover .tour-cover__copy :is(.eyebrow, .tour-facts, .tour-cover__actions) {
    justify-content: center !important;
  }
  /* Center every tour title in its copy column; allow long titles to wrap evenly. */
  html body[data-page="tour"] main.tour-page--editorial > .tour-cover .tour-cover__copy > h1 {
    position: static !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    transform: none !important;
    text-align: center !important;
    white-space: normal !important;
    text-wrap: balance !important;
  }
}

/* Darken only the continuing background photos, never the hero covers. */
@media (min-width: 960px) {
  html body[data-page="tour"] #more-tours::after {
    background: rgba(0, 0, 0, 0.08) !important;
  }
  html body[data-page="tour"] .mobile-footer-composition > .site-contact-cta {
    background-image:
      linear-gradient(rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.08)),
      var(--tour-page-background-photo) !important;
  }
}

/* Keep the active tour tab inset slightly within the full-height sticky strip. */
html body[data-page="tour"] .tour-page--editorial > .journey-tabs-wrap .journey-tabs-scroll > a {
  min-height: max(36px, calc(var(--journey-tabs-height) - 8px)) !important;
  height: auto !important;
  align-self: center !important;
}

/* Keep the browser's elastic overscroll surface on the page paper color. */
html {
  background-color: var(--paper, #f5f5f7) !important;
}

/* Tour reading sections and the sticky tab strip are full-bleed on phones. */
@media (max-width: 959px) {
  html body[data-page="tour"] main.tour-page--editorial > .journey-tabs-wrap,
  html body[data-page="tour"] main.tour-page--editorial > .journey-panel {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
  }

  html body[data-page="tour"] main.tour-page--editorial > .journey-tabs-wrap {
    padding-inline: 0 !important;
  }

  html body[data-page="tour"] main.tour-page--editorial > .journey-panel {
    padding-inline: max(18px, calc((100vw - 1200px) / 2)) !important;
  }
}

/* Mobile-only white controls over the tour page background. */
@media (max-width: 959px) {
  html body[data-page="tour"] #more-tours .section-head .eyebrow {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
  }

  html body[data-page="tour"] .tour-destination-cards-section .tour-rail-pagination .tour-rail-dot,
  html body[data-page="tour"] .tour-destination-cards-section .tour-rail-pagination .tour-rail-dot[aria-current="true"] {
    background: #fff !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.42) !important;
  }

html body[data-page="tour"] .tour-destination-cards-section a.tour-travel-guides-all-button {
    background: #fff !important;
    background-color: #fff !important;
    background-image: none !important;
    border-color: #fff !important;
    color: #173a4f !important;
    -webkit-text-fill-color: #173a4f !important;
  }
}

/* The guide CTA stays white on every device and interaction state. */
html body[data-page="tour"] main.tour-page--editorial #tour-travel-guides a.button.tour-travel-guides-all-button,
html body[data-page="tour"] main.tour-page--editorial #tour-travel-guides a.button.tour-travel-guides-all-button:is(:hover, :focus, :focus-visible, :active) {
  background: #fff !important;
  background-color: #fff !important;
  background-image: none !important;
  border-color: #fff !important;
  color: #173a4f !important;
  -webkit-text-fill-color: #173a4f !important;
  box-shadow: none !important;
}

html body[data-page="tour"] main.tour-page--editorial #tour-travel-guides a.button.tour-travel-guides-all-button::before,
html body[data-page="tour"] main.tour-page--editorial #tour-travel-guides a.button.tour-travel-guides-all-button::after {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

/* Keep Tours 4 and 5 just slightly darker across their continuing desktop and mobile photographs. */
@media (min-width: 960px) {
  html body[data-page="tour"][data-tour="minarets-and-alps"] :is(section.home-most-booked, .tour-destination-cards-section, .mobile-footer-composition > .site-contact-cta) {
    background-image:
      linear-gradient(rgba(0, 0, 0, .16), rgba(0, 0, 0, .16)),
      var(--tour-page-background-photo) !important;
  }

  html body[data-page="tour"][data-tour="minarets-and-alps"] #more-tours::after {
    background: rgba(0, 0, 0, .16) !important;
  }
}

@layer mobile-footer {
  @media (max-width: 959px) {
    html body[data-page="tour"][data-tour="minarets-and-alps"] .shell::before {
      background:
        linear-gradient(rgba(0, 0, 0, .16), rgba(0, 0, 0, .16)),
        var(--tour-page-mobile-background-photo) center / cover no-repeat !important;
    }
  }
}

/* Tour 8 carries the same gentle contrast through its continuing photograph. */
@media (min-width: 960px) {
  html body[data-page="tour"][data-tour="medinas-mountains-and-sea"] :is(section.home-most-booked, .tour-destination-cards-section, .mobile-footer-composition > .site-contact-cta) {
    background-image:
      linear-gradient(rgba(0, 0, 0, .14), rgba(0, 0, 0, .14)),
      var(--tour-page-background-photo) !important;
  }
  html body[data-page="tour"][data-tour="medinas-mountains-and-sea"] #more-tours::after {
    background: rgba(0, 0, 0, .14) !important;
  }
}
@layer mobile-footer {
  @media (max-width: 959px) {
    html body[data-page="tour"][data-tour="medinas-mountains-and-sea"] .shell::before {
      background:
        linear-gradient(rgba(0, 0, 0, .14), rgba(0, 0, 0, .14)),
        var(--tour-page-mobile-background-photo) center / cover no-repeat !important;
    }
  }
}

/* Match the hero exposure through each mobile continuation photograph. */
@layer mobile-footer {
  @media (max-width: 959px) {
    html body[data-page="tour"] .shell::before {
      background:
        linear-gradient(rgba(0, 0, 0, .16), rgba(0, 0, 0, .16)),
        var(--tour-page-mobile-background-photo) center / cover no-repeat !important;
    }
  }
}

/* Only the mobile continuous photo for Tour 2 uses the stronger contrast layer. */
@layer mobile-footer {
  @media (max-width: 959px) {
    html body[data-page="tour"][data-tour="eight-centuries-great-andalusi-journey"] .shell::before {
      background:
        linear-gradient(rgba(0, 0, 0, .38), rgba(0, 0, 0, .38)),
        var(--tour-page-mobile-background-photo) center / cover no-repeat !important;
    }
  }
}

/* Desktop continuation photographs match the hero's brightness(.66). */
@media (min-width: 960px) {
  html body[data-page="tour"] :is(section.home-most-booked, .tour-destination-cards-section, .mobile-footer-composition > .site-contact-cta) {
    background-image:
      linear-gradient(rgba(0, 0, 0, .34), rgba(0, 0, 0, .34)),
      var(--tour-page-background-photo) !important;
  }
  html body[data-page="tour"] #more-tours::after {
    background: rgba(0, 0, 0, .34) !important;
  }
}

/* Mobile continuous photos match the hero exposure: Tour 7 stays lighter, Tour 2 stays strongest. */
@layer mobile-footer {
  @media (max-width: 959px) {
    html body[data-page="tour"]:not([data-tour="western-al-andalus"]) .shell::before {
      background:
        linear-gradient(rgba(0, 0, 0, .28), rgba(0, 0, 0, .28)),
        var(--tour-page-mobile-background-photo) center / cover no-repeat !important;
    }

    html body[data-page="tour"][data-tour="western-al-andalus"] .shell::before {
      background:
        linear-gradient(rgba(0, 0, 0, .16), rgba(0, 0, 0, .16)),
        var(--tour-page-mobile-background-photo) center / cover no-repeat !important;
    }

    html body[data-page="tour"][data-tour="eight-centuries-great-andalusi-journey"] .shell::before {
      background:
        linear-gradient(rgba(0, 0, 0, .38), rgba(0, 0, 0, .38)),
        var(--tour-page-mobile-background-photo) center / cover no-repeat !important;
    }
  }
}

/* Tour 1 now follows the standard mobile exposure used by the other tours. */
@layer mobile-footer {
  @media (max-width: 959px) {
    html body[data-page="tour"][data-tour="living-map-of-al-andalus"] .shell::before {
      background:
        linear-gradient(rgba(0, 0, 0, .28), rgba(0, 0, 0, .28)),
        var(--tour-page-mobile-background-photo) center / cover no-repeat !important;
    }
  }
}

/* Mobile-only darker continuation photos for Tours 5 and 8. */
@layer mobile-footer {
  @media (max-width: 959px) {
    html body[data-page="tour"][data-tour="two-shores-of-iberia"] .shell::before {
      background:
        linear-gradient(rgba(0, 0, 0, .46), rgba(0, 0, 0, .46)),
        var(--tour-page-mobile-background-photo) center / cover no-repeat !important;
    }

    html body[data-page="tour"][data-tour="minarets-and-alps"] .shell::before,
    html body[data-page="tour"][data-tour="medinas-mountains-and-sea"] .shell::before {
      background:
        linear-gradient(rgba(0, 0, 0, .38), rgba(0, 0, 0, .38)),
        var(--tour-page-mobile-background-photo) center / cover no-repeat !important;
    }
  }
}


/* Compact page-color bridge between editorial tour carousels and contact reveal. */
.editorial-contact-bridge {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: clamp(22px, 3vw, 34px) 24px;
  background: #f5f5f7;
  color: #173a4f;
  text-align: center;
}
.editorial-contact-bridge__inner {
  width: min(100%, 920px);
  margin-inline: auto;
}
.editorial-contact-bridge h2 {
  margin: 0 0 8px;
  color: #173a4f;
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(22px, 2.3vw, 30px);
  line-height: 1.15;
}
.editorial-contact-bridge p {
  max-width: 760px;
  margin: 0 auto;
  color: #30343a;
  font-size: 16px;
  line-height: 1.55;
}
html[dir="rtl"] .editorial-contact-bridge { direction: rtl; }
@media (max-width: 959px) {
  .editorial-contact-bridge { padding: 20px 22px; }
  .editorial-contact-bridge p { font-size: 15px; line-height: 1.5; }
}

/* Home blog reveal replacement; keep the separate Contact reveal unchanged. */
@media (min-width: 960px) {
  html body.home-page section.home-blog-section {
    background-image: linear-gradient(rgba(0,0,0,.46),rgba(0,0,0,.46)), url("./assets/home-blog-reveal-mographe-v1.webp") !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
  }
}
@media (max-width: 959px) {
  html body.home-page section.home-blog-section {
    background: linear-gradient(rgba(0,0,0,.46),rgba(0,0,0,.46)), url("./assets/home-blog-reveal-mographe-v1.webp") center center / cover no-repeat !important;
    background-attachment: scroll !important;
  }
  html body.home-page section.home-blog-section::before {
    background-image: linear-gradient(rgba(0,0,0,.46),rgba(0,0,0,.46)), url("./assets/home-blog-reveal-mographe-v1.webp") !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
  }
}

/* Home desktop blog reveal: let the image fill at least one viewport. */
@media (min-width: 960px) {
  html body.home-page section.home-blog-section {
    box-sizing: border-box !important;
    min-height: 100vh !important;
    min-height: 100svh !important;
  }
}
