/* =============================================
   Güenumil Inmobiliaria — home.css
   Estilos específicos de la página de inicio
   ============================================= */

/* --- HERO --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?w=1920&q=80');
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      rgba(27, 58, 75, 0.4) 0%,
      rgba(27, 58, 75, 0.65) 50%,
      rgba(27, 58, 75, 0.88) 100%);
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-top: 6rem;
  padding-bottom: 4rem;
}

.hero__tagline {
  margin-bottom: 1rem;
}

.hero__title {
  color: var(--c-white);
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
}

.hero__subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 540px;
  margin: 0 auto 2.5rem;
}

/* --- Search Bar Hero --- */
.search-bar {
  display: flex;
  align-items: center;
  background: rgba(6, 14, 26, 0.75);
  border: 1.5px solid rgba(200, 150, 62, 0.55);
  border-radius: 60px;
  padding: 6px 6px 6px 8px;
  gap: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(200, 150, 62, 0.15);
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
}

.search-bar__select,
.search-bar__input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 10px 16px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  min-width: 0;
}

.search-bar__select option {
  background: #0a1628;
  color: #ffffff;
}

.search-bar__select::placeholder,
.search-bar__input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.search-bar__select:not(:last-of-type),
.search-bar__input {
  border-right: 1px solid rgba(200, 150, 62, 0.3);
}

.search-bar__btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #C8963E 0%, #e8b96a 50%, #C8963E 100%);
  color: #060e1a;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 50px;
  padding: 10px 24px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
  box-shadow: 0 2px 12px rgba(200, 150, 62, 0.4);
  flex-shrink: 0;
}

.search-bar__btn:hover {
  background: linear-gradient(135deg, #e8b96a 0%, #C8963E 100%);
  box-shadow: 0 4px 20px rgba(200, 150, 62, 0.6);
  transform: translateY(-1px);
}

.search-bar__btn svg {
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .search-bar {
    flex-direction: column;
    border-radius: 16px;
    padding: 12px;
    gap: 8px;
  }

  .search-bar__select,
  .search-bar__input {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(200, 150, 62, 0.25);
    padding: 10px 12px;
  }

  .search-bar__select:last-of-type,
  .search-bar__input {
    border-bottom: none;
  }

  .search-bar__btn {
    width: 100%;
    justify-content: center;
  }
}

/* --- CARDS GRID (destacados) --- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* --- PROPERTY CARD --- */
.prop-card {
  background: var(--c-white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: box-shadow var(--t-base), transform var(--t-base);
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: inherit;
}

.prop-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
  color: inherit;
}

.prop-card__img-wrap {
  position: relative;
  width: 100%;
  padding-top: 62.5%;
  /* 16:10 */
  overflow: hidden;
  background: var(--c-cream);
}

.prop-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}

.prop-card:hover .prop-card__img {
  transform: scale(1.05);
}

.prop-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--c-gold);
  color: var(--c-white);
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: 4px;
}

.prop-card__body {
  padding: 1rem 1.25rem 1.25rem;
}

.prop-card__type {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--c-gold);
  margin-bottom: 0.375rem;
}

.prop-card__title {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--c-dark);
  margin-bottom: 0.375rem;
  line-height: 1.3;
}

.prop-card__location {
  font-size: 0.8125rem;
  color: var(--c-slate);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.prop-card__location svg {
  flex-shrink: 0;
}

.prop-card__footer {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(27, 58, 75, 0.06);
}

.prop-card__price-block {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.prop-card__price {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--c-navy);
}

.prop-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  font-size: 0.8rem;
  color: var(--c-slate);
}

.prop-card__meta span {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  white-space: nowrap;
}

/* Placeholder card (sin imagen) */
.prop-card__img-wrap--empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.prop-card__img-wrap--empty::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--c-cream) 0%, rgba(27, 58, 75, 0.06) 100%);
}

/* Empty state */
.cards-empty {
  padding: 2rem;
  text-align: center;
  color: var(--c-slate);
  font-size: 0.9375rem;
  background: var(--c-white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.cards-empty a {
  color: var(--c-gold);
  font-weight: 500;
}

/* --- SEC HEADER con link --- */
.sec-header {
  flex-wrap: wrap;
}

.sec-link {
  margin-left: auto;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-gold);
  transition: color var(--t-base);
}

.sec-link:hover {
  color: var(--c-navy);
}

.sec-header--center {
  justify-content: center;
}

/* --- CÓMO TRABAJAMOS --- */
.how-we-work {
  background: linear-gradient(180deg,
      #1B3A4B 0%,
      #0f2030 50%,
      #0a0f1a 100%);
  margin-bottom: 0;
  padding-bottom: 5rem;
}

.how-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .how-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }
}

.how-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.how-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(200, 150, 62, 0.15);
  color: var(--c-gold);
  margin-bottom: 1.25rem;
}

.how-card h3 {
  color: var(--c-white);
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

.how-card p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ====== POR QUÉ ELEGIRNOS ====== */
.why-us {
  padding: 5rem 0;
}

.why-us__header {
  max-width: 640px;
  margin: 0 auto 3.5rem;
}

.why-us__pretitle {
  display: block;
  margin-bottom: 0.75rem;
  letter-spacing: 2px;
}

.why-us__title {
  color: var(--c-dark);
  margin-bottom: 1rem;
}

.why-us__subtitle {
  color: var(--c-slate);
  font-size: 1.0625rem;
  line-height: 1.7;
  margin-bottom: 0;
}

.why-us__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .why-us__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .why-us__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Card base */
.why-us__card {
  background: var(--c-cream);
  border: 1px solid rgba(200, 150, 62, 0.2);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  transition: background 0.35s ease, border-color 0.35s ease,
    transform 0.35s ease, box-shadow 0.35s ease;
}

.why-us__card:hover {
  background: rgba(200, 150, 62, 0.06);
  border-color: rgba(200, 150, 62, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(200, 150, 62, 0.2);
}

/* Ícono */
.why-us__icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(200, 150, 62, 0.2) 0%, rgba(200, 150, 62, 0.08) 100%);
  border: 1px solid rgba(200, 150, 62, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  color: var(--c-gold);
  transition: background 0.35s ease, transform 0.35s ease;
}

.why-us__card:hover .why-us__icon-wrap {
  background: linear-gradient(135deg, rgba(200, 150, 62, 0.35) 0%, rgba(200, 150, 62, 0.15) 100%);
  transform: scale(1.08);
}

.why-us__card-title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--c-dark);
  margin-bottom: 0.625rem;
}

.why-us__card-text {
  font-size: 0.9375rem;
  color: var(--c-slate);
  line-height: 1.7;
  margin-bottom: 0;
}

/* === CAROUSEL === */
.cards-carousel {
  position: relative;
  margin: 0 -1.5rem;
}

@media (min-width: 768px) {
  .cards-carousel {
    margin: 0 -2rem;
  }
}

@media (min-width: 1024px) {
  .cards-carousel {
    margin: 0;
  }
}

.cards-scroll {
  --card-mobile-width: min(85vw, 340px);
  --cards-mobile-side: max(1.5rem, calc((100vw - var(--card-mobile-width)) / 2));
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--cards-mobile-side);
  -webkit-overflow-scrolling: touch;
  padding: 1rem var(--cards-mobile-side) 1.5rem;
  scrollbar-width: none;
}

@media (min-width: 768px) {
  .cards-scroll {
    --cards-mobile-side: max(2rem, calc((100vw - var(--card-mobile-width)) / 2));
    padding: 1rem var(--cards-mobile-side) 1.5rem;
  }
}

@media (min-width: 1024px) {
  .cards-scroll {
    padding: 1.25rem;
    scroll-padding-inline: 1.25rem;
  }
}

.cards-scroll::-webkit-scrollbar {
  display: none;
}

/* Card width dentro del carrusel — scoped para no afectar .cards-grid */
.cards-scroll .prop-card {
  scroll-snap-align: center;
  flex-shrink: 0;
  width: var(--card-mobile-width);
  max-width: 340px;
  min-width: 0;
}

@media (min-width: 640px) {
  .cards-scroll .prop-card {
    width: 340px;
  }
}

@media (min-width: 1024px) {
  .cards-scroll {
    overflow-x: hidden;
  }

  .cards-scroll .prop-card {
    scroll-snap-align: start;
    width: calc((100% - 2.5rem) / 3 + 2px);
    min-width: calc((100% - 2.5rem) / 3 + 2px);
    max-width: none;
    flex-shrink: 0;
  }
}

/* Botones de navegación */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--c-white);
  border: 1px solid rgba(200, 150, 62, 0.3);
  color: var(--c-navy);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transition: all 0.25s ease;
}

.carousel-btn:hover {
  background: var(--c-gold);
  color: var(--c-white);
  border-color: var(--c-gold);
  transform: translateY(-50%) scale(1.08);
}

.carousel-btn--prev {
  left: -20px;
}

.carousel-btn--next {
  right: -20px;
}

/* Solo mostramos flechas en desktop */
@media (min-width: 1024px) {
  .carousel-btn {
    display: flex;
  }
}

/* En secciones con fondo blanco, ajustar color del botón */
.section-alt .carousel-btn {
  background: var(--c-cream);
}

@media (max-width: 767px) {
  .hero__title {
    font-size: 1.75rem;
    line-height: 1.2;
  }

  .hero__subtitle {
    font-size: 0.9375rem;
  }

  .search-bar {
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 16px;
  }

  .search-bar__select,
  .search-bar__input {
    width: 100%;
  }

  .search-bar__btn {
    width: 100%;
    justify-content: center;
  }

  .sec-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .sec-link {
    margin-left: auto;
  }

  .section {
    padding: 2.5rem 0;
  }
}