/* =========================================================
   CLINIK OPS – Blog styles (index + articles)
   Loaded after style.css on every page in /blog
   ========================================================= */

body.blog-page {
  background: #f5f8fa;
  font-family: "Plus Jakarta Sans", sans-serif;
}
[dir="rtl"] body.blog-page,
[dir="rtl"] body.blog-page h1,
[dir="rtl"] body.blog-page h2,
[dir="rtl"] body.blog-page h3,
[dir="rtl"] body.blog-page h4,
[dir="rtl"] body.blog-page p,
[dir="rtl"] body.blog-page li,
[dir="rtl"] body.blog-page a,
[dir="rtl"] body.blog-page button,
[dir="rtl"] body.blog-page input {
  font-family: "Cairo", sans-serif;
}
[dir="rtl"] body.blog-page { text-align: right; }

/* Reading progress bar */
.blog-progress {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  height: 4px;
  width: 0;
  background: linear-gradient(90deg, #11afad, #1fd1d1);
  z-index: 1100;
  transition: width 0.1s linear;
}

/* ---------- Blog index ---------- */
.blog-index .hero-section {
  background: radial-gradient(circle at 15% 20%, rgba(31, 209, 209, 0.18), transparent 45%),
              linear-gradient(135deg, #0a1425 0%, #0f2a3d 60%, #0e4f5a 100%);
  color: #cfe0ea;
  padding: 80px 0 90px;
  border-radius: 0 0 40px 40px;
  margin-bottom: 0 !important;
}
.blog-index .hero-section h1 {
  color: #fff !important;
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3.2rem);
}
.blog-index .hero-section .lead { color: #cfe0ea !important; }
.blog-kicker {
  display: inline-block;
  background: rgba(31, 209, 209, 0.15);
  color: #6fe6e6;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 18px;
}
.blog-search {
  max-width: 560px;
  margin: 28px auto 0;
  position: relative;
}
.blog-search input {
  width: 100%;
  border: none;
  border-radius: 50px;
  padding: 16px 22px;
  padding-inline-start: 52px;
  font-size: 1rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}
.blog-search input:focus { outline: 3px solid rgba(31, 209, 209, 0.5); }
.blog-search i {
  position: absolute;
  inset-inline-start: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #64728f;
}
.blog-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}
.blog-chips button {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #e6f2f7;
  border-radius: 50px;
  padding: 6px 14px;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}
.blog-chips button:hover { background: #11afad; border-color: #11afad; color: #fff; }

.blog-index .hero-section + section { padding-top: 48px; }

.blog-index .row > .col-12 h2,
.blog-index .row > .col-12 h3 {
  color: #0a1425 !important;
  font-weight: 800;
  font-size: 1.35rem;
  border-bottom: none !important;
  display: flex;
  align-items: center;
  gap: 12px;
}
.blog-index .row > .col-12 h2::before,
.blog-index .row > .col-12 h3::before {
  content: "";
  width: 6px;
  height: 26px;
  border-radius: 4px;
  background: #11afad;
  flex: 0 0 6px;
}

.blog-index .card {
  border: 1px solid #e6eef2 !important;
  border-radius: 18px !important;
  box-shadow: 0 6px 18px rgba(10, 20, 37, 0.05) !important;
  background: #fff;
}
.blog-index .card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 36px rgba(10, 20, 37, 0.12) !important;
}
.blog-index .card-img-top {
  height: 190px;
  object-fit: cover;
  object-position: top;
  background: #eef6f6;
  border-bottom: 1px solid #eef2f5;
}
.blog-index .card-body { padding: 22px; display: flex; flex-direction: column; }
.blog-index .card-title { color: #0a1425; font-size: 1.08rem !important; line-height: 1.4; }
.blog-index .card .badge {
  align-self: flex-start;
  background: #e7f7f7 !important;
  color: #0b7f7d !important;
  font-weight: 600;
  border-radius: 50px;
  padding: 6px 12px;
}
.blog-index .card-text { flex: 1; }
.blog-index .card-body::after {
  content: "Lire l’article →";
  margin-top: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #11afad;
}
:lang(en) .blog-index .card-body::after,
html[lang="en"] .blog-index .card-body::after { content: "Read article →"; }
html[lang="ar"] .blog-index .card-body::after { content: "← اقرأ المقال"; }

.blog-empty {
  display: none;
  text-align: center;
  color: #64728f;
  padding: 40px 0;
}

/* ---------- Articles ---------- */
.blog-article main,
.blog-article > section,
.blog-article .container > .row > .col-lg-8 {
  position: relative;
}
.blog-article .col-lg-8 {
  background: #fff;
  border-radius: 24px;
  padding: 44px 48px;
  box-shadow: 0 10px 30px rgba(10, 20, 37, 0.06);
}
.blog-article .breadcrumb {
  font-size: 0.88rem;
  background: none;
  padding: 0;
  margin-bottom: 24px;
}
.blog-article .breadcrumb a { color: #11afad; text-decoration: none; }
.blog-article .breadcrumb-item.active { color: #64728f; }
.blog-article h1 {
  font-weight: 800;
  color: #0a1425;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  line-height: 1.25;
}
.blog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  color: #64728f;
  font-size: 0.9rem;
  margin: 8px 0 26px;
}
.blog-meta i { color: #11afad; margin-inline-end: 6px; }
.blog-article .col-lg-8 > img,
.blog-article article > img,
.blog-article .article-content img {
  border-radius: 18px !important;
  border: 1px solid #e6eef2;
  width: 100%;
}
.blog-article .article-content,
.blog-article article {
  font-size: 1.07rem;
  line-height: 1.85;
  color: #3d4a63;
}
.blog-article .article-content .lead,
.blog-article article .lead {
  font-size: 1.2rem;
  color: #0a1425;
  line-height: 1.7;
}
.blog-article .article-content h2,
.blog-article article h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0a1425;
  margin-top: 2.4rem !important;
  margin-bottom: 0.9rem;
  scroll-margin-top: 110px;
}
.blog-article .article-content h3,
.blog-article article h3 {
  font-size: 1.2rem;
  color: #0a1425;
  margin-top: 1.8rem;
  scroll-margin-top: 110px;
}
.blog-article .article-content ul li::marker,
.blog-article .article-content ol li::marker { color: #11afad; font-weight: 700; }
.blog-article .article-content li { margin-bottom: 0.4rem; }
.blog-article .article-content a { color: #0b8f8d; font-weight: 600; }
.blog-article .article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.98rem;
}
.blog-article .article-content th {
  background: #e7f7f7;
  color: #0a1425;
}
.blog-article .article-content th,
.blog-article .article-content td {
  border: 1px solid #e3ecef;
  padding: 10px 14px;
}
.blog-article .article-content blockquote {
  border-inline-start: 4px solid #11afad;
  background: #f5fbfb;
  padding: 16px 20px;
  border-radius: 12px;
  margin: 1.5rem 0;
}
.blog-article .alert {
  border: none;
  border-inline-start: 5px solid #11afad;
  background: #effafa;
  color: #0a1425;
  border-radius: 14px;
  padding: 18px 22px;
}
.blog-article .alert-warning { border-inline-start-color: #f5a524; background: #fff8eb; }
.blog-article .alert-danger { border-inline-start-color: #f15a32; background: #fff2ee; }

/* Table of contents (built by blog.js) */
.blog-toc {
  background: #f5fbfb;
  border: 1px solid #dff1f1;
  border-radius: 16px;
  padding: 18px 22px;
  margin: 0 0 28px;
}
.blog-toc strong { color: #0a1425; display: block; margin-bottom: 8px; }
.blog-toc ol { margin: 0; padding-inline-start: 20px; }
.blog-toc li { margin-bottom: 4px; font-size: 0.95rem; }
.blog-toc a { color: #3d4a63; text-decoration: none; }
.blog-toc a:hover { color: #11afad; }

/* End-of-article call to action */
.blog-cta {
  padding: 10px 0 70px;
}
.blog-cta-box {
  background: linear-gradient(135deg, #0e9896 0%, #11afad 55%, #1fd1d1 100%);
  border-radius: 24px;
  padding: 40px;
  color: #e9fbfb;
  box-shadow: 0 18px 40px rgba(17, 175, 173, 0.25);
}
.blog-cta-box h2 { color: #fff; font-weight: 800; font-size: 1.7rem; }
.blog-cta-box p { color: #e9fbfb; margin-bottom: 0; }
.blog-cta-box .btn-light { color: #0b7f7d; font-weight: 700; border-radius: 50px; padding: 12px 26px; }
.blog-cta-box .btn-light:hover { background: #0a1425 !important; color: #fff; }
.blog-cta-box .btn-whatsapp { border-radius: 50px; padding: 12px 22px; font-size: 1rem; }

/* Hide old per-article demo buttons duplicated by the CTA banner? Keep them, just restyle */
.blog-article .col-lg-8 .btn-primary { border-radius: 50px; padding: 0.7rem 1.8rem; }

@media (max-width: 767.98px) {
  .blog-article .col-lg-8 { padding: 26px 20px; border-radius: 18px; }
  .blog-article section.py-5 { padding-top: 1.5rem !important; }
  .blog-cta-box { padding: 28px 22px; text-align: center; }
  .blog-index .hero-section { padding: 56px 0 64px; border-radius: 0 0 28px 28px; }
  /* Section shortcuts become one swipeable row on phones */
  .blog-chips {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-inline: -12px;
    padding-inline: 12px;
    scrollbar-width: none;
  }
  .blog-chips::-webkit-scrollbar { display: none; }
  .blog-chips button { flex: 0 0 auto; white-space: nowrap; }
}
