/* ==========================================================================
   pages/villas.css — the-villas.html
   --------------------------------------------------------------------------
   Project:   Kali Villas Mentawai
   Layer:     Page (ITCSS)
   Loaded by: the-villas.html (LAST)
   --------------------------------------------------------------------------
   Page sections, in document order:
     1. Page hero    — full-bleed lifestyle image + title
     2. Overview     — combined block with three internal layers:
                        a. .overview-intro    title + stats + body
                        b. .floorplan-grid    four spatial zones
                        c. .amenities-grid    four essentials
     3. Gallery      — full property tour (carousel + lightbox)
     4. Pillars      — Surf / Rest / Repeat (rhythm of the place)
     5. CTA          — handled by components.css
   ========================================================================== */


/* ==========================================================================
   1. Page hero
   ========================================================================== */
.page-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: 75vh;
  min-height: 520px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to bottom,
      rgba(12, 10, 8, 0.20)  0%,
      rgba(12, 10, 8, 0.05) 25%,
      rgba(12, 10, 8, 0.60) 65%,
      rgba(12, 10, 8, 0.85) 100%),
    url('../../img/villa/villa-front-women-eating-on-deck-dog-coconut-tree.jpg');
  background-size: cover;
  background-position: center 50%;
}
.hero-content {
  position: relative;
  padding: 0 4rem 5rem;
  max-width: 700px;
}
.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.75rem, 5.5vw, 4.75rem);
  font-weight: 300;
  line-height: 1.05;
  color: #f2ede4;
  text-shadow: 0 2px 20px rgba(245, 239, 227, 0.4);
}
.hero-title em {
  font-style: italic;
  color: rgba(242, 237, 228, 0.65);
}
/* Override the eyebrow colour for the dark hero */
.page-hero .eyebrow {
  margin-bottom: 1.5rem;
  color: var(--terra-light);
}


/* ==========================================================================
   2. Overview — single section containing intro, floor plan, amenities
   --------------------------------------------------------------------------
   Replaces the previous separate sections (Intro / Floor Plan / Amenities).
   The three internal blocks now share one editorial surface so they read
   as facets of the same overview rather than independent sections.

   Block stack:
     .overview-intro      → title + body in two columns + stats row
     .floorplan-grid      → four spatial zones (carried over from old layout)
     .amenities-grid      → four essentials (carried over from old layout)
   ========================================================================== */
.overview {
  max-width: 1200px;
  margin: 0 auto;
  padding: 7rem 4rem 8rem;
}

/* Two-column header: title block on the left, body+stats on the right */
.overview-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
  margin-bottom: 5rem;
}

/* The "2 suites · 4 guests" stat row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 3rem;
  background: var(--sand-deeper);
  border: 0.5px solid var(--sand-deeper);
}
.stat {
  padding: 1.75rem 1.5rem;
  background: var(--sand-dark);
  transition: background 0.3s;
}
.stat:hover {
  background: var(--sand);
}
.stat-num {
  margin-bottom: 0.4rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.25rem;
  font-weight: 300;
  line-height: 1;
  color: var(--navy);
}
.stat-label {
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy-dim);
}


/* ==========================================================================
   4. Pillars — Surf / Rest / Repeat
   --------------------------------------------------------------------------
   Sits after the gallery as the closing rhythm of the page — the days
   "find their shape" once the place itself has been seen.
   ========================================================================== */
.pillars-section {
  padding: 7rem 4rem;
  background: var(--sand-dark);
  border-top: 0.5px solid var(--sand-deeper);
  border-bottom: 0.5px solid var(--sand-deeper);
}
.pillars-inner {
  max-width: 1200px;
  margin: 0 auto;
}
/* Eyebrow above title, both left-aligned — matches the standard
   section-header rhythm used on every other page (see overview, gallery,
   rates, etc.). The earlier flex space-between layout was a one-off that
   read as right-shifted next to the rest of the site. */
.pillars-head {
  margin-bottom: 5rem;
}
.pillars-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.75rem, 2.8vw, 2.6rem);
  font-weight: 300;
  line-height: 1.25;
  color: var(--navy);
}
.pillars-title em {
  font-style: italic;
  color: var(--terra);
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--sand-deeper);
}
.pillar {
  position: relative;
  padding: 3.5rem 2.75rem;
  background: var(--sand-dark);
  transition: background 0.4s;
}
.pillar:hover {
  background: var(--sand);
}
.pillar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 2.75rem;
  right: 2.75rem;
  height: 2px;
  background: transparent;
  transition: background 0.4s;
}
.pillar:hover::before {
  background: var(--terra);
}
.pillar-num {
  margin-bottom: 2rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 4.5rem;
  font-weight: 300;
  line-height: 1;
  color: var(--terra);
  opacity: 0.22;
  transition: opacity 0.4s;
}
.pillar:hover .pillar-num {
  opacity: 0.45;
}
.pillar-title {
  margin-bottom: 1.25rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.65rem;
  font-weight: 400;
  color: var(--navy);
}
.pillar-body {
  font-size: 0.87rem;
  font-weight: 300;
  line-height: 1.95;
  color: var(--navy-muted);
}
.pillar-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--terra);
  text-decoration: none;
  transition: gap 0.3s;
}
.pillar-link::after {
  content: '→';
  font-size: 0.875rem;
}
.pillar-link:hover {
  gap: 1.2rem;
}


/* ==========================================================================
   3. Gallery — full property tour (every photo in /img/villa/)
   --------------------------------------------------------------------------
   Reuses the .gallery-carousel structure from css/pages/home.css with the
   .gallery-carousel--villa modifier for villa-specific behaviour:

     Desktop:  square cards in a single horizontal row, ~4 visible per snap,
               edge fade overlays signal more content, prev/next arrows.
     Mobile:   square cards laid out as a horizontal scroll with TWO rows
               (a column = stacked pair of cards). No fade overlays. First
               column centres on screen, next column peeks on the right.

   Every card has [data-lightbox] so any tap opens the full-size viewer
   (see css/lightbox.css and js/lightbox.js).
   ========================================================================== */
.gallery-section {
  padding: 0 4rem 8rem;
}
.gallery-inner {
  max-width: 1200px;
  margin: 0 auto;
}
/* Eyebrow above the villa carousel — slightly wider gap than the default
   .eyebrow so it breathes against the gallery grid below. */
.gallery-section .eyebrow {
  margin-bottom: 2.5rem;
}

/* Square cards — override the default 4:3 from home.css carousel */
.gallery-carousel--villa .carousel-item {
  aspect-ratio: 1 / 1;
}


/* --------------------------------------------------------------------------
   Mobile (< 901px) — TWO rows, no fades
   --------------------------------------------------------------------------
   The track becomes a CSS Grid with 2 explicit rows and auto-flow column,
   so 16 thumbs lay out as 8 columns × 2 rows scrolling horizontally.
   Each card snaps to centre, so a column (pair of cards) sits centred on
   screen at every snap, with the next column peeking on the right.
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .gallery-carousel--villa::before,
  .gallery-carousel--villa::after {
    display: none;                       /* no fade overlays on mobile */
  }

  .gallery-carousel--villa .carousel-track {
    display: grid;
    grid-template-rows: 1fr 1fr;
    grid-auto-flow: column;
    grid-auto-columns: 60vw;             /* each column = card width */
    gap: 6px;
    margin: 0 -1.75rem;
    padding-inline: 20vw;                /* (100vw − 60vw) / 2 — first column centred */
    scroll-padding-inline: 20vw;
  }
  .gallery-carousel--villa .carousel-item {
    flex: none;                           /* grid sizes the cells */
    width: auto;
    aspect-ratio: 1 / 1;
    scroll-snap-align: center;
  }
}


/* ==========================================================================
   2b. Floor plan grid — four "zones", lives inside .overview
   --------------------------------------------------------------------------
   Outer container styles removed (no separate .floorplan-section now). The
   grid itself + .fp-zone cards keep the same visual treatment.
   ========================================================================== */
.floorplan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-bottom: 4rem;             /* breathing room before .amenities-grid */
  background: var(--sand-deeper);
  border: 0.5px solid var(--sand-deeper);
}
.fp-zone {
  position: relative;
  padding: 3rem 2.75rem;
  background: var(--sand-dark);
  transition: background 0.35s;
}
.fp-zone:hover {
  background: var(--sand);
}
.fp-zone::before {
  content: '';
  position: absolute;
  top: 0;
  left: 2.75rem;
  width: 0;
  height: 2px;
  background: var(--terra);
  transition: width 0.4s ease;
}
.fp-zone:hover::before {
  width: calc(100% - 5.5rem);
}
.fp-zone-name {
  margin-bottom: 1rem;
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--terra);
}
.fp-zone-title {
  margin-bottom: 0.4rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--navy);
}
.fp-zone-size {
  margin-bottom: 1.5rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  color: var(--navy-muted);
}

.fp-features {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  list-style: none;
}
.fp-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  font-size: 0.83rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--navy-muted);
}
.fp-features li::before {
  content: '';
  flex-shrink: 0;
  margin-top: 0.55rem;
  width: 4px;
  height: 4px;
  background: var(--terra-light);
  border-radius: 50%;
}


/* ==========================================================================
   2c. Amenities grid — four essentials, lives inside .overview
   --------------------------------------------------------------------------
   Outer container styles removed; the grid + .amenity cards stay.
   ========================================================================== */
.amenities-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--sand-deeper);
  border: 0.5px solid var(--sand-deeper);
}
.amenity {
  padding: 2rem 1.75rem;
  background: var(--sand);
  transition: background 0.3s;
}
.amenity:hover {
  background: var(--sand-dark);
}
.amenity-icon {
  margin-bottom: 0.875rem;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terra);
}
.amenity-name {
  margin-bottom: 0.35rem;
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--navy);
}
.amenity-detail {
  font-size: 0.78rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--navy-dim);
}


/* ==========================================================================
   Mobile breakpoints (< 900px)
   ========================================================================== */
@media (max-width: 900px) {
  .hero-content    { padding: 0 1.75rem 4rem; }

  .overview        { padding: 5rem 1.75rem 6rem; }
  .overview-intro  { grid-template-columns: 1fr; gap: 3rem; margin-bottom: 3.5rem; }
  .stats-row       { grid-template-columns: 1fr 1fr; }
  .floorplan-grid  { grid-template-columns: 1fr; margin-bottom: 3rem; }
  .amenities-grid  { grid-template-columns: 1fr 1fr; }

  .pillars-section { padding: 5rem 1.75rem; }
  .pillars-head    { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
  .pillars-title   { text-align: left; }
  .pillars-grid    { grid-template-columns: 1fr; }

  .gallery-section { padding: 0 1.75rem 6rem; }
}
