/* dest-cards.css — animated stay cards for destinations.html. Load AFTER inner.css. Uses premium.css tokens. */

/* ---------- card ---------- */
.dc{position:relative;display:flex;flex-direction:column}
.dc__b{display:flex;flex-direction:column;flex:1;position:relative;z-index:1;background:#fff}
.dc__b .btn{align-self:flex-start;margin-top:auto}
.dc__b .pr{margin-bottom:1.4rem}
/* staggered rise-in on load/scroll (premium.js adds .in) */
.js .dc.rv{transition:opacity 1s var(--ease),transform 1s var(--ease),box-shadow .5s;transition-delay:var(--d,0s),var(--d,0s),0s}
/* title underline that draws on hover */
.dc h2{display:inline;background:linear-gradient(var(--brass),var(--brass)) 0 100%/0 2px no-repeat;transition:background-size .7s var(--ease);padding-bottom:.08em}
.dc:hover h2{background-size:100% 2px}
.dc .pr b{transition:transform .6s var(--ease),color .4s}
.dc:hover .pr b{transform:translateX(6px)}

/* ---------- slider frame ---------- */
.dc__img{position:relative;display:block;aspect-ratio:4/5;overflow:hidden;background:var(--g9);touch-action:pan-y;--px:0px;--qy:0px;--py:0px;isolation:isolate}
.dc__track{position:absolute;inset:0;z-index:0}
.js .dc__track{scale:1.18;transition:scale 1.8s var(--ease)}
.js .dc.in .dc__track,.js .card.in .dc__track{scale:1}
.dc__slide{position:absolute;inset:0;margin:0;overflow:hidden;opacity:0;visibility:hidden;clip-path:inset(0 0 0 100%)}
[data-dir="prev"] .dc__slide{clip-path:inset(0 100% 0 0)}
.dc__slide.on{opacity:1;visibility:visible;z-index:2;clip-path:inset(0);transition:clip-path 1.1s var(--ease)}
.dc__slide.out{opacity:1;visibility:visible;z-index:1;clip-path:inset(0);transition:none}
/* parallax image: oversized so it can drift inside the frame */
.dc__slide img{position:absolute;left:-5%;top:-8%;width:110%;height:116%;max-width:none;object-fit:cover;
  translate:var(--px) calc(var(--py) + var(--qy));transition:translate .9s var(--ease)}
.dc__slide.on img,.dc__slide.out img{animation:dckb 6.8s cubic-bezier(.2,.6,.3,1) both}
@keyframes dckb{from{scale:1.16}to{scale:1}}
/* neutralise inner.css hover zoom (we use scale for Ken Burns) */
.dc:hover .dc__slide img{transform:none}
.dc__img img{transition:translate .9s var(--ease)}

/* overlays */
.dc__img::after{content:"";position:absolute;inset:0;z-index:3;pointer-events:none;
  background:linear-gradient(180deg,rgba(var(--g9rgb),.35),transparent 28%,transparent 60%,rgba(var(--g9rgb),.7))}
.dc__img::before{content:"";position:absolute;inset:0;z-index:4;pointer-events:none;opacity:0;mix-blend-mode:soft-light;transition:opacity .5s;
  background:radial-gradient(260px circle at var(--mx,50%) var(--my,50%),rgba(255,236,190,.9),transparent 70%)}
.dc:hover .dc__img::before{opacity:.75}
.dc__lnk{position:absolute;inset:0;z-index:5}
.dc__lnk:focus-visible{outline:2px solid var(--brass);outline-offset:-4px}

/* ---------- slider UI ---------- */
.dc__count{position:absolute;z-index:6;top:1rem;left:1rem;padding:.35rem .8rem;border-radius:99px;font:500 .72rem Jost;letter-spacing:.16em;color:#fff;
  background:rgba(var(--g9rgb),.5);backdrop-filter:blur(8px);border:1px solid rgba(255,255,255,.2);pointer-events:none}
.dc__nav{position:absolute;z-index:6;top:50%;width:42px;height:42px;margin-top:-21px;border-radius:50%;border:1px solid rgba(255,255,255,.4);
  background:rgba(var(--g9rgb),.45);backdrop-filter:blur(8px);color:#fff;font:400 1.1rem/1 Jost;cursor:pointer;display:grid;place-items:center;
  opacity:0;transition:opacity .35s,background .3s,color .3s,border-color .3s,translate .5s var(--ease)}
.dc__nav.prev{left:.8rem;translate:-10px 0}
.dc__nav.next{right:.8rem;translate:10px 0}
.dc:hover .dc__nav,.dc__img:focus-within .dc__nav{opacity:1;translate:0 0}
.dc__nav:hover{background:var(--brass);border-color:var(--brass);color:var(--g9)}
.dc__dots{position:absolute;z-index:6;left:0;right:0;bottom:1.1rem;display:flex;justify-content:center;gap:.45rem}
.dc__dots button{width:8px;height:8px;padding:0;border-radius:99px;border:0;background:rgba(255,255,255,.5);cursor:pointer;transition:width .5s var(--ease),background .3s}
.dc__dots button.on{width:26px;background:var(--brass)}
.dc__bar{position:absolute;z-index:6;left:0;right:0;bottom:0;height:3px;background:rgba(255,255,255,.16);pointer-events:none}
.dc__bar i{display:block;height:100%;background:var(--brass);transform-origin:0 50%;transform:scaleX(0);transition:transform .1s linear}
@media(hover:none){.dc__nav{opacity:.9;translate:0 0;width:36px;height:36px;margin-top:-18px}}

/* soft light sweep across the card when it first appears */
.dc.in .dc__img::before{animation:none}

@media(max-width:960px){.dc__img{aspect-ratio:4/3.4}}
@media(prefers-reduced-motion:reduce){
  .dc__slide.on img,.dc__slide.out img{animation:none}
  .js .dc__track{scale:1}
  .dc__slide img{translate:none}
}

/* ================= NEW LAYOUT: featured first card + 2-column grid ================= */
.dgrid{grid-template-columns:repeat(2,1fr);gap:2.2rem}
.dgrid .dc__img{aspect-ratio:16/11}
.dc__b{padding:1.8rem}
.dc h2{font-size:clamp(1.9rem,2.6vw,2.4rem)}
/* first card: wide, image left / details right */
.dgrid .dc:first-child{grid-column:1/-1;flex-direction:row;min-height:460px}
.dgrid .dc:first-child .dc__img{flex:0 0 58%;aspect-ratio:auto}
.dgrid .dc:first-child .dc__b{justify-content:center;padding:clamp(2rem,4vw,3.6rem)}
.dgrid .dc:first-child .dc__b::before{content:"Featured stay";display:inline-block;align-self:flex-start;margin-bottom:1rem;padding:.35rem .9rem;border-radius:99px;
  font:500 .72rem Jost;letter-spacing:.16em;text-transform:uppercase;color:var(--g9);background:linear-gradient(135deg,var(--brassl),var(--brass))}
.dgrid .dc:first-child h2{font-size:clamp(2.4rem,4vw,3.6rem)}
.dgrid .dc:first-child .pr b{font-size:3rem}
.dgrid .dc:first-child .dc__b .btn{margin-top:.4rem}
@media(max-width:960px){
  .dgrid{grid-template-columns:1fr}
  .dgrid .dc:first-child{flex-direction:column;min-height:0}
  .dgrid .dc:first-child .dc__img{flex:none;aspect-ratio:4/3.4}
  .dgrid .dc__img{aspect-ratio:4/3.4}
}

/* ===== v2: informative cards ===== */
.ph-lead{max-width:36rem;margin:1rem 0 0;color:rgba(255,255,255,.85);font:400 1.1rem/1.6 Jost,sans-serif}
.ph-chips{list-style:none;margin:1.3rem 0 0;padding:0;display:flex;flex-wrap:wrap;gap:.5rem}
.ph-chips li{padding:.35rem .85rem;border:1px solid rgba(230,194,124,.5);border-radius:999px;background:rgba(11,21,36,.35);color:#f1deb4;font:500 .82rem Jost,sans-serif}
.dc__meta{display:flex;flex-wrap:wrap;gap:.45rem;margin-bottom:.8rem}
.dc__tag{padding:.28rem .8rem;border-radius:99px;background:var(--g9);color:var(--brassl);font:500 .7rem Jost;letter-spacing:.14em;text-transform:uppercase}
.dc__bf{padding:.28rem .8rem;border-radius:99px;border:1px solid var(--line2);font:500 .8rem Jost;color:var(--mut)}
.dc__f{list-style:none;display:flex;flex-wrap:wrap;gap:.4rem;padding:0;margin:1rem 0 0}
.dc__f li{padding:.25rem .75rem;border-radius:99px;background:#f4efe5;font-size:.85rem;color:#16304c}
.dc__f li::before{content:"\2713";margin-right:.35rem;color:#0b6b4f;font-weight:600}
.dc .pr{flex-wrap:wrap}
.dc .dc__wk{margin:-.9rem 0 1.2rem;font-size:.88rem;color:var(--mut)}
.dc__act{display:flex;flex-wrap:wrap;gap:.6rem;margin-top:auto}
.dc__b .dc__act .btn{margin:0;align-self:auto}
/* last card: wide, mirrored */
.dgrid .dc:last-child:nth-child(even){grid-column:1/-1;flex-direction:row-reverse;min-height:440px}
.dgrid .dc:last-child:nth-child(even) .dc__img{flex:0 0 52%;aspect-ratio:auto}
.dgrid .dc:last-child:nth-child(even) .dc__b{justify-content:center;padding:clamp(2rem,4vw,3.2rem)}
.dgrid .dc:last-child:nth-child(even) .dc__b::before{content:"New stay";display:inline-block;align-self:flex-start;margin-bottom:1rem;padding:.35rem .9rem;border-radius:99px;font:500 .72rem Jost;letter-spacing:.16em;text-transform:uppercase;color:var(--g9);background:linear-gradient(135deg,var(--brassl),var(--brass))}
.dgrid .dc:last-child:nth-child(even) h2{font-size:clamp(2.2rem,3.6vw,3.2rem)}
/* photo buttons are always visible on phones and tablets */
@media(max-width:960px){.dc__nav{opacity:.95;translate:0 0;width:38px;height:38px;margin-top:-19px}
  .dgrid .dc:last-child:nth-child(even){flex-direction:column;min-height:0}
  .dgrid .dc:last-child:nth-child(even) .dc__img{flex:none;aspect-ratio:4/3.4}}
/* guide */
.dguide{margin-top:clamp(2.5rem,6vw,4.5rem);padding:clamp(1.4rem,4vw,2.6rem);border-radius:28px;color:#f4efe5;background:radial-gradient(520px 260px at 100% 0,rgba(230,194,124,.22),transparent 70%),#0b1524}
.dguide h2{font:500 clamp(2rem,4vw,3rem)/1.05 var(--serif);color:#fff;margin:0 0 1rem}
.dguide__g{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem}
.dguide__g div{padding:1.1rem 1.2rem;border-radius:18px;background:rgba(255,255,255,.06);border:1px solid rgba(230,194,124,.3)}
.dguide h3{font:500 1.6rem/1.1 var(--serif);color:var(--brassl);margin:0 0 .4rem}.dguide p{margin:0;color:#cfd6e2}
.dguide p.dguide__l{margin-top:1.2rem}.dguide a{color:#ecd9ac;text-decoration:underline;text-underline-offset:3px}
@media(max-width:800px){.dguide__g{grid-template-columns:1fr}}

/* ===== v3: transition styles (set per card by dest-cards.js via data-fx) ===== */
/* wipe = default (slides in from the side). rise = wipes up from the bottom. fade = cross-fade. */
[data-fx="rise"] .dc__slide{clip-path:inset(100% 0 0 0)}
[data-fx="rise"][data-dir="prev"] .dc__slide{clip-path:inset(0 0 100% 0)}
[data-fx="rise"] .dc__slide.on,[data-fx="rise"] .dc__slide.out{clip-path:inset(0)}
[data-fx="fade"] .dc__slide,[data-fx="fade"][data-dir="prev"] .dc__slide{clip-path:inset(0)}
[data-fx="fade"] .dc__slide.on{transition:opacity 1.2s var(--ease)}

/* ===== v3: informative stay cards (destinations.html) ===== */
.dc__rate{padding:.28rem .8rem;border-radius:99px;background:#f4efe5;color:var(--g7);font:500 .8rem Jost}
.dc__rate::before{content:"\2605";margin-right:.35rem;color:var(--acct)}
.dc__info{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem 1.2rem;margin:1.2rem 0 0;padding:1rem 0 0;border-top:1px solid var(--line)}
.dc__info>div{min-width:0}
.dc__info .wide{grid-column:1/-1}
.dc__info dt{margin:0 0 .15rem;font:500 .68rem Jost;letter-spacing:.16em;text-transform:uppercase;color:var(--mut)}
.dc__info dd{margin:0;font-size:.92rem;line-height:1.4;color:var(--g7)}
.dc__info+.pr{margin-top:1.2rem}
@media(max-width:420px){.dc__info{grid-template-columns:1fr}}

/* ===== v3: ghost button on light cards (premium.css .btn--o is white-on-transparent = invisible on a white card) ===== */
.dc__act .btn--o{color:var(--g7);box-shadow:inset 0 0 0 1.5px var(--line2)}
.dc__act .btn--o::before{background:var(--g7)}
.dc__act .btn--o:hover{color:#fff}

/* ===== v3: index.html stacked stay cards (.stack .card) =====
   index.html loads this file after premium.css plus dest-cards.js, which upgrades each .card__img into a slider.
   Layout rules:
   - desktop (>980px wide AND >=800px tall): the sticky "stack" effect, card body kept compact so a whole card fits on screen
   - everything else (phones, tablets, short laptop windows): normal flow, one card after another, nothing cut off */
.card__img.dc__img{aspect-ratio:auto;min-height:320px}
.card__img .dc__slide img{inset:auto;left:-5%;top:-8%;width:110%;height:116%;transition:translate .9s var(--ease)}
.card:hover .card__img .dc__slide img{transform:none}
.card__img .card__no{z-index:7;pointer-events:none}
.card__img .dc__count{left:auto;right:1rem}
.card__b{padding:clamp(1.4rem,2.6vw,2.4rem);min-width:0}
.card .dc__meta{margin-bottom:.8rem}
.card .lbl{font-size:.74rem}
.card h3{font-size:clamp(2rem,3.2vw,3rem);margin:.4rem 0 .3rem}
.card p.d{margin-top:.3rem;font-size:.98rem;line-height:1.55}
.card .dc__f{margin-top:.8rem}
.card .dc__info{margin-top:.9rem;padding-top:.8rem}
.card .pr{margin:.9rem 0;padding-top:.8rem}
.card .pr b{font-size:2.5rem}
.card .dc__act{margin-top:auto}
.card .dc__act .btn{min-height:48px;padding:0 1.5rem;font-size:.9rem}
.card__b{justify-content:flex-start}
@media(max-width:980px),(max-height:799px){
  .card,.card:nth-child(even){position:relative;top:auto;min-height:0;margin-bottom:1.6rem;transform:none!important;filter:none!important}
}
@media(min-width:981px) and (min-height:800px){.card{top:calc(92px + var(--n)*16px)}}
@media(max-width:980px){
  .card,.card:nth-child(even){grid-template-columns:1fr}
  .card:nth-child(even) .card__img{order:0}
  .card__img.dc__img{aspect-ratio:16/9;min-height:260px}
}
@media(max-width:560px){
  .card__img.dc__img{aspect-ratio:4/3;min-height:230px}
  .card__no{font-size:3.2rem}
  .card .dc__act .btn{flex:1 1 100%;justify-content:center}
}

/* ===== v4: responsive fix for short/small screens (e.g. 1366x640 laptops) =====
   Problem: premium.css stacks cards with `.stack .card{position:sticky;...}` (higher specificity than the v3 `.card` reset),
   so on short screens each card is taller than the viewport and its "View details" button is cut off.
   Fix: sticky-stack effect ONLY when the screen is wide AND tall enough (>=981px x >=800px);
   otherwise cards flow normally, one after another, at their natural height. */
@media (max-width:980px), (max-height:799px){
  .stack{display:block!important;height:auto!important}
  .stack .card,.stack .card:nth-child(even),.card{
    position:relative!important;top:auto!important;
    height:auto!important;min-height:0!important;max-height:none!important;
    margin-bottom:1.6rem!important;
    transform:none!important;filter:none!important;opacity:1!important;
  }
  .stack .card:last-child{margin-bottom:0!important}
  .stack .card__b{overflow:visible!important;height:auto!important}
  .stack .dc__act{margin-top:1.1rem}              /* buttons always visible under content */
  /* short laptop windows: image on the side keeps a sensible height */
  .stack .card__img.dc__img{min-height:300px}
}
/* short but wide screens (1366x640): keep 2-column card, tighten spacing so a card is not huge */
@media (min-width:981px) and (max-height:799px){
  .stack .card__b{padding:1.4rem 1.6rem}
  .stack .card h3{font-size:clamp(1.8rem,2.6vw,2.4rem)}
  .stack .card .pr b{font-size:2.1rem}
}
/* phones: stack image above text, full-width buttons */
@media (max-width:980px){
  .stack .card,.stack .card:nth-child(even){grid-template-columns:1fr!important}
  .stack .card__img.dc__img{order:0!important}
}
@media (max-width:560px){
  .stack .card .dc__info{grid-template-columns:1fr}
  .stack .card .dc__act .btn{flex:1 1 100%;justify-content:center}
}
