/* ===== Graciedion Music Institute — theme design system ===== */

:root {
	--gm-primary: #3C8599;
	--gm-primary-dark: #2e6574;
	--gm-primary-darker: #232f33;
	--gm-accent: #D6FB00;
	--gm-dark: #181818;
	--gm-text: #212121;
	--gm-text-muted: #5c6266;
	--gm-bg-light: #F7F7F7;
	--gm-white: #FFFFFF;
	--gm-border: #eaeaea;
	--gm-danger: #D83232;
	--gm-success: #4ccc6b;
	--gm-font-heading: 'Work Sans', 'DM Sans', sans-serif;
	--gm-font-body: 'DM Sans', 'Work Sans', sans-serif;
	--gm-radius: 12px;
	--gm-shadow: 0 8px 30px rgba(24, 24, 24, 0.08);
	--gm-topbar-height: 84px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--gm-font-body);
	color: var(--gm-text);
	background: var(--gm-white);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--gm-font-heading);
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 0.6em;
	color: var(--gm-dark);
}

p { margin: 0 0 1em; }
a { color: var(--gm-primary); text-decoration: none; }
a:hover { color: var(--gm-primary-dark); }
img { max-width: 100%; height: auto; display: block; }

.screen-reader-text {
	position: absolute !important;
	clip: rect(1px, 1px, 1px, 1px);
	overflow: hidden;
	height: 1px; width: 1px;
}
.skip-link:focus {
	position: fixed; top: 8px; left: 8px; z-index: 10000;
	background: var(--gm-dark); color: #fff; padding: 10px 16px;
	clip: auto; width: auto; height: auto; border-radius: 6px;
}

.gm-container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}

.gm-section { padding: 64px 24px; }
.gm-section__title { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 1em; }

/* ===== Buttons ===== */
.gm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 26px;
	border-radius: 999px;
	font-family: var(--gm-font-heading);
	font-weight: 600;
	font-size: 0.95rem;
	border: 2px solid transparent;
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
}
.gm-btn--primary { background: var(--gm-primary); color: #fff; }
.gm-btn--primary:hover { background: var(--gm-primary-dark); color: #fff; }
.gm-btn--accent { background: var(--gm-accent); color: var(--gm-dark); }
.gm-btn--accent:hover { filter: brightness(0.95); }
.gm-btn--ghost { background: transparent; color: var(--gm-dark); border-color: var(--gm-border); }
.gm-btn--ghost:hover { border-color: var(--gm-primary); color: var(--gm-primary); }
.gm-btn--block { width: 100%; }

/* ===== Topbar ===== */
#graciedion-header-nav {
	max-width: 100%
}


.gm-topbar {
	position: sticky;
	top: 0;
	z-index: 500;
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(6px);
	border-bottom: 1px solid var(--gm-border);
}
.gm-topbar__inner {
	display: flex;
	align-items: center;
	gap: 24px;
	height: var(--gm-topbar-height);
}
.gm-logo {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	height: 52px;
	max-height: 52px;
	overflow: hidden;
}
.gm-logo a,
.gm-logo .custom-logo-link {
	display: flex;
	align-items: center;
	height: 100%;
}
.gm-logo img,
.gm-logo .custom-logo {
	height: 100%;
	width: auto;
	max-width: 220px;
	object-fit: contain;
	display: block;
}

.gm-nav { flex: 1; }
.gm-nav__list {
	list-style: none;
	display: flex;
	align-items: center;
	gap: 28px;
	margin: 0;
	padding: 0;
}
.gm-nav__list a {
	color: var(--gm-text);
	font-weight: 500;
	font-family: var(--gm-font-heading);
}
.gm-nav__list a:hover { color: var(--gm-primary); }

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

.gm-nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	flex-shrink: 0;
	background: none;
	border: none;
	cursor: pointer;
}
.gm-nav-toggle span { display: block; width: 22px; height: 2px; background: var(--gm-dark); border-radius: 2px; flex-shrink: 0; }

/** Hidden on desktop; header.php also renders this inside the mobile nav panel */
.gm-nav__auth { display: none; }

@media (max-width: 900px) {
	.gm-topbar__inner { gap: 12px; }
	.gm-nav-toggle { display: flex; }
	.gm-topbar__auth { display: none; }

	.gm-nav {
		position: fixed;
		top: var(--gm-topbar-height);
		left: 0;
		right: 0;
		height: calc(100vh - var(--gm-topbar-height));
		background: #fff;
		visibility: hidden;
		opacity: 0;
		transform: translateY(-12px);
		transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
		padding: 24px;
		overflow-y: auto;
	}
	.gm-nav.is-open {
		visibility: visible;
		opacity: 1;
		transform: translateY(0);
	}
	.gm-nav__list { flex-direction: column; align-items: flex-start; gap: 18px; }

	.gm-nav__auth {
		display: flex;
		flex-direction: column;
		gap: 12px;
		margin-top: 24px;
		padding-top: 24px;
		border-top: 1px solid var(--gm-border);
	}
	.gm-nav__auth .gm-btn { width: 100%; }
}

@media (max-width: 480px) {
	.gm-container { padding: 0 16px; }
	.gm-topbar__inner { gap: 8px; }
}

/* ===== Modals ===== */
.gm-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.gm-modal.is-open { display: flex; }
.gm-modal__overlay { position: absolute; inset: 0; background: rgba(24, 24, 24, 0.55); }
.gm-modal__panel {
	position: relative;
	background: #fff;
	border-radius: var(--gm-radius);
	box-shadow: var(--gm-shadow);
	max-width: 420px;
	width: 100%;
	padding: 40px 32px;
	max-height: 90vh;
	overflow-y: auto;
}
.gm-modal__close {
	position: absolute;
	top: 14px; right: 14px;
	width: 32px; height: 32px;
	border: none; background: var(--gm-bg-light);
	border-radius: 50%;
	font-size: 1.2rem;
	cursor: pointer;
	line-height: 1;
}
.gm-modal__title { text-align: center; margin-bottom: 1em; }
.gm-modal__divider { text-align: center; color: var(--gm-text-muted); margin: 20px 0; position: relative; }
.gm-modal__divider::before, .gm-modal__divider::after {
	content: ''; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--gm-border);
}
.gm-modal__divider::before { left: 0; }
.gm-modal__divider::after { right: 0; }
.gm-modal__switch { text-align: center; margin-top: 18px; font-size: 0.92rem; }

.gm-social-login { display: flex; flex-direction: column; gap: 10px; }
.gm-social-btn {
	display: flex; align-items: center; justify-content: center; gap: 10px;
	padding: 11px 16px;
	border-radius: 8px;
	border: 1px solid var(--gm-border);
	background: #fff;
	font-family: var(--gm-font-heading);
	font-weight: 600;
	font-size: 0.92rem;
	color: var(--gm-text);
	cursor: pointer;
	text-decoration: none;
}
.gm-social-btn:hover { background: var(--gm-bg-light); }
.gm-social-btn__icon { width: 18px; height: 18px; flex-shrink: 0; }

.gm-form { display: flex; flex-direction: column; gap: 14px; }
.gm-contact-form-wrap { max-width: 520px; margin: 0 auto; text-align: left; }
.gm-contact-form textarea { font-family: var(--gm-font-body); font-size: 1rem; padding: 11px 14px; border-radius: 8px; border: 1px solid var(--gm-border); resize: vertical; }
.gm-contact-form textarea:focus { outline: 2px solid var(--gm-primary); border-color: var(--gm-primary); }
.gm-field { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; font-weight: 600; }
.gm-field input, .gm-field textarea {
	font-family: var(--gm-font-body);
	font-size: 1rem;
	padding: 11px 14px;
	border-radius: 8px;
	border: 1px solid var(--gm-border);
	font-weight: 400;
}
.gm-field input:focus, .gm-field textarea:focus { outline: 2px solid var(--gm-primary); border-color: var(--gm-primary); }

/* ===== Footer ===== */
.gm-footer { background: var(--gm-dark); color: #d8d8d8; padding-top: 56px; }
.gm-footer__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 40px;
	padding-bottom: 40px;
}
.gm-footer__logo-badge { display: inline-block; background: #fff; padding: 8px 14px; border-radius: 8px; margin-bottom: 18px; }
.gm-footer__logo { height: 32px; width: auto; max-width: 180px; object-fit: contain; display: block; }
.gm-footer__title { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.gm-footer a { color: #d8d8d8; }
.gm-footer a:hover { color: var(--gm-accent); }
.gm-footer__address { max-width: 260px; }

.gm-footer__socials { display: flex; gap: 12px; }
.social-icon {
	width: 38px; height: 38px;
	display: flex; align-items: center; justify-content: center;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
}
.social-icon:hover { background: var(--gm-primary); }

.gm-newsletter-form { display: flex; gap: 8px; margin-top: 12px; }
.gm-newsletter-form input {
	flex: 1; padding: 10px 14px; border-radius: 8px; border: none; font-family: var(--gm-font-body);
}

.gm-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	padding: 22px 24px;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px;
	font-size: 0.85rem;
}
.gm-footer__links { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }

/* ===== Blog / generic content ===== */
.gm-blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px; }
.gm-blog-card { border-radius: var(--gm-radius); overflow: hidden; box-shadow: var(--gm-shadow); background: #fff; }
.gm-blog-card__thumb img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.gm-blog-card__body { padding: 20px; }
.gm-blog-card__title { font-size: 1.15rem; margin-bottom: 0.5em; }
.gm-blog-card__title a { color: var(--gm-dark); }
.gm-page-content { max-width: 780px; }
.gm-pagination { margin-top: 40px; }

/* ===== Tutor LMS course cards (theme overrides) ===== */
.gm-courses-archive .tutor-course-loop-item,
.tutor-course-listing-item {
	border-radius: var(--gm-radius) !important;
	box-shadow: var(--gm-shadow) !important;
}
.tutor-btn-primary {
	background-color: var(--gm-primary) !important;
	border-color: var(--gm-primary) !important;
}
.tutor-btn-primary:hover { background-color: var(--gm-primary-dark) !important; }
.tutor-color-primary { color: var(--gm-primary) !important; }

/* Cart/checkout course thumbnails: show the full image (with any embedded
   title text intact) instead of center-cropping it into a near-square box */
.tutor-cart-course-thumb img,
.tutor-checkout-item-thumb img,
[class*="course-thumb"] img {
	object-fit: contain !important;
	background: var(--gm-bg-light);
}

/* ===== Certificate verification page (Graciedion Certificates plugin) ===== */
.gm-verify {
	max-width: 640px;
	margin: 0 auto;
	padding: 64px 24px;
	text-align: center;
}
.gm-verify__form { display: flex; gap: 10px; margin: 28px 0; }
.gm-verify__form input {
	flex: 1; padding: 13px 16px; border-radius: 8px; border: 1px solid var(--gm-border); font-size: 1rem;
}
.gm-verify__result {
	margin-top: 28px;
	padding: 28px;
	border-radius: var(--gm-radius);
	text-align: left;
}
.gm-verify__result--valid { background: #eafbf0; border: 1px solid var(--gm-success); }
.gm-verify__result--invalid { background: #fdeeee; border: 1px solid var(--gm-danger); }
.gm-verify__badge { font-weight: 700; font-family: var(--gm-font-heading); }
.gm-verify__badge--valid { color: #1e8e3e; }
.gm-verify__badge--invalid { color: var(--gm-danger); }

/* Certificate design now lives in the graciedion-certificates plugin (assets/css/certificate.css) so it can support multiple templates. */
@media print {
	.gm-topbar, .gm-footer { display: none !important; }
}

@media (max-width: 640px) {
	.gm-verify__form { flex-direction: column; }
}

/* ===== Course hero (single course page) ===== */
.gm-course-hero {
	position: relative;
	min-height: 560px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	overflow: hidden;
	background: var(--gm-dark);
}
.gm-course-hero__media {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 0;
}
.gm-course-hero__overlay {
	position: absolute;
	inset: 0;
	background: rgba(10, 12, 13, 0.55);
	z-index: 1;
}
.gm-course-hero__content {
	position: relative;
	z-index: 2;
	max-width: 780px;
	padding: 60px 24px;
	color: #fff;
}
.gm-course-hero__eyebrow {
	display: inline-block;
	background: var(--gm-primary);
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	padding: 6px 14px;
	border-radius: 4px;
	margin-bottom: 20px;
}
.gm-course-hero__title {
	color: #fff;
	font-size: clamp(1.8rem, 4vw, 2.6rem);
	margin-bottom: 0.5em;
}
.gm-course-hero__subtitle {
	color: rgba(255, 255, 255, 0.85);
	font-size: 1.05rem;
	max-width: 620px;
	margin: 0 auto 32px;
}
.gm-course-hero__enroll {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: var(--gm-primary);
	color: #fff;
	font-family: var(--gm-font-heading);
	font-weight: 700;
	font-size: 1.05rem;
	padding: 16px 40px;
	border-radius: 4px;
	text-decoration: none;
}
.gm-course-hero__enroll:hover { background: var(--gm-primary-dark); color: #fff; }
.gm-course-hero__price-regular { text-decoration: line-through; opacity: 0.7; font-weight: 400; }

/* ===== "What's included" section ===== */
.gm-course-included {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 60px;
	align-items: center;
	padding: 70px 24px;
	max-width: 1200px;
	margin: 0 auto;
}
.gm-course-included__eyebrow {
	display: inline-block;
	background: var(--gm-accent);
	color: var(--gm-dark);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	padding: 5px 12px;
	margin-bottom: 16px;
}
.gm-course-included__title { font-size: 2rem; margin-bottom: 24px; }
.gm-course-included__icon {
	width: 52px;
	height: 52px;
	border-radius: 10px;
	background: var(--gm-dark);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 16px;
}
.gm-course-included__icon svg { width: 24px; height: 24px; stroke: #fff; }
.gm-course-included__list { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.gm-course-included__list li { padding-left: 28px; position: relative; }
.gm-course-included__list li::before {
	content: '✓';
	position: absolute;
	left: 0;
	color: var(--gm-primary);
	font-weight: 700;
}
.gm-course-included__image { border-radius: var(--gm-radius); overflow: hidden; box-shadow: var(--gm-shadow); }
.gm-course-included__image img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }

@media (max-width: 900px) {
	.gm-course-included { grid-template-columns: 1fr; gap: 32px; }
	.gm-course-hero { min-height: 460px; }
}
