/* Created: 21:15 18-May-2026 */
/* Blog-specific styles — archive card grid + detail page layout. */
/* Mounted on /blog/, /blog/{slug}, /ar/blog/, /ar/blog/{slug}. */

/* ===== Archive grid ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 32px;
}
@media (max-width: 900px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
@media (max-width: 600px) {
  .blog-grid { grid-template-columns: 1fr; gap: 20px; }
}

.blog-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(15, 76, 138, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(15, 76, 138, 0.15);
}

.blog-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #f3f4f6;
  overflow: hidden;
}
.blog-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-card-body {
  padding: 20px 22px 24px;
}
.blog-card-date {
  display: block;
  font-size: 0.8125rem;
  color: #6b7280;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.blog-card-body h3 {
  font-size: 1.125rem;
  line-height: 1.4;
  margin: 0 0 10px;
  color: var(--brand-primary, #0F4C8A);
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-body p {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #4b5563;
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-body .card-link {
  color: var(--brand-teal, #1A8A8A);
  font-weight: 600;
  font-size: 0.9375rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ===== Detail page ===== */
.blog-meta {
  font-size: 0.9375rem;
  color: #e5e7eb;
  margin-top: 8px;
}

.blog-hero-image {
  padding: 32px 0 0;
}
.blog-hero-figure {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(15, 76, 138, 0.1);
}
.blog-hero-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.blog-article {
  padding: 40px 0 64px;
}
.blog-body {
  max-width: 760px;
  margin: 0 auto;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: #1f2937;
}
.blog-body h2 {
  font-size: 1.5rem;
  line-height: 1.3;
  margin: 36px 0 16px;
  color: var(--brand-primary, #0F4C8A);
  font-weight: 700;
}
.blog-body h3 {
  font-size: 1.25rem;
  margin: 28px 0 12px;
  color: var(--brand-primary, #0F4C8A);
  font-weight: 600;
}
.blog-body p {
  margin: 0 0 18px;
}
.blog-body ul,
.blog-body ol {
  margin: 0 0 20px 24px;
  padding: 0;
}
.blog-body li {
  margin-bottom: 8px;
}
.blog-body a {
  color: var(--brand-teal, #1A8A8A);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.blog-body a:hover {
  color: var(--brand-primary, #0F4C8A);
}
.blog-body blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  border-left: 4px solid var(--brand-teal, #1A8A8A);
  background: #f0fdfa;
  font-style: italic;
  color: #374151;
}

/* RTL adjustments */
body.rtl .blog-body { text-align: right; }
body.rtl .blog-body ul,
body.rtl .blog-body ol { margin: 0 24px 20px 0; }
body.rtl .blog-body blockquote {
  border-left: none;
  border-right: 4px solid var(--brand-teal, #1A8A8A);
}

/* ===== Social share row ===== */
.blog-share {
  max-width: 760px;
  margin: 32px auto 0;
  padding: 20px 24px;
  background: #f8fafc;
  border-radius: 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.blog-share-label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #374151;
  margin-right: 8px;
}
body.rtl .blog-share-label { margin-right: 0; margin-left: 8px; }

.blog-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  color: #4b5563;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  position: relative;
  padding: 0;
}
.blog-share-btn:hover {
  transform: translateY(-2px);
  border-color: transparent;
}
.blog-share-whatsapp:hover { background: #25D366; color: #fff; }
.blog-share-linkedin:hover { background: #0A66C2; color: #fff; }
.blog-share-x:hover        { background: #000;    color: #fff; }
.blog-share-facebook:hover { background: #1877F2; color: #fff; }
.blog-share-copy:hover     { background: var(--brand-teal, #1A8A8A); color: #fff; }

.blog-share-btn svg { display: block; }

/* Copy-link toast confirmation */
.blog-share-toast {
  position: absolute;
  top: -34px;
  left: 50%;
  transform: translateX(-50%);
  background: #111827;
  color: #fff;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
}
.blog-share-toast::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #111827;
}

@media (max-width: 600px) {
  .blog-share { padding: 16px 18px; gap: 8px; }
  .blog-share-label { width: 100%; margin: 0 0 4px; }
}
