/* ============================================================
   DESIGN SYSTEM — تعلم دز  |  نسخة مبسّطة وسريعة (بدون خطوط/سكربتات خارجية)
   ============================================================ */
:root {
  --navy:      #0b1829;
  --navy2:     #162436;
  --navy3:     #1e3350;
  --gold:      #e8a020;
  --gold2:     #f5c842;
  --gold3:     #fff3cd;
  --accent:    #1d4ed8;
  --accent2:   #3b82f6;
  --accent3:   #dbeafe;
  --teal:      #0d9488;
  --teal2:     #ccfbf1;
  --green:     #15803d;
  --green2:    #dcfce7;
  --red:       #dc2626;
  --red2:      #fee2e2;
  --amber:     #d97706;
  --amber2:    #fef3c7;

  --text:      #111827;
  --text2:     #374151;
  --text3:     #6b7280;
  --text4:     #9ca3af;
  --bg:        #f0f4fb;
  --bg2:       #e8eef7;
  --bg3:       #dde5f2;
  --white:     #ffffff;
  --border:    #dde3ed;
  --border2:   #c8d1e0;

  --shadow-xs: 0 1px 3px rgba(0,0,0,.06);
  --shadow-sm: 0 2px 8px rgba(0,0,0,.08);
  --shadow:    0 4px 20px rgba(0,0,0,.10);
  --shadow-md: 0 8px 32px rgba(0,0,0,.12);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.16);
  --shadow-xl: 0 24px 64px rgba(0,0,0,.20);

  --r-sm: 8px;
  --r:    12px;
  --r-lg: 18px;
  --r-xl: 24px;

  --ease: cubic-bezier(.4,0,.2,1);
  --t:    .22s;
  --t-lg: .38s;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; text-rendering: optimizeLegibility; }
body {
  /* 🆕 خطوط النظام فقط — بدون تحميل خط خارجي، تعرض فوراً بدون أي تأخير */
  font-family: 'Cairo', -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a  { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: 1480px; margin: 0 auto; padding: 0 16px; width: 100%; }

.seo-badge-container {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 14px 4px 10px;
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 700;
    background: var(--bg);
    border: 1px solid var(--border);
    direction: ltr;
}
.seo-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.seo-badge-score {
    font-weight: 800;
}

.progress-bar {
  position: fixed; top: 0; right: 0; left: 0; height: 3px;
  z-index: 500; background: transparent; pointer-events: none;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--accent2) 50%, var(--teal) 100%);
  width: 0%;
  border-radius: 0 2px 2px 0;
}

.site-header {
  background: var(--navy);
  position: sticky; top: 0; z-index: 200;
  border-bottom: 2px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 2px 0 var(--gold), var(--shadow-md);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; height: 64px; max-width: 1260px; margin: 0 auto;
}

.logo { display: flex; align-items: center; gap: 11px; }
.logo-mark {
  width: 40px; height: 40px; border-radius: 11px;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 900; color: var(--navy);
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(232,160,32,.4);
}
.logo-text {
  color: #fff; font-size: 1.18rem; font-weight: 800;
  letter-spacing: -.3px;
}
.logo-text span { color: var(--gold2); }

.header-nav { display: flex; align-items: center; gap: 2px; }
.nav-item {
  color: rgba(255,255,255,.72); font-size: .87rem; font-weight: 600;
  padding: 7px 14px; border-radius: var(--r-sm);
  transition: color var(--t), background var(--t);
  position: relative;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,.09); }

.header-cta { display: flex; align-items: center; gap: 8px; }
.btn-login {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: var(--r-sm);
  font-size: .84rem; font-weight: 700;
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.18);
  transition: all var(--t) var(--ease);
}
.btn-login:hover { background: rgba(255,255,255,.16); color: #fff; }
.btn-write {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 18px; border-radius: var(--r-sm);
  font-size: .84rem; font-weight: 800;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: var(--navy);
  transition: all var(--t) var(--ease);
  box-shadow: 0 2px 8px rgba(232,160,32,.3);
}
.btn-write:hover { transform: translateY(-2px); }

.mobile-menu-btn {
  display: none; background: none; border: none;
  color: #fff; font-size: 1.45rem; padding: 5px;
}
.mobile-nav {
  display: none; position: fixed; inset: 0; z-index: 400;
  background: rgba(11,24,41,.97);
  flex-direction: column; align-items: center; justify-content: center;
  gap: 24px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a { color: #fff; font-size: 1.25rem; font-weight: 700; }
.mobile-nav .close-btn {
  position: absolute; top: 22px; left: 22px;
  background: rgba(255,255,255,.1); border: none;
  color: #fff; font-size: 1.5rem; width: 44px; height: 44px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
}

.breadcrumb-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 4px; padding: 12px 0;
  font-size: .81rem; color: var(--text3);
}
.breadcrumb a {
  color: var(--text3); padding: 3px 6px; border-radius: 5px;
  transition: color var(--t), background var(--t);
}
.breadcrumb a:hover { color: var(--accent); background: var(--accent3); }
.breadcrumb .sep { color: var(--border2); margin: 0 1px; font-size: .9rem; }
.breadcrumb .current {
  color: var(--text2); font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden; max-width: 240px;
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 228px;
  gap: 18px;
  align-items: start;
  padding: 24px 0 56px;
}
#main-content { min-width: 0; width: 100%; }
.side-col {
  position: sticky; top: 78px;
  max-width: 228px;
  font-size: .92rem;
}

.article-wrap {
  background: var(--white);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.article-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy3) 100%);
}
.article-hero img {
  width: 100%; max-height: 500px; object-fit: cover;
  display: block;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to top,
    rgba(11,24,41,.95) 0%,
    rgba(11,24,41,.55) 45%,
    rgba(11,24,41,.1)  80%,
    transparent 100%
  );
}
.hero-meta {
  position: absolute; bottom: 0; right: 0; left: 0;
  padding: 30px 36px;
}
.hero-cat-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--gold); color: var(--navy);
  font-size: .77rem; font-weight: 800;
  padding: 5px 16px; border-radius: 99px; margin-bottom: 13px;
}
.hero-title {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 900; color: #fff; line-height: 1.3;
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
}

.article-header { padding: 34px 36px 0; }
.article-title-plain {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 900; color: var(--text); line-height: 1.35;
  margin-bottom: 18px;
}
.cat-badge-plain {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent3); color: var(--accent);
  font-size: .78rem; font-weight: 700;
  padding: 5px 16px; border-radius: 99px; margin-bottom: 14px;
}

.article-meta {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 6px 18px; padding: 18px 36px;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: linear-gradient(to left, var(--bg) 0%, var(--bg2) 100%);
}
.meta-pill {
  display: flex; align-items: center; gap: 6px;
  font-size: .82rem; color: var(--text3);
}
.meta-pill strong { color: var(--text2); font-weight: 700; }
.meta-pill .meta-icon {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--white); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; flex-shrink: 0;
}

.article-body { padding: 34px 36px; }

.article-excerpt {
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg2) 100%);
  border-right: 4px solid var(--gold);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
  padding: 20px 22px; margin-bottom: 30px;
  font-size: 1.06rem; color: var(--text2);
  line-height: 1.85; font-style: italic;
}

.toc-box {
  background: linear-gradient(135deg, var(--bg), var(--bg2));
  border: 1px solid var(--border2);
  border-right: 4px solid var(--accent2);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
  padding: 20px 24px; margin-bottom: 30px;
}
.toc-title {
  font-size: .95rem; font-weight: 800; color: var(--navy);
  margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.toc-list { list-style: none; counter-reset: toc; }
.toc-list li { counter-increment: toc; margin-bottom: 8px; padding-right: 4px; }
.toc-list li::before {
  content: counter(toc)". ";
  color: var(--accent2); font-weight: 700; font-size: .85rem;
}
.toc-list a { font-size: .9rem; color: var(--text2); }
.toc-list a:hover { color: var(--accent); }
.toc-list li.h3-item { padding-right: 16px; }

.article-content { font-size: 1.05rem; line-height: 1.95; color: var(--text); }
.article-content h2 {
  font-size: 1.55rem; font-weight: 800;
  margin: 42px 0 18px; color: var(--navy);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.article-content h2::before {
  content: '';
  display: inline-block; width: 4px; height: 24px; flex-shrink: 0;
  background: linear-gradient(to bottom, var(--gold), var(--accent2));
  border-radius: 2px;
}
.article-content h3 { font-size: 1.28rem; font-weight: 800; margin: 32px 0 14px; color: var(--navy2); }
.article-content h4 { font-size: 1.06rem; font-weight: 700; margin: 24px 0 10px; color: var(--text); }
.article-content p { margin-bottom: 20px; text-align: justify; }
.article-content img {
  margin: 30px auto; border-radius: var(--r-xl);
  max-height: 520px; object-fit: cover; width: 100%;
  box-shadow: var(--shadow-md);
}
.article-content ul, .article-content ol { margin: 18px 0; padding-right: 28px; }
.article-content li { margin-bottom: 10px; line-height: 1.85; }
.article-content blockquote {
  border-right: 4px solid var(--accent2);
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  padding: 20px 24px; margin: 30px 0;
  border-radius: 0 var(--r-xl) var(--r-xl) 0;
  font-style: italic; color: var(--navy2); font-size: 1.05rem;
}
.article-content table {
  width: 100%; border-collapse: collapse;
  margin: 30px 0; border-radius: var(--r); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.article-content th { background: var(--navy); color: #fff; padding: 14px 18px; text-align: right; font-weight: 700; }
.article-content td { padding: 12px 18px; border-bottom: 1px solid var(--border); }
.article-content tr:nth-child(even) td { background: var(--bg); }
.article-content pre {
  background: var(--navy); color: #e2e8f0;
  padding: 24px; border-radius: var(--r-lg);
  overflow-x: auto; font-size: .9rem;
  margin: 26px 0; line-height: 1.75;
}
.article-content code { background: var(--bg2); padding: 2px 8px; border-radius: 5px; font-size: .9em; color: var(--accent); }
.article-content pre code { background: transparent; color: inherit; padding: 0; }
.article-content a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(29,78,216,.3); }
.article-content a:hover { text-decoration-color: var(--accent); }

.faq-section {
    margin-top: 34px;
    border-radius: var(--r-xl);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.faq-head {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 100%);
    border-bottom: 2px solid var(--gold);
}
.faq-head-icon {
    width: 38px; height: 38px; border-radius: var(--r-sm);
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 1.2rem;
}
.faq-head-title { font-size: 1rem; font-weight: 800; color: #fff; }
.faq-head-count {
    margin-right: auto;
    background: rgba(232,160,32,.2);
    color: var(--gold2);
    border: 1px solid rgba(232,160,32,.3);
    font-size: .75rem; font-weight: 700;
    padding: 3px 12px; border-radius: 99px;
}
.faq-item { padding: 20px 24px; border-bottom: 1px solid var(--border); background: var(--white); }
.faq-item:last-child { border-bottom: none; }
.faq-item:hover { background: #f8faff; }
.faq-question {
    font-size: 1.02rem; font-weight: 700; color: var(--navy);
    display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none;
}
.faq-question .q-icon { color: var(--accent2); font-weight: 800; }
.faq-question .toggle-icon { margin-right: auto; color: var(--text3); }
.faq-item.open .faq-question .toggle-icon { transform: rotate(180deg); }
.faq-answer { margin-top: 12px; padding-right: 34px; color: var(--text2); line-height: 1.8; display: none; font-size: .98rem; }
.faq-item.open .faq-answer { display: block; }

.attachments-wrap { margin-top: 34px; border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.att-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 100%);
  border-bottom: 2px solid var(--gold);
}
.att-head-icon {
  width: 38px; height: 38px; border-radius: var(--r-sm);
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.att-head-icon svg { width: 18px; height: 18px; }
.att-head-title { font-size: 1rem; font-weight: 800; color: #fff; }
.att-head-count {
  margin-right: auto;
  background: rgba(232,160,32,.2);
  color: var(--gold2);
  border: 1px solid rgba(232,160,32,.3);
  font-size: .75rem; font-weight: 700;
  padding: 3px 12px; border-radius: 99px;
}
.att-file {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 24px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: relative;
}
.att-file:last-child { border-bottom: none; }
.att-file:hover { background: #f8faff; }
.att-file-icon-wrap { position: relative; flex-shrink: 0; width: 52px; height: 60px; }
.att-file-icon-bg {
  width: 52px; height: 60px;
  background: linear-gradient(160deg, var(--bg2) 0%, var(--bg3) 100%);
  border-radius: 10px;
  border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
}
.att-file-icon-bg svg { width: 26px; height: 26px; }
.att-ext-tag {
  position: absolute;
  bottom: -5px; right: 50%; transform: translateX(50%);
  background: var(--green); color: #fff;
  font-size: .58rem; font-weight: 800;
  padding: 2px 7px; border-radius: 5px;
  letter-spacing: .4px; text-transform: uppercase;
  white-space: nowrap;
}
.att-ext-tag.pdf   { background: #dc2626; }
.att-ext-tag.doc, .att-ext-tag.docx  { background: #1d4ed8; }
.att-ext-tag.pptx, .att-ext-tag.ppt   { background: #ea580c; }
.att-ext-tag.xlsx, .att-ext-tag.xls   { background: #15803d; }
.att-ext-tag.zip,  .att-ext-tag.rar   { background: #7c3aed; }

.att-file-info { flex: 1; min-width: 0; }
.att-file-name {
  font-size: .95rem; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 5px;
}
.att-file:hover .att-file-name { color: var(--accent); }
.att-file-meta { display: flex; align-items: center; gap: 10px; font-size: .76rem; color: var(--text3); }
.att-meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--border2); }

.att-download-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--green) 0%, #166534 100%);
  color: #fff;
  border-radius: var(--r);
  font-size: .9rem; font-weight: 800;
  border: none;
  white-space: nowrap; flex-shrink: 0;
  text-decoration: none;
  min-width: 130px;
  position: relative;
  overflow: hidden;
}
.att-download-btn:hover { background: linear-gradient(135deg, #166534 0%, #14532d 100%); }
.att-download-btn .dl-arrow {
  width: 22px; height: 22px;
  background: rgba(255,255,255,.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.att-download-btn .dl-arrow svg { width: 13px; height: 13px; }

/* —— عرض الملف (نمط DzExams) —— */
.dz-doc-block {
  margin-top: 28px;
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.dz-doc-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #0f2744 0%, #1a3a6b 100%);
  border-bottom: 2px solid var(--gold);
}
.dz-doc-head-title {
  flex: 1; min-width: 200px;
  font-size: .95rem; font-weight: 800; color: #fff; line-height: 1.45;
}
.dz-doc-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid var(--border);
}
.dz-doc-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 8px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  font-weight: 800;
  font-size: .86rem;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .06);
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.dz-doc-tool:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, .1);
}
.dz-doc-tool-preview {
  border-color: #93c5fd;
  color: #1d4ed8;
  background: linear-gradient(180deg, #eff6ff, #fff);
}
.dz-doc-tool-print {
  border-color: #cbd5e1;
  color: #334155;
}
.dz-doc-tool-download {
  border-color: #6ee7b7;
  color: #047857;
  background: linear-gradient(180deg, #ecfdf5, #fff);
}
.dz-tool-size { font-size: .72rem; font-weight: 700; opacity: .85; }
.dz-doc-hub-link {
  margin: 0;
  padding: 8px 14px 10px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text3);
  background: #fafbfc;
  border-bottom: 1px solid #edf2f7;
}
.dz-doc-hub-link a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}
.dz-doc-hub-link a:hover { text-decoration: underline; }
@media (max-width: 520px) {
  .dz-doc-toolbar { grid-template-columns: 1fr; }
  .dz-tool-size { display: inline; }
}
.dz-doc-dl {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--green) 0%, #166534 100%);
  color: #fff; font-weight: 800; font-size: .88rem;
  border-radius: var(--r); text-decoration: none;
}
.dz-doc-dl:hover { filter: brightness(1.05); color: #fff; }
.dz-pdf-viewer {
  position: relative;
  width: 100%;
  min-height: 420px;
  height: min(78vh, 820px);
  background: #2e2e2e;
  background-image:
    radial-gradient(circle at 12px 12px, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 22px 22px;
  border-top: 1px solid rgba(0,0,0,.25);
}
.dz-pdf-viewer iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}
@media (max-width: 768px) {
  .dz-pdf-viewer {
    min-height: 360px;
    height: 72vh;
    max-height: none;
  }
}
.dz-article-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 380;
  display: flex;
  gap: 6px;
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  background: rgba(11, 24, 41, 0.96);
  border-top: 2px solid var(--gold);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.2);
}
.dz-sticky-btn {
  flex: 1;
  text-align: center;
  min-height: 46px;
  line-height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--green), #166534);
  color: #fff !important;
  font-weight: 800;
  text-decoration: none;
  font-size: 0.88rem;
}
.dz-sticky-link,
.dz-sticky-next {
  min-height: 46px;
  padding: 0 12px;
  line-height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.82rem;
  white-space: nowrap;
}
.dz-sticky-next {
  border-color: #93c5fd;
  color: #bfdbfe !important;
}
@media (min-width: 721px) {
  .dz-article-sticky { display: none !important; }
}
.dz-office-hero {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 48px 24px 56px;
  background: linear-gradient(180deg, #f0f4ff 0%, #fff 100%);
}
.dz-office-icon {
  width: 120px; height: 140px;
  filter: drop-shadow(0 12px 24px rgba(29, 78, 216, .25));
}
.dz-office-hero.docx .dz-office-icon { filter: drop-shadow(0 12px 24px rgba(29, 78, 216, .3)); }
.dz-office-hero.pdf .dz-office-icon { filter: drop-shadow(0 12px 24px rgba(220, 38, 38, .25)); }
.dz-office-label {
  font-size: 1.05rem; font-weight: 800; color: var(--navy);
}
.dz-office-hint { font-size: .88rem; color: var(--text3); text-align: center; max-width: 420px; }
.dz-att-mini {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; border-top: 1px solid var(--border);
  background: #fafbff;
}
.dz-att-mini + .dz-att-mini { border-top: 1px solid var(--border); }

.dz-similar-section {
  margin-top: 36px;
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}
.dz-similar-head {
  padding: 16px 22px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  font-size: 1.05rem; font-weight: 800; color: var(--navy);
  display: flex; align-items: center; gap: 10px;
}
.dz-similar-list { display: flex; flex-direction: column; }
.dz-similar-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px; align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit;
  transition: background .15s;
}
.dz-similar-item:last-child { border-bottom: none; }
.dz-similar-item:hover { background: #f8faff; }
.dz-file-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 52px; padding: 6px 10px;
  border-radius: 8px;
  font-size: .68rem; font-weight: 800; letter-spacing: .3px;
  color: #fff;
}
.dz-file-badge.pdf { background: #dc2626; }
.dz-file-badge.word { background: #1d4ed8; }
.dz-file-badge.ppt { background: #ea580c; }
.dz-file-badge.other { background: #64748b; }
.dz-similar-title {
  font-size: .92rem; font-weight: 700; color: var(--text);
  line-height: 1.45;
}
.dz-similar-item:hover .dz-similar-title { color: var(--accent); }
.dz-similar-meta {
  font-size: .72rem; color: var(--text3);
  display: flex; flex-direction: column; gap: 4px; align-items: flex-end;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .dz-similar-item { grid-template-columns: auto 1fr; }
  .dz-similar-meta { grid-column: 2; align-items: flex-start; flex-direction: row; gap: 10px; }
  .dz-pdf-viewer { min-height: 360px; height: 55vh; }
}

.video-wrapper { margin-top: 30px; }
.video-title { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.video-container {
  position: relative; padding-bottom: 56.25%; height: 0;
  border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-md);
}
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

.share-section {
  background: var(--white); border-radius: var(--r-xl);
  padding: 24px 30px; margin-top: 24px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.share-title { font-size: .97rem; font-weight: 800; color: var(--navy); margin-bottom: 18px; display: flex; align-items: center; gap: 9px; }
.share-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.share-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--r);
  color: #fff; font-weight: 700; font-size: .84rem;
  border: none; font-family: inherit;
}
.share-btn:hover { transform: translateY(-2px); }
.share-btn.fb  { background: #1877f2; }
.share-btn.tw  { background: #1da1f2; }
.share-btn.wa  { background: #25d366; }
.share-btn.tg  { background: #0088cc; }
.share-btn.cp  { background: var(--navy2); }
.share-btn.fb:hover  { background: #0d65d9; }
.share-btn.tw:hover  { background: #0c85d0; }
.share-btn.wa:hover  { background: #1cb653; }
.share-btn.tg:hover  { background: #006ba8; }
.share-btn.cp:hover  { background: var(--navy3); }

.comments-section {
  background: var(--white); border-radius: var(--r-xl);
  padding: 30px 36px; margin-top: 24px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.comments-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px; padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}
.comments-title { font-size: 1.22rem; font-weight: 800; color: var(--navy); display: flex; align-items: center; gap: 9px; }
.comments-count {
  background: var(--bg2); color: var(--text3);
  font-size: .77rem; font-weight: 700;
  padding: 4px 14px; border-radius: 99px;
  border: 1px solid var(--border);
}
.comment-form-wrap { background: var(--bg); border-radius: var(--r-lg); padding: 22px; margin-bottom: 28px; border: 1px solid var(--border); }
.form-group { margin-bottom: 14px; }
.form-label { display: block; margin-bottom: 7px; font-weight: 700; color: var(--text2); font-size: .85rem; }
.form-input, .form-textarea {
  width: 100%; padding: 11px 15px;
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  font-family: inherit; font-size: .95rem;
  background: var(--white);
  color: var(--text);
}
.form-input:focus, .form-textarea:focus {
  outline: none; border-color: var(--accent2);
  box-shadow: 0 0 0 4px rgba(59,130,246,.12);
}
.form-textarea { min-height: 115px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.char-counter { font-size: .74rem; color: var(--text4); text-align: left; margin-top: 4px; }
.char-counter.warn { color: var(--amber); }
.char-counter.over { color: var(--red); }
.submit-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; padding: 12px 30px; border: none;
  border-radius: var(--r-sm); font-weight: 800; font-size: .95rem;
  font-family: inherit;
}
.submit-btn:hover { transform: translateY(-2px); }
.submit-btn:disabled { background: var(--text4); cursor: not-allowed; transform: none; }
.cancel-reply-btn {
  background: transparent; color: var(--text3);
  padding: 12px 20px; border: 1.5px solid var(--border);
  border-radius: var(--r-sm); font-weight: 600; font-size: .9rem;
  margin-right: 10px; font-family: inherit;
}
.cancel-reply-btn:hover { background: var(--bg2); border-color: var(--border2); }
.reply-info {
  background: var(--accent3); color: var(--accent);
  padding: 10px 16px; border-radius: var(--r-sm);
  margin-bottom: 14px; font-size: .85rem;
  display: none; border: 1px solid rgba(59,130,246,.25);
}
.reply-info.show { display: block; }
.alert-box { padding: 12px 18px; border-radius: var(--r-sm); margin-bottom: 14px; font-size: .88rem; display: none; font-weight: 600; }
.alert-box.show { display: block; }
.alert-box.success { background: var(--green2); color: #14532d; border: 1px solid #86efac; }
.alert-box.error   { background: var(--red2); color: #7f1d1d; border: 1px solid #fca5a5; }
.comments-list { margin-top: 6px; }
.comment-item { display: flex; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.comment-item:last-child { border-bottom: none; }
.comment-item.reply {
  margin-right: 52px; background: var(--bg);
  border-radius: var(--r-lg); padding: 16px 18px;
  margin-bottom: 10px; border: 1px solid var(--border);
}
.comment-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--teal));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; font-weight: 900; color: #fff;
}
.comment-item.reply .comment-avatar {
  width: 38px; height: 38px; font-size: .95rem;
  background: linear-gradient(135deg, var(--navy2), var(--navy3));
}
.comment-content-wrap { flex: 1; min-width: 0; }
.comment-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.comment-author { font-weight: 700; font-size: .93rem; color: var(--text); }
.comment-date   { color: var(--text4); font-size: .77rem; }
.comment-text { color: var(--text); line-height: 1.8; font-size: .93rem; margin-bottom: 10px; word-break: break-word; }
.reply-btn {
  background: transparent; color: var(--accent);
  border: 1px solid rgba(59,130,246,.3);
  padding: 5px 13px; border-radius: 8px;
  font-size: .78rem; font-weight: 700;
  font-family: inherit;
}
.reply-btn:hover { background: var(--accent3); border-color: var(--accent2); }
.no-comments { text-align: center; padding: 44px; color: var(--text3); }
.no-comments-icon { font-size: 3rem; margin-bottom: 12px; }

.related-section { margin-top: 32px; }
.sec-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; padding-bottom: 13px; border-bottom: 2px solid var(--border); }
.sec-title { font-size: 1.22rem; font-weight: 800; color: var(--text); display: flex; align-items: center; gap: 12px; }
.sec-title::before {
  content: ''; display: block; width: 4px; height: 22px;
  background: linear-gradient(to bottom, var(--gold), var(--accent2));
  border-radius: 2px; flex-shrink: 0;
}
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.related-card {
  background: var(--white); border-radius: var(--r-lg);
  overflow: hidden; border: 1px solid var(--border);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-xs);
}
.related-card:hover { box-shadow: var(--shadow-lg); border-color: var(--border2); }
.related-card-img-wrap { aspect-ratio: 16/9; overflow: hidden; background: var(--bg2); }
.related-card-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.related-card-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; }
.related-card-body { padding: 15px; flex: 1; display: flex; flex-direction: column; }
.related-card-cat { font-size: .72rem; font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.related-card-title {
  font-size: .9rem; font-weight: 700; color: var(--text);
  line-height: 1.45; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 9px;
}
.related-card:hover .related-card-title { color: var(--accent); }
.related-card-meta { font-size: .74rem; color: var(--text3); display: flex; gap: 10px; }

.widget {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden; margin-bottom: 12px;
  box-shadow: var(--shadow-xs);
}
.widget-head {
  padding: 8px 11px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 100%);
  display: flex; align-items: center; gap: 6px;
  border-bottom: 2px solid var(--gold);
}
.widget-head h3 { color: #fff; font-size: .76rem; font-weight: 700; line-height: 1.3; }
.widget-body { padding: 0; }
.pop-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 7px 10px; border-bottom: 1px solid #f1f5f9;
}
.pop-item:last-child { border-bottom: none; }
.pop-item:hover { background: var(--bg); }
.pop-num {
  width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0;
  background: var(--bg2); color: var(--text3);
  font-size: .62rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.pop-num.top { background: var(--gold); color: var(--navy); }
.pop-info { flex: 1; min-width: 0; }
.pop-title {
  font-size: .72rem; font-weight: 600; color: var(--text);
  line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.pop-title:hover { color: var(--accent); }
.pop-views { font-size: .64rem; color: var(--text4); margin-top: 2px; }
.latest-item {
  display: flex; gap: 8px; padding: 7px 10px;
  border-bottom: 1px solid #f1f5f9; align-items: center;
}
.latest-item:last-child { border-bottom: none; }
.latest-item:hover { background: var(--bg); }
.latest-img {
  width: 40px; height: 34px; object-fit: cover;
  border-radius: 6px; flex-shrink: 0; background: var(--bg2);
}
.latest-img-ph {
  width: 40px; height: 34px; border-radius: 6px; flex-shrink: 0;
  background: var(--bg2); display: flex; align-items: center;
  justify-content: center; font-size: 1rem;
}
.latest-info { flex: 1; min-width: 0; }
.latest-title {
  font-size: .72rem; font-weight: 600; color: var(--text);
  line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.latest-item:hover .latest-title { color: var(--accent); }
.latest-date { font-size: .62rem; color: var(--text4); margin-top: 2px; }

.contribute-widget {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy3) 100%);
  border-radius: var(--r); padding: 12px 11px; margin-bottom: 12px;
  border: 1px solid rgba(232,160,32,.25);
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.contribute-widget h3 {
  color: var(--gold2); font-size: .78rem; font-weight: 800;
  margin-bottom: 5px; line-height: 1.35;
}
.contribute-widget p {
  color: rgba(255,255,255,.62); font-size: .68rem;
  line-height: 1.45; margin-bottom: 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.btn-contribute {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: var(--navy); padding: 7px 8px;
  border-radius: var(--r-sm); font-size: .72rem; font-weight: 800;
  text-align: center; line-height: 1.25;
}
.btn-contribute:hover { transform: translateY(-1px); }

footer {
  background: var(--navy); color: #fff;
  padding: 34px 0 20px; margin-top: 32px;
  border-top: 2px solid var(--gold);
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; }
.footer-links-row { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links-row a { color: rgba(255,255,255,.5); font-size: .84rem; }
.footer-links-row a:hover { color: var(--gold2); }
.footer-copy { border-top: 1px solid rgba(255,255,255,.08); margin-top: 22px; padding-top: 18px; text-align: center; color: rgba(255,255,255,.3); font-size: .8rem; }

.scroll-top {
  position: fixed; bottom: 28px; left: 24px;
  width: 48px; height: 48px;
  background: var(--navy2); color: #fff;
  border: 2px solid var(--gold); border-radius: 50%;
  cursor: pointer; display: none; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); font-size: 1.1rem; z-index: 99;
}
.scroll-top.show { display: flex; }
.scroll-top:hover { background: var(--navy3); }

/* Responsive */
@media (max-width: 1280px) {
  .page-layout { grid-template-columns: minmax(0, 1fr) 212px; gap: 14px; }
  .side-col { max-width: 212px; }
}
@media (max-width: 1024px) {
  .page-layout { grid-template-columns: 1fr; gap: 20px; }
  .side-col {
    position: static; max-width: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
  }
  .contribute-widget { grid-column: 1 / -1; margin-bottom: 0; }
  .widget { margin-bottom: 0; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .header-nav, .header-cta .btn-login { display: none; }
  .mobile-menu-btn { display: block; }
  .article-body, .comments-section { padding: 18px 16px; }
  .article-header { padding: 18px 16px 0; }
  .article-meta { padding: 12px 16px; flex-wrap: wrap; gap: 8px; }
  .hero-meta { padding: 16px; }
  .article-hero img { max-height: 220px; object-fit: cover; width: 100%; }
  .related-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .share-buttons { gap: 8px; }
  .share-btn { padding: 10px 14px; font-size: .82rem; min-height: 44px; }
  .comment-item.reply { margin-right: 16px; }
  .att-file { flex-wrap: wrap; }
  .att-download-btn { width: 100%; margin-top: 4px; min-height: 44px; }
  .side-col { grid-template-columns: 1fr; }
  .contribute-widget p { -webkit-line-clamp: 3; }
  .comments-section { content-visibility: auto; contain-intrinsic-size: auto 400px; }
}
@media (max-width: 480px) {
  .container { padding: 0 10px; }
  .hero-title { font-size: 1.22rem; line-height: 1.35; }
  .page-layout { padding: 12px 0 32px; }
  .article-body { padding: 14px 12px; font-size: 1rem; }
  .meta-pill .meta-icon { display: none; }
}
@media print {
  .site-header,.breadcrumb-bar,.share-section,
  .comments-section,.related-section,.side-col,
  .scroll-top { display: none !important; }
  .page-layout { display: block; }
  .article-wrap { box-shadow: none; }
  body { background: #fff; }
}