/* ================================================================= */
/*  BLOG                                                               */
/* ================================================================= */

/* ── Blog Listing ──────────────────────────────────────────────────── */
.blog-hero {
  max-width: 1280px; margin: 0 auto; padding: 50px; text-align: center;
}
.blog-hero__logo { max-width: 250px; height: auto; margin-bottom: 16px; }
.blog-hero__title { font-size: 2.2rem; font-weight: 700; color: #222; margin-bottom: 16px; }
.blog-hero__subtitle { font-size: 1.1rem; line-height: 1.7; color: #555; max-width: 900px; white-space: nowrap; margin: 0 auto 30px; }

/* Category filter */
.blog-filters {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 40px;
}
.blog-filter {
  padding: 8px 18px; border-radius: 20px; border: 2px solid #ddd; background: #fff;
  font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.2s ease;
  color: #555; text-decoration: none;
}
.blog-filter:hover, .blog-filter.active {
  border-color: var(--pepla-green); color: var(--pepla-green); background: rgba(43,174,74,0.06);
}

/* Article grid */
.blog-grid {
  max-width: 1280px; margin: 0 auto; padding: 0 50px 50px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}

.blog-card {
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
}
.blog-card:hover {
  transform: translateY(-4px); box-shadow: 0 8px 28px rgba(0,0,0,0.12);
}

.blog-card__banner {
  height: 8px; display: flex;
}
.blog-card__banner span { flex: 1; }
.blog-card__banner--green span:nth-child(1) { background: var(--pepla-green); }
.blog-card__banner--green span:nth-child(2) { background: var(--pepla-green); opacity: 0.6; }
.blog-card__banner--green span:nth-child(3) { background: var(--pepla-green); opacity: 0.3; }
.blog-card__banner--orange span:nth-child(1) { background: var(--pepla-orange); }
.blog-card__banner--orange span:nth-child(2) { background: var(--pepla-orange); opacity: 0.6; }
.blog-card__banner--orange span:nth-child(3) { background: var(--pepla-orange); opacity: 0.3; }
.blog-card__banner--blue span:nth-child(1) { background: var(--pepla-blue); }
.blog-card__banner--blue span:nth-child(2) { background: var(--pepla-blue); opacity: 0.6; }
.blog-card__banner--blue span:nth-child(3) { background: var(--pepla-blue); opacity: 0.3; }
.blog-card__banner--purple span:nth-child(1) { background: var(--pepla-purple); }
.blog-card__banner--purple span:nth-child(2) { background: var(--pepla-purple); opacity: 0.6; }
.blog-card__banner--purple span:nth-child(3) { background: var(--pepla-purple); opacity: 0.3; }
.blog-card__banner--teal span:nth-child(1) { background: var(--pepla-teal); }
.blog-card__banner--teal span:nth-child(2) { background: var(--pepla-teal); opacity: 0.6; }
.blog-card__banner--teal span:nth-child(3) { background: var(--pepla-teal); opacity: 0.3; }
.blog-card__banner--coral span:nth-child(1) { background: var(--pepla-coral); }
.blog-card__banner--coral span:nth-child(2) { background: var(--pepla-coral); opacity: 0.6; }
.blog-card__banner--coral span:nth-child(3) { background: var(--pepla-coral); opacity: 0.3; }

.blog-card__body { padding: 24px; flex: 1; display: flex; flex-direction: column; background: #fff; }

.blog-card__category {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.blog-card__category--ai { color: var(--pepla-green); }
.blog-card__category--engineering { color: var(--pepla-blue); }
.blog-card__category--ux { color: var(--pepla-purple); }
.blog-card__category--ba { color: var(--pepla-orange); }
.blog-card__category--agile { color: var(--pepla-teal); }
.blog-card__category--roles { color: var(--pepla-coral); }
.blog-card__category--sdlc { color: var(--dark); }

.blog-card__title {
  font-size: 1.1rem; font-weight: 700; color: #222; margin-bottom: 12px; line-height: 1.4;
}
.blog-card__excerpt {
  font-size: 0.85rem; line-height: 1.6; color: #666; margin-bottom: 16px; flex: 1;
}
.blog-card__meta {
  font-size: 0.75rem; color: #999; display: flex; justify-content: space-between; align-items: center;
}
.blog-card__read {
  font-size: 0.8rem; font-weight: 600; color: var(--pepla-green);
}

/* ── Article Page ──────────────────────────────────────────────────── */
.article {
  max-width: 800px; margin: 0 auto; padding: 50px;
}

.article__back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.9rem; font-weight: 600; color: var(--pepla-green);
  text-decoration: none; margin-bottom: 30px;
  transition: color 0.2s ease;
}
.article__back:hover { color: var(--pepla-orange); }

.article__category {
  font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; margin-bottom: 12px; display: inline-block;
  padding: 4px 12px; border-radius: 20px;
}
.article__category--ai { background: rgba(43,174,74,0.1); color: var(--pepla-green); }
.article__category--engineering { background: rgba(41,171,226,0.1); color: var(--pepla-blue); }
.article__category--ux { background: rgba(142,68,173,0.1); color: var(--pepla-purple); }
.article__category--ba { background: rgba(231,76,60,0.1); color: var(--pepla-orange); }
.article__category--agile { background: rgba(26,188,156,0.1); color: var(--pepla-teal); }
.article__category--roles { background: rgba(230,126,34,0.1); color: var(--pepla-coral); }
.article__category--sdlc { background: rgba(26,26,26,0.08); color: var(--dark); }

.article__title {
  font-size: 2rem; font-weight: 700; color: #222; margin-bottom: 16px; line-height: 1.3;
}

.article__meta {
  font-size: 0.85rem; color: #999; margin-bottom: 40px; padding-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
}

/* Article hero banner — category-themed */
.article__banner {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.article__banner svg {
  width: 100%;
  height: 100%;
}

.article__banner--ai { background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%); }
.article__banner--engineering { background: linear-gradient(135deg, #e3f2fd 0%, #e8eaf6 100%); }
.article__banner--ux { background: linear-gradient(135deg, #f3e5f5 0%, #ede7f6 100%); }
.article__banner--ba { background: linear-gradient(135deg, #fbe9e7 0%, #fff3e0 100%); }
.article__banner--agile { background: linear-gradient(135deg, #e0f2f1 0%, #e0f7fa 100%); }
.article__banner--roles { background: linear-gradient(135deg, #fff3e0 0%, #fbe9e7 100%); }
.article__banner--sdlc { background: linear-gradient(135deg, #eceff1 0%, #e3f2fd 100%); }

/* Pullquote styling for visual breaks */
.article__content .pullquote {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--pepla-green);
  text-align: center;
  padding: 30px 40px;
  margin: 40px 0;
  border-top: 3px solid var(--pepla-green);
  border-bottom: 3px solid var(--pepla-green);
  line-height: 1.5;
}

/* Info box for tips/notes */
.article__content .info-box {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 24px;
  margin: 30px 0;
  border-left: 4px solid var(--pepla-blue);
}

.article__content .info-box h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--pepla-blue);
  margin-bottom: 8px;
}

.article__photo {
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

@media (max-width: 600px) {
  .article__photo { height: 200px; }
}

/* Inline SVG illustrations inside articles */
.article__illustration {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 30px 0;
  padding: 24px;
  background: #f8f9fa;
  border-radius: 12px;
  border-left: 4px solid var(--pepla-green);
}

.article__illustration--orange { border-left-color: var(--pepla-orange); }
.article__illustration--blue { border-left-color: var(--pepla-blue); }
.article__illustration--purple { border-left-color: var(--pepla-purple); }
.article__illustration--teal { border-left-color: var(--pepla-teal); }

.article__illustration svg {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  overflow: visible;
}

/* ── SVG draw-on animation ── */
.article__illustration svg path,
.article__illustration svg circle,
.article__illustration svg line,
.article__illustration svg rect,
.article__illustration svg polyline {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Stagger child elements */
.article__illustration svg *:nth-child(2) { transition-delay: 0.15s; }
.article__illustration svg *:nth-child(3) { transition-delay: 0.3s; }
.article__illustration svg *:nth-child(4) { transition-delay: 0.4s; }
.article__illustration svg *:nth-child(5) { transition-delay: 0.45s; }
.article__illustration svg *:nth-child(6) { transition-delay: 0.5s; }

/* Reveal strokes when in view */
.article__illustration.svg-drawn svg path,
.article__illustration.svg-drawn svg circle,
.article__illustration.svg-drawn svg line,
.article__illustration.svg-drawn svg rect,
.article__illustration.svg-drawn svg polyline {
  stroke-dashoffset: 0;
}

/* Gentle float after draw completes */
@keyframes svgFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

.article__illustration.svg-drawn svg {
  animation: svgFloat 3s ease-in-out 1.4s infinite;
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .article__illustration svg path,
  .article__illustration svg circle,
  .article__illustration svg line,
  .article__illustration svg rect,
  .article__illustration svg polyline {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
    transition: none;
  }
  .article__illustration.svg-drawn svg { animation: none; }
}

.article__illustration p {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .article__illustration { flex-direction: column; text-align: center; }
  .article__illustration svg { width: 60px; height: 60px; }
}

.article__content { font-size: 1.05rem; line-height: 1.9; color: #333; }
.article__content h2 {
  font-size: 1.5rem; font-weight: 700; color: #222; margin: 40px 0 16px;
}
.article__content h3 {
  font-size: 1.2rem; font-weight: 700; color: #333; margin: 32px 0 12px;
}
.article__content p { margin-bottom: 20px; }
.article__content ul, .article__content ol {
  margin: 0 0 20px 24px;
}
.article__content li {
  margin-bottom: 8px; line-height: 1.7;
}
.article__content blockquote {
  border-left: 4px solid var(--pepla-green); padding: 16px 24px; margin: 24px 0;
  background: #f8f8f8; border-radius: 0 8px 8px 0; font-style: italic; color: #555;
}
.article__content code {
  background: #f4f4f4; padding: 2px 6px; border-radius: 4px; font-size: 0.9em;
  font-family: 'Courier New', monospace;
}
.article__content pre {
  background: #1a1a1a; color: #e0e0e0; padding: 20px; border-radius: 8px;
  overflow-x: auto; margin: 24px 0; font-size: 0.85rem; line-height: 1.6;
}
.article__content strong { color: #222; }

/* Article CTA */
.article__cta {
  margin-top: 50px; padding: 32px; background: #f8f8f8; border-radius: 12px;
  border-left: 4px solid var(--pepla-green); text-align: center;
}
.article__cta h3 { font-size: 1.2rem; font-weight: 700; color: #222; margin-bottom: 8px; }
.article__cta p { font-size: 0.95rem; color: #555; margin-bottom: 16px; }

/* Related articles */
.article__related {
  margin-top: 50px; padding-top: 30px; border-top: 2px solid #f0f0f0;
}
.article__related h3 { font-size: 1.2rem; font-weight: 700; color: #222; margin-bottom: 20px; }
.article__related-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); padding: 0 20px 50px; }
  .article__related-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-hero { padding: 50px 20px; }
  .article { padding: 50px 20px; }
  .article__title { font-size: 1.5rem; }
}
