/* ==========================================================================
   LUXURY VILLA RENTAL - CORE STYLES
   Design Philosophy: Minimal, Architectural, Warm Mediterranean
   ========================================================================== */

:root {
  /* Color Palette */
  --color-bg: #F9F8F6;
  /* Warm stone/off-white */
  --color-text: #2C2B29;
  /* Warm charcoal */
  --color-text-light: #6E6D6A;
  /* Muted grey */
  --color-accent: #7B7A5A;
  /* Muted Olive */
  --color-accent-dark: #5A5940;
  /* Darker Olive */
  --color-dark: #1A1A18;
  /* Near Black (Footer/Overlay) */
  --color-white: #FFFFFF;
  --color-border: #E5E2DD;
  /* Subtle separator */

  /* Typography */
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Lato', sans-serif;

  /* Spacing Scale (8pt grid basis) */
  --space-xs: 0.5rem;
  /* 8px */
  --space-sm: 1rem;
  /* 16px */
  --space-md: 2rem;
  /* 32px */
  --space-lg: 4rem;
  /* 64px */
  --space-xl: 8rem;
  /* 128px */

  /* Layout */
  --container-width: 1280px;
  --header-height: 80px;

  /* Transitions */
  --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
  --duration-normal: 0.4s;
  --duration-slow: 0.8s;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--duration-normal) var(--ease-out);
}

ul {
  list-style: none;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: var(--space-sm);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--color-text);
}

h3 {
  font-size: 1.5rem;
  letter-spacing: 0.05em;
}

p {
  margin-bottom: var(--space-sm);
  color: var(--color-text-light);
}

.text-overline {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
  display: block;
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */
.container {
  width: 90%;
  max-width: var(--container-width);
  margin: 0 auto;
}

.btn {
  display: inline-block;
  padding: 1rem 2rem;
  background-color: transparent;
  border: 1px solid var(--color-text);
  color: var(--color-text);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}

.btn:hover {
  background-color: var(--color-text);
  color: var(--color-white);
}

.btn-primary {
  background-color: var(--color-text);
  color: var(--color-white);
  border-color: var(--color-text);
}

.btn-primary:hover {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
}

/* Animation Utilities */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--duration-slow) var(--ease-out), transform var(--duration-slow) var(--ease-out);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   HEADER / NAVBAR
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: var(--space-md) 0;
  transition: padding 0.3s ease, background-color 0.3s ease, backdrop-filter 0.3s ease;
  color: var(--color-white);
  /* Default to white for transparent state */
}

.site-header.scrolled {
  padding: 1rem 0;
  background-color: rgba(249, 248, 246, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  /* Switch to dark text when scrolled */
}

.nav-container {
  display: flex;
  align-items: center;
}

.logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(0.9rem, 4.5vw, 1.4rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 1002;
  transition: color 0.3s ease;
  white-space: nowrap;
  margin-right: auto;
  /* Push everything else to the right */
}

.nav-links {
  display: flex;
  gap: var(--space-md);
}

.nav-link {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: currentColor;
  /* Use current text color */
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1002;
  flex-direction: column;
  gap: 6px;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: currentColor;
  /* Inherit color from header */
  transition: all 0.3s ease;
}

/* Language Selector - Desktop */
.lang-selector {
  position: relative;
  margin-left: var(--space-md);
  display: none;
  /* Hidden on mobile by default */
}

@media (min-width: 769px) {
  .lang-selector {
    display: block;
    margin-left: auto;
    margin-right: auto;
    left: 50%;
    transform: translateX(-50%);
    position: absolute;
  }
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  font-size: 0.85rem;
  padding: 0.4rem 0.6rem;
  transition: opacity 0.3s ease;
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lang-flag {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.lang-arrow {
  font-size: 0.6rem;
  transition: transform 0.3s ease;
  opacity: 0.7;
}

.lang-toggle[aria-expanded="true"] .lang-arrow {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  min-width: 150px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  padding: 0.5rem 0;
  z-index: 1001;
}

.lang-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-dropdown li {
  list-style: none;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 0.75rem 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--color-text);
  transition: all 0.2s ease;
  font-family: var(--font-body);
  text-align: left;
}

.lang-option:hover {
  background-color: var(--color-bg);
  color: var(--color-accent);
}

.lang-option.active {
  font-weight: 700;
  color: var(--color-accent);
  background-color: rgba(123, 122, 90, 0.05);
}

.mobile-menu-footer {
  display: none;
  width: 100%;
}

@media (max-width: 768px) {
  .mobile-menu-footer {
    display: block;
    padding: var(--space-md) 0;
    border-top: 1px solid var(--color-border);
  }
}

.mobile-lang-label {
  display: block;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
  font-weight: 700;
  text-align: center;
  opacity: 0.8;
}

.mobile-lang-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.mobile-lang-options .lang-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.75rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  background: transparent;
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  text-align: center;
}

.mobile-lang-options .lang-option .lang-flag {
  width: 24px;
  height: 24px;
}

.mobile-lang-options .lang-option.active {
  background: rgba(0, 0, 0, 0.05);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

@media (max-width: 768px) {
  #nav-menu {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #F9F8F6;
    /* Use explicit light background */
    padding: 100px 30px 40px;
    z-index: 1001;
    overflow-y: auto;
  }

  #nav-menu.active {
    display: flex !important;
  }

  /* Force visibility on mobile menu links */
  .nav-menu-active .nav-link {
    color: #2C2B29 !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .nav-links {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin: 2rem 0;
    padding: 0;
    display: flex !important;
  }

  .nav-link {
    font-size: 1.8rem;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.5rem 0;
  }

  /* Active indicators for mobile header when menu is open */
  .nav-menu-active .logo {
    color: #2C2B29 !important;
  }

  .nav-menu-active .mobile-toggle span {
    background-color: #2C2B29 !important;
  }
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--color-white);
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.4));
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 800px;
  padding: 0 var(--space-sm);
}

.hero-content h1,
.hero-content h2 {
  color: inherit;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-content p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.25rem;
  margin-bottom: var(--space-md);
  font-weight: 300;
}

.hero-content .btn {
  border-color: var(--color-white);
  color: var(--color-white);
}

.hero-content .btn:hover {
  background-color: var(--color-white);
  color: var(--color-text);
}

.btn-hero-cta {
  background-color: var(--color-white);
  color: var(--color-text) !important;
  font-weight: 700;
  margin-top: var(--space-sm);
  border-color: var(--color-white);
}

.btn-hero-cta:hover {
  background-color: var(--color-accent) !important;
  border-color: var(--color-accent) !important;
  color: var(--color-white) !important;
}

/* ==========================================================================
   SCROLL-BASED HERO ANIMATION
   ========================================================================== */
/* Container takes 400vh to allow 4 "pages" of scroll */
.hero-scroll-container {
  height: 400vh;
  min-height: auto;
  /* Override inherited flex centering from .hero */
  display: block;
  align-items: initial;
  justify-content: initial;
  /* Override inherited overflow:hidden to allow sticky to work relative to viewport */
  overflow: visible;
}

/* Sticky inner wrapper - pins the visible area */
.hero-scroll-cards {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

/* Individual cards - stacked, transition opacity */
.hero-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-out;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Fallback background and stacking order */
  background-color: #000;
  z-index: 1;
}

.hero-card.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 10;
}

.hero-card .hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero-card .hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.5));
  z-index: 2;
}

.hero-card .hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 800px;
  padding: 0 var(--space-sm);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

.hero-card .text-overline {
  color: rgb(224, 224, 211);
}

.hero-card.active .hero-content {
  opacity: 1;
  transform: translateY(0);
}

/* CTA positioning - fixed at bottom during scroll */
.hero-scroll-cta {
  position: fixed;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  border-color: var(--color-white);
  color: var(--color-white);
  background-color: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
}

.hero-scroll-cta:hover {
  background-color: var(--color-white);
  color: var(--color-text);
}

/* Hide CTA when scrolled past hero section */
.hero-scroll-cta.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ==========================================================================
   VILLAS COMPARISON (CORE)
   ========================================================================== */
.section-villas {
  padding: var(--space-xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-lg);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.villa-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 900px) {
  .villa-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }
}

.villa-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
}

.villa-image-container {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.villa-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.villa-card:hover .villa-image-container img {
  transform: scale(1.05);
}

.villa-details {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.villa-stats {
  display: flex;
  gap: var(--space-sm);
  margin: var(--space-sm) 0;
  font-size: 0.9rem;
  color: var(--color-text-light);
}

.villa-stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Accordion Styles */
.villa-features-toggle {
  margin-top: auto;
  /* Push to bottom */
}

.villa-features-toggle .toggle-btn {
  background: none;
  border: none;
  border-top: 1px solid var(--color-border);
  width: 100%;
  padding: var(--space-sm) 0;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--color-text);
  margin-top: var(--space-md);
}

.toggle-icon {
  transition: transform 0.3s ease;
}

.toggle-btn.active .toggle-icon {
  transform: rotate(180deg);
}

.feature-list-wrapper {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-out;
}

.feature-list {
  padding: var(--space-sm) 0;
}

.feature-category {
  margin-bottom: var(--space-sm);
}

.feature-category h4 {
  font-size: 0.9rem;
  font-family: var(--font-body);
  color: var(--color-accent);
  margin-bottom: 4px;
}

.feature-category ul li {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-bottom: 2px;
}

.villa-action {
  margin-top: var(--space-md);
  text-align: center;
}

.villa-action .btn {
  width: 100%;
}

/* ==========================================================================
   LOCATION SECTION
   ========================================================================== */
.section-location {
  padding: var(--space-xl) 0;
  background-color: #F2F0EB;
}

.location-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  align-items: center;
}

@media (min-width: 900px) {
  .location-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }
}

.location-content {
  order: 2;
}

@media (min-width: 900px) {
  .location-content {
    order: 1;
    padding-right: var(--space-md);
  }
}

.location-visual {
  order: 1;
  position: relative;
  aspect-ratio: 16/9;
  background-color: #E5E2DD;
  overflow: hidden;
}

@media (min-width: 900px) {
  .location-visual {
    order: 2;
    aspect-ratio: 4/3;
  }
}

.location-details-toggle {
  margin-top: var(--space-md);
}

.location-details-toggle .btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: var(--color-text);
  color: var(--color-white);
}

.location-details-toggle .btn:hover {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
}

.location-distances-list {
  padding: var(--space-md) 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 600px) {
  .location-distances-list {
    grid-template-columns: 1fr 1fr;
    gap: 1rem 2rem;
  }
}

.distance-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.toggle-btn.active+.feature-list-wrapper .distance-item {
  opacity: 1;
  transform: translateY(0);
}

.feature-list-wrapper .distance-item {
  opacity: 0;
  transform: translateY(10px);
}

.distance-item .label {
  font-size: 0.9rem;
  color: var(--color-text);
  font-weight: 500;
}

.distance-item .value {
  font-size: 0.9rem;
  color: var(--color-accent);
  font-weight: 700;
}

/* ==========================================================================
   ABOUT SECTION
   ========================================================================== */
.section-about {
  padding: var(--space-xl) 0;
  text-align: center;
}

.about-contact-toggle {
  margin-top: var(--space-lg);
  display: inline-block;
  width: 100%;
  max-width: 850px;
  /* Increased from 600px to avoid line breaks */
}

.about-contact-toggle .btn {
  background-color: transparent;
  border: 1px solid var(--color-text);
  color: var(--color-text);
  width: auto;
  min-width: 200px;
}

.about-contact-toggle .btn:hover {
  background-color: var(--color-text);
  color: var(--color-white);
}

.contact-reveal-grid {
  padding: var(--space-md) 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

@media (min-width: 600px) {
  .contact-reveal-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    /* Reduced from var(--space-lg) for more content space */
  }
}

.contact-reveal-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 1rem;
  /* Reduced horizontal padding */
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  transition: all 0.3s var(--ease-out);
  text-align: left;
  opacity: 0;
  transform: translateY(15px);
}

.toggle-btn.active+.feature-list-wrapper .contact-reveal-item {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger effect */
.toggle-btn.active+.feature-list-wrapper .contact-reveal-item:nth-child(2) {
  transition-delay: 0.1s;
}

.contact-reveal-item:hover {
  border-color: var(--color-accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.contact-reveal-icon {
  width: 48px;
  height: 48px;
  background-color: #F2F0EB;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.contact-reveal-item:hover .contact-reveal-icon {
  background-color: var(--color-accent);
  color: var(--color-white);
}

.contact-reveal-text {
  display: flex;
  flex-direction: column;
}

.contact-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-light);
  font-weight: 700;
  margin-bottom: 2px;
}

.contact-value {
  font-size: 0.95rem;
  /* Slightly smaller for better fit */
  color: var(--color-text);
  font-weight: 500;
  white-space: nowrap;
  /* Prevent wrapping */
}

.about-content {
  max-width: 700px;
  margin: 0 auto;
}

.about-content p.lead {
  font-size: 1.25rem;
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background-color: var(--color-dark);
  color: #999;
  padding: var(--space-md) 0;
  font-size: 0.9rem;
}

.footer-brand {
  margin-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: var(--space-sm);
  text-align: center;
}

.footer-brand h4 {
  color: var(--color-white);
  font-size: 1.5rem;
  letter-spacing: 0.2em;
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
}

.footer-brand p {
  color: #888;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  text-align: center;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
    text-align: left;
  }

  .footer-brand {
    text-align: left;
  }
}

.footer-col h4 {
  color: var(--color-white);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: var(--space-md);
  font-family: var(--font-body);
  font-weight: 700;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a:hover {
  color: var(--color-white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-md);
  text-align: center;
  font-size: 0.8rem;
}

/* ==========================================================================
   LEGAL PAGES
   ========================================================================== */
.legal-page .site-header {
  background: var(--color-bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.legal-content {
  padding-top: calc(80px + var(--space-xl));
}

.legal-text {
  max-width: 750px;
  margin: 0 auto;
  line-height: 1.8;
}

.legal-text h3 {
  margin: var(--space-xl) 0 var(--space-sm);
  font-family: var(--font-heading);
  color: var(--color-text);
  font-size: 1.6rem;
  letter-spacing: 0.02em;
}

.legal-text p {
  margin-bottom: var(--space-md);
  color: #555;
}

.legal-text strong {
  color: var(--color-text);
  font-weight: 600;
}

/* ==========================================================================
   MOBILE MENU
   ========================================================================== */
/* ==========================================================================
   MOBILE MENU & RESPONSIVE TWEAKS
   ========================================================================== */
@media (max-width: 768px) {

  /* ===== GLOBAL MOBILE FIXES ===== */
  :root {
    --space-xl: 3rem;
    --space-lg: 2rem;
    --space-md: 1rem;
  }

  /* Prevent any horizontal overflow */
  body {
    overflow-x: hidden;
  }

  .container {
    width: 92%;
  }

  /* ===== HEADER ===== */
  .site-header {
    padding: 0.75rem 0;
  }

  .logo {
    font-size: clamp(0.75rem, 4.2vw, 0.9rem);
    max-width: 85%;
    line-height: 1.3;
    letter-spacing: 0.01em;
    white-space: nowrap;
  }

  .mobile-toggle {
    display: flex;
    margin-left: auto;
    /* Push to far right */
  }

  /*
    IMPORTANT:
    The mobile menu overlay is controlled via `#nav-menu` / `#nav-menu.active`
    (see the earlier mobile menu rules).
    Do NOT turn `.nav-links` into its own off-canvas panel here — it causes the
    menu links to be translated off-screen while the language footer stays visible.
  */
  .nav-links {
    position: static;
    top: auto;
    right: auto;
    width: 100%;
    height: auto;
    background-color: transparent;
    transform: none;
    transition: none;
    z-index: auto;
  }

  .nav-links li {
    margin: 0.75rem 0;
  }

  .nav-link {
    font-size: 1.25rem;
    color: var(--color-text);
  }

  /* ===== HERO SECTION ===== */
  .hero {
    min-height: 100vh;
    min-height: 100svh;
    /* Use small viewport height for mobile */
  }

  .hero-content {
    width: 100%;
    max-width: 100%;
    padding: 0 1rem;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
  }

  .hero-content .text-overline {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    margin-bottom: 0;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 2.25rem;
    line-height: 1.15;
    margin-bottom: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .hero-content p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0;
    max-width: 90%;
  }

  .hero-content .btn {
    padding: 0.9rem 1.75rem;
    font-size: 0.85rem;
    margin-top: 0.75rem;
  }

  /* ===== VILLAS SECTION ===== */
  .section-villas {
    padding: var(--space-lg) 0;
  }

  .section-header {
    margin-bottom: var(--space-md);
    padding: 0 1rem;
  }

  .section-header h2 {
    font-size: 1.5rem;
  }

  .section-header p {
    font-size: 0.9rem;
  }

  .villa-grid {
    gap: var(--space-md);
  }

  .villa-card {
    margin: 0 0.5rem;
  }

  .villa-details {
    padding: var(--space-md);
  }

  .villa-details h3 {
    font-size: 1.25rem;
  }

  .villa-stats {
    flex-wrap: wrap;
    font-size: 0.8rem;
    gap: 0.5rem;
  }

  .villa-details>p {
    font-size: 0.85rem;
  }

  .toggle-btn {
    font-size: 0.7rem;
  }

  .villa-action .btn {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
  }

  /* ===== LOCATION SECTION ===== */
  .section-location {
    padding: var(--space-lg) 0;
  }

  .location-content h2 {
    font-size: 1.5rem;
  }

  .location-content p {
    font-size: 0.9rem;
  }

  .location-content .btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.75rem;
  }

  /* ===== ABOUT SECTION ===== */
  .section-about {
    padding: var(--space-lg) 0;
  }

  .about-content h2 {
    font-size: 1.5rem;
  }

  .about-content p.lead {
    font-size: 1rem;
  }

  .about-content p {
    font-size: 0.9rem;
  }

  /* ===== FOOTER ===== */
  .site-footer {
    padding: var(--space-md) 0;
  }

  .footer-grid {
    gap: var(--space-md);
    text-align: center;
  }

  .footer-col h4 {
    font-size: 0.9rem;
  }

  .footer-col p,
  .footer-links a {
    font-size: 0.8rem;
  }

  .footer-bottom {
    font-size: 0.7rem;
    padding-top: var(--space-sm);
  }
}

/* ==========================================================================
   VILLA DETAILS (Added)
   ========================================================================== */
.villa-intro {
  padding: var(--space-xl) 0 var(--space-md);
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.gallery-section {
  padding-bottom: var(--space-xl);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--space-sm);
}

.gallery-footer {
  text-align: center;
  margin-top: var(--space-lg);
  margin-bottom: 0.7rem;
}

.btn-show-all {
  cursor: pointer;
  background-color: var(--color-white);
}

.btn-show-all:hover {
  background: var(--color-bg);
  border-color: var(--color-accent);
}

/* Lightbox Modal */
.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox-modal.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

@media (max-width: 768px) {
  .lightbox-content {
    padding: 1rem 0 15vh 0;
    /* Remove side padding, increase bottom for balance */
  }
}

.lightbox-image-container {
  max-width: 95vw;
  max-height: calc(100vh - 160px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .lightbox-image-container {
    max-width: 100vw;
    width: 100%;
    max-height: calc(100vh - 220px);
  }
}

.lightbox-image-container img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-size: 2.5rem;
  color: var(--color-white);
  cursor: pointer;
  z-index: 10001;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.3);
  /* Darker background for visibility */
  color: var(--color-white);
  border: none;
  padding: 1.25rem 0.75rem;
  /* Taller area for better touch */
  cursor: pointer;
  font-size: 1.5rem;
  transition: background 0.3s ease;
  z-index: 10001;
}

@media (max-width: 768px) {
  .lightbox-nav {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem 0.5rem;
  }
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

.lightbox-counter {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
}

.lightbox-caption {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-style: italic;
}

@media (min-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.gallery-item {
  aspect-ratio: 4/3;
  overflow: hidden;
  position: relative;
  background-color: #f0f0f0;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.amenities-section {
  background-color: var(--color-white);
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--color-border);
}

.amenities-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-md);
}

@media (min-width: 768px) {
  .amenities-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.amenity-col h3 {
  font-size: 1.1rem;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.5rem;
}

.amenity-col ul li {
  margin-bottom: 0.5rem;
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.amenities-toggle-wrapper {
  margin-top: var(--space-lg);
  display: flex;
  justify-content: center;
}

.amenities-toggle-wrapper .btn {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
  justify-content: center;
  font-weight: 700;
}

.expanded-grid {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px dashed var(--color-border);
}

/* Map Section */
.map-section {
  position: relative;
  padding: var(--space-xl) 0;
  background-color: var(--color-bg);
}

.map-container {
  height: 400px;
  background-color: #E5E2DD;
  overflow: hidden;
  position: relative;
}

.map-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(10%) contrast(1.1);
}

/* Booking CTA Bottom */
.booking-cta {
  background-color: var(--color-text);
  color: var(--color-white);
  padding: var(--space-xl) 0;
  text-align: center;
}

.booking-cta h2 {
  color: var(--color-white);
  margin-bottom: var(--space-md);
}

.booking-cta p {
  color: rgba(255, 255, 255, 0.7);
  max-width: 600px;
  margin: 0 auto var(--space-lg);
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.btn-light {
  background-color: var(--color-white);
  color: var(--color-text);
  border: 1px solid var(--color-white);
}

.btn-light:hover {
  background-color: transparent;
  color: var(--color-white);
}

.btn-outline-light {
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--color-white);
}

.btn-outline-light:hover {
  border-color: var(--color-white);
  background-color: var(--color-white);
  color: var(--color-text);
}

/* ==========================================================================
   FEATURE SHOWCASE SLIDER
   ========================================================================== */
.feature-showcase {
  padding: var(--space-xl) 0;
  background-color: var(--color-bg);
}

.feature-showcase.showcase-reverse {
  background-color: #F2F0EB;
}

.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
  margin-top: var(--space-lg);
}

/* Image Column */
.showcase-image-col {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
  background-color: #e0e0e0;
}

.showcase-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.showcase-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.showcase-slide.active {
  opacity: 1;
  z-index: 1;
}

.showcase-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Content Column */
.showcase-content-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.showcase-text-slides {
  position: relative;
  min-height: 180px;
}

.showcase-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.showcase-text.active {
  opacity: 1;
  position: relative;
}

.showcase-text h3 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.showcase-text p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text-light);
}

/* KPIs */
.showcase-kpis {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-md) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.kpi-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpi-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--color-text);
  line-height: 1;
}

.kpi-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-light);
}

/* Navigation */
.showcase-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-md);
  margin-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.showcase-counter {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--color-text-light);
}

.showcase-counter .current {
  color: var(--color-text);
  font-weight: 600;
}

.showcase-arrows {
  display: flex;
  gap: var(--space-xs);
}

.arrow-btn {
  width: 48px;
  height: 48px;
  border: 1px solid var(--color-border);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: var(--color-text);
}

.arrow-btn:hover {
  background-color: var(--color-text);
  border-color: var(--color-text);
  color: var(--color-white);
}

/* Reversed Grid (Indoor Section) */
.showcase-grid.reverse {
  direction: rtl;
}

.showcase-grid.reverse>* {
  direction: ltr;
}

/* Mobile Responsive */
@media (max-width: 900px) {
  .showcase-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .showcase-grid.reverse {
    direction: ltr;
  }

  .showcase-image-col {
    order: -1;
    /* Image always on top for mobile */
    aspect-ratio: 16/9;
  }

  .showcase-text-slides {
    min-height: auto;
  }

  .showcase-text h3 {
    font-size: 1.5rem;
  }

  .kpi-number {
    font-size: 2rem;
  }

  .showcase-kpis {
    gap: var(--space-md);
  }

  .arrow-btn {
    width: 40px;
    height: 40px;
  }
}

/* ==========================================================================
   VILLA DESCRIPTION SECTION
   ========================================================================== */
.villa-description {
  padding: var(--space-xl) 0 0;
  background-color: var(--color-white);
}

.description-header {
  text-align: center;
  margin-bottom: var(--space-lg);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.description-header h2 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  margin-bottom: 0.5rem;
}

.description-header .subline {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.description-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

@media (min-width: 900px) {
  .description-grid {
    grid-template-columns: 2fr 1fr;
    gap: var(--space-xl);
    align-items: start;
  }
}

.description-text p {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--color-text);
  margin-bottom: 1.5rem;
}

.description-location-box {
  background-color: #F2F0EB;
  padding: var(--space-md);
  border-left: 2px solid var(--color-accent);
}

.description-location-box h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  color: var(--color-accent);
}

.description-location-box p {
  font-size: 0.95rem;
  color: var(--color-text-light);
  margin-bottom: 0;
}

.description-kpi-container {
  background-color: #F0EEE9;
  padding: var(--space-lg) var(--space-md);
  margin-top: var(--space-xl);
}

.description-kpi-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--space-md) var(--space-md);
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 600px) {
  .description-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.desc-kpi-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.desc-kpi-value {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 0.4rem;
  font-weight: 400;
}

.desc-kpi-label {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.parallax-highlights {
  position: relative;
  height: 60vh;
  min-height: 400px;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: var(--space-xl) 0;
}

.parallax-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
}

.highlights-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--color-white);
  width: 90%;
  max-width: 800px;
}

.highlights-list {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  justify-content: center;
  gap: 0.8rem 1.5rem;
  width: 100%;
}

.highlight-item {
  font-family: var(--font-body);
  font-size: clamp(0.6rem, 2.2vw, 1.4rem);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 400;
  color: var(--color-white);
  white-space: nowrap;
}

/* Left aligned items */
.highlight-item:nth-child(3n+1) {
  text-align: right;
}

/* Right aligned items */
.highlight-item:nth-child(3n+3) {
  text-align: left;
}

/* Golden Dots */
.highlight-item:nth-child(3n+2) {
  color: var(--color-accent);
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(1rem, 3vw, 2rem);
  margin-top: -0.1em;
  padding: 0 0.5rem;
}

/* ==========================================================================
   VIDEO DISPLAY SECTION
   ========================================================================== */
.video-showcase {
  padding: var(--space-lg) 0;
  text-align: center;
  background-color: var(--color-bg);
}

.video-showcase .section-header {
  margin-bottom: var(--space-lg);
  max-width: 800px;
}

.video-showcase h2 {
  color: var(--color-text);
}

.video-thumbnail-container {
  width: 60%;
  margin: 0 auto;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.video-thumbnail-container:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.video-thumbnail-container video {
  width: 100%;
  display: block;
}

/* Expand Button for Modal */
.video-expand-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s var(--ease-out), background 0.3s ease;
}

.video-expand-btn:hover {
  transform: scale(1.1);
  background: var(--color-white);
}

.video-expand-btn svg {
  width: 24px;
  height: 24px;
  fill: var(--color-text);
}


/* Video Modal */
.video-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(15px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.video-modal.active {
  display: flex;
  opacity: 1;
}

.video-modal-content {
  width: 95%;
  max-width: 1280px;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.4s var(--ease-out);
}

.video-modal.active .video-modal-content {
  transform: scale(1);
}

.video-modal-content video {
  width: 100%;
  height: auto;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
  background: #000;
}

.video-modal-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 2.5rem;
  cursor: pointer;
  padding: 10px;
  line-height: 1;
  transition: color 0.3s ease;
}

.video-modal-close:hover {
  color: var(--color-accent);
}

@media (max-width: 900px) {
  .video-thumbnail-container {
    width: 90%;
  }
}


@media (max-width: 768px) {
  .parallax-highlights {
    background-attachment: scroll !important;
    background-position: center center !important;
    height: 60vh;
    /* Better ratio for mobile */
    min-height: 400px;
  }

  .highlights-list {
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem 0.5rem;
    width: 95%;
    margin: 0 auto;
  }

  .highlight-item {
    font-size: clamp(0.7rem, 3vw, 1.1rem);
  }

  .highlight-item:nth-child(3n+2) {
    font-size: 1.5rem;
  }

  .description-kpi-container {
    padding: var(--space-lg) 1rem;
    margin-top: var(--space-lg);
  }

  .description-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    /* 2 columns on mobile for better space usage */
    gap: var(--space-md);
  }

  .highlights-content {
    width: 95%;
  }
}

@media (max-width: 480px) {
  .highlights-list {
    grid-template-columns: 1fr;
    /* Stack on very small screens if needed, or keep 3 columns but smaller text */
  }

  /* Alternative: Keep 3 columns but make everything smaller */
  .highlights-list {
    grid-template-columns: 1fr auto 1fr;
    gap: 0.5rem 0.5rem;
  }

  .highlight-item {
    font-size: 0.75rem;
  }

  .highlight-item:nth-child(3n+2) {
    font-size: 1.2rem;
  }

  .description-kpi-grid {
    grid-template-columns: 1fr;
    /* Single column on very small phones */
  }
}