/**
 * Professional footer, trust presentation and mobile navigation dock.
 *
 * @package BEF_Emlak
 */

.site-footer__cta-inner {
  min-height: 148px;
}

.site-footer .button--light,
.site-footer .button--light:visited {
  display: inline-flex;
  min-width: 148px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.75rem 1.2rem;
  border: 1px solid #fff;
  background: #fff;
  color: #102b20;
  text-align: center;
}

.site-footer .button--light:hover,
.site-footer .button--light:focus-visible {
  border-color: #f6d5c2;
  background: #f6d5c2;
  color: #102b20;
}

.site-footer__submit .bef-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
}

.site-footer__grid {
  grid-template-columns: minmax(230px, 1.45fr) repeat(4, minmax(135px, 1fr));
  gap: clamp(1.5rem, 3.5vw, 3.5rem);
  padding-block: clamp(3rem, 6vw, 5.5rem);
}

.site-footer__heading {
  position: relative;
  padding-bottom: 0.7rem;
  margin-bottom: 0.7rem;
  letter-spacing: 0.02em;
}

.site-footer__heading::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: #d88d67;
  content: "";
}

.site-footer__brand p {
  margin-bottom: 1.25rem;
  line-height: 1.75;
}

.site-footer__logo-link {
  display: inline-flex;
  max-width: 240px;
  margin-bottom: 1rem;
}

.site-footer__logo {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 84px;
  object-fit: contain;
}

.site-footer__menu {
  gap: 0.1rem;
}

.site-footer__menu a {
  color: #dce4e6;
  text-decoration-color: transparent;
  text-underline-offset: 0.25em;
}

.site-footer__menu a:hover,
.site-footer__menu a:focus-visible {
  color: #fff;
  text-decoration-color: #d88d67;
}

.site-footer__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.site-footer__socials a {
  display: inline-grid;
  width: 44px;
  height: 44px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 50%;
  background: rgb(255 255 255 / 6%);
  color: #fff;
  place-items: center;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease;
}

.site-footer__socials a:hover,
.site-footer__socials a:focus-visible {
  border-color: #d88d67;
  background: #b86942;
  transform: translateY(-2px);
}

.site-footer__socials .bef-icon {
  width: 1.15rem;
  height: 1.15rem;
}

.site-footer__contact address {
  display: grid;
  gap: 0.8rem;
  color: #bdc9cc;
  font-style: normal;
}

.site-footer__contact address > a,
.site-footer__contact address > span {
  display: flex;
  min-height: 32px;
  align-items: flex-start;
  gap: 0.65rem;
  color: #dce4e6;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.site-footer__contact address > a {
  min-height: 44px;
  align-items: center;
}

.site-footer__contact .bef-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
  margin-top: 0.2rem;
  color: #e2a080;
}

.site-footer__contact a:hover,
.site-footer__contact a:focus-visible {
  color: #fff;
}

.site-footer__contact-link {
  width: fit-content;
  font-weight: 750;
}

.site-footer__contact-link .bef-icon {
  margin-top: 0;
}

.site-footer__trust {
  border-block: 1px solid rgb(255 255 255 / 12%);
  background: rgb(255 255 255 / 3%);
}

.site-footer__trust > .bef-container {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.4fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding-block: clamp(2rem, 4vw, 3.5rem);
}

.site-footer__trust-copy h2 {
  margin-bottom: 0.65rem;
  color: #fff;
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
}

.site-footer__trust-copy > p:not(.eyebrow, .site-footer__provider) {
  margin: 0;
  color: #bdc9cc;
  font-size: 0.86rem;
  line-height: 1.65;
}

.site-footer__trust-copy .eyebrow {
  margin-bottom: 0.55rem;
  color: #efb89d;
}

.site-footer__provider {
  margin: 0.8rem 0 0;
  color: #eef2f3;
  font-size: 0.8rem;
}

.site-footer__trust-badges {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-footer__trust-badges li {
  display: flex;
  min-width: 0;
  min-height: 92px;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 14px;
  background: rgb(255 255 255 / 5%);
}

.site-footer__trust-badges .bef-icon {
  width: 1.7rem;
  height: 1.7rem;
  flex: 0 0 auto;
  color: #e2a080;
}

.site-footer__trust-badges span,
.site-footer__trust-badges strong,
.site-footer__trust-badges small {
  display: block;
  min-width: 0;
}

.site-footer__trust-badges strong {
  color: #fff;
  font-size: 0.8rem;
  line-height: 1.35;
}

.site-footer__trust-badges small {
  margin-top: 0.25rem;
  color: #aebcc0;
  font-size: 0.68rem;
  line-height: 1.35;
}

.site-footer__legal .bef-container {
  min-height: 72px;
}

.site-footer__legal p:last-of-type {
  max-width: 44ch;
  text-align: right;
}

.site-back-to-top {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 990;
  display: inline-grid;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 30%);
  border-radius: 50%;
  background: #b86942;
  box-shadow: 0 12px 30px rgb(7 27 46 / 24%);
  color: #fff;
  cursor: pointer;
  place-items: center;
  transition:
    background-color 180ms ease,
    transform 180ms ease;
}

.site-back-to-top[hidden] {
  display: none;
}

.site-back-to-top:hover,
.site-back-to-top:focus-visible {
  background: #925033;
  transform: translateY(-2px);
}

.site-back-to-top .bef-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.bef-mobile-dock {
  display: none;
}

@media (max-width: 1180px) {
  .site-footer__grid {
    grid-template-columns: minmax(230px, 1.25fr) repeat(3, minmax(145px, 1fr));
  }

  .site-footer__brand {
    grid-row: span 2;
  }

  .site-footer__trust > .bef-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__brand {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .site-footer__trust-badges {
    grid-template-columns: 1fr;
  }

  .site-footer__trust-badges li {
    min-height: 76px;
  }
}

@media (max-width: 780px) {
  .site-footer__cta-inner {
    min-height: 0;
  }

  .site-footer .button--light {
    width: 100%;
  }

  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 1.25rem;
  }

  .site-footer__brand,
  .site-footer__contact {
    grid-column: 1 / -1;
  }

  .site-footer__legal {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .site-footer__legal p:last-of-type {
    text-align: left;
  }

  .bef-mobile-dock {
    position: fixed;
    right: max(0.65rem, env(safe-area-inset-right));
    bottom: max(0.65rem, env(safe-area-inset-bottom));
    left: max(0.65rem, env(safe-area-inset-left));
    z-index: 980;
    display: grid;
    min-height: 64px;
    grid-template-columns: repeat(5, minmax(44px, 1fr));
    gap: 0.2rem;
    padding: 0.45rem;
    border: 1px solid rgb(255 255 255 / 68%);
    border-radius: 22px;
    background: rgb(255 255 255 / 94%);
    box-shadow: 0 16px 42px rgb(7 27 46 / 24%);
    backdrop-filter: blur(16px);
  }

  .bef-mobile-dock__link {
    position: relative;
    display: grid;
    min-width: 44px;
    min-height: 48px;
    border-radius: 15px;
    color: #516169;
    place-items: center;
    text-decoration: none;
  }

  .bef-mobile-dock__link:hover,
  .bef-mobile-dock__link:focus-visible,
  .bef-mobile-dock__link.is-current {
    background: #e8f0ea;
    color: #274b36;
  }

  .bef-mobile-dock__link.is-current::after {
    position: absolute;
    bottom: 0.3rem;
    left: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #b86942;
    content: "";
    transform: translateX(-50%);
  }

  .bef-mobile-dock__link .bef-icon {
    width: 1.35rem;
    height: 1.35rem;
  }

  .site-back-to-top {
    right: max(1rem, env(safe-area-inset-right));
    bottom: calc(82px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 430px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .site-footer__brand,
  .site-footer__contact {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-footer__socials a,
  .site-back-to-top {
    transition: none;
  }
}

@media print {
  .bef-mobile-dock,
  .site-back-to-top {
    display: none !important;
  }
}

/* Footer color presets and floating contact control. */
.site-footer {
  background: var(--bef-footer-background, #0b2438);
  color: var(--bef-footer-text, #fff);
}

.site-footer--forest {
  background-image: linear-gradient(135deg, rgb(28 91 60 / 28%), transparent 58%);
}

.site-footer--light {
  background-image: linear-gradient(135deg, rgb(255 255 255 / 10%), transparent 58%);
}

.site-footer .site-branding__name,
.site-footer .site-footer__heading,
.site-footer .site-footer__menu a,
.site-footer .site-footer__contact address > a,
.site-footer .site-footer__contact address > span,
.site-footer .site-footer__trust-copy h2,
.site-footer .site-footer__provider,
.site-footer .site-footer__trust-badges strong,
.site-footer .site-footer__legal,
.site-footer .site-footer__legal a {
  color: var(--bef-footer-text, #fff);
}

.site-footer__brand p,
.site-footer__trust-copy > p:not(.eyebrow, .site-footer__provider),
.site-footer__trust-badges small {
  color: color-mix(in srgb, var(--bef-footer-text, #fff) 72%, transparent);
}

.bef-floating-whatsapp {
  position: fixed;
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 985;
}

.bef-floating-whatsapp--right {
  right: max(4.75rem, calc(env(safe-area-inset-right) + 4.75rem));
}

.bef-floating-whatsapp--left {
  left: max(1rem, env(safe-area-inset-left));
}

.bef-floating-whatsapp__toggle {
  display: inline-flex;
  min-width: 52px;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.75rem;
  border: 1px solid rgb(255 255 255 / 45%);
  border-radius: 999px;
  background: #168a4a;
  box-shadow: 0 12px 30px rgb(7 27 46 / 24%);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
  transition:
    transform 180ms ease,
    background-color 180ms ease;
}

.bef-floating-whatsapp__toggle::-webkit-details-marker {
  display: none;
}

.bef-floating-whatsapp__toggle:hover,
.bef-floating-whatsapp__toggle:focus-visible,
.bef-floating-whatsapp[open] .bef-floating-whatsapp__toggle {
  background: #0f6f3a;
  transform: translateY(-2px);
}

.bef-floating-whatsapp__toggle .bef-icon {
  width: 1.45rem;
  height: 1.45rem;
}

.bef-floating-whatsapp .bef-icon,
.bef-floating-whatsapp .bef-icon * {
  fill: currentcolor;
}

.bef-floating-whatsapp:not(.bef-floating-whatsapp--expanded-label) .bef-floating-whatsapp__toggle {
  width: 52px;
}

.bef-floating-whatsapp__panel {
  position: absolute;
  bottom: calc(100% + 0.75rem);
  width: min(22rem, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem - env(safe-area-inset-left) - env(safe-area-inset-right));
  box-sizing: border-box;
  padding: 1.25rem;
  border: 1px solid var(--bef-color-line);
  border-radius: var(--bef-radius-md);
  background: var(--bef-color-surface);
  box-shadow: var(--bef-shadow-lg);
  color: var(--bef-color-ink);
}

.bef-floating-whatsapp--right .bef-floating-whatsapp__panel {
  right: 0;
}

.bef-floating-whatsapp--left .bef-floating-whatsapp__panel {
  left: 0;
}

.bef-floating-whatsapp__panel h2 {
  padding-right: 2rem;
  font-size: 1.35rem;
}

.bef-floating-whatsapp__panel > p:not(.eyebrow) {
  color: var(--bef-color-muted);
}

.bef-floating-whatsapp__panel .button {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #168a4a;
}

.bef-floating-whatsapp__panel .button .bef-icon {
  width: 1.2rem;
  height: 1.2rem;
}

.bef-floating-whatsapp__close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  display: grid;
  width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--bef-color-ink);
  place-items: center;
}

.bef-floating-whatsapp__close .bef-icon {
  width: 1.1rem;
  height: 1.1rem;
}

@media (max-width: 780px) {
  .site-footer__cta-inner {
    align-items: center;
    flex-direction: row;
    gap: 0.9rem;
    padding-block: 1.1rem;
  }

  .site-footer__cta h2 {
    font-size: clamp(1.25rem, 6vw, 1.65rem);
    line-height: 1.15;
  }

  .site-footer__cta .eyebrow {
    margin-bottom: 0.35rem;
  }

  .site-footer .button--light {
    width: auto;
    min-width: 132px;
    min-height: 44px;
    flex: 0 0 auto;
    padding: 0.6rem 0.9rem;
  }

  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 0.85rem;
    padding-block: 1.4rem;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }

  .site-footer__contact {
    grid-column: auto;
  }

  .site-footer__logo-link {
    margin-bottom: 0.55rem;
  }

  .site-footer__logo {
    max-height: 58px;
  }

  .site-footer__brand p {
    max-width: 46ch;
    margin-bottom: 0.7rem;
    font-size: 0.86rem;
    line-height: 1.5;
  }

  .site-footer__heading {
    padding-bottom: 0.45rem;
    margin-bottom: 0.45rem;
    font-size: 0.82rem;
  }

  .site-footer__menu a {
    min-height: 32px;
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .site-footer__socials a {
    width: 38px;
    height: 38px;
  }

  .site-footer__contact address {
    gap: 0.3rem;
    font-size: 0.8rem;
  }

  .site-footer__contact address > a,
  .site-footer__contact address > span {
    min-height: 32px;
    gap: 0.45rem;
    line-height: 1.4;
  }

  .site-footer__trust > .bef-container {
    gap: 0.9rem;
    padding-block: 1.2rem;
  }

  .site-footer__trust-copy h2 {
    margin-bottom: 0.4rem;
    font-size: 1.25rem;
  }

  .site-footer__trust-copy .eyebrow {
    margin-bottom: 0.35rem;
  }

  .site-footer__trust-copy > p:not(.eyebrow, .site-footer__provider) {
    font-size: 0.76rem;
    line-height: 1.5;
  }

  .site-footer__provider {
    margin-top: 0.5rem;
    font-size: 0.73rem;
  }

  .site-footer__trust-badges {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .site-footer__trust-badges li {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.6rem;
    border-radius: 12px;
  }

  .site-footer__trust-badges .bef-icon {
    width: 1.4rem;
    height: 1.4rem;
  }

  .site-footer__trust-badges small {
    margin-top: 0.1rem;
    font-size: 0.6rem;
    overflow-wrap: anywhere;
  }

  .site-footer__trust-badges strong {
    font-size: 0.69rem;
    overflow-wrap: anywhere;
  }

  .site-footer__legal {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .site-footer__legal .bef-container {
    min-height: 0;
    align-items: flex-start;
    gap: 0.35rem;
    padding-block: 0.9rem;
  }

  .site-footer__legal p:last-of-type {
    text-align: left;
  }

  .bef-mobile-dock {
    z-index: 1000;
  }

  .bef-compare-tray {
    right: max(0.65rem, env(safe-area-inset-right));
    bottom: calc(82px + env(safe-area-inset-bottom));
    left: max(0.65rem, env(safe-area-inset-left));
    z-index: 1010;
    width: auto;
    max-width: none;
    min-height: 54px;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.4rem;
    transform: none;
  }

  .bef-compare-tray__link,
  .bef-compare-tray__clear {
    min-height: 42px;
    font-size: 0.72rem;
  }

  .bef-compare-tray__link {
    padding: 0.55rem 0.7rem;
  }

  .bef-compare-tray__clear {
    padding-inline: 0.55rem;
  }

  .bef-floating-whatsapp {
    bottom: calc(148px + env(safe-area-inset-bottom));
    z-index: 1020;
  }

  .bef-floating-whatsapp--right {
    right: max(0.75rem, env(safe-area-inset-right));
    left: auto;
  }

  .bef-floating-whatsapp--left {
    right: auto;
    left: max(0.75rem, env(safe-area-inset-left));
  }

  .bef-floating-whatsapp__panel {
    width: min(
      22rem,
      calc(100vw - 1.5rem - env(safe-area-inset-left) - env(safe-area-inset-right))
    );
    max-width: calc(100vw - 1.5rem - env(safe-area-inset-left) - env(safe-area-inset-right));
    max-height: calc(100dvh - 14rem - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding: 1rem;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .bef-floating-whatsapp--right .bef-floating-whatsapp__panel {
    right: 0;
    left: auto;
  }

  .bef-floating-whatsapp--left .bef-floating-whatsapp__panel {
    right: auto;
    left: 0;
  }

  .bef-floating-whatsapp--desktop-only {
    display: none;
  }

  .site-back-to-top {
    right: auto;
    bottom: calc(82px + env(safe-area-inset-bottom));
    left: max(1rem, env(safe-area-inset-left));
    z-index: 1005;
  }
}

@media (max-width: 780px) and (min-width: 351px) {
  .site-footer__contact,
  .site-footer__legal-nav {
    min-width: 0;
  }
}

@supports selector(body:has(.bef-compare-tray:not([hidden]))) {
  @media (max-width: 780px) {
    body:not(:has(.bef-compare-tray:not([hidden]))) .bef-floating-whatsapp {
      bottom: calc(82px + env(safe-area-inset-bottom));
    }
  }
}

@media (max-width: 350px) {
  .site-footer__cta-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .site-footer__brand,
  .site-footer__contact {
    grid-column: auto;
  }

  .site-footer__trust-badges {
    grid-template-columns: 1fr;
  }

  .site-footer__trust-badges li {
    flex-direction: row;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bef-floating-whatsapp__toggle {
    transition: none;
  }
}

@media print {
  .bef-floating-whatsapp {
    display: none !important;
  }
}
