/* assets/css/villa.css */
@import 'tokens.css';

/* ── Villa page body ── */
.villa-page {
  background: var(--color-off-white);
  color: var(--color-espresso);
}

/* ── Hero ── */
.villa-hero {
  position: relative;
  height: 100vh;
  min-height: 500px;
  overflow: hidden;
}
.villa-hero__image { position: absolute; inset: 0; }
.villa-hero__overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay-dark-center);
}
.villa-hero__content {
  position: absolute;
  bottom: var(--space-2xl);
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 2;
  width: 100%;
  padding: 0 var(--gutter);
}
.villa-hero__label {
  font-family: var(--font-sans);
  font-size: var(--text-micro);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-sm);
}
.villa-hero__title {
  font-family: var(--font-serif);
  font-size: var(--text-hero);
  font-weight: 400;
  font-style: italic;
  color: var(--color-off-white);
  line-height: var(--leading-tight);
}

/* Back navigation */
.villa-back {
  position: absolute;
  top: calc(var(--nav-height) + 16px);
  left: var(--gutter);
  z-index: 10;
  font-family: var(--font-sans);
  font-size: var(--text-micro);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(245, 239, 230, 0.55);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color var(--transition-fast);
}
.villa-back:hover { color: var(--color-off-white); }
.villa-back::before { content: '←'; }

/* ── Overview ── */
.villa-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  padding: var(--space-2xl) var(--gutter-wide);
  max-width: 1100px;
  margin: 0 auto;
}
.villa-overview__pull {
  font-family: var(--font-serif);
  font-size: var(--text-h3);
  font-style: italic;
  font-weight: 400;
  color: var(--color-espresso);
  line-height: 1.45;
}
.villa-overview__body {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  color: rgba(58, 48, 37, 0.7);
  line-height: var(--leading-body);
  padding-top: 6px;
}

/* ── Specs strip ── */
.villa-specs {
  display: flex;
  justify-content: center;
  gap: 0;
  border-top: 1px solid rgba(58, 48, 37, 0.1);
  border-bottom: 1px solid rgba(58, 48, 37, 0.1);
  padding: var(--space-lg) var(--gutter);
  flex-wrap: wrap;
}
.villa-specs__item {
  flex: 1;
  min-width: 100px;
  text-align: center;
  padding: var(--space-md) var(--space-sm);
  border-right: 1px solid rgba(58, 48, 37, 0.1);
}
.villa-specs__item:last-child { border-right: none; }
.villa-specs__value {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 400;
  font-style: italic;
  color: var(--color-espresso);
  line-height: 1;
  margin-bottom: var(--space-xs);
}
.villa-specs__label {
  font-family: var(--font-sans);
  font-size: var(--text-micro);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(58, 48, 37, 0.45);
}

/* ── Gallery ── */
.villa-gallery {
  padding: var(--space-2xl) var(--gutter);
  background: var(--color-sand);
}
.villa-gallery__label {
  font-family: var(--font-sans);
  font-size: var(--text-micro);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(58, 48, 37, 0.45);
  text-align: center;
  margin-bottom: var(--space-lg);
}
.villa-gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 280px;
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
}
.villa-gallery__item {
  overflow: hidden;
  cursor: pointer;
  position: relative;
}
.villa-gallery__item:nth-child(1) {
  grid-column: span 2;
  grid-row: span 2;
}
.villa-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), filter var(--transition-mid);
}
.villa-gallery__item:hover img {
  transform: scale(1.05);
  filter: brightness(0.92);
}

/* ── Lightbox ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 23, 20, 0.97);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox__img {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: default;
}
.lightbox__close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  font-size: 24px;
  color: rgba(245, 239, 230, 0.6);
  cursor: pointer;
  transition: color var(--transition-fast);
  font-family: var(--font-sans);
  font-weight: 200;
  line-height: 1;
}
.lightbox__close:hover { color: var(--color-off-white); }
.lightbox__prev, .lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-sans);
  font-size: var(--text-micro);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(245, 239, 230, 0.45);
  cursor: pointer;
  transition: color var(--transition-fast);
  padding: var(--space-md);
}
.lightbox__prev { left: 0; }
.lightbox__next { right: 0; }
.lightbox__prev:hover, .lightbox__next:hover { color: var(--color-off-white); }

/* ── Content split sections ── */
.villa-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 500px;
}
.villa-split--reverse { direction: rtl; }
.villa-split--reverse > * { direction: ltr; }
.villa-split__image { overflow: hidden; }
.villa-split__image img { transition: transform 0.9s ease; }
.villa-split:hover .villa-split__image img { transform: scale(1.03); }
.villa-split__text {
  padding: var(--space-2xl) var(--gutter-wide);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--color-off-white);
}
.villa-split__label {
  font-family: var(--font-sans);
  font-size: var(--text-micro);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-sm);
}
.villa-split__title {
  font-family: var(--font-serif);
  font-size: var(--text-h2);
  font-weight: 400;
  font-style: italic;
  color: var(--color-espresso);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-md);
}
.villa-split__body {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  color: rgba(58, 48, 37, 0.65);
  line-height: var(--leading-body);
  max-width: 42ch;
}

/* ── Location strip ── */
.villa-location {
  background: var(--color-sand);
  padding: var(--space-2xl) var(--gutter);
  text-align: center;
}
.villa-location__title {
  font-family: var(--font-serif);
  font-size: var(--text-h2);
  font-weight: 400;
  font-style: italic;
  color: var(--color-espresso);
  margin-bottom: var(--space-md);
}
.villa-location__body {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  color: rgba(58, 48, 37, 0.65);
  line-height: var(--leading-body);
  max-width: 520px;
  margin: 0 auto var(--space-lg);
}
.villa-location__distances {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-lg);
}
.villa-location__dist {
  font-family: var(--font-sans);
  font-size: var(--text-micro);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(58, 48, 37, 0.55);
}
.villa-location__dist strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 22px;
  font-style: italic;
  font-weight: 400;
  color: var(--color-espresso);
  letter-spacing: 0;
  text-transform: none;
  margin-bottom: 2px;
}

/* ── Amenities ── */
.villa-amenities {
  padding: var(--space-2xl) var(--gutter);
  max-width: 960px;
  margin: 0 auto;
}
.villa-amenities__title {
  font-family: var(--font-serif);
  font-size: var(--text-h3);
  font-weight: 400;
  font-style: italic;
  color: var(--color-espresso);
  margin-bottom: var(--space-lg);
  text-align: center;
}
.villa-amenities__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md) var(--space-lg);
}
.villa-amenities__item {
  font-family: var(--font-sans);
  font-size: 13px;
  color: rgba(58, 48, 37, 0.65);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}
.villa-amenities__item::before {
  content: '';
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-gold);
  flex-shrink: 0;
}

/* ── House guidelines ── */
.villa-guidelines {
  background: var(--color-sand);
  padding: var(--space-xl) var(--gutter);
  max-width: 720px;
  margin: 0 auto;
}
.villa-guidelines__title {
  font-family: var(--font-serif);
  font-size: var(--text-h3);
  font-weight: 400;
  font-style: italic;
  color: var(--color-espresso);
  margin-bottom: var(--space-md);
}
.villa-guidelines__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.villa-guidelines__item {
  font-family: var(--font-sans);
  font-size: 13px;
  color: rgba(58, 48, 37, 0.65);
  padding-left: var(--space-md);
  position: relative;
  line-height: 1.7;
}
.villa-guidelines__item::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--color-gold);
}

/* ── Villa page contact ── */
.villa-contact {
  background: var(--color-off-white);
  padding: var(--space-2xl) var(--gutter);
}
.villa-contact__inner {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}

/* ── RESPONSIVE: villa.css ── */

@media (max-width: 1024px) {
  .villa-overview {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    padding: var(--space-xl) var(--gutter);
  }
  .villa-split {
    grid-template-columns: 1fr;
    direction: ltr;
  }
  .villa-split__image { height: 50vw; min-height: 280px; }
  .villa-split__text {
    padding: var(--space-xl) var(--gutter);
  }
  .villa-amenities__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .villa-hero__title { font-size: 36px; }
  .villa-specs { gap: 0; }
  .villa-specs__item {
    flex: 0 0 50%;
    border-right: none;
    border-bottom: 1px solid rgba(58,48,37,0.1);
  }
  .villa-gallery__grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 180px;
  }
  .villa-gallery__item:nth-child(1) {
    grid-column: span 2;
    grid-row: span 1;
  }
  .villa-amenities__grid { grid-template-columns: 1fr; }
  .villa-location__distances { flex-direction: column; gap: var(--space-md); align-items: center; }
}
