/* =========================================================
   pages.css — Page-specific styles
   ========================================================= */

/* Homepage sections */
.home-section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--space-6);
}
.home-section-head .eyebrow { justify-content: center; }

/* Concierge grid */
.concierge-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.concierge-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform var(--dur-base) var(--ease-out);
}
.concierge-card:hover { transform: translateY(-3px); }
.concierge-img {
  aspect-ratio: 4/3;
  background: var(--bg-alt) center/cover;
}
.concierge-card h4 { font-size: 1.125rem; margin: var(--space-3) var(--space-3) 0.35rem; font-family: var(--font-serif); font-weight: 500; }
.concierge-card p { margin: 0 var(--space-3) var(--space-3); color: var(--text-muted); font-size: 0.9375rem; }

/* OTA logos */
.ota-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  align-items: center;
  justify-items: center;
  padding: var(--space-4) 0;
}
.ota-logo {
  height: 40px;
  width: auto;
  max-width: 160px;
  color: var(--text-muted);
  opacity: 0.85;
  filter: saturate(0) contrast(0.8);
  transition: filter var(--dur-base), opacity var(--dur-base);
}
.ota-logo:hover { filter: none; opacity: 1; }

/* Instagram feed */
.ig-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.ig-card {
  position: relative;
  aspect-ratio: 1/1;
  background: var(--bg-alt) center/cover;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.ig-card::after {
  content: attr(data-label);
  position: absolute;
  inset: auto 0 0 0;
  padding: var(--space-2);
  color: var(--color-cream);
  background: linear-gradient(to top, rgba(15, 27, 53, 0.82), transparent);
  font-family: var(--font-serif);
  font-size: 1.125rem;
  text-align: left;
}

/* Thailand map */
.thai-map-bg {
  aspect-ratio: 16/9;
  max-height: 520px;
  background: center/cover var(--bg-alt);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.thai-map-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(15, 27, 53, 0.4));
}

/* Dashboard preview */
.dashboard-preview {
  aspect-ratio: 16/10;
  background: linear-gradient(145deg, #1F2A4A, #0F1B35);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  padding: var(--space-4);
  color: #C8D4F0;
}
.dashboard-preview::before {
  content: "";
  position: absolute;
  top: 12px; left: 14px;
  width: 52px; height: 10px;
  background:
    radial-gradient(circle at 5px 5px, #FF6056 4px, transparent 4px),
    radial-gradient(circle at 21px 5px, #FFBD2E 4px, transparent 4px),
    radial-gradient(circle at 37px 5px, #28C93F 4px, transparent 4px);
}
.dashboard-preview .dash-chart {
  margin-top: 2.5rem;
  height: 70%;
  background:
    linear-gradient(transparent 0%, transparent 24%, rgba(201, 168, 76, 0.12) 25%, rgba(201, 168, 76, 0.12) 26%, transparent 27%),
    linear-gradient(transparent 0%, transparent 49%, rgba(201, 168, 76, 0.12) 50%, rgba(201, 168, 76, 0.12) 51%, transparent 52%),
    linear-gradient(transparent 0%, transparent 74%, rgba(201, 168, 76, 0.12) 75%, rgba(201, 168, 76, 0.12) 76%, transparent 77%),
    linear-gradient(145deg, #2A3B6B, #18264A);
  border-radius: var(--radius-md);
  position: relative;
}
.dashboard-preview .dash-chart::after {
  content: "";
  position: absolute;
  inset: 10% 6% 15% 6%;
  background:
    linear-gradient(to right, transparent 0 5%, var(--accent) 5% 6%, transparent 6% 15%,
                     var(--accent) 15% 16%, transparent 16% 30%, var(--accent) 30% 31%,
                     transparent 31% 50%, var(--accent) 50% 51%, transparent 51% 70%,
                     var(--accent) 70% 71%, transparent 71% 85%, var(--accent) 85% 86%, transparent 86% 100%);
  opacity: 0.55;
}
.dashboard-preview .dash-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: rgba(200, 212, 240, 0.55);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 1rem;
}

/* Team teaser */
.team-img {
  aspect-ratio: 4/3;
  background: center/cover var(--bg-alt);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* Sustainability */
.sustain-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.sustain-card {
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  border: 1px solid var(--border);
}
.sustain-card .card-icon { margin-bottom: var(--space-3); }

/* Filter bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: var(--space-3);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  align-items: end;
  box-shadow: var(--shadow-card);
  margin-bottom: var(--space-6);
}
.filter-field { display: flex; flex-direction: column; gap: 0.25rem; flex: 1 1 140px; min-width: 120px; }
.filter-field label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
.filter-field select, .filter-field input {
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 0.9rem;
  color: var(--text);
}
.filter-chips { display:flex; gap:0.4rem; flex-wrap:wrap; }
.filter-chip {
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}
.filter-chip.active { background: var(--accent); color: var(--color-navy); border-color: var(--accent); }

/* Villa detail layout */
.villa-detail {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
}
@media (min-width: 960px) {
  .villa-detail { grid-template-columns: 1fr 360px; align-items: start; }
}

.gallery {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 1fr;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (min-width: 720px) {
  .gallery { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
  .gallery > :first-child { grid-row: span 2; }
}
.gallery img { width:100%; height:100%; object-fit: cover; aspect-ratio: auto; min-height: 160px; }
.gallery > :first-child { aspect-ratio: 4/3; }
@media (min-width: 720px) {
  .gallery > :first-child { aspect-ratio: auto; }
}

.booking-widget {
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.amenities-grid {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: var(--space-3);
}
.amenity {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0;
  font-size: 0.9375rem;
  color: var(--text);
}
.amenity svg { color: var(--accent-strong); width: 18px; height: 18px; flex-shrink: 0; }

/* Contact/office block */
.office-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
}
.office-card h3 { font-size: 1.5rem; }

/* FAQ accordion */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: var(--space-2) 0;
}
.faq-item summary {
  cursor: pointer;
  padding: 0.9rem 0;
  list-style: none;
  font-weight: 500;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  color: var(--accent-strong);
  font-size: 1.75rem;
  font-weight: 300;
  line-height: 1;
  transition: transform var(--dur-base);
}
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-body {
  padding: 0 0 var(--space-3);
  color: var(--text-muted);
  line-height: 1.65;
}

/* Booking CTA section */
.cta-band {
  padding: var(--space-10) var(--space-3);
  text-align: center;
  background: var(--bg-inverse);
  color: var(--text-inverse);
}
.cta-band h2 {
  color: var(--text-inverse);
  margin-bottom: var(--space-3);
}
.cta-band p { color: rgba(250,247,242,0.8); max-width: 56ch; margin: 0 auto var(--space-4); font-size: 1.0625rem; }

/* Page content */
.prose {
  max-width: var(--max-text);
  margin: 0 auto;
}
.prose p { font-size: 1.0625rem; line-height: 1.7; margin-bottom: var(--space-3); color: var(--text); }
.prose h2 { margin-top: var(--space-6); }
.prose h3 { font-size: var(--text-xl); margin-top: var(--space-5); font-family: var(--font-serif); font-weight: 500; }
.prose ul { padding-left: 1.25rem; line-height: 1.75; color: var(--text); }
.prose li { margin-bottom: 0.35rem; }

/* Two-col feature row alternating */
.feature-row {
  display: grid;
  gap: var(--space-6);
  align-items: center;
  padding: var(--space-6) 0;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) { .feature-row { grid-template-columns: 1fr 1fr; } }
.feature-row.reverse > :first-child { order: 2; }
@media (max-width: 899px) { .feature-row.reverse > :first-child { order: 0; } }
.feature-row img, .feature-row .feature-img {
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  background: center/cover var(--bg-alt);
  width: 100%;
  object-fit: cover;
  box-shadow: var(--shadow-md);
}

/* Small utility for page-icon */
.icon-circle {
  width: 44px; height: 44px;
  border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-circle svg { width: 22px; height: 22px; }

/* ---------- Homepage: book-direct strip ---------- */
.book-direct-strip {
  background: linear-gradient(90deg, var(--brand-gold-light) 0%, #F7E9D4 100%);
  padding: var(--space-6) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .book-direct-strip {
  background: linear-gradient(90deg, #2A2418 0%, #1F1B12 100%);
}
.book-direct-strip h2 { color: var(--brand-blue-dark); }
[data-theme="dark"] .book-direct-strip h2 { color: var(--brand-gold-light); }
.book-direct-strip p { color: var(--brand-blue-dark); max-width: 56ch; margin: 0 auto; }
[data-theme="dark"] .book-direct-strip p { color: rgba(239,225,206,.85); }

/* ---------- Image hero alt style (lower page hero) ---------- */
.page-hero--image h1 { font-size: var(--text-display); max-width: 22ch; }

/* ---------- Prose (for Terms, Privacy pages) ---------- */
.prose {
  max-width: 760px;
  margin: 0 auto;
}
.prose h2 { font-size: 1.5rem; margin-top: var(--space-5); }
.prose h3 { font-size: 1.2rem; margin-top: var(--space-4); }
.prose p { line-height: 1.7; color: var(--text); }
.prose ul { padding-left: 1.4rem; line-height: 1.7; color: var(--text); }
.prose li { margin-bottom: .5rem; }

/* ---------- Welcome guide (standalone guest view) ---------- */
.welcome-guide {
  max-width: 820px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-3);
}
.welcome-guide h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  text-align: center;
  margin-bottom: .5rem;
}
.welcome-guide .lead { text-align: center; margin-bottom: var(--space-5); }
.welcome-actions { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin-bottom: var(--space-5); }
.wg-accordion { display: grid; gap: .75rem; }
.wg-accordion details {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}
.wg-accordion summary {
  cursor: pointer;
  font-weight: 500;
  font-size: 1.05rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
}
.wg-accordion summary::-webkit-details-marker { display: none; }
.wg-accordion details[open] summary { margin-bottom: .75rem; color: var(--accent-strong); }

@media print {
  .sticky-bottom-banner, .wa-float, .site-nav, .site-footer,
  .mobile-drawer, .search-overlay, .welcome-actions { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .wg-accordion details { border: 1px solid #ccc !important; break-inside: avoid; }
  .wg-accordion details[open] { page-break-inside: avoid; }
}
