/* =========================================================
   NEWS (app-like) — list + single
   Файл: public/assets/news.css (заменить целиком)
   ========================================================= */

.news-page,
.news-single-page{
  padding-top: 14px;
}

/* ===== LIST PAGE WRAP ===== */
.news-page{
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 16px 32px;
}

.news-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom: 18px;
}

.news-empty{
  margin-top:10px;
  color: rgba(107,114,128,.95);
}

/* ===== LIST GRID ===== */
.news-grid{
  display:grid;
  gap: 12px;
  grid-template-columns: 1fr; /* mobile-first */
}

@media (min-width: 760px){
  .news-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1100px){
  .news-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ===== CARD ===== */
.news-card{
  position: relative; /* для бейджей */
  background:#fff;
  border-radius:14px;
  overflow:hidden;
  border:1px solid rgba(148,163,184,.20);
  box-shadow:0 6px 18px rgba(15,23,42,.06);
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.news-card:hover{
  transform: translateY(-3px);
  box-shadow:0 10px 26px rgba(15,23,42,.12);
  border-color: rgba(59,130,246,.35);
}

/* вся карточка кликабельна */
.news-card-link{
  display:flex;
  flex-direction:column;
  color:inherit;
  text-decoration:none;
}

/* media */
.news-card-media{
  position: relative;
  background: rgba(241,245,249,.8);
}

.news-card-img{
  display:block;
  width:100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.news-card-placeholder{
  width:100%;
  aspect-ratio: 16 / 9;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 32px;
  color: rgba(107,114,128,.85);
}

/* badges (вынесены из <a>) */
.news-card-badges{
  position:absolute;
  top: 10px;
  right: 10px;
  display:flex;
  gap: 8px;
  z-index: 3;
}

.news-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(148,163,184,.35);
  font-size:12px;
  font-weight:800;
  color: rgba(15,23,42,.96);
  backdrop-filter: blur(6px);
}

.news-badge-num{ font-weight: 900; }

.news-badge-btn{
  cursor:pointer;
  text-decoration:none;
  color: inherit;
}

.news-fav-btn.is-active{
  background: rgba(255, 245, 200, .92);
  border-color: rgba(245, 158, 11, .55);
}

.news-fav-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

/* body */
.news-card-body{
  padding: 12px 14px 14px;
  display:flex;
  flex-direction: column;
  gap: 6px;
}

.news-card-meta{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 8px;
  font-size: .78rem;
  color: rgba(107,114,128,.95);
}

.news-date{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:2px 8px;
  border-radius:999px;
  background: rgba(29,78,216,.06);
  color: rgba(29,78,216,.95);
  font-weight: 700;
  white-space: nowrap;
}

.news-card-title{
  margin: 2px 0 0;
  font-size: 1rem;
  line-height: 1.25;
  font-weight: 900;
  color: rgba(15,23,42,.96);
}

.news-card-excerpt{
  margin: 2px 0 0;
  font-size: .9rem;
  line-height: 1.5;
  color: rgba(75,85,99,.96);
}

/* pagination */
.news-pagination{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.news-page-link{
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.80);
  text-decoration:none;
  color: rgba(29,78,216,.95);
  font-weight: 800;
  background: #fff;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.news-page-link:hover{
  background: rgba(29,78,216,.95);
  color: #fff;
  border-color: rgba(29,78,216,.95);
}

.news-page-info{
  color: rgba(107,114,128,.95);
  font-weight: 800;
}

.news-page-bottom-space{
  height: 10px;
}

@media (max-width: 768px){
  .news-page{
    padding:16px 10px 24px;
  }
  .news-header{
    margin-bottom:12px;
  }
  .news-grid{
    grid-template-columns:1fr;
    gap:10px;
  }
  .news-card{
    border-radius:12px;
    box-shadow:0 4px 14px rgba(15,23,42,.05);
  }
  .news-card-body{
    padding:10px 12px 12px;
    gap:4px;
  }
  .news-card-title{
    font-size:.98rem;
  }
  .news-card-excerpt{
    font-size:.86rem;
  }
  .news-date{
    font-size:.75rem;
    padding:2px 7px;
  }
  .news-pagination{
    margin-top:18px;
    gap:8px;
  }
  .news-page-link{
    padding:5px 10px;
    font-size:.85rem;
  }
  .news-page-info{
    font-size:.85rem;
  }
}

/* =========================================================
   SINGLE — достойная статья (ПК + мобилки)
   ========================================================= */

/* контейнер у тебя общий .container — тут делаем “статью” уже */
.news-single-page{
  /* container уже даёт max-width и паддинги,
     тут просто добавим вертикальный ритм */
  padding-bottom: 24px;
}

.news-single{
  max-width: 920px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(2,6,23,.06);
  padding: 14px;
}

@media (min-width: 760px){
  .news-single{
    padding: 18px 20px;
  }
}

@media (max-width: 520px){
  .news-single{
    border-radius: 16px;
    padding: 12px;
  }
}

/* topbar */
.news-topbar{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.news-back{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,.22);
  background: rgba(241,245,249,.70);
  font-weight: 900;
  color: rgba(15,23,42,.92);
  text-decoration:none;
}
.news-back:hover{ filter: brightness(0.98); text-decoration:none; }

.news-actions{
  display:flex;
  align-items:center;
  gap: 8px;
  flex-wrap: wrap;
}

.news-action-btn{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.22);
  background: #fff;
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition: transform .08s ease, filter .15s ease, border-color .15s ease;
}
.news-action-btn:hover{ filter: brightness(0.98); border-color: rgba(0,136,204,.35); }
.news-action-btn:active{ transform: translateY(1px); }
.news-action-btn.is-ok{
  border-color: rgba(34,197,94,.35);
  background: rgba(220,252,231,.65);
}

.admin-edit-btn{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.22);
  background: #fff;
  font-weight: 900;
  color: rgba(15,23,42,.92);
  text-decoration:none;
  transition: filter .15s ease, border-color .15s ease;
}
.admin-edit-btn:hover{ filter: brightness(0.98); border-color: rgba(0,136,204,.35); text-decoration:none; }

@media (max-width: 520px){
  .admin-edit-text{ display:none; }
}

/* head */
.news-head{
  margin-bottom: 12px;
}

.news-title{
  margin: 0 0 10px;
  font-size: clamp(22px, 4.5vw, 34px);
  line-height: 1.15;
  font-weight: 950;
  color: rgba(15,23,42,.98);
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* chips */
.news-meta-row{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.news-chip{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.22);
  background: rgba(241,245,249,.65);
  font-size: 12px;
  font-weight: 900;
  color: rgba(15,23,42,.92);
  text-decoration:none;
}
.news-chip-link{
  background: rgba(0,136,204,.06);
  border-color: rgba(0,136,204,.20);
  color: rgba(0,136,204,.95);
}
.news-chip-link:hover{ text-decoration:none; filter: brightness(0.98); }

/* hero — ключевое: НЕ гигантский */
.news-hero{
  margin-top: 12px;
  margin-bottom: 14px;
  border-radius: 16px;
  overflow:hidden;
  border: 1px solid rgba(148,163,184,.20);
  background: rgba(2,6,23,.92); /* подложка, если object-fit:contain */
  box-shadow: 0 10px 26px rgba(2,6,23,.06);
}

.news-hero-img{
  display:block;
  width: 100%;
  height: auto;
  max-height: min(60vh, 520px); /* ✅ чтобы не раздувало страницу */
  object-fit: contain;          /* ✅ портреты не “режем”, а вписываем */
  margin: 0 auto;
}

@media (max-width: 520px){
  .news-hero-img{
    max-height: min(46vh, 360px);
  }
}

/* body — типографика статьи */
.news-body{
  padding-top: 6px;
}

/* подсобные отступы для контента внутри .ui-prose */
.news-body.ui-prose{
  font-size: 16px;
  line-height: 1.75;
  color: rgba(15,23,42,.92);
}

.news-body.ui-prose h2,
.news-body.ui-prose h3{
  margin: 18px 0 10px;
  line-height: 1.25;
}

.news-body.ui-prose blockquote{
  margin: 12px 0;
  padding: 10px 12px;
  border-left: 4px solid rgba(0,136,204,.35);
  background: rgba(241,245,249,.65);
  border-radius: 12px;
}

.news-body.ui-prose img{
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.18);
  box-shadow: 0 8px 18px rgba(2,6,23,.06);
}

/* sections */
.news-section{
  margin-top: 16px;
  padding-top: 8px;
  border-top: 1px solid rgba(148,163,184,.16);
}

.news-section-head{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.news-section-title{
  margin: 0;
  font-size: 1.05rem;
  font-weight: 950;
  color: rgba(15,23,42,.95);
}

.news-section-sub{
  font-size: 12px;
  font-weight: 900;
  color: rgba(107,114,128,.92);
}

/* videos */
.news-videos{
  display:flex;
  flex-direction: column;
  gap: 10px;
}

.news-video-wrap{
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(148,163,184,.22);
  background: #000;
  box-shadow: 0 10px 26px rgba(2,6,23,.08);
}

.news-video{
  width: 100%;
  height: auto;
  display:block;
}

/* gallery */
.news-gallery{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 760px){
  .news-gallery{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.news-photo-thumb{
  display:block;
  border-radius: 14px;
  overflow:hidden;
  border: 1px solid rgba(148,163,184,.22);
  box-shadow: 0 8px 18px rgba(2,6,23,.06);
  background: #fff;
  transition: transform .12s ease, box-shadow .15s ease;
}

.news-photo-thumb:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(2,6,23,.08);
}

.news-photo-thumb img{
  width:100%;
  height: 110px;
  object-fit: cover;
  display:block;
}

@media (min-width: 760px){
  .news-photo-thumb img{ height: 120px; }
}

/* tables wrap in body */
.news-body .table-wrap{
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.18);
  background: #fff;
}

.news-body table{
  border-collapse: collapse;
  min-width: 520px;
}

.news-body table td,
.news-body table th{
  border: 1px solid rgba(0,0,0,0.12);
  padding: 8px;
  vertical-align: top;
}

/* bottom */
.news-bottom{
  margin-top: 16px;
  display:flex;
  justify-content: flex-start;
}

.back-link{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,.22);
  background: rgba(241,245,249,.70);
  font-weight: 900;
  color: rgba(15,23,42,.92);
  text-decoration:none;
}
.back-link:hover{ filter: brightness(0.98); text-decoration:none; }

