/* Evita scroll horizontal en todo el sitio */
body {
  overflow-x: hidden;
}

/* Todos los elementos respetan el box-sizing */
* {
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

nav {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(69, 75, 83, 0.7); /* semitransparente */
  color: #fff;
  padding: 1rem 2rem;
  z-index: 10;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
}

nav a {
  color: #fff;
  text-decoration: none;
}

footer {
  background: #eee;
  text-align: center;
  padding: 1rem;
  margin-top: 2rem;
}

.hero {
  background: url('/images/hero/posiblehero6.png') no-repeat center center / cover;
  color: #fff;
  min-height: 100vh;          /* ocupa todo el alto de la pantalla */
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;        /* centra logo + texto */
  position: relative;
  padding: 0 20px;            /* margen lateral para que no se pegue */
  box-sizing: border-box;
  z-index: 1;
}

.hero-texto h1 {
  font-size: 2.5rem;
}

.btn {
  background-color: #007bff;
  color: white;
  padding: 0.8rem 1.5rem;
  text-decoration: none;
  border-radius: 4px;
}

.card {
  max-width: 300px;
  margin: auto;
}

.card img {
  width: 100%;
  border-radius: 8px;
}

.btn-chico {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: #28a745;
  color: white;
  text-decoration: none;
  border-radius: 4px;
}

.contacto {
  background: #f5f5f5;
  padding: 2rem;
  text-align: center;
}

/* Detalle propiedad */
.detalle-prop {
  max-width: 1000px;
  margin: auto;
  padding: 2rem;
}

.galeria {
  position: relative;
}

.galeria img#img-principal {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 8px;
}

.flechas {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
}

.flechas button {
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  padding: 0.8rem;
  cursor: pointer;
}

.miniaturas {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  justify-content: center;
}

.miniaturas img {
  width: 100px;
  height: 70px;
  object-fit: cover;
  cursor: pointer;
  border-radius: 4px;
  border: 2px solid transparent;
}

.miniaturas img:hover {
  border-color: #007bff;
}

.info-prop {
  margin-top: 2rem;
}

.info-prop h1 {
  font-size: 2rem;
}

.info-prop h2 {
  color: green;
  font-size: 1.5rem;
}

.caracteristicas {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}

.btn-contacto {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.8rem 1.5rem;
  background-color: #28a745;
  color: white;
  text-decoration: none;
  border-radius: 5px;
}

/* Título sección destacadas en index */
.destacadas h2 {
  color: #ffffff;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* === FICHA DESTACADA INTEGRADA === */
.ficha-propiedad {
  max-width: 360px;
  margin: 1.5rem auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  text-align: left;
}

.img-propiedad {
  width: 100%;
  height: auto;
  display: block;
}

.info-ficha {
  padding: 1rem;
}

.info-ficha h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
}

.info-ficha .direccion {
  color: #777;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.precio-ficha {
  color: #b71c1c;
  font-weight: bold;
  margin-bottom: 0.8rem;
}

.detalles-ficha {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.datos p {
  margin: 0;
  font-size: 0.9rem;
}

.btn-ficha {
  background-color: #d32f2f;
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: bold;
}

/* Ajustes pulidos visuales */

.ficha-propiedad {
  margin: 2rem auto;
  padding-bottom: 1rem;
}

.img-container {
  position: relative;
}

.etiqueta {
  position: absolute;
  top: 10px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: bold;
  border-radius: 4px;
  color: white;
}

.venta {
  left: 10px;
  background-color: #d32f2f;
}

.destacada {
  left: 100px;
  background-color: #616161;
}

.precio-float {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background-color: rgba(255,255,255,0.95);
  color: #000;
  font-weight: bold;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* .destacadas unificada */
.destacadas {
  padding: 4rem 1rem;
  text-align: center;
  background: linear-gradient(to bottom, rgba(96, 96, 97, 0.85), #2b313a);
}

/* Diseño horizontal para ficha de propiedad (base) */
.detalle-prop-horizontal {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 1rem;
}

/* Estas se sobreescriben luego en el bloque grid/fix */
.contenedor-horizontal {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.galeria-horizontal {
  flex: 1 1 40%;
}

.galeria-horizontal img#img-principal {
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

.info-prop-horizontal {
  flex: 1 1 55%;
}

.info-prop-horizontal h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.info-prop-horizontal h2 {
  color: green;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.info-prop-horizontal p {
  font-size: 1rem;
  line-height: 1.5;
}

/* Corrección flechas */
.galeria-horizontal {
  position: relative;
}

.flechas {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  z-index: 5;
}

.flechas button {
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  padding: 0.8rem;
  cursor: pointer;
  font-size: 1.2rem;
  border-radius: 4px;
}

/* Mostrar el nav */
nav {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
}

/* Limitar descripción */
.info-prop-horizontal {
  max-width: 600px;
  padding-right: 1rem;
}

/* Por defecto, el nav es estático */
nav {
  position: static;
  background: #2b313a;
  z-index: 10;
}

/* Solo en el index, que tiene class="inicio" en el body */
body.inicio nav {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(43, 49, 58, 0.7);
}

/* Sombra suave en bloques clave */
.card, .ficha-propiedad, .galeria-horizontal img#img-principal {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* Color destacado en íconos */
.caracteristicas li::before {
  content: "• ";
  color: #b71c1c;
  font-weight: bold;
}

/* Subrayado animado en nav */
nav a {
  position: relative;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 2px;
  background: #fff;
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

/* Animación de entrada en ficha */
.detalle-prop-horizontal {
  animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

nav ul .redes {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  margin-left: auto;
}

.icono-red {
  width: 26px;
  height: 26px;
  opacity: 0.85;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.icono-red:hover {
  transform: scale(1.15);
  opacity: 1;
}

/* Navbar fijo */
.navbar-fixed {
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Overlay en hero */
.hero {
  position: relative;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.hero h1, .hero p {
  position: relative;
  z-index: 2;
}

/* Slider simple */
.slider {
  width: 100%;
  overflow: hidden;
  margin: 2rem 0;
}

.slides {
  display: flex;
  width: 300%;
  animation: slide 15s infinite;
}

.slides img {
  width: 100%;
  height: auto;
}

@keyframes slide {
  0% { transform: translateX(0%); }
  33% { transform: translateX(-100%); }
  66% { transform: translateX(-200%); }
  100% { transform: translateX(0%); }
}

/* Bloque CTA WhatsApp optimizado */
.cta-whatsapp {
  background: #fff;
  padding: 4rem 1.5rem;
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  box-shadow: inset 0 8px 8px -8px rgba(0,0,0,0.2);
}

.cta-whatsapp h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #111;
}

.cta-whatsapp p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: #444;
}

.btn-whatsapp {
  background-color: #25D366;
  color: white;
  padding: 1rem 2rem;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-whatsapp:hover {
  background-color: #1ebe5b;
  transform: translateY(-2px);
}

.icono-wsp {
  width: 22px;
  height: 22px;
}

/* === SOBRE NOSOTROS === */
.sobre-nosotros {
  padding: 4rem 2rem;
  text-align: center;
  background-color: #f9f9f9;
}

.sobre-nosotros h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #111;
}

.sobre-nosotros p {
  max-width: 800px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #444;
}

.datos-nosotros {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.datos-nosotros div {
  background: #fff;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.08);
  font-size: 1rem;
  max-width: 200px;
  flex: 1 1 150px;
}

/* === CONTACTO === */
.contacto-form {
  padding: 4rem 2rem;
  background: #fafafa;
  text-align: center;
}

.contacto-form h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #111;
}

.contacto-form form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto 2rem;
}

.contacto-form input,
.contacto-form textarea {
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  font-family: 'Montserrat', sans-serif;
}

.contacto-form textarea {
  min-height: 120px;
}

.contacto-form button {
  background-color: #2e7d32;
  color: white;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.contacto-form button:hover {
  background-color: #1b5e20;
}

.info-contacto {
  color: #333;
  font-size: 1rem;
  line-height: 1.6;
}

.info-contacto a {
  color: #2e7d32;
  text-decoration: underline;
}

/* === BLOQUE DE DATOS INSTITUCIONALES EN CONTACTO === */
.datos-contacto-final {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding: 2rem 1rem;
  border-top: 1px solid #ccc;
  margin-top: 2rem;
  font-family: 'Montserrat', sans-serif;
}

.datos-contacto-final .item {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  max-width: 250px;
  font-size: 0.95rem;
}

.datos-contacto-final span {
  font-size: 1.2rem;
  line-height: 1.4;
}

.datos-contacto-final a {
  color: #000;
  text-decoration: none;
  font-weight: bold;
}

.btn-whatsapp.contacto {
  color: white !important;
}

/* Grilla para propiedades destacadas */
.grid-propiedades {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 2rem 1rem;
  justify-items: center;
}

/* --- FIX GALERIA / DETALLES HORIZONTALES --- */
.contenedor-horizontal {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .contenedor-horizontal {
    grid-template-columns: 1fr 1fr;
  }
}

.galeria-horizontal {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
  flex: 1 1 40%;
  position: relative;
}

#img-principal {
  width: 100%;
  max-width: 600px;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  display: block;
  margin: 0 auto;
  border-radius: 10px;
}

.miniaturas-scroll {
  display: flex;
  overflow-x: auto;
  gap: 0.5rem;
  padding: 1rem 0;
  max-width: 100%;
  scrollbar-width: none;
}

.miniaturas-scroll::-webkit-scrollbar {
  display: none;
}

.miniaturas-scroll img {
  width: 90px;
  height: 65px;
  object-fit: cover;
  cursor: pointer;
  border-radius: 6px;
  flex: 0 0 auto;
  border: 2px solid transparent;
}

.miniaturas-scroll img:hover {
  border-color: #007bff;
}

.caracteristicas.chica {
  font-size: 0.85rem;
  line-height: 1.2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding: 0;
  margin: 0;
}

.caracteristicas.chica li {
  list-style: none;
  margin: 0;
}

.info-prop-horizontal {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.info-prop-horizontal h1,
.info-prop-horizontal h2,
.info-prop-horizontal p {
  margin: 0 0 0.25rem 0;
  line-height: 1.3;
}

.btn-contacto {
  margin-top: 0.75rem;
  align-self: flex-start;
}

/* ==== propiedades (listado simple) ==== */
:root {
  --g: clamp(12px,2vw,18px);
  --r: 16px;
  --soft: #f7f7f8;
  --muted: #6b7280;
  --accent: #b91c1c;
}

.prop-wrap {max-width:1100px;margin:auto;padding:clamp(12px,3vw,24px)}
.prop-sub{color:var(--muted);font-size:.95rem}
.prop-filters{display:grid;gap:var(--g);grid-template-columns:repeat(12,1fr);background:var(--soft);padding:14px;border-radius:18px;margin-top:10px}
.prop-filters .f{display:flex;flex-direction:column;gap:6px}
.prop-filters label{font-size:.82rem;color:#374151}
.prop-filters select,.prop-filters input{border:1px solid #e5e7eb;border-radius:12px;padding:10px 12px;background:#fff;min-height:42px}
.span-3{grid-column:span 3}.span-4{grid-column:span 4}.span-6{grid-column:span 6}
.prop-actions{display:flex;gap:10px;align-items:end}
.btn{border:1px solid #e5e7eb;border-radius:12px;padding:10px 14px;cursor:pointer;background:#fff}
.btn.primary{background:var(--accent);color:#fff;border-color:var(--accent)}
.prop-count{color:var(--muted);margin:16px 0}
.prop-grid{display:grid;gap:var(--g);grid-template-columns:repeat(12,1fr)}
.prop-card{grid-column:span 4;background:#fff;border:1px solid #f0f2f5;border-radius:var(--r);overflow:hidden;box-shadow:0 8px 18px rgba(17,24,39,.06)}
.prop-thumb{position:relative;aspect-ratio:16/11;overflow:hidden}
.prop-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.prop-body{padding:14px 16px}
.prop-price{font-weight:700}
.prop-title{font-weight:600;margin:6px 0 2px}
.prop-addr{color:var(--muted);font-size:.92rem}
.prop-feats{display:flex;gap:12px;flex-wrap:wrap;margin:10px 0 4px;font-size:.92rem}
.prop-cta{display:flex;gap:10px;margin-top:10px}
.prop-cta a{flex:1;text-align:center;text-decoration:none;border-radius:12px;padding:10px 12px;border:1px solid #e5e7eb}
.prop-cta a.primary{background:var(--accent);color:#fff;border-color:var(--accent)}
.prop-more{display:flex;justify-content:center;margin:22px 0 6px}
@media (max-width: 992px){.prop-card{grid-column:span 6}.span-3{grid-column:span 6}.span-4{grid-column:span 6}.span-6{grid-column:span 12}}
@media (max-width: 640px){.prop-card{grid-column:span 12}}
/* ==== /propiedades ==== */

/* WhatsApp button (CSS-only, sin tocar HTML) */
.prop-cta a[href*="wa.me"]{
  background:#25D366;          /* verde WhatsApp */
  color:#fff;
  border-color:#25D366;
  font-weight:600;
}

.prop-cta a[href*="wa.me"]:hover{ filter:brightness(.92); }

.prop-cta a[href*="wa.me"]:focus{
  outline:none;
  box-shadow:0 0 0 3px rgba(37,211,102,.25);
}

/* ============================
   AJUSTES PARA CELULAR (ÚNICO BLOQUE)
   ============================ */
@media (max-width: 768px) {

  html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
  }

  /* NAV: más compacto en celu y sin desbordar */
  nav {
    padding: 8px 16px;
  }

  nav ul {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    flex-wrap: wrap;           /* permite pasar a dos filas si no entra */
  }

  nav ul .redes {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }

  /* HERO en celu */
  .hero {
    min-height: 100vh;
    padding-top: 80px;         /* para que el nav no tape el texto */
    padding-bottom: 40px;
  }

  .hero-texto h1 {
    font-size: 1.8rem;
    line-height: 1.2;
    margin-bottom: 8px;
  }

  .hero-texto p {
    font-size: 0.95rem;
    max-width: 90%;
    margin: 0 auto;
  }

  /* Grilla: una sola columna en celu */
  .grid-propiedades {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2rem 1rem 3rem;
    justify-items: stretch;
  }

  .ficha-propiedad {
    max-width: 100%;
    margin: 0;
  }

  /* Detalles: altura de imagen controlada y texto más compacto */
 @media (max-width: 768px) {
  .detalle-prop-horizontal .galeria-horizontal #img-principal,
  .detalle-prop .galeria #img-principal,
  #img-principal {
    width: 100%;
    height: auto !important;
    max-height: 45vh;        /* CLAVE: antes era demasiado */
    object-fit: contain;    
    background: #f2f2f2;
    border-radius: 12px;
  }
}


  .detalle-prop-horizontal {
    padding-top: 1.5rem;
    padding-bottom: 2.5rem;
  }

  .info-prop-horizontal h1 {
    font-size: 1.4rem;
    line-height: 1.25;
    margin: 1rem 0 0.3rem;
  }

  .info-prop-horizontal h2 {
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
  }

  .info-prop-horizontal p {
    font-size: 0.95rem;
  }

  .miniaturas-scroll img,
  .miniaturas img {
    width: 80px;
    height: 58px;
  }
}

