/*
Theme Name: Glow Music Institute
Theme URI: https://glowmusicinstitute.com
Author: Glow Music Institute
Description: Public-facing website theme for Glow Music Institute, a music ministry training school. Pairs with the Music Ministry LMS plugin (student/instructor portal lives at /wp-admin) and shares its brand palette.
Version: 0.1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: glow-music-institute
*/

/* -----------------------------------------------------------
   Design tokens — mirrors the gold/ink palette used by the
   Music Ministry LMS plugin (assets/css/core.css) so the public
   site and the student/instructor app feel like one brand.
   ----------------------------------------------------------- */
:root {
	--gmi-primary: #ffcd05;
	--gmi-primary-hover: #fcb424;
	--gmi-ink: #0a0500;
	--gmi-bg: #ffffff;
	--gmi-surface: #ffffff;
	--gmi-surface-alt: #f8fafc;
	--gmi-border: #e5e7eb;
	--gmi-text: #111827;
	--gmi-text-muted: #6b7280;
	--gmi-text-faint: #9ca3af;
	--gmi-text-on-primary: #0a0500;

	--gmi-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--gmi-font-heading: var(--gmi-font-body);

	--gmi-radius-sm: 6px;
	--gmi-radius-md: 10px;
	--gmi-radius-lg: 16px;
	--gmi-shadow-sm: 0 1px 2px rgba(10, 5, 0, 0.06);
	--gmi-shadow-md: 0 4px 16px rgba(10, 5, 0, 0.08);
	--gmi-shadow-lg: 0 12px 32px rgba(10, 5, 0, 0.12);

	--gmi-container: 1200px;
	--gmi-header-height: 76px;
}

/* -----------------------------------------------------------
   Reset & base
   ----------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--gmi-bg);
	color: var(--gmi-text);
	font-family: var(--gmi-font-body);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

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

a {
	color: inherit;
	text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--gmi-font-heading);
	color: var(--gmi-ink);
	line-height: 1.2;
	margin: 0 0 0.5em;
}

p {
	margin: 0 0 1em;
}

ul, ol {
	padding-left: 1.25em;
}

button, input, select, textarea {
	font-family: inherit;
	font-size: inherit;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
	border: 0;
	padding: 0;
	margin: -1px;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: 0;
	background: var(--gmi-ink);
	color: #fff;
	padding: 12px 20px;
	z-index: 10000;
	border-radius: 0 0 var(--gmi-radius-sm) 0;
}

.skip-link:focus {
	top: 0;
}

/* -----------------------------------------------------------
   Layout helpers
   ----------------------------------------------------------- */
.gmi-container {
	width: 100%;
	max-width: var(--gmi-container);
	margin: 0 auto;
	padding: 0 24px;
}

.gmi-section {
	padding: 72px 0;
}

@media (max-width: 782px) {
	.gmi-section {
		padding: 48px 0;
	}
}

/* -----------------------------------------------------------
   Buttons
   ----------------------------------------------------------- */
.gmi-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 24px;
	border-radius: var(--gmi-radius-md);
	font-weight: 600;
	border: 1px solid transparent;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
	white-space: nowrap;
}

.gmi-btn:active {
	transform: translateY(1px);
}

.gmi-btn--primary {
	background: var(--gmi-primary);
	color: var(--gmi-text-on-primary);
}

.gmi-btn--primary:hover {
	background: var(--gmi-primary-hover);
}

.gmi-btn--outline {
	background: transparent;
	color: var(--gmi-ink);
	border-color: var(--gmi-ink);
}

.gmi-btn--outline:hover {
	background: var(--gmi-ink);
	color: #fff;
}

.gmi-btn--ghost {
	background: transparent;
	color: var(--gmi-ink);
}

.gmi-btn--ghost:hover {
	background: var(--gmi-surface-alt);
}

/* -----------------------------------------------------------
   Site header
   ----------------------------------------------------------- */
.gmi-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--gmi-surface);
	border-bottom: 1px solid var(--gmi-border);
}

.gmi-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	height: var(--gmi-header-height);
}

.gmi-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 800;
	font-size: 1.125rem;
	color: var(--gmi-ink);
	flex-shrink: 0;
}

.gmi-brand img {
	height: 40px;
	width: auto;
}

/* the_custom_logo() renders outside .gmi-brand, at the uploaded image's
   native size (srcset sizes="100vw") unless explicitly capped here. */
.custom-logo-link {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.custom-logo-link img.custom-logo {
	height: 44px;
	width: auto;
	max-width: 220px;
	object-fit: contain;
}

.gmi-brand__mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: var(--gmi-radius-sm);
	background: var(--gmi-primary);
	color: var(--gmi-ink);
	font-weight: 800;
}

.gmi-nav {
	display: flex;
	align-items: center;
	gap: 4px;
	flex: 1;
	justify-content: center;
}

.gmi-nav ul {
	display: flex;
	align-items: center;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.gmi-nav a {
	display: inline-block;
	padding: 10px 14px;
	border-radius: var(--gmi-radius-sm);
	font-weight: 600;
	color: var(--gmi-text);
}

.gmi-nav a:hover,
.gmi-nav .current-menu-item > a {
	background: var(--gmi-surface-alt);
	color: var(--gmi-ink);
}

.gmi-header__actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}

.gmi-nav-toggle {
	display: none;
	background: transparent;
	border: 1px solid var(--gmi-border);
	border-radius: var(--gmi-radius-sm);
	width: 44px;
	height: 44px;
	align-items: center;
	justify-content: center;
}

.gmi-nav-toggle span,
.gmi-nav-toggle span::before,
.gmi-nav-toggle span::after {
	content: "";
	display: block;
	width: 20px;
	height: 2px;
	background: var(--gmi-ink);
	position: relative;
	transition: transform 0.15s ease;
}

.gmi-nav-toggle span::before {
	position: absolute;
	top: -6px;
}

.gmi-nav-toggle span::after {
	position: absolute;
	top: 6px;
}

@media (max-width: 960px) {
	.gmi-nav {
		position: fixed;
		top: var(--gmi-header-height);
		left: 0;
		right: 0;
		bottom: 0;
		background: var(--gmi-surface);
		flex-direction: column;
		justify-content: flex-start;
		align-items: stretch;
		padding: 16px;
		transform: translateX(100%);
		transition: transform 0.2s ease;
		overflow-y: auto;
	}

	.gmi-nav ul {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.gmi-nav a {
		padding: 14px 12px;
		border-bottom: 1px solid var(--gmi-border);
	}

	.gmi-header.is-nav-open .gmi-nav {
		transform: translateX(0);
	}

	.gmi-nav-toggle {
		display: inline-flex;
	}
}

/* -----------------------------------------------------------
   Hero
   ----------------------------------------------------------- */
.gmi-hero {
	background: linear-gradient(180deg, var(--gmi-surface-alt) 0%, var(--gmi-bg) 100%);
	padding: 96px 0;
	text-align: center;
}

.gmi-hero__eyebrow {
	display: inline-block;
	background: rgba(255, 205, 5, 0.18);
	color: var(--gmi-ink);
	font-weight: 700;
	font-size: 0.8125rem;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	padding: 6px 14px;
	border-radius: 999px;
	margin-bottom: 20px;
}

.gmi-hero h1 {
	font-size: clamp(2rem, 4vw, 3.25rem);
	max-width: 780px;
	margin-left: auto;
	margin-right: auto;
}

.gmi-hero p {
	max-width: 620px;
	margin-left: auto;
	margin-right: auto;
	color: var(--gmi-text-muted);
	font-size: 1.125rem;
}

.gmi-hero__actions {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-top: 32px;
	flex-wrap: wrap;
}

/* -----------------------------------------------------------
   Cards / grids (programs, features)
   ----------------------------------------------------------- */
.gmi-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 24px;
}

.gmi-card {
	background: var(--gmi-surface);
	border: 1px solid var(--gmi-border);
	border-radius: var(--gmi-radius-lg);
	padding: 28px;
	box-shadow: var(--gmi-shadow-sm);
}

.gmi-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: var(--gmi-radius-md);
	background: rgba(255, 205, 5, 0.18);
	color: var(--gmi-ink);
	margin-bottom: 16px;
	font-size: 1.25rem;
}

.gmi-section__head {
	text-align: center;
	max-width: 640px;
	margin: 0 auto 48px;
}

.gmi-section__head p {
	color: var(--gmi-text-muted);
}

/* -----------------------------------------------------------
   Course browsing (short courses)
   ----------------------------------------------------------- */
.gmi-filter-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 32px;
}

.gmi-chip {
	display: inline-block;
	padding: 8px 16px;
	border-radius: 999px;
	border: 1px solid var(--gmi-border);
	font-weight: 600;
	font-size: 0.875rem;
	color: var(--gmi-text);
	background: var(--gmi-surface);
}

.gmi-chip:hover {
	border-color: var(--gmi-ink);
}

.gmi-chip.is-active {
	background: var(--gmi-primary);
	border-color: var(--gmi-primary);
	color: var(--gmi-text-on-primary);
}

.gmi-course-card {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 0;
	overflow: hidden;
}

.gmi-course-card__cover-link {
	position: relative;
	display: block;
}

.gmi-course-card__body {
	padding: 20px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.gmi-course-card .gmi-btn {
	margin-top: auto;
	align-self: flex-start;
}

.gmi-course-cover {
	width: 100%;
	aspect-ratio: 16 / 9;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.gmi-course-cover--photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.gmi-course-cover--generated .dashicons {
	width: 44px;
	height: 44px;
	font-size: 44px;
	color: rgba(255, 255, 255, 0.9);
}

.gmi-course-cover--banner {
	aspect-ratio: auto;
	height: min(40vh, 360px);
}

.gmi-course-cover--banner.gmi-course-cover--generated .dashicons {
	width: 72px;
	height: 72px;
	font-size: 72px;
}

.gmi-course-cover--gold {
	background: linear-gradient(135deg, #ffcd05 0%, #fcb424 100%);
}
.gmi-course-cover--gold .dashicons {
	color: var(--gmi-ink);
}

.gmi-course-cover--teal {
	background: linear-gradient(135deg, #2dd4bf 0%, #0d9488 100%);
}

.gmi-course-cover--purple {
	background: linear-gradient(135deg, #a78bfa 0%, #6d28d9 100%);
}

.gmi-course-cover--slate {
	background: linear-gradient(135deg, #64748b 0%, #1e293b 100%);
}

.gmi-course-cover--orange {
	background: linear-gradient(135deg, #fb923c 0%, #c2410c 100%);
}

.gmi-badge {
	display: inline-block;
	align-self: flex-start;
	background: var(--gmi-ink);
	color: #fff;
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 4px 10px;
	border-radius: 999px;
	margin-bottom: 12px;
}

.gmi-slider-wrap {
	position: relative;
}

.gmi-slider {
	display: flex;
	gap: 24px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	padding: 4px 4px 12px;
	margin: 0 -4px;
	-webkit-overflow-scrolling: touch;
}

.gmi-slider > .gmi-course-card {
	flex: 0 0 300px;
	scroll-snap-align: start;
}

.gmi-slider-arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	position: absolute;
	top: 40%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--gmi-surface);
	border: 1px solid var(--gmi-border);
	box-shadow: var(--gmi-shadow-md);
	cursor: pointer;
	z-index: 2;
}

.gmi-slider-arrow--prev {
	left: -16px;
}

.gmi-slider-arrow--next {
	right: -16px;
}

@media (max-width: 700px) {
	.gmi-slider-arrow {
		display: none;
	}
}

.gmi-badge--on-cover {
	position: absolute;
	top: 12px;
	left: 12px;
	margin-bottom: 0;
	box-shadow: var(--gmi-shadow-sm);
}

.gmi-badge--credits {
	left: auto;
	right: 12px;
	background: var(--gmi-primary);
	color: var(--gmi-text-on-primary);
}

/* -----------------------------------------------------------
   CTA band
   ----------------------------------------------------------- */
.gmi-cta {
	background: var(--gmi-ink);
	color: #fff;
	border-radius: var(--gmi-radius-lg);
	padding: 56px;
	text-align: center;
}

.gmi-cta h2 {
	color: #fff;
}

.gmi-cta p {
	color: rgba(255, 255, 255, 0.7);
	max-width: 560px;
	margin-left: auto;
	margin-right: auto;
}

/* -----------------------------------------------------------
   Footer
   ----------------------------------------------------------- */
.gmi-footer {
	background: var(--gmi-ink);
	color: rgba(255, 255, 255, 0.65);
	padding: 64px 0 32px;
	margin-top: 96px;
}

.gmi-footer a {
	color: rgba(255, 255, 255, 0.65);
}

.gmi-footer a:hover {
	color: #fff;
}

.gmi-footer__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 32px;
	margin-bottom: 48px;
}

.gmi-footer__brand {
	color: #fff;
	font-weight: 800;
	font-size: 1.125rem;
	margin-bottom: 12px;
}

.gmi-footer h4 {
	color: #fff;
	font-size: 0.9375rem;
	margin-bottom: 14px;
}

.gmi-footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.gmi-footer li {
	margin-bottom: 10px;
}

.gmi-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	padding-top: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 16px;
	flex-wrap: wrap;
	font-size: 0.875rem;
}

/* -----------------------------------------------------------
   Generic page/single content
   ----------------------------------------------------------- */
.gmi-content {
	padding: 64px 0;
	max-width: 780px;
	margin: 0 auto;
}

.gmi-content img {
	border-radius: var(--gmi-radius-md);
}
