/* Gameslingua theme — mobile-first, no framework, kept intentionally small
   so pages stay fast on phones. Colors come from CSS variables set either by
   the Gameslingua Core plugin (Settings > Gameslingua) or the fallback in
   functions.php, so changing the palette never requires editing this file. */

* { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--glc-color-3, #FFF6E3);
	color: #2b2140;
	line-height: 1.5;
}

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

.glc-main { max-width: 1200px; margin: 0 auto; padding: 20px 16px 60px; }

/* --- Header --- */
.glc-site-header {
	background: var(--glc-color-1, #BFECFF);
	position: sticky;
	top: 0;
	z-index: 100;
}
.glc-header-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 12px 16px;
	display: flex;
	align-items: center;
	gap: 16px;
}
.glc-logo { display: flex; align-items: center; text-decoration: none; }
/* The Gameslingua logo is a square icon+wordmark lockup (not a wide banner),
   so it needs more height than a typical wide logo to stay legible — 72px on
   mobile, 88px on larger screens. Adjust here if the logo file changes shape. */
.glc-logo img { max-height: 72px; width: auto; }
.glc-logo-fallback { font-size: 22px; font-weight: 800; }

@media (min-width: 783px) {
	.glc-logo img { max-height: 88px; }
}

.glc-primary-nav { flex: 1; }
.glc-primary-nav ul { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }
.glc-primary-nav a { text-decoration: none; font-weight: 600; }

.glc-nav-toggle {
	display: none;
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
}

.glc-header-lang { margin-left: auto; }

@media (max-width: 782px) {
	.glc-nav-toggle { display: block; order: 3; }
	.glc-primary-nav {
		flex-basis: 100%;
		order: 4;
		display: none;
	}
	.glc-primary-nav.is-open { display: block; }
	.glc-primary-nav ul { flex-direction: column; gap: 10px; padding: 10px 0; }
}

/* --- Category grid (5 cards) --- */
.glc-section { margin: 40px 0; }
.glc-section-title { font-size: 22px; margin-bottom: 16px; }

.glc-categories-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 14px;
}
.glc-category-card {
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 110px;
	padding: 16px;
	border-radius: 16px;
	font-weight: 800;
	font-size: 16px;
	text-decoration: none;
	color: #2b2140;
	background: var(--glc-color-2, #CDC1FF);
	transition: transform .15s ease;
}
.glc-category-card:hover { transform: translateY(-3px); }
.glc-cat-play-online { background: var(--glc-color-4, #FFCCEA); }

@media (max-width: 900px) {
	.glc-categories-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
	.glc-categories-grid { grid-template-columns: repeat(2, 1fr); }
}

/* --- Games grid (6 per row) --- */
.glc-games-grid {
	display: grid;
	grid-template-columns: repeat(var(--glc-columns, 6), 1fr);
	gap: 18px;
}
@media (max-width: 1100px) { .glc-games-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 782px)  { .glc-games-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px)  { .glc-games-grid { grid-template-columns: repeat(2, 1fr); } }

.glc-game-card {
	display: block;
	background: #fff;
	border-radius: 14px;
	overflow: hidden;
	text-decoration: none;
	box-shadow: 0 2px 8px rgba(43,33,64,.08);
}
.glc-game-thumb img { aspect-ratio: 4 / 3; object-fit: cover; }
.glc-game-title { font-size: 14px; padding: 10px 12px; margin: 0; }

/* --- Filters bar --- */
.glc-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.glc-filters select, .glc-filters input[type="text"] {
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid #e0d9f5;
	background: #fff;
}
.glc-filters button {
	padding: 10px 20px;
	border-radius: 10px;
	border: none;
	background: var(--glc-color-4, #FFCCEA);
	font-weight: 700;
	cursor: pointer;
}

/* --- Contact form --- */
.glc-contact-form { max-width: 640px; margin: 24px 0; }
.glc-contact-honeypot { position: absolute; left: -9999px; top: -9999px; }
.glc-contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .glc-contact-row { grid-template-columns: 1fr; } }
.glc-contact-field { margin-bottom: 18px; }
.glc-contact-field label {
	display: block;
	font-weight: 800;
	text-transform: uppercase;
	font-size: 12px;
	letter-spacing: .04em;
	margin-bottom: 6px;
}
.glc-required { opacity: .7; }
.glc-contact-field input,
.glc-contact-field textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #e3dcf7;
	border-radius: 10px;
	background: #fff;
	font-family: inherit;
	font-size: 15px;
}
.glc-contact-field textarea { resize: vertical; }
.glc-contact-field input:focus,
.glc-contact-field textarea:focus {
	outline: none;
	border-color: var(--glc-color-2, #CDC1FF);
	box-shadow: 0 0 0 3px rgba(205, 193, 255, .35);
}
.glc-contact-submit {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 26px;
	border: none;
	border-radius: 999px;
	background: var(--glc-color-4, #FFCCEA);
	font-weight: 800;
	font-size: 15px;
	cursor: pointer;
}
.glc-contact-submit[disabled] { opacity: .6; cursor: default; }
.glc-contact-status { margin-top: 14px; font-weight: 600; }
.glc-contact-status.is-success { color: #2e7d32; }
.glc-contact-status.is-error { color: #c62828; }

/* --- Single game --- */
.glc-single-game { }
.glc-game-title { font-size: 28px; }
.glc-game-gallery { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.glc-game-gallery img { width: 220px; height: 165px; object-fit: cover; border-radius: 10px; cursor: zoom-in; }
.glc-game-meta p { margin: 4px 0; }
.glc-game-subcategories, .glc-game-tags { margin: 12px 0; }
.glc-subcategory-pill {
	display: inline-block;
	background: var(--glc-color-2, #CDC1FF);
	padding: 4px 12px;
	border-radius: 999px;
	margin: 2px 4px 2px 0;
	text-decoration: none;
	font-size: 13px;
}
.glc-embed-wrapper iframe, .glc-embed-wrapper { max-width: 100%; }

.glc-buy-box { display: flex; align-items: center; gap: 14px; margin: 24px 0; }
.glc-price { font-size: 20px; font-weight: 800; }
.glc-buy-button {
	padding: 12px 28px;
	border: none;
	border-radius: 999px;
	background: var(--glc-color-4, #FFCCEA);
	font-weight: 800;
	font-size: 15px;
	cursor: pointer;
}

/* --- Lightbox (shared by game gallery + post gallery) --- */
.glc-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(20, 10, 30, .85);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
}
.glc-lightbox img { max-width: 800px; max-height: 500px; width: 90%; height: auto; border-radius: 10px; }
.glc-lightbox-close { position: absolute; top: 24px; right: 32px; color: #fff; font-size: 34px; cursor: pointer; }

/* --- Blog post gallery slider (300x150) --- */
.glc-post-slider { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0; }
.glc-post-slider img { width: 300px; max-width: 100%; height: 150px; object-fit: cover; border-radius: 10px; cursor: zoom-in; }

/* --- Language switcher --- */
.glc-lang-switcher { display: flex; gap: 10px; }
.glc-lang, .glc-lang-disabled { font-size: 22px; text-decoration: none; opacity: .55; }
.glc-lang.is-active { opacity: 1; }

/* --- Footer --- */
.glc-site-footer { background: var(--glc-color-2, #CDC1FF); margin-top: 60px; }
.glc-footer-inner { max-width: 1200px; margin: 0 auto; padding: 30px 16px; text-align: center; }
.glc-footer-menu { list-style: none; display: flex; justify-content: center; gap: 20px; padding: 0; margin: 0 0 10px; }
.glc-footer-menu a { text-decoration: none; font-weight: 600; }
.glc-footer-copy { font-size: 13px; opacity: .8; margin: 0; }
