/* ══════════════════════════════════════════
   NEXORA DOCUMENTATION — documentation.css
   Extends style.css — do not modify style.css
══════════════════════════════════════════ */

/* ── HERO ── */
.doc-hero {
  position: relative;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a0505 55%, #0d0d0d 100%);
  padding: 120px 0 56px;
  overflow: hidden;
  text-align: center;
}
.doc-hero-bg { position: absolute; inset: 0; pointer-events: none; }
.doc-hero-glow {
  position: absolute;
  top: -10%; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 400px;
  background: radial-gradient(ellipse, rgba(229,57,53,0.2), transparent 70%);
}
.doc-hero-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 40%, transparent 100%);
}
.doc-hero-inner { position: relative; z-index: 1; }
.doc-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(229,57,53,0.12);
  border: 1px solid rgba(229,57,53,0.3);
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 20px;
}
.doc-hero-title {
  font-size: 3rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 16px;
}
.doc-hero-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.55);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.65;
}
.doc-search {
  display: flex;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  overflow: hidden;
  position: relative;
}
.doc-search-icon { position: absolute; left: 18px; color: var(--gray); font-size: 0.9rem; }
.doc-search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 15px 16px 15px 44px;
  font-size: 0.9rem;
  font-family: var(--font);
  color: var(--dark);
  background: transparent;
}
.doc-search-input::placeholder { color: #aaa; }
.doc-search-btn {
  background: var(--red);
  color: #fff;
  border: none;
  padding: 15px 28px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: background .2s;
}
.doc-search-btn:hover { background: var(--red-dark); }
.doc-search-hint {
  margin-top: 14px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  min-height: 18px;
}
.doc-search-hint b { color: #fff; }

/* ── LAYOUT ── */
.doc-layout { background: var(--bg); padding: 48px 0 64px; }
.doc-layout-inner {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 32px;
  align-items: start;
}

/* ── SIDEBAR ── */
.doc-sidebar { position: relative; }
.doc-sidebar-inner {
  position: sticky;
  top: 88px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.doc-sidebar-inner::-webkit-scrollbar { width: 5px; }
.doc-sidebar-inner::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.doc-sidebar-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray);
  padding: 0 8px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.doc-nav-group { margin-bottom: 2px; }
.doc-nav-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark);
  font-family: var(--font);
  border-radius: var(--radius-sm);
  transition: all .2s;
  text-align: left;
}
.doc-nav-head span { display: flex; align-items: center; gap: 9px; }
.doc-nav-head span i { color: var(--red); font-size: 0.82rem; width: 16px; text-align: center; }
.doc-nav-head:hover { background: rgba(229,57,53,0.05); color: var(--red); }
.dnh-arrow { font-size: 0.65rem; color: var(--gray); transition: transform .25s; }
.doc-nav-head.open .dnh-arrow { transform: rotate(180deg); }
.doc-nav-links {
  display: none;
  flex-direction: column;
  padding: 2px 0 6px 33px;
}
.doc-nav-head.open + .doc-nav-links { display: flex; }
.doc-nav-links a {
  font-size: 0.82rem;
  color: var(--gray);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: all .2s;
}
.doc-nav-links a:hover { color: var(--red); background: rgba(229,57,53,0.04); }
.doc-nav-links a.active { color: var(--red); font-weight: 600; }

/* ── MAIN ── */
.doc-main { min-width: 0; }
.doc-sidebar-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  font-family: var(--font);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.doc-sidebar-toggle i { color: var(--red); }

.doc-section { margin-bottom: 44px; scroll-margin-top: 88px; }
.doc-section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.doc-section-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.doc-section-title { font-size: 1.4rem; font-weight: 800; color: var(--dark); letter-spacing: -0.4px; }
.doc-section-sub { font-size: 0.85rem; color: var(--gray); }

.doc-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.doc-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: all .22s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.doc-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: rgba(229,57,53,0.2);
}
.doc-card-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(229,57,53,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--red);
  transition: all .22s;
}
.doc-card:hover .doc-card-icon { background: var(--red); color: #fff; }
.doc-card h3 { font-size: 0.92rem; font-weight: 700; color: var(--dark); }
.doc-card p { font-size: 0.8rem; color: var(--gray); line-height: 1.5; }

/* FEATURED */
.doc-featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.doc-featured-card {
  border-radius: var(--radius-lg);
  padding: 24px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all .25s;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  min-height: 170px;
}
.doc-featured-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feat-grad-1 { background: linear-gradient(135deg, #1a0505 0%, #2a0808 100%); }
.feat-grad-2 { background: linear-gradient(135deg, #0d1f0d 0%, #082008 100%); }
.feat-grad-3 { background: linear-gradient(135deg, #0d0a1a 0%, #10082a 100%); }
.feat-grad-4 { background: linear-gradient(135deg, #001020 0%, #001530 100%); }
.feat-grad-5 { background: linear-gradient(135deg, #1a0d00 0%, #1f1000 100%); }
.doc-feat-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(229,57,53,0.2);
  border: 1px solid rgba(229,57,53,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--red);
}
.doc-featured-card h3 { font-size: 1.05rem; font-weight: 800; }
.doc-featured-card p { font-size: 0.82rem; color: rgba(255,255,255,0.6); line-height: 1.5; flex: 1; }
.doc-feat-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap .2s;
}
.doc-featured-card:hover .doc-feat-link { gap: 9px; }

/* QUICK LINKS */
.doc-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.doc-quick-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dark);
  box-shadow: var(--shadow-sm);
  transition: all .2s;
}
.doc-quick-card i {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: rgba(229,57,53,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  font-size: 0.95rem;
  transition: all .2s;
}
.doc-quick-card:hover { border-color: var(--red); transform: translateX(4px); box-shadow: 0 4px 16px rgba(229,57,53,0.1); }
.doc-quick-card:hover i { background: var(--red); color: #fff; }

/* NO RESULTS */
.doc-no-results {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 60px 20px;
  color: var(--gray);
}
.doc-no-results.show { display: flex; }
.doc-no-results i { font-size: 2rem; color: var(--border); }
.doc-no-results p { font-size: 0.9rem; }

/* ── HELP ── */
.doc-help { background: #fff; }
.doc-help-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.doc-help-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all .25s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.doc-help-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: rgba(229,57,53,0.2); }
.doc-help-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: rgba(229,57,53,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--red);
  transition: all .25s;
}
.doc-help-card:hover .doc-help-icon { background: var(--red); color: #fff; transform: rotate(-6deg) scale(1.05); }
.doc-help-card h3 { font-size: 0.95rem; font-weight: 700; color: var(--dark); }
.doc-help-card p { font-size: 0.8rem; color: var(--gray); line-height: 1.5; }

/* ── ANIMATIONS ── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .5s ease, transform .5s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ── */
@media(max-width:1100px) {
  .doc-featured-grid { grid-template-columns: repeat(2, 1fr); }
  .doc-quick-grid { grid-template-columns: repeat(2, 1fr); }
  .doc-help-grid { grid-template-columns: repeat(2, 1fr); }
}
@media(max-width:900px) {
  .doc-layout-inner { grid-template-columns: 1fr; }
  .doc-sidebar {
    position: fixed;
    top: 0; left: 0;
    width: 280px;
    height: 100vh;
    z-index: 1500;
    transform: translateX(-100%);
    transition: transform .3s ease;
    padding: 0;
  }
  .doc-sidebar.open { transform: translateX(0); }
  .doc-sidebar-inner {
    position: relative;
    top: 0;
    height: 100vh;
    max-height: none;
    border-radius: 0;
    padding-top: 80px;
  }
  .doc-sidebar-toggle { display: inline-flex; }
  .doc-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1400;
  }
  .doc-sidebar-backdrop.show { display: block; }
}
@media(max-width:768px) {
  .doc-hero-title { font-size: 2.1rem; }
  .doc-hero { padding: 100px 0 48px; }
  .doc-search { flex-wrap: wrap; }
  .doc-search-btn { width: 100%; }
  .doc-cards { grid-template-columns: 1fr; }
  .doc-featured-grid { grid-template-columns: 1fr; }
  .doc-quick-grid { grid-template-columns: 1fr; }
  .doc-help-grid { grid-template-columns: 1fr 1fr; }
}
@media(max-width:480px) {
  .doc-hero-title { font-size: 1.8rem; }
  .doc-help-grid { grid-template-columns: 1fr; }
}