/* ==========================================================================
   Made2Stick Learning - Blog & Editorial System Styles
   ========================================================================== */

.blog-hero {
  background: linear-gradient(135deg, #0a0d14 0%, #1e1115 50%, #111726 100%);
  color: #ffffff;
  padding: 64px 0 44px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(225, 29, 72, 0.2);
}

.blog-hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -50px;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(225, 29, 72, 0.15) 0%, rgba(225, 29, 72, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.blog-hero-content {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
}

.blog-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(225, 29, 72, 0.15);
  border: 1px solid rgba(225, 29, 72, 0.35);
  color: #fca5a5;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.blog-hero-title {
  font-size: clamp(32px, 4.5vw, 44px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.blog-hero-subtitle {
  font-size: 16.5px;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 28px;
}

/* Search & Filter Bar */
.blog-controls {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 820px;
  margin: 0 auto;
}

.blog-search-wrap {
  position: relative;
  width: 100%;
}

.blog-search-input {
  width: 100%;
  padding: 14px 20px 14px 46px;
  background: rgba(255, 255, 255, 0.95);
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  font-size: 15px;
  color: #0f172a;
  outline: none;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.blog-search-input:focus {
  background: #ffffff;
  border-color: #e11d48;
  box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.15);
}

.blog-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.blog-category-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.blog-filter-btn {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.blog-filter-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.blog-filter-btn.active {
  background: #e11d48;
  color: #ffffff;
  border-color: #e11d48;
  box-shadow: 0 2px 10px rgba(225, 29, 72, 0.4);
}

/* Featured Text-First Card */
.featured-text-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1.5px solid #e2e8f0;
  border-left: 6px solid #e11d48;
  border-radius: 20px;
  padding: 40px 44px;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08);
  margin-bottom: 48px;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.featured-text-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.14);
  border-color: #cbd5e1;
  border-left-color: #e11d48;
}

.featured-pill-badge {
  background: #0f172a;
  color: #f8fafc;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 999px;
}

.featured-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #e2e8f0;
  padding-top: 20px;
  margin-top: 10px;
  flex-wrap: wrap;
  gap: 16px;
}

/* Post Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
  margin-bottom: 50px;
}

/* Pure Text Article Card */
.blog-text-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  position: relative;
}

.blog-text-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -8px rgba(15, 23, 42, 0.12);
  border-color: #fda4af;
}

.read-more-link {
  color: #e11d48;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.2s;
}

.blog-text-card:hover .read-more-link {
  transform: translateX(4px);
}

.blog-card-img-wrap {
  position: relative;
  height: 200px;
  background: #0f172a;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

/* SVG Article Diagram Thumbnail */
.thumbnail-svg-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  padding: 12px;
  box-sizing: border-box;
  overflow: hidden;
}

.thumbnail-svg-wrap svg {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  transform: scale(0.92);
  transition: transform 0.3s ease;
  pointer-events: none;
}

.blog-card:hover .thumbnail-svg-wrap svg,
.featured-post-card:hover .thumbnail-svg-wrap svg {
  transform: scale(0.97);
}

/* Editorial Fallback Visual Badge */
.thumbnail-fallback-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 24px;
  box-sizing: border-box;
  text-align: center;
  overflow: hidden;
}

.thumb-pattern-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 16px 16px;
  pointer-events: none;
}

.thumb-inner-badge {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.thumb-icon {
  font-size: 36px;
  line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
}

.thumb-tag {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.thumb-title-preview {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

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

.blog-card-title {
  font-size: 19px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 10px;
}

.blog-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.blog-card-title a:hover {
  color: #e11d48;
}

.blog-card-excerpt {
  font-size: 14px;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
}

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

.author-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #334155;
}

.author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e11d48;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

/* Single Post Reader Layout */
.post-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 40px;
  align-items: start;
}

.post-article-main {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 44px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.post-header-wrap {
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1.5px solid #f1f5f9;
}

.post-main-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
  margin: 14px 0 16px;
  letter-spacing: -0.5px;
}

.post-featured-hero-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 36px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

/* Post Typography */
.post-content {
  font-size: 16.5px;
  line-height: 1.8;
  color: #334155;
}

.post-content h2 {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  margin: 38px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f1f5f9;
}

.post-content h3 {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin: 28px 0 12px;
}

.post-content p {
  margin-bottom: 20px;
}

.post-content ul, .post-content ol {
  margin-bottom: 24px;
  padding-left: 24px;
}

.post-content li {
  margin-bottom: 8px;
}

.post-content blockquote {
  background: #fff1f2;
  border-left: 4px solid #e11d48;
  padding: 16px 22px;
  border-radius: 0 12px 12px 0;
  margin: 28px 0;
  font-style: italic;
  color: #881337;
  font-size: 17px;
}

.post-content pre {
  background: #0f172a;
  color: #f8fafc;
  padding: 20px;
  border-radius: 12px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', Consolas, Monaco, monospace;
  font-size: 14px;
  line-height: 1.6;
  margin: 26px 0;
}

.post-content code {
  background: #f1f5f9;
  color: #be123c;
  padding: 3px 6px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', Consolas, Monaco, monospace;
  font-size: 13.5px;
}

.post-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

/* Author Bio Card */
.author-bio-box {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 26px;
  margin: 40px 0 32px;
  display: flex;
  gap: 20px;
  align-items: center;
}

.author-bio-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444 0%, #be123c 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
}

/* Sidebar Widgets */
.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 90px;
}

.sidebar-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.sidebar-title {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Responsive */
@media (max-width: 991px) {
  .featured-post-card {
    grid-template-columns: 1fr;
  }
  .featured-post-img-wrap {
    height: 240px;
    min-height: auto;
  }
  .post-layout-grid {
    grid-template-columns: 1fr;
  }
  .post-article-main {
    padding: 28px 20px;
  }
}

@media (max-width: 640px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .featured-post-body {
    padding: 24px 20px;
  }
}

/* ==========================================================================
   Embedded Course Video Callout Box for Blog Posts
   ========================================================================== */
.related-video-box {
  margin: 36px 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e1e38 100%);
  border: 1.5px solid #334155;
  border-radius: 16px;
  padding: 24px;
  color: #ffffff;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.25);
  position: relative;
  overflow: hidden;
}

.related-video-box::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(225, 29, 72, 0.2) 0%, rgba(225, 29, 72, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.related-video-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.related-video-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(225, 29, 72, 0.2);
  border: 1px solid rgba(225, 29, 72, 0.4);
  color: #fda4af;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 999px;
}

.related-video-meta {
  font-size: 12px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 12px;
}

.related-video-content-grid {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.related-video-info {
  flex: 1;
  min-width: 260px;
}

.related-video-title {
  font-size: 18px;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 6px;
  line-height: 1.35;
}

.related-video-module {
  font-size: 13px;
  color: #cbd5e1;
  margin-bottom: 8px;
}

.related-video-summary {
  font-size: 13.5px;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 0;
}

.related-video-btn-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

@media (max-width: 640px) {
  .related-video-content-grid {
    flex-direction: column;
    align-items: flex-start;
  }
  .related-video-btn-wrap {
    width: 100%;
    align-items: stretch;
  }
}

.btn-watch-video {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #e11d48;
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.4);
  white-space: nowrap;
}

.btn-watch-video:hover {
  background: #be123c;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(225, 29, 72, 0.5);
  color: #ffffff;
}

