/**
 * Better Games – Premium Dark Mode
 * Strategia CRO: luksusowa transformacja strony głównej
 * Spójność z ekosystemem aplikacji edytora
 */

/* ========== Zmienne (paleta z aplikacji) ========== */
:root {
	--bgt-bg-dark: #1a1a2e;
	--bgt-bg-darker: #16162a;
	--bgt-purple: #372847;
	--bgt-purple-dark: #281734;
	--bgt-orange: #fc9b3f;
	--bgt-orange-hover: #e88a35;
	--bgt-white: #ffffff;
	--bgt-gray: rgba(255, 255, 255, 0.7);
	--bgt-gray-light: rgba(255, 255, 255, 0.5);
	--bgt-silver: #cbd5e1;
}

/* ========== Font ========== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ========== Tło strony ========== */
body,
.site,
#site-content,
.entry-content,
.bgt-premium-home,
.singular .entry-header,
.archive-header {
	background: var(--bgt-bg-dark) !important;
	background-image: none !important;
}

body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	color: var(--bgt-white);
}

/* Usuń stare grafiki w tle */
body::before,
.site::before,
.has-background::before {
	display: none !important;
}

/* ========== Nagłówki ========== */
h1, h2, h3, h4, h5, h6,
.entry-title,
.archive-title,
.section-title {
	color: var(--bgt-white) !important;
	font-family: 'Inter', sans-serif !important;
	font-weight: 700 !important;
}

.entry-title {
	font-size: clamp(2rem, 5vw, 3rem) !important;
	line-height: 1.2 !important;
}

/* ========== Tekst ========== */
p, .intro-text, .entry-content p {
	color: var(--bgt-gray) !important;
	font-size: 1.1rem !important;
	line-height: 1.7 !important;
}

/* ========== KOMPAKTOWE HERO – Above the Fold ========== */
.bgt-premium-home {
	padding-top: 0.5rem;
	padding-bottom: 2rem;
}

/* Odstęp CTA ↔ "Stwórz grę..." max 15px */
.bgt-premium-home .bgt-hero {
	margin-bottom: 0.4rem;
}

.bgt-premium-home .bgt-section {
	margin-top: 0.4rem;
}

.bgt-hero {
	text-align: center;
	padding: 0.75rem 1.2rem 0.75rem;
	max-width: 800px;
	margin: 0 auto;
}

.bgt-hero__title {
	font-size: clamp(2.875rem, 6.9vw, 4.3rem);
	font-weight: 800;
	color: var(--bgt-white);
	margin: 0 0 0.5rem 0;
	letter-spacing: -0.03em;
	line-height: 1.15;
}

/* Opis +5px */
.bgt-hero__desc {
	font-size: 1.438rem;
	color: var(--bgt-silver) !important;
	line-height: 1.6;
	margin: 0 0 0.75rem 0;
	max-width: 640px;
	margin-left: auto;
	margin-right: auto;
}

/* CTA – uppercase, font-weight 900 */
.bgt-hero__cta {
	display: inline-block;
	padding: 0.85rem 2.5rem;
	font-size: 1.1rem;
	font-weight: 900;
	text-transform: uppercase;
	color: #0f172a !important;
	background: var(--bgt-orange);
	border: 2px solid var(--bgt-orange);
	border-radius: 10px;
	text-decoration: none;
	transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
	letter-spacing: 0.03em;
}

.bgt-hero__cta:hover {
	background: var(--bgt-orange-hover);
	border-color: var(--bgt-orange-hover);
	color: #0f172a !important;
	transform: translateY(-2px);
	box-shadow: 0 6px 24px rgba(252, 155, 63, 0.45);
}

/* Shortcode [btnsx] – usuwany przez PHP (functions-bettergames-premium.php) */

/* ========== SEKCJA PRODUKTÓW ========== */
.bgt-section {
	text-align: center;
	padding: 1.5rem 1.2rem 2rem;
	max-width: 1000px;
	margin: 0 auto;
}

/* "Stwórz grę..." – +8px, duża i dominująca */
.bgt-section__title {
	font-size: 2.25rem;
	font-weight: 700;
	color: var(--bgt-white);
	margin: 0 0 0.35rem 0;
}

/* Opis +5px */
.bgt-section__subtitle {
	color: var(--bgt-silver) !important;
	font-size: 1.3125rem;
	line-height: 1.5;
	margin: 0 0 1rem 0;
}

/* ========== SIATKA 3 KOLUMNY – RÓWNE KAFELKI ========== */
.bgt-product-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
	padding: 0 0.5rem;
}

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

@media (max-width: 480px) {
	.bgt-product-grid {
		grid-template-columns: 1fr;
	}
}

/* Kafelek – flex column, height 100%, wyrównane obrazki */
.bgt-product-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	align-items: stretch;
	background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	overflow: hidden;
	transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
	text-decoration: none;
	color: inherit;
}

.bgt-product-card:hover {
	transform: scale(1.02);
	border-color: rgba(255, 255, 255, 0.2);
	box-shadow: 0 12px 32px rgba(252, 155, 63, 0.15);
}

/* Tytuł + opis – STAŁA wysokość 120px, obrazki w jednej linii */
.bgt-product-card__content {
	padding: 0.75rem 0.75rem 0.5rem;
	min-height: 120px;
	flex-shrink: 0;
}

.bgt-product-card__name {
	display: block;
	font-size: 1.4rem;
	font-weight: 600;
	color: var(--bgt-white);
	text-align: center;
	margin: 0 0 0.35rem 0;
}

/* Opis +5px, kolor #cbd5e1 */
.bgt-product-card__desc {
	display: block;
	font-size: 1.21rem;
	color: #cbd5e1 !important;
	text-align: center;
	line-height: 1.4;
}

/* Obrazek – 16/9, identyczny wymiar */
.bgt-product-card__thumb,
.bgt-product-card .product-image {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: rgba(0, 0, 0, 0.2);
	overflow: hidden;
	border-radius: 10px;
	flex-shrink: 0;
}

.bgt-product-card__thumb img,
.bgt-product-card .product-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

/* ========== Nawigacja / Header / Menu ========== */
#site-header,
.header-footer-group,
.entry-header,
.site-header,
#masthead,
header[role="banner"],
.primary-navigation,
.menu-modal,
.menu-modal-inner,
.cover-modal.header-footer-group,
.search-modal,
.search-modal-inner {
	background: var(--bgt-purple) !important;
	background-color: var(--bgt-purple) !important;
	border-color: rgba(255, 255, 255, 0.1) !important;
}

.menu-wrapper,
.menu-top {
	background: transparent !important;
}

/* Całkowicie usuń wyszukiwarkę (lupka + form) */
.search-toggle-wrapper,
.search-toggle,
.mobile-search-toggle,
.search-modal,
.cover-modal[data-modal-target-string=".search-modal"] {
	display: none !important;
}

/* Menu po prawej stronie ekranu */
.menu-modal.cover-modal {
	justify-content: flex-end !important;
}

.menu-modal-inner {
	margin-left: auto !important;
}

.menu-top {
	justify-content: flex-end !important;
	padding-right: 2rem !important;
}

.menu-wrapper.section-inner,
.menu-modal .menu-wrapper {
	padding: 2rem 2.5rem !important;
}

/* Lista menu – kafelki premium */
.modal-menu,
.menu-modal .modal-menu,
.expanded-menu .modal-menu,
.mobile-menu .modal-menu {
	display: flex !important;
	flex-direction: column !important;
	gap: 0.75rem !important;
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	width: 100% !important;
	left: auto !important;
}

.modal-menu li,
.menu-modal .modal-menu li {
	border: none !important;
	margin: 0 !important;
	display: block !important;
}

.modal-menu .ancestor-wrapper {
	display: flex !important;
	align-items: stretch !important;
	width: 100% !important;
	background: rgba(255, 255, 255, 0.08) !important;
	border: 1px solid rgba(255, 255, 255, 0.15) !important;
	border-radius: 10px !important;
	overflow: hidden !important;
	transition: background 0.2s, border-color 0.2s, box-shadow 0.2s !important;
}

.modal-menu .ancestor-wrapper:hover {
	background: rgba(255, 255, 255, 0.15) !important;
	border-color: rgba(255, 255, 255, 0.25) !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.modal-menu .ancestor-wrapper > a {
	flex: 1 !important;
	background: none !important;
	border: none !important;
	border-radius: 0 !important;
}

.modal-menu .sub-menu-toggle {
	background: transparent !important;
	border: none !important;
	border-left: 1px solid rgba(255, 255, 255, 0.15) !important;
	color: rgba(255, 255, 255, 0.8) !important;
	padding: 0 1rem !important;
}

/* Każdy item – kafelek (1.2rem, 700, border premium) */
.modal-menu > li > a,
.modal-menu .ancestor-wrapper > a,
.menu-modal .modal-menu > li > a,
.menu-modal .modal-menu .ancestor-wrapper > a,
.primary-menu > li > a,
.primary-menu .link-icon-wrapper a {
	display: block !important;
	padding: 10px 20px !important;
	text-align: center !important;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
	font-size: 1.2rem !important;
	font-weight: 700 !important;
	letter-spacing: 0.02em !important;
	color: rgba(255, 255, 255, 0.95) !important;
	text-decoration: none !important;
	background: rgba(255, 255, 255, 0.05) !important;
	border: 1px solid rgba(255, 255, 255, 0.2) !important;
	border-radius: 8px !important;
	transition: background 0.2s, box-shadow 0.2s, border-color 0.2s !important;
}

.modal-menu .ancestor-wrapper > a {
	background: none !important;
	border: none !important;
}

.modal-menu .ancestor-wrapper {
	background: rgba(255, 255, 255, 0.05) !important;
	border: 1px solid rgba(255, 255, 255, 0.2) !important;
	border-radius: 8px !important;
	padding: 0 !important;
}

/* Hover: rozjaśnienie tła + pomarańczowa linia */
.modal-menu > li > a:hover,
.menu-modal .modal-menu > li > a:hover,
.primary-menu > li > a:hover,
.primary-menu .link-icon-wrapper a:hover {
	background: rgba(255, 255, 255, 0.12) !important;
	color: var(--bgt-white) !important;
	text-decoration: none !important;
	box-shadow: 0 2px 0 0 var(--bgt-orange) !important;
}

.modal-menu .ancestor-wrapper:hover {
	background: rgba(255, 255, 255, 0.12) !important;
	box-shadow: 0 2px 0 0 var(--bgt-orange) !important;
}

/* Hover dla linku w ancestor-wrapper – rodzic (.ancestor-wrapper:hover) ma styl */
.modal-menu .ancestor-wrapper > a:hover {
	color: var(--bgt-white) !important;
	text-decoration: none !important;
}

/* Ghost Button – ostatni element menu */
.modal-menu .menu-item.bgt-ghost-btn > a,
.modal-menu .menu-item.bgt-ghost-btn > .ancestor-wrapper > a,
.modal-menu .menu-item.bgt-ghost-btn .ancestor-wrapper,
.primary-menu .menu-item.bgt-ghost-btn > a {
	background: transparent !important;
	border: 1px solid rgba(255, 255, 255, 0.3) !important;
	border-radius: 25px !important;
	padding: 10px 20px !important;
}

.modal-menu .menu-item.bgt-ghost-btn > a:hover,
.modal-menu .menu-item.bgt-ghost-btn > .ancestor-wrapper > a:hover,
.modal-menu .menu-item.bgt-ghost-btn .ancestor-wrapper:hover,
.primary-menu .menu-item.bgt-ghost-btn > a:hover {
	border-color: var(--bgt-orange) !important;
	background: transparent !important;
	box-shadow: none !important;
}

/* Linki w menu modal – spójność */
.primary-menu a,
.nav-menu a,
.main-navigation a,
.primary-navigation a,
.search-modal a {
	color: rgba(255, 255, 255, 0.95) !important;
}

.primary-menu a:hover,
.nav-menu a:hover,
.main-navigation a:hover,
.menu-modal a:hover {
	color: var(--bgt-orange) !important;
}

/* Przyciski menu (toggle, wyszukaj, zamknij) */
.menu-modal .toggle,
.search-modal .toggle,
.close-nav-toggle,
.close-search-toggle {
	background: rgba(255, 255, 255, 0.15) !important;
	border: 1px solid rgba(255, 255, 255, 0.25) !important;
	color: var(--bgt-white) !important;
	border-radius: 8px !important;
}

.menu-modal .toggle:hover,
.search-modal .toggle:hover {
	background: rgba(255, 255, 255, 0.25) !important;
	color: var(--bgt-white) !important;
}

/* Modal wyszukiwania – ciemne tło */
.search-modal,
.search-modal-inner {
	background: var(--bgt-purple) !important;
}

/* Pole wyszukiwania */
.search-modal .search-form input,
.search-modal input[type="search"],
.search-modal input[type="text"] {
	background: rgba(255, 255, 255, 0.1) !important;
	border: 1px solid rgba(255, 255, 255, 0.2) !important;
	color: var(--bgt-white) !important;
	border-radius: 8px !important;
}

/* Przycisk Edytor – pomarańczowy kafelek, rzuca się w oczy */
.menu-item.bgt-edytor .menu-link,
.menu-item.bgt-edytor a,
.modal-menu .bgt-edytor a,
.modal-menu li.bgt-edytor a,
.menu-item a[href*="/bgt/"],
.modal-menu a[href*="/bgt/"] {
	background: var(--bgt-orange) !important;
	color: var(--bgt-white) !important;
	padding: 1rem 1.5rem !important;
	border-radius: 10px !important;
	border: 2px solid var(--bgt-orange) !important;
	font-weight: 600 !important;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
	font-size: 1.1rem !important;
}

.menu-item.bgt-edytor a:hover,
.modal-menu .bgt-edytor a:hover,
.menu-item a[href*="/bgt/"]:hover,
.modal-menu a[href*="/bgt/"]:hover {
	background: var(--bgt-orange-hover) !important;
	border-color: var(--bgt-orange-hover) !important;
	color: var(--bgt-white) !important;
	box-shadow: 0 4px 16px rgba(252, 155, 63, 0.45) !important;
}

/* ========== REWOLUCJA NAWIGACJI ========== */
/* Usuń slogan – wprowadza chaos wizualny */
#site-header .site-description,
.header-titles .site-description,
.site-description {
	display: none !important;
}

.entry-header-inner .entry-title,
.site-header .site-title,
#site-header .site-title {
	color: var(--bgt-white) !important;
}

/* Primary menu – kafelki w poziomie (desktop) */
.primary-menu > li {
	margin: 0 0.2rem;
}

.primary-menu a,
.primary-menu .link-icon-wrapper a,
#site-header .primary-menu a {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
	font-weight: 500 !important;
	text-decoration: none !important;
	transition: background 0.2s, color 0.2s, box-shadow 0.2s !important;
}

/* Ghost Button – ostatni element (Konto/Koszyk) */
.primary-menu .menu-item.bgt-ghost-btn > a,
.primary-menu .menu-item.bgt-ghost-btn > .link-icon-wrapper > a,
.menu-item.bgt-ghost-btn a {
	border: 1px solid rgba(255, 255, 255, 0.3) !important;
	border-radius: 25px !important;
	padding: 8px 18px !important;
	background: transparent !important;
	box-shadow: none !important;
}

.primary-menu .menu-item.bgt-ghost-btn > a:hover,
.primary-menu .menu-item.bgt-ghost-btn > .link-icon-wrapper > a:hover,
.menu-item.bgt-ghost-btn a:hover {
	border-color: var(--bgt-orange) !important;
	color: var(--bgt-white) !important;
	box-shadow: none !important;
}

/* Przyciski w headerze (menu, wyszukaj) */
#site-header .toggle,
.header-inner .toggle {
	background: rgba(255, 255, 255, 0.15) !important;
	border: 1px solid rgba(255, 255, 255, 0.25) !important;
	color: var(--bgt-white) !important;
}

#site-header .toggle:hover,
.header-inner .toggle:hover {
	background: rgba(255, 255, 255, 0.25) !important;
	color: var(--bgt-white) !important;
}

.header-inner .toggle-wrapper::before {
	background: rgba(255, 255, 255, 0.25) !important;
}

/* ========== Linki ========== */
.entry-content a:not(.bgt-hero__cta):not(.bgt-cta):not(.bgt-product-card) {
	color: var(--bgt-orange);
}

.entry-content a:hover {
	color: var(--bgt-orange-hover);
}

/* ========== Stopka ========== */
.site-footer,
#colophon {
	background: var(--bgt-bg-darker) !important;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer,
.site-footer a {
	color: var(--bgt-gray) !important;
}

/* ========== Przycisk CTA w treści ========== */
.bgt-cta-wrapper {
	text-align: center;
	margin: 2rem 0;
}

.bgt-cta {
	display: inline-block;
	padding: 1rem 2.5rem;
	font-size: 1.1rem;
	font-weight: 700;
	color: #0f172a !important;
	background: var(--bgt-orange);
	border: 2px solid var(--bgt-orange);
	border-radius: 10px;
	text-decoration: none;
	transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.bgt-cta:hover {
	background: var(--bgt-orange-hover);
	border-color: var(--bgt-orange-hover);
	color: #0f172a !important;
	transform: translateY(-2px);
	box-shadow: 0 6px 24px rgba(252, 155, 63, 0.45);
}
