/* ============================================================
   ALTARA GROUP — SOVEREIGN EDITORIAL v2.0
   Santiago, Chile
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #0A0E1A;
  --surface-low:  #171B28;
  --surface-high: #262A37;
  --gold:         #C9A84C;
  --gold-light:   #E6C364;
  --on-gold:      #2A1F00;
  --gray:         #9B9B8E;
  --white:        #F0EDE6;
  --accent-glow:  rgba(201,168,76,0.04);

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Outfit', 'Manrope', sans-serif;

  --nav-h:  72px;
  --pad-v:  7rem;
  --pad-h:  6%;
}

html { font-size: 20px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-sans);
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { font-family: var(--font-sans); cursor: pointer; }

/* ── TYPOGRAPHY ── */
.display-lg {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 7.5vw, 5.5rem);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.headline-md {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3.2vw, 2.1rem);
  font-weight: 300;
  line-height: 1.3;
}

.body-md {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.85;
  color: var(--gray);
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.divider {
  width: 40px;
  height: 1px;
  background: var(--gold);
  margin: 1.5rem 0 2.5rem;
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-block;
  padding: 0.85rem 2.2rem;
  background: var(--gold);
  color: var(--on-gold);
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--gold);
  border-radius: 0;
  transition: background 0.25s, border-color 0.25s;
}

.btn-primary:hover { background: var(--gold-light); border-color: var(--gold-light); }

.btn-ghost {
  display: inline-block;
  padding: 0.85rem 2.2rem;
  background: transparent;
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--gold);
  border-radius: 0;
  transition: background 0.25s, color 0.25s;
}

.btn-ghost:hover { background: rgba(201,168,76,0.1); color: var(--gold); }

.btn-sm { padding: 0.5rem 1rem; font-size: 0.72rem; letter-spacing: 0.1em; }

.btn-danger {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: transparent;
  color: #c25c5c;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid #c25c5c;
  border-radius: 0;
  transition: background 0.25s;
}

.btn-danger:hover { background: rgba(194,92,92,0.1); }

/* ── ADMIN ── */
.admin-bar {
  display: none;
  background: var(--surface-high);
  border-bottom: 1px solid var(--gold);
  padding: 0.6rem var(--pad-h);
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: var(--nav-h);
  z-index: 150;
}

body.admin-mode .admin-bar { display: flex; }

.admin-bar-label {
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

.admin-badge {
  display: none;
  font-size: 0.5rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--gold);
  color: var(--on-gold);
  padding: 0.15rem 0.45rem;
  font-weight: 700;
  margin-left: 0.5rem;
  vertical-align: middle;
}

body.admin-mode .admin-badge { display: inline-block; }

.admin-add-btn { display: none !important; }
body.admin-mode .admin-add-btn { display: inline-flex !important; }

.listing-admin { display: none !important; }
body.admin-mode .listing-admin { display: flex !important; }

/* ── NAVIGATION ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad-h);
  background: rgba(10, 14, 26, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gold);
  transition: background 0.3s;
}

nav.scrolled { background: rgba(10, 14, 26, 0.96); }

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  flex-shrink: 0;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  white-space: nowrap;
  transition: color 0.25s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--gold); }

.nav-cta { padding: 0.5rem 1.1rem !important; font-size: 0.72rem; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
  z-index: 210;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--white);
  transition: transform 0.35s, opacity 0.35s;
}

.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-h); left: 0; right: 0; bottom: 0;
  background: var(--bg);
  z-index: 190;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 var(--pad-h);
  gap: 1.8rem;
  list-style: none;
  border-top: 1px solid var(--gold);
  overflow-y: auto;
}

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

.nav-mobile a {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5.5vw, 2.8rem);
  font-weight: 300;
  color: var(--white);
  transition: color 0.25s;
}

.nav-mobile a:hover { color: var(--gold); }

/* ── HERO (full page) ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--nav-h) + 4rem) var(--pad-h) 5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 60% at 80% 35%, rgba(201,168,76,0.05) 0%, transparent 70%),
    radial-gradient(ellipse 30% 40% at 5% 80%, rgba(201,168,76,0.03) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner { max-width: 680px; position: relative; z-index: 1; }

.hero-bg-text {
  position: absolute;
  right: -1%;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-serif);
  font-size: clamp(6rem, 16vw, 14rem);
  font-weight: 300;
  color: rgba(201,168,76,0.025);
  letter-spacing: 0.1em;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  right: var(--pad-h);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--gray);
  font-size: 0.55rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.hero-scroll::after {
  content: '';
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 2.2s ease-in-out infinite;
}

/* ── INNER PAGE HERO ── */
.page-hero {
  padding: calc(var(--nav-h) + 5rem) var(--pad-h) 5rem;
  border-bottom: 1px solid var(--gold);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 80% at 85% 50%, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Unit stripe & page transition ── */
.unit-stripe {
  height: 3px;
  background: var(--gold);
  width: 100%;
  flex-shrink: 0;
}

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.page-hero-inner { max-width: 560px; position: relative; }

/* ── SECTIONS ── */
section { padding: var(--pad-v) var(--pad-h); }
.surface-low  { background: var(--surface-low); }
.surface-high { background: var(--surface-high); }

/* ── STAT BAR ── */
.stat-bar {
  display: grid;
  background: var(--surface-low);
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
}

.stat-col {
  padding: 2.2rem var(--pad-h);
  position: relative;
}

.stat-col::after {
  content: '';
  position: absolute;
  top: 20%; right: 0;
  height: 60%;
  width: 1px;
  background: rgba(201,168,76,0.25);
}

.stat-col:last-child::after { display: none; }

.stat-label-sm {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 0.5rem;
}

.stat-val {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
}

.stat-val-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--white);
  letter-spacing: 0.02em;
}

/* ── UNIT CARDS (Home) ── */
.units-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: rgba(201,168,76,0.1);
  margin-top: 3rem;
}

.unit-card {
  background: var(--surface-low);
  padding: 2.5rem 2rem;
  border-top: 2px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}

.unit-card:not(.disabled):hover {
  border-top-color: var(--gold);
  background: var(--surface-high);
}

.unit-card.disabled { opacity: 0.35; cursor: default; }

.unit-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 1.5rem;
  opacity: 0.65;
}

.unit-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 0.4rem;
}

.unit-tag {
  font-size: 0.88rem;
  color: var(--gray);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.unit-link {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  transition: color 0.25s;
}

.unit-link:hover { color: var(--gold-light); }

.unit-soon {
  display: inline-block;
  font-size: 0.5rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray);
  border: 1px solid rgba(201,168,76,0.2);
  padding: 0.2rem 0.5rem;
  margin-top: 0.5rem;
}

/* ── WHY ALTARA ── */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 3rem;
}

.why-col {
  border-top: 2px solid var(--gold);
  padding: 2.5rem 2.5rem 2.5rem 0;
}

.why-col:not(:first-child) { padding-left: 2.5rem; border-left: none; }

.why-num {
  font-family: var(--font-serif);
  font-size: 5rem;
  font-weight: 300;
  color: rgba(201,168,76,0.07);
  line-height: 1;
  margin-bottom: 1rem;
}

.why-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.6rem;
  letter-spacing: 0.03em;
}

.why-body {
  font-size: 0.92rem;
  color: var(--gray);
  line-height: 1.8;
}

/* ── SERVICE CARDS (Legal / Media) ── */
.services-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(201,168,76,0.1);
  margin-top: 3rem;
}

.service-card {
  background: var(--surface-low);
  padding: 2.2rem 2rem;
  border-bottom: 2px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}

.service-card:hover {
  background: var(--surface-high);
  border-bottom-color: var(--gold);
}

.service-card-name {
  font-size: 1rem;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 0.45rem;
}

.service-card-desc {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.7;
}

/* ── LISTING CARDS (Properties / Motors / Media) ── */
.listings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.listings-count {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--white);
}

.listings-count span { color: var(--gold); }

.listings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(201,168,76,0.1);
}

.listing-card {
  background: var(--surface-low);
  display: flex;
  flex-direction: column;
  transition: background 0.3s;
}

.listing-card:hover { background: var(--surface-high); }

.listing-photo {
  height: 220px;
  background: linear-gradient(145deg, #1a1f30 0%, #0d1120 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.listing-photo-icon { opacity: 0.1; }

.listing-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-clickable { cursor: pointer; }
.listing-clickable:hover .listing-img { opacity: 0.88; }

.photo-count {
  position: absolute;
  bottom: 0.6rem;
  right: 0.6rem;
  background: rgba(10,14,26,0.72);
  color: var(--gold);
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
}

/* ── Detail modal ── */
.modal-detail {
  max-width: 920px !important;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

.detail-gallery {
  background: #050810;
  display: flex;
  flex-direction: column;
  min-height: 420px;
}

.detail-carousel {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 320px;
  background: #050810;
}

.detail-main-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-no-photo {
  width: 100%;
  height: 100%;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.15;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(10,14,26,0.6);
  border: 1px solid rgba(201,168,76,0.3);
  color: var(--gold);
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.2s;
  line-height: 1;
}

.carousel-btn:hover { background: rgba(201,168,76,0.15); }
.carousel-btn-prev  { left: 0.6rem; }
.carousel-btn-next  { right: 0.6rem; }

.detail-thumbs {
  display: flex;
  gap: 4px;
  padding: 6px;
  background: rgba(0,0,0,0.4);
  overflow-x: auto;
  flex-shrink: 0;
  min-height: 64px;
}

.detail-thumb {
  width: 58px;
  height: 52px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.45;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.detail-thumb.active,
.detail-thumb:hover { opacity: 1; }

.detail-info {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 80vh;
  background: var(--surface-low);
  font-family: var(--font-sans);
}

.detail-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  background: rgba(10,14,26,0.7);
  border: 1px solid rgba(201,168,76,0.25);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.detail-name {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 400;
  color: var(--white);
  margin: 0.8rem 0 0.4rem;
  line-height: 1.25;
}

.detail-price {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--gold);
  margin-bottom: 0.3rem;
}

.detail-meta {
  font-size: 0.78rem;
  color: var(--gray);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(201,168,76,0.12);
}

.detail-desc {
  font-size: 0.92rem;
  color: var(--gray);
  line-height: 1.85;
  flex: 1;
  margin-bottom: 1.5rem;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── Multi-image preview ── */
.img-preview-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 0.5rem;
}

.preview-thumb {
  position: relative;
  width: 68px;
  height: 68px;
  flex-shrink: 0;
}

.preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview-thumb-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  background: rgba(10,14,26,0.82);
  color: var(--gold);
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

@media (max-width: 720px) {
  .modal-detail {
    grid-template-columns: 1fr !important;
  }
  .detail-gallery { min-height: 0; }
  .detail-carousel { min-height: 220px; }
  .detail-info { max-height: none; }
}

.listing-badge {
  position: absolute;
  top: 1rem; left: 1rem;
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.28rem 0.65rem;
  border-radius: 0;
}

.badge-gold    { background: var(--gold); color: var(--on-gold); }
.badge-outline { background: transparent; border: 1px solid var(--gold); color: var(--gold); }
.badge-gray    { background: transparent; border: 1px solid var(--gray); color: var(--gray); }

.listing-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.listing-name {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.listing-desc {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 1rem;
}

.listing-price {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--gold);
  margin-bottom: 0.3rem;
}

.listing-meta {
  font-size: 0.8rem;
  color: var(--gray);
  letter-spacing: 0.04em;
}

.listing-admin {
  padding: 0 1.5rem 1.5rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ── MEDIA PORTFOLIO ── */
.media-thumb {
  height: 180px;
  background: linear-gradient(145deg, #1a1f30 0%, #0d1120 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px;
  border: 1px solid rgba(201,168,76,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
}

.media-category {
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-top: 1rem;
  margin-bottom: 0.3rem;
}

.media-card {
  background: var(--surface-low);
  transition: background 0.3s;
}

.media-card:hover { background: var(--surface-high); }

.media-card-body { padding: 0 1.5rem 1.5rem; }

/* ── VALUES LIST (Nosotros) ── */
.values-list { margin-top: 1rem; }

.value-item {
  display: flex;
  gap: 1rem;
  padding: 1.8rem 0;
  border-bottom: 1px solid rgba(201,168,76,0.1);
}

.value-item:first-child { padding-top: 0; }

.value-dot {
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.38rem;
}

.value-item-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.4rem;
  letter-spacing: 0.04em;
}

.value-item-body {
  font-size: 0.78rem;
  color: var(--gray);
  line-height: 1.75;
}

/* ── CONTACT INFO ── */
.ci-rows { margin-top: 1.5rem; }

.ci-row {
  padding: 1.4rem 0;
  border-bottom: 1px solid rgba(201,168,76,0.12);
}

.ci-row:first-child { padding-top: 0; }

.ci-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.35rem;
}

.ci-value {
  font-size: 1rem;
  color: var(--white);
}

.ci-value a { transition: color 0.25s; }
.ci-value a:hover { color: var(--gold); }

/* ── FORM ── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 2rem;
}

.form-full { grid-column: 1 / -1; }

.form-field { display: flex; flex-direction: column; gap: 0.45rem; }

.form-field label {
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
}

.form-field input,
.form-field textarea,
.form-field select {
  background: var(--surface-high);
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: 2px;
  padding: 0.85rem 1rem;
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 300;
  outline: none;
  transition: border-color 0.25s;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}

.form-field input::placeholder,
.form-field textarea::placeholder { color: rgba(155,155,142,0.4); }

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus { border-color: var(--gold); }

.form-field textarea { resize: vertical; min-height: 130px; }
.form-field select option { background: var(--surface-high); }

.form-success {
  display: none;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-top: 1rem;
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 26, 0.88);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.modal-overlay.open { opacity: 1; pointer-events: auto; }

.modal {
  background: var(--surface-low);
  border: 1px solid var(--gold);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: 1.8rem 2rem;
  border-bottom: 1px solid rgba(201,168,76,0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 300;
  color: var(--white);
}

.modal-close {
  background: none;
  border: none;
  color: var(--gray);
  font-size: 1.4rem;
  line-height: 1;
  padding: 0;
  transition: color 0.2s;
}

.modal-close:hover { color: var(--white); }

.modal-body { padding: 2rem; }
.modal-body .form-grid { gap: 1.2rem 1.5rem; }

.modal-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid rgba(201,168,76,0.15);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

/* ── SPLIT LAYOUT ── */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.split-image-wrap { position: relative; }

.split-image-wrap::after {
  content: '';
  position: absolute;
  top: -1.2rem; right: -1.2rem;
  bottom: 1.2rem; left: 1.2rem;
  border: 1px solid rgba(201,168,76,0.18);
  pointer-events: none;
}

.split-placeholder {
  aspect-ratio: 4 / 5;
  background: var(--surface-high);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.split-placeholder svg { opacity: 0.18; }
.split-placeholder p {
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray);
}

/* ── CTA BANNER ── */
.cta-banner {
  background: var(--surface-high);
  padding: 5rem var(--pad-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
}

.cta-banner-actions { display: flex; gap: 1rem; flex-wrap: wrap; flex-shrink: 0; }

/* ── EMPTY STATE ── */
.empty-state {
  grid-column: 1 / -1;
  padding: 5rem 2rem;
  text-align: center;
}

.empty-state p { font-size: 0.82rem; color: var(--gray); }

/* ── FOOTER ── */
footer {
  background: var(--surface-low);
  border-top: 1px solid var(--gold);
  padding: 5rem var(--pad-h) 0;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(201,168,76,0.1);
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 1rem;
}

.footer-tagline {
  font-size: 0.88rem;
  color: var(--gray);
  line-height: 1.85;
  max-width: 240px;
}

.footer-institutional {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-style: italic;
  color: rgba(201,168,76,0.45);
  margin-top: 1.2rem;
  line-height: 1.6;
  max-width: 240px;
}

.footer-col h4 {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.4rem;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.65rem; }

.footer-col a {
  font-size: 0.88rem;
  color: var(--gray);
  transition: color 0.25s;
}

.footer-col a:hover { color: var(--white); }
.footer-col p { font-size: 0.88rem; color: var(--gray); line-height: 1.7; }

.footer-link-disabled {
  font-size: 0.75rem;
  color: rgba(155,155,142,0.3);
}

.footer-bottom {
  padding: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--gray);
}

/* ── REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible { opacity: 1; transform: translateY(0); }

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

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 1; }
}

/* ── RESPONSIVE ── */
@media (max-width: 1200px) {
  :root { --pad-h: 5%; }
  .units-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1024px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .why-col:nth-child(3),
  .why-col:nth-child(4) { margin-top: 0; }
}

@media (max-width: 840px) {
  :root { --pad-v: 5rem; }
  .split { grid-template-columns: 1fr; gap: 3rem; }
  .split-image-wrap::after { display: none; }
  .services-3col { grid-template-columns: 1fr 1fr; }
  .listings-grid { grid-template-columns: 1fr 1fr; }
  .cta-banner { flex-direction: column; align-items: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
  .units-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: 1fr; }
  .why-col {
    border-top: none;
    border-left: 2px solid var(--gold);
    padding: 1.2rem 0 1.2rem 1.5rem;
  }
}

@media (max-width: 560px) {
  :root { --pad-h: 5%; }
  .services-3col,
  .listings-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .hero-scroll,
  .hero-bg-text { display: none; }
  .stat-bar { overflow-x: auto; }
  .modal-overlay { padding: 1rem; }
  .units-grid { grid-template-columns: 1fr 1fr; }
}

/* ── WhatsApp flotante ── */
.wa-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  z-index: 990;
  box-shadow: 0 4px 18px rgba(37,211,102,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  animation: waPulse 3s ease-in-out infinite;
  text-decoration: none;
}
.wa-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 26px rgba(37,211,102,0.55);
  animation: none;
}
@keyframes waPulse {
  0%,100% { box-shadow: 0 4px 18px rgba(37,211,102,0.4); }
  50%      { box-shadow: 0 4px 28px rgba(37,211,102,0.55), 0 0 0 10px rgba(37,211,102,0.07); }
}
.wa-tooltip {
  position: absolute;
  right: 68px;
  background: var(--surface-low);
  color: var(--white);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(255,255,255,0.08);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.wa-float:hover .wa-tooltip { opacity: 1; }

/* ── Instagram section — componente global ── */
.ig-section {
  padding: var(--pad-v) var(--pad-h);
  background: var(--surface-low);
  border-top: 1px solid rgba(201,168,76,0.12);
}

.ig-section-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ig-section-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9rem;
}

.ig-section-label svg { flex-shrink: 0; opacity: 0.8; }

.ig-section-handle {
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  font-weight: 600;
}

.ig-section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 2.8vw, 2.1rem);
  font-weight: 300;
  color: var(--white);
  line-height: 1.25;
  margin-bottom: 0.6rem;
}

.ig-section-desc {
  font-size: 0.95rem;
  color: var(--gray);
  line-height: 1.75;
  margin-bottom: 1.5rem;
  max-width: 560px;
}

.ig-section-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 560px) {
  .ig-section-actions {
    flex-direction: column;
    width: 100%;
  }
  .ig-section-actions .btn-primary,
  .ig-section-actions .btn-ghost {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

/* ── Footer con columna Instagram ── */
.footer-top { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; }
@media (max-width: 960px) { .footer-top { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 640px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 400px) { .footer-top { grid-template-columns: 1fr; } }

/* ── Media portfolio grid ── */
.media-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.media-portfolio-card {
  background: var(--surface-low);
  display: flex;
  flex-direction: column;
  transition: background 0.3s;
}

.media-portfolio-card:hover { background: var(--surface-high); }

.media-portfolio-img {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  display: block;
  background: #050810;
}

.media-portfolio-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.media-portfolio-card:hover .media-portfolio-img img { transform: scale(1.04); }

.media-portfolio-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  opacity: 0.2;
}

.media-portfolio-hover {
  position: absolute;
  inset: 0;
  background: rgba(10,14,26,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.media-portfolio-hover span {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.media-portfolio-card:hover .media-portfolio-hover { opacity: 1; }

.media-portfolio-info {
  padding: 1rem 1.2rem 1rem;
  flex: 1;
}

.media-category {
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.media-portfolio-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 400;
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 0.35rem;
}

.media-portfolio-desc {
  font-size: 0.7rem;
  color: var(--gray);
  line-height: 1.6;
}

@media (max-width: 900px) { .media-portfolio-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px) { .media-portfolio-grid { grid-template-columns: 1fr; } }

/* ══════════════════════════════════════════════
   PORTAL DE DETALLE — PDP (Properties & Motors)
══════════════════════════════════════════════ */

/* PDP — sistema completamente independiente del modal-overlay */
.pdp-overlay {
  display:         none;
  position:        fixed;
  inset:           0;
  background:      rgba(0,0,0,0.88);
  z-index:         9999;
  overflow-y:      auto;
  padding:         20px;
  box-sizing:      border-box;
  align-items:     flex-start;
  justify-content: center;
}
.pdp-overlay.open {
  display: flex;
}

.pdp-modal {
  width:                 100%;
  max-width:             1100px;
  height:                90vh;
  display:               grid;
  grid-template-columns: 60fr 40fr;
  position:              relative;
  overflow:              hidden;
  background:            var(--surface-low);
  border:                1px solid rgba(201,168,76,0.18);
  border-radius:         8px;
  margin:                auto;
  flex-shrink:           0;
}

/* ── Galería ── */
.pdp-gallery {
  display:        flex;
  flex-direction: column;
  background:     #030608;
  overflow:       hidden;
  height:         100%;                  /* llena la celda del grid */
}

.pdp-main-photo {
  flex:           1;
  position:       relative;
  overflow:       hidden;
  min-height:     0;
}

.pdp-main-img {
  position:        absolute;
  inset:           0;
  width:           100%;
  height:          100%;
  object-fit:      cover;
  object-position: center;
  display:         block;
}

.pdp-no-photo {
  position: absolute;
  inset:    0;
  display:  flex;
  align-items:     center;
  justify-content: center;
  opacity:  0.1;
}

.pdp-photos-btn {
  position:    absolute;
  top:         0.85rem;
  left:        0.85rem;
  background:  rgba(10,14,26,0.78);
  color:       var(--white);
  border:      1px solid rgba(255,255,255,0.15);
  padding:     0.32rem 0.75rem;
  font-size:   0.58rem;
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor:      pointer;
  z-index:     2;
  transition:  background 0.2s;
}
.pdp-photos-btn:hover { background: rgba(10,14,26,0.96); }

.pdp-main-arrows {
  position:        absolute;
  inset:           0;
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  padding:         0 0.5rem;
  pointer-events:  none;
  z-index:         2;
}

.pdp-arrow {
  background:     rgba(10,14,26,0.55);
  border:         1px solid rgba(255,255,255,0.12);
  color:          var(--white);
  width:          36px;
  height:         36px;
  display:        flex;
  align-items:    center;
  justify-content:center;
  cursor:         pointer;
  font-size:      1.4rem;
  pointer-events: all;
  transition:     background 0.2s;
  line-height:    1;
}
.pdp-arrow:hover { background: rgba(10,14,26,0.9); }

.pdp-thumbs-strip {
  display:         flex;
  gap:             3px;
  padding:         5px;
  background:      rgba(0,0,0,0.55);
  overflow-x:      auto;
  flex-shrink:     0;
  scrollbar-width: thin;
}

.pdp-thumb-item {
  width:        80px;
  height:       60px;
  object-fit:   cover;
  cursor:       pointer;
  opacity:      0.45;
  flex-shrink:  0;
  transition:   opacity 0.2s;
  border:       2px solid transparent;
  border-radius:4px;
}
.pdp-thumb-item.active,
.pdp-thumb-item:hover { opacity: 1; border-color: var(--gold); }

/* ── Info panel ── */
.pdp-info {
  display:         flex;
  flex-direction:  column;
  overflow-y:      auto;
  height:          100%;                 /* llena la celda del grid */
  padding:         1.75rem 1.75rem 1.25rem;
  background:      var(--surface-low);
  font-family:     var(--font-sans);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

/* Botón cerrar — esquina superior derecha del modal */
.pdp-close-btn {
  position:    absolute;
  top:         12px;
  right:       12px;
  z-index:     20;
  background:  rgba(255,255,255,0.12);
  border:      1px solid rgba(255,255,255,0.2);
  color:       var(--white);
  width:       32px;
  height:      32px;
  display:     flex;
  align-items: center;
  justify-content: center;
  cursor:      pointer;
  font-size:   1.2rem;
  line-height: 1;
  border-radius: 4px;
  transition:  background 0.2s;
}
.pdp-close-btn:hover { background: rgba(255,255,255,0.25); }

.pdp-badge-row { margin-bottom: 0.75rem; }

.pdp-title {
  font-family: var(--font-serif);
  font-size:   clamp(1rem, 1.6vw, 1.4rem);
  font-weight: 400;
  color:       var(--white);
  line-height: 1.25;
  margin-bottom: 0.4rem;
}

.pdp-price {
  font-family: var(--font-serif);
  font-size:   clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 300;
  color:       var(--gold);
  margin-bottom: 1rem;
}

.pdp-wa-link {
  display:         flex;
  align-items:     center;
  justify-content: center;
  gap:             0.5rem;
  background:      #25D366;
  color:           #fff;
  padding:         0.75rem 1rem;
  font-size:       0.6rem;
  font-weight:     600;
  letter-spacing:  0.12em;
  text-transform:  uppercase;
  text-decoration: none;
  font-family:     var(--font-sans);
  transition:      background 0.2s;
  margin-bottom:   1rem;
  border:          none;
}
.pdp-wa-link:hover { background: #1fba5a; color: #fff; }

.pdp-location-row {
  display:       flex;
  align-items:   flex-start;
  gap:           0.4rem;
  font-size:     0.65rem;
  color:         var(--gray);
  margin-bottom: 1rem;
  line-height:   1.4;
}
.pdp-location-row svg { flex-shrink: 0; margin-top: 1px; }

.pdp-separator {
  height:        1px;
  background:    rgba(201,168,76,0.12);
  margin-bottom: 1rem;
  flex-shrink:   0;
}

.pdp-desc-label {
  font-size:     0.52rem;
  font-weight:   600;
  letter-spacing:0.16em;
  text-transform:uppercase;
  color:         var(--gray);
  margin-bottom: 0.5rem;
  flex-shrink:   0;
}

.pdp-desc-text {
  font-size:   0.75rem;
  color:       var(--gray);
  line-height: 1.85;
  white-space: pre-wrap;
  word-break:  break-word;
  flex:        1;
  margin-bottom: 1rem;
}

.pdp-admin-row {
  display:     none;
  gap:         0.5rem;
  padding-top: 1rem;
  border-top:  1px solid rgba(255,255,255,0.05);
  flex-shrink: 0;
  margin-top:  auto;
}
body.admin-mode .pdp-admin-row { display: flex; }

@media (max-width: 768px) {
  .pdp-modal {
    grid-template-columns: 1fr;
    grid-template-rows:    260px 1fr;
    height:                95vh;
    border-radius:         0;
    border-left:           none;
    border-right:          none;
  }
  .pdp-gallery { height: 260px; flex-shrink: 0; }
  .pdp-main-photo { height: 260px; }
  .pdp-info { height: auto; max-height: none; }
}

/* ══════════════════════
   LIGHTBOX
══════════════════════ */
.pdp-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.96);
  z-index: 800;
  display: none;
  flex-direction: column;
}
.pdp-lightbox.open { display: flex; }

.pdp-lb-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 3rem;
  position: relative;
  flex-shrink: 0;
}

.pdp-lb-counter {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
}

.pdp-lb-close-btn {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,0.65);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}
.pdp-lb-close-btn:hover { color: white; }

.pdp-lb-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.pdp-lb-img {
  max-width: 90%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.pdp-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  color: white;
  width: 44px;
  height: 44px;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  line-height: 1;
}
.pdp-lb-nav:hover { background: rgba(255,255,255,0.18); }
.pdp-lb-nav-prev { left: 0.75rem; }
.pdp-lb-nav-next { right: 0.75rem; }

.pdp-lb-strip {
  display: flex;
  gap: 5px;
  padding: 0.6rem 1rem;
  overflow-x: auto;
  justify-content: center;
  flex-shrink: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.pdp-lb-strip-thumb {
  width: 60px;
  height: 44px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.32;
  flex-shrink: 0;
  transition: opacity 0.2s;
  border: 1px solid transparent;
}
.pdp-lb-strip-thumb.active,
.pdp-lb-strip-thumb:hover { opacity: 1; border-color: rgba(201,168,76,0.5); }

/* ══════════════════════════════════════════════
   GLOBAL MODAL — propiedades + motors
   Capa única, hija directa de <body>.
   El overlay SCROLLEA si el dialog es más alto que
   el viewport (nunca recorta contenido).
══════════════════════════════════════════════ */

.global-modal {
  position:   fixed !important;
  inset:      0 !important;
  z-index:    999999 !important;
  width:      100vw !important;
  height:     100dvh !important;
  height:     100vh !important; /* fallback navegadores sin dvh */
  background: rgba(0,0,0,.84);

  display:         none;
  justify-content: center;
  align-items:     flex-start;

  padding:    24px;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}
.global-modal.is-open { display: flex; }

.global-modal__dialog {
  width:      min(1180px, 92vw);
  height:     auto;
  max-height: calc(100dvh - 48px);
  max-height: calc(100vh - 48px); /* fallback */
  margin:     auto 0;

  display:               grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, .85fr);

  background:    #111521;
  border:        1px solid rgba(201,168,76,0.22);
  border-radius: 8px;
  overflow:      hidden;
  position:      relative;
}

.global-modal__media,
.global-modal__content {
  max-height: calc(100dvh - 48px);
  max-height: calc(100vh - 48px); /* fallback */
  overflow-y: auto;
}

.global-modal__media {
  display:        flex;
  flex-direction: column;
  background:     #030608;
  overflow-x:     hidden;
}

.ldp-photo-stage {
  flex:            1;
  min-height:      0;
  display:         flex;
  align-items:     center;
  justify-content: center;
  overflow:        hidden;
  background:      #030608;
  position:        relative;
}

/* Imagen principal del modal — contenida, nunca fullscreen */
.global-modal__main-image {
  width:       100%;
  max-height:  58dvh;
  max-height:  58vh; /* fallback */
  object-fit:  contain;
  display:     block;
}

.ldp-thumbs {
  display:         flex;
  gap:             3px;
  padding:         5px;
  background:      rgba(0,0,0,0.55);
  overflow-x:      auto;
  flex-shrink:     0;
  scrollbar-width: thin;
}

.global-modal__content {
  display:          flex;
  flex-direction:   column;
  padding:          1.75rem 1.75rem 1.25rem;
  background:       #111521;
  font-family:      var(--font-sans);
  -webkit-overflow-scrolling: touch;
  scrollbar-width:  thin;
}

.ldp-close {
  position:        absolute;
  top:             10px;
  right:           10px;
  z-index:         20;
  background:      rgba(255,255,255,0.12);
  border:          1px solid rgba(255,255,255,0.2);
  color:           var(--white);
  width:           32px;
  height:          32px;
  display:         flex;
  align-items:     center;
  justify-content: center;
  cursor:          pointer;
  font-size:       1.2rem;
  line-height:     1;
  border-radius:   4px;
  transition:      background 0.2s;
}
.ldp-close:hover { background: rgba(255,255,255,0.25); }

body.modal-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .global-modal {
    padding: 14px;
  }

  .global-modal__dialog {
    width:      94vw;
    max-height: calc(100dvh - 28px);
    max-height: calc(100vh - 28px);
    grid-template-columns: 1fr;
    margin:     0;
    border-radius: 8px;
  }

  .global-modal__media {
    max-height: 45dvh;
    max-height: 45vh;
  }

  .global-modal__content {
    max-height: 47dvh;
    max-height: 47vh;
  }

  .global-modal__main-image {
    max-height: 38dvh;
    max-height: 38vh;
  }
}

/* ══════════════════════════════════════════════
   ALTARA LEGAL — LANDING PREMIUM
══════════════════════════════════════════════ */

/* ── Hero ── */
.legal-hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 55% 45%;
  padding-top: var(--nav-h);
  overflow: hidden;
  position: relative;
}

.legal-hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem var(--pad-h);
  position: relative;
  z-index: 1;
}

.legal-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 5.2vw, 4rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.legal-hero-title em {
  font-style: italic;
  color: var(--gold);
}

.legal-hero-sub {
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.85;
  color: var(--gray);
  max-width: 480px;
  margin-bottom: 2.5rem;
}

.legal-hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.legal-hero-visual {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #0f1324 0%, #0a0e1a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid rgba(201,168,76,0.08);
}

.legal-hero-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 50%, rgba(201,168,76,0.055) 0%, transparent 70%);
}

.legal-hero-visual-letter {
  font-family: var(--font-serif);
  font-size: clamp(12rem, 22vw, 22rem);
  font-weight: 300;
  color: rgba(201,168,76,0.045);
  line-height: 1;
  letter-spacing: -0.04em;
  user-select: none;
  pointer-events: none;
  position: relative;
}

/* ── Servicios Premium ── */
.legal-services-section { padding: var(--pad-v) var(--pad-h); }

.legal-services-header { max-width: 600px; margin-bottom: 4rem; }

.legal-section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 300;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 0.9rem;
}

.legal-section-sub {
  font-size: 0.82rem;
  color: var(--gray);
  line-height: 1.8;
}

.legal-services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(201,168,76,0.08);
}

.legal-svc-card {
  background: var(--bg);
  padding: 3rem 2.5rem;
  position: relative;
  overflow: hidden;
  transition: background 0.35s;
  display: flex;
  flex-direction: column;
}

.legal-svc-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.legal-svc-card:hover { background: var(--surface-low); }
.legal-svc-card:hover::after { transform: scaleX(1); }

.legal-svc-num {
  font-family: var(--font-serif);
  font-size: 3.8rem;
  font-weight: 300;
  color: rgba(201,168,76,0.07);
  line-height: 1;
  margin-bottom: 1.5rem;
  transition: color 0.35s;
}

.legal-svc-card:hover .legal-svc-num { color: rgba(201,168,76,0.16); }

.legal-svc-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.legal-svc-desc {
  font-size: 0.75rem;
  color: var(--gray);
  line-height: 1.85;
  flex: 1;
  margin-bottom: 1.5rem;
}

.legal-svc-link {
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s 0.05s, transform 0.3s 0.05s;
  align-self: flex-start;
}

.legal-svc-card:hover .legal-svc-link {
  opacity: 1;
  transform: translateY(0);
}

/* ── Cómo trabajamos ── */
.legal-process-section { padding: var(--pad-v) var(--pad-h); }

.legal-process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 4rem;
  position: relative;
}

.legal-process-steps::before {
  content: '';
  position: absolute;
  top: 22px;
  left: 1.5rem;
  right: 1.5rem;
  height: 1px;
  background: linear-gradient(to right, transparent 0%, rgba(201,168,76,0.2) 15%, rgba(201,168,76,0.2) 85%, transparent 100%);
}

.legal-process-step {
  padding: 0 2rem 0 0;
  position: relative;
}

.legal-process-step:last-child { padding-right: 0; }

.process-step-num {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 0.78rem;
  color: var(--gold);
  letter-spacing: 0.04em;
  margin-bottom: 2rem;
  background: var(--surface-low);
  position: relative;
  z-index: 1;
  transition: background 0.3s, border-color 0.3s;
}

.legal-process-step:hover .process-step-num {
  background: rgba(201,168,76,0.08);
  border-color: rgba(201,168,76,0.7);
}

.process-step-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.process-step-body {
  font-size: 0.75rem;
  color: var(--gray);
  line-height: 1.8;
}

/* ── Fundador ── */
.legal-founder-section {
  padding: var(--pad-v) var(--pad-h);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}

.legal-founder-photo-wrap { position: relative; }

.legal-founder-photo-wrap::after {
  content: '';
  position: absolute;
  top: -1.2rem; right: -1.2rem;
  bottom: 1.2rem; left: 1.2rem;
  border: 1px solid rgba(201,168,76,0.15);
  pointer-events: none;
}

.legal-founder-photo {
  aspect-ratio: 3 / 4;
  background: var(--surface-high);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  overflow: hidden;
}

.legal-founder-photo svg { opacity: 0.12; }

.legal-founder-photo p {
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray);
}

.legal-founder-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.legal-founder-content {
  display: flex;
  flex-direction: column;
}

.legal-founder-name {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 300;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 0.4rem;
}

.legal-founder-role {
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2rem;
}

.legal-founder-bio {
  font-size: 0.82rem;
  color: var(--gray);
  line-height: 1.9;
  border-left: 2px solid rgba(201,168,76,0.22);
  padding-left: 1.5rem;
}

.legal-founder-bio + .legal-founder-bio { margin-top: 1rem; }

/* ── Por qué elegir ── */
.legal-trust-section { padding: var(--pad-v) var(--pad-h); }

.legal-trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 4rem;
}

.legal-trust-item {
  padding: 2.5rem;
  border-top: 1px solid rgba(201,168,76,0.1);
  border-right: 1px solid rgba(201,168,76,0.1);
  transition: background 0.3s;
}

.legal-trust-item:nth-child(3n) { border-right: none; }
.legal-trust-item:hover { background: rgba(201,168,76,0.022); }

.legal-trust-icon {
  color: var(--gold);
  opacity: 0.7;
  margin-bottom: 1.2rem;
}

.legal-trust-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.legal-trust-body {
  font-size: 0.75rem;
  color: var(--gray);
  line-height: 1.8;
}

/* ── CTA Final ── */
.legal-final-cta {
  padding: 8rem var(--pad-h);
  text-align: center;
  background: var(--surface-high);
  border-top: 1px solid rgba(201,168,76,0.18);
  position: relative;
  overflow: hidden;
}

.legal-final-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 70% at 50% 50%, rgba(201,168,76,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.legal-final-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 300;
  line-height: 1.2;
  color: var(--white);
  max-width: 700px;
  margin: 0.75rem auto 2.5rem;
  position: relative;
}

.legal-final-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  position: relative;
}

/* ── Responsive Legal ── */
@media (max-width: 1024px) {
  .legal-hero { grid-template-columns: 1fr; min-height: auto; }
  .legal-hero-visual { display: none; }
  .legal-hero-content { padding: calc(var(--nav-h) + 4rem) var(--pad-h) 5rem; }
  .legal-services-grid { grid-template-columns: repeat(2, 1fr); }
  .legal-process-steps { grid-template-columns: repeat(2, 1fr); gap: 3rem; }
  .legal-process-steps::before { display: none; }
  .legal-founder-section { grid-template-columns: 1fr; gap: 3rem; }
  .legal-founder-photo-wrap::after { display: none; }
  .legal-trust-grid { grid-template-columns: repeat(2, 1fr); }
  .legal-trust-item:nth-child(3n) { border-right: 1px solid rgba(201,168,76,0.1); }
  .legal-trust-item:nth-child(2n) { border-right: none; }
}

@media (max-width: 640px) {
  .legal-services-grid { grid-template-columns: 1fr; }
  .legal-process-steps { grid-template-columns: 1fr; }
  .legal-trust-grid { grid-template-columns: 1fr; }
  .legal-trust-item { border-right: none; }
  .legal-svc-card { padding: 2rem 1.5rem; }
  .legal-process-step { padding-right: 0; }
  .legal-final-cta { padding: 5rem var(--pad-h); }
}
