/**
 * EduNexa — ادونکسا
 * Base Stylesheet: Variables, Modern Reset, Typography & Accessibility
 *
 * @package EduNexa
 * @author  امیر حسین بناوند (Amir Hossein Banavand)
 * @link    https://npocto.ir
 */

:root {
	/* EduNexa Brand Colors (Strictly Golden Yellow #FAB237 & Deep Navy #1c1d47) */
	--edu-primary: #FAB237;
	--edu-primary-dark: #e09923;
	--edu-primary-light: #fef7e8;
	--edu-secondary: #1c1d47;
	--edu-secondary-dark: #161736;
	--edu-accent: #FAB237;
	--edu-dark: #1c1d47;
	--edu-text: #1c1d47;
	--edu-muted: #64748b;
	--edu-surface: #f8fafc;
	--edu-white: #ffffff;
	--edu-border: #e2e8f0;
	--edu-danger: #ef4444;
	--edu-success: #10b981;

	/* Typography & Persian Font Stack */
	--edu-font-sans: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', Tahoma, sans-serif;
	--edu-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

	/* Spacing Scale */
	--edu-space-xs: 0.25rem;
	--edu-space-sm: 0.5rem;
	--edu-space-md: 1rem;
	--edu-space-lg: 1.5rem;
	--edu-space-xl: 2rem;
	--edu-space-2xl: 3rem;

	/* Border Radius */
	--edu-radius-sm: 6px;
	--edu-radius-md: 10px;
	--edu-radius-lg: 16px;
	--edu-radius-full: 9999px;

	/* Shadows */
	--edu-shadow-sm: 0 1px 2px 0 rgba(28, 29, 71, 0.05);
	--edu-shadow-md: 0 4px 6px -1px rgba(28, 29, 71, 0.08), 0 2px 4px -2px rgba(28, 29, 71, 0.05);
	--edu-shadow-lg: 0 10px 15px -3px rgba(28, 29, 71, 0.09), 0 4px 6px -4px rgba(28, 29, 71, 0.04);

	/* Transitions */
	--edu-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
	--edu-transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modern CSS Reset */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	font-size: 16px;
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

/* Universal Clean Background Override (prevents Elementor Kit from forcing dirty gray #E7E7E7) */
html,
body,
body.elementor-kit-6,
.elementor-kit-6 {
	background-color: #f8fafc !important;
	color: var(--edu-text);
}

body {
	font-family: var(--edu-font-sans);
	font-size: 1rem;
	line-height: 1.75;
	color: var(--edu-text);
	background-color: var(--edu-surface);
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}

/* Images & Media */
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
	display: block;
	max-width: 100%;
	height: auto;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
	color: var(--edu-dark);
	font-weight: 700;
	line-height: 1.35;
	margin-block-end: var(--edu-space-md);
}

h1 { font-size: clamp(1.75rem, 3vw, 2.35rem); }
h2 { font-size: clamp(1.4rem, 2.5vw, 1.85rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }
h4 { font-size: 1.15rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
	margin-block-end: var(--edu-space-md);
}

a {
	color: var(--edu-dark);
	text-decoration: none;
	transition: color var(--edu-transition-fast);
}

a:hover {
	color: var(--edu-primary-dark);
}

/* Accessible Focus States */
:focus-visible {
	outline: 2px solid var(--edu-primary);
	outline-offset: 3px;
}

/* Lists */
ul, ol {
	padding-inline-start: var(--edu-space-lg);
	margin-block-end: var(--edu-space-md);
}

/* Screen Reader Only Utility */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: var(--edu-white);
	border-radius: var(--edu-radius-sm);
	box-shadow: var(--edu-shadow-md);
	clip: auto !important;
	clip-path: none;
	color: var(--edu-dark);
	display: block;
	font-size: 0.875rem;
	font-weight: 700;
	height: auto;
	inset-inline-start: var(--edu-space-md);
	top: var(--edu-space-md);
	line-height: normal;
	padding: var(--edu-space-sm) var(--edu-space-md);
	text-decoration: none;
	width: auto;
	z-index: 100000;
}

/* ==========================================================================
   Mobile Core Utilities & Resets (ریسپانسیو پایه موبایل و بهینه‌سازی تاچ)
   ========================================================================== */
html,
body {
	overflow-x: clip;
	max-width: 100vw;
	width: 100%;
}

/* Disable body scroll when mobile drawer or modal is open */
body.Edu-drawer-open,
body.Edu-modal-open {
	overflow: hidden !important;
	touch-action: none;
}

/* Modern mobile tap highlight reset */
* {
	-webkit-tap-highlight-color: transparent;
}

/* Smooth momentum scrolling on iOS */
.Edu-scroll-x,
.Edu-cat-circles-scroll,
.Edu-table-responsive-wrap,
.woocommerce-orders-table,
.woocommerce-table--order-downloads {
	-webkit-overflow-scrolling: touch;
}

/* Universal Responsive Table Wrapper */
.Edu-table-responsive-wrap {
	display: block;
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin-block-end: var(--edu-space-md);
	border-radius: var(--edu-radius-md);
	border: 1px solid var(--edu-border);
}

.Edu-table-responsive-wrap table {
	width: 100%;
	min-width: 500px;
	border-collapse: collapse;
}

/* Responsive Embeds & Iframes */
.entry-content iframe,
.entry-content embed,
.entry-content object,
.entry-content video {
	max-width: 100% !important;
}

/* Mobile Typography Scaling & Input Zoom Prevention */
@media (max-width: 768px) {
	html {
		font-size: 15px;
	}

	h1 { font-size: clamp(1.4rem, 5vw, 1.85rem); }
	h2 { font-size: clamp(1.2rem, 4vw, 1.5rem); }
	h3 { font-size: clamp(1.05rem, 3.5vw, 1.3rem); }
	h4 { font-size: 1rem; }

	/* Prevent iOS/Android auto-zoom on input focus */
	input[type="text"],
	input[type="search"],
	input[type="email"],
	input[type="url"],
	input[type="password"],
	input[type="number"],
	input[type="tel"],
	select,
	textarea {
		font-size: 16px !important;
	}
}

@media (max-width: 480px) {
	html {
		font-size: 14.5px;
	}
}
