/*
 * LOVE-IN — фронтенд-шаблон bs4 (Bootstrap 4.6.2).
 * Четыре цветовые схемы задаются атрибутом data-theme у <html>:
 *   warm     — тёплая, как в старом шаблоне (по умолчанию)
 *   blue     — холодная синяя
 *   green    — зелёная
 *   graphite — нейтральная графитовая
 */

html[data-theme="warm"] {
	--brand: #8c3310;
	--brand-dark: #6f260b;
	--brand-2: #b3542e;
	--accent: #ad4c21;
	--bg: #e9e1d9;
	--surface: #ffffff;
	--surface-alt: #f7f2ed;
	--text: #3f3a36;
	--muted: #776e66;
	--border: #e3d8cd;
	--link: #8a4a2a;
	--header-text: #ffffff;
}

html[data-theme="blue"] {
	--brand: #1f3b5b;
	--brand-dark: #162c45;
	--brand-2: #2f5d8a;
	--accent: #2f5d8a;
	--bg: #e8edf2;
	--surface: #ffffff;
	--surface-alt: #f3f6f9;
	--text: #2c3a48;
	--muted: #6b7a8a;
	--border: #d9e1e8;
	--link: #2f5d8a;
	--header-text: #ffffff;
}

html[data-theme="green"] {
	--brand: #1f4d3a;
	--brand-dark: #153a2b;
	--brand-2: #2f6b52;
	--accent: #2f6b52;
	--bg: #e9efe9;
	--surface: #ffffff;
	--surface-alt: #f3f7f4;
	--text: #2f3d35;
	--muted: #6c7d72;
	--border: #d8e3da;
	--link: #2f6b52;
	--header-text: #ffffff;
}

html[data-theme="graphite"] {
	--brand: #2f3540;
	--brand-dark: #232830;
	--brand-2: #4a5260;
	--accent: #4a5260;
	--bg: #eceef1;
	--surface: #ffffff;
	--surface-alt: #f5f6f8;
	--text: #2c3138;
	--muted: #6e7681;
	--border: #dde1e6;
	--link: #475569;
	--header-text: #ffffff;
}

/* ---------- База ---------- */

body {
	background-color: var(--bg);
	color: var(--text);
	font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
	font-size: 15px;
	padding-top: 16px;
	padding-bottom: 24px;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
	font-family: "Oswald", "Segoe UI", sans-serif;
	color: var(--brand);
	font-weight: 500;
}

a {
	color: var(--link);
}

a:hover,
a:focus {
	color: var(--brand-dark);
	text-decoration: none;
}

.text-muted {
	color: var(--muted) !important;
}

hr {
	border-top-color: var(--border);
}

/* ---------- Каркас ---------- */

.page-shell {
	max-width: 1200px;
	padding-bottom: 24px;
	background-color: var(--bg);
	border-radius: 10px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .10);
}

.page-row {
	margin-top: 8px;
}

.content-card {
	background-color: var(--surface);
	border: 0;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
	margin-bottom: 16px;
}

.content-card > .card-body {
	padding: 20px 22px;
}

.content-card h2 {
	font-size: 22px;
	margin: 4px 0 16px;
}

.article-body img {
	max-width: 100%;
	height: auto;
}

/* ---------- Шапка ---------- */

.site-header {
	background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
	border-radius: 10px 10px 0 0;
	color: var(--header-text);
	margin: 0 -15px;
	padding: 0 20px;
}

.site-header__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 72px;
	flex-wrap: wrap;
}

.site-brand {
	font-family: "Oswald", sans-serif;
	font-size: 28px;
	font-weight: 500;
	letter-spacing: .5px;
	color: var(--header-text);
	white-space: nowrap;
}

.site-brand:hover,
.site-brand:focus {
	color: var(--header-text);
	opacity: .9;
}

.site-nav {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav li a {
	display: block;
	padding: 10px 13px;
	color: var(--header-text);
	opacity: .88;
	font-weight: 500;
	border-radius: 4px;
}

.site-nav li a:hover,
.site-nav li a:focus {
	opacity: 1;
	background-color: rgba(255, 255, 255, .12);
	color: var(--header-text);
}

.site-nav li.active a {
	background-color: var(--surface);
	color: var(--brand) !important;
	opacity: 1;
}

.site-nav--mobile {
	display: block;
	padding: 0 0 12px;
	border-top: 1px solid rgba(255, 255, 255, .18);
}

.site-nav--mobile li a {
	padding-left: 4px;
}

.site-header .navbar-toggler {
	color: var(--header-text);
	border-color: rgba(255, 255, 255, .4);
	padding: 4px 10px;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .04em;
}

.site-header .navbar-toggler-text {
	line-height: 1;
}

/* Переключатель цветовых схем */

.theme-switcher {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-left: 12px;
}

.theme-dot {
	width: 18px;
	height: 18px;
	padding: 0;
	border: 2px solid rgba(255, 255, 255, .65);
	border-radius: 50%;
	cursor: pointer;
	background: #ccc;
	transition: transform .15s ease, border-color .15s ease;
}

.theme-dot:hover,
.theme-dot:focus {
	transform: scale(1.12);
	border-color: #fff;
	outline: none;
}

.theme-dot.is-active {
	border-color: #fff;
	box-shadow: 0 0 0 2px rgba(255, 255, 255, .35);
}

.theme-dot--warm     { background: #8c3310; }
.theme-dot--blue     { background: #2f5d8a; }
.theme-dot--green    { background: #2f6b52; }
.theme-dot--graphite { background: #3a414d; }

/* ---------- Карточки анкет ---------- */

.profile-card {
	background-color: var(--surface);
	border: 1px solid var(--border);
	border-radius: 6px;
	overflow: hidden;
	margin-bottom: 14px;
	transition: box-shadow .15s ease;
}

/* 5 карточек в ряд на главной (Bootstrap 4: 12 не делится на 5) */
@media (min-width: 992px) {
	.profile-col-5 {
		-ms-flex: 0 0 20%;
		flex: 0 0 20%;
		max-width: 20%;
	}

	.profile-col-5 .profile-card__photo {
		height: 190px;
	}
}

.profile-card:hover {
	box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}

.profile-card__link {
	display: block;
}

.profile-card__photo {
	display: block;
	width: 100%;
	height: 150px;
	object-fit: cover;
	background-color: var(--surface-alt);
}

.profile-card__caption {
	padding: 8px 10px;
	font-size: 13px;
	line-height: 1.35;
}

.profile-card__caption b {
	color: var(--brand);
}

.profile-card--small .profile-card__photo {
	height: auto;
}

/* ---------- Карточки списка статей ---------- */

.section-title {
	font-size: 22px;
	margin: 4px 0 14px;
	padding-left: 4px;
}

.article-list {
	margin-bottom: 8px;
}

.article-card {
	background-color: var(--surface);
	border: 1px solid var(--border);
	border-radius: 8px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
	margin-bottom: 16px;
	transition: box-shadow .15s ease;
}

.article-card:hover {
	box-shadow: 0 4px 14px rgba(0, 0, 0, .10);
}

.article-card .card-body {
	padding: 18px 22px;
}

.article-card__title {
	font-size: 20px;
	line-height: 1.3;
	margin: 0 0 10px;
}

.article-card__title a {
	color: var(--brand);
}

.article-card__title a:hover {
	color: var(--brand-dark);
}

.article-card__text {
	color: var(--text);
	font-size: 1rem;
	line-height: 1.55;
}

.article-card__text::after {
	content: "";
	display: block;
	clear: both;
}

.article-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid var(--border);
}

.article-card__category {
	font-size: 13px;
	color: var(--muted);
}

.article-card__category a {
	color: var(--brand);
	font-weight: 500;
}

.article-card__category a:hover {
	color: var(--brand-dark);
	text-decoration: underline;
}

.article-card__text img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
}

/* ---------- Списки статей/анекдотов ---------- */

.entry {
	padding: 14px 0;
	border-bottom: 1px solid var(--border);
}

.entry:last-child {
	border-bottom: 0;
}

.entry h2,
.entry h3 {
	font-size: 19px;
	margin-top: 0;
	margin-bottom: 8px;
}

.entry h2 a,
.entry h3 a {
	color: var(--brand);
}

.entry .entry-more {
	text-align: right;
	font-size: 14px;
}

.humor-grid {
	display: flex;
	flex-wrap: wrap;
}

.humor-item {
	background-color: var(--surface-alt);
	border-radius: 6px;
	padding: 12px 14px;
	margin-bottom: 12px;
}

.humor-item__date {
	font-size: 11px;
	font-style: italic;
	color: var(--muted);
	text-align: right;
	margin-bottom: 6px;
}

/* ---------- Сайдбар ---------- */

.sidebar-card {
	background-color: var(--surface);
	border: 0;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
	margin-bottom: 16px;
}

.sidebar-card .card-body {
	padding: 16px 18px;
}

.sidebar-card h2 {
	font-size: 17px;
	margin: 0 0 10px;
}

.sidebar-card ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sidebar-card ul li {
	padding: 3px 0;
}

.sidebar-card ul li a {
	color: var(--text);
}

.sidebar-card ul li a:hover {
	color: var(--brand);
}

.new-ankets {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -3px;
}

.new-ankets a {
	margin: 3px;
}

.new-ankets img {
	border-radius: 4px;
	display: block;
}

/* ---------- Подвал ---------- */

.site-footer {
	margin: 24px -15px -24px;
	padding: 18px 20px 6px;
	background-color: var(--surface-alt);
	border-top: 1px solid var(--border);
	border-radius: 0 0 10px 10px;
	color: var(--muted);
	font-size: 13px;
}

.site-footer a {
	color: var(--link);
}

.site-footer .footer-meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
}

/* ---------- Анкета ---------- */

.profile-cover {
	position: relative;
	background-color: var(--surface-alt);
	border-radius: 8px;
	padding: 24px 24px 16px;
	min-height: 230px;
	background-size: cover;
	background-position: center;
}

.profile-avatar {
	display: flex;
	align-items: flex-start;
	gap: 18px;
	background-color: rgba(255, 255, 255, .88);
	border-radius: 8px;
	padding: 14px;
	max-width: 560px;
}

.profile-avatar img {
	width: 120px;
	height: 160px;
	object-fit: cover;
	border-radius: 6px;
}

.profile-avatar h2 {
	margin: 0 0 6px;
	font-size: 24px;
}

.profile-navigate {
	margin-top: 14px;
	font-size: 14px;
	color: var(--muted);
}

.profile-navigate a {
	color: var(--brand);
}

.profile-status {
	margin-top: 10px;
}

.profile-status .btn {
	margin-right: 6px;
}

.gallery {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
}

.gallery li {
	margin: 0 6px 10px 0;
}

.gallery img {
	border-radius: 4px;
	display: block;
}

/* Лайтбокс галереи анкеты */

body.lightbox-open {
	overflow: hidden;
}

.lightbox {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 2000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background-color: rgba(15, 17, 20, .92);
}

.lightbox.is-open {
	display: flex;
}

.lightbox__img {
	max-width: 92vw;
	max-height: 86vh;
	width: auto;
	height: auto;
	border-radius: 6px;
	box-shadow: 0 12px 48px rgba(0, 0, 0, .55);
	background-color: #111;
}

.lightbox__close,
.lightbox__nav {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, .14);
	color: #fff;
	cursor: pointer;
	line-height: 1;
	transition: background-color .15s ease;
}

.lightbox__close:hover,
.lightbox__nav:hover,
.lightbox__close:focus,
.lightbox__nav:focus {
	background-color: rgba(255, 255, 255, .28);
	outline: none;
}

.lightbox__close {
	top: 16px;
	right: 18px;
	width: 44px;
	height: 44px;
	font-size: 30px;
}

.lightbox__nav {
	top: 50%;
	transform: translateY(-50%);
	width: 52px;
	height: 52px;
	font-size: 38px;
}

.lightbox__prev {
	left: 16px;
}

.lightbox__next {
	right: 16px;
}

.lightbox__counter {
	position: absolute;
	bottom: 18px;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255, 255, 255, .85);
	font-size: 14px;
	letter-spacing: .04em;
}

@media (max-width: 575.98px) {
	.lightbox {
		padding: 10px;
	}

	.lightbox__nav {
		width: 42px;
		height: 42px;
		font-size: 30px;
	}

	.lightbox__prev {
		left: 6px;
	}

	.lightbox__next {
		right: 6px;
	}

	.lightbox__close {
		top: 8px;
		right: 8px;
	}
}

/* ---------- Теги интересов ---------- */

#text-tags a,
#interst-tag a {
	color: var(--link);
}

#interst-tag img {
	border-radius: 4px;
	margin: 0 4px 6px 0;
}

#cityankets a {
	display: inline-block;
	margin: 0 4px 6px 0;
}

#cityankets img {
	border-radius: 4px;
}

/* ---------- Формы и кнопки ---------- */

.btn {
	border-radius: 4px;
}

.btn-primary {
	background-color: var(--brand);
	border-color: var(--brand);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
	background-color: var(--brand-dark) !important;
	border-color: var(--brand-dark) !important;
}

.btn-outline-primary {
	color: var(--brand);
	border-color: var(--brand);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
	background-color: var(--brand);
	border-color: var(--brand);
	color: #fff;
}

.btn-link {
	color: var(--link);
}

.form-control:focus {
	border-color: var(--brand-2);
	box-shadow: 0 0 0 .15rem rgba(0, 0, 0, .10);
}

.custom-checkbox .custom-control-input:checked ~ .custom-control-label::before {
	background-color: var(--brand);
	border-color: var(--brand);
}

/* ---------- Пагинация ---------- */

.pagination .page-link {
	color: var(--link);
	border-color: var(--border);
}

.pagination .page-link:hover {
	color: var(--brand-dark);
	background-color: var(--surface-alt);
}

.pagination .page-item.active .page-link {
	background-color: var(--brand);
	border-color: var(--brand);
	color: #fff;
}

.pagination .page-item.disabled .page-link {
	color: var(--muted);
}

/* ---------- Оповещения ---------- */

.alert-success {
	background-color: #e9f2ec;
	border-color: #cfe2d6;
	color: #2f5c44;
}

.alert-danger {
	background-color: #f8eaea;
	border-color: #eed2d2;
	color: #8a3737;
}

.alert-info {
	background-color: #eaf1f6;
	border-color: #d3e0ea;
	color: #33566e;
}

/* ---------- Адаптив ---------- */

@media (max-width: 991.98px) {
	.page-shell {
		box-shadow: none;
		border-radius: 0;
	}

	.site-header,
	.site-footer {
		border-radius: 0;
	}

	.site-header__bar {
		min-height: 62px;
	}

	.site-brand {
		font-size: 23px;
	}
}

@media (max-width: 575.98px) {
	body {
		padding-top: 0;
	}

	.content-card > .card-body {
		padding: 14px 14px;
	}

	.profile-avatar {
		flex-direction: column;
	}

	.profile-avatar img {
		width: 100%;
		height: auto;
	}

	.theme-switcher {
		margin-left: 6px;
	}
}
