/* ─── Список новостей /news ─────────────────────────────────────────────── */

.news-page {
  max-width: 1100px;
  margin: 0 auto 4rem;
  padding: 0 1.25rem 2rem;
  color: #e8eaef;
}

.news-hero {
  text-align: center;
  padding: 2.5rem 1rem 2rem;
  margin-bottom: 1.5rem;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(220, 53, 69, 0.6), rgba(18, 22, 32, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.news-hero-label {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ff8a9a;
}

.news-hero-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: #fff;
}

.news-hero-sub {
  margin: 0;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  color: #aeb4c5;
  line-height: 1.5;
}

.news-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.85rem 1rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

@media (max-width: 540px) {
  .news-toolbar {
    flex-wrap: wrap;
  }

  .news-search-wrap {
    flex: 1 1 100%;
  }

  .news-write-btn {
    width: 100%;
    justify-content: center;
  }
}

.news-write-btn {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.15rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  white-space: nowrap;
  background: linear-gradient(135deg, #dc3545, #b02a37);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 24px rgba(220, 53, 69, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.news-write-btn:hover {
  color: #fff;
  filter: brightness(1.06);
  box-shadow: 0 10px 28px rgba(220, 53, 69, 0.35);
}

.news-write-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.4);
}

.news-search-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-width: none;
}

.news-search {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 14, 20, 0.85);
  color: #fff;
  font-size: 0.95rem;
}

.news-search:focus {
  outline: none;
  border-color: rgba(220, 53, 69, 0.55);
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

.news-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
}

.news-search-icon::after {
  content: '';
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 6px;
  height: 2px;
  background: rgba(255, 255, 255, 0.25);
  transform: rotate(45deg);
  border-radius: 1px;
}

.news-list {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.news-list.loaded .news-card {
  opacity: 1;
  transform: translateY(0);
}

.news-card {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(18, 21, 28, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.news-card:hover {
  border-color: rgba(220, 53, 69, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.news-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.news-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0a0c12;
}

.news-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.news-card:hover .news-card-media img {
  transform: scale(1.04);
}

.news-kind {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.news-kind--news {
  background: linear-gradient(90deg, #3b82f6, #6366f1);
  color: #fff;
}

.news-kind--patch {
  background: linear-gradient(90deg, #dc3545, #f97316);
  color: #fff;
}

.news-kind--large {
  position: static;
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 0.78rem;
  padding: 0.35rem 0.85rem;
}

.news-card-body {
  padding: 1rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-card-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
}

.news-card-excerpt {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #9aa3b5;
  flex: 1;
}

.news-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  font-size: 0.8rem;
  color: #6b7280;
}

.news-card-author::before {
  content: '· ';
}

.news-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1.5rem;
  border-radius: 16px;
  background: rgba(18, 21, 28, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  color: #aeb4c5;
}

/* ─── Страница материала (ширина как у обычной статьи: .article-page 60vw) ─ */

.news-post-wrap {
  width: 100%;
  max-width: none;
  margin: 0 auto 3rem;
  padding: 0 clamp(0.75rem, 2.5vw, 1.5rem) 2.5rem;
  box-sizing: border-box;
}

/* Крошки: тот же визуальный язык, что у карточек новостей / блоков #20232a — читаемо на любом фоне */
.news-post-breadcrumb {
  max-width: 60vw;
  margin: 1rem auto 1.35rem;
  padding: 0.85rem 1.15rem;
  box-sizing: border-box;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 3px solid rgba(220, 53, 69, 0.85);
  background-color: #20232a;
  background-image: linear-gradient(165deg, rgba(220, 53, 69, 0.14), rgba(32, 35, 42, 0.99));
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.42);
}

.news-post-bc-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #c5cad8;
}

.news-post-bc-item {
  display: inline-flex;
  align-items: center;
  color: #aeb4c5;
}

.news-post-bc-item + .news-post-bc-item::before {
  content: '\203a';
  margin-right: 0.45rem;
  color: rgba(220, 53, 69, 0.75);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1;
  user-select: none;
}

.news-post-bc-item a {
  color: #e8eaef;
  text-decoration: none;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  margin: -0.25rem -0.5rem;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.news-post-bc-item a:hover {
  color: #fff;
  background: rgba(220, 53, 69, 0.22);
  box-shadow: 0 0 0 1px rgba(220, 53, 69, 0.35);
}

.news-post-bc-item a:focus-visible {
  outline: none;
  color: #fff;
  background: rgba(220, 53, 69, 0.18);
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.55);
}

.news-post-bc-item--current {
  color: #fff;
  font-weight: 700;
}

@media (max-width: 992px) {
  .news-post-breadcrumb {
    max-width: 80vw;
  }
}

@media (max-width: 768px) {
  .news-post-breadcrumb {
    max-width: 95vw;
    padding: 0.75rem 1rem;
  }

  .news-post-bc-list {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .news-post-wrap {
    padding-left: 0;
    padding-right: 0;
  }

  .news-post-breadcrumb {
    max-width: none;
    width: calc(100% - 1.5rem);
    margin-left: auto;
    margin-right: auto;
    border-radius: 12px;
  }
}

.news-post-header {
  margin-bottom: 1rem;
}

.news-post-title {
  margin-top: 0.25rem;
}

.news-post--patch .news-post-content {
  border-left: 3px solid rgba(220, 53, 69, 0.6);
  padding-left: 1rem;
}

.news-post-meta {
  margin-top: 2rem;
}

/* Редактор админки — в одной теме с лентой /new-article (#20232a, акцент #dc3545) */
.news-editor-head .news-editor-back {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  margin: 0 0 1.25rem;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  font-size: 0.88rem;
  background: linear-gradient(145deg, rgba(220, 53, 69, 0.14), rgba(26, 29, 38, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.news-editor-head .news-editor-back__link {
  color: #e8eaef;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.2rem 0.35rem;
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.news-editor-head .news-editor-back__link:hover {
  color: #fff;
  background: rgba(220, 53, 69, 0.2);
  box-shadow: 0 0 0 1px rgba(220, 53, 69, 0.35);
}

.news-editor-head .news-editor-back__link:focus-visible {
  outline: none;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.65);
}

.news-editor-head .news-editor-back__sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(220, 53, 69, 0.75);
  opacity: 0.85;
}

/* Тип материала: две карточки вместо нативного списка */
.news-kind-field {
  margin-bottom: 1.35rem;
}

.news-kind-field-label {
  display: block;
  margin-bottom: 0.65rem;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
}

.news-kind-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 520px) {
  .news-kind-picker {
    grid-template-columns: 1fr;
  }
}

.news-kind-card {
  position: relative;
  display: block;
  cursor: pointer;
  margin: 0;
}

.news-kind-card input[type='radio'] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  opacity: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.news-kind-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.85rem 1rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(14, 16, 22, 0.65);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.news-kind-card:hover .news-kind-card__body {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(18, 21, 28, 0.85);
}

.news-kind-card input:focus-visible + .news-kind-card__body {
  outline: none;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.55);
}

.news-kind-card__badge {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.news-kind-card__badge--news {
  background: linear-gradient(90deg, #3b82f6, #6366f1);
  color: #fff;
}

.news-kind-card__badge--patch {
  background: linear-gradient(90deg, #dc3545, #f97316);
  color: #fff;
}

.news-kind-card__hint {
  font-size: 0.82rem;
  line-height: 1.35;
  color: #9aa3b5;
  font-weight: 500;
}

.news-kind-card input:checked + .news-kind-card__body {
  border-color: rgba(220, 53, 69, 0.45);
  background: rgba(220, 53, 69, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.news-kind-card input:checked + .news-kind-card__body .news-kind-card__hint {
  color: #c5cad8;
}
