/* ── Layout ── */
.page-wrapper {
  max-width: 100%;
  padding: 140px 3%;
}

.layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 56px;
  align-items: start;
}

/* ── Article Header ── */
.article-header h1 {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  line-height: 1.25;
  color: #111;
  margin-bottom: 18px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #666;
  margin-bottom: 24px;
}

.meta-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: #1a1a1a;
}

.meta-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.meta-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.meta-category {
  background: #f4f4f4;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: #444;
}

.meta-icon {
  display: flex;
  align-items: center;
  gap: 5px;
}

.meta-icon svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.55;
}

/* ── Hero Image ── */
.article-hero {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 36px;
  aspect-ratio: 22/12;
  background: #e8e8e8;
}

.article-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Article Body Typography ── */
.article-body h2 {
  font-size: 22px;
  font-weight: 700;
  color: #000;
  margin: 40px 0 12px;
  line-height: 1.3;
  scroll-margin-top: 30px;
}

.article-body h3 {
  font-size: 18px;
  font-weight: 600;
  color: #000;
  margin: 28px 0 10px;
  line-height: 1.35;
  scroll-margin-top: 30px;
}

.article-body h4 {
  font-size: 13px;
  font-weight: 700;
  color: #000;
  margin: 22px 0 8px;
  line-height: 1.4;
  scroll-margin-top: 30px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.article-body p {
  font-size: 16px;
  line-height: 1.85;
  color: #000000;
  margin-bottom: 16px;
}

.article-body ul,
.article-body ol {
  margin: 10px 0 20px 0;
  padding-left: 0;
  list-style: none;
}

.article-body ul li {
  font-size: 15px;
  color: #3a3a3a;
  line-height: 1.75;
  padding: 3px 0 3px 22px;
  position: relative;
}

.article-body ul li::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 13px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #bbb;
}

.article-body ol {
  counter-reset: list-counter;
}

.article-body ol li {
  font-size: 15px;
  color: #3a3a3a;
  line-height: 1.75;
  padding: 3px 0 3px 26px;
  position: relative;
  counter-increment: list-counter;
}

.article-body ol li::before {
  content: counter(list-counter) ".";
  position: absolute;
  left: 0;
  top: 3px;
  font-size: 13px;
  font-weight: 600;
  color: #aaa;
}

.article-body blockquote {
  border-left: 3px solid #e0e0e0;
  padding: 12px 20px;
  margin: 24px 0;
  background: #fafafa;
  border-radius: 0 8px 8px 0;
}

.article-body blockquote p {
  font-size: 15px;
  color: #666;
  font-style: italic;
  margin: 0;
  line-height: 1.65;
}

.section-img {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  margin: 20px 0 28px;
  aspect-ratio: 16/8;
}

.section-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Sidebar ── */
.sidebar-single-blog {
  position: sticky;
  top: 24px;
  padding: 15px;
  border-radius: 12px;
  background: #fafafa;
}

.sidebar-section {
  margin-bottom: 28px;
}

.sidebar-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #aaa;
  margin-bottom: 14px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* ── Table of Contents ── */
.toc-section {
  border: 1px solid #ebebeb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 28px;
  display:block;
  max-height:400px;
  overflow: hidden;
    overflow-y: auto;   /* ✅ enable vertical scroll */
  overflow-x: hidden; /* optional: prevent horizontal scroll */
}

.toc-title {
  font-size: 18px;
  font-weight: bold;
  color: #000;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: 'Satoshi';
}

.toc-title svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  stroke: #000;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li { padding: 0; margin: 0; }

.toc-list a {
  display: block;
  font-size: 16px;
  color: #000;
  line-height: 1.45;
  padding: 5px 8px;
  border-left: 2px solid transparent;
  border-radius: 0 4px 4px 0;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toc-list a:hover {
  color: #333;
  background: #f6f6f6;
}

.toc-list a[data-level="2"] {
  padding-left: 8px;
  font-weight: 500;
  color: #000;
}

.toc-list a[data-level="3"] {
  padding-left: 20px;
  font-size: 14px;
  color: #000;
}

.toc-list a[data-level="4"] {
  padding-left: 32px;
  font-size: 12px;
  color: #000;
}

.toc-list a.toc-active {
  color: #111 !important;
  border-left-color: #111 !important;
  background: #f3f3f3 !important;
  font-weight: 600;
}

/* ── Social Icons ── */
.social-icons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
  flex-shrink: 0;
}

.social-icon:hover { border-color: #bbb; background: #f5f5f5; }
.social-icon svg { width: 14px; height: 14px; fill: #555; }

/* ── Tags ── */
.tags-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  padding: 5px 13px;
  border: 1px solid #e3e3e3;
  border-radius: 20px;
  font-size: 12.5px;
  color: #444;
  background: #fff;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
}

.tag:hover { background: #f4f4f4; border-color: #bbb; }

/* ── Related Blogs ── */
.related-list { display: flex; flex-direction: column; gap: 14px; }

.related-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.related-thumb {
  width: 120px;
  height: 90px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.related-content { flex: 1; min-width: 0; }

.related-date {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: #bbb;
  margin-bottom: 3px;
}

.related-date svg { width: 11px; height: 11px; flex-shrink: 0; stroke: #ccc; }

.related-title {
  font-size: 14px;
  font-weight: 600;
  color: #000;
  line-height: 1.4;
  text-decoration:none;
}

.related-title:hover { color: #555; }

/* ── Newsletter ── */
.newsletter-section {
  border: 1px solid #ebebeb;
  border-radius: 12px;
  padding: 20px;
}

.newsletter-section h3 {
  font-size: 17px;
  font-weight: 700;
  color: #111;
  margin-bottom: 8px;
  line-height: 1.3;
}

.newsletter-section p {
  font-size: 13px;
  color: #888;
  line-height: 1.6;
  margin-bottom: 16px;
}

.newsletter-label {
  font-size: 12.5px;
  font-weight: 500;
  color: #333;
  margin-bottom: 7px;
  display: block;
}

.email-input-wrap {
  position: relative;
  margin-bottom: 10px;
}

.email-input-wrap svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  fill: none;
  stroke: #ccc;
  stroke-width: 1.5;
  pointer-events: none;
}

.email-input {
  width: 100%;
  padding: 10px 12px 10px 34px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 13px;
  color: #333;
  outline: none;
  transition: border-color 0.2s;
}

.email-input::placeholder { color: #ccc; }
.email-input:focus { border-color: #aaa; }

.subscribe-btn {
  width: 100%;
  padding: 11px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.subscribe-btn:hover { background: #333; }

/* ── Responsive ── */
@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 40px;
    display: contents;
  }
  .page-wrapper { padding: 100px 4%; }
  .sidebar-single-blog { position: static; }
}

@media (max-width: 600px) {
  .page-wrapper { padding: 120px 4%; }
  .meta-category { display: none; }
  .article-meta { gap: 10px; }
}