/* Lida Motion — собственная анимация сайта («Закладка») */

:root {
  --lida-ease: cubic-bezier(0.2, 0.85, 0.25, 1);
  --lida-ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
}

.lida-reveal {
  opacity: 0;
  transform: translate3d(-8px, 12px, 0);
  transition:
    opacity 0.5s var(--lida-ease-soft),
    transform 0.5s var(--lida-ease-soft);
  transition-delay: var(--lida-delay, 0ms);
  will-change: opacity, transform;
}
.lida-reveal.is-in {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* Карточки: закладка слева */
.main-content > .card {
  position: relative;
  overflow: hidden;
}
.main-content > .card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  width: 4px;
  height: 28px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #1280d4, #0a5aac);
  transform: scaleY(0.55);
  transform-origin: top;
  opacity: 0.45;
  transition: transform 0.35s var(--lida-ease), opacity 0.35s ease, height 0.35s var(--lida-ease);
  pointer-events: none;
  z-index: 1;
}
.main-content > .card:hover {
  transform: translateY(-3px);
}
.main-content > .card:hover::before {
  transform: scaleY(1);
  height: 52px;
  opacity: 1;
}

/* Новости */
.news-cards__item {
  position: relative;
  overflow: hidden;
}
.news-cards__item_link {
  transition: transform 0.3s var(--lida-ease), box-shadow 0.3s ease !important;
}
.news-cards__item_link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(180deg, rgba(18, 128, 212, 0.14), rgba(10, 90, 172, 0.06));
  transition: width 0.35s var(--lida-ease);
  pointer-events: none;
  z-index: 0;
}
.news-cards__item_link > * {
  position: relative;
  z-index: 1;
}
.news-cards__item_link:not(.news-cards__item_link--expandable):hover,
.news-cards__item_link:not(.news-cards__item_link--expandable):focus-visible {
  transform: translateY(-3px);
}
.news-cards__item_link:hover::before,
.news-cards__item_link:focus-within::before {
  width: 100%;
}
.news-cards__date {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(11, 110, 173, 0.1);
  transition: transform 0.3s var(--lida-ease), background 0.3s ease;
}
.news-cards__item_link:hover .news-cards__date,
.news-cards__item_link:focus-within .news-cards__date {
  transform: translateX(3px);
  background: rgba(11, 110, 173, 0.16);
}

/* Левое меню: закладка слева, без роста пункта */
.left-menu__list a {
  position: relative;
  padding: 11px 14px 11px 18px !important;
  transform: none !important;
  transition:
    background 0.28s var(--lida-ease),
    color 0.28s ease,
    box-shadow 0.28s ease !important;
}
.left-menu__list a::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  width: 3px;
  height: 14px;
  margin-top: -7px;
  border-radius: 999px;
  background: linear-gradient(180deg, #1280d4, #0a5aac);
  opacity: 0;
  transform: scaleY(0.4);
  transform-origin: center;
  transition:
    opacity 0.28s ease,
    transform 0.28s var(--lida-ease),
    height 0.28s var(--lida-ease),
    margin-top 0.28s var(--lida-ease);
  pointer-events: none;
}
.left-menu__list a:hover,
.left-menu__list a:focus-visible {
  background: rgba(11, 110, 173, 0.1) !important;
  color: #0a5aac !important;
  padding-left: 18px !important;
  transform: none !important;
  box-shadow: inset 0 0 0 1px rgba(11, 110, 173, 0.12);
}
.left-menu__list a:hover::before,
.left-menu__list a:focus-visible::before {
  opacity: 1;
  transform: scaleY(1);
  height: 22px;
  margin-top: -11px;
}

.site-btn-home {
  transition:
    transform 0.28s var(--lida-ease),
    box-shadow 0.28s ease,
    background 0.28s ease !important;
}
.site-btn-home:hover,
.site-btn-home:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(11, 110, 173, 0.32) !important;
}

.home-poster a {
  transition: transform 0.4s var(--lida-ease), box-shadow 0.4s ease !important;
}
.home-poster a:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(10, 70, 130, 0.16) !important;
}
.home-poster img {
  transition: transform 0.55s var(--lida-ease);
}
.home-poster a:hover img {
  transform: scale(1.025);
}

.title-strip__hero-photo {
  animation: lida-breathe 12s ease-in-out infinite;
}
@keyframes lida-breathe {
  0%, 100% { transform: translate3d(0, 1%, 0) scale(1.02); }
  50% { transform: translate3d(0, -3.5%, 0) scale(1.045); }
}

@media (prefers-reduced-motion: reduce) {
  .lida-reveal,
  .lida-reveal.is-in,
  .title-strip__hero-photo,
  .main-content > .card,
  .news-cards__item_link,
  .left-menu__list a,
  .site-btn-home,
  .home-poster a,
  .home-poster img {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
  .main-content > .card::before,
  .news-cards__item_link::before,
  .left-menu__list a::before {
    transition: none !important;
  }
}

html.vision-mode .lida-reveal {
  opacity: 1 !important;
  transform: none !important;
}
html.vision-mode .title-strip__hero-photo {
  animation: none !important;
}
html.vision-mode .main-content > .card:hover,
html.vision-mode .news-cards__item_link:hover,
html.vision-mode .site-btn-home:hover,
html.vision-mode .home-poster a:hover {
  transform: none !important;
}
