/*
Theme Name: GeneratePress Child — СкидкиДНС
Template: generatepress
Description: Дочерняя тема для сайта промокодов DNS
Version: 1.0.0
*/

:root {
	--bg:        #0f0f13;
	--surface:   #18181f;
	--surface2:  #22222d;
	--border:    #2a2a38;
	--accent:    #f04e23;
	--accent2:   #ff7a50;
	--text:      #f0eff5;
	--muted:     #8a8a9e;
	--green:     #22c55e;
	--font-h:    'Unbounded', sans-serif;
	--font-b:    'Golos Text', sans-serif;
	--r-card:    16px;
}

* { box-sizing: border-box; }

body {
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-b);
	margin: 0;
}

h1, h2, h3, .site-title {
	font-family: var(--font-h);
}

a { color: inherit; }

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* ---------------- Header ---------------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 16px 20px;
	background: rgba(15, 15, 19, 0.7);
	border-bottom: 1px solid var(--border);
	transition: background 0.2s ease;
}

.site-header.is-scrolled {
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	background: rgba(15, 15, 19, 0.85);
}

.site-header .logo img,
.site-header .logo {
	font-family: var(--font-h);
	font-weight: 800;
	font-size: 20px;
	color: var(--accent);
	text-decoration: none;
}

.main-nav ul {
	display: flex;
	gap: 24px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.main-nav a {
	text-decoration: none;
	color: var(--text);
	font-weight: 500;
}

.main-nav a:hover { color: var(--accent2); }

.search-form input[type="search"] {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 999px;
	color: var(--text);
	padding: 8px 16px;
}

.burger {
	display: none;
	background: none;
	border: none;
	color: var(--text);
	font-size: 24px;
	cursor: pointer;
}

/* ---------------- Hero ---------------- */
.hero {
	text-align: center;
	padding: 64px 20px 40px;
}

.hero h1 {
	font-size: clamp(28px, 5vw, 48px);
	font-weight: 800;
	margin: 0 0 12px;
}

.hero h1 span { color: var(--accent); }

.hero .subtitle {
	color: var(--muted);
	max-width: 600px;
	margin: 0 auto 32px;
}

.hero-stats {
	display: flex;
	justify-content: center;
	gap: 48px;
	flex-wrap: wrap;
}

.hero-stat .value {
	font-family: var(--font-h);
	font-size: 32px;
	font-weight: 800;
	color: var(--green);
	display: block;
}

.hero-stat .label {
	color: var(--muted);
	font-size: 14px;
}

/* ---------------- Filters ---------------- */
.filters {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	justify-content: center;
	padding: 24px 20px;
}

.filter-btn {
	background: var(--surface);
	border: 1px solid var(--border);
	color: var(--text);
	border-radius: 999px;
	padding: 10px 20px;
	font-family: var(--font-b);
	font-weight: 500;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
}

.filter-btn:hover { border-color: var(--accent); }

.filter-btn.is-active {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}

/* ---------------- Category chips ---------------- */
.chips {
	display: flex;
	gap: 10px;
	overflow-x: auto;
	padding: 0 20px 24px;
}

.chip {
	background: var(--surface2);
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 6px 16px;
	font-size: 14px;
	color: var(--muted);
	white-space: nowrap;
	text-decoration: none;
	cursor: pointer;
}

.chip.is-active,
.chip:hover {
	color: var(--text);
	border-color: var(--accent2);
}

/* ---------------- Card grid ---------------- */
.promo-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	padding: 0 20px 60px;
}

.promo-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--r-card);
	padding: 24px;
	cursor: pointer;
	transition: border-color 0.15s, transform 0.15s;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.promo-card:hover {
	border-color: var(--accent);
	transform: translateY(-2px);
}

.promo-card.is-featured {
	grid-column: span 2;
	background: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%);
}

.promo-card.is-hidden { display: none; }

.promo-card.is-expired {
	opacity: 0.5;
}

.promo-card.is-expired .badge {
	color: var(--muted);
}

.promo-card .discount {
	font-family: var(--font-h);
	font-size: 28px;
	font-weight: 800;
	color: var(--accent);
}

.promo-card .title {
	font-size: 18px;
	font-weight: 600;
}

.promo-card .expire {
	color: var(--muted);
	font-size: 13px;
}

.promo-card .badge {
	display: inline-block;
	align-self: flex-start;
	background: var(--surface2);
	color: var(--green);
	font-size: 12px;
	border-radius: 999px;
	padding: 4px 10px;
}

/* ---------------- Popup ---------------- */
.promo-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 15, 19, 0.6);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.promo-overlay.is-open {
	opacity: 1;
	pointer-events: auto;
}

.promo-popup {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--r-card);
	max-width: 480px;
	width: 90%;
	padding: 32px;
	position: relative;
}

.promo-popup .popup-close {
	position: absolute;
	top: 16px;
	right: 16px;
	background: none;
	border: none;
	color: var(--muted);
	font-size: 24px;
	cursor: pointer;
}

.promo-popup .popup-logo {
	height: 40px;
	margin-bottom: 16px;
}

.promo-popup .popup-discount {
	font-family: var(--font-h);
	font-size: 36px;
	font-weight: 800;
	color: var(--accent);
}

.promo-popup .popup-title {
	font-size: 20px;
	font-weight: 600;
	margin: 8px 0;
}

.promo-popup .popup-description {
	color: var(--muted);
	margin-bottom: 20px;
}

.popup-code-block {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--surface2);
	border: 1px dashed var(--accent2);
	border-radius: 12px;
	padding: 12px 16px;
	margin-bottom: 16px;
}

.popup-code-block code {
	font-family: var(--font-h);
	font-size: 18px;
	letter-spacing: 1px;
	flex: 1;
}

.popup-copy-btn {
	background: var(--accent);
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 8px 14px;
	cursor: pointer;
	font-weight: 600;
}

.popup-copy-btn.is-copied { background: var(--green); }

.popup-go-btn {
	display: block;
	text-align: center;
	background: var(--accent);
	color: #fff;
	text-decoration: none;
	border-radius: 999px;
	padding: 14px;
	font-weight: 600;
	margin-bottom: 12px;
}

.popup-meta {
	display: flex;
	justify-content: space-between;
	color: var(--muted);
	font-size: 13px;
}

.popup-flash {
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%) translateY(20px);
	background: var(--green);
	color: #0f0f13;
	padding: 12px 24px;
	border-radius: 999px;
	font-weight: 600;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s, transform 0.2s;
	z-index: 1100;
}

.popup-flash.is-visible {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* ---------------- Footer ---------------- */
.site-footer {
	border-top: 1px solid var(--border);
	padding: 32px 20px;
	text-align: center;
	color: var(--muted);
}

.site-footer ul {
	display: flex;
	justify-content: center;
	gap: 20px;
	list-style: none;
	padding: 0;
	margin: 0 0 16px;
}

.site-footer a { text-decoration: none; color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* ---------------- Responsive ---------------- */
@media (max-width: 1200px) {
	.promo-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
	.promo-grid { grid-template-columns: repeat(2, 1fr); }

	.main-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--surface);
		border-bottom: 1px solid var(--border);
		padding: 16px 20px;
	}

	.main-nav.is-open { display: block; }

	.main-nav ul {
		flex-direction: column;
		gap: 16px;
	}

	.burger { display: block; }
}

@media (max-width: 480px) {
	.promo-grid { grid-template-columns: 1fr; }
	.promo-card.is-featured { grid-column: span 1; }
	.hero-stats { gap: 24px; }
}
