/* ITZ Digital Labs — Blog styles */

.blog-page {
  padding-top: calc(var(--header-h) + 48px);
}

.blog-hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.blog-hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.blog-hero p {
  color: var(--text-muted);
  font-size: 1.0625rem;
  max-width: 640px;
  line-height: 1.7;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 64px 0 100px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  height: 100%;
}

.blog-card:hover {
  border-color: rgba(59, 130, 246, 0.35);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.blog-card__image {
  aspect-ratio: 16 / 9;
  background: var(--gradient-subtle);
  overflow: hidden;
  position: relative;
}

.blog-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card__image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  opacity: 0.5;
}

.blog-card__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.75rem;
}

.blog-card__category {
  padding: 4px 10px;
  background: rgba(59, 130, 246, 0.12);
  border-radius: 50px;
  color: var(--primary-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.blog-card__date {
  color: var(--text-dim);
}

.blog-card h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 10px;
}

.blog-card h2 a {
  color: var(--text);
}

.blog-card h2 a:hover {
  color: var(--primary-light);
}

.blog-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 16px;
}

.blog-card__link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-light);
}

/* Article */
.article {
  padding: calc(var(--header-h) + 32px) 0 100px;
}

.article__header {
  max-width: 760px;
  margin: 0 auto 40px;
  padding: 0 24px;
}

.article__breadcrumb {
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.article__breadcrumb a {
  color: var(--text-muted);
}

.article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.8125rem;
}

.article__category {
  padding: 4px 12px;
  background: rgba(59, 130, 246, 0.12);
  border-radius: 50px;
  color: var(--primary-light);
  font-weight: 600;
}

.article__header h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.article__excerpt {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.article__featured {
  max-width: 900px;
  margin: 0 auto 48px;
  padding: 0 24px;
}

.article__featured img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--gradient-subtle);
}

.article__content {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.article__content h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text);
  margin: 40px 0 16px;
  line-height: 1.3;
}

.article__content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin: 28px 0 12px;
}

.article__content p {
  margin-bottom: 20px;
}

.article__content ul,
.article__content ol {
  margin: 0 0 24px 24px;
  list-style: disc;
}

.article__content ol {
  list-style: decimal;
}

.article__content li {
  margin-bottom: 8px;
}

.article__content strong {
  color: var(--text);
}

.article__content a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article__cta {
  max-width: 760px;
  margin: 48px auto 0;
  padding: 32px;
  background: var(--gradient-subtle);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-lg);
  text-align: center;
}

.article__cta h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.article__cta p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 20px;
  line-height: 1.65;
}

.article__cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.article__related {
  max-width: 900px;
  margin: 64px auto 0;
  padding: 48px 24px 0;
  border-top: 1px solid var(--border);
}

.article__related h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
}

.article__related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.related-card {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}

.related-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
}

.related-card span {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.related-card h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 8px 0 0;
  line-height: 1.4;
}

.related-card h3 a {
  color: var(--text);
}

.related-card h3 a:hover {
  color: var(--primary-light);
}

/* Homepage blog preview */
.blog-preview {
  background: var(--bg);
}

.blog-preview__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.blog-preview__footer {
  text-align: center;
  margin-top: 40px;
}

@media (max-width: 1024px) {
  .blog-grid,
  .blog-preview__grid,
  .article__related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .blog-grid,
  .blog-preview__grid,
  .article__related-grid {
    grid-template-columns: 1fr;
  }
}
