/* Blog pages - scoped under .blog-page */
/* Never affects main.css or any non-blog page */

/* ── Reset / base ─────────────────────────────────────────── */
.blog-page {
  font-family: Arial, sans-serif;
  background-color: #f7f7f7;
  color: #222;
  line-height: 1.7;
  margin: 0;
  padding: 0;
}

/* ── Header ────────────────────────────────────────────────── */
.blog-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
  position: sticky;
  top: 0;
  z-index: 100;
}

.blog-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.blog-logo-link {
  display: flex;
  align-items: center;
  height: 100%;
  flex-shrink: 0;
}

.blog-logo {
  height: 48px;        /* fills the bar minus 8px padding top+bottom */
  width: auto;
  display: block;
}

.blog-nav ul {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
}

.blog-nav ul li a {
  text-decoration: none;
  color: #51A5D7;
  font-size: 0.9rem;
  transition: color 0.15s;
}

.blog-nav ul li a:hover,
.blog-nav ul li a.active {
  color: #3a84b8;
  font-weight: bold;
}

/* ── RTL header ────────────────────────────────────────────── */
.blog-page.rtl .blog-header-inner {
  flex-direction: row-reverse;
}

.blog-page.rtl .blog-nav {
  direction: ltr;
}

.blog-page.rtl .blog-nav ul {
  direction: ltr;
}

/* ── Language toggle ───────────────────────────────────────── */
.blog-lang-toggle {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.blog-lang-toggle a {
  color: #51A5D7;
  text-decoration: none;
}

.blog-lang-toggle a.active {
  font-weight: bold;
  color: #222;
  pointer-events: none;
}

.blog-lang-toggle span {
  color: #999;
}

/* ── Article page ──────────────────────────────────────────── */
.blog-article-main {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.blog-article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.blog-date {
  font-size: 0.85rem;
  color: #888;
}

.blog-article-title {
  font-size: 2rem;
  color: #51A5D7;
  margin: 0 0 32px;
  line-height: 1.3;
}

.blog-page.rtl .blog-article-title {
  text-align: right;
}

/* Article body typography */
.blog-article-body h2 {
  font-size: 1.35rem;
  color: #333;
  margin: 2rem 0 0.75rem;
  border-bottom: 2px solid #A0CD9A;
  padding-bottom: 4px;
}

.blog-article-body h3 {
  font-size: 1.1rem;
  color: #444;
  margin: 1.5rem 0 0.5rem;
}

.blog-article-body p {
  margin: 0 0 1.1rem;
}

.blog-article-body ul,
.blog-article-body ol {
  margin: 0 0 1.1rem 1.5rem;
  padding: 0;
}

.blog-page.rtl .blog-article-body ul,
.blog-page.rtl .blog-article-body ol {
  margin: 0 1.5rem 1.1rem 0;
}

.blog-article-body li {
  margin-bottom: 0.4rem;
}

.blog-article-body a {
  color: #51A5D7;
}

.blog-article-body strong {
  color: #333;
}

.blog-article-body blockquote {
  border-left: 4px solid #A0CD9A;
  margin: 1.5rem 0;
  padding: 0.5rem 1rem;
  color: #555;
  font-style: italic;
  background: #f0f8f0;
}

.blog-page.rtl .blog-article-body blockquote {
  border-left: none;
  border-right: 4px solid #A0CD9A;
}

/* ── Questions callout ─────────────────────────────────────── */
.blog-questions-callout {
  background: #eef6fb;
  border-right: 4px solid #51A5D7;
  border-radius: 4px;
  padding: 12px 16px;
  margin: 1rem 0 1.5rem;
}

.blog-questions-callout p {
  margin: 0;
}

.blog-page:not(.rtl) .blog-questions-callout {
  border-right: none;
  border-left: 4px solid #51A5D7;
}

/* ── Section divider ───────────────────────────────────────── */
.blog-section-divider {
  margin: 3rem 0 2rem;
  padding: 20px 24px;
  background: #f0f8f0;
  border-radius: 6px;
  border-right: 4px solid #A0CD9A;
}

.blog-page:not(.rtl) .blog-section-divider {
  border-right: none;
  border-left: 4px solid #A0CD9A;
}

.blog-section-divider-title {
  font-size: 1.4rem;
  font-weight: bold;
  color: #333;
  margin: 0 0 6px;
}

.blog-section-divider-desc {
  color: #666;
  font-size: 0.95rem;
  margin: 0;
}

/* ── Article figures ───────────────────────────────────────── */
.blog-article-body figure {
  margin: 2rem 0;
  text-align: center;
}

.blog-article-body figure img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

/* ── Source attribution ────────────────────────────────────── */
.blog-source-attribution {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid #ddd;
  font-size: 0.85rem;
  color: #666;
}

.blog-source-attribution p {
  margin: 0 0 8px;
  font-weight: bold;
}

.blog-source-attribution ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-source-attribution li {
  margin-bottom: 4px;
}

.blog-source-attribution a {
  color: #51A5D7;
  text-decoration: none;
}

.blog-source-attribution a:hover {
  text-decoration: underline;
}

.blog-source-attribution .fab {
  margin-right: 4px;
}

.blog-source-lang {
  font-size: 0.8em;
  color: #aaa;
  margin-left: 2px;
}

/* ── Listing page ──────────────────────────────────────────── */
.blog-listing-main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.blog-listing-header {
  margin-bottom: 40px;
}

.blog-listing-header h1 {
  font-size: 2.2rem;
  color: #51A5D7;
  margin: 8px 0 8px;
}

.blog-listing-subtitle {
  color: #666;
  font-size: 1rem;
  margin: 0;
}

.blog-page.rtl .blog-listing-header {
  text-align: right;
}

.blog-listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.blog-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.blog-card:hover {
  box-shadow: 0 4px 16px rgba(81, 165, 215, 0.15);
  border-color: #51A5D7;
}

.blog-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.blog-card-title {
  font-size: 1.15rem;
  color: #51A5D7;
  margin: 0;
  line-height: 1.3;
}

.blog-card-desc {
  color: #555;
  font-size: 0.9rem;
  margin: 0;
  flex: 1;
}

.blog-card-date {
  font-size: 0.8rem;
  color: #aaa;
}

.blog-page.rtl .blog-card-body {
  text-align: right;
}

/* ── Footer ────────────────────────────────────────────────── */
.blog-footer {
  background: #ffffff;
  border-top: 1px solid #e5e5e5;
  padding: 20px 24px;
}

.blog-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #888;
  gap: 16px;
  flex-wrap: wrap;
}

.blog-footer-inner a {
  color: #51A5D7;
  text-decoration: none;
}

.blog-footer-inner a:hover {
  text-decoration: underline;
}

.blog-page.rtl .blog-footer-inner {
  flex-direction: row-reverse;
}

/* ── Floating Book a Meeting ───────────────────────────────── */
.blog-book-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 200;
}

.blog-page.rtl .blog-book-float {
  right: auto;
  left: 28px;
}

.blog-book-float button {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  color: white !important;
  background-color: #A0CD9A !important;
  border: none !important;
  cursor: pointer !important;
  font-size: 0.95rem !important;
  border-radius: 6px !important;
  padding: 0.7rem 1.5rem !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22) !important;
  transition: opacity 0.2s ease !important;
  white-space: nowrap !important;
}

.blog-book-float button::before {
  font-family: "Font Awesome 6 Free";
  content: "\f133";
  font-weight: 900;
}

.blog-book-float button:hover {
  opacity: 0.82 !important;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 640px) {
  .blog-header-inner {
    height: 56px;
    padding: 0 16px;
  }

  .blog-logo {
    height: 36px;
  }

  .blog-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    min-width: 0;
  }

  .blog-nav::-webkit-scrollbar {
    display: none;
  }

  .blog-nav ul {
    gap: 14px;
    flex-wrap: nowrap;
  }

  .blog-nav ul li a {
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .blog-article-main,
  .blog-listing-main {
    padding: 24px 16px 60px;
  }

  .blog-article-title {
    font-size: 1.5rem;
  }

  .blog-listing-grid {
    grid-template-columns: 1fr;
  }

  .blog-book-float {
    bottom: 16px;
    right: 16px;
  }

  .blog-page.rtl .blog-book-float {
    right: auto;
    left: 16px;
  }
}
