/* ========== VARIABLES ========== */
:root {
  --primary: #31a84f; /* Verde principal */
  --accent: #44723a; /* Verde secundario nuevo */
  --dark: #02140a;
  --light-bg: #e1fbf5;
  --text: #222222;
  --text-muted: #555555;
  --radius: 12px;
}

/* ========== RESETEO BÁSICO ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--text);
  background-color: #31a84f; /* Fondo verde */
}

/* CONTENEDOR GENERAL */
.container {
  width: min(1100px, 100% - 2rem);
  margin: 0 auto;
}

/* ========== HEADER ========== */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--accent); /* Verde secundario */
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0;
}

.logo img {
  height: 90px;
  width: auto;
}

/* NAV */
.nav {
  display: flex;
  gap: 1rem;
}

.nav a {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--accent); /* Verde secundario */
  transition: width 0.25s ease;
}

.nav a:hover::after {
  width: 100%;
}

/* Botón menú móvil */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--accent);
  color: #ffffff;
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  font-size: 1.2rem;
}

/* ========== HERO ========== */
.hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  background: radial-gradient(
    circle at center,
    #03170a 0%,
    #010503 60%,
    #000000 100%
  );
  color: #ffffff;
  text-align: center;
}

.hero-content {
  padding: 4rem 0 3rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3rem);
  margin-bottom: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent); /* Verde secundario */
}

.hero p {
  max-width: 620px;
  margin: 0.5rem auto 1.8rem;
  color: #d8e5dd;
}

/* BOTÓN PRINCIPAL */
.btn-primary {
  display: inline-block;
  padding: 0.8rem 2.4rem;
  border-radius: 999px;
  background: var(--accent); /* Verde secundario */
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  box-shadow: 0 0 20px rgba(68, 114, 58, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  background: #365c30; /* tono más oscuro */
  box-shadow: 0 0 28px rgba(68, 114, 58, 0.6);
}

/* ========== SECCIONES GENERALES ========== */
.section {
  padding: 3.5rem 0;
  background: #050806;
  color: #e5f2e9;
}

.section-light {
  background: var(--light-bg);
  color: var(--text);
}

.section h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--accent); /* Verde secundario */
}

.section-intro {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 2rem;
  color: var(--text-muted);
}

/* ========== PROPIEDADES ========== */
.grid-propiedades {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.card-propiedad {
  background: #ffffff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--accent); /* Verde secundario */
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.section:not(.section-light) .card-propiedad {
  background: #071009;
  color: #f4f7f5;
}

/* IMAGEN COMO <img class="prop-img" ...> (para no romper nada) */
img.prop-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

/* Placeholder */
.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #a8c4a3; /* verde claro relacionado */
  color: #333;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.card-propiedad h3 {
  font-size: 1.1rem;
  margin: 1rem 1rem 0.3rem;
  color: var(--accent); /* Verde */
}

.card-propiedad p {
  margin: 0 1rem 1.2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ========== SOBRE MÍ ========== */
.about {
  display: flex;
  justify-content: center;
}

.about-text {
  max-width: 700px;
  line-height: 1.7;
  color: #d8ecd5; /* verde muy claro */
}

/* ========== CONTACTO ========== */
.contact {
  text-align: center;
}

.contact-list {
  list-style: none;
  margin-top: 1rem;
}

.contact-list li {
  margin-bottom: 0.4rem;
  color: var(--accent);
}

/* ========== FOOTER ========== */
.footer {
  background: #020504;
  color: var(--accent);
  padding: 1rem 0;
  font-size: 0.85rem;
  text-align: center;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .grid-propiedades {
    grid-template-columns: 1fr;
  }

  .header-content {
    gap: 0.5rem;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.96);
    padding: 1rem;
    display: none;
  }

  .nav.show {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }
}

/* Ícono de WhatsApp en botón */
.icon-whatsapp {
  width: 28px;
  height: 28px;
  margin-right: 10px;
  vertical-align: middle;
}

/* Para que el botón acomode el ícono */
.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* Botón de Gmail – color #ddd7bb y mismas animaciones que el verde */
.btn-email {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0.8rem 2.4rem;
  border-radius: 999px;
  background: #ddd7bb; /* color especial para Gmail */
  color: #222222; /* texto oscuro para buen contraste */
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  box-shadow: 0 0 20px rgba(221, 215, 187, 0.4); /* sombra con el mismo tono */
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-email:hover {
  transform: translateY(-1px);
  background: #cfc7a4; /* un poquito más oscuro */
  box-shadow: 0 0 28px rgba(221, 215, 187, 0.6);
}

/* Ícono del botón Gmail */
.icon-email {
  width: 26px;
  height: 26px;
  object-fit: contain;
  margin-right: 10px;
}

/* Centrar botones de contacto */
.contact-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* Ajuste para responsive */
@media (max-width: 600px) {
  .contact-actions {
    flex-direction: column;
    gap: 1.2rem;
  }

  .contact-btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
}

/* CONTENEDOR DE LA IMAGEN (si usás <div class="prop-img"><img/></div>) */
.prop-img {
  width: 100%;
  height: 220px;
  overflow: hidden;
  border-bottom: 2px solid var(--accent);
  border-radius: 12px 12px 0 0;
}

/* IMAGEN QUE SE ADAPTA PERFECTAMENTE */
.prop-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-actions {
  padding: 0 1rem 1rem;
  display: flex;
  justify-content: flex-end;
}

.btn-detalle {
  font-size: 0.8rem;
  padding: 0.6rem 1.3rem;
}

/* ================= GALERÍA / CARRUSEL EN DETALLE ================ */

.galeria {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0 1rem;
}

/* UNIFICADO (era 3 veces): conserva TODO lo que tenías */
.galeria-viewport {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  aspect-ratio: 3 / 2;
  max-height: 460px; /* 👈 CONTROLA EL TAMAÑO */
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  background: #000;
}

.galeria-controles {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* BASE (repetido): lo dejamos una vez */
.galeria-btn {
  border: none;
  border-radius: 999px;
  padding: 0.6rem 0.9rem; /* base */
  background: var(--accent);
  color: #ffffff;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

/* OVERRIDE para controles (antes estaba duplicado completo) */
.galeria-controles .galeria-btn {
  padding: 0.6rem 1.1rem;
}

.galeria-btn:hover {
  background: #365c30;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.galeria-viewport img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

/* Zoom suave al pasar el mouse */
.galeria-viewport img:hover {
  transform: scale(1.05);
}

/* Thumbnails debajo */
.galeria-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.galeria-thumb {
  width: 90px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  background: transparent;
  opacity: 0.7;
  transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.galeria-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.galeria-thumb:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.thumb-activa {
  opacity: 1;
  border-color: var(--accent);
}

/* Zoom suave también en las tarjetas de la lista */
.card-propiedad .prop-img img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.card-propiedad:hover .prop-img img {
  transform: scale(1.05);
}

/* Enlace de volver */
.volver-prop {
  margin-top: 1.2rem;
}

.btn-link-volver {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
}

.btn-link-volver:hover {
  text-decoration: underline;
}

/* Responsivo galería */
@media (max-width: 768px) {
  .galeria {
    flex-direction: column;
  }

  .galeria-viewport {
    height: 260px;
  }
}

/* ========= LIGHTBOX ========== */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.lightbox.hidden {
  display: none;
}

.lightbox-img {
  max-width: 80%;
  max-height: 80%;
  border-radius: 10px;
  box-shadow: 0 0 20px #000;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 35px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}

.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 45px;
  background: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  padding: 10px 18px;
  cursor: pointer;
  border-radius: 8px;
}

.lightbox-btn.prev {
  left: 40px;
}

.lightbox-btn.next {
  right: 40px;
}

.lightbox-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

/* ====== UBICACIÓN / GOOGLE MAPS EN DETALLE ====== */

.mapa-section {
  margin-top: 3rem;
  text-align: center;
}

.mapa-texto {
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

/* Contenedor del mapa */
.mapa-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  width: 100%;
}

/* Iframe del mapa */
.mapa-container iframe {
  width: 100%;
  max-width: 520px; /* 👈 tamaño elegante */
  height: 320px;
  border-radius: 16px;
  border: none;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

/* ====== MAPA CENTRADO Y PROPORCIONAL ====== */

.mapa-section .map-wrapper {
  display: flex;
  justify-content: center;
  margin: 2rem auto;
}

.mapa-section .map-box {
  background: #e4f6ee;
  padding: 1rem;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  width: 100%;
  max-width: 500px;
}

.mapa-section .map-box iframe {
  width: 100%; /* 👈 tamaño real del mapa */
  height: 300px;
  border-radius: 12px;
}

.btn-maps-overlay:hover {
  background: #365c30;
  transform: translateX(-50%) translateY(-3px);
}

/* TEXTO A LA DERECHA */
.ubicacion-texto {
  flex: 1 1 260px;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.8rem;
  margin-top: 0.5rem;
}

.ubicacion-texto p {
  margin: 0;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .ubicacion-prop {
    flex-direction: column;
    text-align: center;
  }

  .ubicacion-texto {
    align-items: center;
  }

  .btn-maps-overlay {
    bottom: 8px;
  }
}

/* Contenedor del mapa + descripción */
.map-wrapper {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin: 2rem 0 1rem;
  justify-content: center;
}

/* Tarjeta del mini mapa */
.map-box {
  flex: 0 0 360px;
  background: #e4f6ee;
  padding: 1rem;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center; /* centra el botón debajo del mapa */
}

.map-box iframe {
  width: 100%;
  height: 260px;
  border: 0;
  border-radius: 12px;
  margin-bottom: 0.75rem;
}

/* Texto de la ubicación, a la derecha */
.map-info {
  flex: 1;
  display: flex;
  align-items: center;
}

.map-info #map-descripcion {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Botón de Google Maps más pequeño con icono */
.icon-maps {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  object-fit: contain;
}

.maps-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.55rem 1.2rem;
  font-size: 0.78rem;
  border-radius: 999px;
}

/* Responsive: mapa arriba, texto abajo en pantallas pequeñas */
@media (max-width: 768px) {
  .map-wrapper {
    flex-direction: column;
    align-items: center;
  }

  .map-box {
    width: 100%;
    max-width: 380px;
  }

  .map-info {
    justify-content: center;
    text-align: center;
    margin-top: 0.75rem;
  }
}

.galeria-viewport img,
.galeria-viewport video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ================== REDES SOCIALES ================== */
.redes {
  text-align: center;
}

.redes-list {
  list-style: none;
  padding: 0;
  margin-top: 25px;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 35px;
}

/* Caja base (igual para todos los íconos) */
.red-social {
  width: 64px;
  height: 64px;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* Estilo base de las imágenes */
.red-social img {
  object-fit: contain;
  display: block;
  cursor: pointer;

  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ===== AJUSTE INDIVIDUAL POR RED ===== */

/* Facebook: ocupa más espacio visual */
.red-social.facebook img {
  width: 48px;
  height: 48px;
}

/* Instagram: tiene más padding interno, se agranda un poco */
.red-social.instagram img {
  width: 54px;
  height: 54px;
}

/* Hover */
.red-social img:hover {
  transform: scale(1.15);
  opacity: 0.9;
}
