/* =====================================================
   الإعدادات الأساسية
===================================================== */

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

:root {
	--main-green: #2ea97f;
	--light-green: #e8f7f2;
	--white: #ffffff;
	--dark-text: #1f2937;
	--gray-text: #6b7280;
	--yellow: #8eed91;
	--nav-height: 78px;
	--theme-bg: #f6fbf8;
	--theme-surface: #ffffff;
	--theme-surface-border: #cfe4d9;
	--theme-tab-hover: #ddf4e9;
	--theme-button: var(--main-green);
	--theme-button-hover: #35a077;
	--theme-accent: var(--main-green);
	--theme-detail: #e8f7f2;
	--theme-nav-bg: rgba(255, 255, 255, 0.97);
	--theme-nav-border: #dfe9e3;
	--theme-toggle-shadow: rgba(46,169,127,0.35);
	--theme-toggle-icon: linear-gradient(135deg, #1f9d52 0 50%, #ffffff 50% 100%);
	--theme-toggle-symbol: "🌿";
	--ui-scale: 0.94;
}

body[data-theme="alt"] {
	--theme-bg: #fff9f2;
	--theme-surface: #ffffff;
	--theme-surface-border: #ebdac8;
	--theme-tab-hover: #ffeacf;
	--theme-button: #f0a43f;
	--theme-button-hover: #d98923;
	--theme-accent: #d17d1a;
	--theme-detail: #fffdf9;
	--theme-nav-bg: #fff9f2;
	--theme-nav-border: #f0dfce;
	--theme-toggle-shadow: rgba(240,164,63,0.3);
	--theme-toggle-icon: linear-gradient(135deg, #ffbf66 0 50%, #fff7de 50% 100%);
	--theme-toggle-symbol: "☀️";
}

html {
	scroll-behavior: smooth;
	overflow-x: hidden;
}

body {
	font-family: "Cairo", sans-serif;
	line-height: 1.7;
	color: var(--dark-text);
	background: var(--theme-bg);
	direction: rtl;
	overflow-x: hidden;
	position: relative;
	width: 100%;
	padding-top: var(--nav-height);
	font-size: calc(1rem * var(--ui-scale));
}

section, div, footer, header, main {
	max-width: 100%;
}

body[data-theme="alt"] .section-title,
body[data-theme="alt"] .page3 h1,
body[data-theme="alt"] #page2 h1 {
	color: var(--theme-accent) !important;
}

body[data-theme="alt"] .card3,
body[data-theme="alt"] .cardpage2,
body[data-theme="alt"] .contact-form,
body[data-theme="alt"] details,
body[data-theme="alt"] .table-wrap {
	background: var(--theme-detail);
	border-color: var(--theme-surface-border);
}

/* =====================================================
   تأثيرات السكرول
===================================================== */

.scroll-reveal {
	opacity: 0;
	transform: translateY(50px);
	transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.scroll-reveal.active { opacity: 1; transform: translateY(0); }

.scroll-reveal-left {
	opacity: 0;
	transform: translateX(-80px);
	transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}
.scroll-reveal-left.active { opacity: 1; transform: translateX(0); }

.scroll-reveal-right {
	opacity: 0;
	transform: translateX(80px);
	transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}
.scroll-reveal-right.active { opacity: 1; transform: translateX(0); }

.scroll-reveal-scale {
	opacity: 0;
	transform: scale(0.85);
	transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.scroll-reveal-scale.active { opacity: 1; transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
	.scroll-reveal,
	.scroll-reveal-left,
	.scroll-reveal-right,
	.scroll-reveal-scale {
		opacity: 1; transform: none; transition: none;
	}
}

/* =====================================================
   الناف بار — ديسكتوب: صف واحد [لوجو | تابس | دخول]
===================================================== */

nav {
	background: var(--theme-nav-bg);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 9999;
	border-bottom: 1px solid var(--theme-nav-border);
	box-shadow: 0 4px 20px rgba(28, 56, 43, 0.10);
	width: 100%;
	height: var(--nav-height);
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	padding: 0 24px;
	gap: 12px;
}

/* ─── المفتاح: nav-row1 يذوب وأولاده يصبحوا flex items مباشرة ─── */
.nav-row1 {
	display: contents;
}

.theme-toggle {
	width: 34px;
	height: 34px;
	border-radius: 999px;
	border: 2px solid var(--theme-nav-border);
	background: transparent;
	padding: 0;
	cursor: pointer;
	position: relative;
	z-index: 2;
	pointer-events: auto;
	box-shadow: 0 3px 10px var(--theme-toggle-shadow);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	flex-shrink: 0;
}

.theme-toggle::before {
	content: "";
	position: absolute;
	inset: 3px;
	border-radius: 999px;
	background: var(--theme-toggle-icon);
}

.theme-toggle::after {
	content: var(--theme-toggle-symbol);
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	font-size: 0.82rem;
	line-height: 1;
}

.theme-toggle:hover {
	transform: translateY(-1px) scale(1.05);
	box-shadow: 0 6px 14px var(--theme-toggle-shadow);
}

/* ─── اللوجو — يمين ─── */
.nav-top {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	order: 1;
}

.nav-brand {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}

nav .nav-top img {
	height: 230px;
	width: auto;
	transition: transform 0.3s;
	flex-shrink: 0;
}

nav .nav-top img:hover { transform: scale(1.05); }

/* ─── التابس — وسط ─── */
.nav-row2 {
	order: 2;
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
}

.nav-tabs-wrapper {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.nav-tabs {
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	gap: 4px;
	padding: 6px 8px;
	border-radius: 999px;
	background: var(--theme-surface);
	border: 1px solid var(--theme-surface-border);
	flex-shrink: 0;
}

nav a {
	color: #25322c;
	padding: 8px 14px;
	border-radius: 50px;
	font-weight: 800;
	transition: 0.3s;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
	font-size: 0.88rem;
}

.nav-tabs a:hover { background: var(--theme-tab-hover); color: #1f6d52; }

.nav-tabs a.nav-section-link {
	color: #000;
	position: relative;
	padding-bottom: 12px;
}

body[data-theme="alt"] .nav-tabs a.nav-section-link {
	color: #385953;
}

body[data-theme="alt"] .nav-tabs a.nav-section-link:hover {
	color: #2f4d47;
}

body[data-theme="alt"] nav a {
	color: #34413f;
}

body[data-theme="alt"] .page1,
body[data-theme="alt"] .page2,
body[data-theme="alt"] .page3,
body[data-theme="alt"] .page4 {
	background: var(--theme-bg);
}

body[data-theme="alt"] .page1::before {
	background: #8baea9;
}

body[data-theme="alt"] .page1 h1,
body[data-theme="alt"] .hero-subtitle,
body[data-theme="alt"] .hero-points,
body[data-theme="alt"] .hero-points li::before {
	color: #4a5350;
}

body[data-theme="alt"] .miao,
body[data-theme="alt"] .card3,
body[data-theme="alt"] .cardpage2,
body[data-theme="alt"] .contact-form,
body[data-theme="alt"] .menu-l,
body[data-theme="alt"] .menu-r,
body[data-theme="alt"] form,
body[data-theme="alt"] details,
body[data-theme="alt"] table {
	background: var(--theme-detail);
	border-color: var(--theme-surface-border);
}

body[data-theme="alt"] .quote-card {
	background: #f4ece4;
	border-color: #ded0c1;
}

body[data-theme="alt"] .results-subtitle {
	color: #4c5b57;
}

body[data-theme="alt"] .testimonials-count {
	background: #efe4d9;
	border-color: #e0d0be;
	color: #5b5147;
}

body[data-theme="alt"] .badge {
	background: #e7d9cb;
	color: #37413f;
}

body[data-theme="alt"] .dot-list,
body[data-theme="alt"] details p,
body[data-theme="alt"] .menu-c p {
	color: #3f4b48;
}

.nav-tabs a.nav-section-link::after {
	content: "";
	position: absolute;
	left: 50%; bottom: 4px;
	transform: translateX(-50%);
	width: 24px; height: 3px;
	background: var(--main-green);
	border-radius: 999px;
}

#menu-link {
	background: var(--theme-button);
	color: #fff;
	box-shadow: 0 6px 16px rgba(46,169,127,0.25);
	white-space: nowrap;
	flex-shrink: 0;
}

#menu-link:hover { background: var(--theme-button-hover); }

/* ─── الدخول — يسار ─── */
.nav-auth {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
	order: 3;
}

#loginBox {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* =====================================================
   الأزرار العامة
===================================================== */

#first-f, #second-f, #toexit, #back {
	border: none;
	border-radius: 50px;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	padding: 10px 20px;
	font-family: "Cairo", sans-serif;
	transition: 0.3s;
	white-space: nowrap;
}

#first-f, #second-f, #back {
	background: var(--theme-button);
	color: white;
	box-shadow: 0 4px 15px rgba(62,180,137,0.2);
}

#first-f:hover, #second-f:hover, #back:hover {
	background: var(--theme-button-hover);
	transform: translateY(-2px);
}

#toexit {
	background: #ef4444;
	color: white;
	box-shadow: 0 4px 15px rgba(239,68,68,0.2);
}

#toexit:hover { background: #dc2626; transform: translateY(-2px); }

body[data-theme="alt"] #toexit {
	background: #b95f5f;
	box-shadow: 0 4px 15px rgba(185,95,95,0.25);
}

body[data-theme="alt"] #toexit:hover {
	background: #a94f4f;
}

#code {
	border-radius: 12px;
	border: 2px solid #e5e7eb;
	font-size: 13px;
	font-weight: 600;
	padding: 9px 12px;
	font-family: "Cairo", sans-serif;
	background: #fafafa;
	transition: 0.3s;
	width: 150px;
}

#code:focus {
	outline: none;
	border-color: var(--main-green);
	box-shadow: 0 0 0 4px rgba(62,180,127,0.1);
	background: white;
}

/* =====================================================
   الفوتر
===================================================== */

.site-footer {
	background: #000;
	padding: 24px 16px;
	text-align: center;
	color: #fff;
	font-weight: 600;
	width: 100%;
}

/* =====================================================
   الصفحة الأولى
===================================================== */

.page1 {
	background: #f5f7f6;
	min-height: calc(100vh - var(--nav-height));
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	padding: 34px 20px 60px;
	position: relative;
	width: 100%;
	overflow: hidden;
}

.page1 .nav-brand { margin-bottom: -115px; }

.page1 .nav-brand img {
	height: 680px;
	width: auto;
	margin-top: -10px;
}

.page1::before {
	content: "";
	position: absolute;
	top: 0; left: 50%;
	transform: translateX(-50%);
	width: 140%; height: 120px;
	background: var(--main-green);
	clip-path: ellipse(50% 100% at 50% 0%);
	z-index: 0;
}

.page1 h1 {
	color: #4e5a55;
	text-align: center;
	font-size: clamp(1.6rem, 3.5vw, 2.6rem);
	font-weight: 700;
	line-height: 1.5;
	position: relative;
	z-index: 1;
	margin-top: 62px;
	margin-bottom: 14px;
}

.hero-subtitle {
	color: #4e5a55;
	text-align: center;
	font-size: clamp(1rem, 1.9vw, 1.15rem);
	max-width: 720px;
	line-height: 1.9;
	position: relative;
	z-index: 1;
	margin-top: -6px;
	margin-bottom: 12px;
}

.hero-points {
	list-style: none;
	max-width: 760px;
	padding: 0; margin: 0;
	position: relative;
	z-index: 1;
	color: #4e5a55;
}

.hero-points li {
	text-align: center;
	line-height: 2;
	font-size: clamp(0.98rem, 1.8vw, 1.08rem);
}

.hero-points li::before { content: "✓ "; color: #4e5a55; font-weight: 700; }

.miao-container {
	display: flex;
	justify-content: center;
	gap: 20px;
	flex-wrap: wrap;
	position: relative;
	z-index: 1;
}

.miao {
	background: white;
	color: var(--dark-text);
	font-size: clamp(1rem, 1.8vw, 1.2rem);
	padding: 14px 35px;
	font-weight: 600;
	border-radius: 50px;
	box-shadow: 0 4px 20px rgba(0,0,0,0.08);
	cursor: pointer;
	border: 2px solid transparent;
	transition: 0.3s;
}

.miao:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 30px rgba(62,180,137,0.15);
	border-color: var(--main-green);
	color: var(--main-green);
}

/* =====================================================
   الصفحة الثانية
===================================================== */

.page2 {
	background: var(--light-green);
	min-height: 100vh;
	padding: 100px 20px;
	width: 100%;
	overflow: hidden;
}

.cardpage2 {
	background: white;
	border-radius: 1.5rem;
	box-shadow: 0 4px 20px rgba(0,0,0,0.08);
	padding: clamp(1.5rem, 3vw, 2.6rem);
	margin: 1.2rem auto;
	max-width: 1200px;
	direction: rtl;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: clamp(1rem, 2vw, 2.4rem);
	transition: 0.3s;
}

.cardspage2 .cardpage2:nth-child(even) { flex-direction: row-reverse; }

.cardpage2 img {
	width: 100%;
	max-width: 25rem;
	border-radius: 1.1rem;
	box-shadow: 0 10px 30px rgba(0,0,0,0.08);
	transition: 0.3s;
}

.cardpage2 p {
	flex: 1;
	font-size: clamp(1.1rem, 2vw, 1.4rem);
	font-weight: 500;
	line-height: 1.9;
	text-align: right;
}

.cardpage2:hover { transform: translateY(-8px); box-shadow: 0 8px 30px rgba(0,0,0,0.12); }
.cardpage2:hover img { transform: scale(1.03); }

/* =====================================================
   الصفحة الثالثة
===================================================== */

.page3 {
	background: white;
	min-height: 100vh;
	padding: 5rem 1.2rem;
	width: 100%;
	overflow: hidden;
}

.page3 > h1 {
	color: var(--dark-text);
	font-size: clamp(1.55rem, 2.6vw, 2.05rem);
	margin-bottom: 70px;
	text-align: center;
	font-weight: 800;
	position: relative;
	padding-bottom: 20px;
}

.page3 > h1::after {
	content: "";
	position: absolute;
	bottom: 0; left: 50%;
	transform: translateX(-50%);
	width: 70px; height: 4px;
	background: var(--main-green);
	border-radius: 3px;
}

.cardspage3 {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
	align-items: stretch;
	direction: rtl;
}

.card3 {
	background: linear-gradient(180deg, #ffffff 0%, #fbfefd 100%);
	border-radius: 1.15rem;
	box-shadow: 0 10px 30px rgba(17,24,39,0.09);
	padding: 1rem;
	display: flex;
	flex-direction: column;
	gap: 12px;
	border: 1px solid #d6e7df;
	position: relative;
	overflow: hidden;
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card3::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 4px;
	background: linear-gradient(90deg, #3eb489, #53d1a2);
}

.card3:hover {
	transform: translateY(-7px);
	box-shadow: 0 18px 38px rgba(20,39,32,0.16);
	border-color: #afd7c6;
}

.card3.featured { border: 2px solid var(--main-green); }

.badge {
	width: fit-content;
	background: #dff4eb;
	border-radius: 999px;
	font-size: 0.82rem;
	padding: 4px 10px;
}

.card3 h1 {
	font-size: 1.06rem;
	line-height: 1.65;
	color: var(--dark-text);
	font-weight: 800;
}

.khalawis-highlight {
	border: 2px solid #1f9d52;
	box-shadow: 0 14px 34px rgba(31,157,82,0.2);
	background: linear-gradient(180deg, #ffffff 0%, #f3fff8 100%);
}

.khalawis-highlight::before { background: linear-gradient(90deg, #1f9d52, #33c56e); }
.khalawis-highlight h1 { color: #14753b; }

.popular-badge {
	width: fit-content;
	align-self: center;
	border-radius: 999px;
	border: 3px solid #33cc33;
	background: #fff;
	color: #000;
	font-size: 0.92rem;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	box-shadow: 0 8px 18px rgba(29,111,29,0.12);
	padding: 5px 22px;
	min-height: 38px;
	margin-bottom: 4px;
}

.dot-list {
	list-style: none;
	display: grid;
	gap: 8px;
	margin-block: 8px 14px;
	flex: 1;
	color: #243b33;
	font-size: 0.95rem;
}

.dot-list li::before { content: "✓ "; color: var(--main-green); font-weight: 700; }

.card3 form { padding: 0; background: transparent; gap: 10px; }

form {
	display: flex;
	flex-direction: column;
	padding: 30px;
	gap: 15px;
	background: white;
}

.contact-input {
	width: 100%;
	padding: 0.7rem 0.9rem;
	border: 2px solid #e5e7eb;
	border-radius: 15px;
	font-size: 1rem;
	font-family: "Cairo", sans-serif;
	background: #fafafa;
	transition: 0.3s;
	resize: vertical;
	min-height: 80px;
}

.contact-input:focus {
	outline: none;
	border-color: var(--main-green);
	box-shadow: 0 0 0 4px rgba(62,180,137,0.1);
	background: white;
}

.submit {
	background: var(--theme-button);
	color: #fff;
	border: none;
	padding: 0.7rem 1.8rem;
	font-size: 1rem;
	border-radius: 50px;
	font-weight: 700;
	cursor: pointer;
	font-family: "Cairo", sans-serif;
	box-shadow: 0 4px 15px rgba(62,180,137,0.25);
	min-width: 200px;
	transition: 0.3s;
}

.submit:hover {
	background: var(--theme-button-hover);
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(62,180,137,0.25);
}

.package-name { display: none; }

/* =====================================================
   صفحة التواصل
===================================================== */

.page4 {
	background: var(--light-green);
	min-height: 100vh;
	padding: 100px 20px;
	width: 100%;
	overflow: hidden;
}

.contact-container {
	display: flex;
	justify-content: center;
	gap: 50px;
	flex-wrap: wrap;
	max-width: 1400px;
	margin: 0 auto;
}

.contact-form {
	background: white;
	padding: 60px;
	border-radius: 30px;
	box-shadow: 0 4px 20px rgba(0,0,0,0.08);
	width: 100%;
	max-width: 650px;
	direction: rtl;
	transition: 0.3s;
}

.contact-form:hover { transform: translateY(-5px); box-shadow: 0 8px 30px rgba(0,0,0,0.12); }

.contact-form h2 {
	color: var(--dark-text);
	margin-bottom: 45px;
	text-align: center;
	font-size: clamp(1.7rem, 3vw, 2.3rem);
	font-weight: 800;
	position: relative;
	padding-bottom: 20px;
}

.contact-form h2::after {
	content: "";
	position: absolute;
	bottom: 0; left: 50%;
	transform: translateX(-50%);
	width: 60px; height: 4px;
	background: var(--main-green);
	border-radius: 3px;
}

.contact-form label {
	display: block;
	margin-bottom: 25px;
	color: var(--dark-text);
	font-weight: 600;
	font-size: 1rem;
	text-align: right;
}

.contact-form input,
.contact-form textarea {
	width: 100%;
	padding: 15px 18px;
	margin-top: 10px;
	border: 2px solid #e5e7eb;
	border-radius: 15px;
	font-size: 1rem;
	font-family: "Cairo", sans-serif;
	background: #fafafa;
	transition: 0.3s;
	text-align: right;
}

.contact-form input:focus,
.contact-form textarea:focus {
	outline: none;
	border-color: var(--main-green);
	box-shadow: 0 0 0 4px rgba(62,180,137,0.1);
	background: white;
}

.contact-form textarea { resize: vertical; min-height: 140px; }
.txt { resize: vertical; min-height: 140px; }

.contact-container button {
	width: 100%;
	padding: 16px;
	margin-top: 30px;
	background: var(--theme-button);
	border: none;
	border-radius: 50px;
	color: white;
	font-size: 17px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 4px 15px rgba(62,180,137,0.25);
	font-family: "Cairo", sans-serif;
	transition: 0.3s;
}

.contact-container button:hover {
	background: var(--theme-button-hover);
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(62,180,137,0.25);
}

/* =====================================================
   قسم القائمة
===================================================== */

.menu-c { padding: 60px 20px; max-width: 1400px; margin: 0 auto; }

.menu-c p {
	font-size: clamp(1.1rem, 2vw, 1.4rem);
	font-weight: 500;
	line-height: 1.9;
	text-align: right;
}

.menu-l, .menu-r {
	background: white;
	border-radius: 30px;
	box-shadow: 0 4px 20px rgba(0,0,0,0.08);
	padding: 50px;
	margin: 40px auto;
	max-width: 1200px;
	min-height: 250px;
	direction: rtl;
	display: flex;
	align-items: center;
	gap: 50px;
	transition: 0.3s;
}

.menu-l img, .menu-r img {
	max-width: 350px;
	height: 220px;
	border-radius: 20px;
	box-shadow: 0 6px 20px rgba(0,0,0,0.08);
	object-fit: cover;
	transition: 0.3s;
}

.menu-l p, .menu-r p { flex: 1; padding: 0 20px; text-align: right; }

.menu-l:hover, .menu-r:hover { transform: translateY(-8px); box-shadow: 0 8px 30px rgba(0,0,0,0.15); }
.menu-l:hover img, .menu-r:hover img { transform: scale(1.05); }

/* =====================================================
   الحركات
===================================================== */

@keyframes slideUp {
	from { opacity: 0; transform: translateY(30px); }
	to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
	from { opacity: 0; transform: translateY(40px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   تابلت — صف واحد بأحجام أصغر
===================================================== */

@media (max-width: 1024px) {
	:root { --nav-height: 72px; }

	nav {
		padding: 0 14px;
		gap: 8px;
	}

	nav .nav-top img { height: 180px; }

	.nav-tabs {
		gap: 2px;
		padding: 5px 6px;
		overflow-x: auto;
		scrollbar-width: none;
		flex-wrap: nowrap;
	}
	.nav-tabs::-webkit-scrollbar { display: none; }

	nav a { padding: 7px 10px; font-size: 0.8rem; }

	#first-f, #second-f, #toexit, #back { padding: 8px 14px; font-size: 12px; }
	#code { width: 110px; font-size: 12px; padding: 7px 10px; }

	.cardspage3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
	.cardpage2 { padding: 40px; gap: 40px; }
	.menu-l, .menu-r { padding: 40px; }
	.page1 .nav-brand img { height: 520px; }
}

/* =====================================================
   موبايل — صفين: [لوجو | دخول] + [●تابس●]
===================================================== */

@media (max-width: 640px) {

	:root { --nav-height: 112px; }

	html, body { overflow-x: hidden; width: 100%; }

	/* ── الناف: عمود ── */
	nav {
		height: var(--nav-height);
		padding: 0;
		flex-direction: column;
		justify-content: flex-start;
		align-items: stretch;
		gap: 0;
		overflow: hidden;
	}

	/* ── إعادة ضبط display:contents للموبايل ── */
	.nav-row1 {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		padding: 6px 14px 0;
		height: 68px;
		flex-shrink: 0;
		order: unset;
	}

	.theme-toggle {
		width: 30px;
		height: 30px;
		margin-inline: 6px;
	}

	/* reset orders للموبايل */
	.nav-top  { order: unset; }
	.nav-row2 { order: unset; flex: unset; }
	.nav-auth { order: unset; }

	/* اللوجو — يمين — أكبر */
	.nav-top {
		display: flex;
		align-items: center;
	}

	nav .nav-top img {
		height: 72px;
		width: auto;
	}

	/* أزرار الدخول — يسار */
	.nav-auth {
		display: flex;
		flex-direction: row;
		align-items: center;
		gap: 4px;
	}

	#first-f {
		padding: 9px 16px;
		font-size: 12px;
		border-radius: 50px;
		background: var(--theme-button);
		color: #fff;
		font-weight: 700;
		font-family: "Cairo", sans-serif;
		border: none;
		cursor: pointer;
		box-shadow: 0 3px 12px var(--theme-toggle-shadow);
		white-space: nowrap;
		transition: 0.3s;
	}

	#first-f:hover { background: var(--theme-button-hover); }
	#second-f, #back { padding: 8px 12px; font-size: 11px; }
	#toexit { padding: 8px 12px; font-size: 11px; }
	#code { width: 95px; font-size: 11px; padding: 7px 9px; }
	#loginBox { gap: 4px; }

	/* ── صف 2: تابس داخل كبسولة تسكرول ── */
	.nav-row2 {
		display: flex;
		flex-direction: row;
		align-items: center;
		padding: 0 10px 8px;
		height: 44px;
		flex-shrink: 0;
		overflow: hidden;
	}

	/* الكبسولة الخارجية */
	.nav-tabs-wrapper {
		display: flex;
		flex-direction: row;
		align-items: center;
		width: 100%;
		overflow-x: auto;
		overflow-y: hidden;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
		background: var(--theme-surface);
		border: 1.5px solid var(--theme-surface-border);
		border-radius: 999px;
		padding: 4px 6px;
		gap: 2px;
		box-shadow: inset 0 1px 4px rgba(46,169,127,0.08);
	}
	.nav-tabs-wrapper::-webkit-scrollbar { display: none; }

	/* التابس داخل الكبسولة */
	.nav-tabs {
		display: inline-flex;
		flex-direction: row;
		align-items: center;
		flex-wrap: nowrap;
		gap: 1px;
		padding: 0;
		border-radius: 0;
		background: transparent;
		border: none;
		box-shadow: none;
		flex-shrink: 0;
		overflow: visible;
	}

	.nav-tabs a.nav-section-link {
		padding: 4px 10px;
		font-size: 11px;
		white-space: nowrap;
		border-radius: 999px;
		color: #1a3d2b;
		font-weight: 700;
		transition: 0.2s;
	}

	/* شيل الخط السفلي على موبايل */
	.nav-tabs a.nav-section-link::after { display: none; }

	.nav-tabs a.nav-section-link:hover {
		background: rgba(46,169,127,0.15);
		color: #0f5c38;
	}

	/* زر قائمة الطعام */
	#menu-link {
		font-size: 11px;
		padding: 5px 11px;
		white-space: nowrap;
		flex-shrink: 0;
		border-radius: 999px;
		background: var(--theme-button);
		color: #fff;
		margin-left: 2px;
	}

	/* ── الصفحات ── */
	.page1 {
		padding: 20px 12px 40px;
		overflow: hidden;
		min-height: calc(100vh - var(--nav-height));
	}

	.page1 .nav-brand img { height: 300px; }

	.page2, .page3, .page4 { padding: 50px 12px; overflow: hidden; }

	.miao { padding: 10px 20px; font-size: 0.9rem; }

	.cardpage2 {
		flex-direction: column;
		padding: 20px;
		margin: 12px 0;
		gap: 16px;
	}

	.cardspage2 .cardpage2:nth-child(even) { flex-direction: column; }
	.cardpage2 img { max-width: 100%; width: 100%; }

	.cardspage3 { grid-template-columns: 1fr; gap: 16px; }
	.card3 { max-width: 100%; }
	.card3:nth-child(2) { transform: none; }

	.contact-form { padding: 24px 16px; }

	.menu-l, .menu-r {
		flex-direction: column;
		padding: 20px;
		margin: 12px 0;
		gap: 14px;
	}

	.menu-l img, .menu-r img {
		width: 100%;
		max-width: 100%;
		height: auto;
		max-height: 200px;
	}

	.menu-l p, .menu-r p { padding: 0; }
}

/* موبايل صغير جداً */
@media (max-width: 380px) {
	:root { --nav-height: 108px; }
	.nav-row1 { height: 62px; padding: 5px 10px 0; }
	nav .nav-top img { height: 62px; }
	.nav-row2 { height: 44px; padding: 0 8px 8px; }
	.nav-tabs a.nav-section-link { padding: 4px 8px; font-size: 10px; }
	#first-f { padding: 7px 12px; font-size: 11px; }
	#second-f, #toexit, #back { padding: 6px 9px; font-size: 10px; }
	#code { width: 80px; font-size: 10px; }
	.page1 .nav-brand img { height: 250px; }
}

/* =====================================================
   comparison + faq + testimonials
===================================================== */

.section-title {
	color: #000;
	font-size: clamp(1.55rem, 2.6vw, 2.05rem);
	margin-bottom: 30px;
	text-align: center;
	font-weight: 800;
	position: relative;
	padding-bottom: 16px;
}

#page2 > h1 {
	font-size: clamp(1.55rem, 2.6vw, 2.05rem);
}

.section-title::after {
	content: "";
	position: absolute;
	bottom: 0; left: 50%;
	transform: translateX(-50%);
	width: 70px; height: 4px;
	background: var(--main-green);
	border-radius: 3px;
}

.table-wrap {
	width: min(1120px, 92vw);
	margin: 0 auto;
	overflow-x: auto;
	border-radius: 16px;
	box-shadow: 0 10px 24px rgba(10,31,19,0.08);
}

table { width: 100%; border-collapse: collapse; background: #fff; }

th, td { padding: 12px; border-bottom: 1px solid #ecf2ef; text-align: center; }
th:first-child, td:first-child { text-align: right; font-weight: 700; }

.faq-list {
	display: grid;
	gap: 8px;
	width: min(760px, 90vw) !important;
}

details {
	border: 1px solid #e1ece7;
	border-radius: 10px;
	background: #fff;
	padding: 9px 12px;
}

summary { cursor: pointer; font-weight: 700; font-size: 0.96rem; }
details p { margin-top: 8px; color: #4f5c56; font-size: 0.92rem; }

.testimonials-grid {
	--review-card-width: min(100%, 22rem);
	width: min(960px, 92vw);
	margin: 0 auto;
	display: flex;
	flex-wrap: nowrap;
	gap: 0.75rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	padding: 0.25rem;
}

.results-section {
	background:
		radial-gradient(circle at top left, rgba(20,148,74,0.12), transparent 46%),
		radial-gradient(circle at bottom right, rgba(89,98,232,0.12), transparent 42%),
		#fff;
	padding: 48px 0;
}

.results-subtitle {
	margin: -10px auto 18px;
	text-align: center;
	color: #446257;
	font-size: 0.95rem;
	width: min(620px, 90vw);
}

.testimonials-grid.is-compact {
	--review-card-width: min(100%, 11rem);
}

.testimonials-admin-toolbar {
	width: min(960px, 92vw);
	margin: 0 auto 16px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.6rem;
}

.add-testimonial-btn {
	border-radius: 999px;
	border: none;
	background: #14944a;
	color: #fff;
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.25rem;
	padding: 0.72rem 1rem;
	box-shadow: 0 6px 16px rgba(20, 148, 74, 0.35);
}

.testimonials-count {
	background: #eef7f1;
	color: #1f6a44;
	border: 1px solid #d8eadf;
	border-radius: 999px;
	padding: 0.45rem 0.82rem;
	font-size: 0.82rem;
	font-weight: 700;
}

.testimonials-carousel {
	width: min(1040px, 96vw);
	margin: 0 auto;
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 0.5rem;
}

.testimonials-nav {
	width: 2.25rem;
	height: 2.25rem;
	border: 1px solid #d7e8df;
	background: #fff;
	border-radius: 50%;
	cursor: pointer;
	font-size: 1.5rem;
	line-height: 1;
	color: #2f5142;
	box-shadow: 0 0.3rem 0.9rem rgba(20, 36, 28, 0.12);
}

.quote-card {
	background: linear-gradient(165deg, #ffffff, #f5faf7 78%);
	border: 1px solid #dbece3;
	border-radius: 1rem;
	padding: 1rem;
	text-align: right;
	position: relative;
	min-width: var(--review-card-width);
	scroll-snap-align: start;
	min-height: 11rem;
	box-shadow: 0 10px 22px rgba(17, 63, 39, 0.08);
}

.testimonials-grid.is-compact .quote-card {
	min-height: 11rem;
}

.quote-card h3 {
	margin: 0;
	font-size: 1rem;
}

.quote-card p {
	margin: 0;
	color: #34453e;
	line-height: 1.6;
	font-size: 0.9rem;
}

.quote-card-head {
	display: flex;
	align-items: center;
	gap: 0.62rem;
	margin-bottom: 0.42rem;
}

.quote-card-head small {
	color: #678277;
	font-size: 0.74rem;
}

.quote-card-avatar {
	width: 2.05rem;
	height: 2.05rem;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	color: #0f5f38;
	background: #ddf1e4;
	border: 1px solid #cfe7d8;
}

.quote-card-rating {
	display: inline-flex;
	gap: 0.1rem;
	color: #f5b301;
	font-size: 0.95rem;
	margin-bottom: 0.35rem;
}

.quote-card-empty {
	color: #61766c;
	font-weight: 600;
	display: grid;
	place-items: center;
}

.testimonial-menu-btn {
	position: absolute;
	top: 0.35rem;
	left: 0.35rem;
	border: none;
	background: transparent;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: #4d5f56;
}

.testimonial-menu {
	position: absolute;
	top: 32px;
	left: 8px;
	background: #fff;
	border: 1px solid #e2ede7;
	border-radius: 10px;
	padding: 6px;
	box-shadow: 0 8px 20px rgba(20, 36, 28, 0.12);
	display: flex;
	flex-direction: column;
	gap: 4px;
	z-index: 10;
}

.testimonial-menu button {
	background: transparent;
	border: none;
	text-align: right;
	padding: 6px 10px;
	border-radius: 8px;
	cursor: pointer;
	font-family: inherit;
}

.testimonial-menu button:hover {
	background: #f2f8f5;
}

.testimonial-modal {
	position: fixed;
	inset: 0;
	display: grid;
	place-items: center;
	z-index: 10000;
	padding: 1rem;
}

.testimonial-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(16, 32, 25, 0.55);
}

.testimonial-form-card {
	width: min(560px, 92vw);
	margin: 0 auto;
	background: #fff;
	border: 1px solid #e2ede7;
	border-radius: 14px;
	padding: 18px;
	display: grid;
	gap: 10px;
	position: relative;
	z-index: 1;
}

.testimonial-form-card h2 {
	margin: 0 0 6px;
	font-size: 1.15rem;
}

.testimonial-modal-subtitle {
	color: #4d6056;
	font-size: 0.86rem;
}

.testimonial-form-card input,
.testimonial-form-card textarea {
	width: 100%;
	border: 1px solid #d3e3db;
	border-radius: 10px;
	padding: 10px 12px;
	font-family: inherit;
}

.rating-selector {
	display: inline-flex;
	flex-direction: row-reverse;
	gap: 0.25rem;
	justify-content: flex-end;
}

.rating-star {
	border: none;
	background: transparent;
	font-size: 1.35rem;
	cursor: pointer;
	color: #b8c4bd;
}

.rating-star.active {
	color: #f5b301;
}

.testimonial-form-actions {
	display: flex;
	gap: 8px;
}

.testimonial-form-actions button {
	border: none;
	border-radius: 10px;
	padding: 10px 14px;
	cursor: pointer;
	font-family: inherit;
	background: #14944a;
	color: #fff;
}

.testimonial-form-actions button.ghost {
	background: #edf5f1;
	color: #355245;
}

#toast {
	position: fixed !important;
	top: 18px !important;
	right: 18px !important;
	z-index: 2147483647 !important;
	min-width: 180px !important;
	max-width: min(82vw, 300px);
	padding: 10px 12px !important;
	font-size: 0.84rem;
	border-radius: 10px !important;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
	transform: translateY(-8px);
	opacity: 0;
	transition: opacity 0.25s ease, transform 0.25s ease !important;
}
