/* ============================================================
   CODEMANIAC STUDIO - BLOG PAGE STYLESHEET
   Matching exact visual design, typography, layout, color palette,
   cards, sidebar widgets, filter tabs and responsive layout.
   ============================================================ */

:root {
  --blog-orange: #EA580C;
  --blog-orange-hover: #D94E06;
  --blog-orange-gradient: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
  --blog-orange-glow: rgba(234, 88, 12, 0.25);
  --blog-orange-tint: #FFF5EB;
  --blog-border-tint: #FED7AA;
  
  --blog-bg-page: #FAF7F2;
  --blog-card-bg: #FFFFFF;
  --blog-card-border: #EFE6DA;
  --blog-card-shadow: 0 10px 30px rgba(45, 30, 10, 0.04);
  
  --blog-text-heading: #111827;
  --blog-text-body: #555047;
  --blog-text-muted: #8C8275;
}

body.blog-page-body {
  background-color: var(--blog-bg-page);
  color: var(--blog-text-heading);
  background-image: 
    radial-gradient(circle at 10% 15%, rgba(234, 88, 12, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 65%, rgba(249, 115, 22, 0.04) 0%, transparent 45%);
  background-attachment: fixed;
}

/* Breadcrumb Navigation */
.blog-breadcrumb-bar {
  padding: 22px 0 10px 0;
}

.blog-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 500;
}

.blog-breadcrumb a {
  color: var(--blog-text-muted);
  transition: color 0.2s;
}

.blog-breadcrumb a:hover {
  color: var(--blog-orange);
}

.blog-breadcrumb .crumb-sep {
  font-size: 0.7rem;
  color: #BDB3A6;
}

.blog-breadcrumb .crumb-current {
  color: #9F5A19;
  font-weight: 600;
}

.blog-badge-tag {
  display: inline-block;
  padding: 5px 15px;
  border-radius: 9999px;
  background: #FFF5EB;
  border: 1px solid #FCD9BD;
  color: #D65A0D;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

/* ============================================================
   1. HERO SECTION
   ============================================================ */
.blog-hero-section {
  padding: 20px 0 45px 0;
  position: relative;
}

.blog-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 40px;
}

.blog-hero-title {
  font-size: clamp(2.3rem, 3.8vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  color: #111827;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.blog-hero-desc {
  font-size: 1.08rem;
  line-height: 1.68;
  color: var(--blog-text-body);
  max-width: 530px;
}

.blog-hero-visual-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.blog-hero-main-img {
  width: 100%;
  max-width: 540px;
  border-radius: 20px;
  filter: drop-shadow(0 20px 40px rgba(212, 140, 40, 0.16));
  transition: transform 0.4s ease;
}

.blog-hero-visual-wrap:hover .blog-hero-main-img {
  transform: translateY(-4px);
}

.blog-cursive-tag {
  position: absolute;
  top: -10px;
  right: 15px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  z-index: 3;
  pointer-events: none;
}

.blog-cursive-text {
  font-family: 'Caveat', cursive, sans-serif;
  font-size: 1.45rem;
  line-height: 1.15;
  color: #1E1A15;
  text-align: right;
  transform: rotate(2deg);
}

.blog-cursive-text em {
  font-style: normal;
  color: var(--blog-orange);
  font-weight: 700;
}

.blog-cursive-arrow-svg {
  width: 44px;
  height: 40px;
  margin-top: 2px;
  margin-right: 28px;
}

/* ============================================================
   2. CATEGORY FILTER TABS
   ============================================================ */
.blog-filter-section {
  padding: 15px 0 35px 0;
}

.blog-filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.blog-filter-bar::-webkit-scrollbar {
  height: 4px;
}

.blog-filter-bar::-webkit-scrollbar-thumb {
  background: #E5DDD1;
  border-radius: 4px;
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #374151;
  background: #FFFFFF;
  border: 1px solid #EFE6DA;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
  transition: all 0.25s ease;
}

.filter-tab i {
  color: var(--blog-orange);
  font-size: 0.95rem;
}

.filter-tab:hover {
  border-color: #FCD9BD;
  background: #FFF5EB;
  color: var(--blog-orange);
  transform: translateY(-2px);
}

.filter-tab.active {
  background: var(--blog-orange);
  color: #FFFFFF;
  border-color: var(--blog-orange);
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.28);
}

.filter-tab.active i {
  color: #FFFFFF;
}

/* ============================================================
   3. MAIN CONTENT & SIDEBAR LAYOUT
   ============================================================ */
.blog-main-section {
  padding: 10px 0 50px 0;
}

.blog-content-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 36px;
  align-items: start;
}

/* ============================================================
   LEFT: FEATURED POST
   ============================================================ */
.featured-post-section {
  margin-bottom: 48px;
}

.featured-header-flex {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-subtag {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--blog-orange);
  margin-bottom: 4px;
}

.section-title {
  font-size: 1.95rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.01em;
}

.btn-outline-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 9999px;
  background: #FFFFFF;
  border: 1.5px solid #E6DDD0;
  color: #555047;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.25s ease;
}

.btn-outline-pill:hover {
  background: #FFF5EB;
  border-color: #FCD9BD;
  color: var(--blog-orange);
}

.featured-card {
  background: #FFFFFF;
  border: 1px solid #ECE2D5;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(45, 30, 10, 0.04);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 28px;
  align-items: center;
  transition: all 0.35s ease;
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(234, 88, 12, 0.1);
  border-color: #F8D9C0;
}

.featured-card-thumb-wrap {
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 9;
}

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

.featured-card:hover .featured-card-thumb {
  transform: scale(1.04);
}

.featured-card-content {
  display: flex;
  flex-direction: column;
}

.post-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  background: #FFF5EB;
  border: 1px solid #FCD9BD;
  color: var(--blog-orange);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 14px;
  align-self: flex-start;
}

.featured-card-title {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.3;
  color: #111827;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.post-meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.78rem;
  color: #7B7266;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.post-meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.featured-card-desc {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--blog-text-body);
  margin-bottom: 22px;
}

/* ============================================================
   LEFT: RECENT BLOG POSTS GRID
   ============================================================ */
.recent-posts-section {
  margin-bottom: 40px;
}

.recent-heading {
  font-size: 1.95rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.recent-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.blog-post-card {
  background: #FFFFFF;
  border: 1px solid #ECE2D5;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(45, 30, 10, 0.04);
  display: flex;
  flex-direction: column;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(234, 88, 12, 0.12);
  border-color: #F8D9C0;
}

.card-thumb-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
  background: #111622;
}

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

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

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

.card-post-title {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.4;
  color: #111827;
  margin-bottom: 12px;
  flex-grow: 1;
}

.card-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  color: #7B7266;
  margin-bottom: 16px;
}

.card-meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-card-readmore {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 9999px;
  background: #FFFFFF;
  border: 1.5px solid #E6DDD0;
  color: var(--blog-orange);
  font-size: 0.85rem;
  font-weight: 600;
  align-self: flex-start;
  transition: all 0.25s ease;
}

.btn-card-readmore:hover {
  background: #FFF5EB;
  border-color: #FCD9BD;
  transform: translateX(3px);
}

/* ============================================================
   RIGHT: SIDEBAR WIDGETS
   ============================================================ */
.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-widget {
  background: #FFFFFF;
  border: 1px solid #ECE2D5;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(45, 30, 10, 0.04);
}

.sidebar-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}

/* Widget 1: Search */
.sidebar-search-form {
  display: flex;
  align-items: center;
  background: #FAF7F2;
  border: 1.5px solid #ECE2D5;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.25s;
}

.sidebar-search-form:focus-within {
  border-color: var(--blog-orange);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1);
}

.search-input-wrap {
  flex-grow: 1;
  display: flex;
  align-items: center;
  padding-left: 12px;
  gap: 8px;
  color: #9CA3AF;
}

.search-input {
  border: none;
  background: none;
  outline: none;
  font-family: inherit;
  font-size: 0.88rem;
  color: #111827;
  width: 100%;
  padding: 10px 0;
}

.search-submit-btn {
  background: var(--blog-orange);
  color: #FFFFFF;
  border: none;
  padding: 11px 16px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.search-submit-btn:hover {
  background: var(--blog-orange-hover);
}

/* Widget 2: Popular Categories */
.category-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.category-list-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #374151;
  background: #FAF7F2;
  transition: all 0.2s;
}

.category-list-item a:hover {
  background: #FFF5EB;
  color: var(--blog-orange);
  transform: translateX(3px);
}

.cat-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cat-item-left i {
  color: var(--blog-orange);
  width: 18px;
  text-align: center;
}

.cat-count-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: #7B7266;
  background: #FFFFFF;
  border: 1px solid #ECE2D5;
  padding: 2px 8px;
  border-radius: 9999px;
}

/* Widget 3: Recent Posts */
.sidebar-recent-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar-post-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-post-thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sidebar-post-info {
  display: flex;
  flex-direction: column;
}

.sidebar-post-title {
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.35;
  color: #111827;
  margin-bottom: 4px;
  transition: color 0.2s;
}

.sidebar-post-item:hover .sidebar-post-title {
  color: var(--blog-orange);
}

.sidebar-post-date {
  font-size: 0.74rem;
  color: #8C8275;
}

/* Widget 4: Newsletter */
.newsletter-widget {
  background: linear-gradient(135deg, #FFF9F3 0%, #FFF2E6 100%);
  border: 1.5px solid #FCD9BD;
}

.newsletter-icon-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.newsletter-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1px solid #FCD9BD;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--blog-orange);
}

.plane-icon {
  font-size: 1.35rem;
  color: var(--blog-orange);
  opacity: 0.85;
}

.newsletter-subtext {
  font-size: 0.86rem;
  color: var(--blog-text-body);
  line-height: 1.5;
  margin-bottom: 16px;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.newsletter-input {
  width: 100%;
  background: #FFFFFF;
  border: 1.5px solid #ECE2D5;
  border-radius: 9999px;
  padding: 11px 18px;
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s;
}

.newsletter-input:focus {
  border-color: var(--blog-orange);
}

.btn-newsletter-sub {
  width: 100%;
  background: var(--blog-orange);
  color: #FFFFFF;
  border-radius: 9999px;
  padding: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.28);
  transition: all 0.25s;
}

.btn-newsletter-sub:hover {
  background: var(--blog-orange-hover);
  transform: translateY(-2px);
}

.newsletter-note {
  font-size: 0.72rem;
  color: #8C8275;
  text-align: center;
  margin-top: 6px;
}

/* ============================================================
   4. BOTTOM BANNER: HAVE A TOPIC IN MIND?
   ============================================================ */
.blog-topic-section {
  padding: 20px 0 40px 0;
}

.blog-topic-card {
  background: linear-gradient(135deg, #FFF6EC 0%, #FFEEDD 100%);
  border: 1.5px solid #F6DFCB;
  border-radius: 24px;
  padding: 38px 48px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
  gap: 32px;
  box-shadow: 0 14px 36px rgba(234, 88, 12, 0.08);
  position: relative;
  overflow: hidden;
}

.topic-title {
  font-size: clamp(1.8rem, 2.5vw, 2.2rem);
  font-weight: 800;
  color: #111827;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.topic-desc {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--blog-text-body);
  margin-bottom: 22px;
  max-width: 480px;
}

.btn-suggest-topic {
  background: var(--blog-orange);
  color: #FFFFFF;
  border-radius: 9999px;
  padding: 12px 28px;
  font-size: 0.94rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.28);
  transition: all 0.25s ease;
  border: none;
}

.btn-suggest-topic:hover {
  background: var(--blog-orange-hover);
  transform: translateY(-2px);
}

.topic-visual-col {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

.topic-illustration-badge {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(6px);
  padding: 16px 22px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.bulb-icon-3d {
  font-size: 2.4rem;
  color: #F59E0B;
  filter: drop-shadow(0 4px 10px rgba(245, 158, 11, 0.4));
}

.notepad-icon-3d {
  font-size: 2.2rem;
  color: var(--blog-orange);
}

.topic-cursive-note {
  display: flex;
  flex-direction: column;
}

.topic-cursive-text {
  font-family: 'Caveat', cursive;
  font-size: 1.4rem;
  line-height: 1.15;
  color: #1E1A15;
}

.topic-cursive-text em {
  font-style: normal;
  color: var(--blog-orange);
  font-weight: 700;
}

/* ============================================================
   5. PAGINATION
   ============================================================ */
.blog-pagination-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 20px 0 60px 0;
}

.page-num {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  font-weight: 600;
  color: #4B5563;
  background: #FFFFFF;
  border: 1px solid #ECE2D5;
  transition: all 0.2s ease;
}

.page-num:hover {
  border-color: #FCD9BD;
  background: #FFF5EB;
  color: var(--blog-orange);
}

.page-num.active {
  background: var(--blog-orange);
  color: #FFFFFF;
  border-color: var(--blog-orange);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.28);
}

.page-dots {
  color: #9CA3AF;
  padding: 0 4px;
}

.page-arrow {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  color: #4B5563;
  background: #FFFFFF;
  border: 1px solid #ECE2D5;
  transition: all 0.2s;
}

.page-arrow:hover {
  background: var(--blog-orange);
  color: #FFFFFF;
  border-color: var(--blog-orange);
}

/* ============================================================
   RESPONSIVE DESIGN BREAKPOINTS
   ============================================================ */
@media (max-width: 1024px) {
  .blog-content-layout {
    grid-template-columns: 1fr;
  }
  .blog-sidebar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .blog-hero-grid {
    grid-template-columns: 1fr;
  }
  .blog-hero-visual-wrap {
    order: -1;
    max-width: 480px;
    margin: 0 auto;
  }
  .featured-card {
    grid-template-columns: 1fr;
  }
  .recent-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .blog-topic-card {
    grid-template-columns: 1fr;
  }
  .topic-visual-col {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .recent-posts-grid {
    grid-template-columns: 1fr;
  }
  .blog-sidebar {
    grid-template-columns: 1fr;
  }
  .blog-hero-title {
    font-size: 2.1rem;
  }
  .blog-cursive-tag {
    right: 5px;
    font-size: 1.25rem;
  }
}

/* ============================================================
   PDF ATTACHMENT BADGES & INTERACTIVE READER MODAL
   ============================================================ */
.badge-pdf-attached {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FEE2E2;
  border: 1px solid #FCA5A5;
  color: #DC2626;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.btn-pdf-download-card {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #DC2626;
  color: #FFFFFF !important;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

.btn-pdf-download-card:hover {
  background: #B91C1C;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.35);
  color: #FFFFFF !important;
}

/* Interactive Modal */
.blog-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.blog-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.blog-modal-card {
  background: #FFFFFF;
  border-radius: 20px;
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  position: relative;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.blog-modal-backdrop.active .blog-modal-card {
  transform: scale(1);
}

.blog-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  z-index: 10;
  font-size: 16px;
  transition: background 0.2s ease;
}

.blog-modal-close:hover {
  background: #DC2626;
}

.blog-modal-cover-wrap {
  width: 100%;
  height: 280px;
  position: relative;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
  background: #111827;
}

.blog-modal-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-modal-body {
  padding: 32px 36px;
}

.modal-pdf-banner {
  background: linear-gradient(135deg, #FEF2F2 0%, #FFF5EB 100%);
  border: 1.5px solid #FCA5A5;
  border-radius: 16px;
  padding: 20px 24px;
  margin: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.modal-pdf-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.modal-pdf-icon-box {
  width: 52px;
  height: 52px;
  background: #DC2626;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 26px;
  flex-shrink: 0;
  box-shadow: 0 8px 16px rgba(220, 38, 38, 0.3);
}

.modal-pdf-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
}

.modal-pdf-meta {
  font-size: 0.85rem;
  color: #64748B;
  margin-top: 4px;
}

.modal-pdf-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.modal-pdf-frame-wrap {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #E2E8F0;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  margin-top: 20px;
  background: #334155;
}

/* ============================================================
   SINGLE BLOG POST (SEO ARTICLE PAGE)
   ============================================================ */
.single-article-wrap {
  padding: 10px 0 70px;
}

.article-header-section {
  margin-bottom: 28px;
}

.article-badge-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}

.single-article-title {
  font-size: clamp(2rem, 3.4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  color: #111827;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.article-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 14px 20px;
  background: #FFFFFF;
  border: 1px solid #ECE3D4;
  border-radius: 14px;
  margin-bottom: 28px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.88rem;
  color: #64748B;
}

.article-share-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.share-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1E1A15;
  margin-right: 4px;
}

.btn-share-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #E2D7C7;
  background: #FAF7F2;
  color: #4A3E31;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  padding: 0;
}

.btn-share-icon.share-whatsapp:hover {
  background: #25D366;
  color: #FFFFFF;
  border-color: #25D366;
  transform: translateY(-2px);
}

.btn-share-icon.share-linkedin:hover {
  background: #0A66C2;
  color: #FFFFFF;
  border-color: #0A66C2;
  transform: translateY(-2px);
}

.btn-share-icon.share-twitter:hover {
  background: #000000;
  color: #FFFFFF;
  border-color: #000000;
  transform: translateY(-2px);
}

.btn-share-icon.share-copy:hover {
  background: #D48C28;
  color: #FFFFFF;
  border-color: #D48C28;
  transform: translateY(-2px);
}

.article-cover-wrap {
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 32px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
  background: #F3EFE9;
}

.article-cover-img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
}

.article-lead-box {
  background: #FFFBF5;
  border-left: 4px solid #D48C28;
  padding: 18px 24px;
  border-radius: 0 14px 14px 0;
  margin-bottom: 32px;
  border-top: 1px solid #F3E8D7;
  border-right: 1px solid #F3E8D7;
  border-bottom: 1px solid #F3E8D7;
}

.article-lead-text {
  font-size: 1.15rem;
  font-weight: 500;
  color: #374151;
  line-height: 1.7;
  margin: 0;
}

.article-body-content {
  font-size: 1.08rem;
  line-height: 1.85;
  color: #2D3748;
  margin-bottom: 40px;
}

.article-body-content h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: #111827;
  margin: 36px 0 16px;
  letter-spacing: -0.01em;
}

.article-body-content h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1E293B;
  margin: 28px 0 14px;
}

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

.article-body-content ul, 
.article-body-content ol {
  margin: 16px 0 24px 24px;
}

.article-body-content li {
  margin-bottom: 10px;
  line-height: 1.75;
}

/* MCQ Specific Styling for Educational Notes */
.article-body-content .mcq-list,
.article-body-content ol.mcq-list {
  list-style: none;
  counter-reset: mcq-count;
  padding: 0;
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-body-content .mcq-list li,
.article-body-content ol.mcq-list li {
  background: #FFFFFF;
  border: 1.5px solid #EFE6D8;
  border-radius: 14px;
  padding: 18px 22px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
  line-height: 1.8;
}

.article-body-content .mcq-list li:hover,
.article-body-content ol.mcq-list li:hover {
  border-color: rgba(212, 140, 40, 0.5);
  box-shadow: 0 4px 14px rgba(212, 140, 40, 0.08);
}

.article-body-content .mcq-list em,
.article-body-content ol.mcq-list em {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 12px;
  background: #F0FDF4;
  color: #15803D;
  border: 1px solid #BBF7D0;
  border-radius: 6px;
  font-style: normal;
  font-weight: 600;
  font-size: 0.92rem;
}

/* In-Article Images & Multi-Photo Grids */
.article-body-content img,
.article-body-content .blog-content-img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  margin: 28px auto;
  display: block;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.article-body-content img:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.article-body-content figure,
.article-body-content .blog-figure {
  margin: 32px auto;
  text-align: center;
  max-width: 100%;
}

.article-body-content figure img,
.article-body-content .blog-figure img {
  margin: 0 auto 10px auto;
}

.article-body-content figcaption {
  font-size: 0.9rem;
  color: #64748B;
  font-style: italic;
  margin-top: 8px;
  line-height: 1.5;
}

/* Multi-Image Grids (2 or 3 Photos in a single blog) */
.article-body-content .blog-img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.article-body-content .blog-img-grid img {
  margin: 0;
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 12px;
}

@media (max-width: 640px) {
  .article-body-content .blog-img-grid {
    grid-template-columns: 1fr;
  }
  .article-body-content .blog-img-grid img {
    height: auto;
  }
}

/* Visual Callout Box for tips and highlights */
.article-body-content .callout-box {
  background: #FFFDF9;
  border-left: 4px solid #D48C28;
  border-radius: 0 12px 12px 0;
  padding: 18px 22px;
  margin: 28px 0;
  box-shadow: 0 2px 10px rgba(212, 140, 40, 0.06);
  font-size: 1.02rem;
  color: #374151;
}

.article-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid #E5DBCB;
  border-bottom: 1px solid #E5DBCB;
  margin: 40px 0;
}

.article-author-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 26px 30px;
  background: #FFFFFF;
  border: 1px solid #ECE3D4;
  border-radius: 18px;
  margin: 40px 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.03);
}

.author-role {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #D48C28;
  margin-bottom: 4px;
}

.author-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 6px;
}

.author-bio {
  font-size: 0.92rem;
  color: #64748B;
  line-height: 1.6;
  margin-bottom: 10px;
}

.author-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: #D48C28;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease;
}

.author-link:hover {
  gap: 10px;
}

@media (max-width: 768px) {
  .single-article-title {
    font-size: 1.85rem;
  }
  .article-author-card {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }
  .article-meta-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .article-share-group {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }
}

/* ============================================================
   INTERACTIVE PRACTICAL SHEETS & RICH HTML CONTENT STYLES
   Supports details/summary accordions, syntax highlighting,
   live search toolbars, copy code buttons, and callout notes.
   ============================================================ */
.article-body-content {
  --pr-blue: #1769aa;
  --pr-sky: #5bb6f5;
  --pr-cyan: #28c7fa;
  --pr-bg: #f5faff;
  --pr-ink: #102a43;
  --pr-muted: #526579;
  --pr-card: #ffffff;
  --pr-line: #d8e8f5;
  --pr-code: #102a43;
}

/* Hero Banner within Article */
.article-body-content .hero {
  background: linear-gradient(120deg, #1769aa, #5bb6f5);
  color: #ffffff;
  padding: 32px 24px;
  border-radius: 16px;
  margin: 10px 0 24px 0;
  box-shadow: 0 8px 24px rgba(23, 105, 170, 0.16);
}
.article-body-content .hero h1 {
  color: #ffffff !important;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem) !important;
  line-height: 1.25;
  margin: 0 0 10px 0;
  font-weight: 800;
}
.article-body-content .hero p {
  color: rgba(255, 255, 255, 0.95) !important;
  margin: 0 !important;
  font-size: 1.05rem !important;
  line-height: 1.6 !important;
}

/* Sticky Interactive Toolbar (Search, Expand, Collapse) */
.article-body-content .toolbar {
  position: sticky;
  top: 76px;
  z-index: 20;
  background: #ffffff;
  border: 1px solid var(--pr-line);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(16, 42, 67, 0.08);
  margin-bottom: 24px;
  padding: 10px 14px;
}
.article-body-content .toolbar-inner {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.article-body-content .toolbar .search {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  border: 1.5px solid var(--pr-line);
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fdfdfd;
  color: var(--pr-ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.article-body-content .toolbar .search:focus {
  border-color: var(--pr-blue);
  box-shadow: 0 0 0 3px rgba(23, 105, 170, 0.15);
}
.article-body-content .toolbar .btn {
  border: 0;
  border-radius: 8px;
  background: var(--pr-blue);
  color: #ffffff;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
.article-body-content .toolbar .btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.article-body-content .toolbar .btn.secondary {
  background: #eaf4fc;
  color: var(--pr-blue);
}
.article-body-content .toolbar .btn.secondary:hover {
  background: #d8ebfa;
}

/* Intro & Practical Notes Card */
.article-body-content .intro {
  background: var(--pr-card);
  border: 1px solid var(--pr-line);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(16, 42, 67, 0.04);
  padding: 24px;
  margin-bottom: 24px;
}
.article-body-content .intro h2 {
  margin: 0 0 12px 0 !important;
  color: var(--pr-blue) !important;
  font-size: 1.4rem !important;
}
.article-body-content .note {
  background: #effaff;
  border-left: 4px solid var(--pr-cyan);
  padding: 12px 16px;
  border-radius: 6px;
  margin: 16px 0;
  color: #102a43;
}

/* Accordion Question Cards */
.article-body-content details.question {
  background: var(--pr-card);
  border: 1.5px solid var(--pr-line);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(16, 42, 67, 0.04);
  margin-bottom: 20px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.article-body-content details.question:hover {
  border-color: #badcf5;
  box-shadow: 0 6px 20px rgba(23, 105, 170, 0.08);
}
.article-body-content details.question[open] {
  border-color: #9acaf0;
}
.article-body-content summary.qhead {
  padding: 18px 22px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  cursor: pointer;
  list-style: none;
  user-select: none;
  background: #ffffff;
  transition: background-color 0.2s;
}
.article-body-content summary.qhead::-webkit-details-marker {
  display: none;
}
.article-body-content summary.qhead:hover {
  background: #fbfdff;
}
.article-body-content .qnum {
  flex: 0 0 40px;
  height: 40px;
  border-radius: 10px;
  background: #eaf4fc;
  color: var(--pr-blue);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.05rem;
}
.article-body-content .qtitle {
  flex: 1;
}
.article-body-content .qtitle h2 {
  font-size: 1.15rem !important;
  line-height: 1.4 !important;
  margin: 0 0 6px 0 !important;
  color: #102a43 !important;
  font-weight: 700 !important;
}
.article-body-content .qtitle p {
  color: var(--pr-muted) !important;
  margin: 0 !important;
  font-size: 0.95rem !important;
  line-height: 1.5 !important;
}
.article-body-content .chevron {
  color: var(--pr-blue);
  font-size: 1.3rem;
  transition: transform 0.2s ease;
  line-height: 1;
  margin-top: 6px;
}
.article-body-content details.question[open] .chevron {
  transform: rotate(180deg);
}
.article-body-content .qbody {
  padding: 0 24px 24px;
  border-top: 1px solid var(--pr-line);
  background: #fafcfe;
}
.article-body-content .qbody h3 {
  font-size: 1.05rem !important;
  margin: 22px 0 10px !important;
  color: var(--pr-blue) !important;
  font-weight: 700 !important;
}

/* Code Blocks & Copy Button */
.article-body-content .codewrap {
  position: relative;
  margin: 12px 0 18px;
}
.article-body-content pre {
  margin: 0;
  padding: 20px;
  background: #0f1e2e;
  color: #eaf5ff;
  border-radius: 12px;
  overflow-x: auto;
  tab-size: 4;
  white-space: pre;
  font-family: 'JetBrains Mono', Consolas, Monaco, 'Courier New', monospace;
  font-size: 13.5px;
  line-height: 1.65;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.article-body-content pre code {
  color: inherit;
  background: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
}
.article-body-content .codewrap .copy {
  position: absolute;
  right: 12px;
  top: 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
}
.article-body-content .codewrap .copy:hover {
  background: var(--pr-blue);
  border-color: var(--pr-blue);
}

/* Sample Output Terminal */
.article-body-content .output {
  background: #f1f6fa;
  border: 1px solid var(--pr-line);
  color: #1e3a52;
  border-radius: 10px;
  padding: 16px;
  overflow-x: auto;
  white-space: pre-wrap;
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
}
.article-body-content .explain {
  padding-left: 20px;
  margin: 12px 0;
}
.article-body-content .explain li {
  margin-bottom: 8px;
  line-height: 1.65;
}
.article-body-content .empty {
  display: none;
  text-align: center;
  padding: 30px;
  color: var(--pr-muted);
  font-size: 1.05rem;
  background: #ffffff;
  border-radius: 12px;
  border: 1px dashed var(--pr-line);
}
@media (max-width: 650px) {
  .article-body-content .hero { padding: 24px 16px; }
  .article-body-content summary.qhead { padding: 14px; gap: 12px; }
  .article-body-content .qbody { padding: 0 16px 18px; }
  .article-body-content pre { font-size: 12px; padding: 14px; }
  .article-body-content .toolbar-inner { padding: 8px 10px; }
}



