/* Blog listing + post pages */

.blog-page {
  padding: 48px 0 80px;
}

.blog-page__header {
  margin-bottom: 40px;
}

.blog-page__title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin: 0 0 12px;
  color: #1f2937;
}

.blog-page__lead {
  color: #64748b;
  font-size: 1.0625rem;
  margin: 0;
  max-width: 640px;
}

/* Featured card (page 1) */
.blog-featured {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  align-items: center;
  margin-bottom: 48px;
  padding: 32px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 16px;
  color: #fff;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.blog-featured:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.25);
  color: #fff;
}

.blog-featured__label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fbbf24;
  margin: 0 0 12px;
}

.blog-featured__title {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  margin: 0 0 12px;
  line-height: 1.25;
  color: #fff;
}

.blog-featured__excerpt {
  margin: 0 0 16px;
  color: #cbd5e1;
  line-height: 1.6;
}

.blog-featured__meta {
  font-size: 0.875rem;
  color: #94a3b8;
}

.blog-featured__thumb {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #334155;
}

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

/* Post grid */
.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.blog-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: center;
  padding-bottom: 40px;
  border-bottom: 1px solid #e2e8f0;
}

.blog-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.blog-card__thumb {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f9;
  display: block;
}

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

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

.blog-card__categories {
  font-size: 0.8125rem;
  color: #2563eb;
  font-weight: 600;
  margin: 0 0 8px;
}

.blog-card__title {
  font-size: 1.25rem;
  margin: 0 0 10px;
  line-height: 1.3;
}

.blog-card__title a {
  color: #1f2937;
  text-decoration: none;
}

.blog-card__title a:hover {
  color: #2563eb;
}

.blog-card__excerpt {
  color: #64748b;
  font-size: 0.9375rem;
  line-height: 1.65;
  margin: 0 0 12px;
}

.blog-card__meta {
  font-size: 0.8125rem;
  color: #94a3b8;
}

.blog-card__link {
  color: #2563eb;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
}

.blog-card__link:hover {
  text-decoration: underline;
}

/* Pagination */
.blog-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.blog-pagination a,
.blog-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #e2e8f0;
  color: #334155;
  background: #fff;
}

.blog-pagination a:hover {
  border-color: #2563eb;
  color: #2563eb;
}

.blog-pagination .is-current {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

/* Post article */
.post-breadcrumb {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 24px;
}

.post-breadcrumb a {
  color: #64748b;
  text-decoration: none;
}

.post-breadcrumb a:hover {
  color: #2563eb;
}

.post-header {
  margin-bottom: 32px;
}

.post-header time {
  display: block;
  font-size: 0.875rem;
  color: #94a3b8;
  margin-bottom: 12px;
}

.post-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.2;
  margin: 0 0 16px;
  color: #1f2937;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-tag {
  background: #eff6ff;
  color: #2563eb;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.post-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 32px;
  background: #0f172a;
}

.post-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.post-content {
  max-width: 820px;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5 {
  color: #1f2937;
  margin: 32px 0 16px;
  line-height: 1.3;
}

.post-content h1 { font-size: 1.75rem; }
.post-content h2 { font-size: 1.5rem; }
.post-content h3 { font-size: 1.25rem; }

.post-content p,
.post-content li {
  line-height: 1.75;
  color: #334155;
  margin: 0 0 16px;
}

.post-content ul,
.post-content ol {
  margin: 0 0 16px;
  padding-left: 1.25rem;
}

.post-content a {
  color: #2563eb;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 16px 0;
}

.post-content iframe {
  max-width: 100%;
  border-radius: 8px;
}

/* Discover toolbar */
.blog-toolbar {
  margin-bottom: 28px;
  padding: 20px 22px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

.blog-toolbar__search {
  margin-bottom: 16px;
}

.blog-toolbar__search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.blog-toolbar__input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  font-size: 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%2394a3b8' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") 14px center no-repeat;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.blog-toolbar__input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.blog-toolbar__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.blog-tag-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.blog-tag-btn:hover {
  border-color: #2563eb;
  color: #2563eb;
}

.blog-tag-btn.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.blog-tag-btn__count {
  font-size: 0.6875rem;
  opacity: 0.75;
  font-weight: 700;
}

.blog-toolbar__clear {
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: #2563eb;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.blog-results-meta {
  margin: 0 0 20px;
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 600;
}

.blog-empty {
  text-align: center;
  padding: 48px 20px;
  color: #64748b;
  font-size: 1.0625rem;
}

.blog-card.hidden,
.blog-featured.hidden {
  display: none !important;
}

.blog-grid:not(.is-filtering) .blog-card--featured-source {
  display: none;
}

/* Draft review banner */
.draft-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: baseline;
  margin: 0 0 24px;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid #f59e0b;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.draft-banner strong {
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.8125rem;
}

.drafts-queue {
  max-width: 720px;
}

.drafts-queue__list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.drafts-queue__list a {
  display: block;
  padding: 16px 18px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  color: #0f172a;
  font-weight: 700;
}

.drafts-queue__list a:hover {
  border-color: #f2c01b;
  background: #fffbeb;
}

.drafts-queue__meta {
  display: block;
  margin-top: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #64748b;
}

.drafts-queue__empty {
  color: #64748b;
  margin-top: 24px;
}

/* End-of-post related articles + course CTAs */
.post-related {
  margin-top: 48px;
  padding-top: 36px;
  border-top: 1px solid #e2e8f0;
  display: grid;
  gap: 32px;
}

.post-related__heading {
  margin: 0 0 14px;
  font-size: 1.125rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.post-related__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.post-related__list a {
  display: block;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.4;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.post-related__list a:hover {
  border-color: #f2c01b;
  background: #fffbeb;
  transform: translateY(-1px);
}

.post-related__courses {
  display: grid;
  gap: 14px;
}

.post-related__course-card {
  padding: 20px 22px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #f8fafc;
}

.post-related__course-title {
  margin: 0 0 8px;
  font-size: 1.0625rem;
  font-weight: 800;
  color: #fff;
}

.post-related__course-blurb {
  margin: 0 0 16px;
  color: #cbd5e1;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.post-related__course-cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: #f2c01b;
  color: #111827;
  font-weight: 800;
  font-size: 0.875rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.post-related__course-cta:hover {
  background: #d9a800;
  color: #111827;
  transform: translateY(-1px);
}

@media (min-width: 768px) {
  .post-related {
    grid-template-columns: 1.1fr 1fr;
    align-items: start;
  }

  .post-related__block--courses {
    position: sticky;
    top: 96px;
  }
}

@media (max-width: 900px) {
  .blog-featured {
    grid-template-columns: 1fr;
  }

  .blog-card {
    grid-template-columns: 1fr;
  }
}
