/*
Theme Name: AI For Arabs
Theme URI: https://aiforarabs.tech
Author: Habeeb
Description: قالب ووردبريس مخصص لموقع AI For Arabs — دليل أدوات وأخبار وبرومبتات ومقالات الذكاء الاصطناعي بالعربي.
Version: 2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aiforarabs
*/

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

/* ═══ الخلفية الموحدة ═══ */
body {
  font-family: 'Cairo', sans-serif;
  background-color: #ffffff;
  background-image: radial-gradient(#cccccc 1px, #ffffff 1px);
  background-size: 24px 24px;
  color: #0a0a0a;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ═══ NAVBAR ═══ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 60px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
  background: #ffffff;
  border-bottom: 1px solid #e4e4e0;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark {
  width: 32px; height: 32px; background: #0a0a0a; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 14px; font-weight: 900;
}
.logo-text { font-size: 15px; font-weight: 800; color: #0a0a0a; }
.nav-links {
  display: flex; gap: 2px; background: #f2f2ef;
  padding: 4px; border-radius: 100px; border: 1px solid #e4e4e0;
}
.nav-links a {
  text-decoration: none; font-size: 13px; font-weight: 700; color: #727270;
  padding: 6px 18px; border-radius: 100px; transition: all 0.2s;
}
.nav-links a.active, .nav-links a.current-menu-item { background: #ffffff; color: #0a0a0a; box-shadow: 0 1px 4px rgba(0,0,0,0.1); }
.nav-right { display: flex; gap: 8px; }
.menu-toggle {
  display: none; width: 38px; height: 38px; align-items: center; justify-content: center;
  background: #ffffff; border: 1.5px solid #e4e4e0; border-radius: 100px;
  font-size: 16px; color: #0a0a0a; cursor: pointer;
}
.mobile-menu {
  display: none; position: fixed; top: 60px; left: 0; right: 0; z-index: 99;
  background: #ffffff; border-bottom: 1px solid #e4e4e0;
  padding: 10px 20px 16px; flex-direction: column; gap: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  text-decoration: none; font-size: 14px; font-weight: 700; color: #525250;
  padding: 12px 14px; border-radius: 12px; transition: all 0.2s;
}
.mobile-menu a.active { background: #f2f2ef; color: #0a0a0a; }

/* ═══ HERO ═══ */
.hero {
  padding: 120px 40px 48px;
  text-align: center;
  background-color: #ffffff;
  background-image: radial-gradient(#cccccc 1px, #ffffff 1px);
  background-size: 24px 24px;
}
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: #ffffff; border: 1px solid #e4e4e0; border-radius: 100px;
  padding: 6px 16px 6px 8px; font-size: 12px; font-weight: 700; color: #525250;
  margin-bottom: 24px; box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.pill-dot {
  width: 22px; height: 22px; background: #0a0a0a; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: white; font-size: 10px;
}
h1 {
  font-size: clamp(28px, 5vw, 54px); font-weight: 900; color: #0a0a0a;
  line-height: 1.15; letter-spacing: -1.5px; margin-bottom: 16px;
}
.word-anim { display: inline-block; animation: colors 3s ease-in-out infinite; }
.search-wrap { max-width: 540px; margin: 32px auto 0; position: relative; }
.search-input {
  width: 100%; padding: 16px 52px 16px 20px;
  font-family: 'Cairo', sans-serif; font-size: 15px; font-weight: 500;
  color: #0a0a0a; background: #ffffff;
  border: 1.5px solid #e4e4e0; border-radius: 100px;
  outline: none; text-align: right; direction: rtl;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  transition: border-color 0.2s;
}
.search-input:focus { border-color: #0a0a0a; }
.search-input::placeholder { color: #a0a09a; }
.search-btn {
  position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; background: #0a0a0a; border: none; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.search-btn svg { width: 16px; height: 16px; stroke: white; fill: none; stroke-width: 2.5; stroke-linecap: round; }
.tags { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.tag {
  padding: 6px 14px; background: #ffffff; border: 1.5px solid #e4e4e0;
  border-radius: 100px; font-size: 13px; font-weight: 700; color: #525250;
  cursor: pointer; transition: all 0.18s; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.tag:hover { background: #0a0a0a; color: white; border-color: #0a0a0a; }

/* ═══ SECTIONS ═══ */
.section { max-width: 1160px; margin: 0 auto; padding: 48px 40px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; }
.sec-title { font-size: 22px; font-weight: 900; color: #0a0a0a; letter-spacing: -0.5px; }
.sec-actions { display: flex; align-items: center; gap: 8px; }
.see-all {
  font-size: 13px; font-weight: 700; color: #525250; text-decoration: none;
  padding: 7px 14px; background: #ffffff; border: 1.5px solid #e4e4e0;
  border-radius: 100px; transition: all 0.18s; flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.see-all:hover { background: #0a0a0a; color: white; border-color: #0a0a0a; }

/* ═══ CAROUSEL ═══ */
.carousel-wrap { overflow: hidden; margin: 0 -40px; padding: 6px 40px; }
.carousel-track { display: flex; gap: 14px; user-select: none; cursor: grab; transition: transform 0.4s cubic-bezier(0.25,0.46,0.45,0.94); }
.carousel-track:active { cursor: grabbing; }

.news-card {
  flex-shrink: 0;
  width: 76vw; max-width: 320px;
  background: #ffffff; border: 1.5px solid #e4e4e0; border-radius: 18px;
  overflow: hidden; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.news-card:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,0,0,0.12); border-color: #0a0a0a; }

.card-img {
  width: 100%; aspect-ratio: 16/9; background: linear-gradient(135deg, #f2f2ef, #e4e4e0);
  display: flex; align-items: center; justify-content: center; font-size: 42px;
  border-bottom: 1.5px solid #e4e4e0; position: relative; overflow: hidden;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-date {
  position: absolute; top: 10px; right: 10px;
  background: rgba(255,255,255,0.95); border: 1px solid #e4e4e0; border-radius: 100px;
  padding: 3px 10px; font-size: 11px; font-weight: 700; color: #727270;
}
.card-body { padding: 14px 16px 16px; }
.card-cat {
  display: inline-block; font-size: 10px; font-weight: 800; color: #0a0a0a;
  background: #f2f2ef; border: 1px solid #e4e4e0; padding: 3px 8px;
  border-radius: 100px; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.3px;
}
.card-title {
  font-size: 14px; font-weight: 800; color: #0a0a0a; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 6px;
}
.card-title a { color: inherit; text-decoration: none; }
.card-excerpt {
  font-size: 12px; color: #727270; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 16px; }
.dot {
  width: 6px; height: 6px; border-radius: 50%; background: #c8c8c2;
  border: none; cursor: pointer; padding: 0; transition: all 0.25s;
}
.dot.on { background: #0a0a0a; width: 20px; border-radius: 3px; }

/* ═══ ARTICLES (أدلة ومقالات) ═══ */
.articles-list { display: flex; flex-direction: column; gap: 12px; }
.article-item {
  display: flex; align-items: center; gap: 16px;
  background: #ffffff; border: 1.5px solid #e4e4e0; border-radius: 18px;
  padding: 14px 16px; text-decoration: none; color: inherit; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05); transition: all 0.2s;
}
.article-item:hover { border-color: #0a0a0a; transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,0.12); }
.article-img {
  width: 56px; height: 56px; flex-shrink: 0; border-radius: 12px;
  background: linear-gradient(135deg, #f2f2ef, #e4e4e0); border: 1.5px solid #e4e4e0;
  display: flex; align-items: center; justify-content: center; font-size: 26px; overflow: hidden;
}
.article-img img { width: 100%; height: 100%; object-fit: cover; }
.article-body { flex: 1; min-width: 0; }
.article-title { font-size: 14px; font-weight: 800; color: #0a0a0a; margin-bottom: 4px; }
.article-excerpt {
  font-size: 12px; color: #727270; line-height: 1.5; margin-bottom: 4px;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.article-meta { font-size: 11px; color: #a0a09a; font-weight: 700; }

/* ═══ TOOLS ═══ */
.tools-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.tool-card {
  background: #ffffff; border: 1.5px solid #e4e4e0; border-radius: 18px;
  padding: 18px 16px 14px; cursor: pointer; display: flex; flex-direction: column;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05); transition: all 0.2s cubic-bezier(0.34,1.4,0.64,1);
}
.tool-card:hover { border-color: #0a0a0a; transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,0,0,0.12); }
.tool-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.tool-icon {
  width: 42px; height: 42px; border-radius: 10px; background: #f2f2ef;
  border: 1.5px solid #e4e4e0; display: flex; align-items: center; justify-content: center; font-size: 20px;
  overflow: hidden;
}
.tool-icon img { width: 100%; height: 100%; object-fit: cover; }
.badge { font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 100px; }
.free { color: #15803d; background: #f0fdf4; border: 1.5px solid #bbf7d0; }
.paid { color: #b45309; background: #fefce8; border: 1.5px solid #fde68a; }
.partial { color: #1d4ed8; background: #eff6ff; border: 1.5px solid #bfdbfe; }
.tool-name { font-size: 14px; font-weight: 800; color: #0a0a0a; margin-bottom: 6px; }
.tool-name a { color: inherit; text-decoration: none; }
.tool-desc { font-size: 12px; color: #727270; line-height: 1.5; flex: 1; margin-bottom: 12px; }
.tool-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid #f2f2ef; }
.tool-cat { font-size: 10px; font-weight: 700; color: #a0a09a; text-transform: uppercase; }
.tool-arrow {
  width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #e4e4e0;
  display: flex; align-items: center; justify-content: center; color: #a0a09a; font-size: 11px; transition: all 0.2s;
}
.tool-card:hover .tool-arrow { background: #0a0a0a; border-color: #0a0a0a; color: white; }

/* ═══ PAGINATION ═══ */
.page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 10px; margin: 0 4px 0 0;
  border: 1.5px solid #e4e4e0; border-radius: 100px;
  font-size: 13px; font-weight: 700; color: #525250; text-decoration: none;
  transition: all 0.2s;
}
.page-numbers.current, .page-numbers:hover { background: #0a0a0a; color: #fff; border-color: #0a0a0a; }
.page-numbers.dots { border: none; }

/* ═══ NEWSLETTER ═══ */
.newsletter {
  background: #0a0a0a; border-radius: 24px; padding: 40px 44px;
  text-align: center; box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.newsletter-tag {
  display: inline-flex; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px; padding: 4px 12px; font-size: 11px; font-weight: 700;
  color: rgba(255,255,255,0.65); margin-bottom: 12px;
}
.newsletter-title { font-size: 24px; font-weight: 900; color: white; letter-spacing: -0.5px; margin-bottom: 8px; }
.newsletter-desc { font-size: 14px; color: rgba(255,255,255,0.5); line-height: 1.6; max-width: 420px; margin: 0 auto 24px; }
.newsletter-form { display: flex; gap: 10px; max-width: 420px; margin: 0 auto; }
.newsletter-input {
  flex: 1; padding: 14px 20px; font-family: 'Cairo', sans-serif; font-size: 14px; font-weight: 500;
  color: #0a0a0a; background: #ffffff; border: none; border-radius: 100px;
  outline: none; text-align: right; direction: rtl;
}
.newsletter-btn {
  font-family: 'Cairo', sans-serif; font-size: 14px; font-weight: 800;
  color: #0a0a0a; background: white; border: none; padding: 0 24px;
  border-radius: 100px; cursor: pointer; flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2); transition: all 0.2s;
}
.newsletter-btn:hover { transform: translateY(-2px); }

/* ═══ FOOTER ═══ */
footer { background: #0a0a0a; color: white; padding: 44px 0 24px; margin-top: 60px; }
.footer-inner {
  max-width: 1160px; margin: 0 auto; padding: 0 40px 36px;
  display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap;
}
.footer-brand .logo-mark { background: white; color: #0a0a0a; margin-bottom: 10px; }
.footer-brand .logo-text { color: white; }
.footer-desc { font-size: 13px; color: rgba(255,255,255,0.4); line-height: 1.7; max-width: 220px; margin-top: 10px; }
.footer-col h5 { font-size: 11px; font-weight: 800; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 12px; }
.footer-col ul { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; }
.footer-col ul a { font-size: 13px; color: rgba(255,255,255,0.55); text-decoration: none; transition: color 0.15s; }
.footer-col ul a:hover { color: white; }
.footer-bottom {
  max-width: 1160px; margin: 0 auto; padding: 18px 40px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.footer-bottom p { font-size: 12px; color: rgba(255,255,255,0.3); }

/* ═══ ANIMATIONS ═══ */
@keyframes colors {
  0%   { color: #0a0a0a; }
  15%  { color: #c084fc; }
  30%  { color: #60a5fa; }
  45%  { color: #34d399; }
  60%  { color: #f97316; }
  75%  { color: #f43f5e; }
  90%  { color: #facc15; }
  100% { color: #0a0a0a; }
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  nav { padding: 0 20px; justify-content: center; }
  .nav-links { display: none; }
  .nav-right { display: none; }
  .menu-toggle { display: flex; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); }
  .footer-brand { width: 100%; text-align: center; }
  .footer-brand .logo { justify-content: center; }
  .footer-desc { margin-left: auto; margin-right: auto; }
  .hero { padding: 90px 20px 40px; }
  .section { padding: 40px 20px; }
  .carousel-wrap { margin: 0 -20px; padding: 6px 20px; }
  .tools-grid { grid-template-columns: 1fr 1fr; }
  .newsletter { padding: 28px 20px; }
  .newsletter-form { flex-direction: column; }
  .newsletter-btn { padding: 12px 24px; }
  .footer-inner { padding: 0 20px 28px; flex-direction: column; gap: 20px; }
  .footer-bottom { padding: 14px 20px 0; flex-direction: column; text-align: center; }
}
