/* ============================================
   VILLA SERENA — Design System & Styles
   Modern Mediterranean Luxury
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Colors — Mediterranean Palette */
  --color-stone:        #F5F0E8;
  --color-stone-light:  #FAF8F4;
  --color-stone-dark:   #E8DFD0;
  --color-warm-white:   #FEFDFB;
  --color-cream:        #F2EDE4;
  --color-terracotta:   #C17A56;
  --color-terracotta-dark: #A8613D;
  --color-terracotta-light: #D4956F;
  --color-olive:        #6B7F4E;
  --color-olive-dark:   #4F5F39;
  --color-olive-light:  #8A9E6B;
  --color-charcoal:     #2C2A26;
  --color-charcoal-light: #4A4640;
  --color-brown:        #5C4A3A;
  --color-gold:         #C9A96E;
  --color-gold-light:   #DCC18A;
  --color-sand:         #D4C5A9;
  --color-sage:         #A3B18A;

  /* Typography */
  --font-serif:   'Cormorant Garamond', 'Georgia', serif;
  --font-sans:    'Inter', 'Segoe UI', sans-serif;
  --font-accent:  'Cormorant', serif;

  /* Spacing Scale */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2.5rem;
  --space-xl:  4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;
  --space-4xl: 12rem;

  /* Transitions */
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:  cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast:   0.2s;
  --duration-normal: 0.4s;
  --duration-slow:   0.8s;

  /* Layout */
  --max-width:    1280px;
  --nav-height:   80px;

  /* Borders & Radius */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  16px;
  --radius-xl:  24px;
}

/* --- Dark Mode Variables --- */
body.dark-mode {
  --color-stone:        #1A1816;
  --color-stone-light:  #141210;
  --color-stone-dark:   #2C2A26;
  --color-warm-white:   #0C0B0A;
  --color-cream:        #181614;
  --color-terracotta:   #D4956F;
  --color-terracotta-dark: #C17A56;
  --color-terracotta-light: #E0B49C;
  --color-olive:        #8A9E6B;
  --color-olive-dark:   #6B7F4E;
  --color-olive-light:  #A3B18A;
  --color-charcoal:     #F5F0E8;
  --color-charcoal-light: #D4C5A9;
  --color-brown:        #E8DFD0;
  --color-gold:         #DCC18A;
  --color-gold-light:   #C9A96E;
  --color-sand:         #4A4640;
  --color-sage:         #4F5F39;
}

/* Dark mode specific overrides for hardcoded values */
body.dark-mode .nav--scrolled { background: rgba(12, 11, 10, 0.92); }
body.dark-mode .nav__mobile-menu { background: rgba(12, 11, 10, 0.98); }
body.dark-mode .apartment__image-badge { background: rgba(26, 24, 22, 0.92); }
body.dark-mode .carousel__btn { background: rgba(26, 24, 22, 0.9); }
body.dark-mode .carousel__btn:hover { background: var(--color-stone-dark); }
body.dark-mode .shared-space__card { background: var(--color-stone); }
body.dark-mode .form__input, 
body.dark-mode .form__textarea, 
body.dark-mode .form__select { 
  background: var(--color-stone-light); 
  border-color: var(--color-stone-dark); 
}
body.dark-mode .form__input::placeholder, 
body.dark-mode .form__textarea::placeholder { 
  color: rgba(255, 255, 255, 0.3); 
}
body.dark-mode .sticky-book { background: rgba(12, 11, 10, 0.95); }
body.dark-mode .gallery, 
body.dark-mode .footer { 
  background: var(--color-stone-dark); 
}

/* Theme Toggle Button Styles */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: white;
  transition: all var(--duration-normal) var(--ease-out);
  margin-left: var(--space-sm);
}

.nav--scrolled .theme-toggle {
  color: var(--color-charcoal);
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav--scrolled .theme-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
}

body.dark-mode .nav--scrolled .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.theme-toggle .moon-icon { display: none; }
body.dark-mode .theme-toggle .sun-icon { display: none; }
body.dark-mode .theme-toggle .moon-icon { display: block; }


/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--color-charcoal);
  background: var(--color-warm-white);
  line-height: 1.7;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-charcoal);
}

h1 { font-size: clamp(2.8rem, 6vw, 5.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
h4 { font-size: clamp(1.1rem, 1.5vw, 1.4rem); }

.subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--color-terracotta);
  letter-spacing: 0.02em;
  font-weight: 300;
}

.section-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-terracotta);
  margin-bottom: var(--space-sm);
  display: inline-block;
  position: relative;
}

.section-label::after {
  content: '';
  display: block;
  width: 30px;
  height: 1px;
  background: var(--color-terracotta);
  margin-top: 8px;
}

.body-text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-charcoal-light);
  max-width: 600px;
}

/* --- Layout Utilities --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-3xl) 0;
}

.section--alt {
  background: var(--color-stone-light);
}

/* --- Animations & Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: background var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out),
              backdrop-filter var(--duration-normal) var(--ease-out);
}

.nav--scrolled {
  background: rgba(254, 253, 251, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.nav__logo {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 500;
  color: white;
  letter-spacing: 0.04em;
  transition: color var(--duration-normal) var(--ease-out);
}

.nav--scrolled .nav__logo {
  color: var(--color-charcoal);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav__link {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  transition: color var(--duration-fast) var(--ease-out);
  position: relative;
}

.nav--scrolled .nav__link {
  color: var(--color-charcoal-light);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-terracotta);
  transition: width var(--duration-normal) var(--ease-out);
}

.nav__link:hover::after {
  width: 100%;
}

.nav__link:hover {
  color: var(--color-terracotta);
}

.nav__cta {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: white;
  background: var(--color-terracotta);
  padding: 10px 24px;
  border-radius: 100px;
  transition: all var(--duration-fast) var(--ease-out);
}

.nav__cta:hover {
  background: var(--color-terracotta-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(193, 122, 86, 0.3);
}

/* Mobile Nav Toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  z-index: 1001;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  transition: all var(--duration-normal) var(--ease-out);
  border-radius: 2px;
}

.nav--scrolled .nav__toggle span {
  background: var(--color-charcoal);
}

.nav__toggle.active span:nth-child(1) {
  transform: rotate(45deg) translateY(5px) translateX(5px);
}
.nav__toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav__toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-5px) translateX(5px);
}

/* Mobile Menu */
.nav__mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(254, 253, 251, 0.98);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.nav__mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.nav__mobile-menu .nav__link {
  font-size: 1.2rem;
  color: var(--color-charcoal);
}

.nav__mobile-menu .nav__cta {
  margin-top: var(--space-sm);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 700px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  transition: transform 1.2s var(--ease-out);
}

.hero.loaded .hero__bg img {
  transform: scale(1);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.05) 40%,
    rgba(0, 0, 0, 0.45) 100%
  );
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 var(--space-lg) var(--space-3xl);
  max-width: 900px;
}

.hero__name {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 400;
  color: white;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-sm);
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(30px);
  animation: heroFadeIn 1.2s var(--ease-out) 0.3s forwards;
}

.hero__tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1rem, 2.2vw, 1.5rem);
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.03em;
  font-weight: 300;
  margin-bottom: var(--space-lg);
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeIn 1s var(--ease-out) 0.7s forwards;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: white;
  background: var(--color-terracotta);
  padding: 16px 40px;
  border-radius: 100px;
  transition: all var(--duration-normal) var(--ease-out);
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeIn 1s var(--ease-out) 1s forwards;
}

.hero__cta:hover {
  background: var(--color-terracotta-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(193, 122, 86, 0.4);
}

.hero__cta svg {
  width: 16px;
  height: 16px;
  transition: transform var(--duration-fast) var(--ease-out);
}

.hero__cta:hover svg {
  transform: translateX(3px);
}

.hero__scroll {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0;
  animation: heroFadeIn 1s var(--ease-out) 1.4s forwards;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.6), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes heroFadeIn {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.2); }
}

/* --- Intro Section --- */
.intro {
  padding: var(--space-3xl) 0;
  text-align: center;
}

.intro__inner {
  max-width: 800px;
  margin: 0 auto;
}

.intro__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.intro__divider-line {
  width: 60px;
  height: 1px;
  background: var(--color-sand);
}

.intro__divider-icon {
  font-size: 1.2rem;
  color: var(--color-olive);
}

.intro__heading {
  margin-bottom: var(--space-md);
}

.intro__text {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--color-charcoal-light);
  max-width: 650px;
  margin: 0 auto;
}

.intro__features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-2xl);
}

.intro__feature {
  text-align: center;
  padding: var(--space-lg);
}

.intro__feature-icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.intro__feature-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin-bottom: var(--space-xs);
  color: var(--color-charcoal);
}

.intro__feature-text {
  font-size: 0.9rem;
  color: var(--color-charcoal-light);
  line-height: 1.7;
}

/* --- Apartments Section --- */
.apartments {
  padding: var(--space-3xl) 0;
}

.apartments__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.apartments__header h2 {
  margin-bottom: var(--space-xs);
}

/* Apartment Card */
.apartment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
  margin-bottom: var(--space-3xl);
}

.apartment:nth-child(even) {
  direction: rtl;
}

.apartment:nth-child(even) > * {
  direction: ltr;
}

.apartment:last-child {
  margin-bottom: 0;
}

.apartment__image-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--color-stone);
}

.carousel__track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

.carousel__track::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}

.carousel__slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  position: relative;
}

.carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.apartment__image-wrap:hover .carousel__slide img {
  transform: scale(1.04);
}

.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(254, 253, 251, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-charcoal);
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  opacity: 0.85;
  transition: opacity var(--duration-fast), transform var(--duration-fast);
}

.carousel__btn:hover {
  opacity: 1;
  background: white;
  transform: translateY(-50%) scale(1.05);
}

.carousel__btn--prev { left: var(--space-sm); }
.carousel__btn--next { right: var(--space-sm); }

.carousel__dots {
  position: absolute;
  bottom: var(--space-md);
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 10;
}

.carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background var(--duration-fast), transform var(--duration-fast);
}

.carousel__dot.active {
  background: white;
  transform: scale(1.2);
}

.apartment__image-badge {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  background: rgba(254, 253, 251, 0.92);
  backdrop-filter: blur(10px);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-charcoal);
}

.apartment__content {
  padding: var(--space-lg) 0;
}

.apartment__number {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  color: var(--color-terracotta);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
  font-weight: 600;
}

.apartment__name {
  margin-bottom: var(--space-sm);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.apartment__desc {
  font-size: 1rem;
  color: var(--color-charcoal-light);
  line-height: 1.8;
  margin-bottom: var(--space-lg);
}

.apartment__features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.apartment__feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--color-charcoal-light);
}

.apartment__feature-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-stone);
  border-radius: 50%;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.apartment__divider {
  width: 40px;
  height: 1px;
  background: var(--color-sand);
}

/* --- Shared Space Section --- */
.shared-space {
  position: relative;
  overflow: hidden;
}

.shared-space__hero {
  position: relative;
  height: 70vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shared-space__hero-bg {
  position: absolute;
  inset: 0;
}

.shared-space__hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shared-space__hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.5) 100%
  );
}

.shared-space__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
  padding: 0 var(--space-lg);
  max-width: 800px;
}

.shared-space__hero-content .section-label {
  color: var(--color-gold-light);
}

.shared-space__hero-content .section-label::after {
  background: var(--color-gold-light);
}

.shared-space__hero-content h2 {
  color: white;
  margin-bottom: var(--space-md);
}

.shared-space__hero-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-serif);
  font-style: italic;
}

.shared-space__details {
  padding: var(--space-2xl) 0;
}

.shared-space__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.shared-space__card {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--color-stone-light);
  border-radius: var(--radius-lg);
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.shared-space__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

.shared-space__card-icon {
  font-size: 2rem;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-stone);
  border-radius: var(--radius-md);
}

.shared-space__card-content h4 {
  margin-bottom: var(--space-xs);
  font-size: 1.2rem;
}

.shared-space__card-content p {
  font-size: 0.9rem;
  color: var(--color-charcoal-light);
  line-height: 1.7;
}

/* Second shared space image */
.shared-space__secondary {
  margin-top: var(--space-xl);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 21/9;
}

.shared-space__secondary img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Gallery Section --- */
.gallery {
  padding: var(--space-3xl) 0;
  background: var(--color-charcoal);
}

.gallery__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.gallery__header h2 {
  color: white;
}

.gallery__header .subtitle {
  color: var(--color-gold-light);
}

.gallery__header .section-label {
  color: var(--color-gold);
}

.gallery__header .section-label::after {
  background: var(--color-gold);
}

.gallery__carousel-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--color-stone);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.gallery__carousel-wrap .carousel__slide {
  cursor: pointer;
}

.gallery__carousel-wrap .carousel__slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.gallery__carousel-wrap .carousel__slide:hover::after {
  opacity: 1;
}

.gallery__item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.gallery__item:hover img {
  transform: scale(1.06);
}

.gallery__item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
  display: flex;
  align-items: flex-end;
  padding: var(--space-md);
}

.gallery__item:hover .gallery__item-overlay {
  opacity: 1;
}

.gallery__item-overlay span {
  color: white;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-style: italic;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox__img {
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.lightbox__close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  color: white;
  font-size: 2rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: background var(--duration-fast) var(--ease-out);
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: background var(--duration-fast) var(--ease-out);
}

.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox__nav--prev { left: var(--space-lg); }
.lightbox__nav--next { right: var(--space-lg); }

/* --- Location Section --- */
.location {
  padding: var(--space-3xl) 0;
  background: var(--color-stone-light);
}

.location__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.location__content {
  padding: var(--space-lg) 0;
}

.location__content h2 {
  margin-bottom: var(--space-md);
}

.location__content > p {
  font-size: 1rem;
  color: var(--color-charcoal-light);
  line-height: 1.8;
  margin-bottom: var(--space-xl);
}

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

.location__attraction {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.location__attraction-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.location__attraction-info h4 {
  font-size: 1rem;
  margin-bottom: 4px;
  font-weight: 500;
}

.location__attraction-info p {
  font-size: 0.85rem;
  color: var(--color-charcoal-light);
}

.location__map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--color-stone);
  position: relative;
}

.location__map iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.location__map-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-olive-light), var(--color-olive));
  color: white;
  text-align: center;
  padding: var(--space-lg);
}

.location__map-placeholder svg {
  width: 64px;
  height: 64px;
  margin-bottom: var(--space-sm);
  opacity: 0.8;
}

.location__map-placeholder p {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-style: italic;
  opacity: 0.9;
}

/* --- Contact Section --- */
.contact {
  padding: var(--space-3xl) 0;
}

.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.contact__info {
  padding: var(--space-lg) 0;
}

.contact__info h2 {
  margin-bottom: var(--space-md);
}

.contact__info > p {
  font-size: 1rem;
  color: var(--color-charcoal-light);
  line-height: 1.8;
  margin-bottom: var(--space-xl);
}

.contact__channels {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.contact__channel {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-stone-light);
  border-radius: var(--radius-lg);
  transition: all var(--duration-normal) var(--ease-out);
}

.contact__channel:hover {
  transform: translateX(6px);
  background: var(--color-stone);
}

.contact__channel-icon {
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 50%;
  flex-shrink: 0;
}

.contact__channel-info h4 {
  font-size: 1rem;
  margin-bottom: 2px;
}

.contact__channel-info p {
  font-size: 0.85rem;
  color: var(--color-charcoal-light);
}

/* Contact Form */
.contact__form {
  background: var(--color-stone-light);
  padding: var(--space-xl);
  border-radius: var(--radius-xl);
}

.contact__form h3 {
  margin-bottom: var(--space-lg);
}

.form__group {
  margin-bottom: var(--space-md);
}

.form__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-charcoal-light);
  margin-bottom: var(--space-xs);
}

.form__input,
.form__textarea,
.form__select {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--color-stone-dark);
  border-radius: var(--radius-md);
  background: white;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--color-charcoal);
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
  outline: none;
}

.form__input:focus,
.form__textarea:focus,
.form__select:focus {
  border-color: var(--color-terracotta);
  box-shadow: 0 0 0 3px rgba(193, 122, 86, 0.12);
}

.form__input::placeholder,
.form__textarea::placeholder {
  color: var(--color-sand);
}

.form__textarea {
  resize: vertical;
  min-height: 120px;
}

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

.form__submit {
  width: 100%;
  padding: 16px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: white;
  background: var(--color-terracotta);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-out);
  margin-top: var(--space-sm);
}

.form__submit:hover {
  background: var(--color-terracotta-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(193, 122, 86, 0.35);
}

/* --- Footer --- */
.footer {
  background: var(--color-charcoal);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-2xl) 0 var(--space-lg);
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-xl);
}

.footer__brand {
  max-width: 320px;
}

.footer__logo {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: white;
  margin-bottom: var(--space-sm);
  letter-spacing: 0.04em;
}

.footer__brand p {
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer__col h4 {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: var(--space-md);
}

.footer__col a {
  display: block;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  padding: 4px 0;
  transition: color var(--duration-fast) var(--ease-out);
}

.footer__col a:hover {
  color: var(--color-terracotta-light);
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
}

.footer__social {
  display: flex;
  gap: var(--space-sm);
}

.footer__social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.6);
  transition: all var(--duration-fast) var(--ease-out);
}

.footer__social a:hover {
  background: var(--color-terracotta);
  color: white;
}

/* --- Sticky Book Button (Mobile) --- */
.sticky-book {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  padding: var(--space-sm) var(--space-lg);
  background: rgba(254, 253, 251, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.08);
  display: none;
  transform: translateY(100%);
  transition: transform var(--duration-normal) var(--ease-out);
}

.sticky-book.visible {
  transform: translateY(0);
}

.sticky-book__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: white;
  background: var(--color-terracotta);
  border-radius: var(--radius-md);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .apartment {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .apartment:nth-child(even) {
    direction: ltr;
  }

  .location__inner,
  .contact__inner {
    grid-template-columns: 1fr;
  }

  .gallery__grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 220px;
  }

  .footer__inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --space-lg: 1.5rem;
    --space-xl: 2.5rem;
    --space-2xl: 4rem;
    --space-3xl: 5rem;
  }

  .nav__links {
    display: none;
  }

  .nav__toggle {
    display: flex;
  }

  .nav__mobile-menu {
    display: flex;
  }

  .hero__content {
    padding-bottom: var(--space-2xl);
  }

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

  .apartment__features {
    grid-template-columns: 1fr;
  }

  .shared-space__grid {
    grid-template-columns: 1fr;
  }

  .gallery__carousel-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--color-stone);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.gallery__carousel-wrap .carousel__slide {
  cursor: pointer;
}

.gallery__carousel-wrap .carousel__slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.gallery__carousel-wrap .carousel__slide:hover::after {
  opacity: 1;
}

  .gallery__item:nth-child(1) {
    grid-column: span 2;
    grid-row: span 1;
  }

  .gallery__item:nth-child(5) {
    grid-column: span 1;
  }

  .location__attractions {
    grid-template-columns: 1fr;
  }

  .form__row {
    grid-template-columns: 1fr;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .footer__bottom {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }

  .sticky-book {
    display: block;
  }

  .contact__form {
    padding: var(--space-lg);
  }
}

@media (max-width: 480px) {
  .gallery__grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
  }

  .gallery__item:nth-child(1) {
    grid-column: span 1;
  }

  .shared-space__hero {
    height: 50vh;
  }
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-stone-light);
}

::-webkit-scrollbar-thumb {
  background: var(--color-sand);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-terracotta-light);
}

/* --- Selection --- */
::selection {
  background: var(--color-terracotta);
  color: white;
}
