/*
 * rei.css — Real Estate Israel custom styles
 *
 * Complements Tailwind utilities with component classes for consistent look
 * and feel across pages. The prefix `rei-` keeps the HTML signature distinct
 * from Bootstrap or any CSS used by sister sites.
 */

:root {
  --rei-bg:        #FAFAF7;
  --rei-surface:   #FFFFFF;
  --rei-ink:       #1A1A1A;
  --rei-muted:     #5A5A5A;
  --rei-subtle:    #A8A8A8;
  --rei-border:    #E8E4DC;
  --rei-gold:      #C5A661;
  --rei-gold-hi:   #D4B876;
  --rei-navy:      #2D4A5C;
  --rei-navy-hi:   #3A5E74;
  --rei-success:   #2E7D5C;
  --rei-accent:    #B85C3E;
  --rei-serif:     'Playfair Display', Georgia, serif;
  --rei-sans:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --rei-shadow-sm: 0 1px 2px rgba(26,26,26,0.04), 0 1px 3px rgba(26,26,26,0.06);
  --rei-shadow-md: 0 4px 12px rgba(26,26,26,0.06), 0 1px 3px rgba(26,26,26,0.04);
}

html { scroll-behavior: smooth; }

body {
  background: var(--rei-bg);
  color: var(--rei-ink);
  font-family: var(--rei-sans);
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

.rei-serif { font-family: var(--rei-serif); font-weight: 500; letter-spacing: -0.01em; }
.rei-sans  { font-family: var(--rei-sans); }

/* ---------- Buttons ---------- */
.rei-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--rei-sans); font-weight: 500; font-size: 0.9375rem;
  padding: 0.75rem 1.5rem; border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  line-height: 1.25;
}
.rei-btn-primary   { background: var(--rei-navy); color: #fff; }
.rei-btn-primary:hover { background: var(--rei-navy-hi); color: #fff; }
.rei-btn-gold      { background: var(--rei-gold); color: #fff; }
.rei-btn-gold:hover{ background: var(--rei-gold-hi); color: #fff; }
.rei-btn-outline   { background: transparent; border-color: var(--rei-ink); color: var(--rei-ink); }
.rei-btn-outline:hover { background: var(--rei-ink); color: #fff; }
.rei-btn-ghost     { background: transparent; color: var(--rei-ink); }
.rei-btn-ghost:hover { background: rgba(26,26,26,0.05); }

/* ---------- Top nav ---------- */
.rei-nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250,250,247,0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rei-border);
}
.rei-nav-inner { max-width: 1280px; margin: 0 auto; padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.rei-logo { font-family: var(--rei-serif); font-size: 1.375rem; color: var(--rei-ink); text-decoration: none; letter-spacing: -0.02em; font-weight: 600; }
.rei-logo .mark { color: var(--rei-gold); }
.rei-nav-links { display: flex; gap: 1.75rem; font-size: 0.9375rem; }
.rei-nav-links a { color: var(--rei-ink); text-decoration: none; position: relative; padding: 0.25rem 0; }
.rei-nav-links a::after { content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 1px; background: var(--rei-gold); transition: width 0.25s; }
.rei-nav-links a:hover::after { width: 100%; }

/* ---------- Hero / gallery ---------- */
.rei-hero {
  position: relative; width: 100%;
  background: linear-gradient(180deg, #f4f0e8 0%, #e8e3d7 100%);
}
.rei-hero-photo {
  width: 100%; height: min(70vh, 720px); object-fit: cover; display: block;
}
.rei-hero-scrim {
  position: absolute; inset: auto 0 0 0; height: 40%;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.35) 100%);
  pointer-events: none;
}
.rei-hero-caption {
  position: absolute; left: 0; right: 0; bottom: 2rem;
  max-width: 1280px; margin: 0 auto; padding: 0 1.5rem;
  color: #fff;
}
.rei-hero-badge {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.35rem 0.75rem; border-radius: 2px;
  background: rgba(255,255,255,0.15); backdrop-filter: blur(8px);
  font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: #fff; margin-bottom: 0.75rem;
}

/* ---------- Thumbnail strip ---------- */
.rei-thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.5rem; margin-top: 0.75rem; }
.rei-thumb  { position: relative; aspect-ratio: 4/3; overflow: hidden; border-radius: 2px; cursor: pointer; background: #eee; }
.rei-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.rei-thumb:hover img { transform: scale(1.05); }
.rei-thumb-more {
  position: absolute; inset: 0; background: rgba(26,26,26,0.55);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: var(--rei-serif); font-size: 1.125rem;
}

/* ---------- Fact grid ---------- */
.rei-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0; border: 1px solid var(--rei-border); border-radius: 2px;
  background: var(--rei-surface);
}
.rei-fact {
  padding: 1.25rem 1rem; border-right: 1px solid var(--rei-border);
  border-bottom: 1px solid var(--rei-border);
}
.rei-fact:last-child { border-right: none; }
.rei-fact-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--rei-muted); margin-bottom: 0.25rem; }
.rei-fact-value { font-family: var(--rei-serif); font-size: 1.375rem; color: var(--rei-ink); font-weight: 500; }

/* ---------- Section headings ---------- */
.rei-h1 { font-family: var(--rei-serif); font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.1; letter-spacing: -0.02em; font-weight: 500; }
.rei-h2 { font-family: var(--rei-serif); font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.15; letter-spacing: -0.015em; font-weight: 500; }
.rei-eyebrow { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--rei-gold); margin-bottom: 0.75rem; font-weight: 500; }

/* ---------- Prose (long description) ---------- */
.rei-prose { font-size: 1.0625rem; line-height: 1.75; color: #2A2A2A; max-width: 68ch; }
.rei-prose p { margin-bottom: 1.25rem; }
.rei-prose p:last-child { margin-bottom: 0; }

/* ---------- Features chips ---------- */
.rei-features { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.rei-chip {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.4rem 0.85rem; border: 1px solid var(--rei-border);
  border-radius: 999px; background: var(--rei-surface);
  font-size: 0.875rem; color: var(--rei-ink);
}

/* ---------- Agent card ---------- */
.rei-agent {
  background: var(--rei-surface); border: 1px solid var(--rei-border);
  padding: 1.75rem; border-radius: 2px;
}
.rei-agent-photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: #eee; }
.rei-agent-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--rei-muted); }
.rei-agent-name  { font-family: var(--rei-serif); font-size: 1.25rem; font-weight: 500; color: var(--rei-ink); }
.rei-agent-subtle { color: var(--rei-muted); font-size: 0.9375rem; }

/* ---------- Price tag ---------- */
.rei-price { font-family: var(--rei-serif); font-size: clamp(1.75rem, 4vw, 2.5rem); color: var(--rei-ink); letter-spacing: -0.02em; font-weight: 500; }
.rei-price-currency { color: var(--rei-gold); margin-right: 0.25rem; }

/* ---------- Footer ---------- */
.rei-foot { background: #1A1A1A; color: #D4D4D0; padding: 4rem 1.5rem 2rem; margin-top: 6rem; }
.rei-foot-inner { max-width: 1280px; margin: 0 auto; }
.rei-foot a { color: #D4D4D0; text-decoration: none; }
.rei-foot a:hover { color: var(--rei-gold-hi); }

/* ---------- Similar listings card ---------- */
.rei-card { background: var(--rei-surface); border: 1px solid var(--rei-border); overflow: hidden; transition: transform 0.25s, box-shadow 0.25s; }
.rei-card:hover { transform: translateY(-2px); box-shadow: var(--rei-shadow-md); }
.rei-card-img { aspect-ratio: 4/3; width: 100%; object-fit: cover; background: #eee; }
.rei-card-body { padding: 1.25rem; }
.rei-card-title { font-family: var(--rei-serif); font-size: 1.125rem; color: var(--rei-ink); margin-bottom: 0.35rem; line-height: 1.3; }
.rei-card-price { font-family: var(--rei-serif); color: var(--rei-ink); font-size: 1.25rem; font-weight: 500; }
.rei-card-meta { color: var(--rei-muted); font-size: 0.875rem; }

/* ---------- Breadcrumb ---------- */
.rei-crumb { font-size: 0.8125rem; color: var(--rei-muted); display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.rei-crumb a { color: var(--rei-muted); text-decoration: none; }
.rei-crumb a:hover { color: var(--rei-ink); }
.rei-crumb-sep { color: var(--rei-subtle); }

/* ---------- Utilities ---------- */
.rei-container { max-width: 1280px; margin: 0 auto; padding-left: 1.5rem; padding-right: 1.5rem; }
.rei-divider { height: 1px; background: var(--rei-border); margin: 3rem 0; border: 0; }

/* ---------- Mobile tweaks ---------- */
@media (max-width: 768px) {
  .rei-thumbs { grid-template-columns: repeat(4, 1fr); }
  .rei-nav-links { display: none; }
  .rei-hero-photo { height: 50vh; }
}
