/* ==========================================================================
   CasaNova - Estilos generales
   ========================================================================== */

:root {
  --cn-primary: #0f4c5c;
  --cn-primary-dark: #0a3540;
  --cn-accent: #d4a24c;
  --cn-accent-dark: #b9863a;
  --cn-light-bg: #f6f8f9;
  --cn-text-dark: #1c2b30;
  --cn-radius: 16px;
}

* {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  color: var(--cn-text-dark);
  background-color: var(--cn-light-bg);
}

h1, h2, h3, h4, h5, .navbar-brand {
  font-family: "Poppins", sans-serif;
}

/* ===== Botones y colores de marca ===== */
.btn-primary {
  background-color: var(--cn-primary);
  border-color: var(--cn-primary);
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--cn-primary-dark);
  border-color: var(--cn-primary-dark);
}
.btn-outline-primary {
  color: var(--cn-primary);
  border-color: var(--cn-primary);
}
.btn-outline-primary:hover {
  background-color: var(--cn-primary);
  border-color: var(--cn-primary);
}
a { color: var(--cn-primary); }
.btn {
  border-radius: 10px;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.btn-primary:hover { box-shadow: 0 8px 20px rgba(15, 76, 92, 0.3); }
.btn-success:hover { box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35); }
.btn:active { transform: translateY(1px); }

/* ===== ETIQUETA "EYEBROW" (encabezados de sección) ===== */
.eyebrow {
  display: inline-block;
  color: var(--cn-accent-dark);
  background: rgba(212, 162, 76, 0.14);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
  margin-bottom: 0.75rem;
}

/* ===== ANIMACIÓN DE APARICIÓN AL HACER SCROLL ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== NAVBAR ===== */
#mainNavbar {
  background-color: rgba(10, 30, 38, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease, backdrop-filter 0.3s ease;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}
#mainNavbar.scrolled {
  background-color: var(--cn-primary);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.navbar-brand {
  font-weight: 700;
  font-size: 1.4rem;
  color: #fff !important;
}
.navbar-brand span { color: var(--cn-accent); }
.navbar-brand i { color: var(--cn-accent); }
.navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}
.navbar-nav .nav-link:hover { color: var(--cn-accent); }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 92vh;
  background: url("https://images.unsplash.com/photo-1600607687920-4e2a09cf159d?auto=format&fit=crop&w=1600&q=80") center center / cover no-repeat;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 30, 38, 0.75) 0%, rgba(10, 30, 38, 0.55) 45%, rgba(15, 76, 92, 0.9) 100%);
}
.hero-title {
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.4rem);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
.hero-subtitle {
  max-width: 640px;
  font-size: 1.1rem;
  opacity: 0.95;
}
.hero-search {
  max-width: 950px;
  border-radius: var(--cn-radius);
  border-top: 4px solid var(--cn-accent);
}

/* ===== FILTROS ===== */
.filters-card {
  border-radius: var(--cn-radius);
  top: 100px;
}
.price-value-badge {
  background: rgba(15, 76, 92, 0.08);
  color: var(--cn-primary);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.2rem 0.65rem;
  border-radius: 50px;
}

/* Slider doble de precio: track con relleno + thumbs personalizados */
.price-range-wrapper {
  position: relative;
  height: 34px;
}
.price-range-track {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 6px;
  background: #e6eaec;
  border-radius: 4px;
  transform: translateY(-50%);
}
.price-range-fill {
  position: absolute;
  top: 0;
  height: 100%;
  left: 0;
  right: 0;
  background: linear-gradient(90deg, var(--cn-accent), var(--cn-primary));
  border-radius: 4px;
}
.price-range-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 34px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  pointer-events: none;
}
.price-range-input:focus { outline: none; }
.price-range-input::-webkit-slider-runnable-track {
  -webkit-appearance: none;
  background: transparent;
  height: 34px;
}
.price-range-input::-moz-range-track {
  background: transparent;
  height: 34px;
  border: none;
}
.price-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  pointer-events: all;
  width: 20px;
  height: 20px;
  margin-top: 7px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--cn-primary);
  box-shadow: 0 2px 8px rgba(15, 30, 40, 0.3);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.price-range-input::-moz-range-thumb {
  pointer-events: all;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--cn-primary);
  box-shadow: 0 2px 8px rgba(15, 30, 40, 0.3);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.price-range-input:hover::-webkit-slider-thumb,
.price-range-input:active::-webkit-slider-thumb {
  transform: scale(1.2);
  border-color: var(--cn-accent);
}
.price-range-input:hover::-moz-range-thumb,
.price-range-input:active::-moz-range-thumb {
  transform: scale(1.2);
  border-color: var(--cn-accent);
}

.price-presets { }
.price-preset-btn {
  background: #f1f3f4;
  border: 1px solid #e6eaec;
  border-radius: 50px;
  padding: 0.3rem 0.75rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: #495057;
  transition: all 0.2s ease;
}
.price-preset-btn:hover {
  background: rgba(15, 76, 92, 0.08);
  border-color: var(--cn-primary);
  color: var(--cn-primary);
}
.price-preset-btn.active {
  background: var(--cn-primary);
  border-color: var(--cn-primary);
  color: #fff;
}

/* ===== SECTION TITLES ===== */
.section-title {
  font-weight: 700;
  color: var(--cn-text-dark);
}

/* ===== TARJETAS DE PROPIEDADES ===== */
.property-card {
  border: none;
  border-radius: var(--cn-radius);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 30, 40, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  height: 100%;
}
.property-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 30px rgba(15, 30, 40, 0.18);
}
.property-img-wrapper {
  position: relative;
  overflow: hidden;
  height: 220px;
}
.property-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.property-card:hover .property-img-wrapper img {
  transform: scale(1.08);
}
.property-type-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--cn-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
}
.property-operation-badge {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--cn-accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.3rem 0.65rem;
  border-radius: 50px;
}
.favorite-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #b0b0b0;
  transition: transform 0.2s ease, color 0.2s ease;
  cursor: pointer;
}
.favorite-btn:hover { transform: scale(1.12); }
.favorite-btn.active { color: #e63946; }

.badge-featured {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(212, 162, 76, 0.15);
  color: var(--cn-accent-dark);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 50px;
  margin-bottom: 0.5rem;
}

.property-price {
  color: var(--cn-primary);
  font-weight: 800;
  font-size: 1.35rem;
}
.property-location {
  color: #6c757d;
  font-size: 0.92rem;
}
.property-features {
  font-size: 0.88rem;
  color: #495057;
  border-top: 1px solid #eef0f1;
  padding-top: 0.75rem;
  margin-top: 0.75rem;
}
.property-features i { color: var(--cn-primary); }

/* ===== BENEFICIOS ===== */
.benefits {
  background: linear-gradient(180deg, #ffffff 0%, #eef3f4 100%);
}
.benefit-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(15, 76, 92, 0.1);
  color: var(--cn-primary);
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}
.benefit-icon:hover { transform: scale(1.08) rotate(-4deg); }

/* ===== ESTADÍSTICAS ===== */
.stats-section {
  background: linear-gradient(135deg, var(--cn-primary) 0%, var(--cn-primary-dark) 100%);
}
.stat-item i { color: var(--cn-accent); font-size: 1.7rem; }
.stat-number {
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  font-size: 2.3rem;
  color: #fff;
  line-height: 1.2;
}
.stat-label {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ===== CONTACTO ===== */
.contact-info li {
  margin-bottom: 0.85rem;
  color: #495057;
}
.contact-info i {
  color: var(--cn-primary);
  width: 22px;
}
.contact-info a {
  color: inherit;
  text-decoration: none;
}
.contact-info a:hover {
  color: var(--cn-accent-dark);
  text-decoration: underline;
}

/* ===== FOOTER ===== */
.footer { background: var(--cn-primary-dark); }
.footer-links li { margin-bottom: 0.5rem; color: rgba(255,255,255,0.65); font-size: 0.92rem; }
.footer-links a { color: rgba(255,255,255,0.75); text-decoration: none; }
.footer-links a:hover { color: var(--cn-accent); }
.social-icon {
  display: inline-flex;
  transition: color 0.2s ease, transform 0.2s ease;
}
.social-icon:hover {
  color: var(--cn-accent) !important;
  transform: translateY(-3px);
}

/* ===== BOTÓN FLOTANTE WHATSAPP ===== */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
  z-index: 1050;
  animation: pulse-wa 2.2s infinite;
}
.whatsapp-float:hover { color: #fff; transform: scale(1.08); }
@keyframes pulse-wa {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55); }
  70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ===== MODAL ===== */
#modalBody .modal-property-img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 12px;
}
#modalBody .modal-feature {
  background: var(--cn-light-bg);
  border-radius: 10px;
  padding: 0.75rem;
  text-align: center;
}
#modalBody .modal-feature i {
  color: var(--cn-primary);
  font-size: 1.2rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991.98px) {
  .filters-card { position: static; }
  .hero { min-height: auto; padding-top: 6rem; padding-bottom: 3rem; }
}
