@import url("./variables.css");
@import url("./reset.css");
@import url("./layout.css");
@import url("./header.css");
@import url("./footer.css");
@import url("./mobile.css");

/* Отступ между меню и слайдером */
main > section:first-of-type {
  margin-top: 0;
}

/* Главная новость (оформление как у бывшего слайдера) */
.slider {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  border: var(--border-card);
}

a.slider.editorial-tile-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.slider .editorial-feature {
  position: relative;
  aspect-ratio: 39/11;
  overflow: hidden;
}

.slider .editorial-feature img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide__overlay {
  position: absolute;
  inset: auto 0 0 0;
  background: linear-gradient(180deg, transparent, rgba(32, 35, 58, 0.86));
  color: var(--color-white);
  padding: var(--space-3);
}

.slide-news-title {
  font-weight: 600;
  line-height: 120%;
  margin-bottom: 8px;
  color: #0B4D94;
  font-size: 19px;
}

/* Даты и рубрики по сайту */
.section--actual-news .actual-news-text-row__date,
.category-block .muted,
.news-list-item .muted,
.article-content .muted,
.label {
  color: #46688D;
}

/* Актуальные новости — текстовая лента */
.section--actual-news .actual-news-text-row__title {
  font-family: var(--font-main);
}

@media (min-width: 1200px) and (max-width: 1399px) {
  .section--actual-news .actual-news-text-row__title {
    font-size: 15px;
  }
}

.slider-demo-block .section-header {
  margin-bottom: var(--space-2);
}

.slider-demo-block .section-header .section-title {
  margin-bottom: 6px;
}

/* Safe split: фото без агрессивной обрезки + текстовая колонка */
.slider--safe-split .swiper-slide {
  display: grid;
  grid-template-columns: minmax(0, 62%) minmax(0, 38%);
  aspect-ratio: auto;
  min-height: 320px;
  background: #eef2f9;
}

.slider--safe-split .swiper-slide img {
  object-fit: contain;
  background: #dfe6f2;
}

.slider--safe-split .slide__overlay {
  position: static;
  inset: auto;
  background: #ffffff;
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: var(--border-card);
}

/* Editorial tile (другие страницы / старые слайдеры) */
.slider--editorial-tile .editorial-feature {
  aspect-ratio: 39/14.3;
  background: #1d2338;
}

.hero-top .slider--editorial-tile {
  height: 100%;
}

.hero-top .slider--editorial-tile .editorial-feature {
  aspect-ratio: auto;
  min-height: 100%;
}

.slider--editorial-tile .editorial-feature img {
  object-fit: cover;
  object-position: left top;
  background: transparent;
}

.slider--editorial-tile .slide__overlay {
  left: var(--space-3);
  right: auto;
  bottom: var(--space-3);
  width: min(430px, calc(100% - 48px));
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0.75) 24.17%, rgba(255, 255, 255, 0.82) 55.45%, rgba(255, 255, 255, 0.75) 82.46%, rgba(255, 255, 255, 0.62) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--color-text);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

/* Главное: акцентные и компактные карточки */
.hero-main-mosaic {
  background: transparent;
}

.hero-main-mosaic .hero-main-card {
  position: relative;
  min-height: 0;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.hero-main-mosaic .hero-main-card:focus-visible {
  outline: 2px solid #0b4d94;
  outline-offset: 2px;
}

.hero-main-card--accent {
  display: block;
  border-radius: 6px;
  overflow: hidden;
  height: 100%;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.14);
}

.hero-main-card--accent .hero-main-card__media {
  position: absolute;
  inset: 0;
}

.hero-main-card--accent .hero-main-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-main-card--accent .hero-main-card__overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 20px 20px 22px;
  /* Верх градиента мягче, без заметной «линии» */
  background: linear-gradient(
    203deg,
    rgba(50, 50, 50, 0) 0%,
    rgba(50, 50, 50, 0) 52%,
    rgba(50, 50, 50, 0.22) 72%,
    rgba(50, 50, 50, 0.55) 88%,
    #323232 120.22%
  );
  color: #fff;
}

.hero-main-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 4px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.hero-main-card--accent .hero-main-card__meta {
  color: rgba(255, 255, 255, 0.92);
}

.hero-main-card__rubric::after {
  content: "·";
  margin: 0 8px;
  opacity: 0.85;
}

.hero-main-card--accent .hero-main-card__headline {
  margin: 0;
  font-family: var(--font-main);
  font-size: clamp(15px, 1.25vw, 19px);
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
}

.hero-main-card--compact {
  display: grid;
  grid-template-rows: 1fr 1fr;
  height: 100%;
  min-height: 0;
  border-radius: 6px;
  overflow: hidden;
  border: var(--border-card);
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
}

.hero-main-card--compact .hero-main-card__media {
  min-height: 0;
  overflow: hidden;
  position: relative;
  border-radius: 0;
}

.hero-main-card--compact .hero-main-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-main-card--compact .hero-main-card__body {
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 12px 20px 14px;
  background: #fff;
}

.hero-main-card--compact .hero-main-card__meta {
  margin-bottom: 8px;
  color: #46688d;
}

.hero-main-card--compact .hero-main-card__headline {
  margin: 0;
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  color: #233141;
}

.hero-main-mosaic a.hero-main-card:hover {
  color: inherit;
}

.hero-main-card--accent:hover .hero-main-card__overlay,
.hero-main-card--accent:hover .hero-main-card__headline,
.hero-main-card--accent:hover .hero-main-card__meta {
  color: #fff;
}

.hero-main-card--compact:hover .hero-main-card__headline {
  color: var(--color-link-hover);
}

.hero-main-card--compact:hover .hero-main-card__meta {
  color: #46688d;
}

@media (max-width: 900px) {
  .slider--safe-split .swiper-slide {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .slider--safe-split .slide__overlay {
    border-left: 0;
    border-top: var(--border-card);
  }
}

.category-header {
  margin-bottom: var(--space-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.category-header .muted {
  color: #0B4D94;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-weight: 600;
  position: relative;
  text-decoration: none;
}

.category-header .muted::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: #0B4D94;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.category-header .muted:hover::after {
  transform: scaleX(1);
}

.contacts-editorial__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.contacts-editorial__cols p {
  margin: 0;
}

.contacts-editorial__cols p + p {
  margin-top: 12px;
}

.contacts-editorial__cols a {
  color: #0B4D94;
  text-decoration: none;
}

.contacts-editorial__cols a:hover {
  color: var(--color-link-hover);
}

.contacts-editorial {
  padding: 0 !important;
}

.contacts-editorial h4 {
  margin: 0 0 12px 0;
}

.contacts-editorial__phone {
  white-space: nowrap;
}

.contacts-editorial__phone-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contacts-map iframe {
  width: 100%;
  max-width: 100%;
  display: block;
}

.contacts-map h2 {
  margin: 0 0 16px 0;
}

.contacts-form .form-grid {
  grid-template-columns: 1fr;
  gap: 16px;
}

.contacts-form .field {
  flex-direction: row;
  align-items: center;
  gap: 16px;
}

.contacts-form .field label {
  display: none;
}

.contacts-form .field input,
.contacts-form .field textarea,
.contacts-form .field select {
  flex: 1 1 auto;
}

.contacts-form textarea {
  min-height: 96px;
  resize: vertical;
}

.contacts-form input,
.contacts-form textarea,
.contacts-form select {
  border: 1px solid #cfd6df;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.contacts-form .field:focus-within label {
  color: var(--color-primary);
  transform: translateY(-1px);
  transition: color 0.2s ease, transform 0.2s ease;
}

.contacts-form input:focus,
.contacts-form textarea:focus,
.contacts-form select:focus {
  outline: none;
  border-color: rgba(11, 77, 148, 0.75);
  box-shadow: 0 0 0 3px rgba(11, 77, 148, 0.12);
}

.contacts-form input:not(:placeholder-shown),
.contacts-form textarea:not(:placeholder-shown) {
  transform: translateY(-0.5px);
}

.contacts-form .form-actions {
  margin-top: 24px;
}

@media (max-width: 740px) {
  .contacts-form .field {
    flex-direction: column;
    align-items: stretch;
  }

  .contacts-form .field label {
    width: auto;
    flex: 0 0 auto;
  }
}

@media (max-width: 980px) {
  .contacts-editorial__cols {
    grid-template-columns: 1fr;
  }
}

.video-block {
  padding: var(--space-3);
  min-height: 280px;
}

.video-block.card {
  background: linear-gradient(235deg, rgba(255, 255, 255, 0.52) 43.88%, rgba(255, 255, 255, 0.43) 87.47%, rgba(255, 255, 255, 0.00) 115.41%);
}

.video-block__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.video-block__item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.video-block__media {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 6px;
  background: #1d2338;
}

.video-block__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-block__title {
  font-family: var(--font-main);
  font-weight: 500;
  line-height: 1.25;
  color: var(--color-text);
}

.subscription-algorithm-title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text);
}

@media (max-width: 900px) {
  .video-block__list {
    grid-template-columns: 1fr;
  }
}

.news-list-item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
  align-items: flex-start;
}

.news-list-item__thumb {
  flex: 0 0 220px;
  width: 220px;
  height: 150px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  line-height: 0;
}

.news-list-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Страница «Новости»: фильтры, заголовки списка, мета-строка */
.news-filters .field input[type="date"] {
  border: 1px solid #d8dde5;
}

.news-page .news-list-item h2 {
  font-weight: 600;
  line-height: 120%;
  margin-bottom: 10px;
}

.news-page .news-list-item h2 a {
  font-weight: inherit;
}

.news-list-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0;
}

.news-list-item__rubric {
  color: #fff;
  background: #46688d;
  padding: 3px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.news-list-item__date {
  white-space: nowrap;
}

.article-content {
  padding: var(--space-3);
}

.article-single__lead {
  position: relative;
  margin: 0 0 20px;
  line-height: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.article-single__lead img {
  width: 100%;
  height: auto;
  display: block;
}

.article-single__lead .news-list-item__rubric {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 1;
  color: #fff;
  background: #46688d;
  padding: 3px 6px;
  border-radius: 4px;
  font-weight: 400;
  display: block;
  height: 22px;
  line-height: 16px;
  font-size: 14px;
  box-sizing: border-box;
}

.article-single__divider {
  height: 1px;
  background: #caced8;
  margin: 0 0 16px;
  border: 0;
}

.article-single__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0 0 20px;
}

.article-end-ad {
  margin-top: var(--space-3);
  margin-bottom: 32px;
}

.article-single__nav {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: 20px;
  flex-wrap: wrap;
}

.article-single__title {
  margin: 0 0 12px;
  color: #0b3d73;
  font-size: 30px;
  font-weight: 600;
  line-height: 120%;
}

@media (max-width: 1199px) {
  .article-single__title {
    font-size: 26px;
  }
}

@media (max-width: 979px) {
  .article-single__title {
    font-size: 24px;
  }
}

@media (max-width: 740px) {
  .article-single__title {
    font-size: 22px;
  }
}

.article-content p {
  margin-bottom: var(--space-2);
}

/* Блок «Последние материалы» (news-single) */
.widget--latest .widget--latest__title {
  font-size: 23px;
  text-transform: uppercase;
  margin-bottom: 12px;
  font-family: var(--font-heading);
  color: #0b4d94;
  font-weight: 700;
}

.widget--latest__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.widget--latest__list li {
  border-bottom: 1px solid #e2e6ed;
  padding: 12px 0;
}

.widget--latest__list li:first-child {
  padding-top: 0;
}

.widget--latest__list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.widget--latest__list a {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--color-text);
  text-decoration: none;
}

.widget--latest__list a:hover {
  color: var(--color-link-hover);
}

/* Зум превью внутри маски (не на мобильных), плавно */
@media (min-width: 981px) {
  .news-card__media,
  .category-item__media,
  .news-list-item__thumb,
  .hero-main-card__media {
    border-radius: var(--radius-sm);
  }

  .news-card__media img,
  .category-item__media img,
  .news-list-item__thumb img,
  .hero-main-card__media img {
    transition: transform 0.75s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
  }

  .news-card:hover .news-card__media img,
  .category-item:hover .category-item__media img,
  .news-list-item:hover .news-list-item__thumb img,
  .hero-main-card--accent:hover .hero-main-card__media img,
  .hero-main-card--compact:hover .hero-main-card__media img {
    transform: scale(1.06);
  }
}

.share-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin: var(--space-3) 0;
}

.share-row__label {
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text);
}

.share-row__social {
  display: flex;
  align-items: center;
  gap: 14px;
}

.share-row__social a {
  color: #46688d;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #d8dde5;
  background: #f5f7fa;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.share-row__social a:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
}

.share-row__social a i {
  font-size: 16px;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.map-placeholder {
  min-height: 320px;
}
