/* Roamly desktop system v1
   Loaded last so the visual shell has one predictable source of truth. */
:root{
  --roamly-max:1480px;
  --roamly-gutter:clamp(1rem,3.4vw,4.5rem);
  --roamly-ink:#082f49;
  --roamly-muted:#5f7480;
  --roamly-line:#dce8e8;
  --roamly-surface:#fff;
  --roamly-shadow:0 18px 46px rgba(8,47,73,.09);
}

*,*:before,*:after{box-sizing:border-box}
html{overflow-x:clip}
body{min-width:320px;overflow-x:clip}
img,svg,video,canvas,iframe{max-width:100%}

/* Header: a stable four-column shell instead of a flex row that can squeeze. */
.site-header{
  position:sticky;
  top:0;
  z-index:80;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto auto;
  align-items:center;
  gap:clamp(.35rem,1.1vw,1.1rem);
  width:100%;
  min-width:0;
  height:76px;
  padding-inline:max(1rem,calc((100vw - var(--roamly-max))/2 + 1rem));
  overflow:visible;
}
.site-header .brand{min-width:max-content;flex:0 0 auto}
.site-header .site-nav{display:flex;align-items:center;justify-content:flex-end;gap:.12rem;min-width:0;overflow:visible}
.site-header .nav-group{min-width:0;position:relative}
.site-header .nav-trigger,.site-header .nav-direct,.site-header .nav-account{min-height:44px;white-space:nowrap}
.site-header .nav-trigger{max-width:100%;overflow:hidden;text-overflow:ellipsis}
.site-header .icon-btn{width:42px;height:42px;display:grid;place-items:center;flex:0 0 42px}
.site-header .nav-menu{z-index:120;max-width:calc(100vw - 2rem);max-height:calc(100vh - 92px);overflow:auto}
.site-header .nav-group:last-of-type .nav-menu{left:auto;right:0}

/* Page frame: all pages share the same reading width and horizontal rhythm. */
#main{
  width:100%;
  max-width:var(--roamly-max);
  min-width:0;
  margin-inline:auto;
  padding-inline:var(--roamly-gutter);
}
#main>.page{width:100%;max-width:none;min-width:0;margin:0;padding:clamp(2rem,4vw,4rem) 0 clamp(4rem,7vw,7rem)}
#main>.page>*{min-width:0}
.page-title{min-width:0;margin-bottom:clamp(1.5rem,3vw,2.5rem)}
.page-title h1,.page-title h2,.section-head h1,.section-head h2{max-width:100%;overflow-wrap:anywhere}
.section-head,.section-heading{min-width:0}

/* Full-bleed editorial pages use the whole viewport while keeping text constrained. */
#main:has(.home-v3){max-width:none;padding-inline:0}
.home-v3-hero,.home-v3-section{width:100%;max-width:none}
.home-v3-hero>*{min-width:0}
.home-v3-section>*{min-width:0}

/* Destination guides read like an editorial spread rather than a stack of boxes. */
.destination-hero{min-height:390px;display:grid;align-items:end;margin-inline:0;border-radius:0 0 28px 28px}
.destination-hero>div{width:min(100%,900px);min-width:0}
.destination-hero h1{max-width:780px;overflow-wrap:anywhere}
.destination-page{min-width:0}
.destination-page .fact-ribbon{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;overflow:hidden;padding:0}
.destination-page .fact-ribbon>div{min-width:0;padding:1.15rem 1.25rem}
.destination-page .fact-ribbon>div+div{border-left:1px solid var(--roamly-line)}
.destination-page .destination-copy-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(260px,.75fr);gap:clamp(2rem,6vw,6rem);max-width:1180px;margin-inline:auto}
.destination-page .destination-copy-grid>div,.destination-page .destination-copy-grid>aside{min-width:0}
.destination-page .destination-copy-grid aside{align-self:start;padding:1.25rem 1.35rem;border:1px solid var(--roamly-line);border-radius:20px;background:linear-gradient(145deg,#f5fbfa,#fff);box-shadow:var(--roamly-shadow)}
.destination-page .place-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}
.destination-page .place-card{min-width:0;display:flex;flex-direction:column}
.destination-page .place-card .btn{align-self:flex-start;margin-top:auto}

/* Every repeated card collection gets a fluid grid with no fixed-width overflow. */
.card-grid,.content-grid,.country-directory-grid,.article-grid,.tool-grid,.tool-seo-grid,.events-grid,.events-guide-grid,.country-profile-grid,.country-live-grid,.food-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));min-width:0}
.country-directory,.country-guide,.events-page,.finder-page,.flight-page{width:100%;max-width:1180px;margin-inline:auto;min-width:0}
.country-card,.article-card,.content-card,.tool-card,.event-card,.food-card,.country-live-card{min-width:0;overflow:hidden}
.country-card h3,.country-card p,.article-card h3,.content-card h3,.event-card h3{overflow-wrap:anywhere}
.table-wrap,.data-table-wrap{width:100%;max-width:100%;overflow-x:auto;border-radius:16px}
.data-table{min-width:660px}

/* Forms stay aligned on wide screens and collapse without creating horizontal scroll. */
.form-grid{grid-template-columns:repeat(4,minmax(0,1fr));min-width:0}
.form-grid>*{min-width:0}
.form-grid .wide{grid-column:span 2}
input,select,textarea{max-width:100%}
.tools-workspace{grid-template-columns:minmax(220px,280px) minmax(0,1fr);min-width:0}
.trip-layout{grid-template-columns:minmax(0,1fr) minmax(260px,340px);min-width:0}
.trip-layout>*{min-width:0}

/* Keep decorative motion refined and never let it change the layout footprint. */
.card,.article-card,.content-card,.place-card,.tool-card,.event-card{transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease}
.card:hover,.article-card:hover,.content-card:hover,.place-card:hover,.event-card:hover{transform:translateY(-3px)}
:focus-visible{outline:3px solid rgba(20,140,130,.34);outline-offset:3px}

@media (min-width:901px) and (max-width:1220px){
  .site-header{gap:.3rem;padding-inline:1rem}
  .site-header .nav-trigger,.site-header .nav-direct,.site-header .nav-account{font-size:.78rem;padding-inline:.42rem}
  .site-header .nav-account{margin-left:.05rem}
  .site-header .icon-btn{width:36px;flex-basis:36px}
  .destination-page .destination-copy-grid{gap:2.5rem}
}
@media (max-width:1080px) and (min-width:901px){
  .site-header .site-nav{display:none!important;position:absolute;top:calc(100% + .55rem);left:1rem;right:1rem;align-items:stretch;flex-direction:column;gap:.25rem;padding:.65rem;border:1px solid rgba(160,196,195,.5);border-radius:18px;background:rgba(255,255,255,.98);box-shadow:0 18px 45px rgba(8,47,73,.18)}
  .site-header .site-nav.open{display:flex!important}
  .site-header .menu-btn{display:block!important;margin-left:auto}
  .site-header .nav-group{width:100%}
  .site-header .nav-trigger,.site-header .nav-account{width:100%;justify-content:space-between;text-align:left}
  .site-header .nav-account{justify-content:center;margin:.25rem 0 0}
  .site-header .nav-menu{position:static!important;width:auto!important;max-height:none;display:none!important;grid-template-columns:1fr;transform:none!important;box-shadow:none;border:0;background:#f3faf8}
  .site-header .nav-menu.is-open{display:grid!important}
  .home-v3-hero{grid-template-columns:1fr;min-height:auto;padding-top:4.5rem}
  .home-v3-copy{grid-row:1}.home-v3-quick{grid-row:2}.home-v3-visual{grid-row:3;min-height:430px}
  .destination-page .destination-copy-grid{gap:2rem}
  .destination-page .place-row{grid-template-columns:repeat(2,minmax(0,1fr))}
  .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .form-grid .wide{grid-column:1/-1}
  footer{grid-template-columns:1fr 1fr}
}
@media (max-width:900px){
  #main{padding-inline:1rem}
  #main:has(.home-v3){padding-inline:0}
  .site-header{height:70px;padding-inline:1rem;grid-template-columns:auto minmax(0,1fr) auto auto}
  .site-header .site-nav{display:none}
  .site-header .site-nav.open{display:flex}
  .destination-page .fact-ribbon{grid-template-columns:repeat(2,minmax(0,1fr))}
  .destination-page .fact-ribbon>div:nth-child(3){border-left:0;border-top:1px solid var(--roamly-line)}
  .destination-page .fact-ribbon>div:nth-child(4){border-top:1px solid var(--roamly-line)}
  .destination-page .destination-copy-grid{grid-template-columns:1fr;gap:1.5rem}
  .destination-page .place-row{grid-template-columns:repeat(2,minmax(0,1fr))}
  .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .form-grid .wide{grid-column:1/-1}
}
@media (max-width:620px){
  .destination-hero{min-height:330px;border-radius:0 0 20px 20px}
  .destination-page .place-row,.form-grid{grid-template-columns:1fr}
  .form-grid .wide{grid-column:auto}
  .tools-workspace,.trip-layout{grid-template-columns:1fr}
}
@media (prefers-reduced-motion:reduce){
  .card:hover,.article-card:hover,.content-card:hover,.place-card:hover,.event-card:hover{transform:none}
}
