/* ============================================
   NUR — single.php + category.php
   Две колонки: контент + sticky-сайдбар
   ============================================ */

/* --- Хлебные крошки --- */
.nur-breadcrumbs { font-size: .875rem; color: #6b7b73; margin-bottom: 18px; line-height: 1.5; }
.nur-breadcrumbs a { color: #1a7f5a; text-decoration: none; }
.nur-breadcrumbs a:hover { text-decoration: underline; }
.nur-breadcrumbs span[aria-hidden] { margin: 0 6px; color: #b0bbb4; }
.nur-breadcrumbs__current { color: #6b7b73; }

/* --- Шапка статьи --- */
.nur-article__head { margin-bottom: 24px; }
.nur-article__title { font-size: clamp(1.8rem,4vw,2.6rem); line-height: 1.2; color: #14543a; margin: 0 0 12px; }
.nur-article__meta { font-size: .85rem; color: #8a968f; text-transform: uppercase; letter-spacing: .03em; }
.nur-article__meta time, .nur-article__author, .nur-article__reading { display: inline; }

/* --- Картинка --- */
.nur-article__thumb { margin: 0 0 28px; border-radius: 14px; overflow: hidden; }
.nur-article__thumb img { display: block; width: 100%; height: auto; }

/* --- Текст статьи --- */
.nur-article__content { font-size: 1.05rem; line-height: 1.75; color: #2c3e36; }
.nur-article__content p { margin: 0 0 1.2em; }
.nur-article__content h2 { font-size: 1.6rem; color: #14543a; margin: 1.8em 0 .6em; }
.nur-article__content h3 { font-size: 1.3rem; color: #1a7f5a; margin: 1.4em 0 .5em; }
.nur-article__content a { color: #1a7f5a; text-decoration: underline; }
.nur-article__content ul, .nur-article__content ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.nur-article__content li { margin-bottom: .5em; }
.nur-article__content img { max-width: 100%; height: auto; border-radius: 10px; }
.nur-article__content blockquote {
	border-left: 4px solid #1a7f5a; background: #f3f9f6;
	margin: 1.5em 0; padding: 14px 20px; border-radius: 0 10px 10px 0; color: #3a4a42;
}
.nur-page-links { margin: 20px 0; font-size: .9rem; }

/* --- Метки --- */
.nur-article__tags { margin-top: 30px; padding-top: 20px; border-top: 1px solid #e4ebe7; font-size: .9rem; }
.nur-tag-label { font-weight: 600; color: #6b7b73; }
.nur-article__tags a { color: #1a7f5a; text-decoration: none; }
.nur-article__tags a:hover { text-decoration: underline; }

/* --- Навигация пред./след. --- */
.nur-post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 40px 0; }
.nur-post-nav__link {
	display: block; padding: 16px 20px; background: #f6faf8;
	border-radius: 12px; text-decoration: none; color: #2c3e36;
	transition: background .2s, transform .2s;
}
.nur-post-nav__link:hover { background: #eaf4ef; transform: translateY(-2px); }
.nur-post-nav__link span { display: block; font-size: .8rem; color: #8a968f; margin-bottom: 4px; }
.nur-post-nav__link b { font-size: .95rem; line-height: 1.4; color: #14543a; }
.nur-post-nav__next { text-align: right; }
.nur-post-nav--single { grid-template-columns: 1fr; }
.nur-post-nav--single .nur-post-nav__next { text-align: left; }

/* --- Похожие статьи --- */
.nur-related { margin: 50px 0; padding-top: 36px; border-top: 1px solid #e4ebe7; }
.nur-related__title { font-size: 1.5rem; color: #14543a; margin: 0 0 24px; }
.nur-related__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.nur-related__card { background: #f6faf8; border-radius: 14px; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.nur-related__card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(20,84,58,.12); }
.nur-related__link { display: block; text-decoration: none; }
.nur-related__thumb img { display: block; width: 100%; height: 130px; object-fit: cover; }
.nur-related__heading { display: block; padding: 14px 16px; font-size: 1rem; line-height: 1.4; color: #14543a; font-weight: 600; }
.nur-related__card:hover .nur-related__heading { color: #1a7f5a; }

/* --- Виджеты сайдбара --- */
.nur-widget { background: #f6faf8; border-radius: 14px; padding: 20px; }
.nur-widget__title { font-size: 1.05rem; color: #14543a; margin: 0 0 14px; }
.nur-widget__ico { margin-right: 4px; }
.nur-widget ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.nur-widget a { color: #2c3e36; text-decoration: none; line-height: 1.45; transition: color .2s; }
.nur-widget a:hover { color: #1a7f5a; }
.nur-widget__text { font-size: .92rem; line-height: 1.55; color: #4a5a52; margin: 0 0 12px; }
.nur-widget__link { display: inline-block; color: #1a7f5a; font-weight: 600; text-decoration: none; }
.nur-widget__link:hover { text-decoration: underline; }
.nur-widget__posts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.nur-widget__posts a { color: #2c3e36; text-decoration: none; line-height: 1.45; }
.nur-widget__posts a:hover { color: #1a7f5a; }
.nur-widget__empty { color: #8a968f; font-size: .9rem; }

/* Виджет намаза — акцентный */
.nur-widget--prayer { background: linear-gradient(135deg, #14543a, #1a7f5a); color: #fff; }
.nur-widget--prayer .nur-widget__title { color: #fff; }
.nur-widget--prayer .nur-widget__text { color: rgba(255,255,255,.85); }
.nur-widget--prayer a { color: #d9f5e9; }
.nur-widget--prayer .nur-widget__link { color: #fff; text-decoration: underline; }
.nur-widget__allbtn {
	display: inline-block; margin-top: 14px; padding: 9px 18px;
	background: rgba(255,255,255,.18); color: #fff;
	font-size: .85rem; font-weight: 600; border-radius: 8px;
	text-decoration: none; transition: background .2s;
}
.nur-widget__allbtn:hover { background: rgba(255,255,255,.3); }

/* --- Заголовок рубрики --- */
.nur-archive__head { margin-bottom: 30px; }
.nur-archive__title { font-size: clamp(1.8rem,4vw,2.4rem); color: #14543a; margin: 0 0 10px; }
.nur-archive__desc { color: #6b7b73; line-height: 1.6; }

/* --- Сетка карточек --- */
.nur-posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 24px; }
.nur-card { background: #f6faf8; border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.nur-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(20,84,58,.12); }
.nur-card__thumb img { display: block; width: 100%; height: 170px; object-fit: cover; }
.nur-card__body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.nur-card__title { font-size: 1.15rem; line-height: 1.35; margin: 0; }
.nur-card__title a { color: #14543a; text-decoration: none; }
.nur-card__title a:hover { color: #1a7f5a; }
.nur-card__meta { font-size: .8rem; color: #8a968f; text-transform: uppercase; }
.nur-card__excerpt { font-size: .92rem; line-height: 1.55; color: #4a5a52; margin: 0; }
.nur-card__more { margin-top: auto; color: #1a7f5a; font-weight: 600; text-decoration: none; }
.nur-empty { padding: 40px; text-align: center; color: #8a968f; background: #f6faf8; border-radius: 14px; }

/* --- Пагинация --- */
.nur-single .nav-links { margin-top: 40px; display: flex; gap: 8px; flex-wrap: wrap; }
.nur-single .page-numbers { padding: 8px 14px; border-radius: 8px; background: #f6faf8; color: #14543a; text-decoration: none; }
.nur-single .page-numbers.current { background: #1a7f5a; color: #fff; }

/* ============================================
   КОММЕНТАРИИ
   ============================================ */
.nur-comments { margin-top: 50px; padding-top: 36px; border-top: 1px solid #e4ebe7; }
.nur-comments__title { font-size: 1.5rem; color: #14543a; margin: 0 0 28px; }
.nur-comments__title span { color: #1a7f5a; }
.nur-comments__list { list-style: none; margin: 0 0 40px; padding: 0; }
.nur-comments__list .children { list-style: none; margin: 18px 0 0; padding-left: 32px; border-left: 2px solid #e4ebe7; }
.nur-comment { margin: 0 0 18px; }
.nur-comment__body { display: flex; gap: 16px; background: #f6faf8; border-radius: 14px; padding: 18px 20px; }
.nur-comment__avatar img { display: block; width: 52px; height: 52px; border-radius: 50%; }
.nur-comment__content { flex: 1; min-width: 0; }
.nur-comment__head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.nur-comment__author { font-weight: 700; color: #14543a; }
.nur-comment__date { font-size: .78rem; color: #8a968f; }
.nur-comment__moderation { font-size: .85rem; color: #b8860b; background: #fdf6e3; padding: 6px 12px; border-radius: 8px; margin: 0 0 8px; }
.nur-comment__text { color: #2c3e36; line-height: 1.65; }
.nur-comment__text p { margin: 0 0 .8em; }
.nur-comment__text p:last-child { margin-bottom: 0; }
.nur-comment__actions { margin-top: 10px; }
.nur-comment__actions a { font-size: .82rem; font-weight: 600; color: #1a7f5a; text-decoration: none; }
.nur-comment__actions a:hover { text-decoration: underline; }
.nur-comments__closed { color: #8a968f; font-size: .9rem; margin: 0 0 30px; }
.nur-comments .comment-navigation { display: flex; justify-content: space-between; margin: 0 0 36px; }
.nur-comments .comment-navigation a { color: #1a7f5a; text-decoration: none; font-weight: 600; }

/* Форма комментария */
.comment-respond { background: #f6faf8; border-radius: 16px; padding: 28px; margin-top: 10px; }
.comment-reply-title { font-size: 1.25rem; color: #14543a; margin: 0 0 6px; }
.comment-reply-title small { font-size: .8rem; margin-left: 10px; }
.comment-reply-title small a { color: #c0392b; text-decoration: none; }
.nur-comment-form__notes { font-size: .82rem; color: #8a968f; margin: 0 0 18px; }
.nur-comment-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.nur-comment-form__field { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.nur-comment-form__field--text { grid-column: 1 / -1; }
.nur-comment-form__field--half { grid-column: span 1; }
.nur-comment-form label { font-size: .85rem; font-weight: 600; color: #14543a; }
.nur-comment-form input,
.nur-comment-form textarea {
	width: 100%; padding: 12px 14px; border: 1px solid #d6e3dc;
	border-radius: 10px; background: #fff; font-size: .95rem;
	color: #2c3e36; font-family: inherit; transition: border-color .2s, box-shadow .2s;
}
.nur-comment-form input:focus,
.nur-comment-form textarea:focus { outline: none; border-color: #1a7f5a; box-shadow: 0 0 0 3px rgba(26,127,90,.12); }
.nur-comment-form textarea { resize: vertical; min-height: 120px; }
.form-submit { grid-column: 1 / -1; margin: 0; }
.nur-comment-form__submit {
	background: #1a7f5a; color: #fff; border: 0; padding: 13px 32px;
	border-radius: 10px; font-size: .95rem; font-weight: 600;
	cursor: pointer; transition: background .2s, transform .2s;
}
.nur-comment-form__submit:hover { background: #14543a; transform: translateY(-2px); }
.comment-form-cookies-consent { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 10px; font-size: .82rem; color: #6b7b73; }
.comment-form-cookies-consent input { width: auto; margin-top: 2px; }


/* ════════════════════════════════════════════════
   🎯 STICKY-САЙДБАР — ЕДИНСТВЕННЫЙ БЛОК (десктоп)
   Висит на экране при скролле, останавливается перед футером.
   ════════════════════════════════════════════════ */

/* 1. Снимаем overflow с предков — overflow:hidden/auto ломает sticky.
      clip режет горизонтальный вылет, НЕ ломая sticky. */
html,
body.single,
body.single-post {
	overflow-x: clip !important;
	overflow-y: visible !important;
}
body.single #nur-main,
body.single-post #nur-main {
	overflow-x: clip !important;
	overflow-y: visible !important;
}
.nur-single,
.nur-single__container,
.nur-content,
.nur-sidebar {
	overflow: visible !important;
}

/* 2. Контейнер-грид: 2 колонки. align-items:start — чтобы sticky работал */
.nur-single .nur-single__container {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) 320px !important;
	gap: 40px;
	max-width: 1240px;
	margin: 0 auto;
	padding: 30px 20px 60px;
	align-items: start !important;
}

.nur-single .nur-content { min-width: 0; }

/* 3. ⭐ КЛЮЧ: колонка сайдбара тянется на ВСЮ высоту грида.
      Именно это даёт sticky-блоку пространство для движения
      от верха статьи до низа — и остановку перед футером. */
.nur-single .nur-sidebar {
	grid-column: 2;
	min-width: 0;
	align-self: stretch !important;   /* НЕ start! Иначе sticky некуда ехать */
	height: 100%;
}

/* 4. Сам липкий блок — sticky внутри растянутой колонки */
.nur-single .nur-sidebar__inner {
	position: -webkit-sticky;
	position: sticky !important;
	top: 90px;                        /* отступ под фикс-шапку */
	display: grid;
	gap: 20px;
	max-height: calc(100vh - 110px);  /* не выше экрана */
	overflow-y: auto;                 /* если контент сайдбара длинный — свой скролл */
}

/* Скрываем некрасивый скроллбар внутри сайдбара (опционально) */
.nur-single .nur-sidebar__inner::-webkit-scrollbar { width: 6px; }
.nur-single .nur-sidebar__inner::-webkit-scrollbar-thumb { background: #cdd8d2; border-radius: 3px; }


/* ════════════════════════════════════════════════
   📱 МОБИЛЬНЫЙ (≤980px): сайдбар под статьёй, sticky выкл.
   ════════════════════════════════════════════════ */
@media (max-width: 980px) {
	.nur-single .nur-single__container {
		grid-template-columns: 1fr !important;
		gap: 30px;
		padding: 20px 16px 40px;
	}
	.nur-single .nur-sidebar {
		grid-column: 1;
		align-self: start !important;
		height: auto;
	}
	.nur-single .nur-sidebar__inner {
		position: static !important;
		max-height: none;
		overflow: visible;
	}
	.nur-post-nav { grid-template-columns: 1fr; }
	.nur-post-nav__next { text-align: left; }
}

@media (max-width: 600px) {
	.nur-comment-form { grid-template-columns: 1fr; }
	.nur-comment-form__field--half { grid-column: 1 / -1; }
	.nur-comment__body { flex-direction: column; gap: 10px; }
	.comment-respond { padding: 20px; }
}


/* ════════════════════════════════════════════════
   🌙 ТЁМНАЯ ТЕМА
   ════════════════════════════════════════════════ */
@media (prefers-color-scheme: dark) {
	.nur-article__title,
	.nur-article__content h2,
	.nur-widget__title,
	.nur-post-nav__link b,
	.nur-archive__title,
	.nur-related__title,
	.nur-related__heading,
	.nur-comments__title,
	.nur-comment__author,
	.comment-reply-title,
	.nur-comment-form label { color: #6fd3a8; }

	.nur-article__content { color: #cdd8d2; }
	.nur-comment__text { color: #cdd8d2; }
	.nur-widget__text { color: #aab8b1; }
	.nur-widget__posts a,
	.nur-widget a { color: #cdd8d2; }

	.nur-widget,
	.nur-post-nav__link,
	.nur-article__content blockquote,
	.nur-related__card,
	.nur-card,
	.nur-comment__body,
	.comment-respond,
	.nur-empty,
	.nur-single .page-numbers { background: #1c2620; }

	.nur-post-nav__link,
	.nur-card__title a { color: #cdd8d2; }

	.nur-article__tags,
	.nur-related,
	.nur-comments { border-top-color: #2a3630; }
	.nur-comments__list .children { border-left-color: #2a3630; }

	.nur-comment-form input,
	.nur-comment-form textarea { background: #141c18; border-color: #2a3630; color: #cdd8d2; }
}