/* ==========================================================================
   MAKTABTY ENGLISH 2026 - MASTER DIGITAL LIBRARY DESIGN SYSTEM
   Authentic Educational Library UI with 2-Column Desktop Grid,
   Physical Book Covers, Rich Sidebar, Labels Cloud, and Mobile Drawer.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&display=swap');

:root {
  --mkt-primary: #1d4ed8;
  --mkt-primary-hover: #1e40af;
  --mkt-primary-light: #eff6ff;
  --mkt-accent: #059669;
  --mkt-accent-hover: #047857;
  --mkt-accent-light: #ecfdf5;
  --mkt-dark-navy: #08102b;
  --mkt-text: #1e293b;
  --mkt-text-muted: #64748b;
  --mkt-card-bg: #ffffff;
  --mkt-card-border: rgba(15, 23, 42, 0.08);
  --mkt-card-shadow: 0 8px 24px rgba(8, 16, 43, 0.05);
  --mkt-card-shadow-hover: 0 16px 36px rgba(29, 78, 216, 0.12);
  --mkt-radius-card: 18px;
  --mkt-radius-btn: 12px;
  --mkt-font: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: var(--mkt-font) !important;
  background-color: #f8fafc;
  color: var(--mkt-text);
  line-height: 1.8;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  max-width: 100vw;
  position: relative;
}

a {
  color: var(--mkt-primary);
  text-decoration: none;
  transition: all 0.2s ease;
}
a:hover {
  color: var(--mkt-primary-hover);
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ==========================================
   NAVBAR & HEADER
   ========================================== */
.navbar {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--mkt-card-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(8, 16, 43, 0.03);
}

/* ==========================================
   ANNOUNCEMENT BAR
   ========================================== */
.mkt-announcement-bar {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
  color: #ffffff;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  z-index: 999;
}

.mkt-announcement-bar.type-info {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
}

.mkt-announcement-bar.type-warning {
  background: linear-gradient(135deg, #9a3412 0%, #ea580c 100%);
}

.mkt-announcement-bar.type-success {
  background: linear-gradient(135deg, #065f46 0%, #059669 100%);
}

.mkt-announcement-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  text-align: center;
}

.mkt-announcement-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: #1d4ed8 !important;
  font-weight: 800;
  font-size: 12.5px;
  padding: 5px 14px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mkt-announcement-btn:hover {
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 16px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle-btn {
  display: none;
  background: transparent;
  border: 0;
  color: var(--mkt-dark-navy);
  padding: 6px;
  cursor: pointer;
  border-radius: 8px;
}
.nav-toggle-btn:hover {
  background: #f1f5f9;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 900;
  color: var(--mkt-dark-navy) !important;
  text-decoration: none;
}

.brand-logo-img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.brand-icon {
  background: linear-gradient(135deg, #1d4ed8 0%, #059669 100%);
  color: #ffffff;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 900;
  font-size: 20px;
  box-shadow: 0 6px 16px rgba(29, 78, 216, 0.28);
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: #334155;
  font-weight: 700;
  font-size: 14.5px;
  padding: 8px 14px;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.nav-links a:hover, .nav-links a.active {
  background: #eff6ff;
  color: var(--mkt-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-btn {
  background: linear-gradient(135deg, #08102b 0%, #1e293b 100%);
  color: #ffffff !important;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(8, 16, 43, 0.16);
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.app-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(8, 16, 43, 0.24);
}

/* Mobile Stage Scroll Bar */
.mobile-stage-bar {
  display: none;
  background: #ffffff;
  border-bottom: 1px solid var(--mkt-card-border);
  padding: 8px 16px;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.mobile-stage-bar::-webkit-scrollbar {
  display: none;
}
.mobile-stage-bar a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #f1f5f9;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
  flex-shrink: 0;
}
.mobile-stage-bar a.active, .mobile-stage-bar a:hover {
  background: #1d4ed8;
  color: #ffffff;
  border-color: #1d4ed8;
}

/* ==========================================
   HERO & SEARCH
   ========================================== */
.hero {
  background: linear-gradient(135deg, #08102b 0%, #0f172a 50%, #1e3a8a 100%);
  color: #ffffff;
  padding: 38px 0 34px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 900;
  margin-bottom: 8px;
}

.hero-subtitle {
  font-size: clamp(14px, 2vw, 16.5px);
  color: #cbd5e1;
  max-width: 680px;
  margin: 0 auto 20px;
  line-height: 1.6;
}

.search-box {
  max-width: 620px;
  margin: 0 auto;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 15px 24px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  font-size: 15px;
  font-family: inherit;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  outline: none;
  transition: all 0.25s ease;
}

.search-input:focus {
  background: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 12px 36px rgba(56, 189, 248, 0.35);
}

.filter-chips {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.filter-chip {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
}
.filter-chip:hover, .filter-chip.active {
  background: #ffffff;
  color: #08102b;
  border-color: #ffffff;
}

/* Stages Cards (Top Quick Access) */
.stages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 24px 0 10px;
}

.stage-card {
  background: #ffffff;
  border: 1px solid var(--mkt-card-border);
  border-radius: 16px;
  padding: 18px 14px;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(8, 16, 43, 0.03);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stage-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(29, 78, 216, 0.1);
  border-color: rgba(29, 78, 216, 0.25);
}
.stage-icon { font-size: 30px; margin-bottom: 6px; }
.stage-title { font-weight: 900; font-size: 14.5px; color: var(--mkt-dark-navy); margin-bottom: 2px; }
.stage-count { font-size: 12px; color: var(--mkt-text-muted); font-weight: 600; }

/* ==========================================
   MASTER 2-COLUMN LIBRARY LAYOUT
   ========================================== */
.mkt-layout-wrap {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 28px;
  align-items: start;
  margin: 28px auto 48px;
}

.mkt-main-content {
  min-width: 0;
}

/* ==========================================
   SIDEBAR ARCHITECTURE & WIDGETS
   ========================================== */
.mkt-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mkt-widget {
  background: #ffffff;
  border: 1px solid var(--mkt-card-border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 4px 16px rgba(8, 16, 43, 0.03);
}

.mkt-widget-title {
  font-size: 15.5px;
  font-weight: 900;
  color: var(--mkt-dark-navy);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================
   CUSTOM SIDEBAR WIDGETS (APP PROMO, ETC.)
   ========================================== */
.mkt-custom-widget {
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
  border: 1.5px solid rgba(5, 150, 105, 0.25);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.06);
}

.mkt-custom-widget-title {
  font-size: 15.5px;
  font-weight: 900;
  color: #059669;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid rgba(5, 150, 105, 0.12);
  display: flex;
  align-items: center;
  gap: 8px;
}

.mkt-custom-widget-body {
  font-size: 13.5px;
  line-height: 1.75;
  color: #334155;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mkt-custom-widget-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff !important;
  font-weight: 800;
  font-size: 14px;
  padding: 11px 16px;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
  transition: all 0.2s ease;
  margin-top: 4px;
}

.mkt-custom-widget-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35);
}

/* Stage & Grade Tree Accordion */
.mkt-grade-group {
  margin-bottom: 10px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

.mkt-grade-stage-header {
  padding: 9px 12px;
  font-weight: 800;
  font-size: 13.5px;
  color: #08102b;
  background: #f8fbff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.mkt-grade-items {
  list-style: none;
  padding: 4px 0;
}

.mkt-grade-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 12px;
  gap: 8px;
  transition: background 0.18s;
}

.mkt-grade-row:hover {
  background: #f8fbff;
}

.mkt-grade-row .grade-filter-link {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
  text-decoration: none;
}

.mkt-grade-row .grade-filter-link:hover {
  color: #1d4ed8;
}

.mkt-grade-count {
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  background: #f1f5f9;
  padding: 1px 7px;
  border-radius: 999px;
}

.mkt-term-badges {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.mkt-term-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
  line-height: 1.35;
  white-space: nowrap;
}

.mkt-term-badge.t1 {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.mkt-term-badge.t1:hover {
  background: #1d4ed8;
  color: #ffffff;
}

.mkt-term-badge.t2 {
  background: #fdf2f8;
  color: #db2777;
  border: 1px solid #fbcfe8;
}
.mkt-term-badge.t2:hover {
  background: #db2777;
  color: #ffffff;
}

/* Term Filter Switcher on Grade & Stage pages */
.mkt-term-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 22px;
  flex-wrap: wrap;
}

.mkt-term-chip {
  background: #ffffff;
  border: 1.5px solid var(--mkt-card-border);
  color: #334155;
  font-size: 13.5px;
  font-weight: 800;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mkt-term-chip:hover {
  border-color: #1d4ed8;
  color: #1d4ed8;
  background: #eff6ff;
}

.mkt-term-chip.active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.25);
}

/* Labels Cloud */
.mkt-tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mkt-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  transition: all 0.18s ease;
  cursor: pointer;
  text-decoration: none;
}

.mkt-tag-chip:hover, .mkt-tag-chip.active {
  background: #1d4ed8;
  color: #ffffff;
  border-color: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(29, 78, 216, 0.25);
}

.mkt-tag-chip:hover .mkt-tag-num {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.mkt-tag-num {
  font-size: 10px;
  font-weight: 900;
  background: #e2e8f0;
  color: #475569;
  padding: 1px 5px;
  border-radius: 999px;
}

/* Popular Posts Widget */
.mkt-popular-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mkt-popular-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.05);
  transition: all 0.2s ease;
  text-decoration: none;
}

.mkt-popular-item:hover {
  background: #eff6ff;
  border-color: rgba(29, 78, 216, 0.25);
  transform: translateY(-2px);
}

.mkt-popular-rank {
  font-size: 13.5px;
  font-weight: 900;
  color: #cbd5e1;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}
.mkt-popular-item:nth-child(1) .mkt-popular-rank { color: #f59e0b; }
.mkt-popular-item:nth-child(2) .mkt-popular-rank { color: #94a3b8; }
.mkt-popular-item:nth-child(3) .mkt-popular-rank { color: #b45309; }

.mkt-popular-thumb {
  width: 36px;
  height: 50px;
  aspect-ratio: 210 / 297;
  border-radius: 5px;
  object-fit: cover;
  background: #e2e8f0;
  box-shadow: -2px 0 5px rgba(0,0,0,0.1);
  flex-shrink: 0;
}

.mkt-popular-info {
  flex-grow: 1;
  overflow: hidden;
}

.mkt-popular-title {
  font-size: 12px;
  font-weight: 800;
  color: #08102b;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================
   REALISTIC PHYSICAL BOOK COVERS (GRID)
   ========================================== */
.books-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 18px 0 36px;
}

.mkt-book-card {
  background: #ffffff;
  border: 1px solid var(--mkt-card-border);
  border-radius: 16px;
  padding: 14px 12px 12px;
  box-shadow: 0 4px 14px rgba(8, 16, 43, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.24s ease, border-color 0.24s ease;
  position: relative;
}

.mkt-book-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 32px rgba(29, 78, 216, 0.12);
  border-color: rgba(29, 78, 216, 0.25);
}

/* REAL PHYSICAL BOOK COVER PRESENTATION */
.mkt-cover-wrapper {
  position: relative;
  width: 150px;
  max-width: 90%;
  aspect-ratio: 210 / 297;
  margin: 4px auto 12px;
  border-radius: 3px 9px 9px 3px;
  background: #f1f5f9;
  
  /* 3D Realistic Book Shadow & Stacked Page Edges */
  box-shadow: 
    -3px 0 0 #cbd5e1,
    -6px 0 0 #e2e8f0,
    -10px 8px 20px rgba(8, 16, 43, 0.16),
    inset 3px 0 6px rgba(0, 0, 0, 0.1);
  border-right: 3px solid rgba(0, 0, 0, 0.12);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.mkt-book-card:hover .mkt-cover-wrapper {
  transform: translateY(-3px) rotate(-1.5deg);
  box-shadow: 
    -4px 0 0 #cbd5e1,
    -8px 0 0 #e2e8f0,
    -14px 12px 26px rgba(29, 78, 216, 0.2),
    inset 3px 0 6px rgba(0, 0, 0, 0.12);
}

.mkt-cover-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.mkt-badge-grade {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(8, 16, 43, 0.88);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  backdrop-filter: blur(4px);
  z-index: 2;
}

.mkt-badge-pdf {
  position: absolute;
  top: 6px;
  left: 6px;
  background: #ef4444;
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 4px;
  z-index: 2;
}

/* Card Body */
.mkt-card-body {
  width: 100%;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  text-align: right;
}

.mkt-card-title {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  color: var(--mkt-dark-navy);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
}

.mkt-card-title a { color: inherit; }
.mkt-card-title a:hover { color: var(--mkt-primary); }

.mkt-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--mkt-text-muted);
  font-weight: 700;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.08);
}

.mkt-btn-download {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--mkt-primary) 0%, #2563eb 100%);
  color: #ffffff !important;
  font-weight: 800;
  font-size: 12.5px;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(29, 78, 216, 0.2);
  transition: all 0.2s ease;
  margin-top: auto;
}

.mkt-btn-download:hover {
  background: linear-gradient(135deg, var(--mkt-primary-hover) 0%, #1d4ed8 100%);
  box-shadow: 0 6px 16px rgba(29, 78, 216, 0.3);
  transform: translateY(-2px);
}

/* ==========================================
   INSIDE ARTICLE PAGE
   ========================================== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--mkt-text-muted);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.mkt-article-box {
  background: #ffffff;
  border: 1px solid var(--mkt-card-border);
  border-radius: 20px;
  padding: 30px 24px;
  box-shadow: 0 6px 20px rgba(8, 16, 43, 0.04);
}

.mkt-post-title {
  font-size: clamp(20px, 2.5vw, 27px);
  font-weight: 900;
  color: var(--mkt-dark-navy);
  line-height: 1.45;
  text-align: center;
  margin-bottom: 24px;
}

/* 2-Column File Showcase: Book Cover & Spec Table */
.mkt-details-showcase {
  display: grid;
  grid-template-columns: minmax(220px, 260px) 1fr;
  gap: 24px;
  align-items: center;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border: 1px solid rgba(29, 78, 216, 0.12);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
}

.mkt-showcase-cover {
  width: 100%;
  max-width: 230px;
  margin: 0 auto;
  aspect-ratio: 210 / 297;
  border-radius: 4px 12px 12px 4px;
  background: #0f172a;
  box-shadow: 
    -4px 0 0 #cbd5e1,
    -8px 0 0 #e2e8f0,
    -14px 10px 28px rgba(8, 16, 43, 0.2);
  border-right: 3px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mkt-showcase-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mkt-spec-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.mkt-spec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid var(--mkt-card-border);
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--mkt-text);
  gap: 12px;
}

.mkt-spec-row b {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--mkt-dark-navy);
  font-weight: 800;
  white-space: nowrap;
}

.mkt-spec-row b svg {
  stroke: var(--mkt-primary);
}

/* Action Center (Download & Preview Buttons) */
.mkt-action-center {
  margin: 24px 0 28px;
  text-align: center;
}

.mkt-action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  max-width: 720px;
  margin: 0 auto 12px;
}

.mkt-btn-action {
  min-height: 54px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #ffffff !important;
  text-decoration: none;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mkt-btn-download-main {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  box-shadow: 0 10px 24px rgba(5, 150, 105, 0.3);
}

.mkt-btn-download-main:hover {
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(5, 150, 105, 0.38);
}

.mkt-btn-preview-main {
  background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
  box-shadow: 0 10px 24px rgba(29, 78, 216, 0.3);
}

.mkt-btn-preview-main:hover {
  background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(29, 78, 216, 0.38);
}

.mkt-trust-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  background: #f1f5f9;
  border: 1px solid var(--mkt-card-border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--mkt-text-muted);
  max-width: 100%;
  flex-wrap: wrap;
  line-height: 1.5;
}

.mkt-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  animation: mktPulse 2s infinite;
}

@keyframes mktPulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Post Labels / Tags Section on Article */
.mkt-post-labels-box {
  background: #f8fafc;
  border: 1px solid var(--mkt-card-border);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 18px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mkt-labels-label {
  font-weight: 800;
  font-size: 13px;
  color: var(--mkt-dark-navy);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.mkt-article-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #1d4ed8;
  text-decoration: none;
  transition: all 0.18s ease;
}

.mkt-article-tag:hover {
  background: #1d4ed8;
  color: #ffffff;
  border-color: #1d4ed8;
}

/* Description Card */
.mkt-desc-card {
  background: #ffffff;
  border: 1px solid var(--mkt-card-border);
  border-radius: var(--mkt-radius-card);
  padding: 20px;
  margin: 20px 0;
  line-height: 1.9;
  font-size: 15.5px;
  color: var(--mkt-text);
}

.mkt-desc-card h3 {
  font-size: 17.5px;
  font-weight: 900;
  color: var(--mkt-dark-navy);
  margin-bottom: 10px;
  border-right: 4px solid var(--mkt-primary);
  padding-right: 10px;
}

/* Related Posts Section */
.mkt-related-section {
  margin: 28px 0 20px;
}

.mkt-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.mkt-section-title {
  font-size: 18px;
  font-weight: 900;
  color: var(--mkt-dark-navy);
  display: flex;
  align-items: center;
  gap: 6px;
}

.mkt-related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.mkt-related-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid var(--mkt-card-border);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.mkt-related-card:hover {
  border-color: rgba(29, 78, 216, 0.3);
  background: #f8fbff;
  transform: translateY(-2px);
}

.mkt-related-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mkt-primary) 0%, #3b82f6 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  flex-shrink: 0;
}

.mkt-related-thumb {
  width: 38px;
  height: 52px;
  aspect-ratio: 210 / 297;
  border-radius: 5px;
  object-fit: cover;
  background: #f1f5f9;
  flex-shrink: 0;
}

.mkt-related-info { flex-grow: 1; overflow: hidden; }

.mkt-related-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--mkt-dark-navy);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mkt-related-arrow {
  color: var(--mkt-primary);
  font-size: 15px;
  font-weight: 900;
  flex-shrink: 0;
}

/* Community Channels Box */
.mkt-community-box {
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border: 1px dashed rgba(29, 78, 216, 0.25);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  margin: 24px 0 10px;
}

.mkt-community-title {
  font-size: 16.5px;
  font-weight: 900;
  color: #ef4444;
  margin-bottom: 12px;
}

.mkt-community-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mkt-community-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}

.mkt-community-btn:hover { transform: translateY(-2px); }
.mkt-btn-app { background: linear-gradient(135deg, #059669 0%, #10b981 100%); }
.mkt-btn-telegram { background: linear-gradient(135deg, #0088cc 0%, #0077b5 100%); }
.mkt-btn-facebook { background: linear-gradient(135deg, #1877f2 0%, #0d65d9 100%); }

/* ==========================================
   MOBILE SLIDE-OUT DRAWER
   ========================================== */
.mkt-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 16, 43, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mkt-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.mkt-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 85vw);
  height: 100vh;
  background: #ffffff;
  z-index: 2001;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  transform: translateX(110%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
  overflow-y: auto;
  visibility: hidden;
}

.mkt-drawer.open {
  transform: translateX(0);
  visibility: visible;
}

.mkt-drawer-header {
  padding: 16px 18px;
  background: linear-gradient(135deg, #08102b 0%, #1e3a8a 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mkt-drawer-close {
  background: rgba(255, 255, 255, 0.15);
  border: 0;
  color: #ffffff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mkt-drawer-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mkt-drawer-app-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff !important;
  font-weight: 800;
  font-size: 14.5px;
  padding: 12px 16px;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
  margin-bottom: 6px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mkt-drawer-app-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.4);
}

.mkt-drawer-app-btn svg {
  flex-shrink: 0;
}

.mkt-drawer-nav-list {
  list-style: none;
  padding: 0;
  margin: 0 0 10px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 14px;
}

.mkt-drawer-nav-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  color: #1e293b;
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  transition: all 0.2s ease;
}

.mkt-drawer-nav-item a:hover,
.mkt-drawer-nav-item a:active {
  background: #eff6ff;
  color: var(--mkt-primary);
  border-color: #bfdbfe;
  transform: translateX(-3px);
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
  background: #08102b;
  color: #94a3b8;
  padding: 42px 0 24px;
  margin-top: 48px;
}

.footer-wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 30px;
}

.footer h3, .footer h4 { color: #ffffff; font-weight: 900; margin-bottom: 10px; }
.footer-links { list-style: none; line-height: 2.1; }
.footer-links a { color: #cbd5e1; font-weight: 600; font-size: 13.5px; }
.footer-links a:hover { color: #38bdf8; }
.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12.5px;
  color: #64748b;
}

/* ==========================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================== */
@media (max-width: 1024px) {
  .mkt-layout-wrap {
    grid-template-columns: 1fr;
  }
  .mkt-layout-wrap > .mkt-sidebar {
    display: none;
  }
  .mkt-drawer .mkt-sidebar {
    display: flex !important;
    width: 100% !important;
    gap: 14px;
  }
  .mkt-drawer .mkt-widget {
    box-shadow: none;
    border-color: #f1f5f9;
    padding: 14px;
  }
  .books-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .stages-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 820px) {
  .nav-links, .app-btn {
    display: none;
  }
  .nav-toggle-btn {
    display: flex;
  }
  .mobile-stage-bar {
    display: flex;
  }
  .mkt-details-showcase {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 18px;
  }
  .mkt-action-buttons {
    grid-template-columns: 1fr;
  }
  .mkt-related-grid {
    grid-template-columns: 1fr;
  }
  .footer-wrap {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 640px) {
  .books-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .mkt-book-card {
    padding: 10px 8px 10px !important;
    border-radius: 14px !important;
  }
  .mkt-cover-wrapper {
    width: 120px !important;
    margin-bottom: 8px !important;
  }
  .mkt-card-title {
    font-size: 12px !important;
    min-height: 34px !important;
  }
  .mkt-btn-download {
    min-height: 32px !important;
    font-size: 11.5px !important;
    border-radius: 8px !important;
  }
  .stages-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .stage-card {
    padding: 12px 8px !important;
  }
  .stage-icon { font-size: 24px !important; }
  .stage-title { font-size: 13px !important; }
  .stage-count { font-size: 10.5px !important; }

  .mkt-article-box {
    padding: 18px 12px !important;
  }
  .mkt-post-title {
    font-size: 18.5px !important;
    margin-bottom: 16px !important;
  }
  .mkt-spec-row {
    font-size: 12.5px !important;
    padding: 8px 10px !important;
  }
  .mkt-community-btn {
    width: 100% !important;
    justify-content: center !important;
  }
  .mkt-showcase-cover {
    max-width: 180px !important;
  }
  .mkt-trust-badge {
    font-size: 11.5px !important;
    padding: 6px 10px !important;
    border-radius: 12px !important;
  }
  .mkt-btn-action {
    font-size: 14.5px !important;
    min-height: 48px !important;
  }
  .hero-title {
    font-size: 22px !important;
  }
  .hero-subtitle {
    font-size: 12px !important;
  }
}

@media (max-width: 480px) {
  .brand {
    font-size: 17px;
    gap: 8px;
  }
  .brand-logo-img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }
}

/* ==========================================================================
   v5 REVIEW FIXES: clean covers, compact stage row, honest widgets, mobile polish
   ========================================================================== */
[hidden] { display: none !important; }

.hero { padding: 30px 0 26px; }
.hero-title { font-size: clamp(24px, 3.2vw, 32px); margin-bottom: 6px; }
.app-btn svg { flex-shrink: 0; }

/* Stage quick-links: compact horizontal cards */
.stages-grid { gap: 12px; margin: 20px 0 4px; }
.stage-card {
  flex-direction: row !important;
  align-items: center;
  justify-content: flex-start;
  text-align: right;
  gap: 12px;
  padding: 12px 14px !important;
}
.stage-icon {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  margin: 0 !important;
  border-radius: 12px;
  background: #eff6ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px !important;
}
.stage-text { min-width: 0; text-align: right; }
.stage-title { font-size: 14px !important; margin: 0 !important; line-height: 1.35; }
.stage-count { font-size: 12px !important; }

/* Section heads */
.mkt-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.mkt-sec-head h2 { font-size: 21px; font-weight: 900; color: var(--mkt-dark-navy); line-height: 1.3; }
.mkt-sec-sub { font-size: 12.5px; font-weight: 700; color: var(--mkt-text-muted); white-space: nowrap; }

/* Book cards: whole cover visible (never cropped), no overlay badges */
.mkt-book-card { align-items: stretch; padding: 14px; }
.mkt-cover-wrapper {
  width: 100%;
  max-width: 158px;
  align-self: center;
  border-right: 0;
  isolation: isolate;
  background: #e7edf5;
  box-shadow: -3px 0 0 #cbd5e1, -6px 0 0 #e2e8f0, -10px 10px 22px rgba(8, 16, 43, 0.18);
}
.mkt-book-card:hover .mkt-cover-wrapper {
  box-shadow: -4px 0 0 #cbd5e1, -8px 0 0 #e2e8f0, -14px 14px 28px rgba(29, 78, 216, 0.22);
}
.mkt-cover-wrapper::before {
  content: "";
  position: absolute;
  inset: -14px;
  background: var(--bg) center / cover no-repeat;
  filter: blur(12px) saturate(1.15);
  opacity: 0.6;
  z-index: 0;
}
.mkt-cover-wrapper img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; }
.mkt-cover-wrapper::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; right: 0;
  width: 8px;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.30), rgba(0, 0, 0, 0.10) 45%, rgba(0, 0, 0, 0));
  z-index: 2;
  pointer-events: none;
}
.mkt-card-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 8px; }
.mkt-chip-grade { background: #eff6ff; color: #1d4ed8; font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 999px; }
.mkt-chip-term { background: #f1f5f9; color: #475569; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.mkt-card-title { font-size: 13.5px; -webkit-line-clamp: 3; min-height: 58px; }
.mkt-card-meta { justify-content: flex-start; gap: 14px; font-size: 11.5px; flex-wrap: wrap; }

/* Sidebar: latest additions */
.mkt-popular-thumb {
  width: 42px; height: 58px;
  object-fit: contain;
  background: #eef2f7;
  border-radius: 4px;
  box-shadow: -2px 0 0 #cbd5e1, -4px 3px 8px rgba(0, 0, 0, 0.12);
}
.mkt-popular-title { font-size: 12.5px; }
.mkt-popular-meta { font-size: 11px; font-weight: 700; color: var(--mkt-text-muted); margin-top: 2px; }

/* Related list */
.mkt-related-thumb {
  width: 44px !important; height: 62px !important;
  object-fit: contain;
  background: #eef2f7;
  border-radius: 4px;
  box-shadow: -2px 0 0 #cbd5e1;
}
.mkt-related-title { font-weight: 800; line-height: 1.45; }
.mkt-related-grade { font-size: 11.5px; color: var(--mkt-text-muted); font-weight: 700; margin-top: 2px; }

/* Article page */
.breadcrumb { padding-top: 16px; }
.mkt-showcase-cover { background: #e7edf5; }
.mkt-showcase-cover img { object-fit: contain; }
.mkt-trust-badge { flex-wrap: nowrap; text-align: center; }
.mkt-trust-badge svg { flex-shrink: 0; }
.mkt-sticky-cta { display: none; }

/* Search results (home) */
.mkt-results { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.mkt-result-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  background: #ffffff;
  border: 1px solid var(--mkt-card-border);
  border-radius: 12px;
  color: var(--mkt-text);
  font-weight: 700; font-size: 14px;
}
.mkt-result-row:hover { border-color: rgba(29, 78, 216, 0.35); background: #f8fbff; color: var(--mkt-primary); }
.mkt-result-grade { flex: 0 0 auto; background: #eff6ff; color: #1d4ed8; font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 999px; }
.mkt-result-title { flex: 1; min-width: 0; line-height: 1.5; }
.mkt-result-kind { flex: 0 0 auto; font-size: 11px; color: var(--mkt-text-muted); }
.mkt-results-empty { padding: 30px; text-align: center; color: var(--mkt-text-muted); font-weight: 700; background: #fff; border-radius: 14px; border: 1px dashed #cbd5e1; }
.mkt-browse-all {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 8px 0 28px; padding: 14px 16px;
  background: #ffffff; border: 1px solid var(--mkt-card-border); border-radius: 14px;
  font-weight: 800; font-size: 13.5px;
}
.mkt-browse-all a { background: #1d4ed8; color: #fff !important; padding: 6px 14px; border-radius: 999px; font-size: 13px; }

@media (max-width: 820px) {
  .mkt-sticky-cta {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 10px;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 900;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--mkt-card-border);
    box-shadow: 0 -6px 20px rgba(8, 16, 43, 0.08);
    transform: translateY(110%);
    transition: transform 0.25s ease;
  }
  .mkt-sticky-cta.show { transform: translateY(0); }
  .mkt-sticky-cta .mkt-btn-action { min-height: 44px; font-size: 14px; border-radius: 12px; box-shadow: none; }
  body.has-cta { padding-bottom: 70px; }
}

@media (max-width: 640px) {
  .hero { padding: 20px 0 18px; }
  .hero-title { font-size: 21px !important; }
  .stages-grid {
    display: flex !important;
    overflow-x: auto;
    gap: 10px !important;
    scroll-snap-type: x mandatory;
    margin: 14px -16px 4px !important;
    padding: 2px 16px 8px;
    scrollbar-width: none;
  }
  .stages-grid::-webkit-scrollbar { display: none; }
  .stage-card { flex: 0 0 205px; scroll-snap-align: start; padding: 10px 12px !important; }
  .mkt-sec-head h2 { font-size: 18px; }
  .mkt-sec-sub { font-size: 11.5px; }
  .mkt-book-card { padding: 10px !important; }
  .mkt-cover-wrapper { width: 100% !important; max-width: 128px; }
  .mkt-card-chips { gap: 4px; }
  .mkt-chip-grade, .mkt-chip-term { font-size: 10px; padding: 2px 7px; }
  .mkt-card-title { font-size: 12.5px !important; min-height: 54px !important; }
  .mkt-card-meta { font-size: 10.5px; gap: 8px; }
  .mkt-trust-badge { font-size: 12px !important; padding: 7px 12px !important; }
  .mkt-result-row { flex-wrap: wrap; font-size: 13px; }
}
