/* ============================================
   دار وردة للنشر والتوزيع - Main Stylesheet
   ============================================ */

:root {
	--ward-navy: #101a4a;
	--ward-navy-dark: #0a1030;
	--ward-navy-light: #1b2a6b;
	--ward-gold: #c9a24b;
	--ward-gold-light: #e0c07a;
	--ward-text: #2b2f45;
	--ward-text-light: #6b7089;
	--ward-bg-light: #f7f7fb;
	--ward-white: #ffffff;
	--ward-radius: 14px;
	--ward-font: 'Cairo', 'Tajawal', sans-serif;
}

* { box-sizing: border-box; }

body {
	font-family: var(--ward-font);
	color: var(--ward-text);
	background: var(--ward-white);
	margin: 0;
}

/* الاتجاه الافتراضي للعربي؛ الإنجليزية عبر ltr.css + html[dir=ltr] */
html[dir="rtl"] body,
body.rtl,
body.ward-rtl {
	direction: rtl;
}

html[dir="ltr"] body,
body.ltr,
body.ward-ltr {
	direction: ltr;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5 { font-family: var(--ward-font); font-weight: 800; margin: 0; }

.ward-container {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 24px;
}

/* أسعار ووكمرس: صندوق رقم + عملة — الترتيب من الـ HTML (عربي: عملة ثم رقم) */
.woocommerce-Price-amount.amount.ward-price-box {
	display: inline-flex !important;
	flex-direction: row !important;
	align-items: baseline !important;
	gap: 0.35em !important;
	direction: ltr !important;
	unicode-bidi: isolate !important;
	white-space: nowrap !important;
}
.woocommerce-Price-amount.amount.ward-price-box .ward-price-num,
.woocommerce-Price-amount.amount.ward-price-box .ward-price-cur {
	display: inline-block !important;
	unicode-bidi: isolate !important;
}

/* ===== Buttons ===== */
.ward-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 13px 28px;
	border-radius: 8px;
	font-weight: 700;
	font-size: 15px;
	transition: all .25s ease;
	white-space: nowrap;
}
.ward-btn-gold { background: var(--ward-gold); color: var(--ward-navy); }
.ward-btn-gold:hover { background: var(--ward-gold-light); }
.ward-btn-gold-outline { border: 2px solid var(--ward-gold); color: var(--ward-navy); background: transparent; }
.ward-btn-gold-outline:hover { background: var(--ward-gold); }
.ward-btn-gold-sm { background: var(--ward-gold); color: var(--ward-navy); padding: 9px 18px; font-size: 13px; border-radius: 6px; }
.ward-btn-outline { border: 2px solid rgba(255,255,255,.5); color: #fff; background: transparent; }
.ward-btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.ward-btn-navy { background: var(--ward-navy); color: #fff; }
.ward-btn-navy:hover { background: var(--ward-navy-light); }
.ward-btn-navy-sm { background: var(--ward-navy); color: #fff; padding: 9px 18px; font-size: 13px; border-radius: 6px; width: 100%; text-align: center; }
.ward-btn-navy-sm:hover { background: var(--ward-navy-light); }

/* ===== Section heads ===== */
.ward-section-head { text-align: center; margin-bottom: 40px; }
.ward-section-head-start { text-align: start; margin-bottom: 30px; }
.ward-section-head-light .ward-eyebrow,
.ward-eyebrow-gold { color: var(--ward-gold); }
.ward-eyebrow {
	display: inline-block;
	color: var(--ward-navy);
	font-weight: 700;
	font-size: 14px;
	margin-bottom: 8px;
}
.ward-section-title { font-size: 34px; color: var(--ward-navy); }
.ward-section-title-light { color: #fff; }
.ward-section-title-center { text-align: center; margin-bottom: 40px; }

/* ===== Top bar ===== */
.ward-topbar { background: var(--ward-navy-dark); color: #cfd3ea; font-size: 13px; padding: 8px 0; }
.ward-topbar-inner { display: flex; align-items: center; justify-content: space-between; }
.ward-social-icons { display: flex; gap: 10px; }
.ward-social-icon {
	width: 26px; height: 26px; border-radius: 50%;
	background: rgba(255,255,255,.08);
	display: inline-flex; align-items: center; justify-content: center;
	transition: background .2s ease;
}
.ward-social-icon:hover { background: var(--ward-gold); }

/* ===== Header ===== */
.site-header {
	background: #fff;
	box-shadow: 0 2px 12px rgba(16,26,74,.06);
	position: relative;
	z-index: 999;
}
.ward-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 24px; }
.site-branding img { max-height: 56px; }
.site-title-fallback { font-weight: 800; font-size: 20px; color: var(--ward-navy); }
.primary-menu { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; }
.primary-menu > li { display: flex; align-items: center; margin: 0; padding: 0; line-height: 1; }
.primary-menu > li > a {
	font-weight: 600;
	color: var(--ward-navy);
	font-size: 15px;
	padding: 8px 0;
	line-height: 1.2;
	display: inline-flex;
	align-items: center;
	transition: color .2s ease;
}
.primary-menu > li > a:hover { color: var(--ward-gold); }

/* WPML language switcher — محاذاة رأسية مع باقي عناصر المنيو */
.primary-menu > li.wpml-ls-item,
.primary-menu > li.menu-item-object-wpml_ls_menu_item {
	align-self: center;
}
.primary-menu > li.wpml-ls-item > a,
.primary-menu > li.menu-item-object-wpml_ls_menu_item > a {
	padding: 8px 0;
	line-height: 1.2;
	display: inline-flex;
	align-items: center;
}
.primary-menu .wpml-ls-native,
.primary-menu .wpml-ls-display,
.primary-menu .wpml-ls-flag,
.primary-menu .wpml-ls-link {
	display: inline-flex;
	align-items: center;
	line-height: 1.2;
	vertical-align: middle;
	margin: 0;
	padding: 0;
	position: static;
	top: auto;
	transform: none;
}
.ward-header-actions { display: flex; align-items: center; gap: 16px; }
.ward-account-link { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ward-navy); font-size: 14px; }
.ward-search-toggle { background: none; border: none; cursor: pointer; color: var(--ward-navy); }

/* ===== Mobile hamburger — مقابل اللوجو (شمال في RTL / يمين في LTR) ===== */
.ward-mobile-toggle {
	display: none;
	position: relative;
	z-index: 2;
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	padding: 0;
	border: none;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	cursor: pointer;
	align-items: center;
	justify-content: center;
	transition: transform .25s ease, opacity .2s ease;
}
.ward-mobile-toggle:hover {
	background: transparent;
	opacity: .85;
}
.ward-mobile-toggle:active {
	transform: scale(.96);
}
.ward-burger {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 20px;
	height: 14px;
}
.ward-burger-line {
	display: block;
	width: 100%;
	height: 2px;
	border-radius: 2px;
	background: var(--ward-navy);
	transform-origin: center;
	transition: transform .35s cubic-bezier(.22, 1, .36, 1), opacity .25s ease, width .35s ease;
}
.ward-burger-line:nth-child(2) {
	width: 70%;
	align-self: flex-end;
}
.ward-mobile-toggle.is-open .ward-burger-line:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}
.ward-mobile-toggle.is-open .ward-burger-line:nth-child(2) {
	opacity: 0;
	transform: scaleX(0);
}
.ward-mobile-toggle.is-open .ward-burger-line:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
	width: 100%;
}

/* ===== Mobile sidebar drawer ===== */
.ward-mobile-overlay {
	position: fixed;
	inset: 0;
	z-index: 10040;
	background: rgba(6, 10, 32, .55);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .35s ease, visibility .35s ease;
}
.ward-mobile-overlay.is-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.ward-mobile-drawer {
	position: fixed;
	top: 0;
	bottom: 0;
	/* عربي: يفتح من الشمال (ناحية زر الهمبرجر) */
	left: 0;
	right: auto;
	z-index: 10050;
	width: min(86vw, 360px);
	max-width: 360px;
	background: linear-gradient(165deg, #0c1440 0%, #091037 48%, #070d2a 100%);
	color: #fff;
	box-shadow: 18px 0 48px rgba(0, 0, 0, .28);
	transform: translate3d(-105%, 0, 0);
	visibility: hidden;
	pointer-events: none;
	transition: transform .42s cubic-bezier(.22, 1, .36, 1), visibility .42s;
	will-change: transform;
}
.ward-mobile-drawer.is-open {
	transform: translate3d(0, 0, 0);
	visibility: visible;
	pointer-events: auto;
}
.ward-mobile-drawer-inner {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 20px 22px 28px;
	box-sizing: border-box;
}
.ward-mobile-drawer-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-bottom: 18px;
	border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.ward-mobile-drawer-brand img {
	max-height: 44px;
	width: auto;
}
.ward-mobile-drawer-brand .site-title-fallback {
	color: #fff;
	font-size: 18px;
}
.ward-mobile-close {
	position: relative;
	width: 42px;
	height: 42px;
	flex-shrink: 0;
	border: 1px solid rgba(255, 255, 255, .14);
	border-radius: 12px;
	background: rgba(255, 255, 255, .06);
	cursor: pointer;
	transition: background .2s ease, border-color .2s ease;
}
.ward-mobile-close:hover {
	background: rgba(201, 162, 75, .18);
	border-color: rgba(201, 162, 75, .5);
}
.ward-mobile-close span {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 16px;
	height: 2px;
	border-radius: 2px;
	background: #fff;
}
.ward-mobile-close span:first-child {
	transform: translate(-50%, -50%) rotate(45deg);
}
.ward-mobile-close span:last-child {
	transform: translate(-50%, -50%) rotate(-45deg);
}

.ward-mobile-nav {
	flex: 1;
	overflow-y: auto;
	padding: 18px 0 24px;
	-webkit-overflow-scrolling: touch;
}
.ward-mobile-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.ward-mobile-menu > li > a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 12px;
	border-radius: 12px;
	font-size: 16px;
	font-weight: 700;
	color: rgba(255, 255, 255, .92);
	letter-spacing: .01em;
	transition: background .2s ease, color .2s ease, padding-inline-start .2s ease;
}
.ward-mobile-menu > li > a:hover,
.ward-mobile-menu > li.current-menu-item > a,
.ward-mobile-menu > li.current_page_item > a {
	background: rgba(201, 162, 75, .14);
	color: var(--ward-gold-light);
}
.ward-mobile-menu > li.wpml-ls-item > a,
.ward-mobile-menu > li.menu-item-object-wpml_ls_menu_item > a {
	font-weight: 600;
	font-size: 15px;
}

.ward-mobile-drawer-foot {
	padding-top: 18px;
	border-top: 1px solid rgba(255, 255, 255, .1);
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 14px;
}
.ward-mobile-drawer-foot .ward-social-icons {
	display: flex;
	gap: 10px;
}
.ward-mobile-drawer-tag {
	margin: 0;
	font-size: 12px;
	line-height: 1.5;
	color: rgba(255, 255, 255, .45);
}

body.ward-menu-open {
	overflow: hidden;
}
body.ward-menu-open .site-header {
	/* يخلي زر الهمبرجر (X) فوق السايدبار ويظل قابل للضغط */
	z-index: 10060;
}

.ward-search-panel { display: none; padding: 14px 0; border-top: 1px solid #eee; }
.ward-search-panel.active { display: block; }

/*
 * صفحة فيها هيرو: الهيدر فوق الهيرو (شفاف) ويتسكرول ويختفي — مش مثبت
 */
body.has-ward-hero .ward-topbar {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	background: transparent;
	border-bottom: 1px solid rgba(255, 255, 255, .12);
}
body.has-ward-hero .site-header {
	position: absolute;
	top: 36px;
	left: 0;
	right: 0;
	z-index: 1001;
	background: transparent;
	box-shadow: none;
}
body.has-ward-hero.no-ward-topbar .site-header {
	top: 0;
}

/* نصوص الهيدر فاتحة فوق الهيرو */
body.has-ward-hero .primary-menu > li > a,
body.has-ward-hero .ward-account-link,
body.has-ward-hero .ward-search-toggle,
body.has-ward-hero .ward-mobile-toggle,
body.has-ward-hero .site-title-fallback {
	color: #fff;
}
body.has-ward-hero .primary-menu > li > a:hover {
	color: var(--ward-gold);
}
body.has-ward-hero .ward-mobile-toggle {
	border: none;
	background: transparent;
}
body.has-ward-hero .ward-mobile-toggle:hover {
	background: transparent;
	opacity: .85;
}
body.has-ward-hero .ward-burger-line {
	background: #fff;
}

body.has-ward-hero .ward-search-panel {
	background: rgba(10, 16, 48, .92);
	border-top-color: rgba(255, 255, 255, .12);
}

/* ===== هيدر الصفحات الداخلية فقط ===== */
body.has-ward-page-banner .site-header {
	background: #091037;
	box-shadow: none;
}
body.has-ward-page-banner .primary-menu > li > a {
	color: #ffffff;
}
body.has-ward-page-banner .primary-menu > li > a:hover {
	color: var(--ward-gold);
}
body.has-ward-page-banner .ward-account-link,
body.has-ward-page-banner .ward-search-toggle,
body.has-ward-page-banner .ward-mobile-toggle,
body.has-ward-page-banner .site-title-fallback {
	color: #ffffff;
}
body.has-ward-page-banner .ward-mobile-toggle {
	border: none;
	background: transparent;
}
body.has-ward-page-banner .ward-mobile-toggle:hover {
	background: transparent;
	opacity: .85;
}
body.has-ward-page-banner .ward-burger-line {
	background: #ffffff;
}

body.has-ward-page-banner .ward-search-panel {
	background: #091037;
	border-top-color: rgba(255, 255, 255, .12);
}

/* ===== Footer ===== */
.site-footer {
	position: relative;
	background: #0a1030;
	color: #cfd3ea;
	padding-top: 30px;
	overflow: hidden;
}
.site-footer::before {
	content: '';
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 85% 40%, rgba(255,255,255,.04) 0%, transparent 45%);
	pointer-events: none;
}
.site-footer > .ward-container {
	position: relative;
	z-index: 1;
}

.ward-footer-top {
	display: grid;
	grid-template-columns: 1.5fr 2fr 1.2fr;
	gap: 36px;
	padding-bottom: 10px;
}

.ward-footer-col-links {
	min-width: 0;
}

.ward-footer-menu-2col {
	display: grid !important;
	grid-template-columns: 1fr 1fr;
	column-gap: 28px;
	row-gap: 0;
	align-content: start;
}

.ward-footer-brand .custom-logo-link img,
.ward-footer-brand .site-branding img,
.ward-footer-brand img {
	max-height: 64px;
	width: auto;
}
.ward-footer-brand .site-title-fallback {
	color: #fff;
	font-size: 18px;
}
.ward-footer-brand > p,
.ward-footer-brand p {
	font-size: 14px;
	line-height: 1.9;
	margin: 16px 0 20px;
	color: #ffffff;
	max-width: 320px;
}

.ward-footer-brand .ward-social-icons {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}
.ward-footer-brand .ward-social-icon {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(255,255,255,.1);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background .2s ease, color .2s ease;
}
.ward-footer-brand .ward-social-icon:hover {
	background: var(--ward-gold);
	color: var(--ward-navy);
}

.ward-footer-col h4 {
	color: #fff;
	font-size: 16px;
	margin-bottom: 18px;
	font-weight: 800;
}
.ward-footer-col ul,
.ward-footer-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}
.ward-footer-col ul li,
.ward-footer-menu li { margin-bottom: 12px; }
.ward-footer-col ul li a,
.ward-footer-menu a {
	font-size: 14px;
	color: rgba(255,255,255,.75);
	transition: color .2s ease;
	text-decoration: none;
}
.ward-footer-col ul li a:hover,
.ward-footer-menu a:hover { color: var(--ward-gold); }

/* بيانات التواصل في عمود الفوتر */
.ward-footer-contact-list li {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-bottom: 14px;
}
.ward-footer-contact-label {
	font-size: 12px;
	font-weight: 700;
	color: var(--ward-gold);
}
.ward-footer-contact-value {
	font-size: 14px;
	color: rgba(255,255,255,.85);
	line-height: 1.6;
	text-decoration: none;
}
a.ward-footer-contact-value:hover {
	color: var(--ward-gold);
}

/* الأسفل: الكوبي رايت في المنتصف */
.ward-footer-bottom {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 22px 0 28px;
	margin-top: 8px;
	border-top: 1px solid rgba(255,255,255,.1);
	font-size: 13px;
	color: rgba(255,255,255,.55);
}
.ward-footer-copy {
	margin: 0;
	color: rgba(255,255,255,.55);
	text-align: center;
	line-height: 1.7;
}
.ward-footer-credit {
	color: rgba(255,255,255,.75);
	text-decoration: none;
	transition: color .2s ease;
}
.ward-footer-credit:hover {
	color: var(--ward-gold);
}

/* ===== Basic post layout ===== */
.ward-post-card { margin-bottom: 40px; }
.ward-post-card h2 { font-size: 22px; margin: 14px 0 8px; }
.ward-page-title { font-size: 30px; color: var(--ward-navy); margin: 30px 0; }

@media (max-width: 900px) {
	.main-navigation { display: none; }
	.ward-mobile-toggle { display: inline-flex; }
	.ward-topbar { display: none !important; }
	/* موبايل: الهيدر فوق السلايدر (مش فوقه كـ overlay) */
	body.has-ward-hero .site-header {
		position: relative;
		top: auto;
		left: auto;
		right: auto;
		background: #0a194e;
		box-shadow: none;
	}
	.ward-footer-top { grid-template-columns: 1fr 1fr; }
	.ward-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
	.ward-footer-top { grid-template-columns: 1fr; }
	.ward-footer-menu-2col { grid-template-columns: 1fr 1fr; }
}
