/*
 * Site footer (inc/class-hediyesahibi-footer.php).
 *
 * Three cards with room between them on the bubble background: the newsletter
 * band, the trust strip and the main panel (brand, link columns, contact and the
 * bottom bar). Concentric corners (docs/DESIGN.md §4.5): each card publishes its
 * design radius and inset (--hs-parent-r, --hs-parent-p); the rounded elements in
 * its corners use R − p (--hs-inner-r). Circles (icon chips, social links) stay circles.
 */

.hs-footer {
  --hs-footer-gap: clamp(1.5rem, 1rem + 1.5vw, 2.5rem);

  position: relative;
  padding-block: clamp(3.5rem, 2.5rem + 3vw, 6rem) clamp(1.5rem, 1rem + 1.5vw, 2.5rem);
  color: var(--hs-ink);
  font-family: var(--hs-font);
  background: #fff url('../images/footer/footer-bg.webp') center bottom / max(100%, 1400px) auto no-repeat;
}

.hs-footer__stack {
  display: grid;
  gap: var(--hs-footer-gap);
}

/* ─── Cards ─────────────────────────────────────────────────────────────── */

.hs-news,
.hs-trust,
.hs-footer__panel {
  --hs-parent-r: var(--hs-radius-xl, 28px);
  --hs-inner-r: max(calc((var(--hs-parent-r) - var(--hs-parent-p)) * var(--hs-corner-scale, 1)), var(--hs-r-min, 4px));

  box-sizing: border-box;
  min-width: 0;
  background: var(--hs-surface, #fff);
  border: 0;
  border-radius: var(--hs-r-xl, 28px);
  corner-shape: var(--hs-corner-shape, round);
  /* A soft shadow under the card and a wide white glow around it: over the bubbles the cards float. */
  box-shadow:
    0 24px 60px -32px rgb(31 37 71 / 22%),
    0 0 56px 16px rgb(255 255 255 / 85%);
}

/* ─── Newsletter band ───────────────────────────────────────────────────── */

/*
 * A light blue card: the 3D envelope, the text, the newsletter form (module CSS) and,
 * at the right end, a balloon, a gift box and a hand-drawn heart running over the top
 * edge. A
 * hand-drawn arrow points in from the page margin (wide screens only). When the band
 * scrolls into view (footer.js: data-hs-reveal "pending", then "done") the envelope,
 * the balloon and the gift box come in and the arrow and the heart are drawn stroke
 * by stroke.
 */
.hs-news {
  --hs-parent-p: 12px;
  --hs-news-arrow: #f39a4b;
  --hs-news-heart: #f47b20;

  position: relative;
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr) minmax(0, 30rem) 9rem;
  align-items: center;
  gap: 1.25rem 2rem;
  padding: 1.25rem 1rem 1.25rem 1.75rem;
  background: linear-gradient(100deg, #e4f0fd 0%, #eef5fe 30%, #f8fbff 62%, #fff7ef 100%);
}

.hs-news__art {
  display: grid;
  place-items: center;
}

.hs-news__envelope {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 16px 18px rgb(0 112 224 / 22%));
}

.hs-news__text {
  min-width: 0;
}

.hs-footer .hs-news__title {
  margin: 0 0 0.5rem;
  color: var(--hs-ink);
  font-family: inherit;
  font-size: clamp(1.25rem, 1.05rem + 0.7vw, 1.625rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.hs-footer .hs-news__lead {
  margin: 0;
  color: var(--hs-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.hs-news__form {
  min-width: 0;
}

.hs-news__deco {
  position: relative;
  align-self: stretch;
  min-height: 6rem;
}

.hs-news__balloon {
  position: absolute;
  top: -2rem;
  left: 0;
  width: 5rem;
  height: auto;
  filter: drop-shadow(0 14px 16px rgb(0 112 224 / 20%));
  animation: hs-news-float 5s ease-in-out infinite;
}

.hs-news__giftbox {
  position: absolute;
  right: 0;
  bottom: 0.25rem;
  width: 6.25rem;
  height: auto;
  filter: drop-shadow(0 14px 14px rgb(224 108 0 / 22%));
}

.hs-news__heart {
  position: absolute;
  top: -1.75rem;
  right: -0.25rem;
  width: 3.5rem;
  height: auto;
  overflow: visible;
}

.hs-news__arrow {
  position: absolute;
  top: -3.5rem;
  left: -5.75rem;
  width: 5.25rem;
  height: auto;
  overflow: visible;
  pointer-events: none;
}

.hs-news__line,
.hs-news__splash {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hs-news__arrow .hs-news__line {
  stroke: var(--hs-news-arrow);
  stroke-width: 3;
}

.hs-news__heart .hs-news__line {
  stroke: var(--hs-news-heart);
  stroke-width: 8;
}

.hs-news__giftbox,
.hs-news__splash {
  transform-origin: 50% 90%;
}

.hs-news__splash {
  stroke: var(--hs-news-heart);
  stroke-width: 7;
  transform-box: fill-box;
  transform-origin: center;
}

/* Every stroke has pathLength="1": dash 1, offset 1 hides it, 0 shows it whole. */
.hs-news__line {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

[data-hs-reveal='pending'] .hs-news__line {
  stroke-dashoffset: 1;
}

[data-hs-reveal='pending'] .hs-news__splash {
  opacity: 0;
  scale: 0.2;
}

[data-hs-reveal='pending'] .hs-news__envelope {
  opacity: 0;
  translate: -1.5rem 0.5rem;
}

[data-hs-reveal='pending'] .hs-news__balloon {
  opacity: 0;
  translate: 0 2.5rem;
}

[data-hs-reveal='pending'] .hs-news__giftbox {
  opacity: 0;
  scale: 0.6;
}

/* Transitions only on the way in (hiding is instant). */
[data-hs-reveal='done'] .hs-news__envelope {
  transition:
    opacity 0.5s ease,
    translate 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-hs-reveal='done'] .hs-news__arrow .hs-news__line {
  transition: stroke-dashoffset 1s cubic-bezier(0.65, 0, 0.35, 1) 0.15s;
}

[data-hs-reveal='done'] .hs-news__arrow .hs-news__line--head {
  transition-duration: 0.3s;
  transition-delay: 1.1s;
}

[data-hs-reveal='done'] .hs-news__balloon {
  transition:
    opacity 0.6s ease 0.3s,
    translate 1s cubic-bezier(0.22, 1, 0.36, 1) 0.3s;
}

[data-hs-reveal='done'] .hs-news__giftbox {
  transition:
    opacity 0.3s ease 0.45s,
    scale 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.45s;
}

[data-hs-reveal='done'] .hs-news__heart .hs-news__line {
  transition: stroke-dashoffset 0.9s cubic-bezier(0.65, 0, 0.35, 1) 0.8s;
}

[data-hs-reveal='done'] .hs-news__splash {
  transition:
    opacity 0.25s ease 1.6s,
    scale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 1.6s;
}

[data-hs-reveal='done'] .hs-news__splash:nth-of-type(3) {
  transition-delay: 1.7s;
}

[data-hs-reveal='done'] .hs-news__splash:nth-of-type(4) {
  transition-delay: 1.8s;
}

@keyframes hs-news-float {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }

  50% {
    transform: translateY(-8px) rotate(2deg);
  }
}

/* The arrow needs the page margin beside the card. */
@media (max-width: 1399px) {
  .hs-news__arrow {
    display: none;
  }
}

/* ─── Trust strip: tiles in the card, R − p ─────────────────────────────── */

.hs-trust {
  --hs-parent-p: 12px;

  padding: var(--hs-parent-p);
}

.hs-footer .hs-trust__list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--hs-parent-p);
  margin: 0;
  padding: 0;
  list-style: none;
}

.hs-trust__item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-width: 0;
  margin: 0;
  padding: 1.125rem 1.25rem;
  background: var(--hs-surface-2, #f4f6f9);
  border-radius: var(--hs-inner-r);
  corner-shape: var(--hs-corner-shape, round);
}

.hs-trust__chip {
  display: grid;
  flex: none;
  place-items: center;
  width: 3rem;
  height: 3rem;
  color: var(--hs-blue-600, #0070e0);
  background: #fff;
  border-radius: 50%;
  box-shadow: var(--hs-shadow-sm);
}

.hs-trust__text {
  display: grid;
  gap: 0.125rem;
  min-width: 0;
}

.hs-trust__title {
  color: var(--hs-ink);
  font-size: 0.9375rem;
  font-weight: 800;
  line-height: 1.3;
}

.hs-trust__note {
  color: var(--hs-muted);
  font-size: 0.875rem;
  line-height: 1.4;
}

/* ─── Main panel ────────────────────────────────────────────────────────── */

.hs-footer__panel {
  --hs-parent-p: clamp(1.5rem, 1rem + 2.5vw, 3.5rem);

  padding: var(--hs-parent-p) var(--hs-parent-p) 0;
  background: rgb(255 255 255 / 86%);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  backdrop-filter: blur(18px) saturate(1.1);
}

.hs-footer__main {
  display: grid;
  grid-template-columns: minmax(15rem, 1.35fr) repeat(var(--hs-footer-cols, 3), minmax(0, 1fr));
  gap: 2.5rem clamp(1.5rem, 1rem + 2vw, 3.5rem);
}

.hs-footer__logo {
  display: inline-block;
  border-radius: var(--hs-r-xs, 6px);
}

.hs-footer__logo img {
  display: block;
  width: 12.5rem;
  max-width: 100%;
  height: auto;
}

.hs-footer .hs-footer__tagline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  max-width: 20rem;
  margin: 1rem 0 0;
  color: var(--hs-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.hs-footer .hs-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.hs-social__link {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  color: var(--hs-ink);
  background: var(--hs-surface-2, #f4f6f9);
  border-radius: 50%;
  transition:
    color 0.15s ease,
    background-color 0.15s ease;
}

.hs-social__link:hover {
  color: #fff;
  background: var(--hs-blue-600, #0070e0);
}

.hs-footer .hs-footer__heading {
  margin: 0 0 1.125rem;
  color: var(--hs-ink);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
}

.hs-footer .hs-footer__links,
.hs-footer .hs-contact {
  display: grid;
  gap: 0.875rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hs-footer__links li,
.hs-contact__item {
  margin: 0;
}

.hs-footer__links a,
.hs-contact a,
.hs-footer__legal a,
.hs-footer .hs-footer__cookie {
  color: var(--hs-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
  text-decoration: none;
  text-underline-offset: 3px;
}

.hs-footer__links a:hover,
.hs-contact a:hover,
.hs-footer__legal a:hover,
.hs-footer .hs-footer__cookie:hover {
  color: var(--hs-ink);
  text-decoration: underline;
}

.hs-footer a:focus-visible,
.hs-footer .hs-footer__cookie:focus-visible {
  outline: 3px solid var(--hs-blue-600, #0070e0);
  outline-offset: 2px;
  border-radius: var(--hs-r-min, 4px);
}

.hs-social__link:focus-visible {
  border-radius: 50%;
}

.hs-contact__item {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  color: var(--hs-muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.hs-contact__icon {
  margin-top: 0.125rem;
  color: var(--hs-blue-600, #0070e0);
}

/* ─── Bottom bar ────────────────────────────────────────────────────────── */

.hs-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  margin-top: clamp(2.5rem, 2rem + 2vw, 3.5rem);
  padding-block: 1.5rem;
  color: var(--hs-muted);
  font-size: 0.875rem;
  border-top: 1px solid var(--hs-line, #e6e9f0);
}

.hs-footer .hs-footer__copy {
  margin: 0;
  font-size: 0.875rem;
}

.hs-footer .hs-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hs-footer__legal li {
  margin: 0;
}

.hs-footer__legal a,
.hs-footer .hs-footer__cookie {
  font-size: 0.875rem;
}

/* A button that looks like the links next to it (Kadence styles every button). */
.hs-footer .hs-footer__cookie {
  min-height: 0;
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-weight: inherit;
  letter-spacing: normal;
  text-transform: none;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
}

.hs-footer .hs-footer__cookie:hover,
.hs-footer .hs-footer__cookie:focus {
  background: none;
  box-shadow: none;
}

/* ─── Tablet ────────────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
  /* Envelope and text, the form below; the balloon at the top right corner. */
  .hs-news {
    grid-template-columns: 7rem minmax(0, 1fr);
    padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  }

  .hs-news__text {
    padding-right: 8rem;
  }

  .hs-news__form {
    grid-column: 1 / -1;
  }

  .hs-news__deco {
    position: absolute;
    top: 0;
    right: 1.25rem;
    width: 8rem;
    height: 7rem;
  }

  .hs-news__balloon {
    top: -1.5rem;
    width: 4.25rem;
  }

  .hs-news__giftbox {
    bottom: 0;
    width: 5.25rem;
  }

  .hs-news__heart {
    top: -1.25rem;
    width: 3rem;
  }

  .hs-footer .hs-trust__list {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  /* Three on the first row, two wider ones on the second. */
  .hs-trust__item {
    grid-column: span 2;
  }

  .hs-trust__item:nth-child(n + 4) {
    grid-column: span 3;
  }

  .hs-footer__main {
    grid-template-columns: repeat(var(--hs-footer-cols, 3), minmax(0, 1fr));
  }

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

/* ─── Phone ─────────────────────────────────────────────────────────────── */

@media (max-width: 720px) {
  .hs-footer {
    background-size: 135% auto;
  }

  /*
   * No envelope; the text runs full width. The balloon and the gift box stand on the
   * card's top edge, and a float keeps the title's first line clear of them.
   */
  .hs-news {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    padding: 1.25rem 1rem 1rem;
  }

  .hs-news__art {
    display: none;
  }

  .hs-news__text {
    padding-right: 0;
  }

  .hs-news__text::before {
    content: '';
    float: right;
    width: 5.75rem;
    height: 2rem;
  }

  .hs-news__deco {
    top: -2.25rem;
    right: 1rem;
    width: 6.5rem;
    height: 6rem;
  }

  .hs-news__balloon {
    top: -0.25rem;
    width: 3.5rem;
  }

  .hs-news__giftbox {
    bottom: 0.5rem;
    width: 4.25rem;
  }

  .hs-news__heart {
    top: -0.5rem;
    width: 2.5rem;
  }

  .hs-footer .hs-trust__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hs-trust__item,
  .hs-trust__item:nth-child(n + 4) {
    flex-direction: column;
    align-items: flex-start;
    grid-column: auto;
    padding: 1rem;
  }

  .hs-trust__item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .hs-footer__main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 1.5rem;
  }

  .hs-footer__col--contact {
    grid-column: 1 / -1;
  }

  .hs-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hs-social__link {
    transition: none;
  }

  .hs-news__balloon {
    animation: none;
  }
}

/* Wide screens (≥ 1920 px): the newsletter title grows with the headings (home.css). */
@media (min-width: 1920px) {
  .hs-footer .hs-news__title {
    font-size: 2rem;
  }
}
