/**
 * MS STUDY GURU — Blog & Article Public Pages Stylesheet
 * Matches visual reference: Dark Teal Header (#0B4D62), Light Gray Background (#EBF4FA),
 * Clean white cards with soft shadows, and teal accent typography (#2F7F9F).
 */

:root {
  --blog-teal: #0B4D62;
  --blog-teal-accent: #2F7F9F;
  --blog-teal-hover: #1e6b84;
  --blog-teal-light: #e0f2fe;
  --blog-bg: #EBF4FA;
  --blog-card-bg: #ffffff;
  --blog-text-dark: #0f172a;
  --blog-text-navy: #1e293b;
  --blog-text-muted: #64748b;
  --blog-border: #e2e8f0;
}

/* Page Background */
body.blog-page-bg {
  background-color: var(--blog-bg) !important;
  color: var(--blog-text-dark);
  font-family: var(--default-font, "Plus Jakarta Sans", sans-serif);
}

/* ==============================================================
   Blog Page Entrance Animations (Smooth Cascading & Silky Rise)
   ============================================================== */
.blog-content-wrapper {
  padding-top: 110px;
  padding-bottom: 70px;
  animation: blogWrapperFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes blogWrapperFadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* Header Section (Title + Subtitle + Categories Nav) */
.blog-header-section {
  margin-bottom: 35px;
  animation: blogHeaderEntrance 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
  will-change: transform, opacity;
}

@keyframes blogHeaderEntrance {
  0% {
    opacity: 0;
    transform: translateY(24px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered Pop-In for Category Pills */
.blog-categories-nav .cat-filter-pill {
  animation: blogPillEntrance 0.5s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}
.blog-categories-nav .cat-filter-pill:nth-child(1) { animation-delay: 0.10s; }
.blog-categories-nav .cat-filter-pill:nth-child(2) { animation-delay: 0.16s; }
.blog-categories-nav .cat-filter-pill:nth-child(3) { animation-delay: 0.22s; }
.blog-categories-nav .cat-filter-pill:nth-child(4) { animation-delay: 0.28s; }
.blog-categories-nav .cat-filter-pill:nth-child(5) { animation-delay: 0.34s; }
.blog-categories-nav .cat-filter-pill:nth-child(6) { animation-delay: 0.40s; }
.blog-categories-nav .cat-filter-pill:nth-child(n+7) { animation-delay: 0.46s; }

@keyframes blogPillEntrance {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Staggered Cascading Entrance for Blog Article Cards */
.blog-card {
  background-color: var(--blog-card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(226, 232, 240, 0.6);
  height: 100%;
  display: flex;
  flex-direction: column;
  animation: blogCardCascade 0.72s cubic-bezier(0.16, 1, 0.3, 1) both;
  will-change: transform, opacity;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease !important;
}

#blog-dynamic-content .col-lg-4:nth-child(1) .blog-card { animation-delay: 0.12s; }
#blog-dynamic-content .col-lg-4:nth-child(2) .blog-card { animation-delay: 0.20s; }
#blog-dynamic-content .col-lg-4:nth-child(3) .blog-card { animation-delay: 0.28s; }
#blog-dynamic-content .col-lg-4:nth-child(4) .blog-card { animation-delay: 0.36s; }
#blog-dynamic-content .col-lg-4:nth-child(5) .blog-card { animation-delay: 0.44s; }
#blog-dynamic-content .col-lg-4:nth-child(6) .blog-card { animation-delay: 0.52s; }
#blog-dynamic-content .col-lg-4:nth-child(7) .blog-card { animation-delay: 0.60s; }
#blog-dynamic-content .col-lg-4:nth-child(8) .blog-card { animation-delay: 0.68s; }
#blog-dynamic-content .col-lg-4:nth-child(9) .blog-card { animation-delay: 0.76s; }
#blog-dynamic-content .col-lg-4:nth-child(n+10) .blog-card { animation-delay: 0.82s; }

@keyframes blogCardCascade {
  0% {
    opacity: 0;
    transform: translateY(32px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

body.blog-page-bg .blog-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 12px 28px rgba(11, 77, 98, 0.14) !important;
}

/* Pagination Entrance */
.blog-pagination-wrapper {
  margin-top: 45px;
  animation: blogPaginationEntrance 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.58s both;
}

@keyframes blogPaginationEntrance {
  0% {
    opacity: 0;
    transform: translateY(16px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dynamic Content Smooth Filter Switch */
#blog-dynamic-content {
  transition: opacity 0.22s ease, transform 0.22s ease;
  will-change: opacity, transform;
}

#blog-dynamic-content.switching-out {
  opacity: 0;
  transform: translateY(10px) scale(0.99);
}

#blog-dynamic-content.switching-in {
  animation: blogDynamicContentIn 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes blogDynamicContentIn {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==============================================================
   1. Dark Teal Header Bar Override (Preserving header.php HTML)
   ============================================================== */
body.blog-page-bg #header.header {
  background-color: var(--blog-teal) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 4px 14px rgba(11, 77, 98, 0.25) !important;
}

body.blog-page-bg #header .brand-title {
  color: #ffffff !important;
}

body.blog-page-bg #header .brand-sub {
  color: #93c5fd !important;
}

body.blog-page-bg #header .brand-divider {
  background-color: rgba(255, 255, 255, 0.3) !important;
}

body.blog-page-bg #header .navmenu ul>li>a,
body.blog-page-bg #header .navmenu ul>li>a:focus {
  color: #e2e8f0 !important;
  font-weight: 500;
}

body.blog-page-bg #header .navmenu ul>li>a:hover,
body.blog-page-bg #header .navmenu .active,
body.blog-page-bg #header .navmenu .active:focus {
  color: #7dd3fc !important;
}

body.blog-page-bg #header .nav-blog-btn {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

body.blog-page-bg #header .nav-blog-btn:active,
body.blog-page-bg #header .nav-blog-btn.is-pressed {
  transform: scale(0.92);
}

body.blog-page-bg #header .navmenu .dropdown ul {
  background-color: #ffffff !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
  border-radius: 8px;
}

body.blog-page-bg #header .navmenu .dropdown ul a {
  color: #1e293b !important;
}

body.blog-page-bg #header .navmenu .dropdown ul a:hover {
  color: var(--blog-teal-accent) !important;
}

body.blog-page-bg #header .header-cta-btn {
  background-color: #1e788c !important;
  border-color: #1e788c !important;
  color: #ffffff !important;
  border-radius: 20px !important;
  padding: 8px 20px !important;
  font-size: 0.85rem !important;
}

body.blog-page-bg #header .header-cta-btn:hover {
  background-color: #166475 !important;
  border-color: #166475 !important;
}

body.blog-page-bg #header .mobile-nav-toggle {
  color: #ffffff !important;
}

/* Page Spacing to clear fixed-top header */
.blog-content-wrapper {
  padding-top: 110px;
  padding-bottom: 70px;
}

/* ==============================================================
   2. Blog Listing Header & Category Filters
   ============================================================== */
.blog-header-section {
  margin-bottom: 35px;
}

.blog-main-heading {
  font-family: var(--heading-font, "Outfit", sans-serif);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 8px 0;
  display: inline-block;
}

.blog-main-heading .heading-our {
  color: #111827;
}

.blog-main-heading .heading-blog {
  color: var(--blog-teal-accent);
}

.blog-heading-underline {
  width: 44px;
  height: 3.5px;
  background-color: #111827;
  border-radius: 2px;
  margin-top: 6px;
  margin-bottom: 18px;
}

/* Category Filter Bar */
.blog-categories-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
  margin-bottom: 25px;
}

.cat-filter-pill {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  text-decoration: none;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.cat-filter-pill:hover {
  color: var(--blog-teal);
  border-color: var(--blog-teal);
  background-color: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(11, 77, 98, 0.12);
}

.cat-filter-pill:active,
.cat-filter-pill.is-pressed {
  transform: scale(0.92) !important;
  transition: transform 0.08s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

.cat-filter-pill.active {
  background-color: var(--blog-teal);
  color: #ffffff;
  border-color: var(--blog-teal);
  box-shadow: 0 3px 8px rgba(11, 77, 98, 0.28);
}

.cat-filter-pill.btn-primary,
.cat-filter-pill.btn-primary:hover,
.cat-filter-pill.btn-primary:focus {
  color: #ffffff !important;
  background-color: var(--blog-teal) !important;
  border-color: var(--blog-teal) !important;
}

.active-filter-alert {
  background-color: #ffffff;
  border-left: 4px solid var(--blog-teal-accent);
  padding: 10px 16px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==============================================================
   3. Blog Listing Cards Grid
   ============================================================== */
.blog-card {
  background-color: var(--blog-card-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 12px 12px 18px 12px;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(11, 77, 98, 0.12);
  border-color: #cbd5e1;
}

.blog-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #0b4d62 0%, #1e3a5f 100%);
  overflow: hidden;
  border-radius: 12px;
}

.blog-card-media a {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.blog-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
  transition: transform 0.4s ease;
}

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

/* Date Badge overlapping top-left of image */
.blog-card-date-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background-color: rgba(15, 23, 42, 0.82);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  padding: 3px 8px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Circular Logo Badge top-right of image */
.blog-card-logo-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: #ffffff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  padding: 3px;
}

.blog-card-logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Card Body */
.blog-card-body {
  padding: 14px 4px 0 4px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-card-title {
  font-family: var(--heading-font, "Outfit", sans-serif);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 10px 0;
}

.blog-card-title a {
  color: #1e3a5f;
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-card-title a:hover {
  color: var(--blog-teal-accent);
}

.blog-card-excerpt {
  font-size: 13px;
  color: #64748b;
  line-height: 1.55;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-readmore {
  position: relative;
  overflow: hidden;
  margin-top: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--blog-teal-accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: gap 0.2s ease, color 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}

.blog-card-readmore:hover {
  color: var(--blog-teal);
  gap: 8px;
}

.blog-card-readmore:active,
.blog-card-readmore.is-pressed {
  transform: scale(0.93) !important;
}

/* Fallback card placeholder */
.blog-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0b4d62 0%, #1e40af 100%);
  color: #ffffff;
  padding: 20px;
  text-align: center;
}

.blog-card-placeholder i {
  font-size: 2.5rem;
  opacity: 0.85;
  margin-bottom: 6px;
}

.blog-card-placeholder span {
  font-size: 12px;
  letter-spacing: 0.5px;
  opacity: 0.9;
  font-weight: 600;
  text-transform: uppercase;
}

/* ==============================================================
   4. Pagination
   ============================================================== */
.blog-pagination-wrapper {
  margin-top: 45px;
}

.blog-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-pagination .page-item .page-link {
  color: #334155;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.blog-pagination .page-item .page-link:hover {
  background-color: #f1f5f9;
  border-color: var(--blog-teal-accent);
  color: var(--blog-teal);
}

.blog-pagination .page-item.active .page-link {
  background-color: var(--blog-teal);
  border-color: var(--blog-teal);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(11, 77, 98, 0.25);
}

.blog-pagination .page-item.disabled .page-link {
  color: #94a3b8;
  pointer-events: none;
  background-color: #f8fafc;
  border-color: #e2e8f0;
}

/* ==============================================================
   5. Single Post Page (post.php)
   ============================================================== */
.article-card {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.05);
  padding: 28px;
  border: 1px solid rgba(226, 232, 240, 0.6);
  margin-bottom: 30px;
}

@media (max-width: 767px) {
  .article-card {
    padding: 18px;
  }
}

.article-featured-img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  max-height: none;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
  margin-bottom: 20px;
  background: #f1f5f9;
  display: block;
}

.article-category-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--blog-teal-accent);
  text-decoration: underline;
  margin-bottom: 8px;
  transition: color 0.2s ease;
}

.article-category-tag:hover {
  color: var(--blog-teal);
}

.article-title {
  font-family: var(--heading-font, "Outfit", sans-serif);
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.3;
  color: #162a45;
  margin-bottom: 14px;
}

@media (max-width: 767px) {
  .article-title {
    font-size: 1.4rem;
  }
}

/* Author Row */
.article-author-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.author-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 1px solid #e2e8f0;
}

.author-info-block {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #162a45;
  line-height: 1.2;
}

.author-date {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 2px;
}

.article-divider {
  border: 0;
  border-top: 1px dotted #cbd5e1;
  margin: 16px 0 24px 0;
}

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

.article-content h2 {
  font-family: var(--heading-font, "Outfit", sans-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 32px;
  margin-bottom: 14px;
}

.article-content h3 {
  font-family: var(--heading-font, "Outfit", sans-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: #0f172a;
  margin-top: 26px;
  margin-bottom: 12px;
}

.article-content p {
  margin-bottom: 18px;
}

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

.article-content li {
  margin-bottom: 6px;
}

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

.article-content blockquote {
  border-left: 4px solid var(--blog-teal);
  background-color: #f8fafc;
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin: 24px 0;
  font-style: italic;
  color: #1e293b;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14.5px;
}

.article-content th,
.article-content td {
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  text-align: left;
}

.article-content th {
  background-color: #f1f5f9;
  font-weight: 600;
  color: #0f172a;
}

/* ==============================================================
   6. Related Courses (Inline & Appended in Article)
   ============================================================== */
.related-courses-section {
  margin-top: 35px;
  padding-top: 25px;
  border-top: 2px dashed #e2e8f0;
}

.related-courses-heading {
  font-family: var(--heading-font, "Outfit", sans-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.related-course-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  transition: all 0.25s ease;
  padding: 12px;
  gap: 16px;
}

.related-course-card:hover {
  background: #ffffff;
  border-color: var(--blog-teal-accent);
  box-shadow: 0 6px 16px rgba(11, 77, 98, 0.1);
  transform: translateX(4px);
}

.related-course-thumb {
  width: 100px;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: #cbd5e1;
}

.related-course-body {
  flex-grow: 1;
}

.related-course-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.related-course-btn {
  background-color: var(--blog-teal);
  color: #ffffff !important;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.related-course-btn:hover {
  background-color: var(--blog-teal-hover);
}

@media (max-width: 575px) {
  .related-course-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .related-course-thumb {
    width: 100%;
    height: 120px;
  }
}

/* ==============================================================
   7. Right Sidebar Product Stack
   ============================================================== */
.sidebar-sticky-wrap {
  position: -webkit-sticky;
  position: sticky;
  top: 95px;
}

.sidebar-product-card {
  background-color: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  margin-bottom: 20px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  display: block;
  text-decoration: none;
  padding: 12px;
}

.sidebar-product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(11, 77, 98, 0.12);
  border-color: #cbd5e1;
}

.sidebar-product-banner {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: #f1f5f9;
}

.sidebar-product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
  transition: transform 0.35s ease;
  display: block;
}

.sidebar-product-card:hover .sidebar-product-img {
  transform: scale(1.03);
}

.sidebar-product-body {
  padding: 10px 4px 4px 4px;
}

.sidebar-product-title {
  font-family: var(--heading-font, "Outfit", sans-serif);
  font-size: 13.5px;
  font-weight: 700;
  color: #162a45;
  line-height: 1.35;
  margin: 0;
  transition: color 0.2s ease;
}

.sidebar-product-card:hover .sidebar-product-title {
  color: var(--blog-teal-accent);
}

/* ==============================================================
   BLOG & POST COMPREHENSIVE MOBILE RESPONSIVENESS
   ============================================================== */
@media (max-width: 768px) {
  .blog-content-wrapper {
    padding-top: 88px !important;
    padding-bottom: 50px !important;
  }

  .blog-main-heading {
    font-size: 1.75rem !important;
  }

  .blog-heading-underline {
    width: 38px;
    height: 3px;
    margin-bottom: 14px;
  }

  /* Horizontal swipeable category filter pill bar */
  .blog-categories-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 8px !important;
    margin-bottom: 18px !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }

  .blog-categories-nav::-webkit-scrollbar {
    display: none !important;
  }

  .cat-filter-pill {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    padding: 7px 15px !important;
    font-size: 12.5px !important;
  }

  /* Single Article Page Mobile Polish */
  .article-card {
    padding: 20px 16px !important;
    border-radius: 12px !important;
  }

  .article-title {
    font-size: 1.55rem !important;
    line-height: 1.3 !important;
    margin-bottom: 12px !important;
  }

  .article-content {
    font-size: 0.98rem !important;
    line-height: 1.68 !important;
  }

  .article-content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
  }

  .article-content table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .article-content pre,
  .article-content code {
    white-space: pre-wrap !important;
    word-break: break-word !important;
    max-width: 100% !important;
  }

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

  /* Related course card on mobile */
  .related-course-card {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 14px !important;
    gap: 12px !important;
  }

  .related-course-thumb {
    width: 100% !important;
    height: 140px !important;
    border-radius: 8px !important;
  }

  .related-course-btn {
    width: 100% !important;
    min-height: 42px !important;
    justify-content: center !important;
    font-size: 13.5px !important;
    border-radius: 8px !important;
  }

  /* Sticky sidebar on mobile becomes regular stack */
  .sidebar-sticky-wrap {
    position: static !important;
    margin-top: 30px !important;
  }
}

@media (max-width: 480px) {
  .article-title {
    font-size: 1.38rem !important;
  }

  .blog-card {
    padding: 10px 10px 14px 10px !important;
  }

  .blog-card-body {
    padding: 12px 2px 0 2px !important;
  }

  .blog-card-title {
    font-size: 0.98rem !important;
  }
}