/* ═══ Наше життя — лента новин ═══ */

.nasha-zhyttya-hero {
  padding-top: calc(5rem + var(--space-xl));
  padding-bottom: var(--space-md);
}
.nasha-zhyttya-hero .section__title {
  margin-bottom: var(--space-sm);
}
.nasha-zhyttya-hero .section__subtitle {
  margin-bottom: 0;
  font-size: 1rem;
  opacity: 0.9;
}

/* ─── Лента ─── */
.news-feed__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-lg);
}

.news-card {
  display: block;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
  text-decoration: none;
  color: inherit;
}
.news-card:hover {
  box-shadow: var(--shadow-lg), var(--glow-blue);
  transform: translateY(-4px);
}

.news-card__img {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}
.news-card__placeholder {
  color: rgba(255, 255, 255, 0.15);
  font-size: 2.5rem;
}
.news-card__img .news-card__media,
.news-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-card__body {
  padding: var(--space-lg);
}
.news-card__title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}
.news-card__excerpt {
  font-size: 0.9375rem;
  color: var(--text-2);
  line-height: 1.5;
  margin-bottom: var(--space-sm);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card__date {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ─── Деталі статті ─── */
.news-detail__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--space-lg);
  transition: color 0.2s ease;
}
.news-detail__back:hover {
  color: var(--blue);
}

.news-detail__header {
  margin-bottom: var(--space-lg);
}
.news-detail__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}
.news-detail__date {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: var(--space-sm);
}
.news-detail__share {
  margin-top: var(--space-sm);
}

.news-detail__cover {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-xl);
  line-height: 0;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.news-detail__cover-media {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}
.news-detail__cover-video-wrap {
  position: relative;
  display: inline-block;
  width: 100%;
}
.news-detail__cover-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: background 0.2s ease, transform 0.2s ease;
}
.news-detail__cover-play:hover {
  background: rgba(96, 165, 250, 0.9);
  transform: translate(-50%, -50%) scale(1.05);
}
.news-detail__cover-play.is-playing {
  opacity: 0.7;
}
.news-detail__cover-play.is-playing:hover {
  opacity: 1;
}

.news-detail__content {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: var(--space-2xl);
}
.news-detail__content p {
  margin-bottom: var(--space-md);
}
.news-detail__content p:last-child {
  margin-bottom: 0;
}

/* ─── Карусель галереї ─── */
.news-gallery {
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.news-gallery__title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.news-gallery__carousel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
}
.news-gallery__arrow {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}
.news-gallery__arrow:hover {
  background: rgba(96, 165, 250, 0.2);
  color: var(--blue);
}

.news-gallery__track {
  flex: 1;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  min-height: 200px;
  max-width: 720px;
}
.news-gallery__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.news-gallery__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.news-gallery__slide .news-gallery__media {
  max-width: 100%;
  max-height: 50vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
.news-gallery__video-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.news-gallery__video-wrap .news-gallery__media {
  margin: 0 auto;
}
.news-gallery__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: background 0.2s ease, transform 0.2s ease;
}
.news-gallery__play:hover {
  background: rgba(96, 165, 250, 0.9);
  transform: translate(-50%, -50%) scale(1.05);
}
.news-gallery__play.is-playing {
  opacity: 0.7;
}
.news-gallery__play.is-playing:hover {
  opacity: 1;
}

.news-gallery__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: var(--space-md);
}
.news-gallery__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}
.news-gallery__dot:hover {
  background: rgba(255, 255, 255, 0.4);
}
.news-gallery__dot.is-active {
  background: var(--blue);
  transform: scale(1.2);
}

/* ─── Адаптив ─── */
@media (max-width: 768px) {
  .news-feed__grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  .news-detail__title {
    font-size: 1.25rem;
  }
  .news-detail__cover {
    max-width: none;
  }
  .news-gallery__track {
    max-width: none;
  }
  .news-gallery__slide .news-gallery__media {
    max-height: 60vh;
  }
  .news-gallery__carousel {
    flex-direction: row;
  }
  .news-gallery__arrow {
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
  }
}
