/*
Theme Name: Madar SEO
Theme URI: https://example.com/madar-seo
Author: Madar
Author URI: https://example.com
Description: قالب عربي متجاوب لشركات تحسين محركات البحث، يتضمن صفحات الخدمات والباقات ومدونة متكاملة.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: madar-seo
Tags: rtl-language-support, blog, custom-logo, custom-menu, featured-images
*/

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&display=swap');

:root {
  --navy: #173d5c;
  --navy-dark: #102f49;
  --orange: #d98232;
  --orange-dark: #bd6821;
  --ink: #12263a;
  --muted: #687d8c;
  --line: #e3ebef;
  --soft: #edf4f7;
  --cream: #fff6ed;
  --white: #fff;
  --page: #fbfcff;
  --green: #25845f;
  --shadow: 0 25px 60px -44px rgba(23, 61, 92, .45);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: 'Cairo', sans-serif;
  direction: rtl;
  text-align: right;
}
body.admin-bar .site-header { top: 32px; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.site-header {
  position: fixed; z-index: 1000; top: 0; inset-inline: 0;
  border-bottom: 1px solid rgba(255,255,255,.7);
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(18px);
}
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid; width: 44px; height: 44px; place-items: center; flex: 0 0 auto;
  border-radius: 15px; background: var(--navy); color: var(--white);
  box-shadow: 0 10px 24px rgba(23,61,92,.2);
}
.brand-mark svg { width: 31px; }
.custom-logo { width: auto; max-height: 48px; }
.brand-name { display: block; font-size: 20px; font-weight: 900; line-height: 1; }
.brand-tag { display: block; margin-top: 5px; color: #6e8192; font-size: 9px; font-weight: 800; letter-spacing: .18em; }
.main-nav ul { display: flex; align-items: center; gap: 30px; padding: 0; margin: 0; list-style: none; }
.main-nav a { position: relative; color: #405b6f; font-size: 14px; font-weight: 800; transition: .2s; }
.main-nav a:hover, .main-nav .current-menu-item > a { color: var(--orange); }
.header-cta, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; border-radius: 14px; background: var(--orange); color: var(--white);
  padding: 13px 22px; font-size: 14px; font-weight: 800; cursor: pointer;
  box-shadow: 0 12px 25px rgba(217,130,50,.2); transition: .25s;
}
.button:hover, .header-cta:hover { transform: translateY(-2px); background: #c97328; color: var(--white); }
.button-dark { background: var(--navy); box-shadow: 0 12px 25px rgba(23,61,92,.18); }
.menu-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--white); color: var(--navy); cursor: pointer;
}

.hero, .inner-hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 20% 15%, rgba(217,130,50,.1), transparent 23rem),
    radial-gradient(circle at 85% 70%, rgba(78,143,181,.11), transparent 25rem),
    linear-gradient(rgba(23,61,92,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23,61,92,.035) 1px, transparent 1px);
  background-size: auto, auto, 48px 48px, 48px 48px;
}
.hero { padding: 170px 0 110px; }
.inner-hero { padding: 145px 0 90px; text-align: center; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.02fr .98fr; align-items: center; gap: 70px; }
.eyebrow, .kicker {
  display: inline-flex; align-items: center; gap: 8px; color: var(--orange-dark);
  font-size: 14px; font-weight: 900;
}
.eyebrow { border: 1px solid rgba(217,130,50,.2); border-radius: 999px; background: var(--cream); padding: 9px 16px; }
.kicker::before { content: ''; width: 22px; height: 2px; border-radius: 9px; background: var(--orange); }
.hero h1, .inner-hero h1 { margin: 24px 0 0; color: var(--navy-dark); font-size: clamp(42px, 5.4vw, 68px); line-height: 1.2; letter-spacing: -.03em; font-weight: 900; }
.inner-hero h1 { max-width: 850px; margin-inline: auto; font-size: clamp(38px, 5vw, 60px); }
.accent { color: var(--orange); }
.hero-copy, .inner-copy { max-width: 650px; margin: 24px 0 0; color: var(--muted); font-size: 18px; font-weight: 500; line-height: 2; }
.inner-copy { margin-inline: auto; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.trust-list { display: flex; flex-wrap: wrap; gap: 22px; padding: 0; margin: 30px 0 0; list-style: none; color: #597080; font-size: 13px; font-weight: 800; }
.trust-list li::before { content: '✓'; display: inline-grid; width: 21px; height: 21px; margin-left: 8px; place-items: center; border-radius: 50%; background: #eaf6f0; color: var(--green); }
.dashboard {
  position: relative; border: 1px solid var(--white); border-radius: 30px; background: var(--white);
  padding: 24px; box-shadow: 0 35px 90px -25px rgba(20,55,80,.28);
}
.dashboard-head, .metric-row, .chart-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.dashboard-head { margin-bottom: 22px; }
.dashboard-title strong, .dashboard-title small { display: block; }
.dashboard-title small { margin-top: 4px; color: #91a0aa; font-size: 11px; }
.growth { border-radius: 999px; background: #eaf7f1; color: var(--green); padding: 7px 12px; font-size: 12px; font-weight: 900; }
.metric-row { align-items: stretch; }
.metric { flex: 1; border-radius: 16px; background: #f7fafc; padding: 16px; }
.metric small { color: #8799a5; font-weight: 700; }
.metric strong { display: block; margin-top: 7px; color: var(--navy); font-size: 25px; }
.chart-box { margin-top: 18px; border: 1px solid #edf1f3; border-radius: 18px; padding: 18px; }
.bars { display: flex; align-items: end; gap: 10px; height: 140px; margin-top: 18px; }
.bars span { flex: 1; min-height: 20px; border-radius: 7px 7px 2px 2px; background: linear-gradient(var(--orange), #f1bd8d); }

.section { padding: 96px 0; }
.section-white { border-block: 1px solid #edf1f3; background: var(--white); }
.section-dark { background: #123752; color: var(--white); }
.section-heading { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.section-heading.left { max-width: none; margin-inline: 0; text-align: right; }
.section-title { margin: 14px 0 0; color: var(--navy); font-size: clamp(34px, 4vw, 50px); line-height: 1.3; font-weight: 900; }
.section-copy { margin: 16px 0 0; color: var(--muted); line-height: 2; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
  padding: 26px; box-shadow: var(--shadow); transition: .3s;
}
.card:hover { transform: translateY(-6px); border-color: #edc49f; }
.icon-box { display: grid; width: 54px; height: 54px; place-items: center; border-radius: 16px; background: var(--soft); color: var(--navy); font-size: 22px; font-weight: 900; }
.card h3 { margin: 22px 0 0; color: var(--navy); font-size: 20px; font-weight: 900; }
.card p { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 2; }
.card-link { display: flex; justify-content: space-between; margin-top: 22px; border-top: 1px solid #edf1f3; padding-top: 17px; color: var(--orange); font-size: 13px; font-weight: 900; }
.home-seo-article { display: grid; grid-template-columns: .72fr 1.28fr; align-items: center; gap: 34px; max-width: 1000px; margin: 0 auto 80px; padding: 38px; }
.home-seo-highlight { border-radius: 20px; background: var(--navy); padding: 30px; color: var(--white); }
.home-seo-highlight span { display: inline-flex; border-radius: 999px; background: rgba(255,255,255,.1); padding: 7px 11px; color: #f4b579; font-size: 12px; font-weight: 900; }
.home-seo-highlight strong { display: block; margin-top: 20px; font-size: 28px; line-height: 1.55; }
.home-seo-article h2 { margin: 15px 0 0; color: var(--navy); font-size: 28px; line-height: 1.6; }
.home-seo-article p { color: #617787; font-size: 15px; line-height: 2.1; }
.service-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 22px; border-top: 1px solid #edf1f3; padding-top: 17px; color: var(--orange); font-size: 13px; font-weight: 900; }
.service-whatsapp { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 999px; background: #e9f9ef; color: #159447; padding: 8px 12px; font-size: 12px; font-weight: 900; transition: .2s; }
.service-whatsapp:hover { background: #25d366; color: var(--white); }
.service-whatsapp-wide { width: fit-content; margin-top: 22px; border-radius: 12px; padding: 12px 16px; }
.service-price { display: flex; align-items: end; gap: 8px; width: fit-content; margin-top: 18px; border-radius: 13px; background: #f3f8fa; padding: 11px 14px; }
.service-price span, .service-price small { color: #718491; font-size: 11px; font-weight: 800; }
.service-price strong { color: var(--navy); font-size: 23px; line-height: 1; }
.service-price-large { width: 100%; justify-content: space-between; margin-top: 16px; border: 1px solid var(--line); background: var(--white); padding: 18px; }
.service-price-large strong { margin-right: auto; font-size: 30px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stat strong { display: block; color: var(--navy); font-size: 48px; font-weight: 900; }
.stat span { font-weight: 800; }
.progress { height: 6px; margin-top: 28px; overflow: hidden; border-radius: 99px; background: #edf1f3; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--orange); }

.articles-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 40px; }
.article-card { overflow: hidden; padding: 0; }
.article-image { display: block; overflow: hidden; aspect-ratio: 16 / 10; background: var(--soft); }
.article-image img { width: 100%; height: 100%; object-fit: cover; transition: .5s; }
.article-card:hover .article-image img { transform: scale(1.05); }
.article-body { padding: 24px; }
.article-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #8b9aa5; font-size: 12px; font-weight: 800; }
.category { border-radius: 999px; background: var(--cream); color: var(--orange-dark); padding: 7px 11px; }
.article-card h2, .article-card h3 { margin: 15px 0 0; color: var(--navy); font-size: 19px; line-height: 1.7; font-weight: 900; }
.article-card .excerpt { min-height: 56px; }
.post-featured { display: grid; grid-template-columns: 1.05fr .95fr; overflow: hidden; margin-bottom: 55px; padding: 0; }
.post-featured .article-image { aspect-ratio: auto; min-height: 390px; }
.post-featured .article-body { display: flex; flex-direction: column; justify-content: center; padding: 42px; }
.post-featured h2 { font-size: 30px; }

.service-row { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 34px; margin-bottom: 24px; padding: 38px; }
.service-row:nth-child(even) .service-intro { order: 2; }
.service-list { border-radius: 18px; background: #f5f8fa; padding: 25px; }
.service-list h3 { margin-top: 0; }
.check-list { display: grid; gap: 14px; padding: 0; margin: 20px 0 0; list-style: none; }
.check-list li { color: #526b7c; font-size: 14px; font-weight: 700; }
.check-list li::before { content: '✓'; display: inline-grid; width: 24px; height: 24px; margin-left: 10px; place-items: center; border-radius: 50%; background: #e4f3ec; color: var(--green); }
.service-label { color: var(--orange); font-size: 12px; font-weight: 900; letter-spacing: .1em; }
.service-row h2 { margin: 20px 0 0; color: var(--navy); font-size: 29px; }
.service-row p { color: var(--muted); line-height: 2; }
.service-detail-hero { text-align: right; }
.service-hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: 55px; }
.service-detail-hero h1 { margin-inline: 0; }
.service-summary { padding: 34px; }
.service-summary h2 { margin-top: 20px; color: var(--navy); font-size: 25px; line-height: 1.7; }
.service-audience { margin-top: 25px; border-radius: 18px; background: #f4f8fa; padding: 20px; }
.service-audience strong { color: var(--orange); font-size: 12px; }
.service-audience p { margin-bottom: 0; color: #536c7d; line-height: 2; }
.whatsapp-button { background: #25d366; box-shadow: 0 12px 25px rgba(37,211,102,.2); }
.whatsapp-button:hover { background: #1ebd5a; }
.scope-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 55px; }
.scope-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.scope-card { background: #fbfcfd; box-shadow: none; }
.scope-card small { display: block; margin-top: 18px; color: #c2d0d8; font-weight: 900; }
.service-white-title { color: var(--white); }
.service-steps article { border: 1px solid rgba(255,255,255,.1); border-radius: 20px; background: rgba(255,255,255,.06); padding: 25px; }
.service-steps strong { color: #f2a45c; font-size: 18px; }
.service-steps h3 { margin: 18px 0 0; }
.service-steps p { color: #b4c6d2; font-size: 14px; line-height: 2; }
.service-article { max-width: 850px; margin-inline: auto; padding: 40px; }
.service-article h2 { margin: 20px 0 0; color: var(--navy); font-size: clamp(28px, 4vw, 40px); line-height: 1.55; }
.service-article > p { color: #617787; line-height: 2.1; }
.service-article-note { margin-top: 24px; border-radius: 18px; background: #f3f8fa; padding: 20px; color: #294d66; }
.service-article-note p { margin-bottom: 0; color: #617787; font-size: 14px; line-height: 2; }

.packages { align-items: stretch; }
.package { position: relative; display: flex; flex-direction: column; padding: 30px; }
.package.featured { transform: translateY(-14px); border-color: var(--orange); box-shadow: 0 28px 70px -38px rgba(217,130,50,.45); }
.popular { position: absolute; top: -17px; inset-inline: 28px; border-radius: 999px; background: var(--orange); color: var(--white); padding: 8px; text-align: center; font-size: 12px; font-weight: 900; }
.package h2 { margin: 20px 0 0; color: var(--navy); font-size: 29px; }
.package-desc { min-height: 55px; }
.price { margin: 22px 0; border-block: 1px solid var(--line); padding: 22px 0; }
.price strong { color: var(--navy); font-size: 46px; font-weight: 900; }
.price span { color: var(--muted); font-size: 13px; font-weight: 800; }
.package .check-list { flex: 1; }
.package .button { margin-top: 28px; }
.package-article-section { padding: 65px 0 10px; }
.package-intro { max-width: 850px; margin-inline: auto; padding: 40px; }
.package-intro h2 { margin: 18px 0 0; color: var(--navy); font-size: clamp(28px, 4vw, 40px); line-height: 1.55; }
.package-intro p { color: #617787; font-size: 15px; line-height: 2.1; }
.package-note { margin-top: 22px !important; border-radius: 18px; background: #f3f8fa; padding: 20px; color: #294d66 !important; font-weight: 800; }
.packages-more { margin: 35px 0 0; text-align: center; }
.packages-more a { color: var(--orange); font-weight: 900; }

.cta { padding: 80px 0; }
.cta-panel { position: relative; overflow: hidden; border-radius: 34px; background: var(--navy); padding: 70px 30px; color: var(--white); text-align: center; box-shadow: 0 30px 80px -40px rgba(18,55,82,.65); }
.cta-panel h2 { max-width: 800px; margin: 20px auto 0; font-size: clamp(32px, 4vw, 50px); line-height: 1.35; }
.cta-panel p { max-width: 680px; margin: 18px auto 0; color: #bed0dc; line-height: 2; }
.cta-panel .button { margin-top: 28px; }

.site-footer { border-top: 1px solid #edf1f3; background: var(--white); }
.footer-main { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 60px; padding-block: 55px; }
.footer-about { max-width: 420px; color: #718493; font-size: 14px; line-height: 2; }
.footer-title { margin: 0 0 18px; font-size: 16px; font-weight: 900; }
.footer-links { display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; color: #718493; font-size: 14px; font-weight: 700; }
.footer-links a:hover { color: var(--orange); }
.footer-bottom { border-top: 1px solid #edf1f3; padding: 20px 0; color: #91a0aa; font-size: 12px; font-weight: 700; text-align: center; }
.whatsapp-float {
  position: fixed; z-index: 1100; right: 22px; bottom: 22px; display: flex; align-items: center; gap: 9px;
  border: 3px solid var(--white); border-radius: 999px; background: #25d366; color: var(--white);
  padding: 12px 16px; font-size: 13px; font-weight: 900;
  box-shadow: 0 14px 35px rgba(17,94,48,.28); transition: .25s;
}
.whatsapp-float:hover { transform: translateY(-4px); background: #1ebd5a; color: var(--white); }
.whatsapp-float svg { width: 25px; height: 25px; flex: 0 0 auto; }

.content-area { padding: 150px 0 80px; }
.single-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 45px; }
.entry-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); padding: 38px; box-shadow: var(--shadow); }
.entry-title { margin: 0; color: var(--navy); font-size: clamp(32px, 4vw, 48px); line-height: 1.4; }
.entry-meta { margin-top: 15px; color: #8799a5; font-size: 13px; font-weight: 700; }
.entry-thumbnail { margin: 28px 0; overflow: hidden; border-radius: 20px; }
.entry-content { color: #405b6f; font-size: 17px; line-height: 2.1; }
.entry-content h2, .entry-content h3 { color: var(--navy); }
.sidebar-box { position: sticky; top: 105px; height: fit-content; border: 1px solid var(--line); border-radius: 20px; background: var(--white); padding: 24px; }
.pagination { margin-top: 40px; text-align: center; }
.pagination .page-numbers { display: inline-grid; min-width: 40px; height: 40px; margin: 3px; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.pagination .current { background: var(--navy); color: var(--white); }
.empty-state { grid-column: 1 / -1; border: 1px dashed #ccd9e0; border-radius: 22px; padding: 45px; text-align: center; }

@media (max-width: 960px) {
  body.admin-bar .site-header { top: 46px; }
  .main-nav, .header-cta { display: none; }
  .menu-toggle { display: grid; place-items: center; }
  .main-nav.is-open { display: block; position: absolute; top: 76px; inset-inline: 0; border-top: 1px solid var(--line); background: var(--white); padding: 12px 20px 20px; box-shadow: 0 20px 30px rgba(23,61,92,.12); }
  .main-nav.is-open ul { display: grid; gap: 0; }
  .main-nav.is-open a { display: block; border-bottom: 1px solid #edf1f3; padding: 13px 0; }
  .hero-grid, .service-row, .post-featured, .single-wrap, .service-hero-grid, .scope-grid, .home-seo-article { grid-template-columns: 1fr; }
  .hero-grid { gap: 55px; }
  .grid-3, .packages { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .service-row:nth-child(even) .service-intro { order: 0; }
  .package.featured { transform: none; }
}

@media (max-width: 680px) {
  .container { width: min(100% - 28px, 1180px); }
  .hero { padding: 125px 0 75px; }
  .inner-hero { padding: 120px 0 70px; }
  .hero h1, .inner-hero h1 { font-size: 39px; }
  .hero-copy, .inner-copy { font-size: 16px; }
  .dashboard { padding: 16px; }
  .section { padding: 72px 0; }
  .grid-3, .grid-4, .stats, .packages, .footer-main { grid-template-columns: 1fr; }
  .scope-cards { grid-template-columns: 1fr; }
  .articles-head { align-items: start; flex-direction: column; }
  .footer-main { gap: 32px; }
  .service-row { padding: 24px; }
  .entry-card { padding: 23px; }
  .content-area { padding-top: 120px; }
  .whatsapp-float { right: 14px; bottom: 14px; width: 56px; height: 56px; justify-content: center; padding: 0; }
  .whatsapp-float span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
