/* ====== News page (news.css) ====== */
:root{
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;

  --brand: #f59e0b;      /* оранжевый (под ваш сайт) */
  --brand-2: #111827;    /* тёмный */
  --accent: #2563eb;     /* синий (для ссылок/фокуса) */

  --radius: 14px;
  --shadow: 0 10px 25px rgba(17, 24, 39, .08);
}

/* Если у вас уже есть глобальные стили — эти классы не сломают верстку,
   но лучше обернуть контент в контейнеры с классами из примера ниже. */

.news-page{
  background: var(--light-bg);
  padding: 26px 0 60px;
}

.news-container{
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

/* ====== Заголовки секций ====== */
.news-section-title{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
}

.news-section-title h2{
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
  color: var(--brand-2);
  font-weight: 800;
}

.news-section-title .hint{
  color: var(--muted);
  font-size: 14px;
}

/* ====== Админ блок (форма) ====== */
.news-admin{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 18px;
}

.news-admin h2{
  margin: 0 0 10px;
  font-size: 20px;
}

.news-error{
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c;
  padding: 10px 12px;
  border-radius: 12px;
  margin: 10px 0 14px;
  font-size: 14px;
}

.news-admin form{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.news-field label{
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.news-input,
.news-textarea{
  width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.news-textarea{
  min-height: 110px;
  resize: vertical;
}

.news-file{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.news-btn{
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 11px 14px;
  font-weight: 700;
  cursor: pointer;
  background: var(--brand);
  color: #111827;
  transition: transform .05s ease, filter .15s ease, background .15s ease;
}

.news-btn:hover{
  filter: brightness(.98);
}

.news-btn:active{
  transform: translateY(1px);
}

.news-btn:focus-visible{
  outline: 3px solid rgba(37, 99, 235, .25);
  outline-offset: 2px;
}

/* ====== Список новостей ====== */
.news-list{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 900px){
  .news-list{
    grid-template-columns: 1fr 1fr;
  }
}

.news-card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(17, 24, 39, .05);
  padding: 14px;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.news-card:hover{
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, .45);
  box-shadow: 0 14px 30px rgba(17, 24, 39, .10);
}

.news-card h3{
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 850;
  color: var(--brand-2);
}

.news-card .news-meta{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.news-card .news-author{
  color: var(--muted);
}

.news-card .news-image{
  width: 100%;
  max-height: 190px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(229, 231, 235, .9);
  margin: 0 0 10px;
  display: block;
}

.news-card .news-short{
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 10px;
}

/* <details> */
.news-card details{
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}

.news-card summary{
  cursor: pointer;
  font-weight: 700;
  color: var(--brand-2);
  list-style: none;
}

.news-card summary::-webkit-details-marker{
  display: none;
}

.news-card summary::after{
  content: "▼";
  float: right;
  color: var(--muted);
  font-size: 12px;
  transform: translateY(1px);
  transition: transform .15s ease;
}

.news-card details[open] summary::after{
  transform: translateY(1px) rotate(180deg);
}

.news-card .news-full{
  margin: 10px 0 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

/* Действия (лайк) */
.news-actions{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.news-like-form{
  margin: 0;
}

.news-like-btn{
  border: 1px solid rgba(245, 158, 11, .55);
  background: rgba(245, 158, 11, .10);
  color: var(--brand-2);
  border-radius: 12px;
  padding: 9px 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background .15s ease, transform .05s ease, border-color .15s ease;
}

.news-like-btn:hover{
  background: rgba(245, 158, 11, .18);
  border-color: rgba(245, 158, 11, .8);
}

.news-like-btn:active{
  transform: translateY(1px);
}

.news-like-count{
  color: var(--muted);
  font-weight: 700;
}

/* ====== Кнопки/инпуты в фокусе ====== */
.news-input:focus,
.news-textarea:focus{
  border-color: rgba(37, 99, 235, .55);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .15);
}

/* ====== Мелкие утилиты ====== */
.news-empty{
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  color: var(--muted);
}
