/* =====================================================
   VISIT FAGECA — Component Styles
   Design System: "The Organic Editorial" (Google Stitch)
   Tokens imported from design-tokens.css

   KEY RULES FROM DESIGN.MD:
   1. NO 1px borders — boundaries via background color shifts
   2. Glassmorphism on floating elements (nav, panels)
   3. Ambient shadows only (48px blur, primary-tinted)
   4. Image containers: rounded-xl (3rem/48px)
   5. Gradient CTAs: primary → primary-container
   6. Ghost borders ONLY when accessibility requires them
   7. Max content width: 1440px, generous padding (px-12 = 3rem)
   8. Fixed nav with glassmorphism + rounded-full dock
   9. Asymmetric editorial grids (12-column system)
   ===================================================== */

@import url('design-tokens.css');

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: var(--text-base);
  color: var(--on-background);
  background-color: var(--background);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--primary-fixed);
  color: var(--on-primary-fixed);
}

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

/* ── 2. TYPOGRAPHY ───────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--primary);
}

h1 { font-size: clamp(2.5rem, 5vw, 3.75rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: var(--text-xl); }

p {
  color: var(--on-surface-variant);
  line-height: 1.65;
}

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

/* ── 3. LAYOUT SHELL ────────────────────────────────── */
.shell {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: 3rem;
}

.section {
  padding-block: 5rem;
}

/* ── 4. EYEBROW LABEL ───────────────────────────────── */
.eyebrow {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 1rem;
}

/* ── 5. NAVIGATION — Fixed Glassmorphic Dock ─────────── */
.site-header {
  position: relative;
  height: 80vh;
  min-height: 520px;
  max-height: 800px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.20);
  z-index: 1;
}

.site-header > * {
  position: relative;
  z-index: 2;
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 3rem;
  max-width: 1440px;
  margin-inline: auto;
  background: rgba(250, 250, 245, 0.80);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 48px 100px 0 rgba(0, 0, 0, 0.04);
}

.logo {
  font-family: 'Quicksand', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--primary);
  text-decoration: none;
}

.logo span {
  color: var(--secondary);
}

.menu-toggle {
  display: none;
  background: transparent;
  color: var(--primary);
  border-radius: var(--radius-full);
  padding: 0.4rem 1rem;
  font-weight: 700;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: background 0.2s;
  border: 1.5px solid var(--ghost-border);
}

.menu-toggle:hover {
  background: var(--surface-container-high);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-links a {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--on-surface-variant);
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: 0.02em;
}

.nav-links a:hover {
  color: var(--primary);
}

/* ── 6. HERO — 80vh Centered (Stitch) ────────────────── */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem 2rem;
  gap: 1.25rem;
}

.hero-center {
  max-width: 820px;
  animation: fadeUp 0.7s ease both;
}

.hero-center .eyebrow {
  color: rgba(255, 255, 255, 0.9);
}

.hero-center h1 {
  font-family: 'Quicksand', sans-serif;
  color: #FFFFFF;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.25);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.hero-sub {
  color: rgba(255,255,255,0.85);
  max-width: 56ch;
  margin-inline: auto;
  font-size: var(--text-lg);
  font-weight: 400;
  line-height: 1.6;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.hero-badges span {
  border-radius: var(--radius-full);
  padding: 0.4rem 0.9rem;
  font-size: var(--text-sm);
  font-weight: 600;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255,255,255,0.92);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  transition: background 0.2s;
}

.hero-badges span:hover {
  background: rgba(255,255,255,0.18);
}

/* ── 7. SEARCH BAR — Glassmorphic Pill (Stitch) ────── */
.search-bar {
  background: rgba(251, 249, 245, 0.92);
  color: var(--on-surface);
  border-radius: var(--radius-full);
  padding: 0.5rem;
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-width: 900px;
  animation: fadeUp 0.7s 0.15s ease both;
}

.search-bar-fields {
  display: flex;
  align-items: center;
  gap: 0;
}

.search-field {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
  padding: 0.75rem 1rem;
  text-transform: none;
  font-weight: 500;
  border-right: 1px solid rgba(195, 200, 193, 0.25);
}

.search-field:last-of-type {
  border-right: none;
}

.search-label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary);
}

.search-field select,
.search-field input[type="date"] {
  font-size: var(--text-sm);
  padding: 0.25rem 0;
  background: transparent;
  border: none;
  color: var(--on-surface);
  font-weight: 500;
  outline: none;
}

.search-field select:focus,
.search-field input[type="date"]:focus {
  background: transparent;
  box-shadow: none;
}

.search-cta {
  flex-shrink: 0;
  padding: 0 1.75rem;
  border: none;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-container) 100%);
  color: var(--on-primary);
  font-family: 'Quicksand', sans-serif;
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 120px;
  justify-content: center;
}

.search-cta:hover { opacity: 0.9; }
.search-cta:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── 7b. SEARCH RESULTS SECTION ──────────────────────── */
.search-results-section {
  padding-block: 3rem;
  background: var(--surface);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.result-card {
  background: var(--surface-container-lowest);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s;
}

.result-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.result-card.result-unavailable { opacity: 0.55; }

.result-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.result-no-img {
  height: 200px;
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.result-body {
  padding: 1.25rem;
}

.result-body h3 {
  font-family: 'Quicksand', sans-serif;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.15rem;
}

.result-address {
  font-size: var(--text-sm);
  color: var(--on-surface-variant);
  margin-bottom: 0.75rem;
}

.result-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
}

.result-badge.available {
  background: var(--primary-fixed);
  color: var(--on-primary-fixed);
}

.result-badge.unavailable {
  background: var(--surface-container-high);
  color: var(--outline);
}

.result-price {
  font-family: 'Quicksand', sans-serif;
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.result-price.muted {
  color: var(--on-surface-variant);
  font-size: var(--text-sm);
  font-weight: 500;
}

.result-nights {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--on-surface-variant);
}

.result-btn {
  width: 100%;
  text-align: center;
}

.results-loading, .results-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2.5rem;
  color: var(--on-surface-variant);
  font-size: var(--text-lg);
}

/* ── 8. FORM ELEMENTS ────────────────────────────────── */

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

.field-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}

/* Soft-filled inputs per DESIGN.MD */
input,
select {
  border: none;
  border-radius: var(--radius-md);
  background: var(--surface-container-high);
  padding: 0.7rem 1rem;
  font: inherit;
  font-size: var(--text-sm);
  color: var(--on-surface);
  transition: background 0.2s, box-shadow 0.2s;
  outline: none;
}

input:focus,
select:focus {
  background: var(--surface-container-lowest);
  box-shadow: 0 0 0 2px var(--secondary-fixed-dim);
}

/* Override for search bar inputs */
.search-field select,
.search-field input {
  border-radius: 0;
  background: transparent;
  padding: 0.25rem 0;
}

.search-field select:focus,
.search-field input:focus {
  background: transparent;
  box-shadow: none;
}

/* ── 9. BUTTONS ──────────────────────────────────────── */
.actions {
  margin-top: var(--space-md);
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn {
  border: none;
  border-radius: var(--radius-full);
  background: var(--surface-container-lowest);
  color: var(--primary);
  padding: 0.75rem 2rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  box-shadow: inset 0 0 0 1px var(--ghost-border);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-float), inset 0 0 0 1px var(--ghost-border);
}

/* Primary CTA: Gradient per DESIGN.MD */
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-container) 100%);
  color: var(--on-primary);
  box-shadow: 0 8px 24px rgba(51, 69, 55, 0.24);
  padding: 0.85rem 2rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(51, 69, 55, 0.30);
}

/* ── 10. ALERTS ──────────────────────────────────────── */
.alert {
  margin-top: var(--space-sm);
  border-radius: var(--radius-md);
  padding: 0.7rem 1rem;
  font-size: var(--text-sm);
}

.alert.error {
  background: var(--error-container);
  color: var(--on-error-container);
}

/* ── 11. PRICE BOX ───────────────────────────────────── */
.price-box {
  margin-top: var(--space-md);
  background: var(--primary-fixed);
  border-radius: var(--radius-md);
  padding: 0.8rem 1rem;
}

.total {
  margin-top: 0.3rem;
  font-weight: 800;
  font-family: 'Quicksand', sans-serif;
  color: var(--primary);
  font-size: var(--text-lg);
}

.selected, .legal {
  color: var(--on-surface-variant);
  margin-bottom: var(--space-sm);
  font-size: var(--text-sm);
}

/* ── 12. SECTION HEADER ──────────────────────────────── */
.section-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-md);
  margin-bottom: 3rem;
}

.section-head {
  max-width: 640px;
}

.section-head-row .section-head {
  margin-bottom: 0;
}

.section-head h2 {
  margin-bottom: 0.6rem;
}

.section-head p {
  font-size: var(--text-lg);
  color: var(--on-surface-variant);
  line-height: 1.6;
}

.section-head.light h2,
.section-head.light p {
  color: rgba(255, 255, 255, 0.92);
}

.section-head.light .eyebrow {
  color: var(--secondary-fixed-dim);
}

/* ── 13. APARTMENT CARDS — Bento Grid ────────────────── */
.homes-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
  min-height: 500px;
}

/* First card: large hero (spans 8 cols) */
.homes-grid .card:first-child {
  grid-column: span 8;
  grid-row: span 2;
}

/* Second and third cards: stacked on right (4 cols each) */
.homes-grid .card:nth-child(2),
.homes-grid .card:nth-child(3) {
  grid-column: span 4;
}

/* Fallback for 4+ cards */
.homes-grid .card:nth-child(n+4) {
  grid-column: span 4;
}

.card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-container-high);
  box-shadow: var(--shadow-card);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  position: relative;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.homes-grid .card:first-child img {
  height: 100%;
  min-height: 380px;
}

.card:hover img {
  transform: scale(1.05);
}

.card-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

/* First card: overlay text style (like Stitch bento hero) */
.homes-grid .card:first-child {
  display: flex;
  flex-direction: column;
}

.homes-grid .card:first-child .card-body {
  background: rgba(251, 249, 245, 0.92);
  backdrop-filter: blur(12px);
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  max-width: 380px;
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

/* Smaller cards: gradient overlay */
.homes-grid .card:not(:first-child) {
  position: relative;
}

.homes-grid .card:not(:first-child) .card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
}

.homes-grid .card:not(:first-child) .card-body h3,
.homes-grid .card:not(:first-child) .card-body p {
  color: #fff;
}

.homes-grid .card:not(:first-child) .card-body .price {
  color: rgba(255,255,255,0.9);
}

.homes-grid .card:not(:first-child) .card-body .card-link {
  color: rgba(255,255,255,0.9);
}

.homes-grid .card:not(:first-child) img {
  height: 100%;
  min-height: 260px;
}

.card h3 {
  font-size: var(--text-xl);
  margin-bottom: 0.3rem;
}

.card p {
  color: var(--on-surface-variant);
  font-size: var(--text-sm);
}

.card .price {
  color: var(--secondary);
  font-weight: 800;
  font-family: 'Quicksand', sans-serif;
  font-size: var(--text-lg);
  margin-top: 0.5rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.7rem;
  color: var(--secondary);
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  font-size: var(--text-sm);
  text-decoration: none;
  transition: gap 0.2s;
}

.card-link:hover { gap: 0.5rem; }
.card-link::after { content: '→'; }

.placeholder {
  grid-column: 1 / -1;
  min-height: 140px;
  display: grid;
  place-items: center;
  color: var(--on-surface-variant);
}

/* ── 14. RESULTS LIST ────────────────────────────────── */
.results-grid {
  margin-top: var(--space-md);
  display: grid;
  gap: 0.75rem;
  padding: 0 1rem;
}

.result-card {
  background: var(--surface-container-lowest);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 160px 1fr;
  overflow: hidden;
  transition: box-shadow 0.2s;
  box-shadow: var(--shadow-card);
}

.result-card.active {
  box-shadow: 0 0 0 2px var(--primary-fixed-dim), var(--shadow-card);
}

.result-card img {
  width: 100%;
  height: 100%;
  min-height: 120px;
  object-fit: cover;
}

.result-body { padding: var(--space-sm) var(--space-md); }
.result-body h3 { font-size: var(--text-lg); }

.result-meta {
  color: var(--on-surface-variant);
  font-size: var(--text-sm);
  margin-top: 0.2rem;
}

.result-price {
  margin: 0.5rem 0;
  font-weight: 800;
  font-family: 'Quicksand', sans-serif;
  color: var(--secondary);
  font-size: var(--text-xl);
}

.result-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ── 15. ACTIVITIES — Asymmetric Editorial Layout ───── */
.activities {
  background: var(--surface-container-low);
  padding-block: 5rem;
  position: relative;
  overflow: hidden;
}

.activity-layout {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 3rem;
  align-items: center;
}

.activity-text {
  grid-column: span 5;
}

.activity-text .eyebrow {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(140, 78, 55, 0.10);
  color: var(--secondary);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  margin-bottom: 1.5rem;
}

.activity-text h2 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.activity-text > p {
  font-size: var(--text-lg);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.activity-cards {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.activity-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s, box-shadow 0.22s;
}

.activity-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-float);
}

.activity-card .activity-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.3rem;
  background: var(--primary-fixed);
}

.activity-card h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.3rem;
}

.activity-card p {
  font-size: var(--text-sm);
  color: var(--on-surface-variant);
}

.activity-images {
  grid-column: span 7;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.activity-images img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lift);
}

.activity-images img:first-child {
  margin-top: 4rem;
  transform: rotate(-2deg);
}

.activity-images img:nth-child(2) {
  transform: rotate(3deg);
}

/* Fallback: old 4-column activity grid (if HTML not updated) */
.activity-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

.activity-grid article {
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition: background 0.22s, transform 0.22s;
}

.activity-grid article:first-child {
  grid-column: span 8;
  position: relative;
  overflow: hidden;
  padding: 0;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--surface-container-high);
}

.activity-grid article:nth-child(2) {
  grid-column: span 4;
  background: var(--surface-container-highest);
}

.activity-grid article:nth-child(3) {
  grid-column: span 5;
}

.activity-grid article:nth-child(4) {
  grid-column: span 7;
}

.activity-grid article:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-float);
}

.activity-grid article h3 {
  font-size: var(--text-lg);
  margin-bottom: 0.5rem;
}

.activity-grid article p {
  font-size: var(--text-sm);
}

.activity-icon {
  font-size: 1.8rem;
  margin-bottom: 0.7rem;
  display: block;
}

/* ── 16. REVIEWS ─────────────────────────────────────── */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
}

.review-card {
  background: var(--surface-container-lowest);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s, transform 0.2s;
}

.review-card:hover {
  box-shadow: var(--shadow-float);
  transform: translateY(-2px);
}

.stars {
  color: var(--secondary);
  font-size: 1.1rem;
  margin-bottom: var(--space-sm);
  letter-spacing: 0.05em;
}

.review-card p {
  color: var(--on-surface-variant);
  font-size: var(--text-base);
  line-height: 1.7;
  margin-bottom: var(--space-md);
  font-style: italic;
}

.review-card strong {
  color: var(--on-surface);
  font-family: 'Quicksand', sans-serif;
  font-size: var(--text-sm);
}

/* ── 17. BLOG PREVIEW ────────────────────────────────── */
.blog-preview {
  background: var(--surface-container-low);
}

.blog-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-md);
  margin-bottom: 2rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
}

.blog-card {
  background: var(--surface-container-lowest);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  box-shadow: var(--shadow-card);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-full);
  padding: 0.25rem 0.65rem;
  background: var(--secondary-fixed);
  color: var(--on-secondary-fixed-variant);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.blog-card h3 {
  margin-top: 0.7rem;
  margin-bottom: 0.4rem;
  font-size: var(--text-lg);
  line-height: 1.3;
}

.blog-card p {
  color: var(--on-surface-variant);
  font-size: var(--text-sm);
}

.blog-card a {
  margin-top: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  color: var(--secondary);
  font-size: var(--text-sm);
  transition: gap 0.2s;
}

.blog-card a:hover { gap: 0.5rem; }
.blog-card a::after { content: '→'; }

/* ── 18. NEWSLETTER SECTION ──────────────────────────── */
.newsletter-section {
  padding-block: 5rem;
}

.newsletter-card {
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--radius-xl);
  padding: 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.newsletter-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 24rem;
  height: 24rem;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  filter: blur(100px);
}

.newsletter-card::after {
  content: '';
  position: absolute;
  bottom: -50%;
  left: -20%;
  width: 24rem;
  height: 24rem;
  background: rgba(140, 78, 55, 0.10);
  border-radius: 50%;
  filter: blur(100px);
}

.newsletter-card > * {
  position: relative;
  z-index: 1;
}

.newsletter-card .eyebrow {
  color: var(--secondary-fixed-dim);
  letter-spacing: 0.3em;
  margin-bottom: 1.5rem;
}

.newsletter-card h2 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3rem);
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: 1.5rem;
}

.newsletter-card p {
  color: var(--on-primary-container);
  font-size: var(--text-lg);
  max-width: 520px;
  margin-inline: auto;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* ── 19. FOOTER — 4-Column Grid (Stitch) ────────────── */
.site-footer {
  background: var(--surface-container-low);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  margin-top: 3rem;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  padding: 5rem 3rem 3rem;
  max-width: 1440px;
  margin-inline: auto;
}

.footer-brand {
  font-family: 'Quicksand', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
}

.footer-brand span { color: var(--secondary); }

.footer-copy {
  font-size: var(--text-sm);
  color: var(--on-surface-variant);
  line-height: 1.6;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links-title {
  font-family: 'Quicksand', sans-serif;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.footer-links a {
  text-decoration: none;
  font-weight: 500;
  color: var(--on-surface-variant);
  font-size: var(--text-sm);
  transition: color 0.2s;
}

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

/* ── 20. BLOG / POST PAGES ───────────────────────────── */
.mini-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 1.25rem;
}

.blog-toolbar {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 0.75rem;
  margin: var(--space-md) 0 var(--space-lg);
}

.post { max-width: 820px; margin: 0 auto; }
.post h1 { font-size: clamp(var(--text-2xl), 3.6vw, var(--text-4xl)); margin-bottom: var(--space-md); }
.post p { margin-block: var(--space-sm); color: var(--on-surface-variant); font-size: var(--text-lg); }

.post-cover {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: var(--radius-xl);
  margin-block: var(--space-md) var(--space-sm);
}

.post-meta {
  margin-top: 0.5rem;
  font-size: var(--text-sm);
  color: var(--on-surface-variant);
}

.post-cta { margin-top: var(--space-lg); }

/* ── 21. PROPERTY PAGE ───────────────────────────────── */
.property-head p { color: var(--on-surface-variant); }

.property-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.property-detail {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.property-gallery {
  background: var(--surface-container-lowest);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.property-hero-image {
  width: 100%;
  height: 450px;
  object-fit: cover;
}

.property-thumbs {
  padding: 0.75rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.prop-thumb-btn {
  padding: 0;
  border: 2px solid transparent;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s;
}

.prop-thumb-btn.is-active {
  box-shadow: 0 0 0 2px var(--primary-fixed-dim);
}

.property-thumbs img {
  display: block;
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

/* Amenities grid */
.amenities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-block: 1.5rem;
}

.amenity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem;
  background: var(--surface-container-low);
  border-radius: var(--radius-md);
  text-align: center;
  flex-direction: column;
}

.amenity span { font-size: 1.5rem; }

.amenity p {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.property-booking {
  background: var(--surface-container-lowest);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: grid;
  gap: 0.7rem;
  align-content: start;
  box-shadow: var(--shadow-float);
  position: sticky;
  top: 6rem;
}

/* ── 22. CALENDAR ────────────────────────────────────── */
.calendar-shell {
  background: var(--surface-container-lowest);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--shadow-card);
}

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

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.4rem;
}

.cal-cell {
  border-radius: var(--radius-sm);
  min-height: 72px;
  padding: 0.4rem;
  display: grid;
  align-content: space-between;
  background: var(--surface-container-low);
}

.cal-weekday {
  min-height: auto;
  text-align: center;
  font-weight: 700;
  font-size: var(--text-xs);
  color: var(--on-surface-variant);
  background: var(--surface-container-high);
}

.cal-cell.empty { background: transparent; }
.cal-cell.free { background: var(--primary-fixed); color: var(--on-primary-fixed); }
.cal-cell.blocked { background: var(--error-container); color: var(--on-error-container); }

.cal-day { font-weight: 700; font-size: var(--text-sm); }
.cal-price { font-size: var(--text-xs); color: var(--on-surface-variant); }

.calendar-legend {
  margin-top: var(--space-sm);
  color: var(--on-surface-variant);
  font-size: var(--text-sm);
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.legend {
  width: 12px; height: 12px;
  border-radius: 4px;
  display: inline-block;
  margin-right: 0.3rem;
}

.legend.free { background: var(--primary-fixed-dim); }
.legend.blocked { background: var(--secondary-fixed-dim); }

/* ── 23. ANIMATIONS ──────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── 24. RESPONSIVE ──────────────────────────────────── */
@media (max-width: 1080px) {
  .shell { padding-inline: 1.5rem; }

  .nav { padding-inline: 1.5rem; }

  .hero-center h1 {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
  }

  .homes-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .homes-grid .card:first-child {
    grid-column: span 2;
    grid-row: span 1;
  }

  .homes-grid .card:nth-child(2),
  .homes-grid .card:nth-child(3),
  .homes-grid .card:nth-child(n+4) {
    grid-column: span 1;
  }

  .homes-grid .card:first-child .card-body {
    position: relative;
    bottom: auto;
    left: auto;
    max-width: none;
    border-radius: 0;
  }

  .homes-grid .card:first-child img {
    height: 280px;
    min-height: auto;
  }

  .homes-grid .card:not(:first-child) img {
    height: 200px;
    min-height: auto;
  }

  .homes-grid .card:not(:first-child) .card-body {
    position: relative;
    background: none;
  }

  .homes-grid .card:not(:first-child) .card-body h3,
  .homes-grid .card:not(:first-child) .card-body p,
  .homes-grid .card:not(:first-child) .card-body .price,
  .homes-grid .card:not(:first-child) .card-body .card-link {
    color: inherit;
  }

  .reviews-grid,
  .blog-grid { grid-template-columns: 1fr 1fr; }

  .activity-layout {
    grid-template-columns: 1fr;
  }

  .activity-text,
  .activity-images { grid-column: span 1; }

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

  .activity-grid article:first-child,
  .activity-grid article:nth-child(2),
  .activity-grid article:nth-child(3),
  .activity-grid article:nth-child(4) {
    grid-column: span 1;
  }

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

  .property-grid,
  .property-detail { grid-template-columns: 1fr; }

  .section-head-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-main {
    grid-template-columns: 1fr 1fr;
    padding-inline: 1.5rem;
  }
}

@media (max-width: 760px) {
  .shell { padding-inline: 1rem; }

  .menu-toggle { display: inline-flex; }

  .nav {
    padding: 1rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    min-width: 200px;
    flex-direction: column;
    align-items: flex-start;
    z-index: 100;
    box-shadow: var(--shadow-lift);
    gap: 0.75rem;
  }

  .nav-links.open { display: flex; }

  .nav-links a { color: var(--on-surface); }

  .hero { padding: 1.5rem; }

  .search-bar {
    border-radius: var(--radius-lg);
    padding: 0.5rem;
  }

  .search-bar-fields {
    flex-direction: column;
    align-items: stretch;
  }

  .search-field {
    border-right: none;
    border-bottom: 1px solid rgba(195, 200, 193, 0.15);
    padding: 0.6rem 0.75rem;
  }

  .search-field:last-of-type { border-bottom: none; }

  .search-cta {
    width: 100%;
    border-radius: var(--radius-full) !important;
    height: auto;
    padding: 0.75rem;
    margin: 0.5rem 0 0;
  }

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

  .homes-grid .card:first-child,
  .homes-grid .card:nth-child(2),
  .homes-grid .card:nth-child(3),
  .homes-grid .card:nth-child(n+4) {
    grid-column: span 1;
    grid-row: span 1;
  }

  .reviews-grid,
  .blog-grid,
  .activity-grid,
  .field-grid,
  .field-grid.two,
  .blog-toolbar { grid-template-columns: 1fr; }

  .activity-grid article:first-child,
  .activity-grid article:nth-child(2),
  .activity-grid article:nth-child(3),
  .activity-grid article:nth-child(4) {
    grid-column: span 1;
  }

  .result-card { grid-template-columns: 1fr; }
  .result-card img { height: 180px; }

  .blog-preview-head,
  .mini-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .footer-main {
    grid-template-columns: 1fr;
    padding: 3rem 1rem 2rem;
    gap: 2rem;
  }

  .calendar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .property-thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .amenities-grid { grid-template-columns: repeat(2, 1fr); }

  .newsletter-card {
    padding: 3rem 1.5rem;
  }

  .activity-images { display: none; }

  .section { padding-block: 3rem; }
}
