/*
Theme Name:        English Mastery
Theme URI:         https://syedyeamin.com
Author:            Syed Yeamin
Author URI:        https://syedyeamin.com
Description:       Custom LMS theme for course.syedyeamin.com — courses, live classes, vocabulary, grammar, 4-skills practice, quizzes, progress tracking, certificates, teacher/student dashboards, gamification (XP/streak), community discussion, and an AI-practice extension point. WooCommerce and Elementor friendly.
Version:           1.0.0
Requires at least: 6.4
Tested up to:       6.6
Requires PHP:      7.4
License:           GNU General Public License v2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       engmastery
*/

/* Base styles - replace with your own design system. */

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	line-height: 1.6;
	margin: 0;
	color: #111111;
}

.site-container {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 1.5rem;
}

.site-header,
.site-footer {
	padding: 1.5rem 0;
}

/* ---------- Site Header ---------- */
.em-site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	padding: 1rem 1.25rem 0;
}
.em-site-header-inner {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0.85rem 1.5rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	border-radius: 999px;
	transition: background 0.2s ease, box-shadow 0.2s ease;
}

/* Glass variant (default) */
body.em-header-glass .em-site-header-inner {
	background: rgba(255,255,255,0.55);
	backdrop-filter: blur(16px) saturate(160%);
	-webkit-backdrop-filter: blur(16px) saturate(160%);
	border: 1px solid rgba(255,255,255,0.6);
	box-shadow: 0 10px 30px rgba(10,26,53,0.08);
}

/* Solid variant (toggled off in Customizer) */
body.em-header-solid .em-site-header {
	padding: 0;
}
body.em-header-solid .em-site-header-inner {
	background: #ffffff;
	border-radius: 0;
	border: none;
	border-bottom: 1px solid #e3e8f2;
	box-shadow: none;
}

.em-site-logo {
	font-family: "Space Grotesk", sans-serif;
	font-weight: 700;
	font-size: 1.2rem;
	line-height: 1;
	display: flex;
	align-items: center;
}
.em-site-logo a {
	color: #0a1a35;
	text-decoration: none;
	display: flex;
	align-items: center;
}
.em-site-logo img,
.em-site-logo svg {
	max-height: 40px !important;
	width: auto !important;
	height: auto !important;
	display: block;
}
.em-site-logo-footer a {
	color: #fff;
}
.em-site-logo-footer img,
.em-site-logo-footer svg {
	max-height: 40px !important;
}
.em-primary-nav {
	display: flex;
	align-items: center;
	gap: 2rem;
}
.em-nav-menu {
	list-style: none;
	display: flex;
	gap: 1.75rem;
	margin: 0;
	padding: 0;
}
.em-nav-menu a {
	text-decoration: none;
	color: #33415c;
	font-weight: 500;
	font-size: 0.95rem;
}
.em-nav-menu a:hover {
	color: #1e3f73;
}
.em-nav-auth {
	display: flex;
	align-items: center;
	gap: 1rem;
}
.em-btn-sm {
	padding: 0.55rem 1.2rem;
	font-size: 0.9rem;
}
.em-nav-toggle {
	display: none;
	flex-direction: column;
	gap: 4px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0.4rem;
}
.em-nav-toggle span {
	width: 22px;
	height: 2px;
	background: #0a1a35;
	display: block;
}

/* Language switch */
.em-lang-switch {
	display: flex;
	background: rgba(10,26,53,0.06);
	border-radius: 999px;
	padding: 0.2rem;
	gap: 0.15rem;
}
.em-lang-btn {
	border: none;
	background: transparent;
	padding: 0.35rem 0.7rem;
	border-radius: 999px;
	font-family: "Space Grotesk", sans-serif;
	font-size: 0.8rem;
	font-weight: 600;
	color: #52607a;
	cursor: pointer;
}
.em-lang-btn.em-lang-active {
	background: #0a1a35;
	color: #fff;
}

/* Profile dropdown */
.em-profile-menu {
	position: relative;
}
.em-profile-btn {
	border: none;
	background: rgba(10,26,53,0.06);
	border-radius: 50%;
	width: 38px;
	height: 38px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	overflow: hidden;
}
.em-profile-btn img {
	border-radius: 50%;
	width: 100%;
	height: 100%;
}
.em-profile-icon {
	font-size: 1.1rem;
}
.em-profile-dropdown {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	background: #fff;
	border: 1px solid #e3e8f2;
	border-radius: 14px;
	box-shadow: 0 18px 34px rgba(10,26,53,0.15);
	padding: 0.6rem;
	min-width: 200px;
	display: none;
	flex-direction: column;
	gap: 0.2rem;
	z-index: 60;
}
.em-profile-menu.em-open .em-profile-dropdown {
	display: flex;
}
.em-profile-dropdown a {
	text-decoration: none;
	color: #33415c;
	font-size: 0.9rem;
	padding: 0.55rem 0.7rem;
	border-radius: 8px;
}
.em-profile-dropdown a:hover {
	background: #f4f7fc;
}
.em-profile-dropdown .em-profile-name {
	font-weight: 700;
	font-size: 0.85rem;
	color: #0a1a35;
	padding: 0.3rem 0.7rem 0.5rem;
	border-bottom: 1px solid #eee;
	margin-bottom: 0.3rem;
}
.em-profile-dropdown .em-btn {
	text-align: center;
	margin-top: 0.3rem;
}

@media (max-width: 900px) {
	.em-nav-toggle {
		display: flex;
	}
	.em-primary-nav {
		position: absolute;
		top: calc(100% + 0.5rem);
		left: 1.25rem;
		right: 1.25rem;
		background: #fff;
		flex-direction: column;
		align-items: flex-start;
		padding: 1.5rem;
		border-radius: 18px;
		border: 1px solid #e3e8f2;
		box-shadow: 0 18px 34px rgba(10,26,53,0.15);
		display: none;
	}
	.em-primary-nav.em-nav-open {
		display: flex;
	}
	.em-nav-menu {
		flex-direction: column;
		gap: 1rem;
	}
	.em-nav-auth {
		margin-top: 1rem;
		flex-direction: column;
		align-items: flex-start;
		gap: 0.75rem;
	}
}

/* ---------- Floating WhatsApp button ---------- */
.em-whatsapp-float {
	position: fixed;
	bottom: 24px;
	right: 24px;
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: linear-gradient(135deg, #0a1a35, #1e3f73);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 14px 28px rgba(10,26,53,0.35);
	z-index: 80;
	text-decoration: none;
	transition: transform 0.15s ease;
}
.em-whatsapp-float:hover {
	transform: scale(1.08);
}
.em-whatsapp-float svg {
	width: 28px;
	height: 28px;
	fill: #fff;
}

/* ---------- Site Footer ---------- */
.em-site-footer {
	background: #0a1a35;
	color: #cfd8ea;
	padding: 4rem 0 2rem;
	margin-top: 4rem;
}
.em-footer-grid {
	display: grid;
	grid-template-columns: 1.6fr 1fr 1fr 1fr;
	gap: 2.5rem;
	padding-bottom: 2.5rem;
	border-bottom: 1px solid rgba(255,255,255,0.12);
}
.em-footer-brand .em-site-logo {
	color: #fff;
}
.em-footer-brand p {
	margin-top: 0.9rem;
	font-size: 0.9rem;
	color: #a9b6d1;
	max-width: 32ch;
}
.em-footer-col h4 {
	font-family: "Space Grotesk", sans-serif;
	color: #fff;
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin: 0 0 1rem;
}
.em-footer-col ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.em-footer-col li {
	margin-bottom: 0.7rem;
}
.em-footer-col a {
	color: #cfd8ea;
	text-decoration: none;
	font-size: 0.92rem;
}
.em-footer-col a:hover {
	color: #fff;
}
.em-footer-bottom {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 1rem;
	padding-top: 1.5rem;
	font-size: 0.85rem;
}
.em-footer-bottom a {
	color: #6ea8ff;
	text-decoration: underline;
	font-weight: 600;
}
.em-footer-bottom a:hover {
	color: #a4c6ff;
}
.em-footer-social {
	display: flex;
	gap: 0.75rem;
}
.em-footer-social a {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(255,255,255,0.1);
	color: #ffffff !important;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	opacity: 1;
	transition: background 0.15s ease, transform 0.15s ease;
}
.em-footer-social a:hover {
	background: rgba(255,255,255,0.22);
	transform: translateY(-2px);
}
.em-site-logo-footer img {
	max-height: 40px !important;
}

@media (max-width: 760px) {
	.em-footer-grid {
		grid-template-columns: 1fr 1fr;
	}
}

a {
	color: #1e40af;
}

/* ---------- Buttons ---------- */
.em-btn {
	display: inline-block;
	padding: 0.7rem 1.4rem;
	border-radius: 8px;
	background: #f1f5f9;
	color: #111;
	text-decoration: none;
	font-weight: 600;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.em-btn-primary {
	background: #1e40af;
	color: #fff;
}
.em-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* ---------- XP / Gamification widget ---------- */
.em-xp-widget {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin-bottom: 1.5rem;
}
.em-xp-badge {
	background: #fff7ed;
	border: 1px solid #fed7aa;
	border-radius: 999px;
	padding: 0.4rem 1rem;
	font-weight: 600;
	font-size: 0.9rem;
}

/* ---------- Progress bars ---------- */
.em-progress-bar {
	background: #e5e7eb;
	border-radius: 999px;
	height: 10px;
	overflow: hidden;
	margin: 0.5rem 0 0.25rem;
}
.em-progress-fill {
	background: linear-gradient(90deg, #1e40af, #3b82f6);
	height: 100%;
	transition: width 0.3s ease;
}

/* ---------- Course grid / cards ---------- */
.em-course-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1.25rem;
	margin: 1.5rem 0;
}
.em-course-card {
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 1.25rem;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.em-course-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 24px rgba(10,26,53,0.1);
}
.em-course-card h3 {
	margin-top: 0;
}

/* ---------- Lesson list ---------- */
.em-lesson-list {
	list-style: none;
	padding: 0;
}
.em-lesson-list li {
	padding: 0.75rem 0;
	border-bottom: 1px solid #eee;
}
.em-lesson-list .em-locked {
	color: #999;
}
.em-lesson-done a {
	color: #16a34a;
}

/* ---------- Video embeds (responsive 16:9) ---------- */
.em-video-wrapper {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
	border-radius: 12px;
	margin: 1rem 0;
}
.em-video-wrapper iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ---------- Quiz ---------- */
.em-quiz-question {
	margin-bottom: 1.5rem;
	padding: 1rem;
	background: #f9fafb;
	border-radius: 10px;
}
.em-quiz-option {
	display: block;
	padding: 0.4rem 0;
	cursor: pointer;
}
.em-quiz-result {
	margin-top: 1rem;
	padding: 1rem;
	background: #ecfdf5;
	border-radius: 10px;
}

/* ---------- Dashboards ---------- */
.em-table {
	width: 100%;
	border-collapse: collapse;
	margin: 1rem 0;
}
.em-table th, .em-table td {
	text-align: left;
	padding: 0.6rem;
	border-bottom: 1px solid #eee;
}
.em-certificate-list {
	list-style: none;
	padding: 0;
}

/* ---------- AI Practice widget ---------- */
.em-ai-practice {
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 1.25rem;
	margin: 1rem 0;
}
.em-ai-input {
	width: 100%;
	box-sizing: border-box;
	border-radius: 8px;
	border: 1px solid #d1d5db;
	padding: 0.6rem;
	margin: 0.75rem 0;
}
.em-ai-controls {
	display: flex;
	gap: 0.75rem;
}
.em-ai-response {
	margin-top: 1rem;
	background: #f9fafb;
	padding: 1rem;
	border-radius: 8px;
	overflow-x: auto;
}

/* ---------- Mobile responsive ---------- */
@media (max-width: 640px) {
	.site-container {
		padding: 0 1rem;
	}
	.em-course-grid {
		grid-template-columns: 1fr;
	}
	.em-ai-controls {
		flex-direction: column;
	}
	.em-xp-widget {
		flex-direction: column;
		gap: 0.4rem;
	}
}
