:root {
  --ink: #0b2f22;
  --bg: #ffffff;
  --muted: #4e6a5b;
  --accent: #27ae60;
  --accent-light: #e8f6ed;
  --fire: #d35400;
  --forest: #15803d; /* Lighter Forest Green */
  --shadow: 0 10px 30px -5px rgba(0,0,0,0.1);
  --border: 1px solid rgba(11, 47, 34, 0.1);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; padding: 0;
  font-family: 'Manrope', 'Inter', sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.8;
}

/* --- i18n Strict Separation --- */
[data-lang] { display: none !important; }
.lang-active-en [data-lang='en'] { display: block !important; }
.lang-active-fr [data-lang='fr'] { display: block !important; }

/* Inline overrides for spans/anchors */
span[data-lang], a[data-lang], strong[data-lang] {
  display: inline !important;
}
th[data-lang], td[data-lang] {
  display: table-cell !important;
}
.lang-active-en span[data-lang='fr'], .lang-active-en a[data-lang='fr'], .lang-active-en strong[data-lang='fr'], .lang-active-en th[data-lang='fr'], .lang-active-en td[data-lang='fr'],
.lang-active-fr span[data-lang='en'], .lang-active-fr a[data-lang='en'], .lang-active-fr strong[data-lang='en'], .lang-active-fr th[data-lang='en'], .lang-active-fr td[data-lang='en'] {
  display: none !important;
}

h1, h2, h3 { line-height: 1.05; font-weight: 800; letter-spacing: -0.04em; margin-bottom: 24px; }
p { max-width: 70ch; }
a { color: inherit; text-decoration: none; transition: 0.3s; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 40px; }

/* Navigation */
.nav {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(20px);
  border-bottom: var(--border); padding: 18px 0;
}
.nav-inner { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 12px; font-weight: 900; font-size: 24px; }
.logo svg { width: 44px; height: 44px; }
.nav-links { display: flex; gap: 40px; font-size: 15px; font-weight: 700; align-items: center; }

/* Dropdown Alignment: Strictly Left-Aligned with Trigger */
.dropdown { position: relative; display: block; width: fit-content; cursor: pointer; }
.dropdown-content {
  display: none; 
  position: absolute; 
  top: 100%; 
  left: 0; 
  right: auto;
  background: white; 
  border: var(--border); 
  border-radius: 16px;
  box-shadow: var(--shadow); 
  min-width: 220px; 
  padding: 12px 0;
  z-index: 1000;
  margin-top: 10px;
}
.dropdown::after {
  content: ""; position: absolute; top: 100%; left: 0; width: 100%; height: 20px;
}
.dropdown:hover .dropdown-content { display: block; }
.dropdown-content a { display: block; padding: 10px 24px; font-size: 14px; }
.dropdown-content a:hover { background: var(--accent-light); color: var(--accent); }

/* Flag Toggle */
.lang-toggle { cursor: pointer; display: flex; align-items: center; gap: 8px; border: var(--border); padding: 4px 12px; border-radius: 50px; background: white; font-size: 13px; }
.lang-toggle:hover { border-color: var(--accent); }
.flag-icon { width: 20px; height: 14px; border-radius: 2px; }

/* Alternating Section Pattern */
.section { padding: 80px 0; position: relative; }
.section-hero { 
  padding: 100px 0 140px;
  background-image: linear-gradient(rgba(255,255,255,0.7), rgba(255,255,255,0.7)), url('images/samaritain/drone2-far.jpg');
  background-size: cover; background-position: center;
}
.section-model { 
  padding: 60px 0;
  background-image: linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.85)), url('images/samaritain/housefront-east-nice.jpg'); background-size: cover; background-position: center; background-attachment: fixed; }
.section-samaritain { 
  background-image: linear-gradient(rgba(255,255,255,0.75), rgba(255,255,255,0.75)), url('images/samaritain/housefront-east-nice.jpg');
  background-attachment: fixed; background-size: cover;
}
.section-spaces { 
  background-image: linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.85)), url('images/samaritain/kitchen001-002.jpg');
  background-attachment: fixed; background-size: cover;
}
.section-scale { 
  background-image: linear-gradient(rgba(11, 47, 34, 0.75), rgba(11, 47, 34, 0.75)), url('images/samaritain/drone1.jpg');
  background-size: cover; background-position: center;
  color: #fff;
}

.kicker { color: var(--accent); font-weight: 800; text-transform: uppercase; font-size: 12px; letter-spacing: 0.2em; margin-bottom: 16px; display: block; }

/* Balanced Story Blocks */
.story-block { display: flex; align-items: center; gap: 80px; margin-bottom: 120px; }
.story-img { flex: 1; border-radius: 32px; overflow: hidden; height: 550px; box-shadow: var(--shadow); }
.story-img img { width: 100%; height: 100%; object-fit: cover; object-position: calc(50% - 35px) 50%; }
.story-content { flex: 1; }

/* Grid Fixes */
.grid { display: grid; gap: 40px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: 1fr 1fr; }

.card {
  padding: 48px; border-radius: 32px; background: white;
  border: var(--border); transition: 0.4s;
  text-align: center;
}
.card:hover { transform: translateY(-10px); box-shadow: var(--shadow); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; padding: 18px 36px; border-radius: 14px;
  background: var(--ink); color: white; font-weight: 800; border: none; cursor: pointer; transition: 0.3s;
}
.btn:hover { background: var(--accent); transform: scale(1.02); }
.btn-fire { background: var(--fire); }

/* Inventory Grid Split - Equal 50/50 for Table Breathing Room */
.inventory-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; margin-top: 60px; }
.inventory-col h3 { font-size: 32px; margin-bottom: 40px; }

/* Table Fix - No Vertical Stacking */
.table-container { 
  background: white; border-radius: 20px; border: var(--border); 
  overflow-x: auto; /* Allow scroll if too tight */
  box-shadow: var(--shadow); 
}
table { width: 100%; border-collapse: collapse; text-align: left; }
th { 
  background: #e8f6ed; padding: 16px; font-size: 11px; 
  color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; 
  white-space: nowrap; 
}
td { padding: 14px 16px; border-top: var(--border); vertical-align: middle; font-size: 14px; }
.td-thumb { width: 70px; height: 50px; border-radius: 8px; object-fit: cover; border: var(--border); cursor: zoom-in; }

/* Private Units */
.units-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.unit-card { background: white; border: var(--border); padding: 12px; border-radius: 24px; display: flex; flex-direction: column; gap: 16px; }
.unit-img { width: 100%; height: 180px; border-radius: 12px; object-fit: cover; border: var(--border); cursor: zoom-in; }
.unit-meta { font-size: 12px; font-weight: 800; color: var(--accent); text-transform: uppercase; }

.bedroom-viewer { position: relative; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); border: var(--border); }
.bedroom-viewer .unit-img { height: 400px; width: 100%; object-fit: cover; border-radius: 0; cursor: zoom-in; display: block; }
.bedroom-viewer .viewer-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; color: white; border: none; padding: 20px; cursor: pointer;
  font-size: 60px; font-weight: 200; transition: 0.3s; z-index: 10;
  opacity: 0.5;
}
.bedroom-viewer .viewer-btn:hover { opacity: 1; transform: translateY(-50%) scale(1.1); }
.bedroom-viewer .viewer-btn.prev { left: 0; }
.bedroom-viewer .viewer-btn.next { right: 0; }

/* Snapshot Icons */
.snapshot-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 40px; }
.snapshot-item { 
  aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 2px solid white; 
  box-shadow: var(--shadow); cursor: pointer; transition: 0.2s;
}
.snapshot-item:hover { transform: scale(1.15); border-color: var(--accent); z-index: 10; }
.snapshot-item img { width: 100%; height: 100%; object-fit: cover; }

/* Lightbox with Nav */
.lightbox {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(11, 47, 34, 0.98); z-index: 2000; justify-content: center; align-items: center; padding: 40px;
}
.lightbox:target { display: flex; animation: fadeIn 0.3s; }
.lightbox img { max-width: 100%; max-height: 90%; border-radius: 12px; box-shadow: 0 0 100px rgba(0,0,0,0.5); }
.close-lightbox { position: absolute; top: 40px; right: 40px; color: white; font-size: 50px; font-weight: 200; z-index: 2001; }

.lightbox-nav {
  position: absolute; top: 50%; width: 100%; display: flex; justify-content: space-between; padding: 0 40px; transform: translateY(-50%);
  pointer-events: none;
}
.lightbox-btn {
  color: white; font-size: 60px; font-weight: 200; pointer-events: auto; opacity: 0.5; transition: 0.3s;
}
.lightbox-btn:hover { opacity: 1; transform: scale(1.1); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Nature Icons */
.pillar-icon { width: 64px; height: 64px; margin: 0 auto 32px; color: var(--forest); }
.pillar-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.5; }

.pillar-future { opacity: 0.5; transition: 0.3s; }
.pillar-future:hover { opacity: 1.0; }

.mention-price { 
  font-family: 'Inter', sans-serif; 
  font-size: 11px; 
  font-weight: 500; 
  color: var(--muted); 
  letter-spacing: 0.05em; 
  text-transform: uppercase;
  margin-left: auto;
}
.mention-price strong {
  font-weight: 800;
  color: var(--ink);
}

.footer { padding: 60px 0; background: #fafafa; border-top: var(--border); }

/* Application Form */
.application-form {
  max-width: 680px;
  margin: 48px auto 0;
  text-align: left;
}
.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
}
.form-field:nth-child(4) {
  grid-column: span 2;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 16px 20px;
  border-radius: 12px;
  border: var(--border);
  font-family: inherit;
  font-size: 16px;
  background: white;
  color: var(--ink);
}
.form-field textarea {
  height: 120px;
  resize: vertical;
}
.form-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230b2f22'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
  background-size: 16px;
}

@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-field:nth-child(n) {
    grid-column: span 1;
  }
}

@media (max-width: 1024px) {
  .section-hero { text-align: center; }
  .section-hero p { margin-left: auto; margin-right: auto; }
  .section-hero .cta-container { justify-content: center !important; }
  
  .grid-3, .grid-2, .inventory-grid, .units-grid, .story-block, .snapshot-grid { 
    grid-template-columns: 1fr !important; 
    flex-direction: column !important; 
    gap: 40px; 
    text-align: center;
  }
  
  .story-block .btn { margin: 0 auto; }
  .snapshot-grid { grid-template-columns: repeat(2, 1fr) !important; }
  
  /* Mobile Nav: Compact Horizontal Wrap */
  .nav-inner { flex-direction: column; gap: 12px; padding: 10px 0; }
  .nav-links { 
    display: flex; 
    flex-direction: row; 
    flex-wrap: wrap; 
    justify-content: center; 
    gap: 10px 16px; 
    width: 100%;
    font-size: 13px;
  }
}
