/* ============================================================
   DriveSelect — Blog Index Page Styles
   css/blog.css
   ============================================================ */

/* ── Blog hero ────────────────────────────────────────────── */
.blog-hero {
  background: var(--surface-1);
}

.blog-hero-title {
  font-family: var(--ff-display);
  font-size: clamp(var(--text-xl), 5vw, var(--text-2xl));
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--ink-900);
  margin-bottom: var(--space-3);
}

.blog-hero-sub {
  font-size: var(--text-base);
  color: var(--ink-500);
  line-height: 1.7;
  max-width: 56ch;
}

/* ── Featured post ────────────────────────────────────────── */
.featured-post {
  overflow: visible;
}

.featured-post a.featured-post-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  min-height: 320px;
  text-decoration: none;
  color: inherit;
}

.featured-post-img {
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
}

.featured-post-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
  display: block;
}

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

.featured-label {
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  background: var(--brand);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--r-full);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.featured-post-body {
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
}

.featured-post-title {
  font-family: var(--ff-display);
  font-size: clamp(var(--text-md), 2.5vw, var(--text-xl));
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  line-height: 1.2;
  margin-bottom: var(--space-4);
}

.featured-post:hover .featured-post-title {
  color: var(--brand);
}

.featured-post-excerpt {
  font-size: var(--text-sm);
  color: var(--ink-500);
  line-height: 1.7;
  flex: 1;
  margin-bottom: var(--space-5);
}

.featured-post-meta {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  font-size: var(--text-xs);
  color: var(--ink-300);
}

.featured-post-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.featured-post-meta i {
  font-size: 12px;
}

/* ── Category tabs ────────────────────────────────────────── */
.cat-tabs-row {
  margin-bottom: var(--space-6);
}

.cat-tabs {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.cat-tab {
  padding: 7px 16px;
  border-radius: var(--r-full);
  font-size: var(--text-sm);
  font-weight: 500;
  border: var(--border-mid);
  background: transparent;
  color: var(--ink-500);
  cursor: pointer;
  transition: all var(--dur-fast);
}

.cat-tab:hover {
  background: var(--surface-2);
  color: var(--ink-900);
}

.cat-tab.is-active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* ── Blog grid ────────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-5);
}

/* ── Newsletter ───────────────────────────────────────────── */
.newsletter-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.newsletter-title {
  font-family: var(--ff-display);
  font-size: clamp(var(--text-lg), 3vw, var(--text-xl));
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  margin-bottom: var(--space-2);
}

.newsletter-sub {
  font-size: var(--text-base);
  color: var(--ink-500);
  margin-bottom: var(--space-6);
}

.newsletter-form {
  display: flex;
  gap: var(--space-2);
  max-width: 420px;
  margin: 0 auto;
}

.newsletter-input {
  flex: 1;
}

.newsletter-error {
  font-size: var(--text-xs);
  color: var(--danger);
  margin-top: var(--space-2);
}

.newsletter-success {
  font-size: var(--text-sm);
  color: var(--success);
  margin-top: var(--space-3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 700px) {
  .featured-post a.featured-post-inner {
    grid-template-columns: 1fr;
  }

  .featured-post-img {
    height: 200px;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form .btn {
    width: 100%;
  }
}