/* ===== Driblo Blog Styles ===== */
:root {
  --orange: #F26A21;
  --charcoal: #0F1115;
  --offwhite: #F7F7F5;
  --gray: #6B7280;
  --border: #E6E2DD;
  --max-width: 820px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "IBM Plex Sans Arabic", -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
  background: var(--offwhite);
  color: var(--charcoal);
  line-height: 1.8;
  direction: rtl;
  text-align: right;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--orange); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .75; }

/* ===== Navbar (matches main site) ===== */
.nav {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(230, 226, 221, 0.6);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 20px rgba(15, 17, 21, 0.04);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 24px;
  font-weight: 800;
  color: var(--charcoal);
  letter-spacing: -0.6px;
  line-height: 1;
}
.logo svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--orange);
  transform: rotate(-8deg);
}
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
  list-style: none;
}
.nav-links a {
  color: var(--charcoal);
  font-weight: 600;
  font-size: 15px;
  transition: color .2s;
}
.nav-links a:not(.nav-cta):hover { color: var(--orange); opacity: 1; }
.nav-cta {
  background: var(--orange);
  color: #fff !important;
  padding: 11px 22px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 4px 14px rgba(242, 106, 33, 0.25);
  transition: transform .2s, box-shadow .2s;
}
.nav-cta:hover {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(242, 106, 33, 0.35);
}

/* ===== Container ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px;
}
.container-wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px;
}

/* ===== Blog Listing ===== */
.blog-hero {
  text-align: center;
  padding: 64px 24px 48px;
  max-width: 720px;
  margin: 0 auto;
}
.blog-hero h1 {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 16px;
  letter-spacing: -1px;
}
.blog-hero p {
  color: var(--gray);
  font-size: 18px;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 80px;
}
.post-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(15,17,21,0.08);
}
.post-meta {
  display: flex;
  gap: 12px;
  color: var(--gray);
  font-size: 13px;
  margin-bottom: 12px;
}
.post-meta span { display: inline-flex; align-items: center; gap: 4px; }
.post-card h2 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 12px;
  color: var(--charcoal);
}
.post-card p {
  color: var(--gray);
  margin-bottom: 20px;
  flex-grow: 1;
  font-size: 15px;
}
.post-read {
  color: var(--orange);
  font-weight: 600;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ===== Article Page ===== */
.breadcrumb {
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 24px;
}
.breadcrumb a { color: var(--gray); }
.breadcrumb a:hover { color: var(--orange); }

.article-header { margin-bottom: 40px; }
.article-header h1 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}
.article-meta {
  color: var(--gray);
  font-size: 14px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.article-content h2 {
  font-size: 26px;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 16px;
  color: var(--charcoal);
}
.article-content h3 {
  font-size: 20px;
  font-weight: 700;
  margin-top: 28px;
  margin-bottom: 12px;
}
.article-content p {
  margin-bottom: 18px;
  color: #2a2d33;
}
.article-content ul, .article-content ol {
  margin: 0 24px 18px 0;
  padding-right: 8px;
}
.article-content li {
  margin-bottom: 8px;
  color: #2a2d33;
}
.article-content strong { color: var(--charcoal); font-weight: 700; }

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.article-content th, .article-content td {
  padding: 12px 16px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.article-content th {
  background: #f3f1ee;
  font-weight: 700;
}
.article-content tr:last-child td { border-bottom: none; }

.article-content blockquote {
  border-right: 4px solid var(--orange);
  background: #fff;
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 4px;
  color: #2a2d33;
  font-style: italic;
}

/* ===== CTA Box ===== */
.cta-box {
  background: linear-gradient(135deg, var(--charcoal) 0%, #1f2128 100%);
  color: #fff;
  padding: 40px 32px;
  border-radius: 16px;
  text-align: center;
  margin: 48px 0;
}
.cta-box h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}
.cta-box p {
  color: #c9cdd4;
  margin-bottom: 24px;
}
.cta-btn {
  display: inline-block;
  background: var(--orange);
  color: #fff !important;
  padding: 14px 32px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 16px;
}

/* ===== Related Articles ===== */
.related {
  border-top: 1px solid var(--border);
  padding-top: 40px;
  margin-top: 56px;
}
.related h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.related-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  color: var(--charcoal) !important;
}
.related-card:hover {
  border-color: var(--orange);
  opacity: 1;
}
.related-card h4 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}

/* ===== Footer ===== */
.footer {
  background: var(--charcoal);
  color: #c9cdd4;
  padding: 40px 24px;
  text-align: center;
  font-size: 14px;
  margin-top: 64px;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.footer-links a { color: #c9cdd4; }
.footer-links a:hover { color: var(--orange); }

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .nav-inner { padding: 14px 18px; min-height: 62px; }
  .nav-links { gap: 14px; }
  .logo { font-size: 20px; }
  .logo svg { width: 18px; height: 18px; }
  .nav-links a:not(.nav-cta) { font-size: 14px; }
  .nav-cta { padding: 9px 14px; font-size: 13px; }
  .blog-hero h1 { font-size: 28px; }
  .blog-hero p { font-size: 16px; }
  .article-header h1 { font-size: 26px; }
  .article-content h2 { font-size: 22px; }
  .article-content h3 { font-size: 18px; }
  body { font-size: 16px; }
  .container { padding: 32px 20px; }
}
