/* Blog listing + article (scoped; avoids clash with site .hero) */

/* ── Latest posts horizontal scroll ── */
.blog-latest-section {
  padding: 48px 0 32px;
  background: var(--bg-gray, #f4f6fa);
  border-block-end: 1px solid var(--border-color, #dde3ec);
}

.blog-latest-head {
  max-width: 1280px;
  margin: 0 auto 20px;
  padding: 0 24px;
}

.blog-latest-title {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.blog-latest-sub {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.6;
}

[dir="rtl"] .blog-latest-head {
  text-align: center;
}

[dir="rtl"] .blog-latest-title,
[dir="rtl"] .blog-post-card__title {
  font-family: "Cairo", sans-serif;
}

.blog-latest-outer {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.blog-latest-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 4px 20px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.blog-latest-rail::-webkit-scrollbar {
  height: 8px;
}

.blog-latest-rail::-webkit-scrollbar-thumb {
  background: rgba(13, 59, 110, 0.25);
  border-radius: 8px;
}

.blog-post-card {
  flex: 0 0 min(320px, 85vw);
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 22px 20px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 20px rgba(9, 20, 37, 0.06);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  min-height: 160px;
}

a.blog-post-card:hover {
  border-color: rgba(0, 212, 245, 0.45);
  box-shadow: 0 8px 28px rgba(0, 212, 245, 0.12);
  transform: translateY(-2px);
}

.blog-post-card--placeholder {
  pointer-events: none;
  opacity: 0.55;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 600;
  color: var(--text-muted);
}

.blog-post-card__tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent, #00d4f5);
  margin-bottom: 10px;
}

.blog-post-card__title {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.blog-post-card__meta {
  margin-top: auto;
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ── Dark article shell (Arabic long-form) ── */
.cs-blog-root {
  --cs-abyss: #091425;
  --cs-command: #0d3b6e;
  --cs-cyan: #00d4f5;
  --cs-amber: #f5a623;
  --cs-white: #ffffff;
  --cs-text-muted: rgba(255, 255, 255, 0.6);
  --cs-surface: rgba(13, 59, 110, 0.25);
  --cs-border: rgba(0, 212, 245, 0.15);
  background: var(--cs-abyss);
  color: var(--cs-white);
  font-family: "Cairo", sans-serif;
  line-height: 1.85;
  scroll-margin-top: 96px;
}

.cs-blog-progress {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  top: auto;
  height: 3px;
  /* Explicit color: this bar sits outside .cs-blog-root, so --cs-cyan is not inherited */
  --cs-cyan: #00d4f5;
  background: var(--cs-cyan);
  z-index: 110;
  width: 0%;
  transition: width 0.1s linear;
  /* Glow reads better along the bottom edge of the viewport */
  box-shadow: 0 -2px 12px rgba(0, 212, 245, 0.55);
  pointer-events: none;
}

.cs-blog-back-bar {
  background: rgba(7, 10, 18, 0.92);
  border-bottom: 1px solid rgba(0, 212, 245, 0.12);
  padding: 10px 0;
  position: relative;
  z-index: 2;
}

.cs-blog-back-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  justify-content: space-between;
}

[dir="rtl"] .cs-blog-back-bar__inner {
  flex-direction: row-reverse;
}

.cs-blog-back-bar__link {
  color: var(--cs-cyan);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}

.cs-blog-back-bar__link:hover {
  text-decoration: underline;
}

.cs-blog-back-bar__link--secondary {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
}

.cs-blog-article-hero {
  position: relative;
  min-height: min(88vh, 720px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 1.5rem 3rem;
  overflow: hidden;
}

.cs-blog-article-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(0, 212, 245, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 245, 0.04) 1px, transparent 1px);
  background-size: 52px 52px;
  animation: cs-blog-grid-drift 18s linear infinite;
  pointer-events: none;
}

@keyframes cs-blog-grid-drift {
  0% {
    background-position: 0 0, 0 0;
  }
  100% {
    background-position: 0 52px, 52px 0;
  }
}

.cs-blog-article-hero::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(680px, 90vw);
  height: min(680px, 90vw);
  background: radial-gradient(circle, rgba(0, 212, 245, 0.1) 0%, transparent 70%);
  pointer-events: none;
  animation: cs-blog-breathe 5s ease-in-out infinite;
}

@keyframes cs-blog-breathe {
  0%,
  100% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

.cs-blog-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.cs-blog-hero-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--cs-cyan);
  text-transform: uppercase;
  border: 1px solid rgba(0, 212, 245, 0.35);
  padding: 0.3rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.8rem;
  animation: cs-blog-fade-up 0.8s ease both;
}

.cs-blog-article-hero h1 {
  font-size: clamp(1.75rem, 5vw, 3.25rem);
  font-weight: 900;
  line-height: 1.25;
  color: var(--cs-white);
  margin-bottom: 1.4rem;
  animation: cs-blog-fade-up 0.9s 0.1s ease both;
}

.cs-blog-article-hero h1 span {
  color: var(--cs-cyan);
}

.cs-blog-hero-sub {
  font-size: 1.05rem;
  color: var(--cs-text-muted);
  max-width: 560px;
  margin: 0 auto 2.4rem;
  animation: cs-blog-fade-up 0.9s 0.2s ease both;
}

.cs-blog-hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.2rem 1.6rem;
  font-size: 0.82rem;
  color: var(--cs-text-muted);
  animation: cs-blog-fade-up 0.9s 0.3s ease both;
}

.cs-blog-hero-meta span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

@keyframes cs-blog-fade-up {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cs-blog-scan-widget {
  width: min(340px, 92vw);
  height: 200px;
  margin: 2.8rem auto 0;
  position: relative;
  border: 1.5px solid rgba(0, 212, 245, 0.3);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(9, 20, 37, 0.7);
  animation: cs-blog-fade-up 1s 0.4s ease both;
}

.cs-blog-scan-widget__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.cs-blog-scan-widget__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.cs-blog-scan-widget__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(9, 20, 37, 0.82) 0%, transparent 50%);
  pointer-events: none;
}

.cs-blog-scan-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 2;
  background: linear-gradient(90deg, transparent, var(--cs-cyan), transparent);
  box-shadow: 0 0 16px 3px rgba(0, 212, 245, 0.5);
  animation: cs-blog-scan-down 2.4s ease-in-out infinite;
}

@keyframes cs-blog-scan-down {
  0% {
    top: 0;
    opacity: 1;
  }
  80% {
    top: 100%;
    opacity: 1;
  }
  100% {
    top: 100%;
    opacity: 0;
  }
}

.cs-blog-scan-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  z-index: 2;
  border-color: var(--cs-cyan);
  border-style: solid;
  opacity: 0.8;
}

.cs-blog-scan-corner.tl {
  top: 8px;
  right: 8px;
  border-width: 2px 0 0 2px;
}

.cs-blog-scan-corner.tr {
  top: 8px;
  left: 8px;
  border-width: 2px 2px 0 0;
}

.cs-blog-scan-corner.bl {
  bottom: 8px;
  right: 8px;
  border-width: 0 0 2px 2px;
}

.cs-blog-scan-corner.br {
  bottom: 8px;
  left: 8px;
  border-width: 0 2px 2px 0;
}

.cs-blog-scan-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  z-index: 2;
  border-radius: 50%;
  background: var(--cs-amber);
  box-shadow: 0 0 8px var(--cs-amber);
  animation: cs-blog-dot-pulse 2.4s ease-in-out infinite;
  opacity: 0;
}

.cs-blog-scan-dot--1 {
  top: 48px;
  left: 70px;
  animation-delay: 0.6s;
}

.cs-blog-scan-dot--2 {
  top: 80px;
  left: 120px;
  animation-delay: 0.9s;
}

.cs-blog-scan-dot--3 {
  top: 60px;
  left: 160px;
  animation-delay: 1.1s;
}

.cs-blog-scan-dot--4 {
  top: 95px;
  left: 90px;
  animation-delay: 1.3s;
}

@keyframes cs-blog-dot-pulse {
  0%,
  40% {
    opacity: 0;
    transform: scale(0.5);
  }
  60% {
    opacity: 1;
    transform: scale(1.3);
  }
  80%,
  100% {
    opacity: 0.6;
    transform: scale(1);
  }
}

.cs-blog-scan-label {
  position: absolute;
  bottom: 10px;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  font-size: 0.65rem;
  color: var(--cs-cyan);
  letter-spacing: 0.12em;
  white-space: nowrap;
  opacity: 0.7;
}

.cs-blog-article-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

.cs-blog-section {
  margin-bottom: 3.2rem;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.cs-blog-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.cs-blog-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--cs-cyan);
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}

.cs-blog-article-wrap h2 {
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--cs-white);
  margin-bottom: 1.1rem;
}

.cs-blog-article-wrap h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cs-cyan);
  margin: 1.8rem 0 0.6rem;
}

.cs-blog-article-wrap p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 1rem;
}

.cs-blog-pull-quote {
  border-inline-start: 3px solid var(--cs-cyan);
  padding: 1.1rem 1.4rem;
  background: rgba(0, 212, 245, 0.06);
  margin: 2rem 0;
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--cs-white);
  line-height: 1.6;
}

[dir="rtl"] .cs-blog-pull-quote {
  border-radius: 0 10px 10px 0;
}

[dir="ltr"] .cs-blog-pull-quote {
  border-radius: 10px 0 0 10px;
}

.cs-blog-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.cs-blog-stat-card {
  background: var(--cs-surface);
  border: 1px solid var(--cs-border);
  border-radius: 12px;
  padding: 1.4rem;
  text-align: center;
}

.cs-blog-stat-card .num {
  font-size: 2rem;
  font-weight: 900;
  color: var(--cs-cyan);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.cs-blog-stat-card .desc {
  font-size: 0.85rem;
  color: var(--cs-text-muted);
  line-height: 1.4;
}

.cs-blog-feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 1.4rem 0;
  padding: 0;
}

.cs-blog-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  font-size: 0.97rem;
  color: rgba(255, 255, 255, 0.82);
}

.cs-blog-feature-list li::before {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cs-cyan);
  margin-top: 0.55rem;
  box-shadow: 0 0 6px var(--cs-cyan);
}

.cs-blog-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cs-cyan), transparent);
  opacity: 0.2;
  margin: 3rem 0;
}

.cs-blog-cta-block {
  background: linear-gradient(135deg, var(--cs-command), rgba(0, 212, 245, 0.1));
  border: 1px solid rgba(0, 212, 245, 0.25);
  border-radius: 18px;
  padding: 3rem 2rem;
  text-align: center;
}

.cs-blog-cta-block h2 {
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
}

.cs-blog-cta-block p {
  color: var(--cs-text-muted);
  margin-bottom: 1.8rem;
}

.cs-blog-btn-primary {
  display: inline-block;
  background: var(--cs-cyan);
  color: var(--cs-abyss);
  font-family: "Cairo", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 2.2rem;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
}

.cs-blog-btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-2px);
}

@media (max-width: 600px) {
  .cs-blog-article-hero {
    min-height: auto;
    padding-top: 4rem;
  }

  .cs-blog-scan-widget {
    height: 170px;
  }
}

/* Beat global [dir="rtl"] h1/h2 rules on ar/*.html pages */
[dir="rtl"] .cs-blog-root .cs-blog-article-hero h1 {
  font-family: "Cairo", sans-serif !important;
  font-size: clamp(1.75rem, 5vw, 3.25rem) !important;
  font-weight: 900 !important;
  line-height: 1.25 !important;
  color: var(--cs-white) !important;
  letter-spacing: 0 !important;
  text-align: center !important;
}

[dir="rtl"] .cs-blog-root .cs-blog-article-wrap h2 {
  font-family: "Cairo", sans-serif !important;
  font-size: clamp(1.35rem, 3vw, 1.9rem) !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  color: var(--cs-white) !important;
  letter-spacing: 0 !important;
  text-align: center !important;
}

[dir="rtl"] .cs-blog-root .cs-blog-article-wrap h3 {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  color: var(--cs-cyan) !important;
  letter-spacing: 0 !important;
}

[dir="rtl"] .cs-blog-root .cs-blog-article-wrap p {
  font-size: 1rem !important;
  font-weight: 400 !important;
  line-height: 1.85 !important;
  color: rgba(255, 255, 255, 0.82) !important;
}

/* ── Article 2: diagram hero (photo → report) ── */
.cs-blog-diagram {
  width: min(340px, 92vw);
  height: 200px;
  margin: 2.8rem auto 0;
  position: relative;
  animation: cs-blog-fade-up 1s 0.4s ease both;
}

.cs-blog-diagram__card {
  position: absolute;
  background: rgba(13, 59, 110, 0.35);
  border: 1px solid rgba(0, 212, 245, 0.22);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.72);
  gap: 5px;
}

.cs-blog-diagram__card svg {
  opacity: 0.85;
}

.cs-blog-diagram__photo {
  width: 82px;
  height: 72px;
  top: 10px;
  right: 10px;
  overflow: hidden;
}

.cs-blog-diagram__photo .cs-blog-diagram__scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  top: 0;
  background: linear-gradient(90deg, transparent, var(--cs-cyan), transparent);
  animation: cs-blog-diagram-scan 2s ease-in-out infinite;
}

@keyframes cs-blog-diagram-scan {
  0% {
    top: 0;
    opacity: 1;
  }
  85% {
    top: 100%;
    opacity: 1;
  }
  100% {
    top: 100%;
    opacity: 0;
  }
}

.cs-blog-diagram__arr {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 4px;
}

.cs-blog-diagram__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cs-cyan);
  opacity: 0;
  animation: cs-blog-arr-dot 1.8s ease-in-out infinite;
}

.cs-blog-diagram__dot:nth-child(1) {
  animation-delay: 0s;
}

.cs-blog-diagram__dot:nth-child(2) {
  animation-delay: 0.25s;
}

.cs-blog-diagram__dot:nth-child(3) {
  animation-delay: 0.5s;
}

@keyframes cs-blog-arr-dot {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.5);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.cs-blog-diagram__report {
  width: 82px;
  height: 72px;
  top: 10px;
  left: 10px;
}

.cs-blog-diagram__bar {
  width: min(300px, 88%);
  height: 54px;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  flex-direction: row;
  gap: 12px;
  padding: 0 16px;
}

.cs-blog-diagram__bar-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.67rem;
  color: var(--cs-text-muted);
}

.cs-blog-diagram__bar-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Process strip */
.cs-blog-process {
  display: flex;
  gap: 0;
  margin: 2rem 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--cs-border);
}

.cs-blog-process-step {
  flex: 1;
  padding: 1.4rem 1rem;
  text-align: center;
  border-inline-start: 1px solid var(--cs-border);
  position: relative;
  background: rgba(13, 59, 110, 0.15);
  transition: background 0.3s;
}

.cs-blog-process-step:first-child {
  border-inline-start: none;
}

.cs-blog-process-step:hover {
  background: rgba(13, 59, 110, 0.32);
}

.cs-blog-process-step::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline: 0;
  height: 2px;
  background: var(--cs-cyan);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}

.cs-blog-process-step:hover::after {
  transform: scaleX(1);
}

.cs-blog-process-num {
  font-size: 1.6rem;
  font-weight: 900;
  color: rgba(0, 212, 245, 0.2);
  margin-bottom: 0.5rem;
}

.cs-blog-process-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cs-white);
  margin-bottom: 0.4rem;
}

.cs-blog-process-desc {
  font-size: 0.72rem;
  color: var(--cs-text-muted);
  line-height: 1.5;
}

/* Comparison table */
.cs-blog-cmp-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6rem 0;
  font-size: 0.88rem;
}

.cs-blog-cmp-table th {
  background: rgba(0, 212, 245, 0.1);
  color: var(--cs-cyan);
  font-weight: 700;
  padding: 0.75rem 1rem;
  text-align: start;
  border-bottom: 1px solid var(--cs-border);
}

.cs-blog-cmp-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.78);
  vertical-align: top;
}

.cs-blog-cmp-table tr:last-child td {
  border-bottom: none;
}

.cs-blog-cmp-table td:first-child {
  font-weight: 600;
  color: var(--cs-white);
  width: 34%;
}

.cs-blog-cmp-ok {
  color: var(--cs-cyan);
  font-weight: 600;
}

@media (max-width: 600px) {
  .cs-blog-process {
    flex-direction: column;
  }

  .cs-blog-process-step {
    border-inline-start: none;
    border-block-start: 1px solid var(--cs-border);
  }

  .cs-blog-process-step:first-child {
    border-block-start: none;
  }

  .cs-blog-diagram {
    height: 180px;
  }
}
