/* ============================================================
   LYCORE BLOG TEMPLATES - Banner, TOC, Sidebar, Recent Posts
   Added via lycore-blog-templates.css - do not remove
   ============================================================ */

.lycore-banner {
  position: relative;
  background: linear-gradient(135deg, #0d1b35 0%, #1a3a6b 60%, #0d2a4a 100%);
  padding: 60px 0 50px;
  overflow: hidden;
}
.lycore-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 50%, rgba(59,130,246,0.15) 0%, transparent 50%),
                    radial-gradient(circle at 80% 20%, rgba(99,102,241,0.1) 0%, transparent 40%);
}
.lycore-banner__overlay { display: none; }
.lycore-banner .row { position: relative; z-index: 2; }
.lycore-banner__cat {
  display: inline-block;
  background: #3b82f6;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 30px;
  margin-bottom: 18px;
}
.lycore-banner__title {
  color: #ffffff !important;
  font-size: 36px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  margin: 0 0 18px !important;
  max-width: 820px;
}
.lycore-banner__meta {
  color: rgba(255,255,255,0.65);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.lycore-banner__sep { color: rgba(255,255,255,0.3); }
.lycore-banner__author,
.lycore-banner__date,
.lycore-banner__read { color: rgba(255,255,255,0.7); }
.lycore-blog-wrap {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}
.lycore-blog-wrap__content { padding-right: 40px; }
.lycore-featured-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 30px;
  background: #0d1b35;
}
.lycore-featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: 0;
  margin-bottom: 0;
}
/* TOC widget - no longer sticky itself, parent wrapper handles stickiness */
.lycore-sidebar-widget.lycore-toc-widget {
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}
.lycore-sidebar-widget__title {
  background: #0d1b35;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lycore-sidebar-widget__icon { font-size: 15px; opacity: 0.8; }
.lycore-toc__list {
  list-style: none !important;
  margin: 0 !important;
  padding: 12px 0 !important;
}
.lycore-toc__list li {
  margin: 0 !important;
  padding: 0 !important;
  border-bottom: 1px solid #f0f3f6;
}
.lycore-toc__list li:last-child { border-bottom: none; }
.lycore-toc__list a {
  display: block;
  padding: 9px 20px;
  font-size: 13px;
  color: #374151 !important;
  text-decoration: none !important;
  line-height: 1.4;
  transition: background 0.15s, color 0.15s, border-left-color 0.15s;
  border-left: 3px solid transparent;
}
.lycore-toc__list a:hover,
.lycore-toc__list a.lycore-toc--active {
  background: #f0f7ff;
  color: #1d4ed8 !important;
  border-left-color: #3b82f6;
}
.lycore-toc__list li.toc-h3 > a {
  padding-left: 34px;
  font-size: 12px;
  color: #6b7280 !important;
}
.lycore-toc__list li.toc-h3 > a:hover,
.lycore-toc__list li.toc-h3 > a.lycore-toc--active {
  background: #f0f7ff;
  color: #1d4ed8 !important;
  border-left-color: #3b82f6;
}
.lycore-recent-widget__list {
  list-style: none !important;
  margin: 0 !important;
  padding: 12px 16px !important;
}
.lycore-recent-widget__item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid #f0f3f6;
}
.lycore-recent-widget__item:last-child { border-bottom: none; }
.lycore-recent-widget__thumb {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 6px;
  overflow: hidden;
  display: block;
}
.lycore-recent-widget__img { width: 64px !important; height: 64px !important; object-fit: cover; }
.lycore-recent-widget__text { flex: 1; min-width: 0; }
.lycore-recent-widget__link {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  color: #1f2937 !important;
  text-decoration: none !important;
  line-height: 1.4;
  margin-bottom: 4px;
  transition: color 0.15s;
}
.lycore-recent-widget__link:hover { color: #1d4ed8 !important; }
.lycore-recent-widget__date { font-size: 11px; color: #9ca3af; }
@media (max-width: 768px) {
  .lycore-banner { padding: 40px 20px 35px; }
  .lycore-banner__title { font-size: 26px !important; }
  .lycore-blog-wrap__content { padding-right: 0; }
  .lycore-toc-widget { position: relative; top: auto; max-height: none; overflow-y: visible; }
  
}

/* ----- Related Posts (tag/category/random matched) ----- */
.lycore-related-posts {
  margin-top: 50px;
  padding-top: 36px;
  border-top: 2px solid #e8ecf0;
}
.lycore-related-posts__title {
  font-size: 20px;
  font-weight: 800;
  color: #0d1b35;
  margin-bottom: 24px;
  letter-spacing: -0.3px;
}
.lycore-related-posts__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.lycore-related-posts__item {
  display: block;
  text-decoration: none !important;
  border: 1px solid #e8ecf0;
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  background: #fff;
}
.lycore-related-posts__item:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.10);
  transform: translateY(-3px);
}
.lycore-related-posts__thumb {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #f0f3f6;
}
.lycore-related-posts__img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.lycore-related-posts__item:hover .lycore-related-posts__img {
  transform: scale(1.04);
}
.lycore-related-posts__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px 4px;
  flex-wrap: wrap;
}
.lycore-related-posts__cat {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 2px 8px;
  border-radius: 20px;
}
.lycore-related-posts__date {
  font-size: 11px;
  color: #9ca3af;
}
.lycore-related-posts__post-title {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #1f2937 !important;
  line-height: 1.4 !important;
  margin: 4px 14px 14px !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s;
}
.lycore-related-posts__item:hover .lycore-related-posts__post-title {
  color: #1d4ed8 !important;
}
@media (max-width: 768px) {
  .lycore-related-posts__grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}
/* ----- Post Footer: Category + Tag links ----- */
.lycore-post-footer {
  margin-top: 36px;
  padding: 20px 24px;
  background: #f8fafc;
  border: 1px solid #e8ecf0;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lycore-post-footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.lycore-post-footer__label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #6b7280;
  min-width: 70px;
}
.lycore-post-footer__cat {
  display: inline-block;
  background: #eff6ff;
  color: #1d4ed8 !important;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 20px;
  text-decoration: none !important;
  transition: background 0.15s, color 0.15s;
}
.lycore-post-footer__cat:hover {
  background: #1d4ed8;
  color: #fff !important;
}
.lycore-post-footer__tag {
  display: inline-block;
  background: #fff;
  color: #374151 !important;
  font-size: 12px;
  font-weight: 500;
  padding: 3px 12px;
  border-radius: 20px;
  border: 1px solid #d1d5db;
  text-decoration: none !important;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.lycore-post-footer__tag:hover {
  background: #0d1b35;
  color: #fff !important;
  border-color: #0d1b35;
}
/* Thin styled scrollbar for TOC - always visible width reserved */
.lycore-sidebar-widget.lycore-toc-widget::-webkit-scrollbar {
  width: 4px;
}
.lycore-sidebar-widget.lycore-toc-widget::-webkit-scrollbar-track {
  background: transparent;
}
.lycore-sidebar-widget.lycore-toc-widget::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}
.lycore-sidebar-widget.lycore-toc-widget::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}
/* Sidebar sticky wrapper - this is what sticks, containing all widgets */
.lycore-sidebar-sticky {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-height: calc(100vh - 110px);
  overflow: hidden;
}
/* TOC fills available space and scrolls internally */
.lycore-sidebar-sticky .lycore-toc-widget {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  margin-bottom: 0;
}
/* Recent posts takes only what it needs */
.lycore-sidebar-sticky .lycore-recent-widget {
  flex: 0 0 auto;
  overflow: hidden;
  margin-bottom: 0;
}