/*
Theme Name: Rotary Club Murmansk
Theme URI: https://rotary-murmansk.ru
Author: Aleksey
Description: Тема для сайта Ротари клуба Мурманск. Конструктивистская сетка, фирменные цвета Rotary International (Royal Blue / Gold), шестерня-эмблема, разделы: проекты, новости, календарь.
Version: 1.1.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: rotary
*/

:root {
	--cream: #f4f0e6;
	--blue: #1b3f86;
	--blue-dark: #16346d;
	--gold: #f7a81b;
	--ink: #14213d;
	--gray: #dcdad4;
	--line: #1b3f86;
	--font: "Montserrat", "Arial", sans-serif;
	--pad: clamp(20px, 4vw, 64px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	background: var(--cream);
	color: var(--ink);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

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

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

.wrap {
	max-width: 1440px;
	margin: 0 auto;
	border-inline: 1px solid var(--line);
	background: var(--cream);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.screen-reader-text {
	position: absolute;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

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

.site-header {
	display: flex;
	align-items: center;
	gap: clamp(16px, 3vw, 48px);
	padding: 20px var(--pad);
	border-bottom: 1px solid var(--line);
	position: relative;
	z-index: 20;
}

.brand {
	display: flex;
	align-items: center;
	gap: 14px;
	text-decoration: none;
	flex-shrink: 0;
}

.brand img.brand-mark { width: 58px; height: 58px; }

.brand img.custom-logo { width: 58px; height: 58px; object-fit: contain; }

.brand-text {
	line-height: 1.02;
	color: var(--blue);
	text-transform: uppercase;
	font-weight: 800;
}

.brand-text .brand-city {
	display: block;
	font-size: 13px;
	letter-spacing: 0.08em;
}

.brand-text .brand-name {
	display: block;
	font-size: 24px;
	letter-spacing: 0.02em;
}

.brand-text .brand-club {
	display: block;
	font-size: 15px;
	letter-spacing: 0.14em;
}

.site-nav { margin-left: auto; }

.site-nav ul {
	display: flex;
	gap: clamp(14px, 2.4vw, 40px);
	list-style: none;
}

.site-nav a {
	color: var(--ink);
	text-decoration: none;
	text-transform: uppercase;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.1em;
	padding: 6px 0;
	border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a {
	color: var(--blue);
	border-bottom-color: var(--gold);
}

.btn {
	display: inline-block;
	background: var(--blue);
	color: #fff;
	text-decoration: none;
	text-transform: uppercase;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.12em;
	padding: 16px 28px;
	border: 1px solid var(--blue);
	transition: background 0.15s, color 0.15s;
}

.btn:hover { background: var(--blue-dark); color: #fff; }

.btn--gold {
	background: var(--gold);
	border-color: var(--gold);
	color: var(--ink);
}

.btn--gold:hover { background: #e09708; color: var(--ink); }

.burger {
	display: none;
	flex-direction: column;
	gap: 5px;
	background: none;
	border: 0;
	cursor: pointer;
	padding: 8px;
}

.burger span {
	width: 26px;
	height: 3px;
	background: var(--ink);
	display: block;
}

.mobile-menu {
	display: none;
	border-bottom: 1px solid var(--line);
	padding: 16px var(--pad) 24px;
}

.mobile-menu.is-open { display: block; }

.mobile-menu ul { list-style: none; }

.mobile-menu a {
	display: block;
	padding: 12px 0;
	color: var(--ink);
	text-decoration: none;
	text-transform: uppercase;
	font-weight: 700;
	letter-spacing: 0.1em;
	border-bottom: 1px solid rgba(27, 63, 134, 0.15);
}

/* ---------- Герой ---------- */

.hero {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 46fr) minmax(0, 44fr) clamp(64px, 7vw, 110px);
	border-bottom: 1px solid var(--line);
}

.hero-copy {
	padding: clamp(40px, 6vw, 90px) var(--pad) clamp(160px, 16vw, 220px);
}

.hero-title {
	color: var(--blue);
	font-size: clamp(38px, 5.6vw, 84px);
	line-height: 1.02;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.01em;
}

.hero-rule {
	width: 84px;
	height: 6px;
	background: var(--gold);
	margin: clamp(24px, 3.4vw, 52px) 0;
}

.hero-sub {
	text-transform: uppercase;
	font-weight: 700;
	font-size: clamp(14px, 1.3vw, 19px);
	letter-spacing: 0.06em;
	max-width: 26em;
}

.hero-more {
	display: inline-flex;
	align-items: center;
	gap: 18px;
	margin-top: clamp(28px, 4vw, 60px);
	color: var(--ink);
	text-decoration: none;
	text-transform: uppercase;
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.14em;
	border-bottom: 2px solid var(--ink);
	padding-bottom: 8px;
}

.hero-more .arrow { font-size: 20px; transition: transform 0.15s; }

.hero-more:hover .arrow { transform: translateX(6px); }

.hero-art {
	min-height: clamp(380px, 46vw, 660px);
}

/* Декор героя выровнен по колонкам полосы статистики:
   границы сетки 1:1:1:1.35:1 → 37.3832% (35+), 56.0748% (девиз), 81.3084% (точки). */

.hero-panel {
	position: absolute;
	left: 56.0748%;
	right: 18.6916%;
	top: 0;
	bottom: -1px;
	background: var(--blue);
	display: flex;
	align-items: center;
	justify-content: center;
}

.hero-panel img.hero-mark {
	width: 130%;
	max-width: none;
	max-height: 78%;
	object-fit: contain;
	flex-shrink: 0;
}

.hero-sq-gold,
.hero-sq-gray {
	position: absolute;
	bottom: -1px;
	aspect-ratio: 1;
}

.hero-sq-gold {
	left: 37.3832%;
	width: 18.6916%;
	background: var(--gold);
}

.hero-sq-gray {
	left: 81.3084%;
	right: clamp(64px, 7vw, 110px);
	background: var(--gray);
}

.hero-side {
	border-left: 1px solid var(--line);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	padding: clamp(24px, 3vw, 40px) 0;
}

.hero-side-text {
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	text-transform: uppercase;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.28em;
	color: var(--ink);
	white-space: nowrap;
}

.hero-side-dot {
	width: 16px;
	height: 16px;
	background: var(--gold);
	margin-top: 24px;
}

/* ---------- Полоса статистики ---------- */

.statband {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.35fr) minmax(0, 1fr);
	border-bottom: 1px solid var(--line);
}

.stat {
	padding: clamp(24px, 3vw, 44px) var(--pad);
	border-right: 1px solid var(--line);
}

.stat-num {
	color: var(--blue);
	font-size: clamp(30px, 3.4vw, 52px);
	font-weight: 800;
	line-height: 1;
}

.stat-label {
	margin-top: 10px;
	text-transform: uppercase;
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 0.12em;
}

.stat-motto {
	background: var(--blue);
	color: #fff;
	padding: clamp(24px, 3vw, 44px) var(--pad);
	text-transform: uppercase;
	font-weight: 700;
	font-size: clamp(14px, 1.2vw, 18px);
	letter-spacing: 0.06em;
	line-height: 1.5;
	display: flex;
	align-items: center;
}

.stat-dots {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.dot-grid {
	display: grid;
	grid-template-columns: repeat(8, 8px);
	gap: 14px;
}

.dot-grid i {
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--ink);
}

/* ---------- Секции ---------- */

.section { border-bottom: 1px solid var(--line); }

.section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 24px;
	padding: clamp(32px, 4vw, 56px) var(--pad) 0;
}

.section-title {
	color: var(--blue);
	font-size: clamp(26px, 3.2vw, 46px);
	font-weight: 800;
	text-transform: uppercase;
	line-height: 1.05;
}

.section-title::after {
	content: "";
	display: block;
	width: 64px;
	height: 5px;
	background: var(--gold);
	margin-top: 16px;
}

.section-link {
	color: var(--ink);
	text-decoration: none;
	text-transform: uppercase;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.12em;
	border-bottom: 2px solid var(--ink);
	padding-bottom: 6px;
	white-space: nowrap;
}

.section-link:hover { color: var(--blue); border-color: var(--gold); }

.section-body {
	padding: clamp(28px, 3.6vw, 48px) var(--pad) clamp(40px, 5vw, 72px);
}

/* О клубе */

.about-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
	gap: clamp(28px, 4vw, 64px);
	align-items: start;
}

.about-text { font-size: clamp(15px, 1.15vw, 18px); max-width: 60ch; }

.about-text p + p { margin-top: 1em; }

.about-values { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }

.about-value {
	background: var(--cream);
	padding: 20px 24px;
	display: flex;
	gap: 16px;
	align-items: center;
	font-weight: 700;
	text-transform: uppercase;
	font-size: 13px;
	letter-spacing: 0.08em;
}

.about-value::before {
	content: "";
	width: 12px;
	height: 12px;
	background: var(--gold);
	flex-shrink: 0;
}

/* Карточки (проекты / новости) */

.cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1px;
	background: var(--line);
	border: 1px solid var(--line);
}

.card {
	background: var(--cream);
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: var(--ink);
	min-height: 240px;
	transition: background 0.15s;
}

.card:hover { background: #ece7d9; }

.card-thumb { aspect-ratio: 16 / 9; overflow: hidden; }

.card-thumb img { width: 100%; height: 100%; object-fit: cover; }

.card-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }

.card-tag {
	text-transform: uppercase;
	font-weight: 700;
	font-size: 11px;
	letter-spacing: 0.14em;
	color: var(--gold);
}

.card-title {
	font-size: 19px;
	font-weight: 800;
	line-height: 1.25;
	text-transform: uppercase;
	color: var(--blue);
}

.card-excerpt { font-size: 14px; }

.card-arrow { margin-top: auto; font-size: 20px; color: var(--ink); }

/* Календарь */

.events { border: 1px solid var(--line); }

.event-row {
	display: grid;
	grid-template-columns: clamp(110px, 14vw, 200px) minmax(0, 1fr) auto;
	align-items: center;
	gap: 24px;
	padding: 22px var(--pad);
	text-decoration: none;
	color: var(--ink);
	border-bottom: 1px solid var(--line);
	transition: background 0.15s;
}

.event-row:last-child { border-bottom: 0; }

.event-row:hover { background: #ece7d9; }

.event-date {
	color: var(--blue);
	font-weight: 800;
	font-size: clamp(16px, 1.4vw, 22px);
	text-transform: uppercase;
	line-height: 1.1;
}

.event-name { display: block; font-weight: 700; font-size: 16px; text-transform: uppercase; letter-spacing: 0.02em; }

.event-place { display: block; font-size: 13px; margin-top: 4px; color: rgba(20, 33, 61, 0.7); }

.event-arrow { font-size: 22px; color: var(--gold); }

/* CTA-полоса */

.join {
	background: var(--blue);
	color: #fff;
	border-bottom: 1px solid var(--line);
	padding: clamp(40px, 6vw, 88px) var(--pad);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	position: relative;
	overflow: hidden;
}

.join::after {
	content: "";
	position: absolute;
	right: -80px;
	top: 50%;
	transform: translateY(-50%);
	width: 300px;
	height: 300px;
	border: 40px solid rgba(247, 168, 27, 0.25);
	border-radius: 50%;
}

.join-title {
	font-size: clamp(24px, 3vw, 44px);
	font-weight: 800;
	text-transform: uppercase;
	line-height: 1.1;
	max-width: 16em;
}

.join .btn--gold { position: relative; z-index: 1; }

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

.site-footer { margin-top: auto; }

.footer-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 1fr));
	gap: 1px;
	background: var(--line);
	border-bottom: 1px solid var(--line);
}

.footer-cell { background: var(--cream); padding: clamp(28px, 3.6vw, 48px) var(--pad); }

.footer-cell h3 {
	text-transform: uppercase;
	font-size: 13px;
	letter-spacing: 0.14em;
	color: var(--blue);
	margin-bottom: 16px;
}

.footer-cell p { font-size: 14px; }

.footer-cell a { color: var(--ink); text-decoration: none; }

.footer-cell a:hover { color: var(--blue); }

.footer-cell ul { list-style: none; }

.footer-cell li { padding: 4px 0; font-size: 14px; }

.footer-bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px;
	padding: 20px var(--pad);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.1em;
}

/* ---------- Внутренние страницы ---------- */

.page-hero {
	padding: clamp(40px, 5vw, 72px) var(--pad);
	border-bottom: 1px solid var(--line);
}

.page-hero h1 {
	color: var(--blue);
	font-size: clamp(30px, 4vw, 60px);
	font-weight: 800;
	text-transform: uppercase;
	line-height: 1.05;
}

.page-hero h1::after {
	content: "";
	display: block;
	width: 84px;
	height: 6px;
	background: var(--gold);
	margin-top: 20px;
}

.page-meta { margin-top: 16px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; }

.content {
	padding: clamp(32px, 4vw, 56px) var(--pad) clamp(48px, 6vw, 88px);
	max-width: 900px;
	font-size: clamp(15px, 1.15vw, 18px);
}

.content > * + * { margin-top: 1.1em; }

.content h2, .content h3 {
	color: var(--blue);
	text-transform: uppercase;
	line-height: 1.2;
	margin-top: 1.6em;
}

.content ul, .content ol { padding-left: 1.4em; }

.content blockquote {
	border-left: 5px solid var(--gold);
	padding-left: 20px;
	font-weight: 600;
}

.content img { border: 1px solid var(--line); }

.archive-list { padding: clamp(32px, 4vw, 56px) var(--pad) clamp(48px, 6vw, 88px); }

.archive-list .cards { margin-top: 0; }

/* ---------- Колонки с сайдбаром ---------- */

.layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) clamp(260px, 24vw, 340px);
	gap: clamp(28px, 4vw, 64px);
	align-items: start;
	padding: clamp(32px, 4vw, 56px) var(--pad) clamp(48px, 6vw, 88px);
}

.layout .content { padding: 0; max-width: none; }

.layout .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.sidebar { display: grid; gap: 28px; }

.widget {
	border: 1px solid var(--line);
	padding: 24px;
	background: var(--cream);
}

.widget-title {
	color: var(--blue);
	text-transform: uppercase;
	font-size: 14px;
	letter-spacing: 0.12em;
	font-weight: 800;
	margin-bottom: 18px;
}

.widget-title::after {
	content: "";
	display: block;
	width: 40px;
	height: 4px;
	background: var(--gold);
	margin-top: 10px;
}

.widget ul { list-style: none; }

.sidebar-events li + li { border-top: 1px solid rgba(27, 63, 134, 0.2); }

.sidebar-events a {
	display: block;
	padding: 14px 0;
	text-decoration: none;
	color: var(--ink);
}

.sidebar-events a:hover .sidebar-event-name { color: var(--blue); }

.sidebar-event-date {
	display: block;
	color: var(--gold);
	font-weight: 800;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.1em;
}

.sidebar-event-name {
	display: block;
	font-weight: 700;
	font-size: 14px;
	text-transform: uppercase;
	margin-top: 4px;
}

.sidebar-event-place {
	display: block;
	font-size: 12px;
	margin-top: 2px;
	color: rgba(20, 33, 61, 0.7);
}

.widget-events .section-link { display: inline-block; margin-top: 16px; font-size: 12px; }

.pagination {
	display: flex;
	gap: 8px;
	padding: 0 var(--pad) clamp(48px, 6vw, 88px);
	flex-wrap: wrap;
}

.layout .pagination,
.archive-list .pagination {
	padding: 32px 0 0;
}

.pagination .page-numbers {
	display: inline-block;
	min-width: 44px;
	text-align: center;
	padding: 10px 12px;
	border: 1px solid var(--line);
	text-decoration: none;
	color: var(--ink);
	font-weight: 700;
}

.pagination .page-numbers.current { background: var(--blue); color: #fff; }

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

@media (max-width: 1100px) {
	.site-nav { display: none; }
	.burger { display: flex; margin-left: auto; }
	.header-cta { display: none; }

	.hero { grid-template-columns: 1fr; }
	.hero-side { display: none; }
	.hero-copy { padding-bottom: clamp(40px, 6vw, 90px); }
	.hero-art { position: relative; min-height: 420px; }
	.hero-panel { left: 10%; right: 6%; }
	.hero-panel img.hero-mark { width: 108%; }
	.hero-sq-gold { left: 0; width: clamp(120px, 15vw, 250px); }
	.hero-sq-gray { left: auto; right: 0; width: clamp(110px, 13vw, 210px); }

	.statband { grid-template-columns: repeat(3, 1fr); }
	.stat-motto { grid-column: 1 / 3; }
	.stat-dots { border-right: 0; }

	.cards { grid-template-columns: repeat(2, 1fr); }
	.about-grid { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr 1fr; }

	.layout { grid-template-columns: 1fr; }
	.layout .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
	.brand img.brand-mark, .brand img.custom-logo { width: 46px; height: 46px; }
	.brand-text .brand-name { font-size: 19px; }
	.brand-text .brand-city { font-size: 11px; }
	.brand-text .brand-club { font-size: 12px; }

	.statband { grid-template-columns: 1fr 1fr; }
	.stat-motto { grid-column: auto; }
	.stat-dots { display: none; }
	.stat:nth-child(3) { border-bottom: 1px solid var(--line); }
	.stat, .stat-motto { border-bottom: 1px solid var(--line); }

	.cards { grid-template-columns: 1fr; }
	.layout .cards { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr; }

	.event-row { grid-template-columns: 1fr auto; }
	.event-date { grid-column: 1 / -1; }
}
