/* Страница карточка новости */

.news-card-page {
  width: 100%;
  min-height: 100vh;
}

.news-card-page .footer-container {
  max-width: 1500px;
  margin-left: auto;
  margin-right: auto;
  padding-inline: clamp(24px, calc(100px - (1500px - 100vw) * 76px / 416px), 100px);
}

.news-card-hero-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding-top: 32px;
  margin-bottom: 160px;
}

.news-card-hero-star {
  position: absolute;
  top: -80px;
  height: 799px;
  width: auto;
  pointer-events: none;
  z-index: 0;
}

.news-card-hero-star--right {
  right: 0;
  transform: scaleX(-1);
}

.news-card-hero-container {
  position: relative;
  max-width: 1500px;
  padding-inline: clamp(24px, calc(100px - (1500px - 100vw) * 76px / 416px), 100px);
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  z-index: 1;
}

.news-card-two-col {
  display: grid;
  grid-template-columns: 848fr 475fr;
  gap: 140px;
  align-items: start;
}

@media (max-width: 1200px) {
  .news-card-two-col {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

/* Левая колонка */
.news-card-main {
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-width: 0;
}

.news-card-main-photo-wrap {
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0px 0px 24px 1px #2F2F2F0A,
    0px 1px 1px -0.5px #2F2F2F0A,
    0px 3px 3px -1.5px #2F2F2F0A,
    0px 6px 6px -3px #2F2F2F0A,
    0px 12px 12px -6px #2F2F2F0A,
    0px 24px 24px -12px #2F2F2F0A,
    0px 0px 0px 1px #2F2F2F0A;
}

.news-card-main-photo {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
}

.news-card-page .news-card-main .news-card-title {
  font-family: 'SF Pro', system-ui, -apple-system, sans-serif;
  font-weight: 700;
  font-size: 48px;
  line-height: 100%;
  letter-spacing: -0.01em;
  color: #2B2B2B;
  margin: 0;
}

.news-card-page .news-card-main .news-card-date {
  font-family: 'SF Pro', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 100%;
  letter-spacing: -0.01em;
  color: #BABABA;
  margin: 0;
}

.news-card-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.news-card-head-line {
  width: 100%;
  height: 0;
  border-top: 1px solid #EFEFEF;
}

.news-card-text {
  font-family: 'SF Pro', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  font-size: 20px;
  line-height: 100%;
  letter-spacing: -0.01em;
  color: #2B2B2B;
  margin: 0;
}

.news-card-text p {
  margin: 0 0 1em;
}

.news-card-text p:last-child {
  margin-bottom: 0;
}

/* Полоса и иконки */
.news-card-divider-row {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.news-card-divider-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  margin-top: -1px;
  height: 0;
  border-top: 1px solid #EFEFEF;
}

.news-card-share-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.news-card-share-icon-btn {
  width: 64px;
  height: 64px;
  border-radius: 100px;
  padding: 16px;
  border: none;
  background: #FFFFFF;
  cursor: pointer;
  box-shadow: 0px 0px 24px 1px #2F2F2F0A,
    0px 1px 1px -0.5px #2F2F2F0A,
    0px 3px 3px -1.5px #2F2F2F0A,
    0px 6px 6px -3px #2F2F2F0A,
    0px 12px 12px -6px #2F2F2F0A,
    0px 24px 24px -12px #2F2F2F0A,
    0px 0px 0px 1px #2F2F2F0A;
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-card-share-icon-btn::before {
  content: '';
  width: 32px;
  height: 32px;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  border-radius: 4px;
}

.news-card-share-icon-btn:nth-child(1)::before {
  background-image: url('../news/icons/vk.svg');
}

.news-card-share-icon-btn:nth-child(2)::before {
  background-image: url('../news/icons/wa.svg');
}

.news-card-share-icon-btn:nth-child(3)::before {
  background-image: url('../news/icons/tg.svg');
}

.news-card-share-icon-btn:nth-child(4)::before {
  background-image: url('../news/icons/yt.svg');
}

.news-card-share-icon-btn:nth-child(5)::before {
  background-image: url('../news/icons/rt.svg');
}

/* Подзаголовок Фотографии */
.news-card-photos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.news-card-photos-title {
  font-family: 'SF Pro', system-ui, -apple-system, sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 100%;
  letter-spacing: -0.01em;
  color: #2B2B2B;
  margin: 0;
}

.news-card-photos-hint {
  font-family: 'SF Pro', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 100%;
  letter-spacing: -0.01em;
  color: #BABABA;
}

/* Сетка фото */
.news-card-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
}

.news-card-gallery-item {
  width: 100%;
  height: 225px;
  background: #EFEFEF;
  border-radius: 16px;
  box-sizing: border-box;
  padding: 0;
  border: none;
  cursor: pointer;
  overflow: hidden;
  display: block;
}

.news-card-gallery-item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  vertical-align: top;
}

.news-card-more-photos-wrap {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.news-card-more-photos-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'SF Pro', system-ui, -apple-system, sans-serif;
  font-weight: 510;
  font-size: 16px;
  line-height: 100%;
  letter-spacing: -0.01em;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0 0 4px;
  position: relative;
  color: #108669;
}

.news-card-more-photos-arrow {
  display: inline-flex;
  flex-shrink: 0;
  transform: rotate(-90deg);
}

.news-card-more-photos-arrow--up {
  transform: rotate(90deg);
}

.news-card-more-photos-arrow svg {
  display: block;
}

.news-card-more-photos-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: #108669;
}

/* Правая колонка — сайдбар */
.news-card-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-radius: 48px;
  padding: 24px;
  background: #FFFFFF;
  box-shadow: 0px 0px 24px 1px #2F2F2F0A,
    0px 1px 1px -0.5px #2F2F2F0A,
    0px 3px 3px -1.5px #2F2F2F0A,
    0px 6px 6px -3px #2F2F2F0A,
    0px 12px 12px -6px #2F2F2F0A,
    0px 24px 24px -12px #2F2F2F0A,
    0px 0px 0px 1px #2F2F2F0A;
  top: 32px;
}

.news-card-sidebar-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.news-card-sidebar-item:hover .news-card-sidebar-title {
  color: #108669;
}

.news-card-sidebar-photo-wrap {
  width: 100%;
  height: 250px;
  border-radius: 24px;
  overflow: hidden;
  background: #EFEFEF;
}

.news-card-sidebar-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-card-sidebar-date {
  font-family: 'SF Pro', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 100%;
  letter-spacing: -0.01em;
  color: #BABABA;
  margin: 0;
}

.news-card-sidebar-title {
  font-family: 'SF Pro', system-ui, -apple-system, sans-serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 100%;
  letter-spacing: -0.01em;
  color: #2B2B2B;
  margin: 0;
  transition: color 0.2s;
}

.news-card-all-news-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 36px;
  padding: 16px 32px;
  border: 1px solid #108669;
  background: #FFFFFF;
  font-family: 'SF Pro', system-ui, -apple-system, sans-serif;
  font-weight: 590;
  font-size: 20px;
  line-height: 100%;
  letter-spacing: -0.01em;
  color: #108669;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  margin-top: 8px;
}

.news-card-all-news-btn:hover {
  background: #108669;
  color: #FFFFFF;
}

@media (max-width: 1200px) {
  .news-card-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
    margin-bottom: 8px;
  }

  .news-card-sidebar-item:hover .news-card-sidebar-title {
    color: #2B2B2B;
  }

  .news-card-all-news-btn {
    grid-column: 1 / -1;
    justify-self: stretch;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .news-card-two-col {
    gap: 24px;
  }

  .news-card-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    box-shadow: none;
  }

  .news-card-sidebar-item {
    display: none;
  }

  .news-card-all-news-btn {
    width: 100%;
    margin-top: 0;
    padding: 12px 24px;
    font-size: 16px;
  }
}

.news-card-page--lightbox-open > .header {
  display: none;
}

/* Лайтбокс галереи */
.news-card-lightbox {
  position: fixed;
  inset: 0;
  z-index: 7000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 0;
  box-sizing: border-box;
}

.news-card-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: #292929E5;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.news-card-lightbox-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1500px;
  margin-left: auto;
  margin-right: auto;
  padding-inline: clamp(24px, calc(100px - (1500px - 100vw) * 76px / 416px), 100px);
  padding-bottom: 32px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.news-card-lightbox-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 80px;
}

.news-card-lightbox-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding-left: 96px;
  padding-right: 96px;
  box-sizing: border-box;
}

.news-card-lightbox-counter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 24px;
  border-radius: 100px;
  background: #FFFFFF;
  box-shadow: 0px 0px 24px 1px #2F2F2F0A,
    0px 1px 1px -0.5px #2F2F2F0A,
    0px 3px 3px -1.5px #2F2F2F0A,
    0px 6px 6px -3px #2F2F2F0A,
    0px 12px 12px -6px #2F2F2F0A,
    0px 24px 24px -12px #2F2F2F0A,
    0px 0px 0px 1px #2F2F2F0A;
  font-family: 'SF Pro', system-ui, -apple-system, sans-serif;
  font-weight: 510;
  font-size: 24px;
  line-height: 100%;
  letter-spacing: -0.01em;
  color: #108669;
}

.news-card-lightbox-close {
  width: 64px;
  height: 64px;
  border-radius: 100px;
  padding: 12px;
  background: #FFFFFF;
  box-shadow: 0px 0px 24px 1px #2F2F2F0A,
    0px 1px 1px -0.5px #2F2F2F0A,
    0px 3px 3px -1.5px #2F2F2F0A,
    0px 6px 6px -3px #2F2F2F0A,
    0px 12px 12px -6px #2F2F2F0A,
    0px 24px 24px -12px #2F2F2F0A,
    0px 0px 0px 1px #2F2F2F0A;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.news-card-lightbox-close-x {
  width: 20px;
  height: 20px;
  position: relative;
  flex-shrink: 0;
}

.news-card-lightbox-close-x::before,
.news-card-lightbox-close-x::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 2px;
  background: #108669;
  transform: translate(-50%, -50%) rotate(45deg);
}

.news-card-lightbox-close-x::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.news-card-lightbox-photo-row {
  display: flex;
  align-items: center;
  gap: 32px;
  width: 100%;
  min-width: 0;
}

.news-card-lightbox-arrow {
  width: 64px;
  height: 64px;
  border-radius: 100px;
  padding: 12px;
  background: #108669;
  box-shadow: 0px 5px 15px 0px #10866959;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #FFFFFF;
}

.news-card-lightbox-arrow:hover {
  opacity: 0.9;
}

.news-card-lightbox-arrow svg {
  display: block;
  width: 12px;
  height: 26px;
}

.news-card-lightbox-arrow--prev svg {
  transform: none;
}

.news-card-lightbox-arrow--next svg {
  transform: rotate(180deg);
}

.news-card-lightbox-photo-wrap {
  flex: 1;
  min-width: 0;
  aspect-ratio: 1472 / 800;
  border-radius: 24px;
  overflow: hidden;
  background: #000;
}

.news-card-lightbox-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-card-lightbox-photo-track {
  display: flex;
  height: 100%;
  will-change: transform;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.news-card-lightbox-photo-track--instant {
  transition: none;
}

.news-card-lightbox-photo-slide {
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
}

.news-card-lightbox-photo-wrap--swipe {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  opacity: 0;
}

.news-card-lightbox-photo-wrap--swipe.news-card-lightbox-photo-wrap--ready {
  opacity: 1;
}

.news-card-lightbox-photo-wrap--swipe.news-card-lightbox-photo-wrap--dragging {
  cursor: grabbing;
}

@media (max-width: 1023px) {
  .news-card-lightbox-inner {
    padding-inline: 20px;
  }

  .news-card-lightbox-content {
    gap: 40px;
  }

  .news-card-lightbox-counter {
    font-size: 20px;
  }

  .news-card-lightbox-close {
    width: 48px;
    height: 48px;
  }

  .news-card-lightbox-photo-row {
    gap: 16px;
  }

  .news-card-lightbox-arrow {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 768px) {
  .news-card-lightbox-top {
    padding-inline: 0;
  }

  .news-card-lightbox-counter {
    font-size: 14px;
  }

  .news-card-lightbox-close {
    width: 28px;
    height: 28px;
    padding: 0;
  }

  .news-card-lightbox-close-x {
    width: 15px;
    height: 15px;
  }

  .news-card-lightbox-arrow {
    display: none;
  }

  .news-card-hero-container {
    padding-inline: 20px;
  }

  .news-card-hero-section {
    margin-bottom: 64px;
  }

  .news-card-main {
    gap: 16px;
  }

  .news-card-page .news-card-main .news-card-title {
    font-size: 28px;
  }

  .news-card-page .news-card-main .news-card-date {
    font-size: 14px;
  }

  .news-card-text {
    font-size: 14px;
  }

  .news-card-text p {
    margin-bottom: 10px;
  }

  .news-card-share-icon-btn {
    width: auto;
    height: auto;
    padding: 8px;
  }

  .news-card-share-icon-btn::before {
    width: 26px;
    height: 26px;
  }

  .news-card-photos-title {
    font-size: 20px;
  }

  .news-card-photos-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .news-card-more-photos-btn {
    font-size: 14px;
  }
}

@media (max-width: 700px) {
  .news-card-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .news-card-gallery {
    grid-template-columns: 1fr;
  }
}

/* У секции overflow:hidden и не было нижнего отступа — тень у карточек
   внизу обрезалась ровно по краю. Даём место под тень, а внешний отступ
   уменьшаем на столько же, чтобы расстояние до подвала не изменилось. */
.news-card-hero-section {
  padding-bottom: 40px;
  margin-bottom: 120px;
}

@media (max-width: 768px) {
  .news-card-hero-section {
    margin-bottom: 24px;
  }
}
