/* Paleta natural */
:root {
  --primary: #2f6f51;
  --primary-700: #275b42;
  --primary-100: #d9e9df;
  --sand: #f3efe7;
  --text: #1f2a27;
  --muted: #5a6a63;
  --card: #ffffff;
  --shadow: 0 10px 40px rgba(12, 30, 22, 0.12);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: #ffffff;
}

a {
  text-decoration: none;
}

.navbar {
  background: #ffffffcc;
  backdrop-filter: blur(6px);
}

.navbar .nav-link {
  color: var(--muted);
  font-weight: 500;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: var(--primary);
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--primary-700);
  border-color: var(--primary-700);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background: var(--primary);
  color: #fff;
}

.hero {
  background: linear-gradient(120deg, #f7fbf8 0%, #eef5ef 100%);
  position: relative;
}

.hero-blob {
  position: absolute;
  inset: -10% auto auto -5%;
  width: 45vw;
  max-width: 520px;
  aspect-ratio: 1;
  background: radial-gradient(circle at 30% 30%, rgba(47, 111, 81, 0.22), transparent 55%),
    radial-gradient(circle at 70% 60%, rgba(39, 91, 66, 0.18), transparent 50%),
    rgba(47, 111, 81, 0.12);
  filter: blur(35px);
  opacity: 0.8;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.card {
  border-radius: var(--radius);
}

.card.shadow-lg {
  box-shadow: var(--shadow);
}

.property-image-container {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
}

.property-card img {
  border-radius: var(--radius) var(--radius) 0 0;
  object-fit: cover;
  height: 220px;
  transition: transform 0.3s ease;
}

.property-image:hover {
  transform: scale(1.05);
}

.gallery-badge {
  font-size: 0.85rem;
  padding: 4px 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.property-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.95rem;
}

.price-tag {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.1rem;
}

.badge-soft {
  background: var(--primary-100);
  color: var(--primary-700);
  border-radius: 999px;
  font-weight: 600;
}

.brand-mark {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--primary), var(--primary-700));
  display: inline-block;
}

.brand-mark-light {
  background: linear-gradient(135deg, #fff, #cde5d9);
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.whatsapp-float {
  position: fixed;
  bottom: 18px;
  right: 18px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.4);
  display: grid;
  place-items: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float img {
  width: 26px;
  height: 26px;
  filter: invert(1);
}

.whatsapp-float:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(37, 211, 102, 0.5);
}

#listado .btn,
#destacados .btn {
  white-space: nowrap;
}

.filter-chip {
  background: var(--sand);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status-badge {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  padding: 6px 10px;
  border-radius: 999px;
}

.status-venta {
  background: linear-gradient(135deg, #2f6f51, #275b42);
}

.status-renta {
  background: linear-gradient(135deg, #1b6fa8, #15527c);
}

.form-label {
  font-weight: 600;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.15rem rgba(47, 111, 81, 0.18);
}

.modal-content {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.invalid-feedback {
  font-size: 0.9rem;
}

#faq .accordion-button:not(.collapsed) {
  background: var(--primary-100);
  color: var(--primary-700);
  box-shadow: none;
}

footer {
  background: #0f1613;
}

@media (max-width: 991px) {
  .property-card img {
    height: 200px;
  }
}

/* Estilos para la galería de imágenes */
#galleryModal .modal-content {
  background: #000;
  border: none;
}

#galleryModal .modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-image {
  max-height: 70vh;
  object-fit: contain;
  background: #000;
}

#galleryCarousel .carousel-control-prev,
#galleryCarousel .carousel-control-next {
  width: 50px;
  height: 50px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  opacity: 0.8;
  transition: opacity 0.3s ease, background 0.3s ease;
}

#galleryCarousel .carousel-control-prev:hover,
#galleryCarousel .carousel-control-next:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.3);
}

#galleryCarousel .carousel-control-prev {
  left: 20px;
}

#galleryCarousel .carousel-control-next {
  right: 20px;
}

#galleryCarousel .carousel-indicators {
  margin-bottom: 20px;
}

#galleryCarousel .carousel-indicators button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  margin: 0 4px;
}

#galleryCarousel .carousel-indicators button.active {
  background: var(--primary);
}

@media (max-width: 991px) {
  .property-card img {
    height: 200px;
  }
  
  .gallery-image {
    max-height: 60vh;
  }
  
  #galleryCarousel .carousel-control-prev,
  #galleryCarousel .carousel-control-next {
    width: 40px;
    height: 40px;
  }
  
  #galleryCarousel .carousel-control-prev {
    left: 10px;
  }
  
  #galleryCarousel .carousel-control-next {
    right: 10px;
  }
}

/* Estilos para el mapa */
#propertyMap {
  border-radius: 0;
  z-index: 1;
}

#mapModal .modal-body {
  overflow: hidden;
}

#mapModal .modal-content {
  border-radius: var(--radius);
}

#mapDirectionsLink {
  text-decoration: none;
}

@media (max-width: 991px) {
  #propertyMap {
    height: 400px !important;
  }
}

/* Estilos para paginación */
.pagination {
  margin-bottom: 0;
}

.pagination .page-link {
  color: var(--primary);
  border-color: var(--primary-100);
}

.pagination .page-link:hover {
  background-color: var(--primary-100);
  border-color: var(--primary);
  color: var(--primary-700);
}

.pagination .page-item.active .page-link {
  background-color: var(--primary);
  border-color: var(--primary);
  color: white;
}

.pagination .page-item.disabled .page-link {
  color: var(--muted);
  background-color: #f8f9fa;
  border-color: #dee2e6;
  cursor: not-allowed;
}

/* Estilos para botones de compartir */
.share-buttons {
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.property-card:hover .share-buttons {
  opacity: 1;
}

.share-btn {
  color: var(--muted);
  padding: 4px !important;
  min-width: auto;
  border: none;
  background: transparent;
  transition: color 0.2s ease, transform 0.2s ease;
}

.share-btn:hover {
  color: var(--primary);
  transform: scale(1.1);
}

.share-btn svg {
  display: block;
}

@media (max-width: 575px) {
  .whatsapp-float {
    right: 12px;
    bottom: 12px;
  }
  
  .gallery-image {
    max-height: 50vh;
  }
  
  #galleryCarousel .carousel-control-prev,
  #galleryCarousel .carousel-control-next {
    width: 35px;
    height: 35px;
  }
  
  #propertyMap {
    height: 350px !important;
  }
  
  .share-buttons {
    opacity: 1;
  }
  
  .pagination .page-link {
    padding: 0.375rem 0.5rem;
    font-size: 0.875rem;
  }
}

