/* ═══════════════════════════════════════════════════
   DELTECH SOLUTIONS — blog.css
   Blog-specific styles
   ═══════════════════════════════════════════════════ */

/* Accessibility helper */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* Blog Hero */
.blog-hero {
  padding-top: calc(var(--nav-h) + var(--sp-16));
  padding-bottom: var(--sp-16);
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border-soft);
}

.blog-hero-inner { max-width: 640px; }

.blog-hero-title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: 400;
  color: var(--c-ink-900);
  line-height: 1.12;
  letter-spacing: -.02em;
  margin-bottom: var(--sp-4);
}

.blog-hero-sub {
  font-size: var(--text-lg);
  color: var(--c-ink-500);
  line-height: 1.7;
}

/* Blog List Section */
.blog-list-section {
  padding-block: var(--sp-16);
}

.blog-categories {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-12);
}

/* Featured post */
.blog-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-10);
  align-items: center;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-2xl);
  padding: var(--sp-10);
  margin-bottom: var(--sp-12);
  transition: box-shadow var(--dur-base);
}
.blog-featured:hover { box-shadow: var(--shadow-md); }

.blog-featured-title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-xl), 2.5vw, var(--text-3xl));
  font-weight: 400;
  color: var(--c-ink-900);
  line-height: 1.2;
  margin-bottom: var(--sp-4);
}

.blog-featured-title a { transition: color var(--dur-fast); }
.blog-featured-title a:hover { color: var(--c-accent-dark); }

.blog-featured-excerpt {
  font-size: var(--text-base);
  color: var(--c-ink-500);
  line-height: 1.75;
  margin-bottom: var(--sp-6);
}

.blog-author-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.author-name-inline {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--c-ink-900);
}

.author-role-inline {
  font-size: var(--text-xs);
  color: var(--c-ink-500);
}

.blog-featured-img {
  border-radius: var(--r-xl);
  overflow: hidden;
  aspect-ratio: 4/3;
}

.featured-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e0f2fe, #ede9fe);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6366f1;
  min-height: 240px;
}

/* Article grid */
.blog-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: var(--sp-6);
  margin-bottom: var(--sp-16);
}

.blog-article-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: var(--sp-7);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  transition: box-shadow var(--dur-base), transform var(--dur-base);
}
.blog-article-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.article-meta time,
.read-time {
  font-size: var(--text-xs);
  color: var(--c-ink-300);
  font-family: var(--font-mono);
}

.article-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--c-ink-900);
  line-height: 1.3;
  flex: 1;
}

.article-title a { transition: color var(--dur-fast); }
.article-title a:hover { color: var(--c-accent-dark); }

.article-excerpt {
  font-size: var(--text-sm);
  color: var(--c-ink-500);
  line-height: 1.7;
}

.article-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--c-border-soft);
}

.article-author {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--c-ink-500);
}

/* Newsletter */
.blog-newsletter {
  background: var(--c-ink-900);
  border-radius: var(--r-2xl);
  padding: var(--sp-12) var(--sp-10);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-10);
  flex-wrap: wrap;
}

.newsletter-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  color: #fff;
  margin-bottom: var(--sp-2);
}

.newsletter-sub {
  font-size: var(--text-sm);
  color: rgba(255,255,255,.5);
}

.newsletter-form { flex: 1; min-width: 280px; }

.newsletter-input-row {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.newsletter-input-row .form-input {
  flex: 1;
  min-width: 200px;
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.12);
  color: #fff;
}

.newsletter-input-row .form-input::placeholder { color: rgba(255,255,255,.35); }
.newsletter-input-row .form-input:focus {
  border-color: var(--c-accent);
  background: rgba(255,255,255,.1);
}

.newsletter-form .form-error { color: #fca5a5; margin-top: var(--sp-2); }
.newsletter-form .form-success { background: rgba(22,163,74,.2); border-color: rgba(22,163,74,.4); color: #86efac; margin-top: var(--sp-3); }

/* Responsive blog */
@media (max-width: 768px) {
  .blog-featured {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
  }
  .blog-featured-img { order: -1; aspect-ratio: 16/9; }
  .blog-newsletter { flex-direction: column; align-items: flex-start; padding: var(--sp-8); }
}

@media (max-width: 480px) {
  .newsletter-input-row { flex-direction: column; }
  .newsletter-input-row .btn { width: 100%; }
}
