/* Importar fuentes de Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&family=Poppins:wght@500;700&display=swap");

/* Agrega margen arriba al body para no quedar oculto bajo el header */
body {
  font-family: "Open Sans", sans-serif;
  background-color: #f8f9f9;
  padding-top: 100px; /* Ajustar según el alto de la navbar */
  color: #0b6ac9;
  line-height: 1.6;
  margin-top: 100; /* este valor debe ser igual o mayor que la altura del header */
}

/*.bg-primary1 {
  background-color: white;
}*/

/* nav {
  margin-top: 40px;
} */

.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1030; /* Nivel recomendado para navbars con Bootstrap */
}

.navbar-collapse {
  background-color: #ffffff; /* Fondo para que no se superponga el contenido */
  z-index: 1029;
}

.navbar-toggler {
  z-index: 1031; /* Para que siempre quede encima de la barra, no encima del menú */
}

nav a {
  color: rgb(193, 66, 7);
  margin-right: 20px;
  text-decoration: none;
  font-weight: 600;
}

.navbar-toggler-icon {
  filter: invert(1);
}

nav a:hover {
  text-decoration: underline;
}

/* HEADER FIJO */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #2e86c1;
  color: white;
  padding: 20px 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header {
  background-color: #2e86c1;
  color: white;
  padding: 20px 0;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

header h1 {
  font-family: "Poppins", sans-serif;
  font-size: 28px;
}

/* FLEXBOX PARA HEADER */
.header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* BLOQUES DEL HEADER */
.header-left h1 {
  font-size: 24px;
  margin: 0;
}

.header-center {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex: 1;
}

.header-center a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
}

.header-right {
  display: flex;
  gap: 10px;
}

.header-right img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1); /* blanco */
  transition: transform 0.2s ease;
}

.header-right img:hover {
  transform: scale(1.1);
}

/* HERO */
.hero {
  background: url("https://images.unsplash.com/photo-1505691938895-1758d7feb511?auto=format&fit=crop&w=1950&q=80")
    center/cover no-repeat;
  height: 85vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.buscador {
  display: flex;
  background: white;
  border-radius: 5px;
  padding: 0.5rem;
  margin-top: 1rem;
  gap: 0.5rem;
}

.buscador select,
.buscador input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.buscador button {
  background: var(--color-principal);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .buscador {
    flex-direction: column;
  }
}

/* HERO NOSOTROS */
:root {
  --verde-principal: #1a5d3b;
  --verde-claro: #eaf5ef;
  --texto-principal: #1f2933;
  --texto-secundario: #4b5563;
}

body {
  background-color: #f8fafc;
  color: var(--texto-principal);
}

.section {
  padding: 4.5rem 0;
  background-color: #ffffff;
}

.section-alt {
  padding: 4.5rem 0;
  background-color: var(--verde-claro);
}

h2.section-title {
  font-weight: 700;
  color: var(--verde-principal);
  margin-bottom: 1rem;
}

.section p {
  color: var(--texto-secundario);
  font-size: 1.05rem;
}

/* HERO */
.nosotros-hero {
  background: linear-gradient(120deg, #1a5d3b, #3aa55d);
  color: #fff;
  padding: 6rem 1rem;
  text-align: center;
}

.nosotros-hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
}

.nosotros-hero p {
  font-size: 1.2rem;
  opacity: 0.95;
}

/* ICON CARDS */
.icon-card {
  background: #fff;
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  height: 100%;
}

.icon-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.icon-card i {
  font-size: 2.5rem;
  color: var(--verde-principal);
  margin-bottom: 15px;
}

/* FADE IN */
.fade-in {
  opacity: 0;
  transform: translateY(25px);
  transition:
    opacity 0.9s ease,
    transform 0.9s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* TEAM */
.team-card img {
  border-radius: 16px;
  height: 280px;
  object-fit: cover;
}

.team-card h5 {
  margin-top: 15px;
  font-weight: 600;
}

/* CTA */
.cta {
  background: linear-gradient(120deg, #1a5d3b, #3aa55d);
  color: white;
  text-align: center;
  padding: 4rem 1rem;
}

/* FOOTER */
footer {
  background-color: #2e86c1;
  color: white;
  padding: 20px 0;
  text-align: center;
  font-size: 12px;
}

/* === PROPIEDADES DESTACADAS DINÁMICAS === */
.propiedades {
  padding: 60px 20px;
  text-align: center;
}

.propiedades h2 {
  font-size: 2.2rem;
  margin-bottom: 35px;
  font-weight: 700;
  color: #1a1a1a;
}

.propiedades .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  max-width: 1200px;
  margin: auto;
}

.propiedades .card {
  background: #fff;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: 0.3s ease;
  display: block;
}

.propiedades .card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.propiedades .img-container {
  height: 190px;
  overflow: hidden;
}

.propiedades img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  transition: 0.4s ease;
}

.propiedades .card:hover img {
  transform: scale(1.07);
}

.propiedades .info {
  padding: 18px;
  text-align: left;
}

.propiedades .info h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

.propiedades .info p {
  color: #666;
  margin: 4px 0 10px;
}

.propiedades .ver-mas {
  color: #0077ff;
  font-weight: bold;
  display: inline-block;
  transition: 0.3s ease;
}

.propiedades .card:hover .ver-mas {
  margin-left: 4px;
}

.property-card {
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.property-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Badge de estado */
.estado-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: bold;
  color: white;
  text-transform: uppercase;
  z-index: 10;
}

/* Colores según estado */
.estado-badge.disponible {
  background-color: #28a745; /* Verde */
}

.estado-badge.apartada {
  background-color: #ffc107; /* Amarillo */
  color: #222;
}

.estado-badge.vendida {
  background-color: #dc3545; /* Rojo */
} /* Animación Fade-In */
.fade-in {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeIn 0.6s ease forwards;
}

.property-card,
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.property-card img {
  width: 100%;
  height: 220px; /* Ajusta la altura como prefieras */
  object-fit: cover; /* Recorta la imagen sin deformarla */
  border-radius: 10px;
  display: block;
}

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

/* ========================= */
/* 🌐 RESPONSIVE DESIGN 📱 */
/* ========================= */

@media (max-width: 768px) {
  header h1 {
    font-size: 22px;
    text-align: center;
  }

  .header-flex {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .header-left,
  .header-right {
    text-align: center;
  }

  .header-center {
    justify-content: center;
    flex-wrap: wrap;
  }

  nav {
    text-align: center;
    margin-top: 10px;
  }

  nav a {
    display: inline-block;
    margin: 10px 10px;
    font-size: 16px;
  }

  .hero {
    padding: 40px 20px;
  }

  .hero h2 {
    font-size: 24px;
  }

  .hero p {
    font-size: 16px;
  }

  .destacadas h3 {
    font-size: 20px;
    margin-bottom: 10px;
  }

  footer {
    font-size: 13px;
    padding: 15px 10px;
  }
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.custom-navbar {
  position: fixed !important;
  top: 0;
  width: 100%;
  z-index: 2000;
  background-color: white; /* IMPORTANTE para que no sea transparente */
  border-bottom: 1px solid #ddd; /* Opcional, se ve más profesional */
}

/* NAVBAR con logo circular fusionado */
.custom-navbar {
  position: relative;
  background-color: #ffffff; /* Azul principal */
  color: rgb(48, 9, 205);
  z-index: 10;
  overflow: visible;
}

/* Círculo del logo que sobresale */
.logo-circle {
  position: absolute;
  left: 30px;
  top: 115%;
  transform: translateY(-50%);
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.logo-circle a {
  text-decoration: none;
}

.logo-img {
  width: 85%;
  height: 85%;
  object-fit: contain;
}

/* Ajustes del texto y navegación */
.navbar-brand {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  margin-left: 170px; /* separa el texto del logo circular */
  color: black;
}

.nav-link {
  font-weight: 600;
  font-size: 0.8rem;
  color: black;
}

.nav-link:hover {
  text-decoration: underline;
}

/* Ajustes responsive */
@media (max-width: 768px) {
  .logo-circle {
    width: 80px;
    height: 80px;
    left: 10px;
  }

  .navbar-brand {
    margin-left: 100px;
    font-size: 1.2rem;
  }

  .nav-link {
    font-size: 0.9rem;
  }

  .navbar-toggler-icon {
    filter: invert(1); /* Icono blanco */
  }
}

/* Detalles */

.property-icons i {
  margin-right: 8px;
}

.main-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 8px;
}

.carousel-item img {
  height: 250px;
  object-fit: cover;
}

.topbar {
  background-color: #0a80e1;
  color: rgb(13, 11, 11);
  padding: 6px 15px;
  font-size: 14px;
  position: fixed;
  top: 0;
  width: 100%;
}

.topbar a {
  color: #0A6AC9(0, 0, 0);
  text-decoration: none;
}

.topbar a:hover {
  color: #000000;
}

.topbar .btn {
  font-size: 13px;
  padding: 4px 10px;
}

.btn-outline-light {
  color: black;
}

/* Sección Créditos */
.creditos-section {
  padding: 60px 20px;
  background: #f7f7f7;
  text-align: center;
}

.creditos-title {
  font-size: 28px;
  margin-bottom: 30px;
  font-weight: 700;
  color: #151515;
}

/* Layout tipo grid - Desktop */
.creditos-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 20px;
}

.credito-card {
  min-width: 250px;
  max-width: 280px;
  background: #ffffff;
  border-radius: 18px;
  padding: 25px;
  box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  scroll-snap-align: center;
}

.credito-card:hover {
  transform: translateY(-6px);
  box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.15);
}

.credito-card h3 {
  margin-bottom: 12px;
  font-size: 20px;
  color: #0a4b78;
  font-weight: 700;
}

.credito-card p {
  font-size: 13px;
  color: #555;
  line-height: 1.4em;
}

/* Ocultar scroll visual en móvil */
.creditos-container::-webkit-scrollbar {
  height: 6px;
}
.creditos-container::-webkit-scrollbar-thumb {
  background: transparent;
}

/* Móvil: se vuelve carrusel automático */
@media (max-width: 768px) {
  .creditos-container {
    justify-content: flex-start;
  }
}

/* FORMULARIO */
.contacto {
  padding: 2rem 2rem;
  text-align: center;
}

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

.contacto input,
.contacto select,
.contacto textarea {
  padding: 0.7rem;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.contacto button {
  background: var(--color-principal);
  color: white;
  border: none;
  padding: 0.8rem;
  border-radius: 5px;
  font-size: 0.8rem;
  cursor: pointer;
}

/* TESTIMONIOS */
.testimonials-wrapper {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.testimonials-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: scrollTestimonials 25s linear infinite;
}

.testimonial-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  width: 260px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  text-align: center;
  flex-shrink: 0;
}

.testimonial-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
}

.testimonial-stars {
  color: #ffc107;
  font-size: 1.2rem;
  margin-bottom: 8px;
}

@keyframes scrollTestimonials {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.testimonials-wrapper:hover .testimonials-track {
  animation-play-state: paused;
}

/* Desktop: center and show more spacing, enable track as inline center */
@media (min-width: 992px) {
  .testimonials-track {
    justify-content: center;
  }
  .testimonial-card {
    min-width: 320px;
    max-width: 360px;
  }
}

/* Hide scrollbar graceful */
.testimonials-wrapper::-webkit-scrollbar {
  height: 8px;
}
.testimonials-wrapper::-webkit-scrollbar-thumb {
  background: rgba(11, 58, 87, 0.12);
  border-radius: 8px;
}

.banner-predial {
  position: relative;
  background: url("img/banner-predial.jpg") center / cover no-repeat;
  border-radius: 18px;
  margin: 4rem auto;
  max-width: 1200px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.banner-predial-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(26, 93, 59, 0.95),
    rgba(0, 0, 0, 0.55)
  );
}

.banner-predial-content {
  position: relative;
  z-index: 2;
  padding: 3.5rem 4rem;
  color: #fff;
  max-width: 600px;
}

.banner-predial h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.banner-predial p {
  font-size: 1.05rem;
  opacity: 0.95;
  line-height: 1.6;
}

.banner-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.btn-predial {
  display: inline-block;
  margin-top: 1.5rem;
  background: #fff;
  color: #1a5d3b;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-predial:hover {
  background: #e6f4ec;
  transform: translateY(-2px);
}

.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #333;
  color: #fff;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
  z-index: 9999;
  max-width: 320px;
}

.toast.success {
  background: #198754;
}
.toast.error {
  background: #dc3545;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.hidden {
  display: none;
}
