/* ==========================================================================
   1024TeraBoxDL — Blog Stylesheet (blog.css)
   Editorial layout, table of contents, author box, social sharing, article cards
   ========================================================================== */

.blog-hero {
  padding: 40px 0 24px 0;
  text-align: center;
}

.blog-hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.blog-hero p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 680px;
  margin: 0 auto;
}

/* Blog Filter & Search Toolbar */
.blog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin: 32px 0;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
}

.blog-categories {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cat-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cat-btn:hover, .cat-btn.active {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
}

.blog-search-box {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 260px;
}

.blog-search-input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition-fast);
}

.blog-search-input:focus {
  border-color: var(--border-focus);
}

.blog-search-icon {
  position: absolute;
  left: 10px;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

/* Featured Blog Post Card */
.featured-post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.featured-post-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-focus);
}

.featured-post-thumb {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  background: var(--bg-tertiary);
  display: flex;
}

.featured-post-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform var(--transition-normal);
}

.featured-post-card:hover .featured-post-img {
  transform: scale(1.03);
}

.featured-thumb-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.featured-thumb-icon {
  width: 56px;
  height: 56px;
}

.featured-post-content {
  padding: 36px 36px 36px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-meta-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.featured-post-content h2 {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 14px;
}

.featured-post-content h2 a {
  color: var(--text-primary);
  text-decoration: none;
}

.featured-post-content h2 a:hover {
  color: var(--brand-primary);
}

.featured-post-content p {
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Blog Articles Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
  margin-bottom: 48px;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-md);
}

.article-card-thumb {
  height: 195px;
  width: 100%;
  background: var(--bg-tertiary);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-light);
  display: block;
}

.article-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform var(--transition-normal);
}

.article-card:hover .article-thumb-img {
  transform: scale(1.04);
}

/* Individual Blog Post Featured Hero Image */
.article-featured-image-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 28px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
}

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

.article-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-card-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 10px 0;
}

.article-card-body h3 a {
  color: var(--text-primary);
  text-decoration: none;
}

.article-card-body h3 a:hover {
  color: var(--brand-primary);
}

.article-card-body p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}

.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 14px;
  margin-top: auto;
  font-size: 0.85rem;
}

/* ==========================================================================
   ARTICLE EDITORIAL LAYOUT
   ========================================================================== */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  padding: 32px 0 60px 0;
}

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

.article-header {
  margin-bottom: 32px;
}

.article-header h1 {
  font-size: clamp(2rem, 3.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 12px 0 16px 0;
  color: var(--text-primary);
}

.article-meta-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

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

.author-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.toc-box {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 28px 0;
}

.toc-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 0;
}

.toc-list a {
  color: var(--text-secondary);
  font-size: 0.92rem;
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

.article-body {
  font-size: 1.06rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-body p {
  margin-bottom: 24px;
  color: var(--text-secondary);
}

.article-body h2 {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 40px 0 16px 0;
  color: var(--text-primary);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.article-body h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 28px 0 12px 0;
  color: var(--text-primary);
}

.article-body ul, .article-body ol {
  margin: 16px 0 24px 24px;
  color: var(--text-secondary);
}

.article-body li {
  margin-bottom: 10px;
  line-height: 1.7;
}

.article-callout {
  background: var(--bg-card);
  border-left: 4px solid var(--brand-primary);
  border-top: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin: 28px 0;
}

.share-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 40px 0;
  padding: 16px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.share-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-decoration: none;
  border: 1px solid var(--border-light);
  transition: all var(--transition-fast);
}

.share-btn:hover {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
  text-decoration: none;
}

.author-box {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: center;
  margin: 40px 0;
}

.author-large-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
}

.author-info h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.author-info p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.sidebar-widget h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (max-width: 900px) {
  .featured-post-card {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .featured-post-content {
    padding: 24px;
  }
  .article-layout {
    grid-template-columns: 1fr;
  }
}
