/* ── Дополнения для WordPress ── */

/* Панель администратора WordPress сверху: сдвигаем «липкие» меню */
body.admin-bar .site-nav { top: 32px; }
body.admin-bar .sidebar { top: 84px; }
@media (max-width: 782px) {
  body.admin-bar .site-nav { top: 46px; }
}
@media (max-width: 900px) {
  body.admin-bar .sidebar { top: 90px; }
}

/* Поле поиска в шапке — форма вместо div */
.search-box input[type="search"] { -webkit-appearance: none; appearance: none; }
.search-box input[type="search"]::-webkit-search-cancel-button { display: none; }
.search-big { max-width: 560px; background: #fff; border-color: var(--green-200); }
.search-big input[type="search"] { color: var(--fg-1); width: 100%; font-size: 14px; padding: 11px 14px; }
.search-big input[type="search"]::placeholder { color: var(--fg-4); }

/* Ссылка-рубрика над новостью */
a.news-tag:hover { background: var(--green-100); }

/* Постраничная навигация */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 36px; }
.pagination .page-numbers { min-width: 38px; height: 38px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-md); border: 0.5px solid var(--green-200); background: #fff; color: var(--green-700); font-size: 13px; font-weight: 500; }
.pagination .page-numbers:hover { border-color: var(--green-600); }
.pagination .page-numbers.current { background: var(--green-600); border-color: var(--green-600); color: #fff; }
.pagination .page-numbers.dots { border: none; background: none; }

/* Текст записей и страниц, созданных в редакторе WordPress */
.entry-content { font-size: 14.5px; color: var(--fg-2); line-height: 1.85; }
.entry-content > * + * { margin-top: 14px; }
.entry-content h2 { font-family: var(--font-serif); font-weight: 400; font-size: 22px; color: var(--green-800); margin-top: 28px; }
.entry-content h3 { font-family: var(--font-serif); font-weight: 400; font-size: 18px; color: var(--green-800); margin-top: 22px; }
.entry-content ul, .entry-content ol { padding-left: 22px; }
.entry-content li + li { margin-top: 4px; }
.entry-content a { text-decoration: underline; text-decoration-color: var(--green-200); text-underline-offset: 3px; }
.entry-content blockquote { border-left: 3px solid var(--gold-500); padding: 6px 0 6px 16px; color: var(--green-800); font-family: var(--font-serif); font-style: italic; }
.entry-content img { max-width: 100%; height: auto; border-radius: var(--r-md); }
.entry-content figure { margin: 18px 0; }
.entry-content figcaption { font-size: 12px; color: var(--fg-4); margin-top: 6px; text-align: center; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 13px; }
.entry-content table th { background: var(--green-800); color: var(--fg-on-dark); padding: 10px 12px; text-align: left; font-weight: 500; }
.entry-content table td { padding: 9px 12px; border-bottom: 0.5px solid var(--border); }
.entry-content .wp-block-gallery { gap: 8px; }
.entry-content .wp-block-image img, .entry-content .news-gallery img { cursor: zoom-in; }
.entry-content video { width: 100%; max-height: 520px; border-radius: var(--r-lg); background: #000; }
.entry-content iframe { max-width: 100%; }
.aligncenter { margin-left: auto; margin-right: auto; text-align: center; }
.alignleft { float: left; margin: 4px 18px 10px 0; }
.alignright { float: right; margin: 4px 0 10px 18px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }

/* Фотогалерея и видео в новостях, перенесённых со старого сайта */
.news-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-bottom: 22px; }
.news-gallery .ng-item { display: block; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 4 / 3; background: var(--green-50); }
.news-gallery .ng-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: transform var(--dur-base) var(--ease-out); }
.news-gallery .ng-item:hover img { transform: scale(1.05); }
.news-gallery .ng-main { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.news-video { display: flex; flex-direction: column; gap: 14px; margin: 6px 0 20px; }
.news-video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--r-lg); }
.article-banner { cursor: zoom-in; }
.article-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 640px) {
  .news-gallery .ng-main { aspect-ratio: 4 / 3; }
}

/* Видео, которое смотрится в Telegram (слишком большое для сайта) */
.news-tg-video { position: relative; display: block; border-radius: var(--r-lg); overflow: hidden; margin: 6px 0 20px; background: #000; aspect-ratio: 16 / 9; text-decoration: none !important; }
.news-tg-video img { width: 100%; height: 100%; object-fit: cover; opacity: .75; border-radius: 0; transition: opacity var(--dur-base) var(--ease-out); }
.news-tg-video:hover img { opacity: .6; }
.ntv-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: #229ed9; color: #fff; padding: 12px 20px; border-radius: var(--r-pill); font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; box-shadow: var(--shadow-md); white-space: nowrap; }
