/* Blog Page Styles - consistent with site theme */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Use existing CSS variables from site (light/dark supported) */
:root {
  --bg-primary: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
  --bg-primary-static: #f8fafc;
  --selector-highlight: #e2e8f0;
  --bg-radial-1: rgba(59, 130, 246, 0.1);
  --bg-radial-2: rgba(59, 130, 246, 0.08);
  --bg-radial-3: rgba(59, 130, 246, 0.05);
  --text-primary: #1a1a1a;
  --text-secondary: #334155;
  --text-muted: #475569;
  --text-light: #64748b;
  --card-bg: rgba(255, 255, 255, 0.8);
  --card-bg-alt: rgba(255, 255, 255, 0.9);
  --border-color: rgba(59, 130, 246, 0.2);
  --border-color-hover: rgba(59, 130, 246, 0.4);
  --service-bg: rgba(59, 130, 246, 0.08);
  --service-bg-hover: rgba(59, 130, 246, 0.12);
  --scrollbar-track: #e2e8f0;
}

[data-theme="dark"] {
  --bg-primary: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  --bg-primary-static: #0f172a;
  --selector-highlight: #1e293b;
  --bg-radial-1: rgba(59, 130, 246, 0.15);
  --bg-radial-2: rgba(59, 130, 246, 0.12);
  --bg-radial-3: rgba(59, 130, 246, 0.08);
  --text-primary: #f8fafc;
  --text-secondary: #e2e8f0;
  --text-muted: #cbd5e1;
  --text-light: #94a3b8;
  --card-bg: rgba(30, 41, 59, 0.8);
  --card-bg-alt: rgba(30, 41, 59, 0.9);
  --border-color: rgba(59, 130, 246, 0.3);
  --border-color-hover: rgba(59, 130, 246, 0.5);
  --service-bg: rgba(59, 130, 246, 0.15);
  --service-bg-hover: rgba(59, 130, 246, 0.2);
  --scrollbar-track: #334155;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at 20% 80%,
      var(--bg-radial-1) 0%,
      transparent 50%
    ),
    radial-gradient(circle at 80% 20%, var(--bg-radial-2) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, var(--bg-radial-3) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
  transition: background 0.3s ease;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* Page header */
.blog-hero {
  text-align: center;
  padding: 90px 0 40px;
}

.blog-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #a8cff2, #60a5fa, #3b82f6, #4f8efc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(59, 130, 246, 0.25);
  letter-spacing: -0.01em;
}

.blog-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
}

/* Article list */
.articles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin: 30px 0 80px;
}

.articles hr {
  margin: 16px 0;
  border: none;
  border-top: 1px solid var(--border-color);
}

.article-card {
  background: var(--card-bg);
  border-radius: 24px;
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1), inset 0 1px 0 var(--border-color);
  overflow: hidden;
}

.article-body {
  padding: 36px 32px;
}

.article-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: #3b82f6;
  letter-spacing: -0.01em;
}

.article-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.article-section-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: #3b82f6;
  margin-top: 26px;
  margin-bottom: 8px;
}

.article-paragraph {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 18px;
}

.article-list {
  margin: 8px 0 18px 22px;
  color: var(--text-secondary);
}

.article-list li {
  margin: 6px 0;
}

/* Arabic article (RTL) support */
.article-ar {
  direction: rtl;
  text-align: right;
}

.article-ar .article-body {
  font-family: "Segoe UI", Tahoma, Arial, "Inter", sans-serif;
}

.article-ar .article-title,
.article-ar .article-section-title {
  letter-spacing: 0;
}

.article-ar .article-list {
  margin: 8px 0 18px 0;
  padding-right: 22px;
}

.article-ar hr {
  margin: 16px 0;
  border: none;
  border-top: 1px solid var(--border-color);
}

/* Utility */
.spacer {
  height: 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .blog-title {
    font-size: 2.2rem;
  }
  .article-body {
    padding: 24px 20px;
  }
}
