:root {
  --bg-white:      #ffffff;
  --bg-brand-soft: #e4e4e7;
  --bg-brand-dark: #19191a; 
  --ink:           #111111;
  --ink-mute:      #555555;
  --accent:        #b84a32; 
  --line:          rgba(17, 17, 17, 0.15); 
  --sans:          "Montserrat", -apple-system, system-ui, sans-serif;
  --ease-soft:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out:      cubic-bezier(0.25, 1, 0.5, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }

body { font-family: var(--sans); font-size: 15px; line-height: 1.5; font-weight: 500; color: var(--ink); background-color: var(--bg-brand-soft); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.bg-white { background-color: var(--bg-white); }
.bg-brand-soft { background-color: var(--bg-brand-soft); }
.bg-brand-dark { background-color: var(--bg-brand-dark); color: #ffffff; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 2rem; width: 100%; }
.text-center { text-align: center; }
.grid-2 { display: grid; gap: 2.5rem; } 
@media (min-width: 960px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* Navegación */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 9999; padding: 1.2rem 0; background: rgba(255, 255, 255, 0.98); box-shadow: 0 1px 0 var(--line); transition: all 0.3s var(--ease-soft); }
.nav.is-scrolled { padding: 0.6rem 0; box-shadow: 0 4px 20px rgba(0,0,0,0.06); }
.nav-container { display: flex; justify-content: space-between; align-items: center; max-width: 1400px; margin: 0 auto; padding: 0 2rem; width: 100%; }
.logo-img { height: 60px; object-fit: contain; transition: height 0.3s var(--ease-soft); }
.nav.is-scrolled .logo-img { height: 45px; }
.nav-links { display: flex; gap: 2rem; align-items: center; font-weight: 600; font-size: 0.9rem; margin: 0; } 
.nav-link { transition: color 0.3s; }
.nav-link:hover, .highlight-link { color: var(--accent); }

/* Hero */
.hero { position: relative; min-height: 65svh; display: flex; justify-content: center; align-items: center; text-align: center; overflow: hidden; padding-top: 5rem; }
.hero-blend-container { position: absolute; inset: 0; z-index: 1; background-color: var(--bg-brand-soft); }
.hero-bg { width: 100%; height: 100%; object-fit: cover; opacity: 0.65; filter: contrast(1.02); }
.hero-mask-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(228, 228, 231, 0.2) 0%, rgba(228, 228, 231, 0.6) 50%, rgba(228, 228, 231, 1) 100%); }
.hero-content { max-width: 1400px; width: 100%; padding: 0 2rem; display: flex; flex-direction: column; align-items: center; z-index: 10; margin-top: 0rem; }

/* Título de Portada - Espacio inferior compactado */
.hero-title { font-size: clamp(2.2rem, 4.5vw, 3.5rem); margin-bottom: 1.1rem; font-weight: 600; letter-spacing: 0.04em; line-height: 1.15; text-transform: uppercase; color: var(--accent); }

/* Subtítulo Portada: Alineado exactamente al ancho del Grid (1216px) en 2 renglones */
.hero-sub-box { 
  background: #ffffff; 
  padding: 1.2rem 2.4rem; 
  border-radius: 8px; 
  font-size: clamp(1.25rem, 1.9vw, 1.55rem); 
  color: var(--ink-mute); 
  width: 100%; 
  max-width: 1216px; 
  line-height: 1.5; 
  font-weight: 500; 
  text-align: center; 
  margin: 0 auto; 
  box-shadow: 0 5px 15px rgba(0,0,0,0.05); 
}

/* Secciones Generales */
.section { padding: 4rem 0; width: 100%; } 
.section-title { font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 600; margin-bottom: 2.5rem; letter-spacing: 0.02em; text-transform: uppercase; }

/* Título Caja "Déjanos Asesorarte" */
.title-box-accent {
  display: inline-block;
  background-color: #808080;
  color: #ffffff;
  padding: 0.5rem 1.8rem;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  border-radius: 6px;
  margin-bottom: 1.5rem;
  box-shadow: 0 5px 15px rgba(128, 128, 128, 0.2);
}

.bento { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .bento { grid-template-columns: repeat(5, 1fr); } }

.card, .card-static { position: relative; overflow: hidden; background-color: #111; display: flex; flex-direction: column; justify-content: flex-end; min-height: 300px; border: 1px solid var(--line); border-radius: 6px; transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out); }
.card-img, .card-img-static { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; opacity: 0.5; transition: transform 0.8s var(--ease-soft); }
.card::after, .card-static::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(10, 10, 10, 0.95) 0%, rgba(10, 10, 10, 0.4) 60%, transparent 100%); }
.card-content, .card-content-static { position: relative; z-index: 2; padding: 2rem; color: #ffffff; }
.card-content h3, .card-content-static h3 { font-size: 1.5rem; font-weight: 600; color: #ffffff; margin: 0;}
.view-more { color: var(--accent); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; display: inline-block; margin-top: 0.8rem; }
.card:hover, .card-static:hover { transform: translateY(-8px); box-shadow: 0 15px 35px rgba(0,0,0,0.15); }
.card:hover .card-img, .card-static:hover .card-img-static { transform: scale(1.08); opacity: 0.8; }

/* Botones y Contacto */
.contact-text h2 { margin-bottom: 1rem; font-weight: 600; text-transform: uppercase; font-size: 2rem; } 
.body-cta { color: var(--ink-mute); margin-bottom: 2.5rem; max-width: 550px; font-size: 1.05rem; line-height: 1.6; }
.whatsapp-card-clean { background: transparent; padding: 0; border: none; max-width: 500px; margin-top: 1rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.8rem 1.8rem; border-radius: 4px; font-weight: 600; transition: all 0.3s var(--ease-soft); border: none; cursor: pointer; text-decoration: none;}
.btn-submit { background-color: var(--ink); color: #ffffff; width: 100%; font-size: 0.95rem; }
.btn-submit:hover { background-color: var(--accent); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(184, 74, 50, 0.2); }

/* BOTÓN WHATSAPP BLINDADO CONTRA RUPTURAS */
.btn-wa { 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  gap: 12px;
  background-color: #25D366; 
  color: #ffffff; 
  font-weight: 600; 
  text-align: center; 
  width: 100%; 
  padding: 1rem 2rem; 
  border-radius: 6px; 
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.2);
  text-decoration: none;
  white-space: nowrap; 
  flex-wrap: nowrap;   
  flex-shrink: 0;      
  transition: transform 0.4s var(--ease-soft), box-shadow 0.4s var(--ease-soft);
}
.btn-wa:hover { background-color: #20ba5a; transform: translateY(-3px); box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3); }

/* Redes Sociales Flotantes Monocromo 50% Gris */
.floating-socials { position: fixed; bottom: 2rem; right: 2rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.8rem; align-items: center; }
.social-btn { background-color: transparent; border: 2px solid #808080; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; transition: all 0.3s ease; }
.social-svg-icon { width: 22px; height: 22px; transition: fill 0.3s ease; }
.social-svg-icon path { fill: #808080; transition: fill 0.3s ease; }
.social-btn:hover { background-color: #808080; transform: scale(1.1) translateY(-3px); }
.social-btn:hover .social-svg-icon path { fill: #ffffff !important; }

/* Formularios */
.field { position: relative; margin-bottom: 1.5rem; }
.field input, .field select { width: 100%; padding: 1.4rem 1rem 0.4rem; border: 1px solid #a1a1aa; background: #ffffff; font-family: inherit; font-size: 0.95rem; border-radius: 4px; transition: border-color 0.3s; font-weight: 500; appearance: none; -webkit-appearance: none;}
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); }
.field label { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); pointer-events: none; transition: all 0.25s var(--ease-soft); color: var(--ink-mute); font-weight: 500;}
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field select:focus + label, .field select:valid + label { top: 0.4rem; transform: none; font-size: 0.7rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.cta-success { display: none; background: #ffffff; padding: 1.5rem; border-radius: 4px; border: 1px solid var(--line); margin-top: 1rem; }
.cta-success.is-visible { display: block; opacity: 1; animation: fadeIn 0.5s ease forwards;}
@keyframes fadeIn { from {opacity: 0;} to {opacity: 1;} }

/* Footer */
.footer { display: block; width: 100%; position: relative; z-index: 10; background-color: var(--bg-brand-dark); color: #ffffff; padding: 3rem 0 1.5rem; border-top: 1px solid var(--line); }
.footer-row-linear { display: grid; gap: 1.5rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .footer-row-linear { grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 2.5rem; } }
.footer-cell { display: flex; flex-direction: column; justify-content: flex-start; }
.footer-cell h4 { margin-bottom: 0.8rem; font-size: 1rem; font-weight: 600; color: #ffffff; border-left: 3px solid var(--accent); padding-left: 0.6rem; text-transform: uppercase; letter-spacing: 0.02em; line-height: 1.2; }
.footer-cell p { color: rgba(255, 255, 255, 0.75); line-height: 1.5; font-size: 0.9rem; font-weight: 500; margin: 0;}
.current-logo-container { display: flex; align-items: center; justify-content: flex-start; }
.footer-logo-invert { max-width: 260px; height: auto; object-fit: contain; filter: brightness(0) invert(1); opacity: 0.95; margin-bottom: 0.5rem;}
.system-maps { display: flex; flex-direction: column; }
.maps-links { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.2rem; width: 100%; }
.map-link { display: inline-flex; align-items: center; justify-content: center; padding: 0.5rem 1rem; border-radius: 3px; font-size: 0.85rem; font-weight: 600; transition: background 0.3s, transform 0.2s; color: #ffffff; text-align: center; }
.geo-google { background-color: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.15); }
.geo-google:hover { background-color: rgba(255, 255, 255, 0.15); transform: translateX(3px); }
.geo-waze { background-color: #33ccff; color: #1a1a1a; }
.geo-waze:hover { background-color: #29b6f6; transform: translateX(3px); }
.footer-bottom { padding-top: 1.5rem; margin-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.07); text-align: center; color: rgba(255, 255, 255, 0.35); font-size: 0.8rem; font-weight: 500;}

/* Vistas de Avalúos y Generales */
.detail-main { min-height: 50svh; width: 100%; }
.service-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); margin-top: 1.5rem; width: 100%; }

.sub-detail-view-solid { display: grid; grid-template-columns: 1fr; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #ffffff; box-shadow: 0 10px 30px rgba(0,0,0,0.03); width: 100%; transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out); }
@media (min-width: 860px) { .sub-detail-view-solid { grid-template-columns: 1fr 1fr; } }
.sub-detail-view-solid:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0,0,0,0.06); }

.sub-detail-text { padding: 3rem 2.5rem; display: flex; flex-direction: column; justify-content: center; background: #ffffff; color: var(--ink); }
.sub-title { font-size: 2.2rem; margin-bottom: 1rem; font-weight: 600; line-height: 1.2; }
.sub-desc { font-size: 1.05rem; line-height: 1.6; color: var(--ink-mute); text-align: justify; margin-bottom: 0; }

.sub-detail-img { position: relative; height: 100%; min-height: 400px; background: #1a1a1a; overflow: hidden; }
.sub-detail-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform 1s var(--ease-soft); }
.sub-detail-view-solid:hover .sub-detail-img img { transform: scale(1.05); }

.back-link { color: var(--accent); font-weight: 600; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.05em; display: inline-block; margin-bottom: 1.5rem; transition: color 0.3s; }
.back-link:hover { color: var(--ink); }

.ideal-box { margin: 1.5rem 0 1rem; padding: 1.2rem; background: #ffffff; border-left: 3px solid var(--accent); border-radius: 4px; box-shadow: 0 4px 15px rgba(0,0,0,0.02); }
.ideal-title { font-size: 0.85rem !important; font-weight: 600 !important; color: var(--ink) !important; text-transform: uppercase; margin-bottom: 0.5rem !important; letter-spacing: 0.05em; }
.ideal-text { font-size: 0.95rem !important; color: var(--ink-mute) !important; line-height: 1.6 !important; text-align: left !important; margin:0;}
.ideal-separator { color: var(--accent); margin: 0 8px; font-weight: bold; }

/* Arquitectura Grid Exclusiva */
.arch-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; margin-top: 1.5rem; width: 100%; }
@media (min-width: 960px) { .arch-grid { grid-template-columns: repeat(3, 1fr); } }
.arch-column { display: flex; flex-direction: column; gap: 1rem; height: 100%; }
.arch-column:hover .arch-card { transform: translateY(-6px); box-shadow: 0 15px 35px rgba(0,0,0,0.06); }
.arch-column:hover .arch-slogan-box { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,0.04); }

.arch-card { flex-grow: 1; background: #ffffff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.03); display: flex; flex-direction: column; transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out); }
.arch-img { position: relative; height: 240px; overflow: hidden; background: #1a1a1a; }
.arch-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-soft); }
.arch-column:hover .arch-img img { transform: scale(1.08); }
.arch-text { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.arch-text h2 { font-size: 1.3rem; font-weight: 600; color: var(--accent); margin-bottom: 0.8rem; line-height: 1.2; text-transform: uppercase; text-align: center; }
.arch-text p { font-size: 0.95rem; color: var(--ink-mute); line-height: 1.6; text-align: justify; margin: 0; font-weight: 500; }

.arch-slogan-box { background: #ffffff; border: 1px solid var(--line); border-radius: 6px; padding: 1.2rem; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.02); transition: transform 0.4s var(--ease-soft), box-shadow 0.4s var(--ease-soft); display: flex; align-items: center; justify-content: center; min-height: 70px; }
.arch-slogan { color: var(--accent); font-weight: 700; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em; margin: 0; }

/* Buscador de Propiedades */
.property-search-box { background: #ffffff; padding: 3rem; border-radius: 8px; box-shadow: 0 15px 45px rgba(0,0,0,0.05); border: 1px solid var(--line); max-width: 1000px; margin: 2rem auto; }
.search-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-bottom: 2rem; }
@media (min-width: 768px) { .search-grid { grid-template-columns: 1fr 1fr 1fr; } }
.property-search-box .field { margin-bottom: 0; }
.field select { background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23b84a32%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E'); background-repeat: no-repeat; background-position: right 1rem top 50%; background-size: 0.65rem auto; cursor: pointer; }

/* GRID 65/35 PREMIUM (INMUEBLES Y VEHÍCULOS) */
.property-detail-layout { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: stretch; max-width: 1280px; margin: 0 auto; }
@media (min-width: 960px) { .property-detail-layout { grid-template-columns: 6.5fr 3.5fr; } }
.property-left-col { display: flex; flex-direction: column; gap: 1.2rem; }
.property-right-col { background: var(--bg-white); border: 1px solid var(--line); padding: 2.5rem 2rem; border-radius: 8px; display: flex; flex-direction: column; gap: 1.5rem; box-shadow: 0 10px 30px rgba(0,0,0,0.03); height: 100%; position: sticky; top: 100px;}

/* JERARQUÍA DE FICHA TÉCNICA */
.specs-compact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.spec-item { display: flex; flex-direction: column; gap: 0.3rem; }
.spec-label { font-size: 1rem; color: var(--ink); font-weight: 700; text-transform: capitalize; }
.spec-value { font-size: 0.95rem; font-weight: 500; color: var(--ink-mute); }

/* LIGHTBOX MODAL PANTALLA COMPLETA */
.lightbox-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(10, 10, 10, 0.98); z-index: 99999; display: none; flex-direction: column; justify-content: center; align-items: center; opacity: 0; transition: opacity 0.3s ease; }
.lightbox-overlay.active { display: flex; opacity: 1; }
.lightbox-content { position: relative; max-width: 90%; max-height: 85vh; display: flex; flex-direction: column; align-items: center; }
.lightbox-img { max-width: 100%; max-height: 85vh; border-radius: 4px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); object-fit: contain; }
.lightbox-close { position: absolute; top: -40px; right: 0; color: #fff; font-size: 2.5rem; line-height: 1; cursor: pointer; background: transparent; border: none; font-weight: 300; transition: color 0.3s; z-index: 2; }
.lightbox-close:hover { color: var(--accent); }

.lightbox-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.4); border: none; color: #fff; padding: 1rem; border-radius: 50%; cursor: pointer; font-size: 1.5rem; display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; transition: background 0.3s; z-index: 10; }
.lightbox-btn:hover { background: var(--accent); }
.lightbox-btn-prev { left: 2rem; }
.lightbox-btn-next { right: 2rem; }
@media (max-width: 768px) {
    .lightbox-btn-prev { left: 0.5rem; }
    .lightbox-btn-next { right: 0.5rem; }
}

[data-reveal] { opacity: 0; transform: translateY(25px); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
[data-reveal].is-revealed { opacity: 1; transform: none; }