/* ============================================
   MEGA AUTO PARTS — Blog Styles
   Single post + Archive
   ============================================ */

/* ── Archive Hero ── */
.blog-archive-hero {
  background: linear-gradient(135deg, #0A0A0A 0%, #1A1A2E 100%);
  padding: 100px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.blog-archive-hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(32, 64, 129, 0.1), transparent 70%);
}

.blog-archive-overline {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 12px;
}

.blog-archive-title {
  font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 14px;
  letter-spacing: -0.03em;
}

.blog-archive-desc {
  color: rgba(255,255,255,0.45);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Archive Content ── */
.blog-archive-content {
  background: #FAFAFE;
  padding: 60px 0 80px;
}

/* ── Featured Card (first post) ── */
.blog-featured-card {
  display: block;
  text-decoration: none;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 48px;
  position: relative;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.blog-featured-img {
  position: relative;
  aspect-ratio: 21/9;
  overflow: hidden;
}

.blog-featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-featured-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
}

.blog-featured-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px;
}

.blog-featured-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.blog-featured-title {
  font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.blog-featured-excerpt {
  color: rgba(255,255,255,0.6);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 0 14px;
}

.blog-featured-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.4);
  font-size: 0.8rem;
}

/* ── Blog Grid ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ── Blog Card ── */
.blog-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.blog-card-img {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #E8E8F0;
}

.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-img img {
  transform: scale(1.05);
}

.blog-card-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #E8E8F0 0%, #D0D0DC 100%);
}

/* Badges on card image */
.blog-card-cat {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #204081;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 6px;
}


.blog-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-title {
  font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: #0A0A0A;
  margin: 0 0 8px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.blog-card-excerpt {
  font-size: 0.85rem;
  color: #7A7A8E;
  line-height: 1.6;
  margin: 0 0 16px;
  flex: 1;
}

.blog-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid #F0F0F5;
}

.blog-card-date {
  font-size: 0.75rem;
  color: #9E9EB0;
}

.blog-card-read {
  font-size: 0.78rem;
  font-weight: 600;
  color: #204081;
  transition: gap 0.2s;
}

/* ── Pagination ── */
.blog-pagination {
  margin-top: 48px;
  text-align: center;
}

.blog-pagination .page-numbers {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  margin: 0;
}

.blog-pagination .page-numbers li {
  display: inline-block;
}

.blog-pagination .page-numbers a,
.blog-pagination .page-numbers span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: #5A5A6E;
  background: #fff;
  border: 1px solid #E2E2EA;
  transition: all 0.2s ease;
}

.blog-pagination .page-numbers a:hover {
  background: #204081;
  color: #fff;
  border-color: #204081;
}

.blog-pagination .page-numbers .current {
  background: #204081;
  color: #fff;
  border-color: #204081;
}

/* ── Empty State ── */
.blog-empty {
  text-align: center;
  padding: 80px 0;
}

.blog-empty h2 {
  font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
  color: #0A0A0A;
  margin: 0 0 8px;
}

.blog-empty p {
  color: #7A7A8E;
}

/* ============================================
   SINGLE POST
   ============================================ */

/* ── Single Hero ── */
.blog-single-hero {
  position: relative;
  height: 60vh;
  min-height: 400px;
  max-height: 600px;
  background-size: cover;
  background-position: center;
  background-color: #1A1A2E;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.blog-single-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 40%, rgba(0,0,0,0.15) 100%);
}

.blog-single-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

.blog-single-meta-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}


.blog-cat-badge {
  background: #204081;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s;
}

.blog-cat-badge:hover {
  background: #1B3060;
}

.blog-single-title {
  font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 14px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.blog-single-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.45);
  font-size: 0.82rem;
}

.blog-meta-sep {
  opacity: 0.4;
}

/* ── Single Content ── */
.blog-single-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

/* Content body — editorial typography */
.blog-content-body {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #2D2D3F;
}

.blog-content-body p {
  margin: 0 0 1.6em;
}

.blog-content-body a {
  color: #204081;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.blog-content-body a:hover {
  color: #1B3060;
}

/* Headings */
.blog-content-body h2 {
  font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
  font-size: 1.6rem;
  font-weight: 800;
  color: #0A0A0A;
  margin: 2.2em 0 0.8em;
  padding-left: 16px;
  border-left: 3px solid #204081;
  letter-spacing: -0.02em;
}

.blog-content-body h3 {
  font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: #1A1A2E;
  margin: 1.8em 0 0.6em;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(32, 64, 129, 0.15);
}

/* Images — full width, polished */
.blog-content-body img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 6px 28px rgba(0,0,0,0.1);
  margin: 2em 0;
  display: block;
  object-fit: cover;
}

.blog-content-body figure {
  margin: 2.5em 0;
}

.blog-content-body figure img {
  margin: 0;
}

.blog-content-body figcaption {
  font-size: 0.8rem;
  color: #9E9EB0;
  text-align: center;
  margin-top: 12px;
  font-style: italic;
  letter-spacing: 0.01em;
}

/* WP Gallery — 2-column side by side */
.blog-content-body .wp-block-gallery,
.blog-content-body .gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 1.5em 0;
}

.blog-content-body .wp-block-gallery img,
.blog-content-body .gallery img {
  margin: 0;
  border-radius: 10px;
}

/* Blockquotes — pull quote */
.blog-content-body blockquote {
  margin: 2em 0;
  padding: 24px 28px;
  border-left: 4px solid #204081;
  background: rgba(32, 64, 129, 0.04);
  border-radius: 0 12px 12px 0;
  font-size: 1.15rem;
  font-style: italic;
  color: #1A1A2E;
  line-height: 1.7;
}

.blog-content-body blockquote p {
  margin: 0;
}

/* Lists */
.blog-content-body ul,
.blog-content-body ol {
  margin: 0 0 1.6em;
  padding-left: 1.5em;
}

.blog-content-body li {
  margin-bottom: 0.5em;
}

/* ── Tags ── */
.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #E2E2EA;
}

.blog-tag {
  font-size: 0.78rem;
  font-weight: 600;
  color: #204081;
  background: rgba(32, 64, 129, 0.06);
  padding: 5px 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
}

.blog-tag:hover {
  background: #204081;
  color: #fff;
}

/* ── Author Box ── */
.blog-author-box {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 40px;
  padding: 24px;
  background: #F9FAFE;
  border: 1px solid #E8E8F0;
  border-radius: 14px;
}

.blog-author-avatar img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.blog-author-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #204081;
  display: block;
  margin-bottom: 2px;
}

.blog-author-name {
  font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
  font-size: 1rem;
  color: #0A0A0A;
  display: block;
}

.blog-author-bio {
  font-size: 0.85rem;
  color: #7A7A8E;
  margin: 4px 0 0;
  line-height: 1.5;
}

/* ── Related Posts ── */
.blog-related {
  background: #F4F4F8;
  padding: 64px 0 80px;
}

.blog-related-title {
  font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
  font-size: 1.5rem;
  font-weight: 800;
  color: #0A0A0A;
  text-align: center;
  margin: 0 0 36px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .blog-archive-hero {
    padding: 80px 0 40px;
  }

  .blog-featured-content {
    padding: 24px;
  }

  .blog-featured-title {
    font-size: 1.3rem;
  }

  .blog-featured-img {
    aspect-ratio: 16/9;
  }

  .blog-single-hero {
    height: 50vh;
    min-height: 320px;
  }

  .blog-single-title {
    font-size: 1.6rem;
  }

  .blog-single-hero-content {
    padding: 0 20px 32px;
  }

  .blog-content-body {
    font-size: 1rem;
  }

  .blog-content-body h2 {
    font-size: 1.35rem;
  }

  .blog-related .blog-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 600px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .blog-featured-excerpt {
    display: none;
  }

  .blog-author-box {
    flex-direction: column;
    text-align: center;
  }

  .blog-single-meta {
    flex-wrap: wrap;
    gap: 4px 8px;
  }

  .blog-content-body .wp-block-gallery,
  .blog-content-body .gallery {
    grid-template-columns: 1fr;
  }
}
