/* ============================================================
   news-cards.css
   Сетка карточек новостей + hero страницы /news + Load More
   ------------------------------------------------------------
   Зависит от: photo-filter.css (переменные --photo-filter-*)
   Используется на: /news.html и index.html (блок «Новости»)
   ============================================================ */

/* ============ NEWS PAGE HERO ============ */
.news-page__hero {
  padding:
    clamp(5rem, 12vh, 9rem)
    clamp(1.5rem, 5vw, 4rem)
    clamp(3rem, 6vh, 5rem);
  border-bottom: 1px solid rgba(27, 58, 92, 0.12);
  background: #FAF7EE;
}

.news-page__hero-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.news-page__eyebrow {
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #7A1E2E;
  margin: 0 0 16px;
}

.news-page__title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #1B3A5C;
  margin: 0 0 16px;
}

.news-page__lead {
  font-family: "Literata", Georgia, serif;
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  line-height: 1.55;
  color: #3D4454;
  max-width: 600px;
  margin: 0;
}

.news-page__content {
  max-width: 1200px;
  margin: 0 auto;
  padding:
    clamp(3rem, 6vh, 5rem)
    clamp(1.5rem, 5vw, 3rem);
}

/* ============ GRID ============ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px 32px;
}

@media (max-width: 1023px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 24px;
  }
}

@media (max-width: 639px) {
  .news-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* ============ CARD ============ */
.news-card {
  background: transparent;
  border-top: 1px solid rgba(27, 58, 92, 0.16);
  padding-top: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.news-card__body {
  flex: 1;
}

.news-card__link,
.news-card__media-link,
.news-card__title-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.news-card__media-link {
  margin-bottom: 20px;
}

.news-card__more {
  text-decoration: none;
  display: inline-block;
}

/* ============ MEDIA ============ */
.news-card__media {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #1B3A5C;       /* navy pre-load fill */
  border-radius: 2px;        /* почти sharp, институциональный код */
}

.news-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* filter/transition определены в photo-filter.css */
}

/* ============ MONOGRAM FALLBACK ============ */
/* Для новостей без фото — вместо grey box показываем монограмму
   АЖС в gold на navy-градиенте. Институциональный код + брендинг. */
.news-card__media--monogram {
  background: linear-gradient(180deg, #1B3A5C 0%, #13283F 100%);
  display: grid;
  place-items: center;
}

.news-card__monogram {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(64px, 6vw, 96px);
  color: #B8860B;
  letter-spacing: -0.02em;
  line-height: 1;
  opacity: 0.88;
}

/* ============ BADGE ============ */
.news-card__badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: #FAF7EE;
  color: #1B3A5C;
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid rgba(27, 58, 92, 0.18);
}

/* ============ BODY ============ */
.news-card__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-card__date {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7A1E2E;
}

.news-card__title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 400;
  font-style: italic;
  font-size: clamp(20px, 1.6vw, 26px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #1B3A5C;
  margin: 0;
  transition: color 300ms ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card__excerpt {
  font-family: "Literata", Georgia, serif;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(27, 58, 92, 0.78);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card__excerpt.is-expanded {
  -webkit-line-clamp: unset;
  overflow: visible;
}

.news-card__expand {
  display: none;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #6B7280;
  padding: 4px 0;
  margin-top: 4px;
  transition: color 200ms ease;
  width: fit-content;
}

.news-card__expand:hover {
  color: #B8860B;
}

.news-card__expand svg {
  width: 14px;
  height: 14px;
  transition: transform 300ms ease;
}

.news-card__expand.is-expanded svg {
  transform: rotate(180deg);
}

.news-card__more {
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #B8860B;
  margin-top: 4px;
  position: relative;
  width: fit-content;
}

.news-card__more::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: #B8860B;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 500ms cubic-bezier(.2, .7, .2, 1);
}

/* ============ HOVER ============ */
@media (hover: hover) {
  .news-card__title-link:hover,
  .news-card:hover .news-card__title-link {
    color: #7A1E2E;
  }

  .news-card__more:hover::after,
  .news-card:hover .news-card__more::after {
    transform: scaleX(1);
  }

  .news-card__media-link:focus-visible,
  .news-card__title-link:focus-visible,
  .news-card__more:focus-visible {
    outline: 2px solid #B8860B;
    outline-offset: 4px;
  }
}

/* ============ LOAD MORE ============ */
.news-page__load-more {
  text-align: center;
  padding: clamp(3rem, 5vh, 4rem) 0;
  border-top: 1px solid rgba(27, 58, 92, 0.08);
  margin-top: clamp(2rem, 4vh, 3rem);
}

.news-page__load-btn {
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1B3A5C;
  background: transparent;
  border: 1px solid rgba(27, 58, 92, 0.2);
  padding: 14px 40px;
  cursor: pointer;
  transition: all 300ms ease;
}

.news-page__load-btn:hover {
  border-color: #B8860B;
  color: #B8860B;
}

.news-page__load-btn:focus-visible {
  outline: 2px solid #B8860B;
  outline-offset: 3px;
}

.news-page__load-btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.news-page__count {
  display: block;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  color: #6B7280;
  margin-top: 12px;
  letter-spacing: 0.08em;
}

/* ============ SCROLL REVEAL (GSAP helper) ============
   Карточки всегда видны в базе. GSAP `gsap.from()` с immediateRender
   ставит начальное состояние (opacity:0, y:28) до первого кадра и
   анимирует к видимому. Если JS не загрузился — карточки уже на месте. */
.js-gsap-reveal .news-card[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
}

@media (prefers-reduced-motion: reduce) {
  .js-gsap-reveal .news-card[data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   NEWS FILTER TABS
   ============================================================ */
.news-filter {
  display: flex;
  gap: 4px;
  margin-bottom: 32px;
  padding: 4px;
  background: var(--paper-deep, #F2EBD8);
  width: fit-content;
}
.news-filter__tab {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 10px 24px;
  background: none;
  border: none;
  color: var(--ink-muted, #6B7280);
  cursor: pointer;
  transition: color 200ms ease, background 200ms ease;
}
.news-filter__tab:hover {
  color: var(--navy, #1B3A5C);
}
.news-filter__tab--active {
  background: var(--paper, #FAF7EE);
  color: var(--navy, #1B3A5C);
  font-weight: 600;
}
.news-card[data-hidden="true"] {
  display: none !important;
}

/* Placeholder media for cards without photo */
.news-card__media--placeholder {
  aspect-ratio: 3 / 2;
  background: linear-gradient(135deg, var(--navy, #1B3A5C) 0%, var(--navy-dark, #0F2440) 100%);
  display: flex;
  align-items: flex-end;
  padding: 16px;
}

/* News language note (visible only on RU/EN) */
.news-lang-note {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--ink-muted, #6B7280);
  font-style: italic;
  margin-top: 12px;
}
.news-lang-note:empty { display: none; }
