/* ============================================
   blog.css — SKIPTV Blog & Article Styles
   ============================================ */

/* ==========================================
   BLOG OVERVIEW LAYOUT
   ========================================== */

.blog-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}

.blog-main {
  min-width: 0;
}

/* ---- Blog Grid (overview) ---- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

/* ---- Blog Card ---- */
.blog-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  cursor: pointer;
  transition: var(--transition);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--glow-blue);
  text-decoration: none;
}

.blog-card-image {
  height: 200px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.blog-card:hover .blog-card-image {
  border-color: var(--border-hover);
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
  display: block;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.read-time {
  font-size: 13px;
  color: var(--text-muted);
}

.blog-date {
  font-size: 13px;
  color: var(--text-muted);
}

.blog-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--text-primary);
  line-height: 1.3;
  transition: color var(--transition);
}

.blog-card:hover h3 {
  color: var(--accent-blue);
}

.blog-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}

.blog-card .read-more {
  margin-top: 16px;
  color: var(--accent-blue);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition);
}

.blog-card:hover .read-more {
  gap: 10px;
  text-decoration: none;
}

/* ---- Featured Blog Post ---- */
.blog-card.featured {
  grid-column: 1 / -1;
  flex-direction: row;
  gap: 32px;
  align-items: center;
}

.blog-card.featured .blog-card-image {
  width: 320px;
  height: 220px;
  flex-shrink: 0;
  margin-bottom: 0;
}

.blog-card.featured .blog-card-body {
  flex: 1;
}

/* ==========================================
   BLOG SIDEBAR
   ========================================== */

.blog-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
}

.sidebar-widget {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
}

.sidebar-widget h4 {
  font-family: var(--font-heading);
  font-size: 18px;
  margin-bottom: 16px;
  color: var(--text-primary);
  font-weight: 600;
}

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

.sidebar-links li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.sidebar-links li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-links a {
  color: var(--text-secondary);
  font-size: 14px;
  transition: color var(--transition);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}

.sidebar-links a:hover {
  color: var(--accent-blue);
  text-decoration: none;
}

.sidebar-widget .btn {
  width: 100%;
  justify-content: center;
}

/* ==========================================
   ARTICLE LAYOUT
   ========================================== */

/* ---- Article Header ---- */
.article-header {
  padding: 40px 0 60px;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(0, 174, 239, 0.12) 0%, transparent 55%),
    var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.article-header h1 {
  font-size: 52px;
  max-width: 800px;
  margin: 0 auto 20px;
  line-height: 1.1;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 20px;
}

.article-meta .separator {
  color: var(--border);
}

/* ---- Breadcrumb ---- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 760px;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 24px) 24px 0;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-muted);
  transition: color var(--transition);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent-blue);
  text-decoration: none;
}

.breadcrumb .sep {
  color: var(--text-muted);
  font-size: 12px;
}

.breadcrumb .current {
  color: var(--text-secondary);
}

/* ---- Article Body ---- */
.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 24px;
}

.article-body h2 {
  font-size: 32px;
  margin: 48px 0 20px;
  color: var(--text-primary);
  line-height: 1.2;
}

.article-body h3 {
  font-size: 24px;
  margin: 32px 0 16px;
  color: var(--text-primary);
  line-height: 1.3;
}

.article-body h4 {
  font-size: 20px;
  margin: 24px 0 12px;
  color: var(--text-primary);
}

.article-body p {
  margin-bottom: 20px;
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 16px;
}

.article-body ul,
.article-body ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

.article-body ul {
  list-style: disc;
}

.article-body ol {
  list-style: decimal;
}

.article-body li {
  margin-bottom: 8px;
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 16px;
}

.article-body li::marker {
  color: var(--accent-blue);
}

.article-body strong {
  color: var(--text-primary);
  font-weight: 700;
}

.article-body em {
  font-style: italic;
}

.article-body a {
  color: var(--accent-blue);
  text-decoration: underline;
}

.article-body a:hover {
  color: var(--text-primary);
}

.article-body img {
  border-radius: var(--radius-md);
  margin: 24px 0;
  border: 1px solid var(--border);
}

.article-body blockquote {
  border-left: 3px solid var(--accent-blue);
  padding: 16px 20px;
  background: var(--accent-blue-dim);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 24px 0;
}

.article-body blockquote p {
  color: var(--text-primary);
  font-style: italic;
  margin-bottom: 0;
}

/* ---- Table of Contents ---- */
.toc {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 40px;
}

.toc h4 {
  font-family: var(--font-heading);
  font-size: 18px;
  margin-bottom: 16px;
  color: var(--text-primary);
  font-weight: 600;
}

.toc ol {
  padding-left: 20px;
  list-style: decimal;
  margin-bottom: 0;
}

.toc li {
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.toc a {
  color: var(--accent-blue);
  font-size: 14px;
  text-decoration: none;
  transition: color var(--transition);
}

.toc a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.toc .toc-sub {
  margin-left: 20px;
  list-style: circle;
}

/* ---- Code Block ---- */
.code-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  color: var(--accent-blue);
  overflow-x: auto;
  margin: 20px 0;
  line-height: 1.6;
  position: relative;
}

.code-block code {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ---- Author Byline ---- */
.author-byline {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.author-byline-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-blue-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
  color: var(--accent-blue);
  flex-shrink: 0;
  border: 1px solid rgba(0, 174, 239, 0.3);
}

.author-byline-info strong {
  display: block;
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 2px;
}

/* ---- Related Articles ---- */
.related-articles {
  max-width: 760px;
  margin: 40px auto;
  padding: 0 24px;
}

.related-articles h3 {
  font-size: 24px;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.related-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: var(--transition);
  text-decoration: none;
  display: block;
}

.related-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--glow-blue);
  text-decoration: none;
}

.related-card .category {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.related-card h4 {
  font-size: 16px;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 8px;
  transition: color var(--transition);
}

.related-card:hover h4 {
  color: var(--accent-blue);
}

.related-card .read-time {
  font-size: 13px;
  color: var(--text-muted);
}

/* ---- Article Hero Image ---- */
.article-hero-image {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

.article-hero-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

/* ---- Blog Card Photo ---- */
.blog-card-image--photo {
  background-size: cover !important;
  background-position: center !important;
}

/* ---- Blog Post Date ---- */
.post-date {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: 8px;
}

/* ---- Pagination ---- */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
}

.pagination-btn:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  text-decoration: none;
}

.pagination-btn--disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.pagination-pages {
  display: flex;
  gap: 6px;
}

.pagination-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
}

.pagination-page:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  text-decoration: none;
}

.pagination-page--active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #ffffff;
}

/* ---- Article Meta Line (header byline) ---- */
.article-meta-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 16px;
}

.article-meta-author {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-weight: 600;
}

.article-meta-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-blue-dim);
  border: 1px solid rgba(0,174,239,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-blue);
  flex-shrink: 0;
}

.article-meta-sep {
  color: var(--border-hover);
}

/* ---- Author Box ---- */
.author-box {
  max-width: 760px;
  margin: 0 auto 48px;
  padding: 0 24px;
  display: flex;
  gap: 24px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.author-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-orange));
}

.author-box-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-blue-dim);
  border: 2px solid rgba(0,174,239,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-blue);
  flex-shrink: 0;
}

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

.author-box-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.author-box-name {
  display: block;
  font-size: 17px;
  color: var(--text-primary);
  font-family: var(--font-heading);
  margin-bottom: 2px;
}

.author-box-role {
  display: block;
  font-size: 13px;
  color: var(--accent-blue);
  font-weight: 600;
}

.author-box-link {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition);
  flex-shrink: 0;
}

.author-box-link:hover {
  color: var(--accent-blue);
  text-decoration: none;
}

.author-box-bio {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px !important;
}

.author-box-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.author-badge {
  font-size: 12px;
  font-weight: 600;
  color: #00C864;
  background: rgba(0,200,100,0.08);
  border: 1px solid rgba(0,200,100,0.2);
  border-radius: 20px;
  padding: 4px 10px;
}

/* ---- Share Bar ---- */
.share-bar {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.share-bar span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: var(--transition);
  text-decoration: none;
}

.share-btn:hover {
  border-color: var(--border-hover);
  color: var(--accent-blue);
  text-decoration: none;
}
