/* Synchronized responsive foundation v1 — shared identically by FR and EN. */
*,*::before,*::after{box-sizing:border-box}html{overflow-x:hidden}body{overflow-x:clip}:root{--page-inline:clamp(16px,4vw,72px);--content-max:1440px}
.site-header .header-bar{position:relative}.site-header .center-logo{z-index:5}.site-header .site-language-switch{position:absolute;z-index:7;left:calc(50% - 104px);top:8px;display:inline-flex;align-items:center;gap:5px;transform:scale(.62);transform-origin:center;margin:0}.site-language-switch .lang-toggle-track{position:relative;display:block;width:26px;height:14px;border-radius:999px}.site-language-switch .lang-toggle-knob{position:absolute;top:2px;left:2px;width:8px;height:8px;border-radius:50%}html[lang="en"] .site-language-switch .lang-toggle-knob{transform:translateX(12px)}
body:has(.hero-premium) .hero-premium{position:relative;overflow:hidden}body:has(.hero-premium) .hero-content-premium{position:relative;z-index:2;width:min(calc(100% - (2 * var(--page-inline))),var(--content-max));max-width:none;margin-inline:auto;padding-inline:0;display:grid;grid-template-columns:minmax(0,1.08fr) minmax(320px,.92fr);gap:clamp(20px,3vw,52px);align-items:end}body:has(.hero-premium) .hero-copy{min-width:0;max-width:760px}body:has(.hero-premium) .hero-main-title{margin:0;max-width:100%;font-family:Impact,Haettenschweiler,"Arial Narrow Bold",sans-serif;font-weight:400;text-transform:uppercase;letter-spacing:.005em;line-height:.9;font-size:clamp(4.6rem,7vw,8rem);overflow-wrap:normal;word-break:normal}body:has(.hero-premium) .hero-actions.hero-actions-five{display:flex;flex-wrap:nowrap;gap:10px;align-items:center}body:has(.hero-premium) .hero-actions.hero-actions-five .button{min-width:0;padding:10px 16px;min-height:40px;white-space:nowrap}body:has(.hero-premium) .hero-featured-card{position:relative;inset:auto;transform:none;width:100%;max-width:520px;min-width:0;min-height:0;margin:0;justify-self:end;align-self:end;aspect-ratio:16/10;overflow:hidden}
body:has(.hero-premium) .home-events-guide-row,body:has(.hero-premium) .home-editorial-section>.container{width:min(80%,1280px);margin-inline:auto}body:has(.hero-premium) .home-events-guide-row{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,3fr);gap:24px;align-items:start}body:has(.hero-premium) .home-events-guide-row>.home-section,body:has(.hero-premium) .home-events-guide-row>.home-section>.container{min-width:0;width:100%;max-width:none;padding-inline:0}body:has(.hero-premium) .home-event-single-carousel{width:100%}body:has(.hero-premium) .home-event-single-carousel .home-event-card,body:has(.hero-premium) .home-event-single-carousel .home-event-card.featured,body:has(.hero-premium) .home-event-single-carousel .home-event-card:nth-child(n){flex:0 0 100%;width:100%;min-width:100%;height:auto;min-height:0;max-height:none;aspect-ratio:15/21}body:has(.hero-premium) .home-event-single-carousel .home-event-card img{width:100%;height:100%;object-fit:contain}body:has(.hero-premium) .editorial-place-grid[data-home-guide-grid]{display:flex;gap:14px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory}body:has(.hero-premium) .editorial-place-grid[data-home-guide-grid] .editorial-place-card{flex:0 0 calc((100% - 28px)/3);width:calc((100% - 28px)/3);min-width:calc((100% - 28px)/3);height:auto;min-height:0;max-height:none;aspect-ratio:15/21;scroll-snap-align:start}
@media(max-width:999px){:root{--page-inline:clamp(16px,3vw,32px)}body:has(.hero-premium) .hero-content-premium{grid-template-columns:minmax(0,1fr);align-items:stretch}body:has(.hero-premium) .hero-featured-card{justify-self:stretch;max-width:none;aspect-ratio:16/8}body:has(.hero-premium) .home-events-guide-row,body:has(.hero-premium) .home-editorial-section>.container{width:min(calc(100% - 32px),900px)}body:has(.hero-premium) .home-events-guide-row{grid-template-columns:1fr}}
@media(max-width:760px){:root{--page-inline:14px}.site-header .site-language-switch{left:calc(50% - 94px);top:7px;transform:scale(.58)}body:has(.hero-premium) .hero-content-premium{width:calc(100% - 28px);display:flex;flex-direction:column;gap:16px}body:has(.hero-premium) .hero-copy{width:100%;max-width:none}body:has(.hero-premium) .hero-main-title{font-size:clamp(3rem,13vw,5rem);line-height:.9}body:has(.hero-premium) .hero-featured-card{order:2;width:100%;max-width:none;aspect-ratio:16/9}body:has(.hero-premium) .hero-actions.hero-actions-five{display:flex;flex-wrap:nowrap;gap:5px;width:100%;overflow:visible}body:has(.hero-premium) .hero-actions.hero-actions-five .button{flex:1 1 0;width:auto;min-width:0;min-height:38px;padding:8px 4px;font-size:clamp(.58rem,2.6vw,.72rem);justify-content:center;text-align:center;white-space:nowrap}body:has(.hero-premium) .home-events-guide-row,body:has(.hero-premium) .home-editorial-section>.container{width:calc(100% - 28px)}body:has(.hero-premium) .editorial-place-grid[data-home-guide-grid] .editorial-place-card{flex-basis:82%;width:82%;min-width:82%}}


/* =========================================================
   MARRAKECH MEDIA — FINAL RESPONSIVE FOUNDATION (STAGE 5)
   Consolidated from iterative patches. This is the source of truth.
   ========================================================= */

:root{
  --fixed-header-height:36px;
  --fixed-logo-size:177px;
  --logo-hidden-top:.28;
  --home-screen-height:calc(100svh - var(--fixed-header-height));
}

@media (max-width:980px){
  :root{
    --fixed-header-height:33px;
    --fixed-logo-size:156px;
  }
}

@media (max-width:760px){
  :root{
    --fixed-header-height:30px;
    --fixed-logo-size:132px;
  }
}

@media (max-width:430px){
  :root{
    --fixed-header-height:28px;
    --fixed-logo-size:120px;
  }
}

/* Fixed header */
.site-header,
.site-header .header-bar{
  position:fixed!important;
  top:0!important;
  left:0!important;
  right:0!important;
  width:100vw!important;
  max-width:none!important;
  height:var(--fixed-header-height)!important;
  min-height:var(--fixed-header-height)!important;
  overflow:visible!important;
  z-index:10000!important;
}

.site-header .header-left,
.site-header .header-right{
  position:static!important;
  width:auto!important;
  height:auto!important;
  min-height:0!important;
  transform:none!important;
}

/* Logo */
.site-header .center-logo{
  position:absolute!important;
  left:50%!important;
  top:calc(var(--fixed-logo-size) * var(--logo-hidden-top) * -1)!important;
  width:var(--fixed-logo-size)!important;
  height:var(--fixed-logo-size)!important;
  transform:translateX(-50%)!important;
  margin:0!important;
  z-index:10010!important;
  overflow:visible!important;
}

.site-header .center-logo-frame,
.site-header .center-logo img{
  width:100%!important;
  height:100%!important;
  overflow:visible!important;
}

.site-header .center-logo img{
  display:block!important;
  object-fit:contain!important;
  object-position:center!important;
}

/* Switch and social groups are positioned dynamically by JS */
.site-header .site-language-switch,
.site-header .social-links{
  position:fixed!important;
  top:calc(var(--fixed-header-height) / 2)!important;
  right:auto!important;
  margin:0!important;
  transform:translate(-50%,-50%)!important;
  z-index:10020!important;
}

.site-header .social-links{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:max-content!important;
  gap:clamp(6px,1vw,14px)!important;
}

.site-header .social-links .social,
.site-header .social-links .social svg{
  width:clamp(22px,1.85vw,31px)!important;
  height:clamp(22px,1.85vw,31px)!important;
  flex-basis:clamp(22px,1.85vw,31px)!important;
}

@media (max-width:760px){
  .site-header .social-links{
    gap:clamp(5px,1.6vw,9px)!important;
  }

  .site-header .social-links .social,
  .site-header .social-links .social svg{
    width:clamp(18px,5vw,23px)!important;
    height:clamp(18px,5vw,23px)!important;
    flex-basis:clamp(18px,5vw,23px)!important;
  }
}

@media (max-width:390px){
  .site-header .social-links{
    gap:4px!important;
  }

  .site-header .social-links .social,
  .site-header .social-links .social svg{
    width:17px!important;
    height:17px!important;
    flex-basis:17px!important;
  }
}

/* Home page viewport sections */
body:has(.hero-premium){
  padding-top:var(--fixed-header-height)!important;
}

body:has(.hero-premium) .home-screen-hero,
body:has(.hero-premium) .home-screen-events,
body:has(.hero-premium) .home-screen-guide,
body:has(.hero-premium) .home-screen-editorial,
body:has(.hero-premium) .home-screen-footer{
  position:relative!important;
  width:100%!important;
  max-width:none!important;
  height:var(--home-screen-height)!important;
  min-height:var(--home-screen-height)!important;
  max-height:var(--home-screen-height)!important;
  margin:0!important;
  overflow:hidden!important;
  scroll-margin-top:var(--fixed-header-height)!important;
}

/* Hero */
body:has(.hero-premium) .home-screen-hero{
  align-items:flex-start!important;
  padding-top:clamp(8px,1.2vh,16px)!important;
}

body:has(.hero-premium) .hero-content-premium{
  width:min(calc(100% - 32px),1400px)!important;
  height:100%!important;
  margin:0 auto!important;
  min-height:0!important;
}

body:has(.hero-premium) .hero-main-title,
body:has(.hero-premium) .hero-main-title span{
  font-family:Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif!important;
  font-style:normal!important;
  font-weight:400!important;
}

body:has(.hero-premium) .hero-main-title{
  display:flex!important;
  flex-direction:column!important;
  gap:0!important;
  margin:0!important;
  max-width:none!important;
  line-height:.84!important;
  letter-spacing:.01em!important;
  transform:translateX(clamp(10px,1.8vw,28px))!important;
}

body:has(.hero-premium) .hero-main-title span{
  display:block!important;
}

body:has(.hero-premium) .hero-daily-feature{
  display:flex!important;
  flex-direction:column!important;
  min-height:0!important;
  gap:10px!important;
  align-items:center!important;
}

body:has(.hero-premium) .hero-daily-feature h2{
  width:100%!important;
  margin:0!important;
  text-align:center!important;
  font-size:clamp(1rem,1.8vw,1.45rem)!important;
  line-height:1.1!important;
  font-weight:800!important;
}

body:has(.hero-premium) .hero-featured-video-card{
  position:relative!important;
  aspect-ratio:1/1!important;
  width:min(64%,380px,calc(100vh - var(--fixed-header-height) - 220px))!important;
  max-width:380px!important;
  max-height:none!important;
  height:auto!important;
  min-height:0!important;
  flex:none!important;
  align-self:center!important;
  overflow:hidden!important;
}

body:has(.hero-premium) .hero-featured-video-card video{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  display:block!important;
}

@media (min-width:761px){
  body:has(.hero-premium) .hero-content-premium{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(320px,.9fr)!important;
    grid-template-rows:minmax(0,1fr) auto!important;
    column-gap:clamp(24px,4vw,64px)!important;
    row-gap:clamp(12px,2vh,22px)!important;
    align-items:center!important;
  }

  body:has(.hero-premium) .hero-copy{
    grid-column:1!important;
    grid-row:1!important;
    align-self:center!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
  }

  body:has(.hero-premium) .hero-daily-feature{
    grid-column:2!important;
    grid-row:1!important;
    align-self:stretch!important;
    justify-self:stretch!important;
    justify-content:center!important;
    width:100%!important;
  }

  body:has(.hero-premium) .hero-actions.hero-actions-five{
    grid-column:1/-1!important;
    grid-row:2!important;
    width:100%!important;
    display:flex!important;
    flex-wrap:nowrap!important;
    justify-content:center!important;
    align-items:center!important;
    gap:10px!important;
    margin:0!important;
    padding-bottom:clamp(8px,1.2vh,16px)!important;
  }
}

@media (max-width:760px){
  body:has(.hero-premium) .hero-content-premium{
    display:grid!important;
    grid-template-columns:1fr!important;
    grid-template-rows:auto minmax(0,1fr) auto!important;
    gap:10px!important;
    align-items:stretch!important;
  }

  body:has(.hero-premium) .hero-copy{
    grid-column:1!important;
    grid-row:1!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
  }

  body:has(.hero-premium) .hero-main-title{
    font-size:clamp(2.45rem,12.5vw,4rem)!important;
    transform:translateX(clamp(8px,3vw,16px))!important;
  }

  body:has(.hero-premium) .hero-daily-feature{
    grid-column:1!important;
    grid-row:2!important;
    width:100%!important;
  }

  body:has(.hero-premium) .hero-featured-video-card{
    width:min(76vw,32vh,320px)!important;
    max-width:320px!important;
  }

  body:has(.hero-premium) .hero-actions.hero-actions-five{
    grid-column:1!important;
    grid-row:3!important;
    display:flex!important;
    flex-wrap:nowrap!important;
    width:100%!important;
    justify-content:center!important;
    align-items:center!important;
    gap:5px!important;
    margin:0!important;
    padding-bottom:6px!important;
  }
}

/* Independent Events / Guide / Editorial screens */
body:has(.hero-premium) .home-events-guide-row{
  display:contents!important;
}

body:has(.hero-premium) .home-screen-events,
body:has(.hero-premium) .home-screen-guide,
body:has(.hero-premium) .home-screen-editorial{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:clamp(16px,3vh,36px) 0!important;
}

body:has(.hero-premium) .home-screen-events > .container,
body:has(.hero-premium) .home-screen-guide > .container,
body:has(.hero-premium) .home-screen-editorial > .container{
  width:min(92%,1280px)!important;
  max-width:1280px!important;
  height:100%!important;
  max-height:100%!important;
  margin:0 auto!important;
  padding-left:0!important;
  padding-right:0!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  overflow:hidden!important;
}

body:has(.hero-premium) .home-screen-events .home-event-single-carousel,
body:has(.hero-premium) .home-screen-guide .editorial-place-grid[data-home-guide-grid],
body:has(.hero-premium) .home-screen-editorial .home-editorial-carousel{
  flex:1 1 auto!important;
  min-height:0!important;
  max-height:calc(100% - 96px)!important;
  overflow-y:hidden!important;
}

/* Fullscreen footer */
body:has(.hero-premium) .home-screen-footer{
  padding:clamp(20px,4vh,56px) clamp(16px,4vw,64px)!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  box-sizing:border-box!important;
}

body:has(.hero-premium) .home-screen-footer .container,
body:has(.hero-premium) .home-screen-footer .footer-inner,
body:has(.hero-premium) .home-screen-footer > div{
  width:min(100%,1180px)!important;
  max-width:1180px!important;
  max-height:100%!important;
  margin:0 auto!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  overflow:hidden!important;
}

@media (max-width:980px){
  body:has(.hero-premium) .home-screen-events > .container,
  body:has(.hero-premium) .home-screen-guide > .container,
  body:has(.hero-premium) .home-screen-editorial > .container{
    width:calc(100% - 28px)!important;
    max-width:none!important;
  }
}

@media (max-height:720px){
  body:has(.hero-premium) .home-screen-footer .container,
  body:has(.hero-premium) .home-screen-footer .footer-inner,
  body:has(.hero-premium) .home-screen-footer > div{
    transform:scale(.92)!important;
    transform-origin:center!important;
  }
}

@media (max-width:390px), (max-height:620px){
  body:has(.hero-premium) .home-screen-footer .container,
  body:has(.hero-premium) .home-screen-footer .footer-inner,
  body:has(.hero-premium) .home-screen-footer > div{
    transform:scale(.86)!important;
    transform-origin:center!important;
  }
}


/* STAGE 6 — FINAL GLOBAL SAFETY */
html,
body{
  width:100%;
  max-width:100%;
  overflow-x:hidden!important;
}

*,
*::before,
*::after{
  box-sizing:border-box;
}

body:has(.hero-premium) main{
  width:100%;
  max-width:100%;
  overflow-x:hidden;
}

body:has(.hero-premium) .home-screen-section{
  contain:layout paint;
}

/* ==========================================================================
   FOUR PRIMARY ACTIONS — CLEAN LEGACY BASELINE
   This is the only legacy compatibility layer kept before migration to
   assets/home/30-primary-actions.css.
   ========================================================================== */

:root {
  --primary-action-height-desktop: 44px;
  --primary-action-height-mobile: 39px;
  --primary-action-gap-desktop: 8px;
  --primary-action-gap-mobile: 4px;
  --primary-action-radius: 12px;
  --primary-action-z: 10060;
}

/* Keep the Hero free of clipping while buttons travel toward the header. */
body:has(.hero-premium) .home-screen-hero {
  contain: none !important;
  overflow: visible !important;
}

/* Desktop resting state in the Hero. */
@media (min-width: 1024px) {
  body:has(.hero-premium)
  .hero-premium
  .hero-actions.hero-actions-five:not(.is-group-transition) {
    position: absolute !important;
    left: 50% !important;
    right: auto !important;
    top: auto !important;
    bottom: 14px !important;
    transform: translateX(-50%) !important;

    width: 50vw !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;

    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: var(--primary-action-gap-desktop) !important;
    align-items: stretch !important;
    overflow: visible !important;
    z-index: 20 !important;
  }

  body:has(.hero-premium)
  .hero-actions.hero-actions-five:not(.is-group-transition)
  .primary-actions-dock-group {
    display: contents !important;
  }

  body:has(.hero-premium)
  .hero-actions.hero-actions-five:not(.is-group-transition)
  .button,
  body:has(.hero-premium)
  .hero-actions.hero-actions-five:not(.is-group-transition)
  .stay-button {
    width: 100% !important;
    min-width: 0 !important;
    height: var(--primary-action-height-desktop) !important;
    min-height: var(--primary-action-height-desktop) !important;
    margin: 0 !important;
    padding: 8px 10px !important;
    border-radius: var(--primary-action-radius) !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }

  .primary-actions-transition-placeholder {
    display: block !important;
    width: 100% !important;
    height: 0;
    flex: 0 0 auto !important;
    pointer-events: none !important;
  }

  body > .hero-actions.hero-actions-five.is-group-transition {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    transform: none !important;
    overflow: visible !important;
    pointer-events: none !important;
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    z-index: var(--primary-action-z) !important;
  }

  body > .hero-actions.hero-actions-five.is-group-transition
  .primary-actions-dock-group {
    position: fixed !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: var(--primary-action-gap-desktop) !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: auto !important;
    will-change: left, top, width, height !important;
    backface-visibility: hidden !important;
  }

  body > .hero-actions.hero-actions-five.is-group-transition .button,
  body > .hero-actions.hero-actions-five.is-group-transition .stay-button {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: var(--primary-action-height-desktop) !important;
    min-height: var(--primary-action-height-desktop) !important;
    margin: 0 !important;
    transform: none !important;
    transition: none !important;
    box-sizing: border-box !important;
    pointer-events: auto !important;
  }

  body > .hero-actions.hero-actions-five.is-group-transition.is-group-docked
  .button,
  body > .hero-actions.hero-actions-five.is-group-transition.is-group-docked
  .stay-button {
    box-shadow: 0 8px 20px rgba(0, 0, 0, .24) !important;
  }
}

/* Mobile resting state in the Hero and mobile transition state. */
@media (max-width: 1023px) {
  body:has(.hero-premium)
  .hero-premium
  .hero-actions.hero-actions-five:not(.is-mobile-refined-transition) {
    position: absolute !important;
    left: 50% !important;
    right: auto !important;
    top: auto !important;
    bottom: 14px !important;
    transform: translateX(-50%) !important;

    width: calc(100% - 12px) !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;

    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: var(--primary-action-gap-mobile) !important;
    align-items: stretch !important;
    overflow: visible !important;
    z-index: 20 !important;
  }

  body:has(.hero-premium)
  .hero-actions.hero-actions-five:not(.is-mobile-refined-transition)
  .primary-actions-dock-group {
    display: contents !important;
  }

  body:has(.hero-premium)
  .hero-actions.hero-actions-five:not(.is-mobile-refined-transition)
  .button,
  body:has(.hero-premium)
  .hero-actions.hero-actions-five:not(.is-mobile-refined-transition)
  .stay-button {
    width: 100% !important;
    min-width: 0 !important;
    height: var(--primary-action-height-mobile) !important;
    min-height: var(--primary-action-height-mobile) !important;
    margin: 0 !important;
    padding: 6px 3px !important;
    border-radius: 10px !important;
    font-size: clamp(.54rem, 2.45vw, .72rem) !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    box-sizing: border-box !important;
  }

  .mobile-actions-refined-placeholder {
    display: block !important;
    width: 100% !important;
    height: 0;
    flex: 0 0 auto !important;
    pointer-events: none !important;
  }

  body > .hero-actions.hero-actions-five.is-mobile-refined-transition {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    transform: none !important;
    overflow: visible !important;
    pointer-events: none !important;
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    z-index: var(--primary-action-z) !important;
  }

  body > .hero-actions.hero-actions-five.is-mobile-refined-transition
  .primary-actions-dock-group {
    display: contents !important;
  }

  body > .hero-actions.hero-actions-five.is-mobile-refined-transition .button,
  body > .hero-actions.hero-actions-five.is-mobile-refined-transition
  .stay-button {
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 6px 5px !important;
    border-radius: 10px !important;
    font-size: clamp(.62rem, 2.7vw, .78rem) !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    pointer-events: auto !important;
    transition: none !important;
    will-change: left, top, width, height !important;
    backface-visibility: hidden !important;
  }

  body > .hero-actions.hero-actions-five.is-mobile-refined-transition
  .button,
  body > .hero-actions.hero-actions-five.is-mobile-refined-transition
  .stay-button {
    box-shadow: 0 6px 16px rgba(0, 0, 0, .24) !important;
  }
}

@media (max-width: 380px) {
  body:has(.hero-premium)
  .hero-premium
  .hero-actions.hero-actions-five:not(.is-mobile-refined-transition) {
    width: calc(100% - 8px) !important;
    gap: 3px !important;
  }

  body:has(.hero-premium)
  .hero-actions.hero-actions-five:not(.is-mobile-refined-transition)
  .button,
  body:has(.hero-premium)
  .hero-actions.hero-actions-five:not(.is-mobile-refined-transition)
  .stay-button {
    height: 37px !important;
    min-height: 37px !important;
    padding-inline: 2px !important;
    font-size: clamp(.5rem, 2.35vw, .64rem) !important;
  }
}

/* SMART HOME SECTION SNAP SUPPORT */
html{
  scroll-behavior:auto!important;
  scroll-snap-type:none!important;
}

body:has(.hero-premium) .home-screen-hero,
body:has(.hero-premium) .home-screen-events,
body:has(.hero-premium) .home-screen-guide,
body:has(.hero-premium) .home-screen-editorial,
body:has(.hero-premium) .home-screen-footer{
  scroll-snap-align:none!important;
  scroll-snap-stop:normal!important;
}


/* PERFECT SECTION SNAP SUPPORT */
html{
  overscroll-behavior-y:auto;
  scroll-behavior:auto!important;
}

body:has(.hero-premium){
  touch-action:pan-y;
}


/* DYNAMIC VIEWPORT SECTIONS — account for header + fixed action buttons */
:root{
  --runtime-header-bottom:var(--fixed-header-height);
  --runtime-fixed-actions-height:0px;
  --runtime-content-top:var(--fixed-header-height);
  --runtime-screen-height:calc(100dvh - var(--fixed-header-height));
}

/* Hero: full available screen below the permanent header */
body:has(.hero-premium) .home-screen-hero{
  height:calc(100dvh - var(--fixed-header-height))!important;
  min-height:calc(100dvh - var(--fixed-header-height))!important;
  max-height:calc(100dvh - var(--fixed-header-height))!important;
}

/*
 * Once the action buttons are fixed, Events / Guide / Reportages / Footer
 * each occupy exactly the visible area remaining below all fixed UI.
 */
body:has(.hero-premium) .home-screen-events,
body:has(.hero-premium) .home-screen-guide,
body:has(.hero-premium) .home-screen-editorial,
body:has(.hero-premium) .home-screen-footer{
  height:var(--runtime-screen-height)!important;
  min-height:var(--runtime-screen-height)!important;
  max-height:var(--runtime-screen-height)!important;
  scroll-margin-top:var(--runtime-content-top)!important;
}

/* Internal content must never force a section beyond its visible screen */
body:has(.hero-premium) .home-screen-events > .container,
body:has(.hero-premium) .home-screen-guide > .container,
body:has(.hero-premium) .home-screen-editorial > .container,
body:has(.hero-premium) .home-screen-footer > .container,
body:has(.hero-premium) .home-screen-footer > .footer-inner{
  height:100%!important;
  min-height:0!important;
  max-height:100%!important;
  overflow:hidden!important;
}

/* Modern mobile browser viewport fallback */
@supports (height:100svh){
  body:has(.hero-premium) .home-screen-hero{
    height:calc(100svh - var(--fixed-header-height))!important;
    min-height:calc(100svh - var(--fixed-header-height))!important;
    max-height:calc(100svh - var(--fixed-header-height))!important;
  }
}

/* Runtime JS remains authoritative after measurement on every screen size */
@media (max-width:980px), (orientation:portrait), (orientation:landscape){
  body:has(.hero-premium) .home-screen-events,
  body:has(.hero-premium) .home-screen-guide,
  body:has(.hero-premium) .home-screen-editorial,
  body:has(.hero-premium) .home-screen-footer{
    height:var(--runtime-screen-height)!important;
    min-height:var(--runtime-screen-height)!important;
    max-height:var(--runtime-screen-height)!important;
  }
}


/* ULTRA SMOOTH SNAP SUPPORT */
html.section-snap-active,
html.section-snap-active body{
  scroll-behavior:auto!important;
}

/* Freeze section geometry during snap animation to prevent micro-jumps. */
html.section-snap-active body:has(.hero-premium) .home-screen-events,
html.section-snap-active body:has(.hero-premium) .home-screen-guide,
html.section-snap-active body:has(.hero-premium) .home-screen-editorial,
html.section-snap-active body:has(.hero-premium) .home-screen-footer{
  transition:none!important;
}


/* MOBILE — NATIVE VERTICAL SCROLL + HORIZONTAL CAROUSELS */
@media (pointer:coarse), (max-width:1023px){
  html:has(body .hero-premium),
  body:has(.hero-premium){
    overscroll-behavior-y:auto!important;
  }

  body:has(.hero-premium),
  body:has(.hero-premium) [data-home-section],
  body:has(.hero-premium) [data-home-section] > .container,
  body:has(.hero-premium) .home-screen-footer,
  body:has(.hero-premium) .home-screen-footer *{
    touch-action:pan-y pinch-zoom!important;
  }

  /* Let the browser arbitrate diagonal gestures: horizontal cards still slide,
     while a vertical gesture that starts on a card continues scrolling page. */
  body:has(.hero-premium) .home-event-single-carousel,
  body:has(.hero-premium) [data-home-guide-grid],
  body:has(.hero-premium) .home-editorial-carousel,
  body:has(.hero-premium) .home-event-single-carousel *,
  body:has(.hero-premium) [data-home-guide-grid] *,
  body:has(.hero-premium) .home-editorial-carousel *{
    touch-action:pan-x pan-y pinch-zoom!important;
  }

  /* Guide is a horizontal rail on phones; it must not become a nested
     vertical scroller that captures the page gesture. */
  body:has(.hero-premium) [data-home-guide-grid]{
    overflow-x:auto!important;
    overflow-y:hidden!important;
  }
}
