/* ==========================================================================
   Global Property Escape — Layout
   Header & navigation, hero, hero search panel, page hero, footer.
   ========================================================================== */

/* ==========================================================================
   1. Header
   ========================================================================== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1200;
  min-height: var(--header-h);
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid rgba(16,42,67,0.08);
  transition: box-shadow var(--transition), background var(--transition), border-color var(--transition);
}
.site-header.is-scrolled {
  box-shadow: var(--shadow-sm);
  background: rgba(255,255,255,0.97);
  border-bottom-color: var(--border-light);
}

/* Desktop header — three protected zones in one CSS Grid:
   LEFT logo column, CENTRE navigation track, RIGHT actions column.
   Each zone stays entirely inside its own column; no element overlaps
   another column. Compact sizing is the base; a 1700px+ tier grows the
   logo and gaps (see "Spacious tier" below). */
.site-header .header-inner {
  width: min(100% - clamp(32px, 4vw, 72px), 1720px);
  max-width: 1720px;
  min-height: var(--header-h);
  margin-inline: auto;
  padding: 8px 0;
  display: grid;
  grid-template-columns: minmax(280px, auto) 1fr;
  grid-template-rows: auto;
  align-items: center;
  align-content: center;
  column-gap: 18px;
}

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-logo {
  width: 46px; height: 46px; border-radius: var(--radius-md);
  background: var(--gradient-primary); display: flex;
  align-items: center; justify-content: center; color: var(--white);
  box-shadow: var(--shadow-sm);
}
.brand-logo svg { width: 24px; height: 24px; }
.brand-name {
  font-family: var(--font-heading); font-weight: 700; font-size: 1.15rem;
  color: var(--primary); line-height: 1.1; letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand-tagline {
  display: block; font-family: var(--font-body); font-size: 0.68rem;
  font-weight: 600; color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase;
}

/* Header brand lockup — LEFT zone */
.site-logo {
  display: inline-flex; align-items: center;
  justify-self: start; min-width: 0; flex-shrink: 0;
  text-decoration: none;
}
.site-logo-image {
  display: block;
  width: clamp(280px, 19vw, 360px); height: auto;
  max-height: 88px; object-fit: contain; object-position: left center;
  transition: transform .2s ease;
}
.site-logo:hover .site-logo-image { transform: translateY(-1px); }

/* Desktop nav — CENTRE zone, protected track */
.primary-nav {
  min-width: 0; justify-self: stretch;
  display: grid; grid-template-columns: 1fr auto;
  align-items: center;
}
.primary-nav ul {
  display: flex; align-items: center; justify-content: flex-start;
  flex-direction: row; flex-wrap: wrap; gap: 12px;
  margin: 0; padding: 0; list-style: none;
}
.primary-nav > ul:first-of-type {
  grid-column: 1 / -1;
}
.primary-nav ul.nav-row-secondary {
  margin-top: 0;
  justify-content: flex-start;
}
.primary-nav li { position: relative; }
/* Home link is brand-clicked on desktop; shown only inside the mobile drawer */
.primary-nav li.nav-home { display: none; }
.primary-nav li > a, .primary-nav .nav-link {
  position: relative; display: inline-flex; align-items: center; min-height: 44px;
  gap: 6px; padding: 7px 10px; font-size: 0.92rem; font-weight: 500;
  color: var(--text); border-radius: var(--radius); white-space: nowrap;
  transition: color var(--transition-fast), background var(--transition-fast);
}
.primary-nav li > a:hover, .primary-nav li > a.active { color: var(--secondary); }
.primary-nav li > a:hover { background: var(--info-bg); }
.primary-nav li > a::after, .primary-nav .nav-link::after {
  content: ''; position: absolute; left: 10px; right: 10px; bottom: 5px;
  height: 2px; border-radius: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease-smooth);
}
.primary-nav li > a:hover::after, .primary-nav li > a.active::after { transform: scaleX(1); }
.nav-close { display: none; }
.nav-arrow { transition: transform var(--transition-fast); }
.has-dropdown.open .nav-arrow { transform: rotate(180deg); }

.dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 220px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 8px; opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all var(--transition-fast); z-index: 1100;
}
.has-dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; font-size: 0.9rem; color: var(--text); border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.dropdown-menu a svg { width: 17px; height: 17px; color: var(--secondary); }
.dropdown-menu a:hover { background: var(--info-bg); color: var(--secondary); }

/* Header actions — RIGHT zone */
.header-cta {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 8px; flex-shrink: 0; justify-self: end; white-space: nowrap;
}
.header-icon-btn {
  position: relative; width: 52px; height: 52px; flex: 0 0 52px;
  border-radius: 50%; border: 1.5px solid var(--border);
  background: var(--white); color: var(--text);
  display: grid; place-items: center;
  transition: all var(--transition-fast);
}
.header-icon-btn:hover { border-color: var(--secondary); color: var(--secondary); transform: translateY(-1px); }
.header-icon-btn svg { width: 20px; height: 20px; }
.favourites-count {
  position: absolute; top: -4px; right: -2px; min-width: 18px; height: 18px;
  border-radius: var(--radius-full); background: var(--error); color: var(--white);
  font-size: 0.68rem; font-weight: 700; display: flex; align-items: center;
  justify-content: center; padding: 0 5px; border: 2px solid var(--white);
}
.header-cta .btn { min-height: 44px; padding: 8px 14px; display: inline-flex; align-items: center; justify-content: center; }
.nav-toggle--mobile { display: none; }

/* Spacious tier — very wide screens get the full-size logo plus wider nav
   and action gaps. The three grid columns still protect each zone. */
@media (min-width: 1700px) {
  .site-header .header-inner {
    grid-template-columns: minmax(360px, auto) minmax(0, 1fr) auto;
    column-gap: clamp(28px, 2.2vw, 48px);
  }
  .site-logo-image { width: clamp(300px, 21vw, 390px); max-height: 88px; }
  .primary-nav ul { gap: clamp(18px, 1.35vw, 30px); }
  .primary-nav li > a, .primary-nav .nav-link { padding: 10px 12px; }
  .header-cta { gap: 14px; }
  .header-cta .btn { padding: 9px 18px; }
}

/* Mobile nav controls */
.nav-toggle, .nav-close { display: none; align-items: center; justify-content: center; }
.nav-toggle {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  color: var(--primary); flex-direction: column; gap: 5px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; transition: all var(--transition-fast); }
.nav-close {
  position: absolute; top: 20px; right: 20px; width: 40px; height: 40px;
  border-radius: 50%; background: rgba(255,255,255,0.08); color: var(--white);
  z-index: 1120;
}
.nav-close svg { width: 20px; height: 20px; }
.nav-overlay {
  display: none; position: fixed; inset: 0; z-index: 1090;
  background: rgba(16,42,67,0.55); backdrop-filter: blur(2px);
}
.nav-overlay.open { display: block; }

/* Fixed header offset — <main> creates a BFC so margin-top on children
   never collapses or leaks, and position:fixed header always paints above. */
main { padding-top: var(--header-h); }

/* ==========================================================================
   2. Hero
   ========================================================================== */
.hero {
  position: relative; isolation: isolate;
  min-height: 660px; display: flex; flex-direction: column;
  justify-content: center;
  color: var(--white); overflow: hidden;
}
/* Homepage hero image — single image layer on ::after so filters never touch
   the text, buttons or search panel. The old inline background-image on the
   <section> is nullified; the image lives in this pseudo-element only.
   Brightness lifts the shadowed villa/pool area, contrast adds crispness and
   a strong saturation boost removes the washed-out grey cast. */
.hero { background-image: none !important; }
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -2;
  background: url('../images/hero/home-hero.webp') center center / cover no-repeat;
  filter: brightness(1.15) contrast(1.05) saturate(1.30);
  transform: scale(1.01);
  pointer-events: none;
}
/* ONE controlled overlay layer — a light directional gradient, darker only
   behind the left-side heading and fully transparent by 66% width so the
   villa, pool, palm tree, mountains and greenery stay vivid and natural. */
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg,
    rgba(8,28,48,0.42) 0%,
    rgba(8,28,48,0.28) 22%,
    rgba(8,28,48,0.12) 40%,
    rgba(8,28,48,0.03) 58%,
    rgba(8,28,48,0.00) 66%);
  pointer-events: none;
}
/* The legacy HTML overlay element stays structurally unchanged but carries
   no colour — it is fully transparent so nothing darkens the image. */
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: transparent;
  pointer-events: none;
}
.hero-overlay--flat { background: transparent; }
/* Homepage hero content track — same page-container discipline as the
   header: a wide centered track, content anchored hard-left inside it so the
   copy sits near the left edge instead of drifting into the image centre. */
.hero-inner {
  width: min(100% - clamp(32px, 4vw, 72px), 1760px);
  max-width: 1760px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.hero-content {
  position: relative; z-index: 2; width: min(100%, 680px); max-width: 680px;
  margin-left: 0; margin-right: auto;
  padding: 28px 32px; border-radius: 24px;
  background: linear-gradient(90deg,
    rgba(7,26,44,0.24) 0%,
    rgba(7,26,44,0.12) 62%,
    rgba(7,26,44,0.00) 100%);
  backdrop-filter: blur(1.5px); -webkit-backdrop-filter: blur(1.5px);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.35);
  color: #FFFFFF; font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.02em;
  padding: 7px 16px; border-radius: var(--radius-full);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  margin-bottom: 22px;
  box-shadow: 0 4px 16px rgba(8,28,48,0.14);
}
.hero-badge svg { width: 16px; height: 16px; color: var(--teal); }
.hero-title {
  font-size: var(--text-display); color: #FFFFFF;
  font-weight: 900; letter-spacing: -0.04em; margin-bottom: 18px; line-height: 0.95;
  text-wrap: balance;
  text-shadow: 0 4px 12px rgba(0,0,0,0.35), 0 2px 4px rgba(0,0,0,0.25);
}
.hero-title em {
  font-style: normal; color: #00BFCF; font-weight: 900;
  text-shadow: 0 3px 10px rgba(0,0,0,0.35), 0 1px 2px rgba(255,255,255,0.15);
}
.hero-subtitle {
  font-size: 1.35rem; font-weight: 600; color: rgba(255,255,255,0.98);
  max-width: 700px; margin-bottom: 30px; line-height: 1.65;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-actions .btn { font-weight: 700; }
.hero .btn-inherit {
  background: rgba(255,255,255,0.18);
  border: 2px solid rgba(255,255,255,0.70);
  color: #FFFFFF;
}
.hero .btn-inherit:hover { background: rgba(255,255,255,0.28); color: #FFFFFF; }

/* Country switcher button in the hero actions (matches .btn-inherit). */
.hero-country-switch { display: inline-flex; align-items: center; }
.hero-country-switch .cs-wrap { width: auto; min-width: 208px; }
.hero-country-switch .cs-trigger {
  background: rgba(255,255,255,0.18);
  border: 2px solid rgba(255,255,255,0.70);
  color: #FFFFFF;
  border-radius: var(--radius-full, 999px);
  min-height: 52px;
  padding: 11px 42px 11px 18px;
  font-weight: 700;
  font-size: 0.95rem;
  width: auto;
  backdrop-filter: blur(2px);
}
.hero-country-switch .cs-trigger:hover { background: rgba(255,255,255,0.28); border-color: rgba(255,255,255,0.85); }
.hero-country-switch .cs-trigger:focus,
.hero-country-switch .cs-wrap.cs-open .cs-trigger { border-color: var(--accent); box-shadow: none; }
.hero-country-switch .cs-trigger.cs-placeholder { color: rgba(255,255,255,0.85); }
.hero-country-switch .cs-label { color: #FFFFFF; }
.hero-country-switch .cs-chevron { color: rgba(255,255,255,0.85); right: 16px; }
.hero-country-switch .cs-flag { box-shadow: 0 0 0 1px rgba(255,255,255,0.35); }
.hero-trust {
  display: flex; align-items: center; gap: 10px; margin-top: 34px;
  font-size: 0.88rem; font-weight: 700; color: #FFFFFF;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.hero-trust .trust-avatars { display: flex; }
.hero-trust .trust-avatars span {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--white);
  background: var(--gradient-blue); margin-right: -8px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 700; font-size: 0.7rem; color: var(--white);
}
.hero-scroll-cue {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.92); font-size: 0.75rem; letter-spacing: 0.1em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.40);
  text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.hero-scroll-cue svg { width: 18px; height: 18px; animation: floatUp 2.2s ease infinite; }

/* ==========================================================================
   3. Hero Search Panel
   ========================================================================== */
.hero-search-wrap {
  position: relative; z-index: 2;
  background: var(--white); border-radius: var(--radius-2xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xl); padding: 28px; max-width: 1040px;
  margin: 0 auto;
}
.hero-search-tabs { display: flex; gap: 6px; margin-bottom: 18px; border-bottom: 1px solid var(--border-light); }
.hero-search-tab {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 20px; font-family: var(--font-heading); font-weight: 600;
  font-size: 0.9rem; color: var(--text-muted);
  border-bottom: 3px solid transparent; margin-bottom: -1px;
  transition: all var(--transition-fast);
}
.hero-search-tab svg { width: 18px; height: 18px; }
.hero-search-tab:hover { color: var(--primary); }
.hero-search-tab.active { color: var(--secondary); border-bottom-color: var(--secondary); }

.hero-search-form {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px;
  align-items: end;
}
.hero-search-field { display: flex; flex-direction: column; gap: 6px; }
.hero-search-field label {
  font-family: var(--font-heading); font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted);
}
.hero-search-field .field-control {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--white); transition: border-color var(--transition-fast);
}
.hero-search-field .field-control:focus-within { border-color: var(--accent); }
.hero-search-field .field-control svg { width: 18px; height: 18px; color: var(--text-dim); flex-shrink: 0; }
.hero-search-field select, .hero-search-field input {
  width: 100%; border: none; outline: none; background: none;
  font-size: 0.92rem; color: var(--text); appearance: none;
}
.hero-search-field input[type="date"] { min-width: 0; }
.hero-search-submit {
  height: 48px; font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.hero-search-submit svg { width: 18px; height: 18px; }
.hero-search-note {
  margin-top: 12px; font-size: 0.8rem; color: var(--text-muted);
  display: flex; gap: 8px; align-items: center;
}
.hero-search-note svg { width: 15px; height: 15px; color: var(--success); }

/* ==========================================================================
   4. Page Hero (inner pages)
   ========================================================================== */
.page-hero {
  position: relative;
  background: var(--gradient-primary); padding: 96px 0;
  color: var(--white); overflow: hidden;
}
.page-hero::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 85% 20%, rgba(0,166,166,0.18), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(22,119,255,0.22), transparent 45%);
  pointer-events: none;
}
.page-hero--image {
  background-size: cover; background-position: center;
}
.page-hero--compact { padding: 72px 0; }
/* Enhanced image layer — filtered copy of the background image only. */
.page-hero--image::before {
  content: ''; position: absolute; inset: 0;
  background-image: inherit;
  background-size: inherit;
  background-position: inherit;
  filter: brightness(1.06) contrast(1.05) saturate(1.08);
  pointer-events: none;
}
/* Directional overlay — left text area stays readable while the right side
   of the image remains vivid. Replaces the old flat rgba(16,42,67,0.68)
   layer and keeps the soft teal/blue glows. */
.page-hero--image::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(10,30,50,0.60) 0%, rgba(10,30,50,0.42) 34%, rgba(10,30,50,0.18) 60%, rgba(10,30,50,0.05) 100%),
    radial-gradient(circle at 85% 20%, rgba(0,166,166,0.14), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(22,119,255,0.16), transparent 45%);
  pointer-events: none;
}
.page-hero--pos-right { background-position: center right; }
.page-hero-content { position: relative; z-index: 2; }
.page-hero h1 { color: var(--white); font-size: clamp(2rem, 4vw, 3.2rem); margin-bottom: 12px; }
.page-hero p { color: rgba(255,255,255,0.82); font-size: 1.05rem; max-width: 620px; margin: 0; }
/* Soft shadow keeps white page-hero text readable over brighter imagery */
.page-hero h1,
.page-hero p,
.breadcrumb {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.30);
}
.breadcrumb {
  display: flex; align-items: center; gap: 8px; margin-bottom: 18px;
  font-size: 0.85rem; color: rgba(255,255,255,0.7);
}
.breadcrumb a { color: rgba(255,255,255,0.7); }
.breadcrumb a:hover { color: var(--teal); }
.breadcrumb .sep { color: rgba(255,255,255,0.4); }
.breadcrumb .current { color: var(--teal); }
.breadcrumb--on-white { color: var(--text-muted); }
.breadcrumb--on-white a { color: var(--secondary); }
.breadcrumb--on-white a:hover { color: var(--primary); }
.breadcrumb--on-white .sep { color: var(--text-dim); }
.breadcrumb--on-white .current { color: var(--primary); }

/* ==========================================================================
   5. Footer
   ========================================================================== */
.site-footer { background: var(--primary-dark); color: rgba(255,255,255,0.72); }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr 1.2fr;
  gap: 40px; padding: 72px 0 56px;
}
.footer-brand .brand-name { color: var(--white); font-size: 1.2rem; }
.footer-brand .brand-logo { background: var(--gradient-accent); }
.footer-brand .site-logo { display: block; }
.footer-brand .site-logo-image { height: 88px; width: auto; }
.footer-brand p { font-size: 0.92rem; margin-top: 16px; max-width: 300px; }
.footer-heading {
  font-family: var(--font-heading); font-size: 0.85rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--white); margin-bottom: 20px;
}
.footer-links li { margin-bottom: 12px; }
.footer-links a {
  color: rgba(255,255,255,0.7); font-size: 0.92rem;
  transition: all var(--transition-fast); display: inline-flex; align-items: center; gap: 8px;
}
.footer-links a:hover { color: var(--teal); padding-left: 4px; }
.footer-links a svg { width: 15px; height: 15px; color: var(--teal); }
.footer-contact li { display: flex; gap: 12px; margin-bottom: 14px; font-size: 0.92rem; }
.footer-contact svg { width: 18px; height: 18px; color: var(--teal); flex-shrink: 0; margin-top: 3px; }
.footer-contact a { color: rgba(255,255,255,0.72); }
.footer-contact a:hover { color: var(--teal); }
.footer-partners li { margin-bottom: 14px; }
.footer-partners a {
  color: rgba(255,255,255,0.85); font-size: 0.92rem; font-weight: 500;
  transition: color var(--transition-fast);
}
.footer-partners a:hover { color: var(--teal); }
.footer-partners .partner-desc {
  display: block; color: rgba(255,255,255,0.5); font-size: 0.82rem;
  margin-top: 2px;
}
.social-row { display: flex; gap: 10px; margin-top: 20px; }
.social-btn {
  width: 40px; height: 40px; border-radius: var(--radius-full);
  background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.8);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition-fast);
}
.social-btn:hover { background: var(--teal); color: var(--white); transform: translateY(-2px); }
.social-btn svg { width: 18px; height: 18px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 24px 0; display: flex; justify-content: space-between;
  align-items: center; gap: 16px; flex-wrap: wrap; font-size: 0.85rem;
}
.footer-bottom-links { display: flex; gap: 24px; }
.footer-bottom-links a { color: rgba(255,255,255,0.6); }
.footer-bottom-links a:hover { color: var(--teal); }

/* ==========================================================================
   Country Title Section (homepage dynamic)
   ========================================================================== */
.section--country-title {
  padding: 0 0 8px;
  text-align: center;
}
.section--country-title .section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}
