/*
Theme Name: دليلك للوظائف
Theme URI: https://dalilk4jobs.com
Description: قالب فرعي لموقع وظائف عربي (RTL) — واجهة بحث بارزة، بطاقات وظائف، تصفح سريع بالأقسام والجهات.
Author: دليلك للوظائف
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: dalilk-jobs
*/

/* ===================================================================
   1) أساسيات RTL والخطوط
   =================================================================== */

:root {
	--dl-blue: #0073e6;
	--dl-blue-dark: #0a4fa3;
	--dl-blue-soft: #eaf3ff;
	--dl-green: #16a34a;
	--dl-red: #dc2626;
	--dl-ink: #14202e;
	--dl-muted: #5b6b7c;
	--dl-line: #e3e9f0;
	--dl-bg: #f5f8fb;
	--dl-radius: 12px;
	--dl-shadow: 0 1px 2px rgba(16, 32, 48, .06), 0 4px 16px rgba(16, 32, 48, .05);
	--dl-shadow-lg: 0 8px 30px rgba(16, 32, 48, .12);
}

body {
	background: var(--dl-bg);
	color: var(--dl-ink);
	font-family: "Cairo", "Tajawal", "Segoe UI", Tahoma, system-ui, sans-serif;
	-webkit-font-smoothing: antialiased;
}

/* ووردبريس يحمّل rtl.css تلقائياً، لكن نضمن الاتجاه في الحاويات المخصصة */
.dl-card,
.dl-hero,
.dl-section,
.dl-job-body {
	direction: rtl;
	text-align: right;
}

/* ===================================================================
   2) الهيدر — شعار + قائمة + بحث بارز
   =================================================================== */

.dl-header {
	background: #fff;
	border-bottom: 1px solid var(--dl-line);
	position: sticky;
	top: 0;
	z-index: 50;
	padding-block: .5rem;
}

.dl-header .wp-block-site-title a {
	color: var(--dl-blue-dark);
	font-weight: 800;
	font-size: 1.4rem;
	text-decoration: none;
}

.dl-nav a {
	color: var(--dl-ink);
	font-weight: 600;
	font-size: .95rem;
	text-decoration: none;
	padding: .45rem .7rem;
	border-radius: 8px;
	transition: background .15s, color .15s;
}

.dl-nav a:hover,
.dl-nav .current-menu-item > a {
	background: var(--dl-blue-soft);
	color: var(--dl-blue-dark);
}

/* --- محرك البحث البارز --- */

.dl-hero {
	background: linear-gradient(135deg, var(--dl-blue-dark) 0%, var(--dl-blue) 100%);
	padding: 3.5rem 1.25rem;
	text-align: center;
	color: #fff;
}

.dl-hero h1,
.dl-hero h2 {
	color: #fff;
	font-weight: 800;
	margin: 0 0 .5rem;
	line-height: 1.4;
}

.dl-hero p {
	color: rgba(255, 255, 255, .88);
	margin: 0 0 1.75rem;
	font-size: 1.05rem;
}

.dl-search,
.dl-hero .wp-block-search {
	max-width: 680px;
	margin-inline: auto;
}

.dl-hero .wp-block-search__inside-wrapper {
	background: #fff;
	border: 0;
	border-radius: 999px;
	padding: .35rem;
	box-shadow: var(--dl-shadow-lg);
}

.wp-block-search__input {
	border: 0 !important;
	background: transparent;
	padding: .8rem 1.25rem;
	font-size: 1rem;
	color: var(--dl-ink);
	outline: none;
}

.wp-block-search__input::placeholder {
	color: #9aa8b6;
}

.wp-block-search__button {
	background: var(--dl-blue);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: .75rem 1.75rem;
	font-weight: 700;
	cursor: pointer;
	transition: background .15s;
}

.wp-block-search__button:hover {
	background: var(--dl-blue-dark);
}

/* بحث مصغّر داخل الهيدر */
.dl-header .wp-block-search__inside-wrapper {
	border: 1px solid var(--dl-line);
	border-radius: 999px;
	background: var(--dl-bg);
	padding: .15rem;
}

.dl-header .wp-block-search__input {
	padding: .5rem .9rem;
	font-size: .9rem;
}

.dl-header .wp-block-search__button {
	padding: .5rem 1.1rem;
	font-size: .85rem;
}

/* روابط بحث سريعة تحت الشريط */
.dl-quick-links {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	justify-content: center;
	margin-top: 1.25rem;
}

.dl-quick-links a {
	background: rgba(255, 255, 255, .15);
	border: 1px solid rgba(255, 255, 255, .3);
	color: #fff;
	padding: .35rem .9rem;
	border-radius: 999px;
	font-size: .85rem;
	text-decoration: none;
	transition: background .15s;
}

.dl-quick-links a:hover {
	background: rgba(255, 255, 255, .3);
}

/* ===================================================================
   3) شبكة الأقسام
   =================================================================== */

.dl-section {
	padding-block: 2.5rem;
}

.dl-section-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.25rem;
	border-inline-start: 4px solid var(--dl-blue);
	padding-inline-start: .75rem;
}

.dl-section-title h2 {
	font-size: 1.35rem;
	font-weight: 800;
	margin: 0;
	color: var(--dl-ink);
}

.dl-section-title a {
	color: var(--dl-blue);
	font-size: .9rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.dl-cats {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
	gap: 1rem;
}

.dl-cat {
	background: #fff;
	border: 1px solid var(--dl-line);
	border-radius: var(--dl-radius);
	padding: 1.35rem 1rem;
	text-align: center;
	text-decoration: none;
	color: var(--dl-ink);
	font-weight: 700;
	transition: transform .15s, box-shadow .15s, border-color .15s;
	display: block;
}

.dl-cat:hover {
	transform: translateY(-3px);
	box-shadow: var(--dl-shadow);
	border-color: var(--dl-blue);
	color: var(--dl-blue-dark);
}

.dl-cat .dl-cat-icon {
	font-size: 1.9rem;
	display: block;
	margin-bottom: .5rem;
	line-height: 1;
}

.dl-cat .dl-cat-count {
	display: block;
	font-size: .8rem;
	font-weight: 500;
	color: var(--dl-muted);
	margin-top: .3rem;
}

/* ===================================================================
   4) بطاقات الوظائف
   =================================================================== */

.dl-jobs .wp-block-post-template {
	gap: 1rem;
}

.dl-card {
	background: #fff;
	border: 1px solid var(--dl-line);
	border-radius: var(--dl-radius);
	padding: 1.15rem;
	height: 100%;
	display: flex;
	flex-direction: column;
	gap: .55rem;
	transition: box-shadow .15s, border-color .15s, transform .15s;
}

.dl-card:hover {
	box-shadow: var(--dl-shadow);
	border-color: #c9dcf5;
	transform: translateY(-2px);
}

.dl-card .wp-block-post-featured-image {
	margin: 0 0 .35rem;
	border-radius: 8px;
	overflow: hidden;
	background: var(--dl-bg);
}

.dl-card .wp-block-post-featured-image img {
	width: 100%;
	height: 150px;
	object-fit: contain;
	padding: .5rem;
}

.dl-card .wp-block-post-title {
	font-size: 1.02rem;
	font-weight: 700;
	line-height: 1.65;
	margin: 0;
}

.dl-card .wp-block-post-title a {
	color: var(--dl-ink);
	text-decoration: none;
}

.dl-card .wp-block-post-title a:hover {
	color: var(--dl-blue);
}

.dl-card .wp-block-post-excerpt {
	color: var(--dl-muted);
	font-size: .88rem;
	line-height: 1.8;
	margin: 0;
}

.dl-card-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .5rem;
	margin-top: auto;
	padding-top: .75rem;
	border-top: 1px dashed var(--dl-line);
	font-size: .8rem;
	color: var(--dl-muted);
}

.dl-badge,
.dl-card .wp-block-post-terms {
	font-size: .75rem;
	font-weight: 700;
}

.dl-badge a,
.dl-card .wp-block-post-terms a {
	background: var(--dl-blue-soft);
	color: var(--dl-blue-dark);
	padding: .2rem .65rem;
	border-radius: 999px;
	text-decoration: none;
	display: inline-block;
}

.dl-badge a:hover,
.dl-card .wp-block-post-terms a:hover {
	background: var(--dl-blue);
	color: #fff;
}

/* شارة "جديد" — تُضاف من الإضافة للمقالات خلال 48 ساعة */
.dl-new {
	background: var(--dl-green);
	color: #fff;
	font-size: .7rem;
	font-weight: 700;
	padding: .15rem .55rem;
	border-radius: 999px;
}

/* ===================================================================
   5) صفحة الوظيفة المفردة
   =================================================================== */

.dl-job-header {
	background: #fff;
	border: 1px solid var(--dl-line);
	border-radius: var(--dl-radius);
	padding: 1.75rem;
	text-align: center;
	margin-bottom: 1.5rem;
}

.dl-job-header .wp-block-post-featured-image img {
	max-width: 190px;
	height: auto;
	margin-inline: auto;
	object-fit: contain;
}

.dl-job-header .wp-block-post-title {
	font-size: 1.6rem;
	font-weight: 800;
	line-height: 1.6;
	margin: .85rem 0 .5rem;
}

.dl-job-body {
	background: #fff;
	border: 1px solid var(--dl-line);
	border-radius: var(--dl-radius);
	padding: 1.75rem;
	line-height: 1.95;
}

.dl-job-body h2,
.dl-job-body h3 {
	color: var(--dl-blue-dark);
	font-size: 1.15rem;
	font-weight: 800;
	margin: 1.75rem 0 .6rem;
	padding-inline-start: .6rem;
	border-inline-start: 3px solid var(--dl-blue);
}

.dl-job-body ul,
.dl-job-body ol {
	padding-inline-start: 1.4rem;
	margin: .75rem 0;
}

.dl-job-body li {
	margin-bottom: .45rem;
}

.dl-job-body a {
	color: var(--dl-blue);
	font-weight: 600;
}

/* زر التقديم — الإضافة تحوّل روابط التقديم إلى هذا الشكل */
.dl-apply {
	display: block;
	background: var(--dl-green);
	color: #fff !important;
	text-align: center;
	font-weight: 800;
	font-size: 1.05rem;
	padding: .95rem 1.5rem;
	border-radius: var(--dl-radius);
	text-decoration: none !important;
	margin: 1rem 0;
	transition: filter .15s, transform .15s;
}

.dl-apply:hover {
	filter: brightness(1.08);
	transform: translateY(-1px);
}

.dl-share {
	display: flex;
	gap: .5rem;
	flex-wrap: wrap;
	margin-top: 1.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--dl-line);
}

.dl-share a {
	flex: 1 1 auto;
	text-align: center;
	padding: .6rem 1rem;
	border-radius: 8px;
	color: #fff !important;
	font-weight: 700;
	font-size: .88rem;
	text-decoration: none !important;
	min-width: 110px;
}

.dl-share .s-tg { background: #229ED9; }
.dl-share .s-wa { background: #25D366; }
.dl-share .s-tw { background: #14171A; }

/* ===================================================================
   6) الأرشيف والبحث والترقيم
   =================================================================== */

.dl-archive-head {
	background: #fff;
	border: 1px solid var(--dl-line);
	border-radius: var(--dl-radius);
	padding: 1.5rem;
	margin-bottom: 1.5rem;
}

.dl-archive-head h1 {
	font-size: 1.5rem;
	font-weight: 800;
	margin: 0 0 .35rem;
}

.dl-archive-head p {
	color: var(--dl-muted);
	margin: 0;
	font-size: .95rem;
}

.wp-block-query-pagination {
	margin-top: 2rem;
	gap: .4rem;
	justify-content: center;
}

.wp-block-query-pagination a,
.wp-block-query-pagination .current {
	background: #fff;
	border: 1px solid var(--dl-line);
	border-radius: 8px;
	padding: .5rem .9rem;
	text-decoration: none;
	color: var(--dl-ink);
	font-weight: 600;
}

.wp-block-query-pagination .current {
	background: var(--dl-blue);
	border-color: var(--dl-blue);
	color: #fff;
}

.wp-block-query-pagination a:hover {
	border-color: var(--dl-blue);
	color: var(--dl-blue);
}

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

.dl-footer {
	background: var(--dl-ink);
	color: rgba(255, 255, 255, .75);
	padding-block: 2.5rem 1.5rem;
	margin-top: 3rem;
}

.dl-footer a {
	color: rgba(255, 255, 255, .8);
	text-decoration: none;
}

.dl-footer a:hover {
	color: #fff;
	text-decoration: underline;
}

.dl-footer h3 {
	color: #fff;
	font-size: 1rem;
	font-weight: 700;
	margin: 0 0 .75rem;
}

.dl-footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, .12);
	margin-top: 1.75rem;
	padding-top: 1.25rem;
	text-align: center;
	font-size: .85rem;
}

/* ===================================================================
   8) الجوال
   =================================================================== */

@media (max-width: 781px) {
	.dl-hero {
		padding: 2.25rem 1rem;
	}

	.dl-hero h1,
	.dl-hero h2 {
		font-size: 1.45rem;
	}

	.dl-card .wp-block-post-featured-image img {
		height: 120px;
	}

	.dl-cats {
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	}

	.dl-job-header,
	.dl-job-body {
		padding: 1.15rem;
	}

	.dl-section-title h2 {
		font-size: 1.15rem;
	}
}

/* الطباعة — إخفاء ما لا يلزم عند طباعة إعلان وظيفة */
@media print {
	.dl-header, .dl-footer, .dl-share, .dl-hero { display: none !important; }
	.dl-job-body { border: 0; padding: 0; }
}
