/* ============================================================
   galernaya.ru — «Редакционный гранит», 2026
   Подключать ПОСЛЕ main-stylesheet.min.css
   ============================================================ */

:root {
	/* Палитра: «Известняк и медь» */
	--bg-page:      #F4F1EA;       /* Фон страницы */
	--bg-surface:   #FBF9F4;       /* Карточки, панели */
	--bg-raised:    #FFFFFF;       /* Поля ввода, активные элементы */
	--ink:          #1B1D20;       /* Основной текст, заголовки */
	--ink-soft:     #57595E;       /* Второстепенный текст, метаданные */
	--ink-faint:    #8A8C90;       /* Очень слабый текст, disabled */
	--line:         #E3DED2;       /* Тонкие разделители */
	--line-strong:  #1B1D20;       /* Жирные разделители */
	--accent:       #2F5266;       /* Приглушённый синий (ссылки) */
	--accent-dark:  #24404F;       /* Тёмный синий */
	--copper:       #A9743F;       /* Тёплая медь (акценты, категории) */
	--copper-soft:  #C9A227;       /* Светлая медь (редкие бейджи) */
	--radius:       14px;          /* Скругления */
	--radius-sm:    9px;           /* Мелкие скругления */
	--shadow:       0 10px 30px rgba(27, 29, 32, .07); /* Лёгкая тень */
	--ease:         cubic-bezier(.25, .46, .45, .94);
}

html { -webkit-font-smoothing: antialiased; }

body.ot-menu-will-follow,
body {
	background: var(--bg-page);
	color: var(--ink);
	font-family: 'Golos Text', 'Segoe UI', Arial, sans-serif;
	font-size: 16px;
	line-height: 1.6;
}

/* --- Типографика: крупные заголовки как главный герой --- */
h1, h2, h3, h4, .item-article-title, .logotype, .portus-content-title h2 {
	font-family: 'Golos Text', sans-serif;
	letter-spacing: -0.02em;
	line-height: 1.15;
	color: var(--ink);
	margin: 0;
}

.logotype a {
	font-weight: 900;
	font-size: 34px;
	letter-spacing: -0.03em;
	color: var(--ink);
	text-decoration: none;
	transition: color .25s var(--ease);
}
.logotype a:hover { color: var(--accent); }

h2 { font-weight: 800; font-size: 28px; }
h3 { font-weight: 700; font-size: 20px; }
h4 { font-weight: 600; font-size: 17px; line-height: 1.35; }

a { color: var(--accent); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--copper); }

/* --- Хайрлайн-графика вместо тяжёлых теней и тёмных блоков --- */
#header,
#content .widget,
.portus-content-block,
.article-grid-default .item,
.article-blog-default .item,
.w-article-list .item,
.portus-article-slider-big .item {
	background: var(--bg-surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: none;
	overflow: hidden;
}

/* --- Плашка breaking-news: строгая лента --- */
.breaking-news {
	background: var(--ink);
	color: #EDEAE2;
	border: none;
	border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.breaking-news .br-title {
	color: var(--bg-page);
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
	font-size: 12px;
	padding-right: 16px;
	border-right: 1px solid rgba(244, 241, 234, .25);
}
.breaking-news .br-article a,
.breaking-news .br-article strong { color: #CFCBBF; font-weight: 500; }
.breaking-news .br-article a:hover strong { color: var(--copper-soft); }

/* --- Навигация --- */
#top-menu {
	background: transparent;
	border-bottom: 1px solid var(--line);
}
#top-menu ul li a {
	color: var(--ink-soft);
	font-weight: 600;
	font-size: 13px;
	letter-spacing: .04em;
	text-transform: uppercase;
}
#top-menu ul li a:hover { color: var(--copper); }

#main-menu {
	background: var(--bg-surface);
	border-bottom: 1px solid var(--line);
	box-shadow: none;
}
#main-menu ul li a {
	color: var(--ink);
	font-weight: 700;
	font-size: 15px;
	padding: 14px 18px;
	position: relative;
	transition: color .2s var(--ease);
}
#main-menu ul li a::after {
	content: '';
	position: absolute;
	left: 18px; right: 18px; bottom: 8px;
	height: 2px;
	background: var(--copper);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .3s var(--ease);
}
#main-menu ul li a:hover::after { transform: scaleX(1); }

/* --- Поиск: капсульное поле --- */
.search-nav input[type="text"] {
	background: var(--bg-raised);
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 9px 16px;
	font-family: inherit;
	font-size: 14px;
	transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.search-nav input[type="text"]:focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 3px rgba(47, 82, 102, .12);
	outline: none;
}
.search-nav button {
	background: transparent;
	color: var(--ink-soft);
}
.search-nav button:hover { color: var(--copper); }

/* --- Слайдер-герой: фото + плотная подпись --- */
.portus-article-slider-big .item-photo {
	display: block;
	position: relative;
	overflow: hidden;
	border-radius: var(--radius);
}
.portus-article-slider-big .item-photo img {
	height: 460px;
	width: 100%;
	object-fit: cover;
	transition: transform .6s var(--ease);
}
.portus-article-slider-big .item-photo:hover img { transform: scale(1.03); }
.portus-article-slider-big .item-content {
	position: absolute;
	inset: auto 0 0 0;
	padding: 60px 28px 26px;
	background: linear-gradient(180deg, rgba(27,29,32,0) 0%, rgba(27,29,32,.72) 100%);
	color: #F4F1EA;
}
.portus-article-slider-big .item-article-title {
	color: #F4F1EA;
	font-weight: 800;
	font-size: 26px;
	letter-spacing: -0.02em;
}
.portus-article-slider-big .item-article-text {
	color: rgba(244, 241, 234, .82);
	font-size: 15px;
}
.portus-article-slider-big .item-small .item-article-title { font-size: 19px; }

/* ============================================================
   КАТЕГОРИИ: единый «кикер» без фона — везде одинаковые
   !important нужен, чтобы перебить инлайн-стили шаблонов
   ============================================================ */
.item-article-category,
.item-categories,
.item-categories a,
.item-categories.green_cvet,
.item-categories.orange_cvet,
.green_cvet a,
.orange_cvet a {
	display: inline-block;
	background: transparent !important;
	color: #A9743F !important;          /* медь — единый цвет для всех категорий */
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .14em;
	text-transform: uppercase;
	padding: 0;
	margin: 0 0 6px;
	border-radius: 0;
	text-decoration: none;
	transition: color .2s var(--ease);
}
.item-article-category:hover,
.item-categories a:hover,
.green_cvet a:hover,
.orange_cvet a:hover {
	color: #1B1D20 !important;
}

/* Исключение: поверх фотографии (слайдер) текст-кикер не читается —
   там оставляем одну универсальную «стеклянную» плашку */
.portus-article-slider-big .item-article-category {
	background: rgba(27, 29, 32, .55) !important;
	color: #F4F1EA !important;
	padding: 4px 10px;
	border-radius: 4px;
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}
.portus-article-slider-big .item-article-category:hover {
	background: rgba(27, 29, 32, .75) !important;
	color: #C9A227 !important;
}

/* Тёмная тема */
@media (prefers-color-scheme: dark) {
	.item-article-category,
	.item-categories,
	.item-categories a,
	.green_cvet a,
	.orange_cvet a {
		color: #D89A5F !important;
	}
}


/* --- Карточки в сетке (как на вашем фото) --- */
/* Убираем тёмные фоны и делаем их в тон сайту */
.article-grid-default .item,
.article-blog-default .item,
.w-article-list .item {
	background: var(--bg-surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.article-grid-default .item:hover,
.article-blog-default .item:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow);
}
.article-grid-default .item-header,
.article-blog-default .item-header {
	overflow: hidden;
}
.item-header img,
.item-header img {
	transition: transform .6s var(--ease);
}
.item-header-hover:hover img { transform: scale(1.04); }

.item-meta {
	color: var(--ink-soft);
	font-size: 13px;
	font-weight: 500;
}
.item-meta i { color: var(--copper); }

.item-content p { color: var(--ink-soft); font-size: 15px; }

/* ============================================================
   КНОПКИ «ЧИТАТЬ»: без плашек — текстовая ссылка с медной стрелкой
   ============================================================ */
.button,
.button-alt,
.button-alt-frame {
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
	color: var(--ink-soft);
	font-family: inherit;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .14em;
	text-transform: uppercase;
	padding: 0;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	transition: color .2s var(--ease);
}
.button i,
.button-alt i,
.button-alt-frame i {
	color: var(--copper);
	font-size: 12px;
	transition: transform .25s var(--ease);
}
.button:hover,
.button-alt:hover,
.button-alt-frame:hover {
	color: var(--copper);
	background: transparent;
}
.button:hover i,
.button-alt:hover i,
.button-alt-frame:hover i {
	transform: translateX(4px);   /* стрелка слегка уезжает вправо */
	color: var(--copper);
}

/* Кнопки формы входа (всплывающее окно) — там уместен контур */
#logindialog .button {
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	padding: 9px 22px;
	font-size: 13px;
	display: inline-block;
	text-transform: none;
	letter-spacing: 0;
}
#logindialog .button:hover {
	background: var(--ink);
	color: var(--bg-page);
}

/* Тёмная тема */
@media (prefers-color-scheme: dark) {
	.button, .button-alt, .button-alt-frame { color: var(--ink-soft); }
	.button i, .button-alt i, .button-alt-frame i { color: var(--copper); }
}

/* --- Виджеты в сайдбаре и секции --- */
.widget h3, .widget .h3 {
	font-size: 12px;              /* Было ~22px — теперь по масштабу сайдбара */
	font-weight: 800;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--ink-soft);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;      /* если всё же длинно — аккуратное многоточие */
	padding: 0 0 10px;
	margin: 0 0 16px;
	border-bottom: 2px solid var(--copper);
	display: block;               /* блок, а не inline-block — занимает всю колонку */
}
.widget .w-article-list .item {
	border: none;
	border-radius: 0;
	background: transparent;
	padding: 14px 0;
	border-bottom: 1px solid var(--line);
}
.widget .w-article-list .item:last-child { border-bottom: none; }
.widget .w-article-list .item:hover h4 a { color: var(--copper); }

/* --- Заголовки секций контента --- */
.portus-content-title {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	border-bottom: 1px solid var(--line-strong);
	padding-bottom: 12px;
	margin-bottom: 22px;
}
.portus-content-title h2::before {
	content: '';
	display: inline-block;
	width: 10px; height: 10px;
	background: var(--copper);
	border-radius: 2px;
	margin-right: 12px;
	vertical-align: middle;
}
.set-this-dotted {
	color: var(--ink-soft) !important;
	font-size: 14px;
	font-weight: 600;
}
.set-this-dotted:hover { color: var(--copper) !important; }

/* --- Подвал --- */
#footer { margin-top: 48px; }
#footer-widgets {
	background: var(--ink);
	color: #B9B5AA;
	padding: 48px 0;
}
#footer-widgets h3, #footer-widgets .h3 {
	color: #F4F1EA;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
	margin-bottom: 14px;
}
#footer-widgets a { color: #CFCBBF; }
#footer-widgets a:hover { color: var(--copper-soft); }
#footer-widgets .menu li { padding: 5px 0; }
#footer-info {
	background: #141517;
	color: #8A8C90;
	font-size: 13px;
	padding: 20px 0;
}
#footer-info a { color: #B9B5AA; }
.age-limit {
	border: 1px solid #57595E;
	border-radius: 4px;
	padding: 1px 7px;
	color: #CFCBBF !important;
}

/* --- Микровзаимодействия --- */
@media (prefers-reduced-motion: no-preference) {
	.paragraph-row .item {
		animation: rise .5s var(--ease) both;
	}
	@keyframes rise {
		from { opacity: 0; transform: translateY(10px); }
		to   { opacity: 1; transform: translateY(0); }
	}
}

/* --- Скроллбар и выделение текста --- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-page); }
::-webkit-scrollbar-thumb {
	background: #C9C3B4;
	border-radius: 999px;
	border: 2px solid var(--bg-page);
}
::selection { background: rgba(169, 116, 63, .3); }

/* --- ТЁМНАЯ ТЕМА (автоматически по настройкам ОС) --- */
@media (prefers-color-scheme: dark) {
	:root {
		--bg-page:     #191B1E;
		--bg-surface:  #1F2226;
		--bg-raised:   #24272C;
		--ink:         #ECE9E1;
		--ink-soft:    #A6A79E;
		--ink-faint:   #7C7E78;
		--line:        #33373D;
		--line-strong: #ECE9E1;
		--accent:      #7FA3B8;
		--copper:      #D89A5F;
		--copper-soft: #E2B75B;
		--shadow:      0 10px 30px rgba(0, 0, 0, .35);
	}
	.item-article-category, .item-categories { 
		background: var(--copper-soft); 
		color: #1B1D20 !important; 
	}
	.breaking-news { background: #121316; }
	.portus-article-slider-big .item-content {
		background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.8) 100%);
	}
	#footer-widgets { background: #121316; }
}

/* --- Адаптив: упрощаем декор на мобильных --- */
@media (max-width: 768px) {
	.logotype a { font-size: 26px; }
	h2 { font-size: 22px; }
	.portus-article-slider-big .item-photo img { height: 300px; }
	.portus-article-slider-big .item-article-title { font-size: 20px; }
	:root { --radius: 10px; }
}
/* ============================================================
   Патч 1.1: обтекание текста и подавление старых цветов ссылок
   ============================================================ */

/* Перенос длинных заголовков вместо обрезки */
h1, h2, h3, h4,
.item-content h3 a,
.item-content h4 a,
.w-article-list .item h4 a,
.w-review-articles .item h4 a,
.item-article-title,
.logotype a {
	white-space: normal;
	overflow-wrap: break-word;
	word-wrap: break-word;
	hyphens: auto;
}

/* Ссылки внутри карточек — цвет заголовка, не синий */
.item-content h3 a,
.item-content h4 a,
.w-article-list .item h4 a,
.w-review-articles .item h4 a,
.portus-content-block h3 a,
.portus-content-block h4 a {
	color: var(--ink) !important;
}
.item-content h3 a:hover,
.item-content h4 a:hover,
.w-article-list .item h4 a:hover,
.w-review-articles .item h4 a:hover {
	color: var(--copper) !important;
}

/* Заголовки виджетов: не срезаются и не расползаются */
.widget h3, .widget .h3 {
	white-space: normal;
	overflow-wrap: break-word;
	letter-spacing: .1em;
	max-width: 100%;
}

/* Подводки и описания — мягкий серый, не синий */
.item-content p,
.item-content p a,
.portus-content-block p a {
	color: var(--ink-soft);
}
.item-content p a:hover,
.portus-content-block p a:hover {
	color: var(--copper);
}

/* Мета-строки (дата, комментарии) */
.item-meta, .item-meta a {
	color: var(--ink-faint);
}

/* Кнопки «Читать» — не наследуют синий */
.button, .button-alt, .button-alt-frame, .view-more-half-size {
	color: var(--ink) !important;
	text-decoration: none;
}
.button:hover, .button-alt:hover, .view-more-half-size:hover {
	color: var(--bg-page) !important;
}

/* Ссылка «показать еще» в заголовке секции */
.portus-content-title .set-this-dotted {
	color: var(--ink-soft) !important;
	white-space: nowrap;
}
/* ============================================================
   Патч 3.0: внутренние отступы — текст дышит внутри рамок
   ============================================================ */

/* Полная новость и списки внутри центральной колонки */
.portus-content-block {
	padding: 32px 36px;
}
.portus-content-title {
	margin-left: -36px;
	margin-right: -36px;
	padding: 14px 36px 12px;   /* шапка секции остаётся «прибитой» к краям блока — так и задумано */
}
@media (max-width: 768px) {
	.portus-content-block { padding: 20px 18px; }
	.portus-content-title { margin-left: -18px; margin-right: -18px; padding-left: 18px; padding-right: 18px; }
}

/* Текст полной новости: комфортная ширина строки и межабзацные отступы */
.portus-content-block .full-story,
.portus-content-block .content,
.portus-content-block article,
.portus-content-block .full { 
	line-height: 1.75;
	font-size: 17px;
}
.portus-content-block p,
.portus-content-block .full-story p {
	margin-bottom: 18px;
}

/* Сайдбар: содержимое виджетов отступает от краёв колонки */
.sidebar .widget {
	padding: 18px 20px;
	margin-bottom: 20px;
}
/* Внутри виджета картинки и текст не липнут к границам */
.widget .item-header { margin-bottom: 10px; }
.widget .item-header img { border-radius: var(--radius-sm); }
.widget .item-content { padding: 0; }

/* Списки статей в сайдбаре: воздух между пунктами */
.sidebar .w-article-list .item,
.sidebar .w-review-articles .item {
	padding: 12px 0;
}
.sidebar .w-article-list .item + .item {
	border-top: 1px solid var(--line);
	margin-top: 12px;
}

/* Карточки в сетке: контент внутри карточки не прижат */
.article-grid-default .item .item-content,
.article-blog-default .item .item-content {
	padding: 16px 20px 20px;
}
.article-grid-default .item .item-header,
.article-blog-default .item .item-header {
	margin-bottom: 0;   /* картинка остаётся во всю ширину карточки сверху */
}
/* ============================================================
   Патч 4.0: шапка — логотип, соцсети, поиск, вход
   ============================================================ */

/* --- Логотип: «титульный лист» вместо вывески --- */
#header .header-logo {
	padding: 30px 0 26px;
}
h1.logotype, div.logotype {
	color: var(--ink) !important;
	font-size: 34px !important;
	font-weight: 600 !important;
	line-height: 1.1;
	margin: 0;
	display: inline-block;
	vertical-align: middle;
}
.logotype a {
	font-family: 'Lora', Georgia, serif;
	font-weight: 600;
	font-size: 34px;
	letter-spacing: .01em;
	text-transform: none;
	color: var(--ink) !important;
	text-decoration: none;
	position: relative;
	transition: color .25s var(--ease);
}
.logotype a::after {
	content: '';
	position: absolute;
	left: 0; right: 0; bottom: -6px;
	height: 2px;
	background: var(--copper);
	transform: scaleX(.28);
	transform-origin: left;
	transition: transform .35s var(--ease);
}
.logotype a:hover { color: var(--accent) !important; }
.logotype a:hover::after { transform: scaleX(1); }

/* Кикер над названием — та же система, что у категорий */
h1.logotype::before, div.logotype::before {
	content: 'Санкт-Петербург · городское издание';
	display: block;
	font-family: 'Golos Text', sans-serif;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--copper);
	margin-bottom: 6px;
}

/* --- Шапка: социальные кнопки на месте --- */
#header .header-panels .header-pob {
	width: auto;             /* пустой баннер больше не расталкивает колонки */
}
#header .header-socials {
	vertical-align: middle;
	padding: 0 24px;
	white-space: nowrap;
}
#header .header-socials a {
	margin: 0 4px;
}
#header .header-socials a i {
	background: transparent;
	color: var(--ink-soft);
	width: 38px;
	height: 38px;
	line-height: 36px;       /* центр иконки с учётом рамки */
	font-size: 15px;
	border: 1px solid var(--line);
	border-radius: 50%;
	transition: border-color .25s var(--ease), color .25s var(--ease);
}
#header .header-socials a:hover i {
	background: transparent;
	border-color: var(--copper);
	color: var(--copper);
}

/* --- Поиск: обычное капсульное поле вместо «выезжающей» пилюли --- */
.search-nav {
	line-height: normal;
	position: relative;
}
.search-nav input {
	position: static;        /* снимаем абсолют старого скина */
	width: 220px;
	height: 40px;
	line-height: 38px;
	padding: 0 44px 0 16px;
	background: var(--bg-raised);
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--ink);
	font-family: inherit;
	font-size: 14px;
	cursor: text;
	transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.search-nav input.active, .search-nav input:focus {
	right: auto;
	width: 220px;            /* фиксируем ширину — поле больше не прыгает */
	border-color: var(--accent);
	box-shadow: 0 0 0 3px rgba(47, 82, 102, .12);
	outline: none;
	cursor: text;
}
.search-nav button {
	position: absolute;
	right: 4px;
	top: 0;
	height: 40px;
	width: 40px;
	color: var(--ink-soft);
}
.search-nav button:hover { color: var(--copper); }

/* --- Вход: заметная круглая кнопка-иконка --- */
.login_menu {
	line-height: normal;
	position: relative;
	margin-left: 12px;
}
.login_menu a {
	display: inline-block;
	width: 38px;
	height: 38px;
	line-height: 36px;
	text-align: center;
	border: 1px solid var(--line);
	border-radius: 50%;
	color: var(--ink-soft);
	transition: border-color .25s var(--ease), color .25s var(--ease);
}
.login_menu a:hover {
	border-color: var(--copper);
	color: var(--copper);
}
.login_menu a i { font-size: 15px; color: inherit; }

/* --- Мобильная шапка --- */
@media (max-width: 768px) {
	.logotype a { font-size: 26px; }
	h1.logotype::before, div.logotype::before { font-size: 9px; letter-spacing: .12em; }
	.search-nav input { width: 150px; }
	.search-nav input.active, .search-nav input:focus { width: 150px; }
}