/*
Theme Name: Гимназия №3 — 2027
Theme URI: https://gymnasium3.edu.kz/
Description: Оформление сайта Гимназии №3 г. Павлодара в стиле gim3.tasnim-tech.com (тёмно-синий и лайм эмблемы, Literata + Golos Text). Новая главная: первый экран с фото здания, ступени обучения, слово директора, юбилей, новости. Записи, страницы, меню и плагины не меняются. Поддерживает Polylang (казахский и русский).
Author: Гимназия №3
Version: 1.6.6
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: gimn3-2027
*/

/* ═══════════════════════════════════════════════════════════════════════
   ШРИФТЫ — свои файлы, без Google Fonts (как во frontend/)
   ═══════════════════════════════════════════════════════════════════════ */
@font-face {
  font-family: 'Golos Text Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url(assets/fonts/golos-text-cyrillic-ext-wght-normal.woff2) format('woff2-variations'), url(assets/fonts/golos-text-cyrillic-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}
@font-face {
  font-family: 'Golos Text Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url(assets/fonts/golos-text-cyrillic-wght-normal.woff2) format('woff2-variations'), url(assets/fonts/golos-text-cyrillic-wght-normal.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Golos Text Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url(assets/fonts/golos-text-latin-wght-normal.woff2) format('woff2-variations'), url(assets/fonts/golos-text-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Literata Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url(assets/fonts/literata-cyrillic-ext-wght-normal.woff2) format('woff2-variations'), url(assets/fonts/literata-cyrillic-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}
@font-face {
  font-family: 'Literata Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url(assets/fonts/literata-cyrillic-wght-normal.woff2) format('woff2-variations'), url(assets/fonts/literata-cyrillic-wght-normal.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Literata Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url(assets/fonts/literata-latin-wght-normal.woff2) format('woff2-variations'), url(assets/fonts/literata-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Literata Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 200 900;
  src: url(assets/fonts/literata-cyrillic-ext-wght-italic.woff2) format('woff2-variations'), url(assets/fonts/literata-cyrillic-ext-wght-italic.woff2) format('woff2');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}
@font-face {
  font-family: 'Literata Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 200 900;
  src: url(assets/fonts/literata-cyrillic-wght-italic.woff2) format('woff2-variations'), url(assets/fonts/literata-cyrillic-wght-italic.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Literata Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 200 900;
  src: url(assets/fonts/literata-latin-wght-italic.woff2) format('woff2-variations'), url(assets/fonts/literata-latin-wght-italic.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* ═══════════════════════════════════════════════════════════════════════
   ТОКЕНЫ — из frontend/tailwind.config.ts (цвета сняты с эмблемы гимназии)
   ═══════════════════════════════════════════════════════════════════════ */
:root {
	--g3-sans: 'Golos Text Variable', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--g3-serif: 'Literata Variable', Cambria, Georgia, 'Times New Roman', serif;

	--navy: #192b4a;
	--navy-600: #24406c;
	--navy-800: #101b33;
	--navy-900: #0b1425;
	--navy-100: #e7ecf3;
	--navy-200: #c6d0e0;
	--navy-300: #a3b2ca;
	--navy-400: #8b9cbb;
	--lime: #92bf23;
	--lime-light: #b6db55;
	--lime-ink: #4f6b0c;
	--paper: #f4f6f8;
	--white: #fff;
	--line: #e1e5ea;
	--line-strong: #cbd2da;
	--ink: #11161c;
	--ink-soft: #5b6573;

	--wrap: 1280px;
	--gutter: 16px;
}

@media (min-width: 640px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; } }

/* ═══════════════════════════════════════════════════════════════════════
   БАЗА
   ═══════════════════════════════════════════════════════════════════════ */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	font-family: var(--g3-sans);
	font-size: 16px;
	line-height: 1.55;
	color: var(--ink);
	background: var(--paper);
	overflow-wrap: break-word;
}

body.g3-no-scroll { overflow: hidden; }

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

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

button { font: inherit; }

:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.g3-topbar :focus-visible,
.g3-section--navy :focus-visible,
.g3-footer :focus-visible,
.g3-drawer :focus-visible { outline-color: var(--lime-light); }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.g3-skip {
	position: absolute;
	top: -60px; left: 0;
	z-index: 9999;
	padding: 8px 16px;
	background: var(--lime);
	color: var(--navy-800);
	font-weight: 700;
	text-decoration: none;
}
.g3-skip:focus { top: 0; }

.g3-wrap {
	width: 100%;
	max-width: var(--wrap);
	margin: 0 auto;
	padding: 0 var(--gutter);
}
.g3-wrap--text { max-width: calc(880px + 2 * var(--gutter)); }

.g3-grow { flex: 1; }
.g3-tabular { font-variant-numeric: tabular-nums; }

/* Два голоса: сериф — заголовки, капитель вразрядку — служебные подписи */
.g3-display {
	font-family: var(--g3-serif);
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

.g3-eyebrow {
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.16em;
}

.g3-icon { width: 1em; height: 1em; flex: none; }

/* Кнопки */
.g3-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 24px;
	border: 1px solid transparent;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.16em;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s, border-color .15s, color .15s;
}
.g3-btn--navy { background: var(--navy); color: #fff; padding: 11px 20px; }

/* ═══════════════════════════════════════════════════════════════════════
   ШАПКА
   ═══════════════════════════════════════════════════════════════════════ */
.g3-topbar {
	background: var(--navy-800);
	color: var(--navy-300);
	font-size: 12px;
}
.g3-topbar__in {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 24px;
	min-height: 36px;
	padding-top: 6px;
	padding-bottom: 6px;
}
.g3-topbar a { color: inherit; text-decoration: none; }
.g3-topbar a:hover { color: var(--lime); }

.g3-lang {
	display: flex;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.g3-lang a {
	display: block;
	padding: 3px 8px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	color: var(--navy-300);
	text-decoration: none;
}
.g3-topbar .g3-lang a:hover { color: #fff; }
.g3-lang a.is-current,
.g3-topbar .g3-lang a.is-current { background: var(--lime); color: var(--navy-900); }

.g3-brandbar {
	background: #fff;
	border-bottom: 1px solid var(--line);
}
.g3-brandbar__in {
	display: flex;
	align-items: center;
	gap: 16px;
	padding-top: 16px;
	padding-bottom: 16px;
}

.g3-brand {
	display: flex;
	align-items: center;
	gap: 16px;
	min-width: 0;
	color: var(--ink);
	text-decoration: none;
}
.g3-brand__crest { width: auto; height: 44px; flex: none; }
.g3-brand__text { min-width: 0; }
.g3-brand__name {
	display: block;
	font-family: var(--g3-serif);
	font-size: 20px;
	font-weight: 500;
	line-height: 1.15;
}
.g3-brand__full {
	display: none;
	margin-top: 4px;
	font-size: 11px;
	line-height: 1.35;
	color: var(--ink-soft);
}

.g3-search {
	display: none;
	align-items: stretch;
	flex: none;
}
.g3-search input {
	width: 12rem;
	padding: 8px 12px;
	border: 1px solid var(--line-strong);
	border-right: 0;
	border-radius: 2px 0 0 2px;
	background: #fff;
	color: var(--ink);
	font: inherit;
	font-size: 14px;
	outline: none;
}
.g3-search input:focus { border-color: var(--navy); }
.g3-search button {
	display: grid;
	place-items: center;
	padding: 0 12px;
	border: 1px solid var(--navy);
	border-radius: 0 2px 2px 0;
	background: var(--navy);
	color: #fff;
	cursor: pointer;
}
.g3-search button:hover { background: var(--navy-600); }
.g3-search button .g3-icon { width: 16px; height: 16px; }

.g3-search--wide { display: flex; max-width: 560px; margin: 0 0 32px; }
.g3-search--wide input { flex: 1; width: auto; padding: 12px 14px; font-size: 16px; }
.g3-search--wide button { gap: 8px; padding: 0 18px; font-weight: 600; font-size: 14px; }

.g3-burger {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--line-strong);
	background: #fff;
	color: var(--navy);
	cursor: pointer;
}
.g3-burger:hover { border-color: var(--navy); }
.g3-burger .g3-icon { width: 24px; height: 24px; }

/* Меню */
.g3-nav {
	display: none;
	background: #fff;
	border-bottom: 1px solid var(--line);
}
.g3-menu {
	display: flex;
	align-items: stretch;
	margin: 0;
	padding: 0;
	list-style: none;
}
.g3-menu > li {
	position: relative;
	display: flex;
	align-items: center;
}
.g3-menu > li > a {
	display: flex;
	align-items: center;
	padding: 14px 12px 11px;
	border-bottom: 3px solid transparent;
	color: var(--ink);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	transition: color .15s, border-color .15s;
}
.g3-menu > li.menu-item-has-children > a { padding-right: 2px; }
.g3-menu > li > a:hover,
.g3-menu > li:hover > a { color: var(--navy); border-bottom-color: var(--navy-200); }
.g3-menu > li.current-menu-item > a,
.g3-menu > li.current-menu-ancestor > a,
.g3-menu > li.current-menu-parent > a,
.g3-menu > li.is-open > a { color: var(--navy); border-bottom-color: var(--lime); }

.g3-sub-toggle {
	display: grid;
	place-items: center;
	align-self: stretch;
	padding: 0 10px 0 4px;
	border: 0;
	border-bottom: 3px solid transparent;
	background: none;
	color: var(--ink);
	cursor: pointer;
}
.g3-sub-toggle .g3-icon { width: 14px; height: 14px; transition: transform .2s; }
.g3-menu > li:hover > .g3-sub-toggle { border-bottom-color: var(--navy-200); }
.g3-menu > li.is-open > .g3-sub-toggle { border-bottom-color: var(--lime); }
.is-open > .g3-sub-toggle .g3-icon { transform: rotate(180deg); }

.g3-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 60;
	display: none;
	min-width: 15rem;
	max-width: 22rem;
	margin: 0;
	padding: 6px 0;
	list-style: none;
	background: #fff;
	border: 1px solid var(--line);
	border-top: 3px solid var(--navy);
	box-shadow: 0 10px 24px rgba(11, 20, 37, .14);
}
.g3-menu > li:hover > .sub-menu,
.g3-menu > li:focus-within > .sub-menu,
.g3-menu > li.is-open > .sub-menu { display: block; }
.g3-menu > li:last-child > .sub-menu,
.g3-menu > li:nth-last-child(2) > .sub-menu { left: auto; right: 0; }
.g3-menu .sub-menu a {
	display: block;
	padding: 9px 20px;
	color: var(--ink);
	font-size: 14px;
	line-height: 1.4;
	text-decoration: none;
}
.g3-menu .sub-menu a:hover,
.g3-menu .sub-menu .current-menu-item > a { background: var(--paper); color: var(--navy); }
.g3-menu .sub-menu .current-menu-item > a { font-weight: 600; }

/* Мобильное меню */
.g3-drawer-backdrop {
	position: fixed;
	inset: 0;
	z-index: 90;
	background: rgba(0, 0, 0, .6);
}
.g3-drawer {
	position: fixed;
	top: 0;
	right: 0;
	z-index: 100;
	width: 340px;
	max-width: 100%;
	height: 100%;
	overflow-y: auto;
	background: var(--navy-900);
	color: var(--navy-100);
	box-shadow: -10px 0 40px rgba(0, 0, 0, .4);
	transform: translateX(100%);
	transition: transform .3s ease;
}
.g3-drawer.is-open { transform: none; }
/* Чёрная панель WordPress у вошедших в админку — не прятать под ней меню */
.admin-bar .g3-drawer { top: 46px; height: calc(100% - 46px); }
@media (min-width: 783px) { .admin-bar .g3-drawer { top: 32px; height: calc(100% - 32px); } }
.g3-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px;
	border-bottom: 1px solid rgba(146, 191, 35, .3);
}
.g3-drawer__title { font-family: var(--g3-serif); font-size: 17px; color: #fff; }
.g3-drawer__close {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--navy-200);
	cursor: pointer;
}
.g3-drawer__close .g3-icon { width: 22px; height: 22px; }
.g3-search--drawer { display: flex; padding: 16px 16px 8px; }
.g3-search--drawer input { flex: 1; width: auto; border-color: transparent; }
.g3-search--drawer button { border-color: var(--lime); background: var(--lime); color: var(--navy-900); }

.g3-drawer__menu,
.g3-drawer__menu .sub-menu { margin: 0; padding: 0; list-style: none; }
.g3-drawer__menu { padding: 8px 0; }
.g3-drawer__menu > li { display: flex; flex-wrap: wrap; }
.g3-drawer__menu > li > a {
	flex: 1;
	padding: 12px 16px;
	border-left: 3px solid transparent;
	color: var(--navy-100);
	font-size: 16px;
	font-weight: 500;
	text-decoration: none;
}
.g3-drawer__menu > li > a:hover,
.g3-drawer__menu .current-menu-item > a,
.g3-drawer__menu .current-menu-ancestor > a { color: var(--lime); border-left-color: var(--lime); }
.g3-drawer__menu .g3-sub-toggle { padding: 0 16px; border: 0; color: var(--navy-200); }
.g3-drawer__menu .g3-sub-toggle .g3-icon { width: 18px; height: 18px; }
.g3-drawer__menu .sub-menu {
	display: none;
	flex-basis: 100%;
	border-left: 3px solid var(--lime);
	background: rgba(0, 0, 0, .2);
}
.g3-drawer__menu .is-open > .sub-menu { display: block; }
.g3-drawer__menu .sub-menu a {
	display: block;
	padding: 10px 16px 10px 28px;
	color: var(--navy-200);
	font-size: 14px;
	text-decoration: none;
}
.g3-drawer__menu .sub-menu a:hover,
.g3-drawer__menu .sub-menu .current-menu-item > a { color: var(--lime); }
.g3-drawer__lang { padding: 16px; border-top: 1px solid rgba(146, 191, 35, .3); }

@media (min-width: 640px) {
	.g3-brand__crest { height: 56px; }
	.g3-brand__name { font-size: 22px; }
	.g3-brand__full { display: block; }
}
@media (min-width: 768px) {
	.g3-search { display: flex; }
}
@media (min-width: 1024px) {
	.g3-brand__name { font-size: 24px; }
	.g3-brand__full { font-size: 12px; }
}
@media (min-width: 1200px) {
	.g3-nav { display: block; }
	.g3-burger { display: none; }
}
@media (max-width: 639px) {
	.g3-hide-sm,
	.g3-topbar__addr { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   ГЛАВНАЯ
   ═══════════════════════════════════════════════════════════════════════ */
.g3-section { padding: 56px 0; background: var(--paper); }
.g3-section--tight { padding-top: 0; }
.g3-section--white { background: #fff; border-top: 1px solid var(--line); }
.g3-section__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 16px;
	margin-bottom: 28px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--line-strong);
}
.g3-section__title { margin: 0; font-size: 24px; }
.g3-more {
	color: var(--navy);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	border-bottom: 1px solid var(--line-strong);
}
.g3-more:hover { border-bottom-color: var(--navy); }

.g3-section--navy { background: var(--navy-800); color: var(--navy-200); }
.g3-section--navy .g3-section__title { color: #fff; }
.g3-section--navy .g3-section__head { border-bottom-color: rgba(255, 255, 255, .15); }
.g3-more--lime { color: var(--lime); border-bottom-color: rgba(146, 191, 35, .5); }
.g3-more--lime:hover { border-bottom-color: var(--lime); }

@media (min-width: 1024px) {
	.g3-section { padding: 64px 0; }
	.g3-section--tight { padding-top: 0; }
	.g3-section__title { font-size: 30px; }
}

/* Слайдер Smart Slider 3 со старой главной */
.g3-slider { background: var(--navy-900); }
.g3-slider .n2-section-smartslider { margin: 0 !important; }

/* Приветствие */
.g3-welcome { display: grid; gap: 32px; align-items: center; }
.g3-welcome__text { font-size: 17px; line-height: 1.7; max-width: 46rem; }
.g3-welcome__text p { margin: 0 0 1em; }
.g3-welcome__lead { font-family: var(--g3-serif); font-size: 22px; line-height: 1.4; color: var(--navy); }
.g3-welcome__img { width: 260px; height: auto; justify-self: center; }
@media (min-width: 900px) {
	.g3-welcome { grid-template-columns: 1fr 300px; }
	.g3-welcome__img { width: 300px; }
}

/* Карточки новостей */
.g3-cards { display: grid; gap: 24px; }
@media (min-width: 640px) { .g3-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .g3-cards { grid-template-columns: repeat(3, 1fr); } }
.g3-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	background: #fff;
	border: 1px solid #f0f2f5;
	border-radius: 12px;
	box-shadow: 0 1px 2px rgba(11, 20, 37, .06);
	transition: box-shadow .2s;
}
.g3-card:hover { box-shadow: 0 6px 18px rgba(11, 20, 37, .1); }
.g3-card__cover {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: linear-gradient(135deg, var(--navy-100), var(--navy-200));
}
.g3-card__cover img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .3s;
}
.g3-card:hover .g3-card__cover img { transform: scale(1.05); }
.g3-card__placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--navy-300); }
.g3-card__placeholder .g3-icon { width: 56px; height: 56px; stroke-width: 1.5; }
.g3-card__body { display: flex; flex: 1; flex-direction: column; padding: 18px 20px 20px; }
.g3-card__date { font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.g3-card__title { margin: 8px 0; font-size: 16px; font-weight: 600; line-height: 1.4; }
.g3-card__title a {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	color: var(--ink);
	text-decoration: none;
}
.g3-card__title a:hover { color: var(--navy); }
.g3-card__excerpt {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 1.55;
	color: var(--ink-soft);
}
.g3-card__more {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-top: auto;
	color: var(--navy);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}
.g3-card__more .g3-icon { width: 14px; height: 14px; transition: transform .15s; }
.g3-card__more:hover .g3-icon { transform: translateX(3px); }

/* ═══════════════════════════════════════════════════════════════════════
   ПОДВАЛ
   ═══════════════════════════════════════════════════════════════════════ */
/* Официальные ресурсы: карточки с логотипом/иконкой, названием и пояснением */
.g3-official { padding: 36px 0 40px; background: #fff; border-top: 1px solid var(--line); }
.g3-official__title {
	margin: 0 0 18px;
	color: var(--ink-soft);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}
.g3-res { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .g3-res { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .g3-res { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .g3-res { grid-template-columns: repeat(5, 1fr); } }
.g3-res > li { display: flex; }
.g3-res__card {
	position: relative;
	display: flex;
	flex: 1;
	gap: 12px;
	align-items: center;
	padding: 12px 34px 12px 12px;
	background: var(--paper);
	border: 1px solid var(--line);
	color: var(--ink);
	text-decoration: none;
	transition: border-color .15s, background .15s, box-shadow .15s;
}
.g3-res__card:hover, .g3-res__card:focus-visible { background: #fff; border-color: var(--navy); box-shadow: 0 4px 14px rgba(25, 43, 74, .08); }
.g3-res__logo {
	display: grid;
	flex: none;
	place-items: center;
	width: 64px;
	height: 44px;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--line);
}
/* У баннеров своя рамка и поля — слегка увеличиваем, чтобы рамка ушла за край. */
.g3-res__logo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); }
.g3-res__logo--icon { background: var(--navy); border-color: var(--navy); color: var(--lime); }
.g3-res__logo--icon .g3-icon { width: 22px; height: 22px; }
.g3-res__text { display: grid; gap: 2px; min-width: 0; }
.g3-res__name { font-size: 14px; font-weight: 600; line-height: 1.3; }
.g3-res__card:hover .g3-res__name { color: var(--navy); }
.g3-res__desc { font-size: 12px; line-height: 1.4; color: var(--ink-soft); }
.g3-res__ext { position: absolute; top: 10px; right: 10px; color: var(--navy-300, #9aa6bb); }
.g3-res__ext .g3-icon { width: 14px; height: 14px; }
.g3-res__card:hover .g3-res__ext { color: var(--navy); }

.g3-footer { background: var(--navy-900); color: var(--navy-200); font-size: 14px; }
.g3-footer a { color: var(--navy-100); text-decoration: none; }
.g3-footer a:hover { color: var(--lime); }
.g3-footer__grid {
	display: grid;
	gap: 36px;
	padding-top: 48px;
	padding-bottom: 40px;
}
@media (min-width: 768px) { .g3-footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .g3-footer__grid { grid-template-columns: 2fr 1fr; align-items: center; } }
.g3-footer__brand img { width: auto; height: 64px; }
.g3-footer__name { margin: 14px 0 0; max-width: 30rem; font-family: var(--g3-serif); font-size: 19px; line-height: 1.35; color: #fff; }
.g3-footer__contacts { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.g3-footer__contacts li { display: flex; gap: 10px; align-items: flex-start; }
.g3-footer__contacts .g3-icon { width: 16px; height: 16px; margin-top: 2px; color: var(--lime); }
.g3-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px;
	padding-top: 16px;
	padding-bottom: 20px;
	border-top: 1px solid rgba(255, 255, 255, .08);
	font-size: 12px;
	color: var(--navy-400);
}

/* ═══════════════════════════════════════════════════════════════════════
   ВНУТРЕННИЕ СТРАНИЦЫ
   ═══════════════════════════════════════════════════════════════════════ */
.g3-pagehead { background: #fff; border-bottom: 1px solid var(--line); padding: 24px 0 28px; }
.g3-pagehead__title { margin: 8px 0 0; font-size: 28px; }
.g3-pagehead__desc { margin-top: 12px; color: var(--ink-soft); }
@media (min-width: 1024px) { .g3-pagehead__title { font-size: 38px; } }

.g3-crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--ink-soft); }
.g3-crumbs li + li::before { content: '/'; margin: 0 8px; color: var(--line-strong); }
.g3-crumbs a { color: var(--ink-soft); text-decoration: none; }
.g3-crumbs a:hover { color: var(--navy); text-decoration: underline; }

.g3-article__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; font-size: 13px; color: var(--ink-soft); }
.g3-article__meta .g3-eyebrow { color: var(--lime-ink); text-decoration: none; }

.g3-page-body { padding-top: 40px; padding-bottom: 64px; }
.g3-empty { color: var(--ink-soft); }

/* Типографика текста записей и страниц */
.g3-content { font-size: 17px; line-height: 1.7; }
.g3-content > *:first-child { margin-top: 0; }
.g3-content p { margin: 0 0 1.1em; }
.g3-content h2,
.g3-content h3,
.g3-content h4 { font-family: var(--g3-serif); font-weight: 400; line-height: 1.25; margin: 1.8em 0 .6em; }
.g3-content h2 { font-size: 28px; }
.g3-content h3 { font-size: 22px; }
.g3-content h4 { font-size: 19px; }
.g3-content a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.g3-content a:hover { text-decoration-color: var(--navy); }
.g3-content ul,
.g3-content ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.g3-content li { margin-bottom: .4em; }
.g3-content ul li::marker { color: var(--lime-ink); }
.g3-content blockquote {
	margin: 1.6em 0;
	padding: 4px 0 4px 20px;
	border-left: 3px solid var(--lime);
	font-family: var(--g3-serif);
	font-style: italic;
	font-size: 19px;
	color: var(--ink);
}
.g3-content img { height: auto; border-radius: 4px; }
.g3-content .alignleft { float: left; margin: .3em 1.6em 1em 0; max-width: 50%; }
.g3-content .alignright { float: right; margin: .3em 0 1em 1.6em; max-width: 50%; }
.g3-content .aligncenter { display: block; margin: 1.4em auto; }
.g3-content::after { content: ''; display: table; clear: both; }
.g3-content .wp-caption { max-width: 100%; }
.g3-content .wp-caption-text,
.g3-content figcaption { margin-top: 6px; font-size: 13px; color: var(--ink-soft); }
.g3-content figure { margin: 1.4em 0; }
.g3-content hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.g3-content table {
	width: 100%;
	margin: 1.4em 0;
	border-collapse: collapse;
	font-size: 15px;
	background: #fff;
}
.g3-content th,
.g3-content td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.g3-content th,
.g3-content thead td { background: var(--paper); font-weight: 600; }
.g3-content iframe,
.g3-content video { max-width: 100%; }
.g3-content .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.g3-content .gallery-item { width: auto !important; margin: 0 !important; }
.g3-content .gallery img { border: 0 !important; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 700px) {
	.g3-content .alignleft,
	.g3-content .alignright { float: none; max-width: 100%; margin: 1em 0; }
	.g3-content table { display: block; overflow-x: auto; }
}

/* Пагинация и соседние записи */
.g3-pagination { margin-top: 40px; }
.g3-pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.g3-pagination .page-numbers {
	min-width: 40px;
	padding: 8px 12px;
	border: 1px solid var(--line);
	background: #fff;
	color: var(--ink);
	font-size: 14px;
	text-align: center;
	text-decoration: none;
}
.g3-pagination a.page-numbers:hover { border-color: var(--navy); color: var(--navy); }
.g3-pagination .page-numbers.current { background: var(--navy); border-color: var(--navy); color: #fff; }

.g3-postnav { display: grid; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
@media (min-width: 640px) { .g3-postnav { grid-template-columns: 1fr 1fr; } }
.g3-postnav a { display: block; padding: 16px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: none; }
.g3-postnav a:hover { border-color: var(--navy); }
.g3-postnav span { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 400; color: var(--ink-soft); }
.g3-postnav__next { text-align: right; }
@media (min-width: 640px) { .g3-postnav__next { grid-column: 2; } }

/* Совместимость с плагином «Карточки постов в рубриках»: его шаблон
   выводит <main class="site-main warper"> со своим заголовком. */
.site-main.warper { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 32px var(--gutter) 64px; }
.site-main.warper .page-header { margin-bottom: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line-strong); }
.site-main.warper .page-title { margin: 0; font-family: var(--g3-serif); font-weight: 400; font-size: 30px; line-height: 1.2; }

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ═══════════════════════════════════════════════════════════════════════
   v1.1 — ГЛАВНАЯ КАК НА gim3.tasnim-tech.com
   ═══════════════════════════════════════════════════════════════════════ */

/* Кнопки первого экрана и «Приём 2027» в шапке */
.g3-btn--navy:hover { background: var(--navy-600); }
.g3-btn--lime { background: var(--lime); color: var(--navy-900); }
.g3-btn--lime:hover { background: var(--lime-light); }
.g3-btn--ghost { border-color: rgba(255, 255, 255, .45); color: #fff; }
.g3-btn--ghost:hover { background: rgba(255, 255, 255, .1); }
.g3-brandbar__cta { display: none; white-space: nowrap; }
@media (min-width: 900px) { .g3-brandbar__cta { display: inline-flex; } }

/* Третий уровень меню (шапка): выезжает вправо от пункта второго уровня */
.g3-menu .sub-menu li { position: relative; display: flex; }
.g3-menu .sub-menu li > a { flex: 1; }
.g3-menu .sub-menu .g3-sub-toggle { border-bottom: 0; padding: 0 12px 0 4px; }
.g3-menu .sub-menu .g3-sub-toggle .g3-icon { transform: rotate(-90deg); }
.g3-menu .sub-menu .sub-menu { top: -9px; left: 100%; }
.g3-menu .sub-menu li:hover > .sub-menu,
.g3-menu .sub-menu li:focus-within > .sub-menu,
.g3-menu .sub-menu li.is-open > .sub-menu { display: block; }
.g3-menu > li:last-child .sub-menu .sub-menu,
.g3-menu > li:nth-last-child(2) .sub-menu .sub-menu { left: auto; right: 100%; }

/* Третий уровень в мобильном меню */
.g3-drawer__menu .sub-menu li { display: flex; flex-wrap: wrap; }
.g3-drawer__menu .sub-menu li > a { flex: 1; }
.g3-drawer__menu .sub-menu .sub-menu { border-left: 0; background: rgba(0, 0, 0, .25); }
.g3-drawer__menu .sub-menu .sub-menu a { padding-left: 44px; }

/* Юбилейная полоса под меню */
.g3-jubbar { background: #eef3e2; border-bottom: 1px solid #d9e4bf; font-size: 13px; color: var(--ink); }
.g3-jubbar__in { display: flex; align-items: center; gap: 12px 16px; padding-top: 8px; padding-bottom: 8px; }
.g3-jubbar__num { font-size: 22px; line-height: 1; color: var(--lime-ink); }
.g3-jubbar__text { flex: 1; min-width: 0; }
.g3-jubbar__link {
	flex: none;
	color: var(--lime-ink);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
}
.g3-jubbar__link:hover { text-decoration: underline; }
@media (max-width: 639px) {
	.g3-jubbar__in { flex-wrap: wrap; }
	.g3-jubbar__num { display: none; }
}

/* Первый экран */
.g3-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 400px;
	overflow: hidden;
	background: var(--navy-900);
	color: #fff;
}
.g3-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.g3-hero__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(to right, rgba(11, 20, 37, .95), rgba(11, 20, 37, .8) 50%, rgba(11, 20, 37, .3));
}
.g3-hero__in { position: relative; padding-top: 112px; padding-bottom: 48px; }
.g3-hero__in > * { max-width: 42rem; }
.g3-hero__kicker { margin: 0 0 16px; color: var(--lime-light); }
.g3-hero__title { margin: 0; font-size: 30px; color: #fff; }
.g3-hero__lead { margin: 20px 0 0; max-width: 36rem; font-size: 16px; color: var(--navy-200); }
.g3-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
@media (min-width: 768px) {
	.g3-hero { min-height: 520px; }
	.g3-hero__in { padding-top: 160px; padding-bottom: 64px; }
	.g3-hero__title { font-size: 36px; }
	.g3-hero__lead { font-size: 18px; }
}
@media (min-width: 1024px) {
	.g3-hero { min-height: 600px; }
	.g3-hero__title { font-size: 48px; }
}

/* Ступени обучения */
.g3-stages { display: grid; gap: 16px; }
@media (min-width: 768px) { .g3-stages { grid-template-columns: 1fr 1fr; } }
.g3-stage { padding: 24px; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--navy); }
.g3-stage__range {
	display: block;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--ink-soft);
}
.g3-stage__title { margin: 8px 0; font-size: 20px; }
.g3-stage__text { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ink-soft); }

/* Родителям — главное */
.g3-pcards { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 600px) { .g3-pcards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .g3-pcards { grid-template-columns: repeat(4, 1fr); } }
.g3-pcards > li { display: flex; }
.g3-pcard {
	display: flex;
	flex: 1;
	gap: 14px;
	align-items: flex-start;
	padding: 18px;
	background: #fff;
	border: 1px solid var(--line);
	color: var(--ink);
	text-decoration: none;
	transition: border-color .15s, box-shadow .15s;
}
.g3-pcard:hover, .g3-pcard:focus-visible { border-color: var(--navy); box-shadow: 0 2px 10px rgba(25, 43, 74, .08); }
.g3-pcard__icon {
	display: grid;
	flex: none;
	place-items: center;
	width: 40px;
	height: 40px;
	background: var(--navy);
	color: var(--lime);
}
.g3-pcard__icon .g3-icon { width: 22px; height: 22px; }
.g3-pcard__body { display: grid; gap: 4px; min-width: 0; }
.g3-pcard__title { font-weight: 600; font-size: 15px; line-height: 1.3; }
.g3-pcard:hover .g3-pcard__title { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.g3-pcard__desc { font-size: 13px; line-height: 1.5; color: var(--ink-soft); }

/* Слово директора */
.g3-quote { margin: 0; padding: 28px; background: #fff; border: 1px solid var(--line); }
.g3-quote__text { margin: 0; font-size: 20px; font-style: italic; font-weight: 300; line-height: 1.35; }
.g3-quote__by { margin-top: 20px; font-size: 14px; color: var(--ink-soft); }
.g3-quote__name { display: block; font-size: 16px; font-weight: 600; color: var(--ink); }
.g3-quote--photo { display: grid; gap: 22px; align-items: center; }
.g3-quote__body { margin: 0; }
.g3-quote__photo { display: block; width: 140px; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
@media (min-width: 640px) {
	.g3-quote--photo { grid-template-columns: 160px 1fr; gap: 32px; }
	.g3-quote__photo { width: 160px; }
}
@media (min-width: 1024px) {
	.g3-quote { padding: 36px; }
	.g3-quote__text { font-size: 24px; }
	.g3-quote--photo { grid-template-columns: 200px 1fr; gap: 44px; }
	.g3-quote__photo { width: 200px; }
}

/* Юбилейный год */
.g3-jubilee { display: grid; gap: 40px; align-items: start; }
@media (min-width: 1024px) { .g3-jubilee { grid-template-columns: 1fr 1fr; } }
.g3-jubilee__fig { margin: 0; }
.g3-jubilee__fig img { display: block; width: 100%; border: 1px solid rgba(255, 255, 255, .15); filter: grayscale(1) contrast(1.05); }
.g3-jubilee__fig figcaption { padding-top: 10px; font-size: 12px; color: var(--navy-400); }
.g3-jubilee__lead { margin: 0 0 24px; line-height: 1.65; }
.g3-timeline { margin: 0; }
.g3-timeline > div { display: grid; grid-template-columns: 4.5rem 1fr; gap: 20px; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.g3-timeline dt { color: var(--lime); font-size: 16px; }
.g3-timeline dd { margin: 0; font-size: 14px; line-height: 1.6; color: var(--navy-200); }

/* Быстрые ссылки */
.g3-quick { display: grid; gap: 32px; }
@media (min-width: 768px) { .g3-quick { grid-template-columns: repeat(3, 1fr); } }
.g3-quick__title { margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line-strong); font-size: 16px; font-weight: 600; }
.g3-quick ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.g3-quick a { color: var(--ink); font-size: 14px; text-decoration: none; }
.g3-quick a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 4px; }

/* ═══════════════════════════════════════════════════════════════════════
   ИСТОРИЯ ГИМНАЗИИ (page-history.php)
   ═══════════════════════════════════════════════════════════════════════ */
.g3-hist__head { padding-bottom: 0; }
.g3-hist__head .g3-eyebrow { margin: 16px 0 0; color: var(--lime-ink); }
.g3-hist__head .g3-pagehead__title { margin-top: 6px; }
.g3-hist__lead { max-width: 680px; margin: 12px 0 0; color: var(--ink-soft); font-size: 17px; line-height: 1.6; }

.g3-hist__facts {
	list-style: none;
	margin: 28px 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	border-top: 1px solid var(--line);
}
.g3-hist__facts li {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 18px 16px 18px 0;
	font-size: 14px;
	line-height: 1.4;
	color: var(--ink-soft);
}
.g3-hist__num { font-family: var(--g3-serif); font-size: 34px; line-height: 1; color: var(--navy); }
@media (min-width: 900px) {
	.g3-hist__facts { grid-template-columns: repeat(4, 1fr); }
	.g3-hist__facts li + li { padding-left: 20px; border-left: 1px solid var(--line); }
	.g3-hist__num { font-size: 42px; }
}

.g3-hist__toc {
	display: flex;
	gap: 4px 24px;
	flex-wrap: wrap;
	margin-top: 8px;
	border-top: 1px solid var(--line);
}
.g3-hist__toc a {
	padding: 14px 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--navy);
	text-decoration: none;
	border-bottom: 2px solid transparent;
}
.g3-hist__toc a:hover { border-bottom-color: var(--lime); }
.g3-hist [id] { scroll-margin-top: 24px; }

/* Лента времени */
.g3-tl { list-style: none; margin: 0; padding: 0; position: relative; }
.g3-tl::before {
	content: '';
	position: absolute;
	left: 7px;
	top: 8px;
	bottom: 8px;
	width: 2px;
	background: linear-gradient(var(--navy-200), var(--lime));
}
.g3-tl__item { position: relative; padding: 0 0 36px 36px; }
.g3-tl__item:last-child { padding-bottom: 0; }
.g3-tl__item::before {
	content: '';
	position: absolute;
	left: 0;
	top: 4px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	border: 3px solid var(--navy);
	box-sizing: border-box;
}
.g3-tl__item--now::before { background: var(--lime); border-color: var(--lime); box-shadow: 0 0 0 5px rgba(146, 191, 35, .2); }
.g3-tl__years {
	margin: 0 0 6px;
	font-family: var(--g3-serif);
	font-size: 22px;
	line-height: 1.2;
	color: var(--navy);
	font-variant-numeric: tabular-nums;
}
.g3-tl__item--now .g3-tl__years { color: var(--lime-ink); }
.g3-tl__title { margin: 0 0 8px; font-size: 17px; font-weight: 700; line-height: 1.35; }
.g3-tl__body p { margin: 0 0 10px; color: var(--ink-soft); line-height: 1.65; max-width: 680px; }
.g3-tl__note {
	padding: 10px 14px;
	border-left: 3px solid var(--lime);
	background: var(--paper);
	color: var(--ink) !important;
	font-size: 15px;
}
.g3-tl__fig { margin: 12px 0 0; max-width: 420px; }
.g3-tl__fig img { display: block; width: 100%; height: auto; border-radius: 4px; filter: grayscale(1) contrast(1.05); }
.g3-tl__fig figcaption { margin-top: 6px; font-size: 13px; color: var(--ink-soft); }

@media (min-width: 900px) {
	.g3-tl::before { left: 179px; }
	.g3-tl__item { display: grid; grid-template-columns: 150px 1fr; gap: 0 60px; padding-left: 0; padding-bottom: 44px; }
	.g3-tl__item::before { left: 172px; }
	.g3-tl__years { text-align: right; font-size: 24px; }
	.g3-tl__body--photo { display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: start; }
	.g3-tl__fig { margin: 0; }
	.g3-tl__title { font-size: 19px; }
}

/* Направления сегодня */
.g3-hist__dirs {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 12px;
}
.g3-hist__dirs li {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	padding: 18px;
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: 4px;
	color: #fff;
	line-height: 1.5;
}
.g3-hist__dicon {
	display: grid;
	place-items: center;
	flex: none;
	width: 40px;
	height: 40px;
	border-radius: 4px;
	background: rgba(146, 191, 35, .14);
	color: var(--lime);
	font-size: 20px;
}
@media (min-width: 640px) { .g3-hist__dirs { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .g3-hist__dirs { grid-template-columns: repeat(3, 1fr); } }

/* Директора */
.g3-dirs {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	align-items: start;
}
@media (min-width: 768px) { .g3-dirs { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media (min-width: 1100px) { .g3-dirs { grid-template-columns: repeat(5, 1fr); } }
.g3-dir { background: #fff; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.g3-dir__photo { position: relative; aspect-ratio: 4 / 5; background: var(--navy-100); }
.g3-dir__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.g3-dir__initials {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	font-family: var(--g3-serif);
	font-size: 44px;
	color: var(--navy-400);
}
.g3-dir--now .g3-dir__photo { background: var(--navy); }
.g3-dir--now .g3-dir__initials { color: var(--lime); }
.g3-dir__years {
	position: absolute;
	left: 10px;
	bottom: 10px;
	padding: 4px 8px;
	background: var(--navy-800);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
	border-radius: 2px;
	font-variant-numeric: tabular-nums;
}
.g3-dir--now .g3-dir__years { background: var(--lime); color: var(--navy-900); }
.g3-dir__body { padding: 14px 14px 12px; }
.g3-dir__name { margin: 0; font-family: var(--g3-serif); font-weight: 400; font-size: 17px; line-height: 1.25; }
.g3-dir__role { margin: 6px 0 0; font-size: 13px; line-height: 1.4; color: var(--ink-soft); }
@media (max-width: 479px) {
	.g3-dir__body { padding: 12px 10px 10px; }
	.g3-dir__name { font-size: 15px; }
}


/* Карточка директора открывает биографию */
.g3-dir--link { cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s; }
.g3-dir--link:hover { border-color: var(--navy-300); box-shadow: 0 10px 24px -14px rgba(16, 27, 51, .45); transform: translateY(-2px); }
.g3-dir { display: flex; flex-direction: column; align-self: stretch; }
.g3-dirs { align-items: stretch; }
.g3-dir__body { display: flex; flex-direction: column; flex: 1; }
.g3-dir__more {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	margin-top: auto;
	padding: 12px 0 0;
	border: 0;
	border-top: 1px solid var(--line);
	background: none;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	color: var(--navy);
	cursor: pointer;
	text-align: left;
}
.g3-dir__role { margin-bottom: 12px; }
.g3-dir__more span { color: var(--lime-ink); transition: transform .2s; }
.g3-dir--link:hover .g3-dir__more span { transform: translateX(3px); }

/* Листок биографии */
html:has(.g3-bio[open]) { overflow: hidden; }
.g3-bio {
	width: min(640px, calc(100% - 24px));
	max-height: calc(100% - 48px);
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: #fff;
	color: var(--ink);
	box-shadow: 0 30px 60px -20px rgba(11, 20, 37, .5);
	overflow: auto;
	overscroll-behavior: contain;
}
.g3-bio::backdrop { background: rgba(11, 20, 37, .6); backdrop-filter: blur(3px); }
.g3-bio[open] { animation: g3-bio-in .22s ease-out; }
@keyframes g3-bio-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.g3-bio__sheet { position: relative; padding: 28px 24px 24px; border-top: 4px solid var(--lime); }
.g3-bio__close {
	position: absolute;
	top: 12px;
	right: 12px;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: var(--paper);
	color: var(--navy);
	font-size: 18px;
	cursor: pointer;
}
.g3-bio__close:hover { background: var(--navy-100); }
.g3-bio__head { display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: center; padding-right: 36px; }
.g3-bio__photo { position: relative; aspect-ratio: 4 / 5; border-radius: 4px; overflow: hidden; background: var(--navy-100); }
.g3-bio__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.g3-bio__photo .g3-dir__initials { font-size: 30px; }
.g3-bio__years { margin: 0; color: var(--lime-ink); }
.g3-bio__name { margin: 6px 0 0; font-size: 24px; }
.g3-bio__role { margin: 6px 0 0; font-size: 14px; color: var(--ink-soft); }
.g3-bio__list { margin: 22px 0 0; }
.g3-bio__list > div { padding: 14px 0; border-top: 1px solid var(--line); }
.g3-bio__list dt { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--navy); }
.g3-bio__list dd { margin: 6px 0 0; font-size: 15px; line-height: 1.65; color: var(--ink); }
@media (min-width: 640px) {
	.g3-bio__sheet { padding: 36px 36px 28px; }
	.g3-bio__head { grid-template-columns: 120px 1fr; gap: 24px; }
	.g3-bio__name { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) { .g3-bio[open] { animation: none; } .g3-dir--link:hover { transform: none; } }

/* ═══════════════════════════════════════════════════════════════════════
   ПОГОДА В ВЕРХНЕЙ ПОЛОСЕ (inc/weather.php)
   ═══════════════════════════════════════════════════════════════════════ */
.g3-weather {
	--g3-w: var(--lime);
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 3px 10px 3px 8px;
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: 999px;
	white-space: nowrap;
	cursor: default;
}
.g3-weather--frost { --g3-w: #8fd3ff; }
.g3-weather--cold  { --g3-w: #6aa8ff; }
.g3-weather--mild  { --g3-w: var(--lime); }
.g3-weather--warm  { --g3-w: #f5c542; }
.g3-weather--hot   { --g3-w: #ff8a4c; }
.g3-weather__icon { display: inline-flex; font-size: 16px; color: #fff; }
.g3-weather__dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--g3-w);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--g3-w) 25%, transparent);
}
.g3-weather__temp { font-size: 13px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.g3-weather__city { color: var(--navy-300); }
.g3-weather--frost .g3-weather__dot { animation: g3-pulse 1.8s ease-in-out infinite; }
@keyframes g3-pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--g3-w) 10%, transparent); } }
@media (max-width: 639px) { .g3-weather__city { display: none; } }
@media (prefers-reduced-motion: reduce) { .g3-weather__dot { animation: none !important; } }

/* ═══════════════════════════════════════════════════════════════════════
   ЮБИЛЕЙНАЯ ЛЕНТА в правом нижнем углу (footer.php, настройка g3_jubilee_ribbon)
   ═══════════════════════════════════════════════════════════════════════ */
.g3-ribbon {
	--g3-gold: #f1c75b;
	--g3-gold-dark: #b8862b;
	--g3-red: #c8102e;
	position: fixed;
	right: 0;
	bottom: 0;
	z-index: 90;
	width: 290px;
	height: 290px;
	overflow: hidden;
	pointer-events: none;
}
.g3-ribbon__band {
	position: absolute;
	left: 56%;
	top: 56%;
	width: 460px;
	padding: 19px 0;
	transform: translate(-50%, -50%) rotate(-45deg);
	text-align: center;
	white-space: nowrap;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #fff;
	text-decoration: none;
	text-shadow: 0 1px 0 rgba(0, 0, 0, .25);
	/* Красная лента с двойной золотой каймой сверху и снизу */
	background: linear-gradient(180deg,
		var(--g3-gold) 0 3px,
		var(--g3-red) 3px 5px,
		var(--g3-gold-dark) 5px 6px,
		var(--g3-red) 6px calc(100% - 6px),
		var(--g3-gold-dark) calc(100% - 6px) calc(100% - 5px),
		var(--g3-red) calc(100% - 5px) calc(100% - 3px),
		var(--g3-gold) calc(100% - 3px));
	box-shadow: 0 6px 18px -6px rgba(90, 0, 15, .6);
	pointer-events: auto;
}
.g3-ribbon__band > span { color: var(--g3-gold); }

/* Колокольчики с бантом — в центре под лентой, висят отвесно и качаются */
.g3-bells {
	position: absolute;
	top: calc(100% - 4px);
	left: 50%;
	width: 0;
	transform: rotate(0deg); /* наклон 45° от вертикали вокруг кольца — по ленте */
	transform-origin: 0 0;
	animation: g3-bell-swing 3s ease-in-out infinite;
}
.g3-bells img {
	display: block;
	width: 74px;
	height: auto;
	max-width: none;
	margin-left: -37px;
	filter: drop-shadow(0 3px 3px rgba(60, 0, 10, .35));
}
@keyframes g3-bell-swing {
	0%, 100% { transform: rotate(-6deg); }
	50% { transform: rotate(6deg); }
}
@media (prefers-reduced-motion: reduce) { .g3-bells { animation: none; } }
a.g3-ribbon__band:hover { filter: brightness(1.08); }
a.g3-ribbon__band:focus-visible { outline: 3px solid var(--g3-gold); outline-offset: 2px; }
@media (max-width: 639px) {
	.g3-ribbon { width: 220px; height: 220px; }
	.g3-ribbon__band { width: 360px; left: 52%; top: 52%; padding: 14px 0; font-size: 9.5px; letter-spacing: .04em; }
	.g3-bells img { width: 54px; margin-left: -27px; }
}
@media print { .g3-ribbon { display: none; } }
