/*
Theme Name: قالب [اسم الشركة]
Theme URI: https://example.com
Author:
Description: قالب مخصص مبني على تصميم UI/UX المعتمد — صفحة رئيسية، خدماتنا، تفاصيل خدمة، من نحن، اتصل بنا. متوافق مع الجوال، وجاهز لإضافة Polylang للغتين العربية والإنجليزية.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: shirka-theme
*/

/* ============ المتغيرات الأساسية ============ */
:root {
	--shirka-accent: #1d7a6f;
	--shirka-accent-dark: #175f57;
	--shirka-navy: oklch(21% 0.035 250);
	--shirka-navy-soft: oklch(30% 0.04 250);
	--shirka-ink: oklch(24% 0.02 250);
	--shirka-ink-soft: oklch(45% 0.02 250);
	--shirka-bg: oklch(98% 0.004 90);
	--shirka-bg-alt: oklch(96% 0.006 90);
	--shirka-border: oklch(90% 0.006 90);
	--shirka-white: #ffffff;
	--shirka-icon-bg: oklch(94% 0.03 195);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body { height: 100%; }

body {
	margin: 0;
	font-family: 'IBM Plex Sans Arabic', 'IBM Plex Sans', system-ui, sans-serif;
	background: var(--shirka-bg);
	color: var(--shirka-ink);
	line-height: 1.6;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

/* يثبّت الفوتر بأسفل الشاشة دائمًا حتى لو محتوى الصفحة قصير (مثل صفحة 404) بدل ما يطلع فراغ أبيض تحته */
.site-header,
.site-footer { flex-shrink: 0; }

.site-main { flex: 1 0 auto; }

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; }

/* ============ الأزرار ============ */
.btn { display: inline-block; padding: 13px 26px; border-radius: 9px; font-size: 14.5px; font-weight: 600; transition: opacity .2s ease, transform .15s ease; }
.btn:hover { opacity: .92; }
.btn-primary { background: var(--shirka-accent); color: #fff; }
.btn-outline { border: 1px solid oklch(40% 0.03 250); color: #fff; }
.btn-white { background: #fff; color: var(--shirka-navy-soft); font-weight: 700; }
.btn-sm { padding: 9px 20px; font-size: 13.5px; }
.btn-block { display: block; text-align: center; }

/* ============ الهيدر ============ */
.site-header { border-bottom: 1px solid var(--shirka-border); background: var(--shirka-white); position: relative; }
.header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 18px 32px; gap: 20px; }

.site-brand { grid-column: 1; justify-self: start; display: flex; align-items: center; gap: 12px; }
.site-brand img { max-height: 44px; width: auto; }
.brand-mark { width: 40px; height: 40px; border-radius: 10px; background: var(--shirka-accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; flex-shrink: 0; }
.brand-name { font-size: 19px; font-weight: 700; color: var(--shirka-ink); }

.main-nav { grid-column: 2; display: flex; justify-content: center; }
.nav-menu { display: flex; align-items: center; gap: 34px; }
.nav-menu li a { font-size: 15px; font-weight: 500; color: oklch(30% 0.02 250); }
.nav-menu li a:hover, .nav-menu li.current-menu-item a { color: var(--shirka-accent); }

.header-actions { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 16px; }

.lang-switch { display: flex; border: 1px solid var(--shirka-border); border-radius: 8px; overflow: hidden; font-size: 13px; font-weight: 600; }
.lang-switch a, .lang-switch span { padding: 7px 14px; color: oklch(45% 0.02 250); }
.lang-switch .is-active, .lang-switch a.pll-language-current { background: var(--shirka-accent); color: #fff; }
.lang-switch .lang-disabled { opacity: .45; cursor: default; }

.mobile-menu-toggle { display: none; background: none; border: none; padding: 6px; color: var(--shirka-ink); cursor: pointer; }
.mobile-nav { display: none; }

/* ============ صندوق دخول الموظفين بالهيدر ============ */
.employee-login-box { position: relative; }
.employee-login-toggle {
	background: none;
	border: 1px solid var(--shirka-border);
	border-radius: 8px;
	padding: 7px 14px;
	font-size: 13px;
	font-weight: 600;
	color: oklch(40% 0.02 250);
	cursor: pointer;
	font-family: inherit;
}
.employee-login-toggle:hover { border-color: var(--shirka-accent); color: var(--shirka-accent); }
.employee-login-dashboard-link {
	display: inline-block;
	background: none;
	border: 1px solid var(--shirka-border);
	border-radius: 8px;
	padding: 7px 14px;
	font-size: 13px;
	font-weight: 600;
	color: oklch(40% 0.02 250);
	text-decoration: none;
	font-family: inherit;
}
.employee-login-dashboard-link:hover { border-color: var(--shirka-accent); color: var(--shirka-accent); }
.employee-login-dropdown {
	display: none;
	position: absolute;
	top: calc(100% + 10px);
	inset-inline-end: 0;
	width: 220px;
	background: #fff;
	border: 1px solid var(--shirka-border);
	border-radius: 12px;
	padding: 16px;
	box-shadow: 0 12px 32px oklch(24% 0.02 250 / 0.14);
	flex-direction: column;
	gap: 10px;
	z-index: 60;
}
.employee-login-box.is-open .employee-login-dropdown { display: flex; }
.employee-login-dropdown input {
	padding: 9px 11px;
	border: 1px solid var(--shirka-border);
	border-radius: 7px;
	font-family: inherit;
	font-size: 13.5px;
}
.screen-reader-text {
	position: absolute;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px,1px,1px,1px);
	white-space: nowrap;
}

@media (max-width: 700px) {
	.employee-login-box { display: none; }
}

/* ============ الهيرو ============ */
.hero { background: var(--shirka-navy); padding: 88px 32px; overflow: hidden; }
.hero-inner { display: flex; align-items: center; gap: 56px; }
.hero-text { flex: 1; }
.eyebrow { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--shirka-navy-soft); color: oklch(80% 0.06 195); font-size: 13px; font-weight: 600; margin-bottom: 18px; }
.eyebrow-accent { background: none; padding: 0; color: var(--shirka-accent); font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.hero-text h1 { font-size: 44px; line-height: 1.28; color: #fff; margin-bottom: 18px; }
.hero-text p { font-size: 16.5px; line-height: 1.9; color: oklch(78% 0.015 250); max-width: 520px; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-art { flex: 1; display: flex; align-items: center; justify-content: center; }

/* ============ قسم عام ============ */
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head h2 { font-size: 30px; margin: 10px 0 12px; }
.section-head p { font-size: 16px; color: var(--shirka-ink-soft); line-height: 1.8; margin: 0; }

/* ============ كروت الخدمات ============ */
.services-preview, .services-full { padding: 80px 32px; }
.services-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.service-card { background: #fff; border: 1px solid var(--shirka-border); border-radius: 16px; padding: 32px; display: flex; flex-direction: column; transition: box-shadow .2s ease, transform .2s ease; }
.service-card:hover { box-shadow: 0 12px 32px oklch(24% 0.02 250 / 0.08); transform: translateY(-2px); }
.service-icon { width: 52px; height: 52px; border-radius: 12px; background: var(--shirka-icon-bg); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; overflow: hidden; }
.service-icon img { width: 100%; height: 100%; object-fit: cover; }
.service-icon-placeholder { color: var(--shirka-accent); }
.service-icon-lg { width: 64px; height: 64px; border-radius: 14px; flex-shrink: 0; }
.service-card h3 { font-size: 19px; margin-bottom: 10px; }
.service-card p { font-size: 14.5px; color: var(--shirka-ink-soft); line-height: 1.85; margin: 0 0 18px; flex: 1; }
.service-link { color: var(--shirka-accent); font-size: 14px; font-weight: 700; }
.service-card-empty { grid-column: 1 / -1; text-align: center; padding: 48px 24px; color: var(--shirka-ink-soft); background: var(--shirka-bg-alt); border-style: dashed; }

/* ============ شريط الثقة ============ */
.trust-strip { padding: 48px 32px; background: var(--shirka-bg-alt); }
.trust-label { text-align: center; font-size: 14px; color: var(--shirka-ink-soft); font-weight: 600; margin: 0 0 26px; }
.trust-logos { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.trust-logo { padding: 14px 28px; background: #fff; border: 1px solid var(--shirka-border); border-radius: 10px; color: oklch(55% 0.015 250); font-size: 14px; font-weight: 600; }

/* ============ نبذة عنا ============ */
.about-teaser { padding: 88px 32px; }
.about-teaser-inner { display: flex; align-items: center; gap: 56px; }
.about-art, .about-text { flex: 1; }
.about-text h2 { font-size: 28px; margin: 10px 0 16px; }
.about-text p { font-size: 16px; line-height: 1.9; color: var(--shirka-ink-soft); margin: 0 0 22px; }
.text-link { color: var(--shirka-accent); font-size: 15px; font-weight: 600; }

/* ============ بانر الدعوة لإجراء ============ */
.cta-banner { margin: 0 32px 88px; padding: 60px; border-radius: 20px; background: var(--shirka-accent); text-align: center; }
.cta-inner h2 { font-size: 26px; color: #fff; margin: 0 0 12px; }
.cta-inner p { font-size: 15px; color: oklch(95% 0.02 195); margin: 0 0 24px; }

/* ============ الفوتر ============ */
.site-footer { background: oklch(18% 0.03 250); padding: 60px 32px 30px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px; padding-bottom: 36px; border-bottom: 1px solid oklch(28% 0.03 250); }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.brand-mark-sm { width: 32px; height: 32px; border-radius: 8px; background: var(--shirka-accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.brand-name-footer { color: #fff; font-weight: 700; font-size: 15px; }
.footer-desc { font-size: 13.5px; line-height: 1.8; color: oklch(70% 0.015 250); margin: 0; }
.footer-col h4 { color: #fff; font-size: 14px; margin: 0 0 16px; }
.footer-menu, .footer-contact { display: flex; flex-direction: column; gap: 11px; }
.footer-menu a { font-size: 13.5px; color: oklch(82% 0.01 250); }
.footer-menu a:hover { color: #fff; }
.footer-contact li { font-size: 13.5px; color: oklch(70% 0.015 250); }
.footer-bottom { padding-top: 22px; font-size: 13px; color: oklch(60% 0.015 250); }

/* ============ رأس صفحة داخلية ============ */
.page-hero { background: var(--shirka-navy); padding: 60px 32px; text-align: center; }
.page-hero .breadcrumb { font-size: 13px; color: oklch(75% 0.01 250); }
.page-hero h1 { font-size: 34px; color: #fff; margin: 14px 0 12px; }
.page-hero p { font-size: 15.5px; color: oklch(75% 0.015 250); max-width: 560px; margin: 0 auto; }

/* ============ صفحة تفاصيل الخدمة ============ */
.service-detail-hero { padding: 64px 32px 48px; border-bottom: 1px solid var(--shirka-border); }
.service-detail-hero .breadcrumb { font-size: 13px; color: var(--shirka-ink-soft); }
.service-detail-head { display: flex; align-items: center; gap: 20px; margin-top: 18px; }
.service-detail-head h1 { font-size: 28px; margin: 0 0 8px; }
.service-lead { font-size: 15px; color: var(--shirka-ink-soft); max-width: 640px; line-height: 1.8; margin: 0; }
.service-detail-body { padding: 64px 32px; }
.service-detail-grid { display: flex; gap: 56px; align-items: flex-start; }
.service-content { flex: 2; }
.service-content h2 { font-size: 22px; margin-bottom: 22px; }
.service-content ul { list-style: disc; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 10px; }
.service-content li { font-size: 15px; line-height: 1.8; color: var(--shirka-ink-soft); }
.service-content p { font-size: 15px; line-height: 1.9; color: var(--shirka-ink-soft); }
.service-sidebar { flex: 1; position: sticky; top: 24px; background: var(--shirka-navy); border-radius: 16px; padding: 30px; }
.service-sidebar h3 { color: #fff; font-size: 18px; margin-bottom: 12px; }
.service-sidebar p { color: oklch(75% 0.015 250); font-size: 14px; line-height: 1.8; margin: 0 0 20px; }
.service-sidebar-phone { display: block; text-align: center; margin-top: 14px; color: #fff; font-size: 14px; font-weight: 600; }

/* ============ صفحة من نحن ============ */
.about-content { padding: 72px 32px; }
.entry-content { max-width: 760px; margin: 0 auto; font-size: 16px; line-height: 1.95; color: var(--shirka-ink-soft); }
.entry-content h2, .entry-content h3 { color: var(--shirka-ink); margin: 30px 0 14px; }
.entry-content h2 { font-size: 24px; }
.entry-content h3 { font-size: 18px; }
.entry-content p { margin: 0 0 16px; }
.entry-content ul, .entry-content ol { padding-inline-start: 22px; margin: 0 0 16px; }
.entry-content li { list-style: disc; margin-bottom: 8px; }
.entry-content .wp-block-columns { display: flex; gap: 32px; flex-wrap: wrap; }
.entry-content .wp-block-column { flex: 1; min-width: 200px; }
.entry-content figure.wp-block-image { margin: 24px 0; }
.entry-content figure.wp-block-image img { border-radius: 14px; }

.service-content h3 { font-size: 18px; margin: 24px 0 8px; }
.service-content h3:first-child { margin-top: 0; }

/* ============ صفحة اتصل بنا ============ */
.contact-content { padding: 72px 32px; }
.contact-grid { display: flex; gap: 48px; align-items: flex-start; }
.contact-info, .contact-form-area { flex: 1; }
.contact-info h2, .contact-form-area h2 { font-size: 20px; margin-bottom: 22px; }
.contact-list { display: flex; flex-direction: column; gap: 18px; }
.contact-list li { display: flex; flex-direction: column; gap: 4px; }
.contact-label { font-size: 13px; color: var(--shirka-ink-soft); }
.contact-value { font-size: 15px; font-weight: 600; }
.contact-form-area { background: #fff; border: 1px solid var(--shirka-border); border-radius: 16px; padding: 32px; }
.contact-form-hint { font-size: 14px; color: var(--shirka-ink-soft); line-height: 1.8; background: var(--shirka-bg-alt); border-radius: 10px; padding: 16px; }

/* ============ محتوى عام ============ */
.generic-content { padding: 72px 32px; }

/* ============ استجابة الجوال ============ */
@media (max-width: 900px) {
	.hero-inner, .about-teaser-inner, .service-detail-grid, .contact-grid { flex-direction: column; }
	.services-grid { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hero-art svg { width: 260px; height: auto; }
}

@media (max-width: 700px) {
	.wrap { padding: 0 18px; }
	.header-inner { padding: 14px 18px; }
	.main-nav { display: none; }
	.header-actions .btn-sm { display: none; }
	.mobile-menu-toggle { display: inline-flex; }
	.mobile-nav { display: none; flex-direction: column; padding: 0 18px 18px; }
	.site-header.mobile-nav-open .mobile-nav { display: flex; }
	.nav-menu-mobile { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--shirka-border); padding-top: 14px; }
	.nav-menu-mobile li a { display: block; padding: 10px 4px; font-size: 15px; }
	.mobile-employee-login {
		display: block;
		margin-top: 10px;
		padding: 10px 4px;
		font-size: 14px;
		font-weight: 600;
		color: var(--shirka-accent);
		border-top: 1px solid var(--shirka-border);
	}

	.hero { padding: 44px 18px; text-align: center; }
	.hero-text h1 { font-size: 26px; }
	.hero-text p { max-width: none; }
	.hero-actions { flex-direction: column; }
	.hero-actions .btn { width: 100%; text-align: center; }

	.services-preview, .services-full, .about-teaser, .service-detail-body, .about-content, .contact-content, .generic-content { padding: 48px 18px; }
	.section-head h2 { font-size: 22px; }

	.cta-banner { margin: 0 18px 52px; padding: 36px 22px; }
	.footer-grid { grid-template-columns: 1fr; }
	.site-footer { padding: 40px 18px 24px; }

	.page-hero { padding: 40px 18px; }
	.page-hero h1 { font-size: 24px; }

	.service-detail-hero { padding: 40px 18px; }
	.service-detail-head { flex-direction: column; align-items: flex-start; }
}
