/*
Theme Name: Coretech
Theme URI: https://coretech.om
Author: Coretech Smart Solution
Description: قالب موقع قلب التقنية للحلول الذكية — تصميم عربي هادئ وعصري، قالب كتل قابل للتعديل من محرر الموقع.
Version: 1.1.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: coretech
Tags: rtl-language-support, block-patterns, full-site-editing, one-column
*/

/* ===== أساسيات ===== */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
:where(section[id]) { scroll-margin-top: 96px; }

.ct-wrap {
	width: min(1200px, 100% - 48px);
	margin-inline: auto;
}

/* ===== الهيدر ===== */
.ct-site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(246, 245, 240, 0.92);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.admin-bar .ct-site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .ct-site-header { top: 46px; } }

.ct-header {
	width: min(1200px, 100% - 48px);
	margin-inline: auto;
	padding-block: 14px;
	gap: 24px;
}
.ct-brand { gap: 12px; }
.ct-brand .wp-block-site-title { margin: 0; font-size: 1.15rem; font-weight: 700; }
.ct-brand .wp-block-site-title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.ct-nav { font-size: 0.97rem; font-weight: 500; gap: 28px; }
.ct-nav a { color: var(--wp--preset--color--ink); text-decoration: none; }
.ct-nav a:hover { color: var(--wp--preset--color--primary); }
.ct-header .wp-block-buttons { margin: 0; }

/* ===== الأزرار ===== */
.wp-block-button__link { transition: background-color .2s, color .2s, border-color .2s; }
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--primary);
	border: 1.5px solid var(--wp--preset--color--primary);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--primary);
	color: #fff;
}
.ct-btn-light .wp-block-button__link {
	background: #fff;
	color: var(--wp--preset--color--primary-dark);
}
.ct-btn-light .wp-block-button__link:hover { background: var(--wp--preset--color--soft); }
.ct-btn-ghost .wp-block-button__link {
	background: transparent;
	color: #fff;
	border: 1.5px solid rgba(255, 255, 255, 0.55);
}
.ct-btn-ghost .wp-block-button__link:hover { border-color: #fff; background: rgba(255,255,255,.08); }

/* ===== عام للأقسام ===== */
.ct-main { margin: 0; }
.ct-section { padding-block: clamp(64px, 9vw, 112px); margin: 0; }
.ct-section-alt { background: #fff; border-block: 1px solid var(--wp--preset--color--line); }
.ct-eyebrow {
	display: inline-block;
	margin: 0 0 16px;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--wp--preset--color--soft);
	color: var(--wp--preset--color--primary);
	font-size: 0.88rem;
	font-weight: 600;
}
.ct-section-head { max-width: 680px; margin-bottom: 48px; }
.ct-section-head h2 { margin: 0 0 14px; }
.ct-lead { color: var(--wp--preset--color--muted); font-size: 1.12rem; line-height: 1.9; margin: 0; }

/* ===== الواجهة الرئيسية ===== */
.ct-hero { padding-block: clamp(56px, 8vw, 104px) clamp(64px, 9vw, 112px); }
.ct-hero .wp-block-columns { gap: clamp(32px, 5vw, 72px); align-items: center; margin: 0; }
.ct-hero-title {
	font-size: clamp(2.1rem, 4.4vw, 3.4rem);
	line-height: 1.35;
	margin: 0 0 20px;
	letter-spacing: 0;
}
.ct-hero-title strong { color: var(--wp--preset--color--primary); font-weight: 700; }
.ct-hero .ct-lead { margin-bottom: 32px; max-width: 560px; }

/* بطاقة متابعة الطلب */
.ct-track {
	background: #fff;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 20px;
	padding: 28px;
	box-shadow: 0 24px 48px -28px rgba(15, 74, 54, 0.28);
}
.ct-track-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 24px; }
.ct-track-head b { font-size: 1.05rem; }
.ct-track-head span { font-size: 0.85rem; color: var(--wp--preset--color--muted); }
.ct-badge {
	font-size: 0.8rem; font-weight: 600;
	padding: 5px 12px; border-radius: 999px;
	background: var(--wp--preset--color--soft); color: var(--wp--preset--color--primary);
	white-space: nowrap;
}
.ct-steps { list-style: none; margin: 0; padding: 0; }
.ct-steps li {
	position: relative;
	display: flex; gap: 14px; align-items: flex-start;
	padding-bottom: 22px;
}
.ct-steps li:last-child { padding-bottom: 0; }
.ct-steps li::before {
	content: "";
	position: absolute;
	inset-inline-start: 11px; top: 26px; bottom: 2px;
	width: 2px;
	background: var(--wp--preset--color--line);
}
.ct-steps li:last-child::before { display: none; }
.ct-steps li.is-done::before { background: var(--wp--preset--color--primary); }
.ct-dot {
	flex: none;
	width: 24px; height: 24px; border-radius: 50%;
	display: grid; place-items: center;
	border: 2px solid var(--wp--preset--color--line);
	background: #fff;
}
.is-done .ct-dot { background: var(--wp--preset--color--primary); border-color: var(--wp--preset--color--primary); }
.is-now .ct-dot { border-color: var(--wp--preset--color--primary); }
.is-now .ct-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--wp--preset--color--primary); }
.ct-steps b { display: block; font-size: 0.98rem; font-weight: 600; }
.ct-steps small { color: var(--wp--preset--color--muted); font-size: 0.85rem; }
.ct-track-foot {
	margin-top: 24px; padding-top: 18px;
	border-top: 1px dashed var(--wp--preset--color--line);
	display: flex; gap: 10px; align-items: center;
	color: var(--wp--preset--color--muted); font-size: 0.88rem;
}
.ct-track-foot svg { color: var(--wp--preset--color--primary); flex: none; }

/* ===== الخدمات ===== */
.ct-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 20px;
}
.ct-grid > * { margin: 0 !important; }
.ct-card {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 16px;
	padding: 28px;
	transition: border-color .2s, transform .2s;
}
.ct-section-alt .ct-card { background: var(--wp--preset--color--base); }
.ct-card:hover { border-color: var(--wp--preset--color--primary); transform: translateY(-2px); }
.ct-card h3 { margin: 18px 0 10px; font-size: 1.18rem; }
.ct-card p { margin: 0; color: var(--wp--preset--color--muted); line-height: 1.85; }
.ct-icon {
	width: 48px; height: 48px; border-radius: 12px;
	display: grid; place-items: center;
	background: var(--wp--preset--color--soft);
	color: var(--wp--preset--color--primary);
}

/* ===== طريقة العمل ===== */
.ct-process { counter-reset: ct-step; }
.ct-process .ct-card { background: transparent; border-style: dashed; }
.ct-process .ct-card:hover { transform: none; }
.ct-process .ct-card::before {
	counter-increment: ct-step;
	content: "0" counter(ct-step);
	display: block;
	font-size: 2rem; font-weight: 700;
	color: var(--wp--preset--color--accent);
	line-height: 1;
}
.ct-process .ct-card h3 { margin-top: 16px; }

/* ===== لماذا نحن ===== */
.ct-why .wp-block-columns { gap: clamp(32px, 5vw, 72px); align-items: center; margin: 0; }
.ct-check {
	position: relative;
	padding-inline-start: 36px;
	margin: 0 0 16px;
	line-height: 1.8;
}
.ct-check::before {
	content: "";
	position: absolute;
	inset-inline-start: 0; top: 4px;
	width: 22px; height: 22px; border-radius: 50%;
	background: var(--wp--preset--color--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.ct-panel {
	background: var(--wp--preset--color--primary-dark);
	color: #fff;
	border-radius: 20px;
	padding: clamp(28px, 4vw, 44px);
}
.ct-panel h3 { color: #fff; margin: 0 0 12px; font-size: 1.4rem; }
.ct-panel p { color: rgba(255,255,255,.82); margin: 0 0 12px; line-height: 1.85; }
.ct-panel .ct-quote-mark { font-size: 3rem; line-height: 1; color: var(--wp--preset--color--accent); margin: 0; }

/* ===== التواصل ===== */
.ct-contact { background: var(--wp--preset--color--primary-dark); color: #fff; }
.ct-contact h2 { color: #fff; }
.ct-contact .ct-lead { color: rgba(255,255,255,.8); }
.ct-contact .ct-eyebrow { background: rgba(255,255,255,.1); color: #fff; }
.ct-contact .wp-block-columns { gap: clamp(32px, 5vw, 72px); align-items: center; margin: 0; }
.ct-info {
	background: rgba(255,255,255,.06);
	border: 1px solid rgba(255,255,255,.14);
	border-radius: 16px;
	padding: 8px 24px;
}
.ct-info p {
	margin: 0;
	padding-block: 16px;
	display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
	border-bottom: 1px solid rgba(255,255,255,.12);
}
.ct-info p:last-child { border-bottom: 0; }
.ct-info span { color: rgba(255,255,255,.7); }
.ct-info a { color: #fff; text-decoration: none; font-weight: 600; direction: ltr; unicode-bidi: isolate; }
.ct-info a:hover { text-decoration: underline; }

/* ===== الفوتر ===== */
.ct-site-footer { background: #0A2A1F; color: rgba(255,255,255,.72); font-size: .92rem; }
.ct-footer {
	width: min(1200px, 100% - 48px);
	margin-inline: auto;
	padding-block: 28px;
	gap: 16px;
}
.ct-footer p { margin: 0; }
.ct-footer a { color: #fff; text-decoration: none; }

/* ===== الصفحات الداخلية ===== */
.ct-page { padding-block: clamp(48px, 7vw, 88px); }
.ct-page .wp-block-post-title { margin-top: 0; }

/* ===== الجوال ===== */
@media (max-width: 781px) {
	.ct-header .wp-block-buttons { display: none; }
	.ct-section-head { margin-bottom: 32px; }
}
