/* Faid — App-Like UI */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');

:root {
	--faid-navy: #0D1B2A;
	--faid-navy-2: #1B263B;
	--faid-gold: #D4AF37;
	--faid-gold-soft: #F2E8D5;
	--faid-bg: #FFFFFF;
	--faid-section: #F8FAFC;
	--faid-text: #1F2937;
	--faid-muted: #6B7280;
	--faid-border: #E5E7EB;
	--faid-radius: 20px;
	--faid-radius-sm: 16px;
	--faid-nav-h: 68px;
	--faid-max: 100%;
	--faid-font: 'IBM Plex Sans Arabic', Tahoma, sans-serif;
}

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

html {
	scroll-behavior: smooth;
}

body.faid-theme {
	margin: 0;
	font-family: var(--faid-font);
	background: var(--faid-bg);
	color: var(--faid-text);
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

body.faid-theme a {
	color: inherit;
	text-decoration: none;
}

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

button,
input {
	font-family: inherit;
}

.faid-app {
	min-height: 100vh;
	width: 100%;
	max-width: none;
	margin: 0;
	background: var(--faid-bg);
	padding-bottom: 0;
	position: relative;
	overflow-x: hidden;
	display: flex;
	flex-direction: column;
}

.faid-app > .faid-site-footer {
	margin-top: auto;
}

/* —— Top header (desktop only) —— */
.faid-top-header {
	display: none;
}

/* —— Promo banner (أسلوب التطبيقات) —— */
.faid-promo {
	padding: 8px 8px 0;
	width: 100%;
	box-sizing: border-box;
}

.faid-promo__viewport {
	overflow: hidden;
	border-radius: 18px;
	touch-action: pan-y;
}

.faid-promo__track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	gap: 0;
}

.faid-promo__track::-webkit-scrollbar {
	display: none;
}

.faid-promo__slide {
	position: relative;
	flex: 0 0 100%;
	width: 100%;
	aspect-ratio: 16 / 9;
	min-height: 180px;
	max-height: 280px;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	overflow: hidden;
	background: var(--faid-navy);
	color: #fff;
	display: block;
	text-decoration: none;
}

.faid-promo__slide--empty {
	background:
		linear-gradient(145deg, #0d1b2a 0%, #1b263b 55%, #0d1b2a 100%),
		radial-gradient(circle at 80% 20%, rgba(242, 232, 213, 0.18), transparent 45%);
	display: flex;
	align-items: flex-end;
}

.faid-promo__img {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover !important;
	object-position: center center !important;
	display: block !important;
}

.faid-promo__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		rgba(13, 27, 42, 0) 35%,
		rgba(13, 27, 42, 0.55) 70%,
		rgba(13, 27, 42, 0.88) 100%
	);
	z-index: 1;
	pointer-events: none;
}

.faid-promo__caption {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	z-index: 2;
	padding: 16px 18px 18px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	pointer-events: none;
}

.faid-promo__eyebrow {
	align-self: flex-start;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--faid-navy);
	background: var(--faid-gold);
	padding: 3px 10px;
	border-radius: 999px;
	margin-bottom: 4px;
}

.faid-promo__title {
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.faid-promo__sub {
	font-size: 0.85rem;
	opacity: 0.9;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.faid-promo__dots {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 6px;
	padding: 10px 0 0;
}

.faid-promo__dot {
	width: 7px;
	height: 7px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #d1d5db;
	cursor: pointer;
	transition: width 0.2s ease, background 0.2s ease;
}

.faid-promo__dot.is-active {
	width: 18px;
	border-radius: 999px;
	background: var(--faid-navy);
}

/* —— Search —— */
.faid-search-wrap {
	padding: 8px 8px 0;
	margin: 0;
	position: relative;
	z-index: 2;
}

.faid-search-wrap + .faid-promo {
	padding-top: 10px;
}

.faid-search {
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--faid-section);
	border: 1px solid var(--faid-border);
	border-radius: 999px;
	padding: 12px 16px;
	box-shadow: 0 8px 24px rgba(13, 27, 42, 0.06);
}

.faid-search svg {
	flex-shrink: 0;
	color: var(--faid-muted);
}

.faid-search input {
	border: 0;
	background: transparent;
	outline: none;
	width: 100%;
	font-size: 0.95rem;
	color: var(--faid-text);
}

.faid-search input::placeholder {
	color: var(--faid-muted);
}

/* —— Category chips —— */
.faid-chips {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding: 14px 8px 8px;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.faid-chips::-webkit-scrollbar {
	display: none;
}

.faid-chip {
	flex: 0 0 auto;
	padding: 8px 16px;
	border-radius: 999px;
	border: 1px solid var(--faid-border);
	background: var(--faid-section);
	color: var(--faid-muted);
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
	white-space: nowrap;
}

.faid-chip.is-active,
.faid-chip:hover {
	background: var(--faid-navy);
	border-color: var(--faid-navy);
	color: #fff;
}

/* —— Sections —— */
.faid-section {
	padding: 20px 0 8px;
}

.faid-section--alt {
	background: var(--faid-section);
	margin-top: 8px;
	padding-bottom: 20px;
}

.faid-section__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 8px 12px;
	gap: 12px;
}

.faid-section__title {
	margin: 0;
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--faid-navy);
}

.faid-section__more {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--faid-muted);
}

.faid-section__more:hover {
	color: var(--faid-navy);
}

.faid-rail {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	padding: 4px 8px 12px;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	scroll-snap-type: x mandatory;
}

.faid-rail::-webkit-scrollbar {
	display: none;
}

.faid-rail > * {
	scroll-snap-align: start;
	flex: 0 0 auto;
}

/* —— Course card —— */
.faid-course-card {
	width: 168px;
	background: var(--faid-bg);
	border: 1px solid var(--faid-border);
	border-radius: var(--faid-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.2s ease;
	position: relative;
}

.faid-course-card:active {
	transform: scale(0.98);
}

.faid-course-card__media {
	position: relative;
	height: 160px;
	aspect-ratio: unset;
	background: var(--faid-navy);
	overflow: visible;
	border-radius: var(--faid-radius) var(--faid-radius) 0 0;
	flex-shrink: 0;
}

.faid-course-card__media-link {
	display: block;
	width: 100%;
	height: 100%;
	overflow: hidden;
	border-radius: var(--faid-radius) var(--faid-radius) 0 0;
}

.faid-course-card__media img {
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center;
}

.faid-course-card__wish {
	position: absolute;
	top: 8px;
	inset-inline-start: 8px;
	z-index: 5;
}

.faid-course-card__body {
	padding: 12px 12px 14px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}

/* Wishlist / المفضلة */
.faid-wishlist-btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.95) !important;
	color: var(--faid-navy) !important;
	box-shadow: 0 4px 12px rgba(13, 27, 42, 0.18);
	border: 0;
	cursor: pointer;
	position: relative;
	z-index: 6;
	padding: 0;
	appearance: none;
	-webkit-appearance: none;
}

.faid-wishlist-btn.is-loading {
	opacity: 0.65;
	pointer-events: none;
}

.faid-wishlist-btn:hover,
.faid-wishlist-btn.is-active {
	background: var(--faid-gold) !important;
	color: var(--faid-navy) !important;
}

/* أيقونة Tutor تبقى للـ JS، والعرض عبر SVG واضح دائماً */
.faid-wishlist-btn i {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
}

.faid-wishlist-btn__fallback {
	display: block;
	width: 18px;
	height: 18px;
}

.faid-wishlist-btn.is-active .faid-wishlist-btn__fallback,
.faid-wishlist-btn:has(.tutor-icon-bookmark-bold) .faid-wishlist-btn__fallback {
	fill: currentColor;
}

.faid-single-hero {
	position: relative;
}

.faid-single-hero__wish {
	position: absolute;
	top: 12px;
	inset-inline-start: 12px;
	z-index: 6;
}

.faid-single-title-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

.faid-single-title-row h1 {
	margin: 0;
	flex: 1;
}

.faid-single-title-row__wish .faid-wishlist-btn {
	background: var(--faid-section) !important;
	border: 1px solid var(--faid-border);
	box-shadow: none;
}

@media (max-width: 767px) {
	.faid-single-title-row__wish {
		display: none;
	}
}

@media (min-width: 768px) {
	.faid-single-hero__wish {
		display: none;
	}
}

.faid-course-card__title {
	margin: 0;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.35;
	color: var(--faid-text);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.5em;
}

.faid-course-card__instructor {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.faid-course-card__avatar {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	object-fit: cover;
	background: var(--faid-navy-2);
	flex-shrink: 0;
}

.faid-course-card__instructor span {
	font-size: 0.75rem;
	color: var(--faid-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.faid-course-card__price {
	margin-top: auto;
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--faid-gold);
}

/* Grid cards (catalog) */
.faid-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	padding: 8px 8px 24px;
}

.faid-grid .faid-course-card {
	width: 100%;
}

/* —— Instructors —— */
.faid-instructor {
	width: 88px;
	text-align: center;
}

.faid-instructor__avatar {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	object-fit: cover;
	margin: 0 auto 8px;
	background: var(--faid-navy-2);
	border: 3px solid var(--faid-gold-soft);
}

.faid-instructor__name {
	margin: 0;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--faid-text);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.faid-instructor-card {
	background: var(--faid-bg);
	border: 1px solid var(--faid-border);
	border-radius: var(--faid-radius);
	padding: 20px 16px;
	text-align: center;
	display: block;
	transition: transform 0.15s ease, border-color 0.15s ease;
}

.faid-instructor-card:active {
	transform: scale(0.98);
}

a.faid-instructor-card:hover {
	border-color: var(--faid-navy-2);
}

.faid-instructor-card__avatar {
	width: 88px;
	height: 88px;
	border-radius: 50%;
	object-fit: cover;
	margin: 0 auto 12px;
	background: var(--faid-navy-2);
	border: 3px solid var(--faid-gold-soft);
}

.faid-instructor-card__name {
	margin: 0 0 4px;
	font-size: 1rem;
	font-weight: 700;
	color: var(--faid-navy);
}

.faid-instructor-card__meta {
	margin: 0;
	font-size: 0.8rem;
	color: var(--faid-muted);
}

.faid-instructors-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	padding: 8px 8px 24px;
}

/* —— Categories —— */
.faid-categories-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	padding: 8px 8px 16px;
}

.faid-category-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	padding: 18px 16px;
	background: var(--faid-section);
	border: 1px solid var(--faid-border);
	border-radius: var(--faid-radius);
	min-height: 120px;
	transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.faid-category-card:active {
	transform: scale(0.98);
}

.faid-category-card__icon {
	width: 44px;
	height: 44px;
	border-radius: 14px;
	background: var(--faid-navy);
	color: var(--faid-gold-soft);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.faid-category-card__name {
	font-size: 1rem;
	font-weight: 700;
	color: var(--faid-navy);
	line-height: 1.3;
}

.faid-category-card__meta {
	font-size: 0.8rem;
	color: var(--faid-muted);
	margin-top: auto;
}

/* —— Buttons —— */
.faid-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: 0;
	cursor: pointer;
	font-weight: 700;
	font-size: 0.95rem;
	border-radius: 999px;
	padding: 14px 24px;
	transition: transform 0.15s, opacity 0.15s;
}

.faid-btn:active {
	transform: scale(0.98);
}

.faid-btn--gold {
	background: var(--faid-gold);
	color: var(--faid-navy);
}

.faid-btn--navy {
	background: var(--faid-navy);
	color: #fff;
}

.faid-btn--ghost {
	background: var(--faid-section);
	color: var(--faid-navy);
	border: 1px solid var(--faid-border);
}

.faid-btn--whatsapp {
	background: #128C7E;
	color: #fff !important;
	gap: 8px;
}

.faid-btn--whatsapp:hover {
	opacity: 0.94;
}

/* واتساب تحت زر اشتري الآن (Tutor) */
.faid-wa-join-btn {
	background: #25d366 !important;
	border-color: #25d366 !important;
	color: #fff !important;
}

.faid-wa-join-btn:hover {
	opacity: 0.94;
	color: #fff !important;
}

.faid-btn--block {
	width: 100%;
}

/* —— Page chrome —— */
.faid-page-head {
	padding: 16px 8px 8px;
}

.faid-page-head h1 {
	margin: 0;
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--faid-navy);
}

.faid-page-head p {
	margin: 6px 0 0;
	color: var(--faid-muted);
	font-size: 0.9rem;
}

.faid-empty {
	padding: 40px 24px;
	text-align: center;
	color: var(--faid-muted);
}

/* —— Single course —— */
.faid-single-hero {
	width: 100%;
	aspect-ratio: 16 / 10;
	background: var(--faid-navy);
	overflow: hidden;
	position: relative;
}

.faid-single-hero img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.faid-single-body {
	padding: 20px 16px 150px;
}

.faid-single-body h1 {
	margin: 0 0 12px;
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--faid-navy);
	line-height: 1.35;
}

.faid-single-body .faid-single-title-row h1 {
	margin: 0;
}

.faid-single-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
	width: fit-content;
}

a.faid-single-meta:hover span {
	color: var(--faid-navy);
	text-decoration: underline;
}

.faid-single-meta img {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	background: var(--faid-navy-2);
}

.faid-single-meta span {
	font-size: 0.9rem;
	color: var(--faid-muted);
}

.faid-single-price {
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--faid-gold);
	margin-bottom: 16px;
}

.faid-single-content {
	color: var(--faid-text);
	font-size: 0.95rem;
}

.faid-single-content p {
	margin: 0 0 12px;
}

.faid-buybar {
	position: fixed;
	bottom: var(--faid-nav-h);
	left: 0;
	right: 0;
	transform: none;
	width: 100%;
	max-width: none;
	padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0));
	background: linear-gradient(180deg, transparent, var(--faid-bg) 28%);
	z-index: 40;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* —— Account —— */
.faid-account-card {
	margin: 0 16px 12px;
	padding: 16px;
	background: var(--faid-section);
	border-radius: var(--faid-radius-sm);
	border: 1px solid var(--faid-border);
	display: flex;
	gap: 12px;
	align-items: center;
}

.faid-account-card img {
	width: 64px;
	height: 64px;
	border-radius: var(--faid-radius-sm);
	object-fit: cover;
	background: var(--faid-navy);
	flex-shrink: 0;
}

.faid-account-card h3 {
	margin: 0 0 4px;
	font-size: 0.95rem;
	font-weight: 600;
}

.faid-account-card p {
	margin: 0;
	font-size: 0.8rem;
	color: var(--faid-muted);
}

.faid-login-box {
	margin: 24px 16px;
	padding: 28px 20px;
	background: var(--faid-section);
	border-radius: var(--faid-radius);
	text-align: center;
}

.faid-login-box h2 {
	margin: 0 0 8px;
	color: var(--faid-navy);
}

.faid-login-box p {
	margin: 0 0 20px;
	color: var(--faid-muted);
	font-size: 0.9rem;
}

/* —— Site footer —— */
.faid-site-footer {
	background: var(--faid-navy);
	color: rgba(255, 255, 255, 0.72);
	margin-top: 28px;
	margin-bottom: 0;
	margin-inline: 0;
	/* مساحة شريط التنقل السفلي داخل لون الفوتر — بدون هامش أبيض */
	padding: 36px 20px calc(28px + var(--faid-nav-h) + env(safe-area-inset-bottom, 0px));
	width: 100%;
	max-width: none;
	box-sizing: border-box;
}

.faid-site-footer__inner {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.faid-site-footer__logo {
	display: inline-flex;
	align-items: center;
	margin-bottom: 12px;
}

.faid-site-footer__logo .faid-logo-img {
	height: 36px;
	width: auto;
	filter: brightness(1.08);
}

.faid-site-footer__logo .faid-logo-text {
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--faid-gold-soft);
}

.faid-site-footer__tagline {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.7);
	max-width: 36ch;
}

.faid-site-footer__cols {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.faid-site-footer__heading {
	margin: 0 0 14px;
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--faid-gold-soft);
}

.faid-site-footer__links {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.faid-site-footer__links a {
	display: block;
	padding: 12px 0;
	font-size: 0.95rem;
	color: rgba(255, 255, 255, 0.78);
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.faid-site-footer__links a:last-child {
	border-bottom: 0;
}

.faid-site-footer__links a:hover {
	color: #fff;
}

.faid-site-footer__cta {
	margin-top: 10px !important;
	padding: 14px 18px !important;
	border-radius: 999px;
	border-bottom: 0 !important;
	background: var(--faid-gold);
	color: var(--faid-navy) !important;
	font-weight: 700;
	text-align: center;
}

.faid-site-footer__cta:hover {
	opacity: 0.92;
	color: var(--faid-navy) !important;
}

.faid-site-footer__contact {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.faid-site-footer__contact a {
	color: rgba(255, 255, 255, 0.85);
	word-break: break-word;
}

.faid-site-footer__contact a:hover {
	color: #fff;
}

.faid-site-footer__label {
	display: block;
	font-size: 0.75rem;
	color: var(--faid-gold-soft);
	margin-bottom: 4px;
	font-weight: 600;
}

.faid-site-footer__copy {
	margin: 0;
	padding-top: 8px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	font-size: 0.8rem;
	color: rgba(255, 255, 255, 0.55);
	text-align: center;
}

/* —— Bottom nav —— */
.faid-bottom-nav {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	transform: none;
	width: 100%;
	max-width: none;
	height: var(--faid-nav-h);
	background: var(--faid-bg);
	border-top: 1px solid var(--faid-border);
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	z-index: 50;
	padding-bottom: env(safe-area-inset-bottom, 0);
}

.faid-bottom-nav a {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	font-size: 0.7rem;
	font-weight: 500;
	color: var(--faid-muted);
	padding: 8px 4px;
}

.faid-bottom-nav a svg {
	width: 22px;
	height: 22px;
}

.faid-bottom-nav a.is-active {
	color: var(--faid-navy);
	font-weight: 700;
}

.faid-bottom-nav a.is-active svg {
	stroke-width: 2.25;
}

/* —— Motion —— */
@keyframes faid-fade-up {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.faid-promo,
.faid-search-wrap,
.faid-chips,
.faid-section {
	animation: faid-fade-up 0.45s ease both;
}

.faid-search-wrap { animation-delay: 0.05s; }
.faid-chips { animation-delay: 0.1s; }
.faid-section:nth-of-type(1) { animation-delay: 0.15s; }
.faid-section:nth-of-type(2) { animation-delay: 0.2s; }
.faid-section:nth-of-type(3) { animation-delay: 0.25s; }

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}
}

/* ========== Desktop ≥ 768px ========== */
@media (min-width: 768px) {
	:root {
		--faid-max: 100%;
		--faid-content: 1120px;
		--faid-header-h: 68px;
	}

	body.faid-theme {
		background: var(--faid-bg);
	}

	.faid-app {
		max-width: none;
		width: 100%;
		margin: 0;
		padding-bottom: 0;
		box-shadow: none;
		border: 0;
	}

	/* Top header */
	.faid-top-header {
		display: block;
		position: sticky;
		top: 0;
		z-index: 60;
		background: var(--faid-navy);
		color: #fff;
		border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	}

	.faid-top-header__inner {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 16px;
		padding: 0 24px;
		min-height: var(--faid-header-h);
		max-width: var(--faid-content);
		margin: 0 auto;
		width: 100%;
	}

	.faid-top-header__brand {
		display: flex;
		align-items: center;
		flex-shrink: 0;
	}

	.faid-top-header__brand .faid-logo-img {
		height: 34px;
		width: auto;
		filter: brightness(1.08);
	}

	.faid-top-header__brand .faid-logo-text {
		font-size: 1.25rem;
		font-weight: 700;
		color: #fff;
	}

	.faid-top-header__search {
		display: flex;
		align-items: center;
		gap: 10px;
		flex: 1 1 auto;
		min-width: 180px;
		max-width: 420px;
		margin-inline: 8px auto;
		background: rgba(255, 255, 255, 0.1);
		border: 1px solid rgba(255, 255, 255, 0.14);
		border-radius: 999px;
		padding: 9px 16px;
		color: rgba(255, 255, 255, 0.75);
	}

	.faid-top-header__search:focus-within {
		background: rgba(255, 255, 255, 0.16);
		border-color: rgba(242, 232, 213, 0.45);
	}

	.faid-top-header__search input {
		border: 0;
		outline: none;
		background: transparent;
		width: 100%;
		color: #fff;
		font-size: 0.9rem;
	}

	.faid-top-header__search input::placeholder {
		color: rgba(255, 255, 255, 0.55);
	}

	.faid-top-header__nav {
		display: flex;
		align-items: center;
		gap: 4px;
		flex-shrink: 0;
	}

	/* البحث داخل الصفحة يبقى للموبايل فقط */
	.faid-search-wrap {
		display: none;
	}

	.faid-top-header__nav a {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		padding: 8px 14px;
		border-radius: 999px;
		font-size: 0.9rem;
		font-weight: 500;
		color: rgba(255, 255, 255, 0.78);
		transition: background 0.2s, color 0.2s;
	}

	.faid-top-header__nav a svg {
		width: 18px;
		height: 18px;
		flex-shrink: 0;
	}

	.faid-top-header__nav a:hover,
	.faid-top-header__nav a.is-active {
		background: rgba(255, 255, 255, 0.1);
		color: #fff;
	}

	.faid-bottom-nav {
		display: none;
	}

	/* Promo banner — desktop */
	.faid-promo {
		max-width: var(--faid-content);
		margin: 0 auto;
		padding: 16px 16px 0;
	}

	.faid-promo__viewport {
		border-radius: 20px;
	}

	.faid-promo__slide {
		aspect-ratio: 21 / 9;
		min-height: 260px;
		max-height: 380px;
	}

	.faid-promo__title {
		font-size: 1.6rem;
		max-width: 24ch;
	}

	.faid-promo__sub {
		font-size: 1rem;
	}

	.faid-promo__caption {
		padding: 28px 32px 32px;
	}

	.faid-chips {
		padding: 18px 16px 10px;
		max-width: var(--faid-content);
		margin-inline: auto;
		width: 100%;
		box-sizing: border-box;
	}

	.faid-section {
		max-width: var(--faid-content);
		margin-inline: auto;
		width: 100%;
	}

	.faid-section--alt {
		max-width: none;
		padding-inline: 0;
	}

	.faid-section--alt .faid-section__head,
	.faid-section--alt .faid-rail {
		max-width: var(--faid-content);
		margin-inline: auto;
		width: 100%;
		box-sizing: border-box;
	}

	.faid-section__head {
		padding: 0 28px 16px;
	}

	.faid-section__title {
		font-size: 1.25rem;
	}

	/* Rails → static grids */
	.faid-rail {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 16px;
		overflow: visible;
		padding: 4px 28px 16px;
		scroll-snap-type: none;
	}

	.faid-rail > * {
		width: 100%;
		min-width: 0;
	}

	.faid-rail .faid-course-card {
		width: 100%;
	}

	.faid-rail .faid-instructor {
		width: 100%;
	}

	.faid-rail .faid-instructor__avatar {
		width: 88px;
		height: 88px;
	}

	.faid-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 16px;
		padding: 8px 28px 32px;
		max-width: var(--faid-content);
		margin-inline: auto;
		width: 100%;
		box-sizing: border-box;
	}

	.faid-instructors-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 16px;
		padding: 8px 28px 32px;
		max-width: var(--faid-content);
		margin-inline: auto;
		width: 100%;
		box-sizing: border-box;
	}

	.faid-categories-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 16px;
		padding: 8px 28px 24px;
		max-width: var(--faid-content);
		margin-inline: auto;
		width: 100%;
		box-sizing: border-box;
	}

	.faid-page-head {
		padding: 28px 28px 12px;
		max-width: var(--faid-content);
		margin-inline: auto;
		width: 100%;
		box-sizing: border-box;
	}

	.faid-page-head h1 {
		font-size: 1.6rem;
	}

	/* Single course CTA — normal width */
	.faid-single-hero {
		aspect-ratio: 21 / 9;
		max-height: 360px;
	}

	.faid-single {
		max-width: var(--faid-content);
		margin-inline: auto;
	}

	.faid-single-body {
		padding: 28px 40px 48px;
		max-width: 720px;
	}

	.faid-buybar {
		position: static;
		transform: none;
		left: auto;
		bottom: auto;
		width: auto;
		max-width: 420px;
		padding: 20px 0 0;
		background: none;
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		gap: 10px;
	}

	.faid-buybar .faid-btn--block {
		width: auto;
		min-width: 160px;
		padding: 12px 28px;
		flex: 1 1 auto;
	}

	.faid-account-card {
		margin: 0 28px 12px;
	}

	.faid-login-box {
		margin: 28px;
		max-width: 420px;
	}

	/* Footer — desktop columns */
	.faid-site-footer {
		margin-top: 48px;
		margin-bottom: 0;
		padding: 48px 32px 32px;
		width: 100%;
	}

	.faid-site-footer__inner {
		max-width: var(--faid-content);
		margin: 0 auto;
		display: grid;
		grid-template-columns: 1.2fr 1.4fr;
		grid-template-areas:
			'brand cols'
			'copy copy';
		gap: 32px 48px;
		align-items: start;
	}

	.faid-site-footer__brand {
		grid-area: brand;
	}

	.faid-site-footer__cols {
		grid-area: cols;
		flex-direction: row;
		gap: 48px;
	}

	.faid-site-footer__col {
		flex: 1;
		min-width: 0;
	}

	.faid-site-footer__links {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		gap: 8px 20px;
	}

	.faid-site-footer__links a {
		padding: 6px 0;
		border-bottom: 0;
	}

	.faid-site-footer__cta {
		margin-top: 0 !important;
		padding: 10px 18px !important;
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	.faid-site-footer__contact {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 24px 36px;
	}

	.faid-site-footer__copy {
		grid-area: copy;
		text-align: start;
		padding-top: 24px;
	}
}

@media (min-width: 1100px) {
	:root {
		--faid-content: 1280px;
	}

	.faid-rail {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.faid-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.faid-instructors-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.faid-categories-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.faid-promo__slide {
		min-height: 300px;
		max-height: 420px;
	}

	.faid-theme .faid-course-card__media {
		height: 180px;
	}
}

/*
 * صور كروت الدورات — ارتفاع ثابت بكل الصفحات.
 * يتجاوز قاعدة img { height: auto } العامة وأي CSS لاحق من Tutor.
 */
.faid-theme .faid-course-card__media {
	height: 160px !important;
	max-height: 160px !important;
	aspect-ratio: unset !important;
	overflow: visible !important;
}

.faid-theme .faid-course-card__media-link {
	overflow: hidden !important;
}

.faid-theme .tutor-course-card .tutor-course-thumbnail,
.faid-theme .tutor-course-card .tutor-ratio {
	height: 160px !important;
	max-height: 160px !important;
	aspect-ratio: unset !important;
	overflow: hidden !important;
}

/* إظهار مفضلة Tutor إن وُجدت على كروته */
.faid-theme .tutor-course-bookmark {
	position: absolute !important;
	top: 8px !important;
	inset-inline-start: 8px !important;
	z-index: 8 !important;
	opacity: 1 !important;
	visibility: visible !important;
}

.faid-theme .faid-course-card__media > img,
.faid-theme .tutor-course-card .tutor-course-thumbnail img,
.faid-theme .tutor-course-card .tutor-ratio img,
.faid-theme .tutor-card.tutor-course-card img.tutor-card-image,
.faid-theme .tutor-course-thumbnail img {
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	object-fit: cover !important;
	object-position: center !important;
	display: block !important;
}

/* استثناء الأفاتار من ارتفاع كرت الدورة الثابت */
.faid-theme .faid-course-card__avatar {
	width: 24px !important;
	height: 24px !important;
	max-height: 24px !important;
	border-radius: 50%;
	object-fit: cover !important;
}

@media (min-width: 768px) {
	.faid-theme .faid-course-card__media,
	.faid-theme .tutor-course-card .tutor-course-thumbnail,
	.faid-theme .tutor-course-card .tutor-ratio {
		height: 180px !important;
		max-height: 180px !important;
	}
}

/* ========== Tutor Checkout / Cart — responsive ========== */
.faid-commerce-wrap {
	width: 100%;
	padding: 0 16px 24px;
	box-sizing: border-box;
}

.faid-theme.faid-commerce .tutor-checkout-page,
.faid-theme.faid-commerce .tutor-cart-page {
	padding: 8px 0 24px;
	width: 100%;
	max-width: 100%;
}

.faid-theme.faid-commerce .tutor-checkout-page .tutor-container,
.faid-theme.faid-commerce .tutor-checkout-page .tutor-checkout-container,
.faid-theme.faid-commerce .tutor-cart-page .tutor-container {
	max-width: 100% !important;
	width: 100% !important;
	margin: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.faid-theme.faid-commerce .tutor-checkout-page .tutor-row {
	display: flex;
	flex-wrap: wrap;
	margin: 0 !important;
	width: 100%;
	gap: 20px;
}

.faid-theme.faid-commerce .tutor-checkout-page .tutor-col-md-6 {
	flex: 0 0 100%;
	max-width: 100%;
	width: 100%;
	padding: 0 !important;
	min-width: 0;
}

.faid-theme.faid-commerce .tutor-checkout-details,
.faid-theme.faid-commerce .tutor-checkout-details-inner,
.faid-theme.faid-commerce .tutor-checkout-billing,
.faid-theme.faid-commerce .tutor-checkout-billing-inner {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

/* إخفاء قسم عنوان الفوترة بالكامل للطالب المسجّل */
.faid-theme.faid-commerce .faid-checkout-billing-hidden {
	display: none !important;
}

.faid-theme.faid-commerce .tutor-checkout-details-inner {
	border-radius: var(--faid-radius-sm);
	background: var(--faid-section);
}

/* Billing fields: stack on narrow / mobile app shell */
.faid-theme.faid-commerce .tutor-billing-fields .tutor-row {
	display: flex;
	flex-wrap: wrap;
	margin: 0 !important;
	width: 100%;
}

.faid-theme.faid-commerce .tutor-billing-fields [class*="tutor-col-"] {
	flex: 0 0 100% !important;
	max-width: 100% !important;
	width: 100% !important;
	padding: 0 !important;
	min-width: 0;
}

.faid-theme.faid-commerce .tutor-billing-fields .tutor-form-control,
.faid-theme.faid-commerce .tutor-billing-fields select.tutor-form-control {
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box;
	height: 48px;
	border-radius: 12px !important;
	border: 1px solid var(--faid-border) !important;
	margin-bottom: 10px;
	background: var(--faid-bg);
	color: var(--faid-text);
	padding: 0 14px !important;
	line-height: 48px !important;
}

.faid-theme.faid-commerce .tutor-checkout-billing .tutor-billing-fields .tutor-col-12:not(:last-of-type) .tutor-form-control {
	border-bottom: 1px solid var(--faid-border) !important;
}

.faid-theme.faid-commerce .tutor-checkout-billing .tutor-billing-fields .tutor-form-label {
	display: block;
	margin-bottom: 6px;
	font-size: 0.8rem;
	color: var(--faid-muted);
}

.faid-theme.faid-commerce .tutor-checkout-payment-options {
	border-radius: var(--faid-radius-sm);
	overflow: hidden;
}

.faid-theme.faid-commerce .tutor-checkout-payment-item.active {
	background: var(--faid-gold-soft);
	box-shadow: 0 0 0 1px var(--faid-gold);
}

.faid-theme.faid-commerce #tutor-checkout-pay-now-button,
.faid-theme.faid-commerce .tutor-btn-primary {
	background: var(--faid-gold) !important;
	border-color: var(--faid-gold) !important;
	color: var(--faid-navy) !important;
	border-radius: 999px !important;
	font-weight: 700;
}

.faid-theme.faid-commerce .tutor-checkout-page a {
	color: var(--faid-gold);
}

@media (min-width: 768px) {
	.faid-commerce-wrap {
		max-width: var(--faid-content);
		margin: 0 auto;
		padding: 0 28px 40px;
	}

	.faid-theme.faid-commerce .tutor-checkout-page .tutor-row {
		flex-wrap: nowrap;
		align-items: flex-start;
		gap: 28px;
	}

	.faid-theme.faid-commerce .tutor-checkout-page .tutor-col-md-6 {
		flex: 1 1 0;
		max-width: 50%;
		width: 50%;
	}

	/* Name / city pairs side by side on desktop */
	.faid-theme.faid-commerce .tutor-billing-fields .tutor-row > .tutor-col-12.tutor-col-sm-6 {
		flex: 0 0 50% !important;
		max-width: 50% !important;
		width: 50% !important;
		padding-inline: 6px !important;
	}

	.faid-theme.faid-commerce .tutor-billing-fields .tutor-row > .tutor-col-12:not(.tutor-col-sm-6) {
		flex: 0 0 100% !important;
		max-width: 100% !important;
		width: 100% !important;
	}

	.faid-theme.faid-commerce .tutor-billing-fields .tutor-form-control {
		border-radius: 12px !important;
	}

	.faid-theme.faid-commerce #tutor-checkout-pay-now-button {
		width: auto !important;
		min-width: 200px;
		padding-inline: 28px;
	}
}

