/* ==========================================================================
   ABC Tour — destination detail pages (/destinations/<slug>.php).
   Builds on base.css + components.css; only page-specific layout lives here.
   ========================================================================== */

/* ---------- Hero: wide framed illustration + overlapping raised info card ---------- */
.dest-hero { padding-top: clamp(20px, 3vw, 36px); }
.dest-hero__grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: center;
  margin-top: clamp(18px, 2.6vw, 30px);
}
.dest-hero__frame { position: relative; grid-column: 4 / -1; grid-row: 1; height: clamp(440px, 40vw, 540px); }
.dest-hero__frame > img { object-position: 50% 64%; }
.dest-hero__badge { position: absolute; top: 30px; right: 30px; }

.dest-hero__card {
  position: relative; z-index: 2; grid-column: 1 / 6; grid-row: 1;
  padding: clamp(26px, 3.2vw, 44px); border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: 22px 26px 50px -18px rgb(37 42 80 / .42), -14px -14px 34px rgb(var(--shadow-light)), inset 1px 1px 0 rgb(255 255 255 / .8);
}
.dest-hero__tags { --cluster: 10px; }
.dest-hero__title { margin-top: 22px; font-size: clamp(2.5rem, 1.6rem + 3.1vw, 4rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.04; }
.dest-hero__tagline { margin-top: 14px; font-size: var(--fs-md); color: var(--ink-2); }
.dest-hero__where {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 18px; padding-top: 18px;
  border-top: 1.5px dashed rgb(var(--shadow-dark));
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
}
.dest-hero__where .icon { width: 16px; height: 16px; color: var(--accent); }
.dest-hero__ctas { --cluster: 14px; margin-top: 24px; }
.dest-hero__wa .icon { color: var(--wa-dark); }

@media (max-width: 1100px) {
  .dest-hero__card { grid-column: 1 / 7; }
}
@media (max-width: 899px) {
  .dest-hero__grid { grid-template-columns: minmax(0, 1fr); }
  .dest-hero__frame { grid-column: 1; grid-row: 1; height: auto; aspect-ratio: 16 / 9; }
  .dest-hero__card { grid-column: 1; grid-row: 2; margin: -72px clamp(10px, 3vw, 28px) 0; }
}
@media (max-width: 599px) {
  .dest-hero__frame { aspect-ratio: 4 / 3; padding: 9px; }
  .dest-hero__frame > img { border-radius: calc(var(--r-xl) - 9px); }
  .dest-hero__badge { top: 20px; right: 20px; }
  .dest-hero__card { margin: -52px 10px 0; padding: 24px 20px; border-radius: var(--r-lg); }
  .dest-hero__title { margin-top: 18px; }
  .dest-hero__ctas .btn { flex: 1 1 100%; }
}

/* ---------- Quick facts strip ---------- */
.dest-facts {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px);
  margin-top: clamp(36px, 4.5vw, 56px);
}
.fact {
  display: flex; align-items: center; gap: 14px; min-width: 0;
  padding: 16px 18px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--raise);
}
.fact__icon {
  width: 50px; height: 50px; flex: none; border-radius: 50%; display: grid; place-items: center;
  color: var(--accent-2); background: var(--surface); box-shadow: var(--inset-sm);
}
.fact__icon .icon { width: 22px; height: 22px; }
.fact__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fact__label { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.fact__value { font-family: var(--font-display); font-weight: 800; font-size: 1.12rem; line-height: 1.25; color: var(--ink); }
.fact__value small { font-family: var(--font-body); font-weight: 600; font-size: .72rem; color: var(--ink-3); white-space: nowrap; }
/* Keeps a month range ("Jan – Mar") on one line; browsers may break after an en dash even before &nbsp;. */
.fact__range { white-space: nowrap; }

@media (max-width: 980px) { .dest-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) {
  .dest-facts { gap: 14px; margin-top: 32px; }
  .fact { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; }
  .fact__icon { width: 42px; height: 42px; }
  .fact__icon .icon { width: 19px; height: 19px; }
  .fact__value { font-size: 1rem; }
  .fact__value small { display: block; }
}

/* ---------- Shared section rhythm ---------- */
.dest-section { scroll-margin-top: calc(var(--header-h) + 8px); }
.dest-section .section-head__text { max-width: 880px; }

/* ---------- Overview ---------- */
.dest-overview { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4.5vw, 64px); align-items: start; }
.dest-overview__desc { margin-top: 20px; font-size: var(--fs-md); line-height: 1.75; color: var(--ink-2); max-width: 64ch; }

.dest-getting { display: flex; align-items: flex-start; gap: 18px; margin-top: clamp(24px, 3vw, 34px); padding: clamp(20px, 2.6vw, 28px); }
.dest-getting__icon {
  width: 54px; height: 54px; flex: none; border-radius: 18px; display: grid; place-items: center;
  background: var(--grad); color: #fff; box-shadow: var(--glow);
}
.dest-getting__icon .icon { width: 24px; height: 24px; }
.dest-getting__title { font-size: 1.05rem; font-weight: 800; }
.dest-getting__text { margin-top: 6px; font-size: var(--fs-sm); line-height: 1.7; color: var(--ink-2); }

.dest-highlights { padding: clamp(22px, 2.8vw, 34px); }
.dest-highlights__title { display: flex; align-items: center; gap: 12px; font-size: 1.25rem; font-weight: 800; }
.dest-highlights__badge {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); color: #fff; box-shadow: var(--glow);
}
.dest-highlights__badge .icon { width: 18px; height: 18px; }
.dest-highlights__list { margin-top: 14px; }
.dest-highlights__item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding-block: 14px; }
.dest-highlights__item + .dest-highlights__item { border-top: 1.5px dashed rgb(var(--shadow-dark)); }
.dest-highlights__icon {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); color: var(--accent); box-shadow: var(--raise-sm);
}
.dest-highlights__icon .icon { width: 21px; height: 21px; }
.dest-highlights__text { font-weight: 600; line-height: 1.4; color: var(--ink); }
.dest-highlights__num { font-family: var(--font-display); font-weight: 800; font-size: .78rem; letter-spacing: .08em; color: rgb(var(--shadow-dark)); }

@media (max-width: 899px) { .dest-overview { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 599px) {
  .dest-getting { flex-direction: column; gap: 14px; }
  .dest-highlights__item { gap: 12px; }
  .dest-highlights__icon { width: 40px; height: 40px; }
  .dest-highlights__num { display: none; }
  .dest-highlights__item { grid-template-columns: auto minmax(0, 1fr); }
}

/* ---------- Best time to visit ---------- */
.dest-season { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4.5vw, 64px); align-items: center; }
.dest-season__intro .section-lead { margin-top: 16px; }
.dest-climate { margin-top: clamp(24px, 3vw, 32px); max-width: 420px; }
.dest-climate .stat-card__label { display: flex; align-items: center; gap: 8px; }
.dest-climate .stat-card__label .icon { width: 18px; height: 18px; color: var(--cyan); }
.dest-climate .stat-card__text { max-width: 30ch; }
.dest-climate .stat-card__value { padding-right: 80px; }

.dest-months { padding: clamp(22px, 3vw, 38px); }
.dest-months .month-bars { --bar-h: 190px; }
.dest-months__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: clamp(22px, 3vw, 32px); }
.dest-months__title { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; }
.dest-months__title .icon { color: var(--accent); }
.dest-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.dest-legend li { display: inline-flex; align-items: center; gap: 8px; }
.dest-legend__swatch { width: 12px; height: 22px; border-radius: var(--pill); background: var(--panel-3); box-shadow: 0 0 0 3px var(--panel); }
.dest-legend__swatch--best { background: linear-gradient(0deg, #2d5bff, #8e3cff); }
.dest-months__foot { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(22px, 3vw, 30px); }
.dest-months__pill {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border-radius: var(--pill);
  font-size: var(--fs-sm); font-weight: 700; color: #fff; background: var(--grad); box-shadow: var(--glow);
}
.dest-months__pill--plain { color: var(--ink-2); background: var(--surface); box-shadow: var(--inset-sm); }

@media (max-width: 899px) { .dest-season { grid-template-columns: minmax(0, 1fr); } .dest-climate { max-width: none; } }
@media (max-width: 599px) {
  .dest-months { padding: 20px 14px; }
  .dest-months .month-bars { --bar-h: 120px; gap: 4px; }
  .dest-months__top { padding-inline: 6px; }
  .dest-months__foot { padding-inline: 6px; }
}

/* ---------- Packages ---------- */
.dest-packages { padding-top: 14px; align-items: stretch; }
/* Cards share row tracks (head · price · facts · checklist · CTA), so a package name that wraps
   to two lines no longer pushes that card's price box below its neighbours. The absolute
   "Most popular" flag stays out of the grid flow. */
@supports (grid-template-rows: subgrid) {
  .dest-packages .pkg-card { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 18px; }
  .dest-packages .pkg-card__cta { align-self: end; }
}

/* ---------- Itinerary: CSS-only tabs (radio + :has) ---------- */
.itin__tabs { display: flex; width: 100%; max-width: 600px; }
.itin__tabs label { flex: 1 1 0; justify-content: center; min-height: 48px; padding: 0 14px; }
.itin__tab-dn {
  padding: 2px 8px; border-radius: var(--pill); font-size: .7rem; font-weight: 700; letter-spacing: .04em;
  background: rgb(255 255 255 / .1);
}
.itin__tabs input:checked + label .itin__tab-dn { background: rgb(255 255 255 / .22); }

/* Classic shows by default (also the no-:has() fallback); the checked radio picks the visible panel. */
.itin__panel { display: none; margin-top: clamp(26px, 3.4vw, 40px); animation: itin-in .45s var(--ease); }
.itin__panel--classic { display: block; }
.itin:has(#itin-essential:checked) .itin__panel--classic,
.itin:has(#itin-premium:checked) .itin__panel--classic { display: none; }
.itin:has(#itin-essential:checked) .itin__panel--essential,
.itin:has(#itin-premium:checked) .itin__panel--premium { display: block; }
@keyframes itin-in { from { opacity: 0; transform: translateY(8px); } }

.itin__title { margin-bottom: 20px; font-size: var(--fs-xl); font-weight: 800; }
.itin__layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); gap: clamp(20px, 3vw, 36px); align-items: start; }
.itin__summary {
  position: sticky; top: calc(var(--header-h) + 24px);
  display: flex; flex-direction: column; gap: 14px; padding: clamp(20px, 2.4vw, 28px); border-radius: var(--r-xl);
}
.itin__price { display: flex; flex-direction: column; gap: 2px; padding: 16px 20px; border-radius: var(--r); box-shadow: var(--inset-sm); }
.itin__amount { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.7rem, 1.4rem + 1vw, 2.1rem); line-height: 1.1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.itin__per { font-size: var(--fs-xs); color: var(--ink-3); }
.itin__facts { display: grid; gap: 10px; padding: 4px 4px 6px; font-size: var(--fs-sm); color: var(--ink-2); }
.itin__facts li { display: flex; align-items: flex-start; gap: 10px; }
.itin__facts .icon { width: 18px; height: 18px; margin-top: 2px; color: var(--accent); }
.itin__wa .icon { color: var(--wa-dark); }

@media (max-width: 899px) {
  .itin__layout { grid-template-columns: minmax(0, 1fr); }
  .itin__summary { position: static; }
}
@media (max-width: 520px) {
  .itin__tabs label { padding: 0 8px; }
  .itin__tab-dn { display: none; }
}

/* ---------- More in region: region-guide tile (fills the 3-up grid) ---------- */
.dest-more { align-items: stretch; }
.region-tile { position: relative; display: flex; flex-direction: column; padding: 12px; transition: transform .35s var(--ease); }
.region-tile:hover { transform: translateY(-5px); }
.region-tile__media { aspect-ratio: 16 / 10; border-radius: calc(var(--r-lg) - 8px); overflow: hidden; background: var(--panel-2); }
.region-tile__media img { width: 100%; height: 100%; object-fit: cover; opacity: .92; }
.region-tile__body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 16px 8px 6px; }
.region-tile__title { font-size: 1.35rem; font-weight: 800; }
.region-tile__title a:hover { color: #fff; }
.region-tile__text { flex: 1; font-size: var(--fs-sm); color: var(--on-panel-2); }
.region-tile__foot { display: flex; align-items: center; gap: 12px; margin-top: 6px; padding-top: 14px; border-top: 1.5px dashed rgb(255 255 255 / .16); font-size: var(--fs-sm); color: var(--on-panel-2); }
.region-tile__states { display: inline-flex; align-items: center; gap: 6px; }
.region-tile__states .icon { width: 16px; height: 16px; color: var(--cyan); }
.region-tile__go {
  margin-left: auto; width: 44px; height: 44px; flex: none; border-radius: 50%;
  display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: var(--glow);
}

@media (prefers-reduced-motion: reduce) { .itin__panel { animation: none; } }
