/* Mobicolon Blog — extends main design system */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Toolbar */
.blog-toolbar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
  padding: 1.25rem;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: #fff;
}
.dark .blog-toolbar {
  background: #1e293b;
  border-color: #334155;
}
@media (min-width: 768px) {
  .blog-toolbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 1.25rem;
  }
}
.blog-toolbar-search {
  position: relative;
  flex: 1;
  max-width: 100%;
}
@media (min-width: 768px) {
  .blog-toolbar-search {
    max-width: 360px;
  }
}
.blog-toolbar-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  color: #6b7280;
  pointer-events: none;
}
.dark .blog-toolbar-icon {
  color: #94a3b8;
}
.blog-toolbar-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Layout */
.blog-layout {
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 1024px) {
  .blog-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
    gap: 3rem;
  }
}
.blog-main {
  min-width: 0;
}
.blog-sidebar {
  display: none;
}
@media (min-width: 1024px) {
  .blog-sidebar {
    display: block;
    position: sticky;
    top: 96px;
  }
}
.blog-popular-mobile {
  display: block;
}
@media (min-width: 1024px) {
  .blog-popular-mobile {
    display: none;
  }
}

/* Grid */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}
@media (min-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Cards */
.blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
.blog-card-cover-wrap {
  position: relative;
  overflow: hidden;
  background: #eff6ff;
}
.dark .blog-card-cover-wrap {
  background: #0f172a;
}
.blog-card-cover {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.blog-card:hover .blog-card-cover {
  transform: scale(1.03);
}
.blog-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.5rem;
}
.blog-card-footer {
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Category badge (listing + detail) */
.blog-category,
.blog-category-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #2563eb;
  background: #eff6ff;
  border-radius: 9999px;
}
.dark .blog-category-pill {
  background: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
}

/* Featured */
.blog-featured {
  display: grid;
  overflow: hidden;
  border-radius: 16px;
  transition: box-shadow 0.35s ease, transform 0.35s ease, border-color 0.35s ease;
}
@media (min-width: 768px) {
  .blog-featured {
    grid-template-columns: 1.15fr 1fr;
    min-height: 320px;
  }
}
.blog-featured:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}
.blog-featured-media {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  background: #eff6ff;
}
.dark .blog-featured-media {
  background: #0f172a;
}
@media (min-width: 768px) {
  .blog-featured-media {
    min-height: 100%;
  }
}
.blog-featured-cover {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease;
}
@media (min-width: 768px) {
  .blog-featured-cover {
    min-height: 100%;
    aspect-ratio: auto;
  }
}
.blog-featured:hover .blog-featured-cover {
  transform: scale(1.02);
}
.blog-featured-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.75rem;
}
@media (min-width: 768px) {
  .blog-featured-body {
    padding: 2rem 2.25rem;
  }
}
.blog-featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  padding: 0.35rem 0.85rem;
  margin-bottom: 1rem;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #2563eb;
  background: #eff6ff;
  border-radius: 9999px;
}
.dark .blog-featured-badge {
  background: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
}
.blog-featured-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2563eb;
  animation: blogPulse 2s ease-in-out infinite;
}
@keyframes blogPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  font-size: 13px;
  color: #6b7280;
}
.dark .blog-meta {
  color: #94a3b8;
}
.blog-meta-divider {
  color: #d1d5db;
}
.dark .blog-meta-divider {
  color: #475569;
}

/* Popular list */
.blog-popular-item {
  display: flex;
  gap: 0.875rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid #e5e7eb;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}
.dark .blog-popular-item {
  border-color: #334155;
}
.blog-popular-item:first-child {
  padding-top: 0;
}
.blog-popular-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.blog-popular-item:hover .blog-popular-title {
  color: #2563eb;
}
.blog-popular-thumb {
  width: 72px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #eff6ff;
  border: 1px solid #e5e7eb;
}
.dark .blog-popular-thumb {
  background: #0f172a;
  border-color: #334155;
}
.blog-popular-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  transition: color 0.2s;
}
.blog-popular-meta {
  font-size: 12px;
  color: #6b7280;
  margin-top: 0.25rem;
}
.dark .blog-popular-meta {
  color: #94a3b8;
}

/* Pagination */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.blog-page-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.875rem;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
}
.dark .blog-page-btn {
  background: #1e293b;
  border-color: #475569;
  color: #94a3b8;
}
.blog-page-btn:hover:not(:disabled) {
  border-color: #2563eb;
  color: #2563eb;
}
.blog-page-btn.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
.blog-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Detail page */
.blog-toc {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.25rem;
  background: #fff;
}
.dark .blog-toc {
  background: #1e293b;
  border-color: #334155;
}
.blog-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.blog-toc a {
  font-size: 14px;
  color: #6b7280;
  transition: color 0.2s;
}
.dark .blog-toc a {
  color: #94a3b8;
}
.blog-toc a:hover,
.blog-toc a.is-active {
  color: #2563eb;
}
.blog-article-content h2 {
  font-size: 1.375rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  padding-top: 0.5rem;
  scroll-margin-top: 96px;
  color: #111827;
}
.dark .blog-article-content h2 {
  color: #f1f5f9;
}
.blog-article-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 1.75rem 0 0.75rem;
  scroll-margin-top: 96px;
}
.blog-article-content p {
  color: #6b7280;
  line-height: 1.75;
  margin-bottom: 1rem;
}
.dark .blog-article-content p {
  color: #94a3b8;
}
.blog-article-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  color: #6b7280;
}
.dark .blog-article-content ul {
  color: #94a3b8;
}
.blog-article-content li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}
.blog-hero-image {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
}
.dark .blog-hero-image {
  border-color: #334155;
}
.blog-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  color: #6b7280;
  background: #fff;
  transition: all 0.2s;
  cursor: pointer;
}
.dark .blog-share-btn {
  border-color: #475569;
  color: #94a3b8;
  background: #1e293b;
}
.blog-share-btn:hover {
  border-color: #2563eb;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.06);
}
.blog-detail-layout {
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 1024px) {
  .blog-detail-layout {
    grid-template-columns: 220px 1fr;
    align-items: start;
  }
  .blog-toc-sticky {
    position: sticky;
    top: 96px;
  }
}
.blog-toc-mobile {
  display: block;
}
@media (min-width: 1024px) {
  .blog-toc-mobile {
    display: none;
  }
}
.blog-toc-desktop {
  display: none;
}
@media (min-width: 1024px) {
  .blog-toc-desktop {
    display: block;
  }
}
.blog-nav-prevnext {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .blog-nav-prevnext {
    grid-template-columns: 1fr 1fr;
  }
}
.blog-nav-link {
  display: block;
  padding: 1.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  transition: all 0.25s;
}
.dark .blog-nav-link {
  border-color: #334155;
  background: #1e293b;
}
.blog-nav-link:hover {
  border-color: #2563eb;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}
.blog-related-card {
  display: block;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  transition: all 0.3s;
}
.dark .blog-related-card {
  border-color: #334155;
  background: #1e293b;
}
.blog-related-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}
.blog-newsletter {
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  padding: 2.5rem 1.5rem;
  color: #fff;
  text-align: center;
}
@media (min-width: 768px) {
  .blog-newsletter {
    padding: 3rem 2.5rem;
  }
}
.blog-newsletter-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 0.75rem 1rem;
  min-height: 48px;
  border-radius: 12px;
  border: none;
  font-size: 15px;
  color: #111827;
}
.blog-newsletter-input:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .blog-featured-badge-dot {
    animation: none;
  }
  .blog-card:hover .blog-card-cover,
  .blog-featured:hover .blog-featured-cover,
  .blog-featured:hover,
  .blog-related-card:hover,
  .blog-nav-link:hover {
    transform: none;
  }
}