/* DDA design fixes for the home page & footer (loaded after the original site.css).
   Everything here overrides the verbatim original CSS on purpose: only variables from the original theme
   (--primary-color, --bg-card, --white, --text-muted, --border-color, --card-border-visible ...) are used so that
   light / dark themes and the CMS brand colour keep working. */

/* ==========================================================================
   1. Property cards in the home sliders (featured / ready / commercial / blog)
      Title (1 line) -> tagline (2 lines) -> price -> meta, fixed spacing, spare room goes to the bottom.
   ========================================================================== */
.site-main :is(.property-slider, .ready-slider, .commercial-slider) .property-card .property-content {
  gap: 0;
  padding: 22px 24px 24px;
}
.site-main :is(.property-slider, .ready-slider, .commercial-slider) .property-card .property-title {
  line-height: 1.3;
  font-size: clamp(1.05rem, 0.9rem + 0.35vw, 1.25rem);
}
.site-main :is(.property-slider, .ready-slider, .commercial-slider) .property-card .property-desc {
  margin: 8px 0 0;
  font-size: 0.85rem;
  line-height: 1.5;
  min-height: 2.55rem; /* two lines: keeps the price row aligned across cards, never a variable gap */
  -webkit-line-clamp: 2;
}
/* The details block follows the tagline directly (the original pushed it to the card bottom with margin-top:auto,
   which opened a big gap whenever another card in the row had longer text / a longer price). */
.site-main :is(.property-slider, .ready-slider, .commercial-slider) .property-card .property-details {
  margin-top: 14px;
  gap: 10px;
  flex: 0 0 auto;
}
/* No tagline: keep the room it would take so the price row still lines up with the other cards. */
.site-main :is(.property-slider, .ready-slider, .commercial-slider) .property-card .property-title + .property-details {
  margin-top: calc(14px + 8px + 2.55rem);
}
.site-main :is(.property-slider, .ready-slider, .commercial-slider) .property-card .property-price {
  margin: 0;
  line-height: 1.25;
  font-size: clamp(1.1rem, 0.62rem + 0.78vw, 1.4rem);
  overflow-wrap: anywhere; /* a very long price wraps instead of overflowing the card */
}
.site-main :is(.property-slider, .ready-slider, .commercial-slider) .property-card .property-card-status:empty {
  display: none; /* an empty status block would still add a flex gap */
}
.site-main :is(.property-slider, .ready-slider, .commercial-slider) .property-card .property-card-status {
  gap: 6px;
}
.site-main :is(.property-slider, .ready-slider, .commercial-slider) .property-card .property-meta-row {
  margin: 0;
  gap: 8px 22px;
}
.site-main :is(.property-slider, .ready-slider, .commercial-slider) .property-card .property-meta-location {
  margin: 0;
}

/* ==========================================================================
   2. Slider arrows (team slider + the "overflow" sliders of the home page / footer)
      44px round brand-coloured buttons, centred on the PHOTO of the cards, in the gutter beside the cards.
   ========================================================================== */
.team-section .team-slider-wrapper {
  --nav-top: calc(12px + 6px + 140px); /* wrapper padding-top + swiper padding-top + half of the 280px photo */
  padding: 12px 64px 0;
}
/* Room below the cards so their drop shadow is not cut off into a visible grey strip by the slider's overflow clip. */
.team-section .team-slider {
  padding-bottom: 40px;
}
.site-main .overflow-slider-wrapper .property-slider {
  padding-bottom: 40px !important;
  margin-bottom: -32px;
}
.overflow-slider-wrapper:has(.property-slider, .blogs-slider) {
  --nav-top: calc(4px + 110px); /* wrapper padding-top + half of the 220px card image */
}
.featured-properties .overflow-slider-wrapper:has(.property-slider) {
  --nav-top: calc(4px + 20px + 110px); /* + the 20px the featured slider adds above its cards */
}
.overflow-slider-wrapper:has(.footer-property-slider) {
  --nav-top: calc(4px + 65px); /* half of the 130px image of the footer property cards */
}
.overflow-slider-wrapper:has(.youtube-slider) {
  --nav-top: calc(4px + 80px); /* half of the 160px thumbnail */
}

.team-section .team-slider-wrapper .team-nav-btn,
.overflow-slider-wrapper .overflow-nav-btn {
  top: var(--nav-top, 50%);
  width: 44px;
  height: 44px;
  border: 0;
  background: var(--primary-color);
  color: var(--text-on-primary, #0a0b0d);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22), 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}
.team-section .team-slider-wrapper .team-nav-btn i,
.overflow-slider-wrapper .overflow-nav-btn i {
  font-size: 1rem;
  line-height: 1;
  color: inherit;
}
.team-section .team-slider-wrapper .team-nav-btn.team-prev i,
.overflow-slider-wrapper .overflow-nav-btn.overflow-prev i {
  margin-right: 2px; /* optical centring of the chevron */
}
.team-section .team-slider-wrapper .team-nav-btn.team-next i,
.overflow-slider-wrapper .overflow-nav-btn.overflow-next i {
  margin-left: 2px;
}
.team-section .team-slider-wrapper .team-nav-btn.team-prev {
  left: 8px;
}
.team-section .team-slider-wrapper .team-nav-btn.team-next {
  right: 8px;
}
.overflow-slider-wrapper .overflow-nav-btn.overflow-prev {
  left: 4px;
}
.overflow-slider-wrapper .overflow-nav-btn.overflow-next {
  right: 4px;
}
.team-section .team-slider-wrapper .team-nav-btn:hover:not(.is-disabled),
.overflow-slider-wrapper .overflow-nav-btn:hover:not(.is-disabled) {
  background: var(--primary-hover-color, var(--primary-color));
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28), 0 2px 5px rgba(0, 0, 0, 0.2);
}
.team-section .team-slider-wrapper .team-nav-btn:active:not(.is-disabled),
.overflow-slider-wrapper .overflow-nav-btn:active:not(.is-disabled) {
  transform: translateY(-50%) scale(0.95);
}
.team-section .team-slider-wrapper .team-nav-btn:focus-visible,
.overflow-slider-wrapper .overflow-nav-btn:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 3px;
}
.team-section .team-slider-wrapper .team-nav-btn.is-disabled,
.overflow-slider-wrapper .overflow-nav-btn.is-disabled {
  opacity: 0.4;
  box-shadow: none;
  cursor: not-allowed;
}

/* Tablet: slightly narrower gutter. */
@media (max-width: 992px) {
  .team-section .team-slider-wrapper {
    padding: 12px 58px 0;
  }
}

/* Phones: no gutter (it would squeeze the cards); the arrows sit on the photo, inset from the card edges. */
@media (max-width: 639px) {
  .team-section .team-slider-wrapper {
    padding: 12px 0 0;
  }
  .team-section .team-slider-wrapper .team-nav-btn.team-prev {
    left: 12px;
  }
  .team-section .team-slider-wrapper .team-nav-btn.team-next {
    right: 12px;
  }
  .site-main .overflow-slider-wrapper:not(.is-static):has(.property-slider, .blogs-slider, .youtube-slider) {
    padding-left: 0;
    padding-right: 0;
  }
  .overflow-slider-wrapper:has(.property-slider, .blogs-slider, .youtube-slider) .overflow-nav-btn.overflow-prev {
    left: 12px;
  }
  .overflow-slider-wrapper:has(.property-slider, .blogs-slider, .youtube-slider) .overflow-nav-btn.overflow-next {
    right: 12px;
  }
}

/* WhatsApp button of the team cards: always anchored to the bottom-right corner of the photo, in every state. */
.team-image-wrapper .whatsapp-float,
.team-image-wrapper .whatsapp-float:hover,
.team-image-wrapper .whatsapp-float:focus-visible,
.team-image-wrapper .whatsapp-float:active {
  position: absolute;
  top: auto;
  left: auto;
  right: 14px;
  bottom: 14px;
  margin: 0;
  transform: none;
  animation: none;
}
.team-image-wrapper .whatsapp-float:hover,
.team-image-wrapper .whatsapp-float:focus-visible {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.38);
}
.team-image-wrapper .whatsapp-float:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

/* ==========================================================================
   3. YouTube thumbnails: dark base (no grey box while loading / when blocked), alt text never rendered,
      branded placeholder when no rendition could be loaded (the red play icon comes from .youtube-play-overlay).
   ========================================================================== */
.youtube-section .youtube-thumb-wrapper {
  background: linear-gradient(135deg, #1b202c 0%, #0b0d12 100%);
}
.youtube-section .youtube-thumb-wrapper img {
  color: transparent;
  font-size: 0;
}
.youtube-section .youtube-thumb-fallback {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 15%, rgba(212, 175, 55, 0.14), transparent 55%),
    linear-gradient(135deg, #1b202c 0%, #0b0d12 100%);
}
.youtube-section .youtube-thumb-fallback span {
  position: absolute;
  left: 14px;
  bottom: 10px;
  font-family: 'Playfair Display', serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   4. Footer link columns (Developers / Communities / Property types), between the developer logos and the bottom bar.
   ========================================================================== */
.footer-links-block {
  margin: 44px 0 36px;
  padding-top: 44px;
  border-top: 1px solid var(--border-color);
}
.footer-links-title {
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 500;
  letter-spacing: 1px;
  color: var(--white);
  margin: 0 0 36px;
}
.footer-links-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr;
  gap: 40px 56px;
  align-items: start;
}
.footer-links-heading {
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  font-family: Montserrat, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--primary-color);
}
.footer-links-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-links-col--developers ul {
  columns: 2;
  column-gap: 32px;
}
.footer-links-col li {
  margin: 0 0 10px;
  break-inside: avoid;
}
.footer-links-col a {
  display: inline-block;
  font-family: Montserrat, sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-muted);
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color 0.2s ease, transform 0.2s ease;
}
.footer-links-col a:hover {
  color: var(--primary-color);
  transform: translateX(3px);
}
.footer-links-col a:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Tablet: developers take the full first row, communities and types sit side by side below. */
@media (max-width: 991px) {
  .footer-links-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px 40px;
  }
  .footer-links-col--developers {
    grid-column: 1 / -1;
  }
  .footer-links-col--developers ul {
    columns: 3;
  }
}

/* Phones: one column, simple stacking. */
@media (max-width: 599px) {
  .footer-links-block {
    margin: 32px 0 28px;
    padding-top: 32px;
  }
  .footer-links-title {
    font-size: 1.5rem;
    margin-bottom: 28px;
  }
  .footer-links-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .footer-links-col--developers ul {
    columns: 1;
  }
  .footer-links-col li {
    margin-bottom: 4px;
  }
  .footer-links-col a {
    padding: 6px 0;
  }
}

/* "Off-plan" / "Ready" / "Commercial" filter chip next to the results count of the properties page (set by the footer links). */
.properties-listing .properties-active-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--brand-border, rgba(212, 175, 55, 0.28));
  background: var(--brand-muted, rgba(212, 175, 55, 0.12));
  color: var(--white);
  font-family: Montserrat, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.properties-listing .properties-active-filter i {
  font-size: 0.75rem;
  color: var(--primary-color);
}
.properties-listing .properties-active-filter:hover {
  border-color: var(--primary-color);
}
.properties-listing .properties-active-filter:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}
