/**
 * "Направления" section — listing page (page-napravlenija.php) and single
 * direction page (page-direction.php). Kept separate from assets/css/main.css
 * per section ownership; only these two templates enqueue this file.
 *
 * Listing page uses a sparse, borderless grid of circular avatar photos
 * (matching the original medeo-mmc.ru site) instead of bordered card boxes.
 */

/* --- Direction grid (page-napravlenija.php) ------------------------------ */

.napravlenija-page .direction-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 36px 28px;
	margin: 4px 0 44px;
}

.napravlenija-page .direction-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 168px;
	text-align: center;
	text-decoration: none;
	color: inherit;
}

.napravlenija-page .direction-avatar-wrap {
	position: relative;
	width: 100px;
	height: 100px;
	margin-bottom: 14px;
}

.napravlenija-page .direction-avatar-wrap img,
.napravlenija-page .direction-avatar-placeholder {
	display: block;
	width: 100px;
	height: 100px;
	border-radius: 50%;
	object-fit: cover;
}

.napravlenija-page .direction-avatar-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #eef2f6;
	border: 1px dashed #c7d2da;
	color: #9aa7b3;
	font-size: 34px;
	font-weight: 300;
	line-height: 1;
}

/* Small badge overlapping the avatar corner, replacing the old big yellow box */
.napravlenija-page .direction-draft-badge {
	position: absolute;
	top: -2px;
	right: -8px;
	background: #fff3cd;
	border: 1px solid #ffc107;
	color: #8a6d00;
	font-size: 9px;
	font-weight: 700;
	line-height: 1;
	padding: 3px 5px;
	border-radius: 9px;
	white-space: nowrap;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
}

.napravlenija-page .direction-tile h3 {
	margin: 0 0 6px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	color: #16233a;
}

.napravlenija-page .direction-tile:hover h3 {
	color: var(--medeo-blue, #1e8fd5);
	text-decoration: underline;
}

.napravlenija-page .direction-tile p {
	margin: 0;
	font-size: 12.5px;
	color: #6b7280;
	line-height: 1.45;
}

/* Intro copy — shown below the grid, matching the original page's order */
.napravlenija-page .napravlenija-intro {
	max-width: 900px;
	margin: 4px 0 40px;
	color: #444;
	line-height: 1.6;
}

/* --- Certificates / license block ----------------------------------------- */

.napravlenija-page .certificates-section {
	margin-top: 8px;
	padding-top: 28px;
	border-top: 1px solid #e5e5e5;
}

.napravlenija-page .certificates-section h2 {
	margin-bottom: 20px;
}

.napravlenija-page .license-card {
	display: flex;
	align-items: center;
	gap: 20px;
	max-width: 420px;
	padding: 20px;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	background: #fafafa;
}

.napravlenija-page .license-card .license-icon {
	flex: 0 0 auto;
	width: 56px;
	height: 56px;
	border-radius: 6px;
	background: #c0392b;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: bold;
}

.napravlenija-page .license-card .license-info h3 {
	margin: 0 0 6px;
	font-size: 17px;
}

.napravlenija-page .license-card .license-info a {
	display: inline-block;
	margin-top: 6px;
	font-size: 14px;
	color: #0a5;
	text-decoration: underline;
}

/* --- Yandex reviews widget (static; not critical, kept minimal) ----------- */

.napravlenija-page .yandex-reviews-widget {
	margin-top: 32px;
	max-width: 460px;
	padding: 18px 20px;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	background: #fafafa;
}

.napravlenija-page .yandex-reviews-widget .yandex-rating {
	font-size: 20px;
	font-weight: 700;
	margin-bottom: 4px;
}

.napravlenija-page .yandex-reviews-widget .stars {
	margin-left: 6px;
	color: #ffb800;
	font-size: 16px;
	letter-spacing: 1px;
}

.napravlenija-page .yandex-reviews-widget p {
	margin: 0 0 10px;
	color: #555;
	font-size: 14px;
}

.napravlenija-page .yandex-reviews-widget a {
	color: #0a5;
	font-weight: 600;
	text-decoration: underline;
}

@media (max-width: 600px) {
	.napravlenija-page .direction-tile {
		width: calc(50% - 14px);
	}
}

/* --- Single direction page (page-direction.php) ---------------------------- */

.direction-page .direction-entry h1 {
	margin-bottom: 20px;
}

.direction-page .direction-entry h2 {
	margin-top: 36px;
	margin-bottom: 12px;
}

.direction-page .direction-entry h3 {
	margin-top: 28px;
	margin-bottom: 8px;
}

.direction-page .direction-entry p,
.direction-page .direction-entry ul {
	line-height: 1.6;
	margin-bottom: 14px;
}

.direction-page .direction-entry ul {
	padding-left: 20px;
}

.direction-page .draft-notice {
	font-size: 15px;
	line-height: 1.5;
}

.direction-page .direction-cta {
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid #e5e5e5;
}
