/* ==========================================================================
   Herkules Apartment Listing — Card + Layout Styles
   ========================================================================== */

.hal-widget-wrapper {
  width: 100%;
}

/* ---- Grid layout ---- */
.hal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

@media (max-width: 1024px) {
  .hal-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .hal-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Carousel wrapper ---- */
.hal-carousel {
  position: relative;
}

.hal-carousel .swiper-slide {
  height: auto;
}

.hal-carousel .swiper-button-prev,
.hal-carousel .swiper-button-next {
  color: #1f8a70;
  background: #ffffff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(26, 35, 50, 0.15);
}

.hal-carousel .swiper-button-prev:after,
.hal-carousel .swiper-button-next:after {
  font-size: 16px;
  font-weight: 700;
}

.hal-carousel .swiper-pagination-bullet-active {
  background: #1f8a70;
}

/* ---- Card ----
   NOTE: Visual properties (colors, radius, shadow, spacing, typography) are
   intentionally NOT hardcoded here — they are controlled live from Elementor's
   Style tab (see class-apartment-listing-widget.php > register_controls > STYLE TAB).
   This file only provides the structural layout (flex/grid mechanics) plus a
   few safe fallback values in case a value hasn't been set yet. */

.hal-card {
  overflow: hidden;
  transition:
    box-shadow 0.3s ease,
    transform 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #ffffff; /* fallback, overridden by Style tab */
}

.hal-card-image {
  width: 100%;
  aspect-ratio: 4 / 3; /* fallback, overridden by Style tab (image_height) */
  overflow: hidden;
}

.hal-card-image img {
  width: 100%;
  height: 100%;
  display: block;
  transition:
    transform 0.4s ease,
    filter 0.3s ease;
}

.hal-card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.hal-card-title {
  margin: 0;
  line-height: 1.3;
}

.hal-card-title a {
  text-decoration: none;
  transition: color 0.2s ease;
}

.hal-card-meta {
  display: flex;
  flex-wrap: wrap;
}

.hal-meta-item {
  display: flex;
  align-items: center;
  flex: 1;
}

.hal-card-divider {
  width: 100%;
  margin-bottom: 18px; /* fallback */
}

.hal-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.hal-card-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.hal-arrow {
  font-size: 1em;
}

.hal-card-price {
  white-space: nowrap;
}

/* Cloned slides used to satisfy Swiper's loop-mode minimum slide count.
   Visually identical to real slides. Tab order for their links is removed
   via JS (see apartment-listing.js) since duplicate content shouldn't be
   announced twice to screen reader / keyboard users. */
.hal-duplicate-slide {
  pointer-events: auto;
}
.hal-load-more-wrapper {
  text-align: center;
  margin-top: 36px;
}

.hal-load-more-button {
  background: transparent;
  border: 2px solid #1f8a70;
  color: #1f8a70;
  font-size: 14px;
  font-weight: 600;
  padding: 13px 34px;
  border-radius: 50px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.hal-load-more-button:hover {
  background: #1f8a70;
  color: #ffffff;
}

.hal-load-more-button.hal-loading {
  opacity: 0.6;
  pointer-events: none;
}

.hal-load-more-button.hal-hidden {
  display: none;
}
