/* =========================================================
   NAOGORODE FOOTER
========================================================= */

.nao-site-footer {
  position: relative;

  margin-top: 80px;

  color: var(--color-surface);
  background: #252220;
}

.nao-site-footer.has-support {
  margin-top: 200px;
}

/* =========================================================
   SUPPORT WRAPPER
========================================================= */

.nao-footer-support-wrap {
  width: min(
    calc(100% - (var(--page-padding) * 2)),
    1280px
  );

  margin: 0 auto -75px;

  transform: translateY(-50%);
}

/* =========================================================
   SUPPORT BLOCK
========================================================= */

.nao-footer-support {
  position: relative;
  isolation: isolate;

  min-height: 230px;
  padding: 44px 52px;

  display: grid;
  grid-template-columns:
    110px
    minmax(0, 1fr)
    auto;
  align-items: center;
  gap: 35px;

  overflow: hidden;

  color: var(--color-surface);
  background: var(--color-primary-dark);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-large);

  box-shadow:
    0 22px 48px rgba(4, 24, 11, 0.25);
}

.nao-footer-support::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  width: max(160%, 720px);
  aspect-ratio: 1;
  background:
    conic-gradient(
      from 0deg,
      rgba(255, 255, 255, 0.08) 0deg,
      rgba(255, 255, 255, 0.08) 270deg,
      rgba(114, 201, 0, 0.28) 292deg,
      rgba(114, 201, 0, 0.9) 322deg,
      rgba(255, 255, 255, 0.95) 340deg,
      rgba(255, 255, 255, 0.08) 360deg
    );

  transform:
    translate3d(-50%, -50%, 0)
    rotate(0deg);

  transform-origin: center;
  will-change: transform;

  animation:
    nao-footer-border-rotate 9s linear infinite;

  pointer-events: none;
}

/*
 * Внутрішній шар перекриває gradient.
 * Видимими залишаються лише 2px по периметру.
 */
.nao-footer-support::after {
  content: "";

  position: absolute;
  inset: 2px;
  z-index: 1;

  background:
    radial-gradient(
      circle at 72% 15%,
      rgba(255, 255, 255, 0.08),
      transparent 34%
    ),
    linear-gradient(
      135deg,
      var(--color-primary),
      var(--color-primary-dark)
    );

  border-radius: calc(var(--radius-large) - 2px);

  pointer-events: none;
}

@keyframes nao-footer-border-rotate {
  from {
    transform:
      translate3d(-50%, -50%, 0)
      rotate(0deg);
  }

  to {
    transform:
      translate3d(-50%, -50%, 0)
      rotate(360deg);
  }
}

/* =========================================================
   SUPPORT DECORATION
========================================================= */

.nao-footer-support__decoration {
  position: relative;
  z-index: 2;

  width: 100px;
  height: 100px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: rgba(255, 255, 255, 0.58);
}

.nao-footer-support__decoration svg {
  width: 90px;
  height: 90px;

  display: block;

  /*
   * Іконка залишається повністю нерухомою.
   */
  animation: none;
  transform: none;
}

/* =========================================================
   SUPPORT CONTENT LAYERS
========================================================= */

.nao-footer-support__content,
.nao-footer-support__button {
  position: relative;
  z-index: 2;
}

/* =========================================================
   SUPPORT CONTENT
========================================================= */

.nao-footer-support__content {
  position: relative;
  z-index: 2;
  max-width: 650px;
}

.nao-footer-support__eyebrow {
  margin-bottom: 9px;
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--font-eyebrow);
  line-height: var(--line-small);
  font-weight: var(--weight-extra);
}

.nao-footer-support__title {
  margin: 0 0 14px;
  color: var(--color-surface);
  font-size: var(--font-h3);
  line-height: 1.18;
  font-weight: var(--weight-black);
  letter-spacing: var(--letter-heading);
}

.nao-footer-support__text {
  max-width: 620px;
  margin: 0;

  color: rgba(255, 255, 255, 0.83);
  font-size: var(--font-body);
  line-height: var(--line-body);
  font-weight: var(--weight-semibold);
}

/* =========================================================
   SUPPORT BUTTON
========================================================= */

.nao-footer-support__button {
  position: relative;
  z-index: 2;
  min-height: 58px;
  padding: 7px 8px 7px 26px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--color-primary-dark);
  background: var(--color-surface);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: var(--font-button);
  line-height: var(--line-small);
  font-weight: var(--weight-extra);
  text-decoration: none;
  white-space: nowrap;
  transition:
    color var(--transition),
    background-color var(--transition),
    border-color var(--transition),
    transform var(--transition);
}

.nao-footer-support__button-icon {
  width: 43px;
  height: 43px;
  flex: 0 0 43px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--color-surface);
  background:
    linear-gradient(
      90deg,
      #219043,
      #62e113
    );

  border-radius: 50%;

  transition:
    color var(--transition),
    background-color var(--transition),
    background-image var(--transition),
    transform var(--transition);
}

.nao-footer-support__button-icon svg {
  width: 19px;
  height: 19px;

  display: block;
}

.nao-footer-support__button:hover,
.nao-footer-support__button:focus-visible {
  color: var(--color-surface);
  background: #196730;

  transform: translateY(-2px);
}

.nao-footer-support__button:hover
.nao-footer-support__button-icon,
.nao-footer-support__button:focus-visible
.nao-footer-support__button-icon {
  color: var(--color-primary);
  background: var(--color-surface);

  transform: translateX(2px);
}

.nao-footer-support__button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

/* =========================================================
   FOOTER MAIN
========================================================= */

.nao-footer-main {
  width: min(
    calc(100% - (var(--page-padding) * 2)),
    1280px
  );

  margin-inline: auto;
  padding: 90px 0 30px;
}

.nao-site-footer.has-support .nao-footer-main {
  padding-top: 20px;
}

/* =========================================================
   FOOTER GRID
========================================================= */

.nao-footer-grid {
  display: grid;
  grid-template-columns:
    minmax(280px, 1.35fr)
    repeat(2, minmax(150px, 0.8fr));
  gap: 64px;
}

.nao-footer-grid.has-partner-ad {
  grid-template-columns:
    minmax(280px, 1.3fr)
    repeat(2, minmax(140px, 0.7fr))
    minmax(240px, 300px);

  gap: 54px;
}

/* =========================================================
   FOOTER BRAND
========================================================= */

.nao-footer-brand {
  max-width: 360px;
}

.nao-footer-logo {
  margin-bottom: 22px;

  display: inline-flex;
}

.nao-footer-logo img {
  width: auto;
  max-width: 200px;
  height: auto;
  max-height: 150px;

  display: block;

  object-fit: contain;
}

.nao-footer-description {
  max-width: 330px;
  margin: 0 0 24px;

  color: rgba(255, 255, 255, 0.63);
  font-size: var(--font-body);
  line-height: var(--line-body);
  font-weight: var(--weight-semibold);
}

/* =========================================================
   CONTACTS
========================================================= */

.nao-footer-contacts {
  margin: 0;
  padding: 0;

  display: grid;
  gap: 13px;

  list-style: none;
}

.nao-footer-contacts li {
  display: flex;
  align-items: flex-start;
  gap: 11px;

  color: rgba(255, 255, 255, 0.74);
  font-size: var(--font-small);
  line-height: var(--line-small);
}

.nao-footer-contacts li > span {
  width: 20px;
  flex: 0 0 20px;

  display: flex;

  color: var(--color-accent);
}

.nao-footer-contacts li > span svg {
  width: 18px;
  height: 18px;

  display: block;
}

.nao-footer-contacts a {
  color: inherit;
  text-decoration: none;

  transition: color var(--transition);
}

.nao-footer-contacts a:hover,
.nao-footer-contacts a:focus-visible {
  color: var(--color-surface);
}

/* =========================================================
   FOOTER MENUS
========================================================= */

.nao-footer-title {
  margin: 8px 0 25px;

  color: var(--color-surface);
  font-size: var(--font-menu);
  line-height: var(--line-small);
  font-weight: var(--weight-extra);
  letter-spacing: var(--letter-eyebrow);
  text-transform: uppercase;
}

.nao-footer-menu {
  margin: 0;
  padding: 0;

  display: grid;
  gap: 14px;

  list-style: none;
}

.nao-footer-menu li {
  margin: 0;
  padding: 0;

  list-style: none;
}

.nao-footer-menu a {
  position: relative;

  display: inline-block;

  color: rgba(255, 255, 255, 0.68);
  font-size: var(--font-body);
  line-height: var(--line-small);
  font-weight: var(--weight-semibold);
  text-decoration: none;

  transition:
    color var(--transition),
    padding-left var(--transition);
}

.nao-footer-menu a::before {
  content: "";

  position: absolute;
  top: 50%;
  left: 0;

  width: 0;
  height: 1px;

  background: var(--color-accent);

  transform: translateY(-50%);

  transition: width var(--transition);
}

.nao-footer-menu a:hover,
.nao-footer-menu a:focus-visible {
  padding-left: 17px;

  color: var(--color-surface);
}

.nao-footer-menu a:hover::before,
.nao-footer-menu a:focus-visible::before {
  width: 10px;
}

/* =========================================================
   FOOTER PARTNER
========================================================= */

.nao-footer-partner {
  min-width: 0;
  padding-top: 8px;
}

.nao-footer-partner__card {
  position: relative;

  width: 100%;

  overflow: hidden;

  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-medium);

  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.18);
}

.nao-footer-partner__link {
  width: 100%;

  display: block;
}

.nao-footer-partner__image {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;

  display: block;

  object-fit: contain !important;
  object-position: center;

  transition: transform 0.45s ease;
}

.nao-footer-partner__link:hover
.nao-footer-partner__image {
  transform: scale(1.015);
}

.nao-footer-partner__label {
  position: absolute;
  right: auto;
  bottom: 8px;
  left: 8px;

  width: max-content;
  max-width: calc(100% - 16px);
  padding: 4px 8px;

  color: rgba(255, 255, 255, 0.9);
  background: rgba(6, 60, 36, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;

  font-size: 10px;
  line-height: 1.2;
  font-weight: var(--weight-semibold);
  text-align: left;
  white-space: nowrap;

  backdrop-filter: blur(2px);

  pointer-events: none;
}
/* =========================================================
   FOOTER BOTTOM
========================================================= */

.nao-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.nao-footer-bottom__inner {
  width: min(
    calc(100% - (var(--page-padding) * 2)),
    1280px
  );

  min-height: 95px;
  margin-inline: auto;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.nao-footer-copyright {
  margin: 0;

  color: rgba(255, 255, 255, 0.54);
  font-size: var(--font-small);
  line-height: var(--line-small);
  font-weight: var(--weight-semibold);
}

/* =========================================================
   BOTTOM SOCIALS
========================================================= */

.nao-footer-bottom-socials {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.nao-footer-bottom-socials a {
  width: 40px;
  height: 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;

  transition:
    color var(--transition),
    background-color var(--transition),
    border-color var(--transition),
    transform var(--transition);
}

.nao-footer-bottom-socials a:hover,
.nao-footer-bottom-socials a:focus-visible {
  color: var(--color-surface);
  background: var(--color-primary);
  border-color: var(--color-primary);

  transform: translateY(-2px);
}

.nao-footer-bottom-socials a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.nao-footer-bottom-socials svg {
  width: 19px;
  height: 19px;

  display: block;
}

/* =========================================================
   BACK TO TOP
========================================================= */

.nao-back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 900;

  width: 47px;
  height: 47px;
  padding: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  visibility: hidden;
  opacity: 0;

  color: var(--color-surface);
  background: var(--color-primary);
  border: 0;
  border-radius: var(--radius-small);

  cursor: pointer;

  transform: translateY(12px);

  transition:
    visibility var(--transition),
    opacity var(--transition),
    transform var(--transition),
    background-color var(--transition);
}

.nao-back-to-top.is-visible {
  visibility: visible;
  opacity: 1;

  transform: translateY(0);
}

.nao-back-to-top:hover,
.nao-back-to-top:focus-visible {
  background: var(--color-primary-dark);
}

.nao-back-to-top:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* =========================================================
   RESPONSIVE — 1180
========================================================= */

@media (max-width: 1180px) {
  .nao-footer-support {
    padding: 38px 35px;

    grid-template-columns:
      85px
      minmax(0, 1fr)
      auto;

    gap: 25px;
  }

  .nao-footer-support__decoration {
    width: 80px;
    height: 80px;
  }

  .nao-footer-grid,
  .nao-footer-grid.has-partner-ad {
    grid-template-columns:
      1.25fr
      repeat(2, 1fr);

    gap: 45px;
  }

  .nao-footer-partner {
    grid-column: 2 / 4;

    width: min(100%, 420px);
  }
}

/* =========================================================
   RESPONSIVE — 860
========================================================= */

@media (max-width: 860px) {

  .nao-site-footer.has-support {
    margin-top: 64px;
  }

  .nao-footer-support-wrap {
    width: min(
      calc(100% - (var(--page-padding) * 2)),
      720px
    );

    margin: 0 auto;
    padding-top: 28px;

    transform: none;
  }

  .nao-footer-support {
    min-height: 0;
    padding: 36px 30px;

    grid-template-columns: minmax(0, 1fr);

    text-align: center;
  }

  .nao-footer-support__decoration {
    display: none;
  }

  .nao-footer-support__content {
    width: 100%;
    max-width: 620px;
    margin-inline: auto;
  }

  .nao-footer-support__button {
    margin-inline: auto;
  }

  .nao-site-footer.has-support .nao-footer-main {
    padding-top: 56px;
  }

  .nao-footer-grid,
  .nao-footer-grid.has-partner-ad {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));

    gap: 44px 34px;
  }

  .nao-footer-brand {
    max-width: none;

    grid-column: 1 / -1;
  }

  .nao-footer-partner {
    grid-column: 1 / -1;

    width: min(100%, 520px);
    padding-top: 0;
  }
}

/* =========================================================
   RESPONSIVE — 680
========================================================= */

@media (max-width: 680px) {
  .nao-site-footer,
  .nao-site-footer.has-support {
    margin-top: 56px;
  }

  .nao-footer-support-wrap {
    width: calc(100% - (var(--page-padding) * 2));
    margin: 0 auto;
    padding-top: 16px;

    transform: none;
  }

  .nao-footer-support {
    padding: 30px 22px;

    border-radius: var(--radius-medium);
  }

  .nao-footer-support__title {
    margin-bottom: 12px;
  }

  .nao-footer-support__button {
    width: 100%;
    min-height: 56px;
    padding-left: 22px;
  }

  .nao-site-footer.has-support .nao-footer-main {
    padding-top: 48px;
  }

  .nao-footer-main {
    padding-bottom: 55px;
  }

  .nao-footer-grid,
  .nao-footer-grid.has-partner-ad {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .nao-footer-brand,
  .nao-footer-partner {
    grid-column: auto;
  }

  .nao-footer-partner {
    width: 100%;
    padding-top: 0;
  }

  .nao-footer-partner__card,
  .nao-footer-partner__link {
    width: 100%;
  }

  .nao-footer-partner__image {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;

    object-fit: contain !important;
  }

  .nao-footer-partner__label {
    bottom: 7px;
    left: 7px;

    max-width: calc(100% - 14px);
    padding: 3px 7px;

    font-size: 9px;
  }

  .nao-footer-bottom__inner {
    min-height: 110px;
    padding: 24px 0;

    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 18px;
  }

  .nao-back-to-top {
    right: 14px;
    bottom: 14px;

    width: 43px;
    height: 43px;
  }
}


/* =========================================================
   RESPONSIVE — 380
========================================================= */

@media (max-width: 380px) {
  .nao-footer-support {
    padding-inline: 18px;
  }

  .nao-footer-support__button {
    padding-left: 18px;
    gap: 14px;
  }

  .nao-footer-main {
    padding-bottom: 48px;
  }
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
  .nao-footer-support::before {
    animation: none;

    transform:
      translate3d(-50%, -50%, 0)
      rotate(25deg);
  }

  .nao-footer-support__button,
  .nao-footer-support__button-icon,
  .nao-footer-partner__image,
  .nao-footer-bottom-socials a,
  .nao-back-to-top {
    transition: none;
  }
}