/*
Theme Name: حلك التقنية
Theme URI: https://www.halaktech.com
Author: حلك التقنية
Author URI: https://www.halaktech.com
Description: قالب ووردبريس احترافي لموقع حلك التقنية - حلول تقنية متكاملة للمتاجر الإلكترونية
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: halaktech
Tags: rtl-language, arabic, blog, portfolio, business, custom-menu, featured-images, full-width-template, sticky-post, theme-options
*/

/* ============================================================
   GOOGLE FONTS & FONT AWESOME - loaded via wp_enqueue_scripts
   ============================================================ */

/* ===== CSS VARIABLES ===== */
:root {
  --primary: #0A2463;
  --accent: #00C2D1;
  --accent2: #FF6B35;
  --light-bg: #F0F4FF;
  --card-bg: #ffffff;
  --text-dark: #1a1a2e;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 8px 32px rgba(10,36,99,0.10);
  --radius: 16px;
  --transition: all 0.3s ease;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Tajawal', sans-serif;
  background: var(--light-bg);
  color: var(--text-dark);
  direction: rtl;
  text-align: right;
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  transition: var(--transition);
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul { list-style: none; }

/* ===== ACCESSIBILITY ===== */
.skip-link {
  position: absolute;
  top: -999px;
  left: -999px;
  background: var(--primary);
  color: #fff;
  padding: 10px 20px;
  border-radius: 4px;
  z-index: 9999;
  font-weight: 700;
}
.skip-link:focus {
  top: 10px;
  left: 10px;
}

/* ===== HEADER ===== */
#masthead {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0 5%;
  box-shadow: 0 2px 20px rgba(10,36,99,0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid var(--accent);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Logo */
.site-branding {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  flex-shrink: 0;
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.site-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1.2;
}

.site-title span {
  color: var(--accent);
}

.site-description {
  display: none;
}

/* ===== NAVIGATION ===== */
#primary-navigation {
  display: flex;
  align-items: center;
}

#primary-menu {
  display: flex;
  align-items: center;
  gap: 5px;
}

#primary-menu li a {
  padding: 8px 16px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 15px;
  border-radius: 8px;
  display: block;
  transition: var(--transition);
}

#primary-menu li a:hover,
#primary-menu li.current-menu-item > a,
#primary-menu li.current_page_item > a {
  background: var(--light-bg);
  color: var(--primary);
}

#primary-menu li.menu-cta a {
  background: linear-gradient(135deg, var(--primary), #1a3a8f) !important;
  color: #fff !important;
  padding: 9px 20px !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
}

#primary-menu li.menu-cta a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(10,36,99,0.3);
}

/* Dropdown */
#primary-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  min-width: 200px;
  z-index: 999;
  padding: 8px;
}

#primary-menu li {
  position: relative;
}

#primary-menu li:hover > .sub-menu {
  display: block;
}

#primary-menu .sub-menu li a {
  padding: 10px 16px;
  font-size: 14px;
  border-radius: 8px;
  display: block;
}

/* Mobile Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 2px solid var(--primary);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--primary);
  font-size: 18px;
}

/* ===== HERO SECTION ===== */
.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, #1a3a8f 50%, #0d1f5c 100%);
  color: #fff;
  padding: 90px 5% 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2300C2D1' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  background: rgba(0,194,209,0.15);
  border: 1px solid rgba(0,194,209,0.4);
  color: var(--accent);
  padding: 6px 20px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 25px;
}

.hero-section h1 {
  font-size: clamp(28px, 5vw, 50px);
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 20px;
}

.hero-section h1 span {
  color: var(--accent);
}

.hero-section .hero-desc {
  font-size: 18px;
  opacity: 0.85;
  max-width: 680px;
  margin: 0 auto 40px;
  font-weight: 400;
}

.hero-btns {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #00a8b5);
  color: #fff !important;
  padding: 14px 32px;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(0,194,209,0.35);
  display: inline-block;
  transition: var(--transition);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,194,209,0.45);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 2px solid rgba(255,255,255,0.4);
  color: #fff !important;
  padding: 14px 32px;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 700;
  display: inline-block;
  transition: var(--transition);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 50px;
  margin-top: 60px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-num {
  font-size: 36px;
  font-weight: 900;
  color: var(--accent);
}

.stat-label {
  font-size: 14px;
  opacity: 0.7;
  margin-top: 4px;
}

/* ===== ABOUT STRIP ===== */
.about-strip {
  background: #fff;
  padding: 50px;
  display: flex;
  gap: 40px;
  align-items: center;
  max-width: 1100px;
  margin: 50px auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.about-icon-wrap {
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  color: #fff;
}

.about-icon-wrap img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.about-text h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 10px;
}

.about-text p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.8;
}

/* ===== SECTIONS ===== */
.section {
  padding: 80px 5%;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 55px;
}

.section-tag {
  display: inline-block;
  background: rgba(0,194,209,0.1);
  color: var(--accent);
  padding: 5px 18px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
  border: 1px solid rgba(0,194,209,0.25);
}

.section-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 14px;
}

.section-sub {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== SERVICE CARDS ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.service-card {
  background: var(--card-bg);
  padding: 36px 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(10,36,99,0.14);
}

.card-icon {
  width: 64px;
  height: 64px;
  background: var(--light-bg);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 12px;
}

.service-card p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 24px;
}

.card-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff !important;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  transition: var(--transition);
}

.card-btn:hover {
  background: rgba(10,36,99,0.8);
  color: #fff;
}

.card-btn-outline {
  background: transparent !important;
  border: 2px solid var(--primary);
  color: var(--primary) !important;
}

.card-btn-outline:hover {
  background: var(--primary) !important;
  color: #fff !important;
}

/* ===== TOOLS SECTION ===== */
.tools-section {
  background: linear-gradient(135deg, var(--primary), #0d1f5c);
  padding: 80px 5%;
}

.tools-section .section-header .section-title {
  color: #fff;
}

.tools-section .section-tag {
  background: rgba(255,255,255,0.1);
  color: var(--accent);
  border-color: rgba(255,255,255,0.2);
}

.tools-section .section-sub {
  color: rgba(255,255,255,0.65);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.tool-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 32px 28px;
  color: #fff;
  transition: var(--transition);
}

.tool-card:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-4px);
}

.tool-card .tool-icon {
  font-size: 36px;
  margin-bottom: 16px;
  display: block;
}

.tool-card h3 {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 10px;
}

.tool-card p {
  font-size: 14px;
  opacity: 0.7;
  line-height: 1.7;
  margin-bottom: 22px;
}

.tool-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--primary) !important;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  transition: var(--transition);
}

.tool-link:hover {
  background: #00d9ea;
  color: var(--primary);
}

/* ===== WHY US ===== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.why-item {
  background: #fff;
  padding: 30px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  text-align: center;
  transition: var(--transition);
}

.why-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(10,36,99,0.12);
}

.why-item .why-icon {
  font-size: 36px;
  margin-bottom: 14px;
  display: block;
}

.why-item h4 {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}

.why-item p {
  font-size: 14px;
  color: var(--text-muted);
}

/* ===== CONTACT SECTION ===== */
.contact-section {
  background: #fff;
  padding: 80px 5%;
}

.contact-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.contact-card {
  background: linear-gradient(135deg, var(--primary), #1a3a8f);
  color: #fff;
  border-radius: 20px;
  padding: 60px 40px;
  box-shadow: 0 20px 60px rgba(10,36,99,0.2);
}

.contact-card h2 {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 16px;
}

.contact-card > p {
  font-size: 17px;
  opacity: 0.85;
  margin-bottom: 36px;
  line-height: 1.7;
}

.contact-methods {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #fff !important;
  transition: var(--transition);
}

.contact-method i {
  color: var(--accent);
  font-size: 20px;
}

.contact-method:hover {
  background: rgba(255,255,255,0.18);
  color: #fff;
}

.email-highlight {
  font-size: 20px;
  font-weight: 900;
  color: var(--accent);
}

.contact-note {
  font-size: 15px;
  opacity: 0.7;
}

/* ===== CONTACT FORM (WP) ===== */
.contact-form-wrap {
  margin-top: 30px;
}

.wpcf7-form label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: rgba(255,255,255,0.85);
  text-align: right;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-family: 'Tajawal', sans-serif;
  font-size: 15px;
  margin-bottom: 16px;
  outline: none;
  transition: var(--transition);
}

.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,0.12);
}

.wpcf7-form input[type="submit"] {
  background: linear-gradient(135deg, var(--accent), #00a8b5);
  color: var(--primary);
  border: none;
  padding: 14px 40px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 800;
  font-family: 'Tajawal', sans-serif;
  cursor: pointer;
  transition: var(--transition);
}

.wpcf7-form input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,194,209,0.4);
}

/* ===== BLOG / ARCHIVE / SINGLE ===== */
#primary {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 5%;
}

.site-main article {
  background: #fff;
  padding: 40px 45px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 30px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.site-main article:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(10,36,99,0.12);
}

.entry-header .entry-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 14px;
  line-height: 1.4;
}

.entry-header .entry-title a {
  color: var(--primary);
  transition: var(--transition);
}

.entry-header .entry-title a:hover {
  color: var(--accent);
}

.entry-meta {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.entry-meta a {
  color: var(--text-muted);
}

.entry-meta a:hover {
  color: var(--accent);
}

.entry-meta .meta-icon {
  color: var(--accent);
  margin-left: 4px;
}

.featured-image-wrap {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}

.featured-image-wrap img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

article:hover .featured-image-wrap img {
  transform: scale(1.02);
}

.entry-content {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.85;
}

.entry-content p {
  margin-bottom: 20px;
}

.entry-content h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  margin: 32px 0 16px;
}

.entry-content h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--primary);
  margin: 24px 0 12px;
}

.entry-content ul, .entry-content ol {
  padding-right: 25px;
  margin-bottom: 20px;
}

.entry-content ul li {
  list-style: disc;
  margin-bottom: 8px;
}

.entry-content ol li {
  list-style: decimal;
  margin-bottom: 8px;
}

.entry-content a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
}

.entry-content blockquote {
  border-right: 4px solid var(--accent);
  background: var(--light-bg);
  padding: 20px 24px;
  border-radius: 0 10px 10px 0;
  margin: 24px 0;
  font-style: italic;
  color: var(--primary);
  font-weight: 600;
}

.entry-content img {
  border-radius: 12px;
  margin: 20px 0;
  box-shadow: var(--shadow);
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  border-radius: 10px;
  overflow: hidden;
}

.entry-content table th {
  background: var(--primary);
  color: #fff;
  padding: 12px 16px;
  font-weight: 700;
  text-align: right;
}

.entry-content table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.entry-content table tr:nth-child(even) td {
  background: var(--light-bg);
}

/* Read More */
.read-more-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff !important;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  margin-top: 10px;
  transition: var(--transition);
}

.read-more-link:hover {
  background: rgba(10,36,99,0.85);
  transform: translateX(-3px);
}

/* Single Post */
.single #primary {
  max-width: 860px;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.post-tag {
  background: var(--light-bg);
  border: 1px solid var(--border);
  color: var(--primary);
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
}

.post-tag:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Post Navigation */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 40px;
  background: #fff;
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.nav-previous, .nav-next {
  padding: 16px;
  border-radius: 10px;
  background: var(--light-bg);
  transition: var(--transition);
}

.nav-previous:hover, .nav-next:hover {
  background: var(--primary);
}

.nav-previous:hover a, .nav-next:hover a {
  color: #fff;
}

.nav-label {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

.nav-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--primary);
  display: block;
}

/* ===== COMMENTS ===== */
.comments-area {
  background: #fff;
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 30px;
  border: 1px solid var(--border);
}

.comments-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 30px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}

.comment-list {
  padding-right: 0;
  margin-bottom: 40px;
}

.comment-body {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--light-bg);
  border-radius: 12px;
  margin-bottom: 16px;
}

.comment-author .avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  flex-shrink: 0;
}

.comment-author .fn {
  font-weight: 700;
  color: var(--primary);
}

.comment-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.comment-content p {
  font-size: 15px;
  color: var(--text-muted);
}

.comment-form label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--primary);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: 'Tajawal', sans-serif;
  font-size: 15px;
  margin-bottom: 16px;
  background: var(--light-bg);
  outline: none;
  transition: var(--transition);
  color: var(--text-dark);
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0,194,209,0.15);
}

.comment-form input[type="submit"] {
  background: linear-gradient(135deg, var(--primary), #1a3a8f);
  color: #fff;
  border: none;
  padding: 12px 32px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Tajawal', sans-serif;
  cursor: pointer;
  transition: var(--transition);
}

.comment-form input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(10,36,99,0.3);
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 40px 0;
  flex-wrap: wrap;
}

.pagination .page-numbers {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-dark);
  transition: var(--transition);
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ===== SIDEBAR ===== */
#secondary {
  width: 320px;
  flex-shrink: 0;
}

.layout-with-sidebar {
  display: flex;
  gap: 30px;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 5%;
  align-items: flex-start;
}

.layout-with-sidebar #primary {
  flex: 1;
  margin: 0;
  padding: 0;
}

.widget {
  background: #fff;
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.widget-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent);
}

.widget ul li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}

.widget ul li:last-child {
  border-bottom: none;
}

.widget ul li a {
  color: var(--text-muted);
  font-weight: 500;
}

.widget ul li a:hover {
  color: var(--primary);
}

.widget_search .search-form {
  display: flex;
  gap: 8px;
}

.widget_search input[type="search"] {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'Tajawal', sans-serif;
  font-size: 14px;
  outline: none;
  direction: rtl;
}

.widget_search input[type="search"]:focus {
  border-color: var(--accent);
}

.widget_search input[type="submit"] {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Tajawal', sans-serif;
  font-size: 14px;
  font-weight: 700;
  transition: var(--transition);
}

.widget_search input[type="submit"]:hover {
  background: rgba(10,36,99,0.85);
}

/* ===== FOOTER ===== */
#colophon {
  background: #0a0f1e;
  color: #8899bb;
  padding: 50px 5% 30px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .site-title {
  color: #fff;
  font-size: 24px;
}

.footer-brand .site-title span {
  color: var(--accent);
}

.footer-brand p {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.8;
  color: #6677aa;
}

.footer-links h4 {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-links a {
  display: block;
  color: #6677aa;
  font-size: 14px;
  margin-bottom: 10px;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-links ul li {
  margin-bottom: 10px;
}

.footer-links ul li a {
  display: block;
  color: #6677aa;
  font-size: 14px;
  transition: var(--transition);
}

.footer-links ul li a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid #1a2240;
  padding-top: 25px;
  text-align: center;
  font-size: 14px;
  color: #445577;
}

.footer-bottom a {
  color: var(--accent);
}

/* ===== 404 PAGE ===== */
.error-404 {
  text-align: center;
  padding: 100px 5%;
}

.error-404 .error-code {
  font-size: 120px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  opacity: 0.1;
}

.error-404 h1 {
  font-size: 32px;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 16px;
}

.error-404 p {
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: 30px;
}

/* ===== SEARCH RESULTS ===== */
.search-results-header {
  background: var(--primary);
  color: #fff;
  padding: 40px 5%;
  text-align: center;
  margin-bottom: 40px;
}

.search-results-header h1 {
  font-size: 28px;
  font-weight: 800;
}

.search-results-header span {
  color: var(--accent);
}

/* ===== SCROLL TO TOP ===== */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 46px;
  height: 46px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(10,36,99,0.3);
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
  z-index: 999;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  background: var(--accent);
  transform: translateY(-3px);
}

/* ===== BREADCRUMB ===== */
.breadcrumb-nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 12px 5%;
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumb-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.breadcrumb-nav a {
  color: var(--primary);
  font-weight: 600;
  transition: var(--transition);
}

.breadcrumb-nav a:hover { color: var(--accent); }

.breadcrumb-home i { margin-left: 5px; color: var(--accent); }

.breadcrumb-sep {
  color: var(--border);
  font-size: 11px;
}

.breadcrumb-current {
  color: var(--text-muted);
  font-weight: 500;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== صور محسّنة ===== */
img {
  max-width: 100%;
  height: auto;
  display: block;
  /* تحسين جودة العرض */
  image-rendering: -webkit-optimize-contrast;
}

/* aspect-ratio للصور لمنع Layout Shift */
.featured-image-wrap img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
}

.card-icon img,
.tool-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

/* ===== PRINT STYLES ===== */
@media print {
  #masthead,
  #colophon,
  .menu-toggle,
  .scroll-to-top,
  .hero-btns,
  .breadcrumb-nav,
  .nav-links,
  .comment-form { display: none !important; }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  .entry-content a::after {
    content: " (" attr(href) ")";
    font-size: 10pt;
    color: #666;
  }

  .site-main article {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* ===================================================
   RESPONSIVE — Mobile First
   1200px → 992px → 768px → 480px → 360px
   =================================================== */

/* ---- لابتوب صغير ---- */
@media (max-width: 1200px) {
  .section { padding: 70px 4%; }
  .cards-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}

/* ---- تابلت ---- */
@media (max-width: 992px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .layout-with-sidebar {
    flex-direction: column;
  }
  #secondary {
    width: 100%;
  }
  .hero-section h1 { font-size: 36px; }
  .hero-stats { gap: 30px; }
  .stat-num { font-size: 30px; }
  .about-strip { padding: 36px; gap: 28px; }
  .tools-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

/* ---- موبايل كبير ---- */
@media (max-width: 768px) {
  /* --- الهيدر --- */
  #masthead { padding: 0 4%; }

  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 14px 0;
    gap: 10px;
    position: relative;
  }

  .site-branding { flex: 1; }

  .menu-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Tajawal', sans-serif;
    min-height: 44px;        /* حجم لمس مريح */
    min-width: 44px;
    justify-content: center;
  }

  #primary-navigation {
    width: 100%;
    display: none;
    border-top: 1px solid var(--border);
    padding-top: 8px;
  }

  #primary-navigation.active { display: flex; }

  #primary-menu {
    flex-direction: column;
    width: 100%;
    gap: 2px;
    padding-bottom: 8px;
  }

  #primary-menu li { width: 100%; }

  #primary-menu li a {
    padding: 12px 16px;
    display: block;
    width: 100%;
    font-size: 16px;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  #primary-menu .sub-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: var(--light-bg);
    border-radius: 8px;
    margin-top: 4px;
  }

  /* --- هيرو --- */
  .hero-section { padding: 64px 5% 56px; }
  .hero-section h1 { font-size: 28px; line-height: 1.4; }
  .hero-section .hero-desc { font-size: 16px; }
  .hero-btns { flex-direction: column; align-items: center; gap: 12px; }
  .btn-primary, .btn-outline {
    width: 100%;
    max-width: 320px;
    text-align: center;
    justify-content: center;
    padding: 14px 20px;
    font-size: 16px;
    min-height: 48px;
  }
  .hero-stats { gap: 20px; }
  .stat-num { font-size: 28px; }
  .stat-label { font-size: 13px; }

  /* --- about strip --- */
  .about-strip {
    flex-direction: column;
    text-align: center;
    padding: 28px 20px;
    margin: 30px 4%;
    gap: 20px;
  }
  .about-icon-wrap { margin: 0 auto; }

  /* --- sections --- */
  .section { padding: 56px 4%; }
  .section-title { font-size: 24px; }
  .section-sub { font-size: 15px; }

  /* --- cards --- */
  .cards-grid { grid-template-columns: 1fr; gap: 20px; }
  .service-card { padding: 28px 22px; }
  .tool-card { padding: 26px 22px; }
  .tools-grid { grid-template-columns: 1fr; gap: 16px; }
  .why-grid { grid-template-columns: 1fr 1fr; gap: 16px; }

  /* --- contact --- */
  .contact-card { padding: 36px 20px; }
  .contact-card h2 { font-size: 24px; }
  .contact-methods { flex-direction: column; align-items: center; }
  .contact-method { width: 100%; justify-content: center; }

  /* --- footer --- */
  .footer-top { grid-template-columns: 1fr; gap: 28px; }

  /* --- blog --- */
  .site-main article { padding: 22px 18px; }
  .entry-header .entry-title { font-size: 20px; }
  .post-navigation { grid-template-columns: 1fr; gap: 12px; }
  .comments-area { padding: 24px 18px; }

  /* --- sidebar --- */
  .layout-with-sidebar { padding: 0 4%; }

  /* --- scroll top --- */
  .scroll-to-top { bottom: 20px; left: 20px; width: 42px; height: 42px; }
}

/* ---- موبايل صغير ---- */
@media (max-width: 480px) {
  .hero-section { padding: 52px 4% 44px; }
  .hero-badge { font-size: 13px; padding: 5px 14px; }
  .hero-section h1 { font-size: 24px; }
  .stat-num { font-size: 24px; }
  .hero-stats { gap: 14px; }

  .cards-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }

  .about-strip { margin: 20px 4%; }

  .section-title { font-size: 22px; }
  .service-card h3, .tool-card h3 { font-size: 17px; }

  .contact-card { padding: 28px 16px; }
  .email-highlight { font-size: 15px; word-break: break-all; }

  .entry-header .entry-title { font-size: 18px; }
  .site-main article { padding: 18px 14px; }

  .entry-meta { gap: 10px; font-size: 12px; }

  .footer-bottom { font-size: 12px; }
  .footer-brand .site-title { font-size: 20px; }
}

/* ---- موبايل صغير جداً (320px) ---- */
@media (max-width: 360px) {
  .hero-section h1 { font-size: 21px; }
  .btn-primary, .btn-outline { font-size: 14px; padding: 12px 16px; }
  .stat-num { font-size: 20px; }
  .logo-icon { width: 36px; height: 36px; font-size: 16px; }
  .site-title { font-size: 18px; }
}

/* ===== لمس / Touch targets ===== */
@media (hover: none) and (pointer: coarse) {
  /* زيادة مناطق اللمس لجميع الأزرار والروابط */
  nav a, .card-btn, .tool-link, .btn-primary, .btn-outline,
  .contact-method, .read-more-link, .post-tag {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* إزالة hover effects على اللمس */
  .service-card:hover,
  .tool-card:hover,
  .why-item:hover {
    transform: none;
  }
}

/* ===== تفضيل تقليل الحركة (Accessibility) ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== وضع الظلام (Dark Mode) ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --light-bg: #0f172a;
    --card-bg: #1e293b;
    --text-dark: #e2e8f0;
    --text-muted: #94a3b8;
    --border: #334155;
    --shadow: 0 8px 32px rgba(0,0,0,0.3);
  }

  body { background: var(--light-bg); color: var(--text-dark); }

  .about-strip,
  .site-main article,
  .why-item,
  .contact-section,
  .comments-area,
  .widget,
  .post-navigation { background: var(--card-bg); }

  .service-card { background: var(--card-bg); border-color: var(--border); }

  #masthead {
    background: rgba(15,23,42,0.97);
    border-bottom-color: var(--accent);
  }

  #primary-menu li a { color: #94a3b8; }
  #primary-menu li a:hover { background: #1e293b; color: #e2e8f0; }

  .entry-content a { color: var(--accent); }

  .widget_search input[type="search"],
  .comment-form input,
  .comment-form textarea {
    background: #1e293b;
    border-color: var(--border);
    color: var(--text-dark);
  }
}
