/* =========================================================
   DESTINATIONS — Tier tokens, Hero, Badge, Panel (clean)
   Requires body classes: tier-romi / tier-duo / (fallback) tier-generic
   ========================================================= */

/* ---------- 1) DESIGN TOKENS ---------- */
:root{
  /* layout */
  --rd-container: 1290px;
  --rd-edge: 1.5rem;
  --panel-gap-side: calc(max(var(--rd-edge), (100vw - var(--rd-container)) / 2));
  --panel-gap-top: clamp(1.75rem, 3vw, 2rem);

  /* hero height */
  --rd-hero-h-desktop: 56vh;
  --rd-hero-h-tablet:  50vh;
  --rd-hero-h-mobile:  44vh;

  /* badge sizing */
  --rd-badge-w: 150px;
  --rd-badge-r: 1.16;           /* 580 / 500 */
  --rd-badge-overhang: 14px;

  /* default accent (overridden by tier classes below) */
  --tier-accent: #6A7786;

  /* title/intro readability shadows (hero only) */
  --heading-shadow: 0 2px 12px rgba(0,0,0,.35);
  --text-shadow:    0 2px 12px rgba(0,0,0,.30);

  /* PANEL knobs (separate for solid vs soft) */
  --panel-radius: 12px;
  --panel-pad-y: clamp(.75rem, 2vw, 1.5rem);
  --panel-pad-x: clamp(1rem,  3vw, 2rem);

  /* solid */
  --panel-solid-tint: 32%;      /* how much tier colour to mix into black */
  --panel-solid-edge: 36%;      /* border tint strength */

  /* soft / frosted */
  --panel-soft-alpha: .22;      /* base darkness of the blur layer */
  --panel-soft-tint:  22%;      /* how much tier colour to mix into blur */
  --panel-soft-edge:  28%;      /* border tint strength */
	 --panel-max: 820px; /* cap for very wide screens (tweak 720–960px) */
	
}

/* ---------- 1.1 TIER ACCENTS ---------- */
body.single-destination.tier-romi    { --tier-accent:#344E5A; }
body.single-destination.tier-duo     { --tier-accent:#F09530; }
body.single-destination.tier-generic { --tier-accent:#6A7786; }

/* Do NOT force site-wide body text colour anymore.
   Headings inside the hero are styled below; normal content stays theme-driven. */


/* =========================================================
   2) HERO
   Structure inside the Kadence row (.rd-hero):
     [romiduo_img_abs class="rd-hero-img" base="hero"]
     (optional) .rd-hero-body (can hold .rd-hero-intro)
     core Post Title block
     [romiduo_badge class="rd-badge rd-pos-bl|rd-pos-br"]
     (optional) .rd-hero-panel (is-solid / is-soft)
   ========================================================= */

.rd-hero{
  position: relative;
  overflow: visible;
  background: transparent;
  z-index: 0;
}

/* background image */
.rd-hero .rd-hero-img{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
  z-index: 0;
}

/* overlay (tier-tinted very lightly) */
.rd-hero::before{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(
    to top,
    color-mix(in srgb, #000 70%, var(--tier-accent) 30%) 0%,
    transparent 60%
  );
  pointer-events:none;
  z-index:1;
}

/* kill Kadence inner gutters on this row */
.rd-hero > .kt-row-layout-inner,
.rd-hero > .kt-row-column-wrap{ padding-left:0; padding-right:0; }

/* hero body (drives height; keep even if empty) */
.rd-hero-body{
  position: relative; z-index: 2;
  margin: 0 auto; width: 100%;
  background: transparent;
  min-height: var(--rd-hero-h-desktop);
  display: flex; align-items: flex-start;
  overflow: visible;
}

/* ---------- Title & Intro (outside any panel) ---------- */
.rd-hero .wp-block-post-title{
  /* prevent vertical stacking & keep consistent left alignment */
  display: block;
  width: 100%;
  max-width: 900px;
  writing-mode: horizontal-tb;
  white-space: normal; word-break: normal; overflow-wrap: break-word;

  position: relative; z-index: 2;
  margin: 0;
  padding-top: clamp(24px, 6vw, 48px); /* top rhythm only when NOT in a panel */
  margin-left:  var(--panel-gap-side);
  margin-right: var(--panel-gap-side);

  color: #fff; text-align: left;
  text-shadow: var(--heading-shadow);
  font-size: clamp(28px, 6vw, 56px);
}
.rd-hero .rd-hero-intro{
  position: relative; z-index: 2; display: block;
  margin: .35rem 0 0;
  margin-left:  var(--panel-gap-side);
  margin-right: var(--panel-gap-side);
  max-width: 60ch; color: #fff; line-height: 1.35;
  text-shadow: var(--text-shadow);
}

/* If a title/intro lives INSIDE a panel, remove the outer margins/padding
   so the panel’s own padding controls the look. */
.rd-hero-panel .wp-block-post-title{
  margin-left: 0; margin-right: 0; padding-top: 0;
}
.rd-hero-panel .rd-hero-intro{
  margin-left: 0; margin-right: 0; margin-top: .5rem;
}

/* ---------- Badge ---------- */
.rd-hero .rd-badge{
  position: absolute; z-index: 3;
  bottom: calc(-1 * var(--rd-badge-overhang));
  width: var(--rd-badge-w);
  height: calc(var(--rd-badge-w) * var(--rd-badge-r));
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.25));
  pointer-events: none;
}
.rd-hero .rd-pos-bl{ left:  var(--panel-gap-side); }
.rd-hero .rd-pos-br{ right: var(--panel-gap-side); }

/* gentle fade-up for title/intro */
@media (prefers-reduced-motion: no-preference){
  .rd-hero .wp-block-post-title,
  .rd-hero .rd-hero-intro{
    opacity:0; transform: translateY(8px);
    animation: rd-fade-up .6s ease-out .05s forwards;
    will-change: opacity, transform;
  }
  .rd-hero .rd-hero-intro{ animation-delay:.12s; }
}
@keyframes rd-fade-up{ to{ opacity:1; transform: translateY(0); } }

/* badge “stamp” */
@media (prefers-reduced-motion: no-preference){
  .rd-hero .rd-badge{
    opacity:0;
    transform: scale(1.25) rotate(-8deg);
    transform-origin: center bottom;
    animation: rd-badge-stamp .7s cubic-bezier(.28,1.4,.36,1) 2.2s forwards;
    will-change: opacity, transform;
  }
}
@keyframes rd-badge-stamp{
  0%   { opacity:0;   transform:scale(1.25) rotate(-8deg); }
  55%  { opacity:1;   transform:scale(0.92) rotate( 2deg); }
  75%  {              transform:scale(1.05) rotate(-1deg); }
  100% { opacity:1;   transform:scale(1)    rotate( 0deg); }
}
@media (prefers-reduced-motion: reduce){
  .rd-hero .rd-badge{ opacity:1; transform:none; animation:none; }
}

/* never clip the overhang/content */
.rd-hero,
.rd-hero .kt-row-layout-inner,
.rd-hero .kt-row-column-wrap{ overflow: visible !important; }

/* responsive height + badge */
@media (max-width:1024px){
  .rd-hero-body{ min-height: var(--rd-hero-h-tablet); }
}
@media (max-width:767px){
  .rd-hero-body{ min-height: var(--rd-hero-h-mobile); }
  :root{
    --rd-badge-w: 120px;
    --rd-badge-overhang: 10px;
  }
  .rd-hero .rd-hero-img{ object-position: center 40%; }
}


/* =========================================================
   3) HERO PANEL (optional)
   Add class "rd-hero-panel" to any Kadence Row/Section inside the hero,
   then choose ONE of: "is-solid" or "is-soft"
   ========================================================= */
.rd-hero-panel{
  position: relative;
  z-index: 3;
  display: block;

  /* fixed: responsive width that respects side margins */
  max-width: clamp(320px, calc(100% - (2 * var(--panel-gap-side))), 1100px);
  margin: var(--panel-gap-top) var(--panel-gap-side) 0;

  padding: var(--panel-pad-y) var(--panel-pad-x);
  border-radius: var(--panel-radius);
  box-shadow: 0 4px 24px rgba(0,0,0,.25);
  text-align: left;
}

/* Cap the panel on wide screens, keep it left-aligned */
@media (min-width: 1025px){
  .rd-hero-panel{
    width: min(
      calc(100% - (2 * var(--panel-gap-side))), /* respect content edges */
      var(--panel-max)                          /* stop getting too wide */
    );
    margin-right: auto; /* keeps the panel hugged left */
  }
}

.rd-hero-panel {
  color:#fff; text-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.rd-hero-panel h1,
.rd-hero-panel p{
  margin: 0 0 .5rem 0; color:#fff; text-shadow: 0 2px 8px rgba(0,0,0,.3);
}


/* solid — colour-forward, no heavy black */
.rd-hero-panel.is-solid{
  background: color-mix(
    in srgb,
    #000 calc(100% - var(--panel-solid-tint)),
    var(--tier-accent) var(--panel-solid-tint)
  );
  border: 1px solid color-mix(in srgb, var(--tier-accent) var(--panel-solid-edge), transparent);
}

/* soft — frosted with a hint of tier */
.rd-hero-panel.is-soft{
  background: color-mix(
    in srgb,
    rgba(0,0,0,var(--panel-soft-alpha)) calc(100% - var(--panel-soft-tint)),
    var(--tier-accent) var(--panel-soft-tint)
  );
  backdrop-filter: blur(8px);
  border: 1px solid color-mix(in srgb, var(--tier-accent) var(--panel-soft-edge), transparent);
}

/* subtle inner edge */
.rd-hero-panel::before{
  content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  border: 2px solid color-mix(in srgb, var(--tier-accent) 28%, transparent);
  opacity: .9;
}


/* =========================================================
   4) QUICK TUNING (what to tweak)
   ---------------------------------------------------------
   • Panel top spacing:       --panel-gap-top
   • Panel left/right align:  --panel-gap-side   (auto-aligned to content gutter)
   • Panel internal padding:  --panel-pad-x / --panel-pad-y
   • Solid intensity:         --panel-solid-tint (higher = more tier colour)
   • Soft transparency:       --panel-soft-alpha (lower = more transparent)
   • Soft tint:               --panel-soft-tint
   --------------------------------------------------------- */


/* Destinations Duo/Romi strip */

.tier-strip {
  padding: 0.75rem 1rem;
  margin: 0 0 1.75rem 0;
  border-radius: 0 0 12px 12px;
  font-size: 0.95rem;
  line-height: 1.45;
  border-left: 4px solid transparent;
}

.tier-strip strong {
  font-weight: 600;
}

/* Duo styling */
body.tier-duo .tier-strip {
  background: rgba(255, 140, 0, 0.14);
  border-left-color: #FF8C00;
  color: #442E00;
}

/* ROMI – brand-authentic with a clear blue background */
body.single-destination.tier-romi .tier-strip {

  /* Light blue wash (not derived from the dark slate accent) */
  background: rgba(80, 140, 255, 0.15);

  /* LEFT EDGE = exact Romi accent blue #344E5A */
  border-left-color: #344E5A;

  /* Text: readable, slightly blue-grey, harmonious */
  color: #2B3F48; /* deepened version of the accent family */
}

@media (max-width: 767px) {
  .tier-strip {
    margin-bottom: 1.25rem;
    font-size: 0.92rem;
  }
}

/* ============= Romi sidebar panel ============= */

/* Outer wrapper = the right-hand Kadence column */
.romi-panel-wrap {
  position: relative;
  margin: 2rem 0;              /* breathing room from neighbours */
}

/* The actual blue info box */
.romi-panel {
  position: relative;
  background: #F6F8FC;         /* light cool grey/blue */
  border-left: 4px solid #344E5A; /* Romi blue */
  border-radius: 16px;
  padding: 2.5rem 1.5rem 1.75rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
  overflow: visible;
  color: #2B3F48;              /* readable blue-grey */
}

/* Romi image “peeking” over the top */
.romi-panel__romi {
  position: absolute;
  top: -38px;
  left: 1.5rem;
  width: 90px;
  height: auto;
  pointer-events: none;
  z-index: 3;
}

/* Panel title: "What I discovered" */
.romi-panel__title {
  margin: 0 0 0.75rem;
  padding-top: 1.75rem;   /* ensures text clears Romi’s head */
  font-size: 1.05rem;
  font-weight: 600;
  color: #1F3541;
}

/* Section headings: Local fact / What's popular / Local flavours */
.romi-panel__subheading,
.romi-panel h4 {
  margin: 1.1rem 0 0.25rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #344E5A;
}

.romi-panel__text,
.romi-panel p {
  margin: 0 0 0.5rem;
  font-size: 0.93rem;
  line-height: 1.45;
}

.romi-panel p:last-child {
  margin-bottom: 0;
}

@media (max-width: 767px) {
  .romi-panel {
    padding: 2.25rem 1.25rem 1.5rem;
  }
  .romi-panel__romi {
    top: -32px;
    width: 78px;
  }
  .romi-panel__title {
    padding-top: 1.5rem;
  }
}

/* =========================
   Romi & Duo — Card Grid
   ========================= */

/* Optional: brand colours */
:root {
  --romi-blue: #344E5A;   /* adjust to your exact Romi blue */
  --duo-orange: #F09530;  /* adjust to your exact Duo orange */
}

/* Container: grid of cards */
.rd-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin: 24px 0;
}

/* Variant hook (card vs compact) */
.rd-cards--card .rd-card__body {
  padding: 1rem 1.1rem 1.05rem;
}

.rd-cards--compact .rd-card__body {
  padding: 0.75rem 0.9rem 0.85rem;
}

/* Individual card */
.rd-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  transition:
    box-shadow 0.25s ease,
    transform 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}

/* Hover lift */
.rd-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

/* Tier highlighting
   These rely on cards.php outputting:
   rd-card rd-card--tier-romi / rd-card--tier-duo / rd-card--tier-none
*/
.rd-card {
  border-top: 4px solid transparent;
}

/* Romi tier – blue accent + subtle tint */
.rd-card--tier-romi {
  border-top-color: var(--romi-blue);
  background: linear-gradient(
    to bottom,
    rgba(23, 117, 200, 0.05),
    #ffffff
  );
}

/* Duo tier – orange accent + subtle tint */
.rd-card--tier-duo {
  border-top-color: var(--duo-orange);
  background: linear-gradient(
    to bottom,
    rgba(255, 122, 47, 0.07),
    #ffffff
  );
}

/* Optional: unknown / no tier */
.rd-card--tier-none,
.rd-card--tier-unknown {
  border-top-color: rgba(148, 163, 184, 0.6);
}

/* Media (card image) */
.rd-card__media {
  display: block;
  overflow: hidden;
}

.rd-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

/* Gentle zoom on hover */
.rd-card:hover .rd-card__media img {
  transform: scale(1.04);
}

/* Body */
.rd-card__body {
  display: flex;
  flex-direction: column;
}

/* Title */
.rd-card__title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  line-height: 1.25;
  font-weight: 600;
}

.rd-card__title a {
  color: #0f172a;
  text-decoration: none;
}

.rd-card__title a:hover {
  text-decoration: underline;
}

/* Caption (summary_short / excerpt)
   Only appears when show_caption="1" is passed in the shortcode.
*/
.rd-card__caption {
  margin-top: 0.25rem;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #475569;
  max-height: 4.2em; /* ≈3 lines */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* Chips row (place type, group, price, mood) */
.rd-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.15rem 0 0.25rem;
}

/* Base chip */
.rd-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  line-height: 1.2;
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: #475569;
  background-color: rgba(248, 250, 252, 0.9);
}

/* Variants */
.rd-chip--group {
  border-color: rgba(56, 189, 248, 0.6);
  background-color: rgba(56, 189, 248, 0.06);
}

.rd-chip--type {
  border-color: rgba(129, 140, 248, 0.6);
  background-color: rgba(129, 140, 248, 0.06);
}

.rd-chip--price {
  border-color: rgba(248, 181, 82, 0.8);
  background-color: rgba(248, 181, 82, 0.08);
}

.rd-chip--mood {
  border-color: rgba(94, 234, 212, 0.7);
  background-color: rgba(94, 234, 212, 0.10);
}

/* Inherited mood (coming from parent city / country etc.) */
.rd-chip--mood.is-inherited {
  opacity: 0.85;
  font-style: italic;
}

/* Badge overlay
   cards.php wraps [romiduo_badge] as:
   <div class="rd-card__badge">…</div>
*/
.rd-card__badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  pointer-events: none; /* keep entire card clickable */
}

.rd-card__badge img {
  display: block;
  width: 64px;
  height: auto;
}

@media (max-width: 640px) {
  .rd-card__badge img {
    width: 52px;
  }
}

/* Card summary (short caption under title) */
.rd-card__summary {
  margin: 6px 0 10px;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #404040; /* or whatever your body text colour is */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}