/* KTP Digital Blog - Additional styles extending landing.css */
/* DSGVO-compliant: No external CDN calls */

/* ===== Blog Grid ===== */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 640px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== Blog Card ===== */
.blog-card {
  background: #fff;
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid #f3f4f6;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: all 300ms ease;
}

.blog-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

.blog-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.blog-card-content {
  padding: 1.5rem;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}

.blog-card-date {
  color: var(--color-muted-foreground);
}

.blog-card-category {
  display: inline-flex;
  padding: 0.25rem 0.75rem;
  background: hsla(82, 85%, 55%, 0.1);
  color: hsl(82, 70%, 35%);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.blog-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-foreground);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.blog-card-title:hover {
  color: hsl(82, 70%, 35%);
}

.blog-card-excerpt {
  color: var(--color-muted-foreground);
  font-size: 0.9375rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Category Filter ===== */
.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.category-btn {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  background: #fff;
  color: var(--color-muted-foreground);
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: all 150ms ease;
}

.category-btn:hover {
  border-color: var(--color-lime);
  color: var(--color-foreground);
}

.category-btn.active {
  background: var(--color-lime);
  color: var(--color-foreground);
  border-color: var(--color-lime);
}

/* ===== Blog Post Article ===== */
.article-header {
  margin-bottom: 3rem;
}

.article-cover {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border-radius: 1.5rem;
  margin-bottom: 2rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9375rem;
  color: var(--color-muted-foreground);
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.article-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--color-foreground);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

@media (min-width: 768px) {
  .article-title {
    font-size: 3rem;
  }
}

/* ===== Article Content ===== */
.article-content {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--color-foreground);
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-foreground);
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--color-foreground);
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content ul {
  list-style-type: disc;
}

.article-content ol {
  list-style-type: decimal;
}

.article-content blockquote {
  border-left: 4px solid var(--color-lime);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--color-muted-foreground);
}

.article-content a {
  color: hsl(82, 70%, 35%);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-content a:hover {
  color: var(--color-lime);
}

.article-content img {
  width: 100%;
  border-radius: 1rem;
  margin: 2rem 0;
}

.article-content strong {
  font-weight: 600;
}

/* ===== Back Link ===== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-muted-foreground);
  text-decoration: none;
  transition: all 150ms ease;
  margin-bottom: 2rem;
}

.back-link:hover {
  background: #f9fafb;
  border-color: var(--color-lime);
  color: var(--color-foreground);
}

.back-link:hover svg,
.back-link:hover i {
  transform: translateX(-2px);
}

.back-link svg,
.back-link i {
  transition: transform 150ms ease;
}

/* ===== Table of Contents ===== */
.toc {
  background: #fff;
  border-radius: 1rem;
  padding: 1.5rem 1.75rem;
  margin-bottom: 2.5rem;
  border: 1px solid #e5e7eb;
  border-left: 4px solid var(--color-lime);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.toc-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-foreground);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toc-title::before {
  content: "📑";
  font-size: 1.125rem;
}

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

.toc-list li {
  margin-bottom: 0.625rem;
  counter-increment: toc-counter;
  padding-left: 0;
}

.toc-list li:last-child {
  margin-bottom: 0;
}

.toc-list a {
  color: var(--color-muted-foreground);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: all 150ms ease;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.toc-list a::before {
  content: counter(toc-counter) ".";
  font-weight: 600;
  color: var(--color-lime);
  min-width: 1.25rem;
}

.toc-list a:hover {
  color: var(--color-foreground);
}

.toc-list a:hover::before {
  color: hsl(82, 70%, 35%);
}

/* ===== App Promo Banner ===== */
.app-promo {
  background: linear-gradient(135deg, hsl(82, 85%, 55%) 0%, hsl(82, 75%, 45%) 100%);
  border-radius: 1.5rem;
  padding: 2rem;
  margin: 3rem 0;
  text-align: center;
}

.app-promo-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-foreground);
  margin-bottom: 0.5rem;
}

.app-promo-text {
  color: hsl(82, 30%, 20%);
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.app-promo-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: var(--color-foreground);
  color: #fff;
  border-radius: 1rem;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 150ms ease;
}

.app-promo-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ===== Related Posts ===== */
.related-posts {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid #e5e7eb;
}

.related-posts-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-foreground);
  margin-bottom: 1.5rem;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-muted-foreground);
  margin-bottom: 1.5rem;
}

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

.breadcrumb a:hover {
  color: var(--color-foreground);
}

.breadcrumb-separator {
  color: #d1d5db;
}

/* ===== Reading Time ===== */
.reading-time {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* ===== Utilities ===== */
.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;
}

.aspect-video {
  aspect-ratio: 16 / 9;
}

.aspect-wide {
  aspect-ratio: 21 / 9;
}

/* ===== Responsive adjustments ===== */
@media (max-width: 640px) {
  .article-content {
    font-size: 1rem;
  }

  .article-title {
    font-size: 1.875rem;
  }

  .app-promo {
    padding: 1.5rem;
  }

  .app-promo-title {
    font-size: 1.25rem;
  }
}
