/* ==========================================================================
   Общие блоки, которые подключаются на разных страницах (parts/...).
   Грузится из header.php на всех страницах. Переменные --nh-* объявлены в header.css.
   ========================================================================== */

/* ---------- Преимущества школы (parts/lang/preimushestva.php) ---------- */

.perks {
  --perks-ease: cubic-bezier(0.22, 1, 0.36, 1);
  margin: 20px 0 10px;
}

.perks__title {
  position: relative;
  margin: 0 0 28px;
  padding-bottom: 16px;
  color: var(--nh-ink, #14213d);
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  text-align: left;
}

.perks__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, #0059cd, #4cc4ff);
}

.perks__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}

.perks__item {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 28px 26px 26px;
  border: 1px solid rgba(0, 89, 205, 0.09);
  border-radius: 22px;
  background:
    radial-gradient(ellipse 220px 140px at 100% 0%, rgba(0, 89, 205, 0.06), transparent 70%),
    #fff;
  box-shadow: 0 16px 34px -24px rgba(0, 53, 125, 0.45);
  transition:
    transform 0.5s var(--perks-ease),
    box-shadow 0.5s var(--perks-ease),
    border-color 0.5s var(--perks-ease);
}

/* линия сияния по верхней кромке: растёт при наведении */
.perks__item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0059cd, #4cc4ff 60%, rgba(76, 196, 255, 0));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--perks-ease);
}

.perks__item:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 89, 205, 0.22);
  box-shadow: 0 26px 44px -24px rgba(0, 53, 125, 0.55);
}

.perks__item:hover::before {
  transform: scaleX(1);
}

.perks__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  border-radius: 18px;
  background: linear-gradient(145deg, #eef4ff, #dce9ff);
  transition: transform 0.5s var(--perks-ease), background-color 0.5s;
}

.perks__icon img {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
  transition: transform 0.5s var(--perks-ease);
}

.perks__item:hover .perks__icon {
  transform: translateY(-2px) rotate(-4deg);
}

.perks__item:hover .perks__icon img {
  transform: scale(1.1);
}

.perks__name {
  margin: 0 0 10px;
  color: var(--nh-ink, #14213d);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
}

.perks__text {
  margin: 0;
  color: #4a5670;
  font-size: 14.5px;
  line-height: 1.65;
}

/* плавное появление по очереди при прокрутке; без JS карточки видны сразу */
.js .perks__item[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.8s var(--perks-ease),
    transform 0.8s var(--perks-ease),
    box-shadow 0.5s var(--perks-ease),
    border-color 0.5s var(--perks-ease);
  transition-delay: calc(var(--i, 0) * 80ms), calc(var(--i, 0) * 80ms), 0s, 0s;
}

.js .perks__item[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* после появления задержка не нужна: наведение должно срабатывать сразу */
.js .perks__item[data-reveal].is-in.is-done {
  transition-delay: 0s;
}

.js .perks__item[data-reveal].is-in:hover {
  transform: translateY(-6px);
}

@media (max-width: 768px) {
  .perks__title {
    font-size: 26px;
  }

  .perks__grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .perks__item {
    padding: 22px 20px 22px;
    border-radius: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .perks__item,
  .perks__item::before,
  .perks__icon,
  .perks__icon img {
    transition: none !important;
  }

  .js .perks__item[data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Футер (footer.php) ---------- */

/* в style.v10.css: footer { padding: 40px 0; background: #fff } и footer * { text-align: center } на мобильных */
footer.site-footer {
  position: relative;
  width: 100%;
  margin: 56px 0 0;
  padding: 56px 24px 28px;
  border: 0;
  border-top: 1px solid rgba(0, 89, 205, 0.1);
  border-radius: 0;
  background:
    radial-gradient(ellipse 620px 260px at 100% 0%, rgba(76, 196, 255, 0.2), transparent 70%),
    radial-gradient(ellipse 560px 240px at 0% 100%, rgba(0, 89, 205, 0.08), transparent 70%),
    #fff;
}

/* линия сияния по верхней кромке, в пару к линии под шапкой */
footer.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(159, 208, 255, 0), #9fd0ff 25%, #2f8cff 60%, #0059cd);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: 1240px;
  margin: 0 auto;
}

.site-footer__logo {
  display: block;
  width: 190px;
  margin-bottom: 20px;
}

.site-footer__logo img {
  display: block;
  width: 100%;
  height: auto;
}

.site-footer__address {
  margin: 0 0 20px;
  color: var(--nh-ink, #14213d);
  font-size: 15px;
  font-style: normal;
  line-height: 1.6;
}

.site-footer__address span {
  display: block;
  margin-top: 6px;
  color: #6b7a90;
  font-size: 13.5px;
}

.site-footer .site-footer__socials {
  justify-content: flex-start;
  padding: 0;
  gap: 8px;
  background: none;
}

/* селектор тяжелее .header-socials .vk из style.v10.css: там background — шорткат, который сбрасывает цвет фона */
.site-footer .site-footer__socials a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--nh-blue, #0059cd);
  background-size: 18px 18px;
  box-shadow: 0 8px 16px -8px rgba(0, 89, 205, 0.7);
  transition: transform 0.3s var(--perks-ease, ease), background-color 0.2s;
}

.site-footer .site-footer__socials a:hover {
  transform: translateY(-3px);
  background-color: var(--nh-blue-dark, #00419a);
}

/* style.v10.css на ≤992px центрирует footer div p через !important */
footer.site-footer p {
  text-align: left !important;
}

.site-footer__title {
  margin: 0 0 16px;
  color: #6b7a90;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-footer__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--nh-ink, #14213d);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
}

.site-footer__list a {
  position: relative;
  color: var(--nh-ink, #14213d);
  text-decoration: none;
  transition: color 0.2s;
}

/* подчёркивание, растущее слева направо */
.site-footer__list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--nh-blue, #0059cd);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--perks-ease, ease);
}

.site-footer__list a:hover {
  color: var(--nh-blue, #0059cd);
}

.site-footer__list a:hover::after {
  transform: scaleX(1);
}

/* иконки в колонках «Контакты» и «Время работы» */
.site-footer__list--icons svg,
.site-footer__list--icons svg * {
  color: var(--nh-blue, #0059cd);
}

.site-footer__list--icons svg {
  flex: none;
  margin-top: 2px;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  max-width: 1240px;
  margin: 40px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--nh-ice-2, #dce9ff);
  color: #6b7a90;
  font-size: 13.5px;
  font-weight: 500;
}

.site-footer__bottom,
.site-footer__bottom span {
  color: #6b7a90;
}

.site-footer__bottom a {
  color: #6b7a90;
  text-decoration: none;
  transition: color 0.2s;
}

.site-footer__bottom a:hover {
  color: var(--nh-blue, #0059cd);
}

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

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

@media (max-width: 600px) {
  footer.site-footer {
    margin-top: 40px;
    padding: 36px 20px 22px;
  }

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

  /* перебиваем footer * { text-align: center } из style.v10.css */
  footer.site-footer * {
    text-align: left;
  }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    margin-top: 30px;
  }
}

/* ---------- Уведомление о cookie (разметка и логика — в footer.php) ---------- */

/* кнопка чата Jivo на мобильных не должна перекрывать липкую шапку */
.__jivoMobileButton {
  z-index: 50;
}

.cookie-notice {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 2147483000;
  max-width: 860px;
  margin: 0 auto;
  padding: 16px 18px 16px 24px;
  border: 1px solid rgba(0, 89, 205, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 50px -16px rgba(0, 28, 79, 0.45);
  display: none; /* показывается скриптом (display:flex) */
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  animation: cookie-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cookie-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.cookie-notice-text {
  flex: 1 1 320px;
  margin: 0;
  color: #4a5670;
  font-size: 13.5px;
  line-height: 1.55;
}

.cookie-notice-link {
  color: var(--nh-blue, #0059cd);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-notice-button {
  flex: none;
  padding: 11px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--nh-blue, #0059cd);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 10px 20px -10px rgba(0, 89, 205, 0.9);
  transition: background-color 0.2s, transform 0.2s;
}

.cookie-notice-button:hover {
  background: var(--nh-blue-dark, #00419a);
  transform: translateY(-1px);
}

@media (max-width: 600px) {
  .cookie-notice {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 16px 18px;
  }

  .cookie-notice-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-notice {
    animation: none;
  }

  .site-footer .site-footer__socials a,
  .site-footer__list a,
  .site-footer__list a::after {
    transition: none;
  }
}
