/* =========================================
   IDU IMÓVEIS — Homepage Styles
   Estilos específicos para a página inicial
   ========================================= */

/* === HERO SECTION === */
.hero {
  background-image: url('../img/idu-img-topo.jpeg');
  background-size: cover;
  background-position: center;
  min-height: 550px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  position: relative;
}

.hero-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 0;
}

.hero h1 {
  color: var(--white);
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
  max-width: 700px;
  z-index: 1;
}

/* === PROPERTIES SECTION === */
.properties-section {
  padding: 60px 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.section-header h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-dark);
}

.slider-nav {
  display: flex;
  gap: 6px;
}

/* === SWIPER CARDS CAROUSEL === */
.cards-swiper {
  overflow: hidden;
  padding: 4px 0 10px;
}

.cards-swiper .swiper-slide {
  height: auto;
}

.cards-swiper .swiper-slide .card {
  border: none;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  border-radius: 14px !important;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
  background: var(--white, #fff);
}

.cards-swiper .swiper-slide .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

/* === CARD IMAGE === */
.cards-swiper .card .carousel,
.cards-swiper .card .carousel-inner {
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

.cards-swiper .card .carousel-item {
  height: 220px;
}

.cards-swiper .card .carousel-inner img,
.cards-swiper .card .imgAluga {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.cards-swiper .card .nome-sobre-imagem {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary-red);
  color: white;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* === ENHANCED CARD BODY === */
.cards-swiper .card .card-body {
  padding: 16px 18px 14px;
  display: flex;
  flex-direction: column;
}

.cards-swiper .card .card-body-enhanced {
  gap: 0;
}

.cards-swiper .card .card-info {
  cursor: pointer;
}

.cards-swiper .card .card-location {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 3px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cards-swiper .card .card-street {
  font-size: 13px;
  color: #888;
  margin: 0 0 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cards-swiper .card .card-features {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.cards-swiper .card .card-features span {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: #555;
  font-weight: 500;
}

.cards-swiper .card .card-features span i {
  font-size: 14px;
  color: #888;
}

.cards-swiper .card .card-price-label {
  font-size: 12px;
  color: #999;
  margin: 0;
  line-height: 1.3;
}

.cards-swiper .card .card-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 3px 0 0;
  line-height: 1.2;
}

/* === CARD ACTIONS BAR === */
.cards-swiper .card .card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  margin-top: 14px;
  border-top: none;
}

.cards-swiper .card .btn-fav-card {
  background: none;
  border: 1.5px solid #ddd;
  cursor: pointer;
  width: 42px;
  height: 42px;
  min-width: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 18px;
  color: var(--primary-red);
  transition: all 0.2s;
  line-height: 1;
  padding: 0;
}

.cards-swiper .card .btn-fav-card:hover {
  border-color: var(--primary-red);
  background: rgba(229, 57, 53, 0.05);
}

.cards-swiper .card .btn-fav-card.favoritado {
  color: var(--primary-red);
  border-color: var(--primary-red);
  background: rgba(229, 57, 53, 0.08);
}

.cards-swiper .card .btn-fav-card:active {
  transform: scale(1.1);
}

.cards-swiper .card .btn-msg-card {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  background: var(--primary-red);
  color: white;
  border: none;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
  text-align: center;
}

.cards-swiper .card .btn-msg-card:hover {
  background: var(--primary-red-hover, #c92f3d);
  color: white;
  text-decoration: none;
}

/* === FALLBACK: Original card body (before JS enhancement) === */
.cards-swiper .card .card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 4px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cards-swiper .card .textoescricao {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 4px 0 8px;
}

.cards-swiper .card .caixaFilho01 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.cards-swiper .card .caixaIcone01 {
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px solid var(--border-color);
  padding-top: 8px;
  margin-top: 4px;
}

.cards-swiper .card .caixaIcone01 .icone {
  width: 20px;
  height: 20px;
  opacity: 0.6;
}

.cards-swiper .card .heart {
  font-size: 20px;
  cursor: pointer;
  color: var(--text-light);
}

.cards-swiper .card .heart:hover {
  color: var(--primary-red);
}

/* Inner Bootstrap carousel controls (image carousel inside each card) */
.cards-swiper .carousel-control-prev,
.cards-swiper .carousel-control-next {
  width: 30px;
  height: 30px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 3;
}

.cards-swiper .card:hover .carousel-control-prev,
.cards-swiper .card:hover .carousel-control-next {
  opacity: 1;
}

.cards-swiper .carousel-control-prev {
  left: 8px;
}

.cards-swiper .carousel-control-next {
  right: 8px;
}

.cards-swiper .carousel-control-prev-icon,
.cards-swiper .carousel-control-next-icon {
  width: 14px;
  height: 14px;
  filter: invert(1) grayscale(100) brightness(0);
}

.cards-swiper .carousel-indicators {
  margin-bottom: 5px;
}

.cards-swiper .carousel-indicators button {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: none;
  opacity: 0.5;
}

.cards-swiper .carousel-indicators button.active {
  opacity: 1;
}

/* Swiper navigation buttons (section header) */
.slider-nav .swiper-nav-prev,
.slider-nav .swiper-nav-next {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-light);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.slider-nav .swiper-nav-prev:hover,
.slider-nav .swiper-nav-next:hover {
  background: var(--text-dark);
  color: var(--white);
  border-color: var(--text-dark);
}

.slider-nav .swiper-button-disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.slider-nav .swiper-button-disabled:hover {
  background: transparent;
  color: var(--text-light);
  border-color: var(--border-color);
}

/* === ABOUT BANNER === */
.about-banner {
  padding: 60px 0;
  position: relative;
}

.about-wrapper {
  display: flex;
  background: url('../img/idu-img-institucional.jpeg') center/cover no-repeat;
  border-radius: var(--radius-lg);
  min-height: 450px;
  max-width: 50%;
  position: relative;
  align-items: center;
  overflow: hidden;
  margin-left: auto;
}

.about-box {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius-lg);
  width: 50%;
  max-width: 600px;
  position: absolute;
  left: 3%;
  top: 25%;
  z-index: 2;
  box-shadow: var(--shadow-about);
}

.about-box .logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-red);
  margin-bottom: 10px;
}

/* === AUTOCOMPLETE (home-specific) === */
.autocomplete-list {
  position: absolute;
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
  max-height: 200px;
  overflow-y: auto;
  z-index: 9999;
  top: 100%;
  left: 0;
}

.autocomplete-list .autocomplete-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
}

.autocomplete-list .autocomplete-item:hover {
  background-color: var(--light-bg);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .hero {
    height: 550px;
  }

  .hero h1 {
    font-size: 22px;
    margin-bottom: 40px;
  }

  .about-wrapper {
    height: auto;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    width: 100%;
    margin: 0;
    max-width: none;
  }

  .about-box {
    position: absolute;
    width: 100%;
    left: 0;
    bottom: -5%;
    padding: 20px;
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius-lg);
    top: auto;
  }

  .properties-section {
    padding: 80px 20px 40px 20px;
  }

  .section-header h2 {
    font-size: 18px;
  }

  /* On touch devices, always show carousel controls */
  .cards-swiper .carousel-control-prev,
  .cards-swiper .carousel-control-next {
    opacity: 0.8;
  }

  .cards-swiper .card .card-price {
    font-size: 16px;
  }
}
