:root {
  --ink: #172019;
  --muted: #6d766e;
  --paper: #fafbf8;
  --line: #dfe5dc;
  --green: #9ab879;
  --green2: #c3d6a8;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  overflow-x: hidden; /* Evita scroll horizontal en móviles */
}

a {
  color: inherit;
}

.container {
  width: min(1160px, calc(100% - 40px));
  margin: auto;
}

/* HEADER & NAV */
.header {
  height: 72px;
  background: #fff;
  border-bottom: 1px solid #e8ece5;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand img {
  width: 240px;
  height: auto;
  display: block;
}

.links {
  display: flex;
  align-items: center;
  gap: 25px;
  font: 700 10px 'Manrope', sans-serif;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.links a {
  text-decoration: none;
}

.nav-buy {
  background: var(--ink);
  color: #fff !important;
  padding: 12px 15px;
}

.menu {
  display: none;
  background: none;
  border: 0;
  font-size: 24px;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px; /* Tamaño táctil accesible */
  align-items: center;
  justify-content: center;
}

/* --- SECCIÓN HERO RESPONSIVE --- */
.hero {
  position: relative;
  /* Usamos la imagen como fondo adaptable */
  background-image: url('assets/fotos-limpias/vivienda32.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 90vh; /* Se adapta mejor a las pantallas altas o cortas de celulares */
  display: flex;
  align-items: center;
  padding: 80px 0 60px 0;
  color: #fff;
}

/* Capa de sombra para asegurar contraste del texto */
.hero-shade {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.6), rgba(0,0,0,0.75));
  z-index: 1;
}

/* Contenido por encima de la capa de sombra */
.hero .container {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem); /* Tipografía fluida que se reduce automáticamente en mobile */
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin-bottom: 30px;
  max-width: 600px;
}

/* Ajustes de botones y cajas de confianza en mobile */
.hero .actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.hero-trust {
  display: flex;
  gap: 15px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.hero-trust span {
  font-size: 0.95rem;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-trust span b {
  font-size: 1.4rem;
}

/* Media Query específica para celulares pequeños */
@media (max-width: 768px) {
  .hero {
    min-height: 80vh;
    padding: 60px 0;
    text-align: left; /* O 'center' según prefieras para mobile */
  }

  .hero .actions {
    flex-direction: column;
    width: 100%;
  }

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

  .hero-trust {
    justify-content: space-between;
  }
  
  .hero-trust span {
    flex: 1;
    text-align: center;
    min-width: 30%;
  }
}

/* PASOS RÁPIDOS */
.quick {
  background: #eef2eb;
  border-bottom: 1px solid var(--line);
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.quick-grid div {
  padding: 17px 18px;
  border-right: 1px solid #dbe2d8;
}

.quick-grid div:last-child {
  border: 0;
}

.quick b {
  display: block;
  color: #6e8759;
  font: 800 11px 'Manrope', sans-serif;
}

.quick span {
  font-size: 11px;
  color: #5e6861;
}

/* SECCIONES GENERALES */
.section {
  padding: 70px 0;
}

.head {
  display: grid;
  grid-template-columns: 1fr .55fr;
  gap: 60px;
  align-items: end;
  margin-bottom: 28px;
}

.head h2,
.showroom-cta h2,
.works h2,
.fleet h2,
.final h2 {
  font: 800 clamp(34px, 4.2vw, 55px)/.98 'Manrope', sans-serif;
  letter-spacing: -.055em;
  margin: 3px 0;
}

.head p {
  font-size: 12px;
  line-height: 1.75;
  color: var(--muted);
  margin: 0;
}

/* MODELOS */
.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: stretch;
}

.model {
  background: #fff;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.model.hot {
  background: #1c2820;
  color: #fff;
  border-color: #1c2820;
}

.model img {
  width: 100%;
  height: 235px;
  object-fit: contain;
  background: #f5f3df;
}

.model-body {
  padding: 19px 20px;
  min-height: 188px;
  display: flex;
  flex-direction: column;
}

.sqm {
  font: 800 27px 'Manrope', sans-serif;
  color: #708a5b;
}

.hot .sqm {
  color: #bdd29f;
}

.model h3 {
  font: 800 19px 'Manrope', sans-serif;
  margin: 7px 0 6px;
}

.model p {
  font-size: 11px;
  line-height: 1.5;
  color: #737d75;
  margin: 0;
}

.hot p {
  color: #c1cac1;
}

.model a {
  margin-top: auto;
  padding-top: 18px;
  font: 800 9px 'Manrope', sans-serif;
  color: #5d774b;
  text-decoration: none;
}

.hot a {
  color: #b8cf96;
}

.custom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 16px;
  font-size: 11px;
  color: var(--muted);
}

.custom a {
  font: 800 9px 'Manrope', sans-serif;
  color: #5e784b;
  text-decoration: none;
}

/* SHOWROOM */
.showroom-cta {
  background: var(--ink);
  color: #fff;
  padding: 68px 0;
}

.showroom-grid {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 80px;
  align-items: center;
}

.showroom-cta p {
  max-width: 580px;
  color: #c1c9c1;
  line-height: 1.7;
  font-size: 13px;
  margin: 0 0 23px;
}

.address {
  border: 1px solid #47534a;
  padding: 28px;
}

.address span {
  font: 800 9px 'Manrope', sans-serif;
  letter-spacing: .16em;
  color: var(--green2);
}

.address strong {
  display: block;
  font: 800 29px 'Manrope', sans-serif;
  margin: 10px 0 3px;
}

.address b {
  display: block;
  font-size: 12px;
  color: #c8d0c8;
}

.address small {
  display: block;
  color: #8f9a91;
  font-size: 10px;
  margin-top: 17px;
}

.map-container {
  margin-top: 15px;
  border-radius: 8px;
  overflow: hidden;
}

/* SISTEMAS CONSTRUCTIVOS */
.compact-section {
  padding-top: 65px;
}

.system-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 13px;
}

.system-grid article {
  background: #fff;
  border: 1px solid var(--line);
}

.system-grid img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

.system-grid article > div {
  padding: 18px;
}

.system-grid span {
  font: 800 9px 'Manrope', sans-serif;
  color: #79905f;
}

.system-grid h3 {
  font: 800 18px 'Manrope', sans-serif;
  margin: 6px 0;
}

.system-grid p {
  font-size: 11px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

/* OBRAS REALIZADAS Y GALERÍA */
.works {
  background: #1b251e;
  color: #fff;
  padding: 68px 0;
}

.head.light p {
  color: #aeb8af;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

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

/* FLOTA PROPIA */
.fleet {
  background: #eef2eb;
  padding: 55px 0;
}

.fleet-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 50px;
  align-items: center;
}

.fleet-grid img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.fleet p {
  max-width: 520px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  margin: 0 0 20px;
}

.fleet .outline {
  border-color: #82917f;
  color: var(--ink);
}

.fleet video {
  width: 100%;
  height: 310px;
  object-fit: cover;
  background: #111;
}

/* CALL TO ACTION FINAL */
.final {
  background: #fff;
  padding: 62px 0;
  border-top: 1px solid var(--line);
}

.final-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
}

.final h2 {
  font-size: 45px;
}

.final p {
  font-size: 12px;
  color: var(--muted);
}

.big {
  padding: 17px 20px;
  white-space: nowrap;
}

/* FOOTER */
.footer {
  display: flex;
  align-items: center;
  gap: 25px;
  justify-content: space-between;
  padding: 22px 0;
  font-size: 10px;
  color: #737c74;
}

.footer img {
  width: 145px;
}

.footer a {
  text-decoration: none;
}

.footer-info {
  font-size: 0.95rem;
}

/* BOTÓN WHATSAPP FLOTANTE */
.float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: var(--green);
  color: #142017;
  padding: 12px 15px;
  text-decoration: none;
  font: 800 9px 'Manrope', sans-serif;
  letter-spacing: .08em;
  z-index: 110;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}

/* EFECTOS Y MODAL LIGHTBOX */
.zoomable-img {
  cursor: pointer;
  transition: transform 0.2s ease-in-out;
  width: 100%;
  object-fit: cover;
}

.zoomable-img:hover {
  transform: scale(1.02);
}

#lightbox-modal {
  border: none;
  border-radius: 8px;
  padding: 1rem;
  max-width: 90vw;
  max-height: 90vh;
  background: #fff;
}

#lightbox-modal::backdrop {
  background: rgba(0, 0, 0, 0.8);
}

#lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  display: block;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  background: transparent;
  border: none;
  font-size: 2rem;
  cursor: pointer;
}

/* MEDIA QUERIES (RESPONSIVO) */
@media (max-width: 850px) {
  .links {
    display: none;
  }

  .links.open {
    display: flex;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    padding: 20px;
    flex-direction: column;
    align-items: flex-start;
    border-bottom: 1px solid var(--line);
  }

  .menu {
    display: flex;
  }

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

  .head,
  .showroom-grid,
  .fleet-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .final-grid {
    flex-direction: column;
    align-items: flex-start;
  }

  .big {
    white-space: normal;
    width: 100%;
  }

  .hero {
    height: auto;
    min-height: 520px;
    padding: 40px 0;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 24px, 1160px);
  }

  .brand img {
    width: 190px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero p {
    font-size: 13px;
  }

  .actions {
    flex-direction: column;
    max-width: 100%;
  }

  .actions .btn {
    width: 100%;
  }

  .hero-trust {
    gap: 14px;
    flex-wrap: wrap;
  }

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

  .quick-grid div {
    padding: 13px 10px;
  }

  .section,
  .showroom-cta,
  .works {
    padding: 52px 0;
  }

  .head h2,
  .showroom-cta h2,
  .works h2,
  .fleet h2,
  .final h2 {
    font-size: 32px;
  }

  .custom {
    flex-direction: column;
  }

  .fleet video {
    height: 230px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .float {
    right: 12px;
    bottom: 12px;
    padding: 10px 12px;
  }
}