﻿/*

Theme Name: Namaz
Description: Gebetszeiten (helles und dunkles Design, ohne jQuery)
Version: 2.0

*/

@font-face {
	font-family: inter;
	src: url('fonts/inter/inter-medium-latin.woff2') format('woff2');
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: inter;
	src: url('fonts/inter/inter-semibold-latin.woff2') format('woff2');
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: inter;
	src: url('fonts/inter/inter-bold-latin.woff2') format('woff2');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

:root {
	--bg: #f3f8f5;
	--surface: #ffffff;
	--surface-2: #eaf3ee;
	--text: #10201a;
	--muted: #586c63;
	--border: #d9e5de;
	--accent: #0d7a57;
	--accent-2: #139c72;
	--accent-ink: #ffffff;
	--link: #0b6a4b;
	--gold: #c98a1c;
	--hero-from: #0f7a58;
	--hero-to: #0b5d6b;
	--shadow: 0 12px 32px rgba(16, 32, 26, .09);
	--radius: 18px;
	--glow-1: rgba(19, 156, 114, .14);
	--glow-2: rgba(201, 138, 28, .10);
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #071017;
		--surface: #0f1d28;
		--surface-2: #142634;
		--text: #eef7f3;
		--muted: #9db3aa;
		--border: #1f3443;
		--accent: #2cc98e;
		--accent-2: #22b07f;
		--accent-ink: #04140d;
		--link: #5fdcb0;
		--gold: #f0b95a;
		--hero-from: #12805d;
		--hero-to: #0e5f78;
		--shadow: 0 16px 36px rgba(0, 0, 0, .45);
		--glow-1: rgba(44, 201, 142, .10);
		--glow-2: rgba(240, 185, 90, .06);
		color-scheme: dark;
	}
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body,
h1, h2, h3, h4, p, ul, ol, li, dl, dd, figure, form, fieldset, table {
	margin: 0;
	padding: 0;
}

body {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background:
		radial-gradient(900px 420px at 5% -10%, var(--glow-1), transparent 70%),
		radial-gradient(800px 420px at 100% -5%, var(--glow-2), transparent 70%),
		var(--bg);
	color: var(--text);
	font-family: inter, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
	font-size: 17px;
	line-height: 1.6;
	font-weight: 500;
}

img, svg { max-width: 100%; }
img { height: auto; border: 0; vertical-align: middle; }
ul, ol { list-style: none; }
table { border-collapse: collapse; border-spacing: 0; }
em { font-style: normal; }

a {
	color: var(--link);
	text-decoration: none;
	transition: color .2s ease;
}

a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: 2px;
	border-radius: 6px;
}

.skip {
	position: absolute;
	left: 12px;
	top: -60px;
	z-index: 100;
	background: var(--accent);
	color: var(--accent-ink);
	padding: 10px 16px;
	border-radius: 10px;
	font-weight: 600;
}

.skip:focus { top: 12px; color: var(--accent-ink); }

h1, h2, h3 {
	line-height: 1.25;
	letter-spacing: -.02em;
	font-weight: 700;
}

h1 { font-size: clamp(30px, 5vw, 50px); margin: 6px 0 14px; }
h2 { font-size: clamp(22px, 3vw, 28px); margin: 0 0 18px; }
h3 { font-size: 19px; margin-bottom: 10px; }

p { margin: 0 0 16px; }

/* ШАПКА */

.header {
	position: sticky;
	top: 0;
	z-index: 40;
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	width: 100%;
	max-width: 1240px;
	margin: 0 auto;
	padding: 14px 20px;
	background: color-mix(in srgb, var(--bg) 82%, transparent);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
}

.logotype {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--text);
	font-size: 21px;
	font-weight: 700;
	letter-spacing: -.02em;
	white-space: nowrap;
}

.logotype:hover { color: var(--text); text-decoration: none; }

.logotype::before {
	content: "";
	width: 36px;
	height: 36px;
	background: url(images/favicons/android-icon-96x96.png) center / contain no-repeat;
	flex: 0 0 auto;
}

.topnav { margin-left: auto; display: flex; gap: 6px; }

.topnav a {
	color: var(--text);
	font-weight: 600;
	font-size: 15px;
	padding: 8px 14px;
	border-radius: 999px;
}

.topnav a:hover { background: var(--surface-2); text-decoration: none; }

.search {
	position: relative;
	display: flex;
	align-items: center;
	flex: 0 1 340px;
	min-width: 220px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 999px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
	transition: border-color .2s, box-shadow .2s;
}

.search:focus-within {
	border-color: var(--accent);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}

.search .input {
	flex: 1;
	min-width: 0;
	height: 44px;
	background: transparent;
	color: var(--text);
	font: inherit;
	font-size: 16px;
	border: 0;
	outline: 0;
	padding: 0 8px 0 18px;
}

.search .input::placeholder { color: var(--muted); }
.search .input::-webkit-search-decoration,
.search .input::-webkit-search-cancel-button { display: none; }

.search_button {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	background: none;
	border: 0;
	color: var(--accent);
	cursor: pointer;
}

.suggest {
	position: absolute;
	z-index: 60;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 16px;
	box-shadow: var(--shadow);
	padding: 6px;
	max-height: 70vh;
	overflow: auto;
}

.suggest li {
	padding: 10px 14px;
	border-radius: 10px;
	cursor: pointer;
	color: var(--text);
	font-size: 16px;
}

.suggest li:hover,
.suggest li.active { background: var(--surface-2); }

/* ОСНОВА */

.main {
	flex: 1 0 auto;
	width: 100%;
	max-width: 1240px;
	margin: 0 auto;
	padding: 18px 20px 48px;
}

.breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 8px;
	align-items: center;
	color: var(--muted);
	font-size: 14px;
	margin-bottom: 14px;
}

.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { opacity: .6; }
.breadcrumbs [aria-current] { color: var(--text); font-weight: 600; }

.meta { color: var(--muted); margin: -4px 0 20px; font-size: 16px; }
.meta .dot { margin: 0 6px; }

.lead {
	max-width: 880px;
	color: var(--muted);
	font-size: 18px;
	margin-bottom: 26px;
}

.hero { padding: 10px 0 8px; }
.hero .lead { margin-bottom: 30px; }

.block { margin: 46px 0 0; }

.note {
	max-width: 880px;
	color: var(--muted);
	font-size: 15px;
	background: var(--surface-2);
	border-left: 4px solid var(--gold);
	border-radius: 0 12px 12px 0;
	padding: 12px 16px;
	margin: 22px 0;
}

/* БЛОК «СЛЕДУЮЩИЙ НАМАЗ» */

.next {
	position: relative;
	overflow: hidden;
	color: #fff;
	background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
	border-radius: 26px;
	box-shadow: var(--shadow);
	padding: 26px 28px;
	margin-bottom: 20px;
}

.next::after {
	content: "";
	position: absolute;
	right: -60px;
	top: -60px;
	width: 260px;
	height: 260px;
	background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 68%);
	pointer-events: none;
}

.next-head {
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	opacity: .85;
}

.next-main {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 18px;
	margin: 4px 0 8px;
}

.next-name { font-size: clamp(30px, 6vw, 46px); font-weight: 700; letter-spacing: -.03em; }
.next-time { font-size: clamp(24px, 4.5vw, 34px); font-weight: 600; font-variant-numeric: tabular-nums; opacity: .95; }

.next-foot {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	font-size: 16px;
}

.next-foot strong { font-variant-numeric: tabular-nums; }

/* КАРТОЧКИ НАМАЗОВ */

.prayer-row {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 12px;
	margin-bottom: 28px;
}

.prayer-row .item {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 16px;
	text-align: left;
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.prayer-row .item:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.prayer-row .item.active {
	background: linear-gradient(145deg, var(--accent-2), var(--accent));
	border-color: transparent;
	color: var(--accent-ink);
	box-shadow: var(--shadow);
}

.prayer-row .name {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 700;
	line-height: 1.25;
	margin-bottom: 10px;
}

.prayer-row .name .icon { flex: 0 0 auto; color: var(--accent); }
.prayer-row .item.active .name .icon { color: inherit; }

.prayer-row .label span {
	display: block;
	font-size: 13px;
	font-weight: 500;
	color: var(--muted);
}

.prayer-row .item.active .label span { color: inherit; opacity: .85; }

.prayer-row time {
	display: block;
	font-size: 30px;
	font-weight: 700;
	letter-spacing: -.03em;
	font-variant-numeric: tabular-nums;
}

/* НАСТРОЙКИ */

.settings {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.settings fieldset { border: 0; min-width: 0; }

.settings label {
	display: block;
	color: var(--muted);
	font-size: 14px;
	margin-bottom: 8px;
}

.select {
	width: 100%;
	height: 50px;
	background-color: var(--surface);
	color: var(--text);
	font: inherit;
	font-size: 16px;
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 0 14px;
	transition: border-color .2s, box-shadow .2s;
}

.select:focus {
	outline: 0;
	border-color: var(--accent);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}

/* ТАБЛИЦЫ */

.table-wrap {
	overflow-x: auto;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: var(--shadow);
}

.timetable {
	width: 100%;
	min-width: 520px;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

.timetable th {
	position: sticky;
	top: 0;
	background: var(--surface-2);
	color: var(--muted);
	font-size: 14px;
	font-weight: 600;
	padding: 12px 10px;
}

.timetable td { padding: 10px; border-top: 1px solid var(--border); }
.timetable tbody tr:hover { background: var(--surface-2); }

.timetable tr.active,
.timetable tr.active:hover {
	background: color-mix(in srgb, var(--accent) 18%, var(--surface));
	font-weight: 700;
}

.timetable td:first-child { text-align: left; padding-left: 18px; }
.timetable th:first-child { text-align: left; padding-left: 18px; }
.timetable .wd { color: var(--muted); font-size: 13px; font-weight: 500; }
.timetable.cities td:first-child { font-weight: 600; }

/* QIBLA */

.qibla-box {
	display: flex;
	align-items: center;
	gap: 24px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 22px 26px;
}

.qibla-box p { margin: 0; max-width: 720px; }
.compass { flex: 0 0 auto; }
.compass .ring { fill: var(--surface-2); stroke: var(--border); stroke-width: 2; }
.compass .ticks path { stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.compass .n { fill: var(--muted); font-size: 11px; font-weight: 700; font-family: inter, sans-serif; }
.compass .needle { fill: var(--accent); }
.compass .tail { fill: var(--muted); opacity: .5; }
.compass .hub { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }

/* ТЕКСТ */

.text {
	max-width: 880px;
	margin: 46px 0 0;
	line-height: 1.75;
}

.text h2 { margin-top: 36px; }
.text h2:first-child { margin-top: 0; }
.text h3 { margin-top: 26px; }
.text ul { margin: 0 0 18px; padding-left: 4px; }
.text ul li { position: relative; padding-left: 20px; margin: 6px 0; }
.text ul li::before { content: ""; position: absolute; left: 4px; top: .75em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.text ol { counter-reset: n; margin: 0 0 18px; }
.text ol li { counter-increment: n; position: relative; padding-left: 28px; margin: 6px 0; }
.text ol li::before { content: counter(n) "."; position: absolute; left: 0; font-weight: 700; color: var(--accent); }

.content_image_div { margin: 0 0 26px; }
.content_image { width: 100%; max-width: 880px; border-radius: var(--radius); }

/* FAQ */

.qa { max-width: 880px; margin: 46px 0 0; }
.qa .title { font-size: clamp(22px, 3vw, 28px); margin-bottom: 18px; }

.qa .item {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 16px;
	margin-bottom: 10px;
	overflow: hidden;
}

.qa .question { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: 0; }

.qa .question button {
	position: relative;
	width: 100%;
	display: block;
	text-align: left;
	background: none;
	color: inherit;
	font: inherit;
	font-weight: 600;
	border: 0;
	cursor: pointer;
	padding: 16px 52px 16px 18px;
}

.qa .question button::after {
	content: "";
	position: absolute;
	right: 20px;
	top: 50%;
	width: 9px;
	height: 9px;
	margin-top: -7px;
	border-right: 2px solid var(--accent);
	border-bottom: 2px solid var(--accent);
	transform: rotate(45deg);
	transition: transform .2s ease;
}

.qa .question button[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: -2px; }
.qa .item.active { border-color: var(--accent); }
.qa .answer { padding: 0 18px 4px; color: var(--muted); }
.qa .answer[hidden] { display: none; }

/* СПИСКИ ГОРОДОВ */

.listing {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 10px;
}

.listing .name {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 58px;
	background: var(--surface);
	color: var(--text);
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 12px 16px;
	transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.listing .name:hover {
	transform: translateY(-2px);
	border-color: var(--accent);
	box-shadow: var(--shadow);
	color: var(--text);
	text-decoration: none;
}

.listing .name span { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listing .name em { color: var(--muted); font-size: 13px; font-weight: 500; }

/* БАННЕР РАМАДАНА */

.banner {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 46px 0 0;
	padding: 24px 28px;
	color: #fff;
	background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
	border-radius: 24px;
	box-shadow: var(--shadow);
	transition: transform .2s ease;
}

.banner:hover { color: #fff; text-decoration: none; transform: translateY(-2px); }
.banner strong { font-size: 24px; letter-spacing: -.02em; }
.banner em { font-weight: 600; opacity: .9; }

.ramadan-teaser { margin: 34px 0 0; font-weight: 600; }

/* РАМАДАН */

.dates {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 12px;
	margin: 6px 0 8px;
}

.date-card {
	display: flex;
	flex-direction: column;
	gap: 2px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 16px 18px;
}

.date-card .k { color: var(--muted); font-size: 14px; }
.date-card strong { font-size: 24px; letter-spacing: -.02em; }
.date-card .s { color: var(--muted); font-size: 14px; }
.date-card.hi { background: linear-gradient(145deg, var(--accent-2), var(--accent)); border-color: transparent; color: var(--accent-ink); }
.date-card.hi .k, .date-card.hi .s { color: inherit; opacity: .85; }
.countdown-note { font-size: 18px; margin-bottom: 20px; }

/* ПАГИНАЦИЯ */

.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 32px 0; }

.pagination a,
.pagination span {
	min-width: 44px;
	text-align: center;
	background: var(--surface);
	color: var(--text);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 9px 14px;
	font-weight: 600;
}

.pagination a:hover { border-color: var(--accent); text-decoration: none; }
.pagination .current { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* КНОПКИ, ФОРМА */

.button {
	display: inline-block;
	background: var(--accent);
	color: var(--accent-ink);
	font: inherit;
	font-weight: 700;
	border: 0;
	border-radius: 14px;
	padding: 13px 24px;
	cursor: pointer;
	transition: transform .2s ease, box-shadow .2s ease;
}

.button:hover { color: var(--accent-ink); text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.button:disabled { opacity: .6; cursor: wait; }

.form { max-width: 620px; margin-top: 26px; }
.form fieldset { border: 0; margin-bottom: 18px; }
.form label { display: block; color: var(--muted); font-size: 14px; margin-bottom: 8px; }

.form .input,
.form .textarea {
	width: 100%;
	background: var(--surface);
	color: var(--text);
	font: inherit;
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 13px 16px;
}

.form .input:focus,
.form .textarea:focus {
	outline: 0;
	border-color: var(--accent);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.notice {
	background: color-mix(in srgb, var(--accent) 14%, var(--surface));
	border: 1px solid var(--accent);
	border-radius: 14px;
	padding: 14px 18px;
	margin: 20px 0;
}

.notice.error { background: color-mix(in srgb, #d33 12%, var(--surface)); border-color: #d33; }

.notfound { text-align: center; padding: 60px 0; }
.notfound p { color: var(--muted); }

/* ПОДЕЛИТЬСЯ */

.social {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin: 46px auto 0;
}

.social .social-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--surface);
	color: var(--text);
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 10px 18px;
	cursor: pointer;
	transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.social .social-btn:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow); }
.social .social-icon { width: 18px; height: 18px; display: inline-flex; }
.social .social-icon svg { width: 100%; height: 100%; fill: currentColor; }

/* ПОДВАЛ */

.footer {
	width: 100%;
	max-width: 1240px;
	margin: 0 auto;
	padding: 36px 20px 40px;
	border-top: 1px solid var(--border);
	color: var(--muted);
	font-size: 15px;
}

.footer-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 28px;
	margin-bottom: 26px;
}

.footer strong { display: block; color: var(--text); margin-bottom: 8px; }
.footer p { margin: 0; max-width: 360px; }
.footer li { margin: 4px 0; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--accent); }
.footer .copy { display: block; text-align: center; font-size: 14px; }

/* АДАПТИВ */

@media (max-width: 1100px) {
	.prayer-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
	body { font-size: 16px; }
	.header { padding: 10px 14px; gap: 10px; }
	.main { padding: 12px 14px 40px; }
	.logotype { font-size: 19px; }
	.logotype::before { width: 32px; height: 32px; }
	.search { order: 3; flex: 1 1 100%; }
	.topnav { margin-left: auto; }
	.next { padding: 20px 20px; border-radius: 22px; }
	.prayer-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.prayer-row .item { padding: 12px; }
	.prayer-row .name { font-size: 15px; gap: 8px; }
	.prayer-row time { font-size: 26px; }
	.settings { grid-template-columns: 1fr; }
	.qibla-box { flex-direction: column; align-items: flex-start; }
	.footer-grid { grid-template-columns: 1fr; }
	.listing { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

@media (max-width: 330px) {
	.prayer-row { grid-template-columns: 1fr; }
}

/* ЗАПРОС СОГЛАСИЯ */

.consent {
	position: fixed;
	left: 16px;
	right: 16px;
	bottom: 16px;
	z-index: 90;
	max-width: 620px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 16px;
	background: var(--surface);
	color: var(--text);
	border: 1px solid var(--border);
	border-radius: 18px;
	box-shadow: var(--shadow);
	padding: 16px 18px;
	font-size: 15px;
}

.consent[hidden] { display: none; }
.consent p { margin: 0; flex: 1; }
.consent-actions { display: flex; gap: 8px; flex: 0 0 auto; }

.consent-btn {
	background: var(--surface-2);
	color: var(--text);
	font: inherit;
	font-weight: 700;
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 10px 16px;
	cursor: pointer;
}

.consent-btn:hover { border-color: var(--accent); }

@media (max-width: 560px) {
	.consent { flex-direction: column; align-items: stretch; }
	.consent-actions { justify-content: stretch; }
	.consent-btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
	.header, .footer, .social, .settings, .suggest, .qa, .banner { display: none !important; }
	body { background: #fff; color: #000; }
}
