/* ══════════════════════════════════════════
   BLOG — Grid & Single Post Styles
   Chemanol Theme
══════════════════════════════════════════ */

/* ── BLOG HERO ── */
.blog-hero {
  background: var(--navy);
  padding: 48px 0 52px;
}
.blog-hero-title {
  font-size: 42px;
  font-weight: 500;
  color: #fff;
  margin: 12px 0 14px;
  line-height: 1.2;
}
.blog-hero-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.7);
  max-width: 600px;
  line-height: 1.7;
  margin: 0;
}

/* ── BLOG GRID SECTION ── */
.blog-grid-section {
  background: #F7F7F7;
  padding: 56px 0 72px;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.blog-no-posts {
  font-size: 16px;
  color: #666;
  text-align: center;
  padding: 48px 0;
}

/* ── BLOG CARD ── */
.blog-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.blog-card:hover {
  box-shadow: 0 8px 32px rgba(12,37,69,.12);
  transform: translateY(-3px);
}
.blog-card-img-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #E2EEFC;
  text-decoration: none;
}
.blog-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
  display: block;
}
.blog-card:hover .blog-card-img {
  transform: scale(1.04);
}
.blog-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.blog-card-img-placeholder svg {
  width: 64px;
  height: 64px;
}
.blog-card-cat {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
}
[dir="rtl"] .blog-card-cat { left: auto; right: 14px; }

.blog-card-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #888;
  margin-bottom: 10px;
}
.blog-card-sep { color: #ccc; }
.blog-card-title {
  font-size: 17px;
  font-weight: 500;
  color: var(--navy);
  line-height: 1.4;
  margin: 0 0 10px;
}
.blog-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color .2s;
}
.blog-card-title a:hover { color: var(--blue); }
.blog-card-excerpt {
  font-size: 13px;
  color: #555;
  line-height: 1.7;
  margin: 0 0 18px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}
.blog-card-author {
  font-size: 12px;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.blog-read-more {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  white-space: nowrap;
  transition: gap .2s;
}
.blog-read-more:hover { gap: 10px; }
.blog-read-more svg { width: 15px; height: 15px; }

/* ── SINGLE BLOG HERO ── */
.single-blog-hero {
  background: var(--navy);
  padding: 40px 0 48px;
}
.single-blog-meta-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 16px;
}
.single-blog-cat {
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 4px;
}
.single-blog-readtime {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}
.single-blog-readtime svg { width: 14px; height: 14px; }
.single-blog-title {
  font-size: 38px;
  font-weight: 500;
  color: #fff;
  line-height: 1.25;
  margin: 0 0 16px;
  max-width: 780px;
}
.single-blog-excerpt {
  font-size: 16px;
  color: rgba(255,255,255,0.72);
  line-height: 1.7;
  max-width: 680px;
  margin: 0 0 28px;
}
.single-blog-byline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.single-blog-author-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.single-blog-author-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.single-blog-author-icon svg { width: 20px; height: 20px; stroke: rgba(255,255,255,0.8); }
.single-blog-author-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
.single-blog-date {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  margin-top: 2px;
}
.single-blog-share {
  display: flex;
  align-items: center;
  gap: 10px;
}
.single-blog-share span {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
}
.share-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.75);
  transition: background .2s, color .2s;
}
.share-icon:hover { background: var(--blue); color: #fff; }
.share-icon svg { width: 15px; height: 15px; }

/* ── COVER IMAGE ── */
.single-blog-cover {
  background: #F7F7F7;
  padding: 0;
}
.single-blog-cover .container {
  padding-top: 0;
}
.single-blog-cover-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 0 0 12px 12px;
  display: block;
}

/* ── CONTENT SECTION ── */
.single-blog-content-section {
  background: #F7F7F7;
  padding: 48px 0 72px;
}
.single-blog-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

/* ── BLOG BODY ── */
.single-blog-body {
  background: #fff;
  border-radius: 12px;
  padding: 40px 44px;
}
.single-blog-body h2 {
  font-size: 24px;
  font-weight: 500;
  color: var(--navy);
  margin: 36px 0 14px;
  line-height: 1.3;
}
.single-blog-body h2:first-child { margin-top: 0; }
.single-blog-body h3 {
  font-size: 18px;
  font-weight: 500;
  color: var(--navy);
  margin: 28px 0 10px;
}
.single-blog-body p {
  font-size: 15px;
  color: #3a3a3a;
  line-height: 1.85;
  margin: 0 0 18px;
}
.single-blog-body ul, .single-blog-body ol {
  margin: 0 0 20px 20px;
  padding: 0;
}
[dir="rtl"] .single-blog-body ul,
[dir="rtl"] .single-blog-body ol { margin: 0 20px 20px 0; }
.single-blog-body li {
  font-size: 15px;
  color: #3a3a3a;
  line-height: 1.8;
  margin-bottom: 8px;
}
.single-blog-body strong { color: var(--navy); font-weight: 600; }
.single-blog-body a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.single-blog-body a:hover { color: var(--navy); }

.single-blog-back {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid #f0f0f0;
}
.btn-back-blog {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  transition: gap .2s;
}
.btn-back-blog:hover { gap: 12px; }
.btn-back-blog svg { width: 16px; height: 16px; }

/* ── SIDEBAR ── */
.single-blog-sidebar { display: flex; flex-direction: column; gap: 20px; }
.blog-sidebar-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
}
.blog-sidebar-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.blog-sidebar-card p {
  font-size: 13px;
  color: #555;
  line-height: 1.7;
  margin: 0 0 14px;
}
.btn-sidebar-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
}
.btn-sidebar-link:hover { text-decoration: underline; }
.blog-sidebar-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.blog-sidebar-links li a {
  font-size: 13px;
  color: #444;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color .2s;
}
.blog-sidebar-links li a::before {
  content: '›';
  color: var(--blue);
  font-size: 16px;
  line-height: 1;
}
.blog-sidebar-links li a:hover { color: var(--blue); }
.blog-sidebar-cta { background: var(--navy); }
.blog-sidebar-cta .blog-sidebar-title { color: rgba(255,255,255,0.6); }
.blog-sidebar-cta p { color: rgba(255,255,255,0.7); }
.btn-sidebar-cta {
  display: block;
  background: var(--blue);
  color: #fff;
  text-align: center;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s;
}
.btn-sidebar-cta:hover { background: #0d4a8e; }

/* ── RTL OVERRIDES ── */
[dir="rtl"] .blog-read-more svg,
[dir="rtl"] .btn-back-blog svg { transform: scaleX(-1); }
[dir="rtl"] .single-blog-body ul,
[dir="rtl"] .single-blog-body ol { margin: 0 20px 20px 0; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .single-blog-layout { grid-template-columns: 1fr; }
  .single-blog-sidebar { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .blog-sidebar-cta { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  .blog-hero-title { font-size: 28px; }
  .blog-grid { grid-template-columns: 1fr; gap: 20px; }
  .single-blog-title { font-size: 26px; }
  .single-blog-body { padding: 24px 20px; }
  .single-blog-sidebar { grid-template-columns: 1fr; }
  .blog-sidebar-cta { grid-column: auto; }
  .single-blog-byline { flex-direction: column; align-items: flex-start; gap: 16px; }
}
