/* 🔷 RESET Y FONDO FIJO */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  background: url('img/fondo.webp') no-repeat center center fixed;
  background-size: cover;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 0;
}

/* 🔷 CONTENEDOR PRINCIPAL */
.contenedor {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* 🔷 HEADER Y MENÚ SUPERIOR */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid #ccc;
  background: none;
  position: relative;
  z-index: 1000;
}

.logo img {
  height: 40px;
  max-width: 100%;
  object-fit: contain;
}

.menu-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.menu-toggle {
  display: none;
  font-size: 1.6rem;
  background: none;
  border: none;
  color: #333;
  cursor: pointer;
}

/* 🔷 MENÚ DESPLEGABLE */
.menu {
  display: flex;
  gap: 1rem;
  position: relative;
  z-index: 1100;
}

.menu a {
  text-decoration: none;
  color: #333;
  font-weight: 600;
  transition: color 0.3s ease;
}

.menu a:hover {
  color: #0077cc;
}

/* 🔷 FOOTER */
footer {
  text-align: center;
  margin-top: 2rem;
  padding: 1rem;
  background: #000;
  color: #fff;
  border-radius: 6px;
  font-size: 0.9rem;
}

/* 🔷 RESPONSIVE */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    animation: fadeIn 0.3s ease-in-out;
    z-index: 1100;
  }

  .menu.active {
    display: flex;
  }

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .menu a {
    font-size: 0.95rem;
    margin: 0.5rem 0;
  }

  .contenedor {
    margin: 1rem;
    padding: 1.5rem;
  }
}




/* 🔷 CATEGORÍAS - Estilo horizontal tipo RecyclerView */
.seccion-categorias {
  margin-top: 2rem;
  padding: 0 1rem;
}

.seccion-categorias h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: #333;
  text-align: left;
}

/* Scroll horizontal */
.categorias-scroll {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scroll-snap-type: x mandatory;
}

.categorias-scroll::-webkit-scrollbar {
  height: 6px;
}

.categorias-scroll::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 3px;
}
/* 🔧 TARJETAS DE CATEGORIA COMO ENLACE */
.categoria-card {
  flex: 0 0 auto;
  width: 140px;
  background: #000000;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  overflow: hidden;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
  scroll-snap-align: start;

  /* ✅ Estilo para que el enlace no tenga subrayado */
  text-decoration: none;
  color: inherit;
  display: block;
}

.categoria-card:hover {
  transform: translateY(-3px);
  border-color: #0077cc;
}

.categoria-card img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-bottom: 1px solid #eee;
}

.categoria-card h3 {
  margin: 0;
  font-size: 0.9rem;
  color: #fff; /* Texto blanco sobre fondo oscuro */
  padding: 0.5rem;
  font-weight: bold;
  border-top: 1px solid #333; /* Línea sutil para separar del contenido */
}



/* 🔄 Contenedor scroll horizontal */
.categorias-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 1rem 0;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;

  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}



.categorias-scroll::-webkit-scrollbar {
  display: none;
}

@media (min-width: 768px) {
  .categoria-card {
    width: 250px; /* ⬆️ Más ancho para que respire mejor */
    padding-bottom: 1rem; /* Espacio extra si el contenido crece */
  }

  .categoria-card img {
    height: 170px; /* ⬆️ Imagen más alta para destacar visualmente */
  }

  .categoria-card h3 {
    font-size: 1.1rem; /* ⬆️ Título más grande para jerarquía visual */
    text-decoration: none;
    font-weight: bold;
  }
}
/* Contenedor para que entren varias tarjetas */
.propiedades-lista {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* Tarjeta pequeña */
.propiedad-card-vertical {
  flex: 0 0 200px; /* Tamaño fijo para que no se estire */
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.propiedad-card-vertical:hover {
  transform: translateY(-4px);
}

.propiedad-card-vertical .imagen {
  width: 100%;
  height: 100px; /* Imagen baja */
}

.propiedad-card-vertical img {
  width: 200px !important;   /* ancho fijo */
  height: 100px !important;  /* alto fijo */
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

.propiedad-card-vertical .info {
  padding: 0.5rem;
  background-color: #b40404;
  color: #eee;
  display: flex;
  flex-direction: column;
  justify-content: center;   /* ✅ Centrado vertical */
  align-items: center;       /* ✅ Centrado horizontal */
  text-align: center;        /* ✅ Centrado del texto */
  height: 100px;             /* Opcional: altura fija para centrar mejor */
}

.propiedad-card-vertical .info h3 {
  font-size: 0.9rem;
  margin: 0 0 0.3rem;
  color: #00bfff;
}

.propiedad-card-vertical .info p {
  font-size: 0.8rem;
  margin: 0.2rem 0;
}

.destacados-grid {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 1rem 0;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.destacados-grid::-webkit-scrollbar {
  display: none;
}

.destacados-grid > div {
  flex: 0 0 250px;
  scroll-snap-align: start;
}

.propiedad-card-horizontal {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.propiedad-card-horizontal:hover {
  transform: translateY(-4px);
}

.propiedad-card-horizontal .imagen img {
  width: 250px !important;
  height: 240px !important;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

.propiedad-card-horizontal .info {
  padding: 0.5rem;
  background-color: #f7ebeb;
  color: #000000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 220px;
}
.propiedad-card-horizontal .info h3 {
  font-size: 1.3rem; /* más grande */
  margin-bottom: 0.5rem;
  color: #ff0000; /* rojo */
  font-weight: 600; /* un poco más grueso para destacar */
}

.propiedad-card-horizontal .info p {
  font-size: 0.85rem;
  margin: 0.3rem 0;
  line-height: 1.3;
}

/* 🎯 Botón Leer más */
.btn-leer-mas {
  margin-top: 0.5rem;
  padding: 0.35rem 0.7rem;
  background: #ffffff;
  color: #ff0000;
  border: none;
  border-radius: 5px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-leer-mas:hover {
  background: #005fa3;
}

/* 📱 Responsive para móviles */
@media (max-width: 768px) {
  .propiedad-card-horizontal {
    flex-direction: column;
    width: 95%;
    margin: 1rem auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  .propiedad-card-horizontal .imagen {
    width: 100%;
    margin: 0 auto;
    padding: 0;
  }

  .propiedad-card-horizontal .imagen img {
    width: 100%;
    height: 240px; /* más alta */
    object-fit: cover;
    border-radius: 12px;
  }

  .propiedad-card-horizontal .info {
    padding: 1rem;
    border-left: none;
  
  }

  .propiedad-card-horizontal .info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
  }

  .propiedad-card-horizontal .info p {
    font-size: 0.9rem;
    margin: 0.3rem 0;
  }
}




/* Asegurar que el contenedor sea el punto de referencia */
.contenedor {
    position: relative;
}

/* Botón flotante de WhatsApp al estilo app */
.whatsapp-float {
    position: fixed;    /* Siempre visible */
    bottom: 20px;       /* Parte inferior de la pantalla */
    right: calc(50% - 600px + 20px); /* Mantenerlo dentro del contenedor (ej: contenedor de 1200px) */
    z-index: 9999;
}

.whatsapp-float img {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background-color: rgb(0, 0, 0);
    padding: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-float img:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

/* Versión más pequeña y mejor ubicada en móviles */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 80px; /* Más arriba para no chocar con la barra de navegación */
        right: 20px;  /* Pegado al borde derecho */
    }
    .whatsapp-float img {
        width: 45px;
        height: 45px;
        padding: 4px;
    }
}


