/* ========================================================
   RDMA Blog & Wiki - Tactical Dark Cyber Identity CSS
   ======================================================== */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-deep: #020D2A;
  --bg-surface: #061638;
  --bg-card: #081B45;
  --border-color: #0F2D6B;
  --border-glow: #1D4ED8;
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --cyan: #38BDF8;
  --cyan-glow: rgba(56, 189, 248, 0.2);
  --text-main: #FFFFFF;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --success: #10B981;
  --radius: 14px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-main);
  line-height: 1.8;
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(37, 99, 235, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(56, 189, 248, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(2, 13, 42, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-badge {
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 0;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 2px;
  background: var(--cyan);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #1E40AF, #2563EB);
  color: #fff;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.25);
  transition: all 0.25s ease;
}

.btn-store:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.35);
  border-color: var(--cyan);
}

/* Hero Section */
.hero {
  padding: 65px 0 45px;
  text-align: center;
  position: relative;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 45, 107, 0.4);
  border: 1px solid var(--border-color);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--cyan);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 18px;
  background: linear-gradient(180deg, #FFFFFF 30%, #94A3B8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 35px;
}

/* Search & Filters */
.search-bar-wrap {
  max-width: 600px;
  margin: 0 auto 40px;
  position: relative;
}

.search-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px 22px 16px 50px;
  color: var(--text-main);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 20px var(--cyan-glow);
}

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 1.2rem;
}

.categories-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 50px;
}

.category-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-chip:hover, .category-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--cyan);
}

/* Articles Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 28px;
  margin-bottom: 70px;
}

.article-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  position: relative;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: var(--cyan);
  box-shadow: 0 12px 30px rgba(15, 45, 107, 0.4);
}

.article-card-header {
  padding: 24px 24px 12px;
}

.article-category {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cyan);
  background: rgba(56, 189, 248, 0.1);
  padding: 4px 12px;
  border-radius: 6px;
  margin-bottom: 14px;
}

.article-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text-main);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-title a:hover {
  color: var(--cyan);
}

.article-card-excerpt {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
  padding: 0 24px 20px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(15, 45, 107, 0.4);
  background: rgba(2, 13, 42, 0.4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.read-more-btn {
  color: var(--cyan);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.read-more-btn:hover {
  color: #fff;
}

/* Article View Page */
.article-header {
  padding: 50px 0 35px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 40px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--cyan);
}

.article-main-title {
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 20px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  margin-bottom: 80px;
}

.article-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 40px;
  font-size: 1.05rem;
}

.article-content h2 {
  font-size: 1.55rem;
  font-weight: 700;
  margin: 40px 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  color: var(--cyan);
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 28px 0 12px;
  color: #fff;
}

.article-content p {
  margin-bottom: 20px;
  color: #E2E8F0;
}

.article-content .lead {
  font-size: 1.15rem;
  color: #F8FAFC;
  font-weight: 500;
}

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

.article-content li {
  margin-bottom: 10px;
  color: #CBD5E1;
}

.article-content strong {
  color: #FFFFFF;
}

/* Sidebar CTA Box */
.sidebar-sticky {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cta-product-card {
  background: linear-gradient(145deg, #081B45, #04102C);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.cta-tag {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 14px;
}

.cta-title {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 12px;
}

.cta-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.cta-features {
  list-style: none;
  margin-bottom: 22px;
  font-size: 0.88rem;
}

.cta-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #E2E8F0;
}

.cta-features li::before {
  content: '✓';
  color: var(--success);
  font-weight: bold;
}

.cta-price-box {
  background: rgba(2, 13, 42, 0.6);
  border: 1px solid var(--border-color);
  padding: 14px;
  border-radius: 10px;
  margin-bottom: 18px;
  text-align: center;
}

.cta-price-main {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--cyan);
}

.cta-price-tamara {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.cta-btn-action {
  display: block;
  text-align: center;
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  color: #fff;
  font-weight: 700;
  padding: 14px;
  border-radius: 10px;
  font-size: 0.95rem;
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35);
  transition: all 0.2s ease;
}

.cta-btn-action:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(56, 189, 248, 0.4);
}

/* Footer */
.site-footer {
  background: #01081B;
  border-top: 1px solid var(--border-color);
  padding: 60px 0 30px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-about p {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 420px;
  margin-top: 14px;
}

.footer-col h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 18px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--cyan);
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(15, 45, 107, 0.5);
  padding-top: 24px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* Responsive */
@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
  .sidebar-sticky {
    position: static;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .nav-menu {
    display: none;
  }
}


/* ========================================================
   RDMA Documentation & Wiki Layout Styles
   ======================================================== */

.docs-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

.docs-wrapper {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr) 300px;
  gap: 32px;
  align-items: start;
  padding: 32px 0 60px;
}

/* Docs Sidebar */
.docs-sidebar {
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.docs-sidebar::-webkit-scrollbar {
  width: 5px;
}

.docs-sidebar::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.docs-sidebar-header {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(15, 45, 107, 0.6);
}

.docs-sidebar-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.docs-count-badge {
  background: rgba(56, 189, 248, 0.15);
  color: var(--cyan);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 700;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.docs-filter-box {
  position: relative;
  margin-bottom: 18px;
}

.docs-filter-input {
  width: 100%;
  padding: 10px 36px 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.docs-filter-input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 12px var(--cyan-glow);
}

.docs-filter-icon {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  font-size: 0.85rem;
  opacity: 0.6;
}

.docs-cat-group {
  margin-bottom: 20px;
}

.docs-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(15, 45, 107, 0.35);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #E2E8F0;
  margin-bottom: 8px;
  border-right: 3px solid var(--cyan);
}

.docs-cat-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.docs-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.docs-nav-item {
  margin-bottom: 4px;
}

.docs-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.15s ease;
  line-height: 1.4;
}

.docs-nav-link:hover {
  background: rgba(37, 99, 235, 0.15);
  color: #fff;
  transform: translateX(-3px);
}

.docs-nav-link.active {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.3), rgba(56, 189, 248, 0.1));
  color: var(--cyan);
  font-weight: 700;
  border-right: 2px solid var(--cyan);
}

.docs-num-pill {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-family: monospace;
}

/* Docs Main Content */
.docs-main-article {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 36px 40px;
  min-height: 80vh;
}

.docs-article-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.docs-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.docs-breadcrumbs a:hover {
  color: var(--cyan);
}

.docs-title {
  font-size: 1.95rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.35;
  margin-bottom: 12px;
}

.docs-meta-row {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Rich Content Elements in Docs */
.docs-body {
  font-size: 1.02rem;
  line-height: 1.9;
  color: #E2E8F0;
}

.docs-body h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  margin: 36px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(15, 45, 107, 0.6);
  display: flex;
  align-items: center;
  gap: 10px;
}

.docs-body h2::before {
  content: '◈';
  color: var(--cyan);
  font-size: 1.1rem;
}

.docs-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--cyan);
  margin: 24px 0 12px;
}

.docs-body p {
  margin-bottom: 16px;
}

.docs-body ul, .docs-body ol {
  margin-bottom: 20px;
  padding-right: 24px;
}

.docs-body li {
  margin-bottom: 8px;
}

.docs-body blockquote {
  background: rgba(37, 99, 235, 0.08);
  border-right: 4px solid var(--cyan);
  padding: 16px 20px;
  border-radius: 0 10px 10px 0;
  margin: 24px 0;
  color: #CBD5E1;
}

.docs-body blockquote strong {
  color: var(--cyan);
}

.docs-body strong {
  color: #fff;
  font-weight: 700;
}

.docs-body code {
  background: rgba(8, 27, 69, 0.9);
  border: 1px solid var(--border-color);
  color: #38BDF8;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: Consolas, 'Courier New', monospace;
  font-size: 0.9em;
}

.docs-body pre {
  background: #01081B;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 18px 20px;
  overflow-x: auto;
  margin: 20px 0;
  direction: ltr;
  text-align: left;
}

.docs-body pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: #7DD3FC;
  font-size: 0.92rem;
}

.book-attached-file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #1E3A8A, #2563EB);
  color: #fff !important;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  margin: 10px 0;
  transition: all 0.2s ease;
}

.book-attached-file:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.4);
}

/* Pagination: Next & Prev buttons */
.docs-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 50px;
  padding-top: 28px;
  border-top: 1px solid var(--border-color);
}

.docs-page-btn {
  display: flex;
  flex-direction: column;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  flex: 1;
  max-width: 320px;
  transition: all 0.2s ease;
}

.docs-page-btn:hover {
  border-color: var(--cyan);
  background: rgba(15, 45, 107, 0.4);
  transform: translateY(-2px);
}

.docs-page-btn.prev {
  text-align: right;
}

.docs-page-btn.next {
  text-align: left;
  margin-right: auto;
}

.docs-btn-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.docs-btn-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Docs Index Page Specific */
.docs-index-hero {
  text-align: center;
  padding: 50px 0 30px;
}

.docs-index-hero h1 {
  font-size: 2.3rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 14px;
}

.docs-index-hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 680px;
  margin: 0 auto 30px;
}

.docs-grid-cats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 24px;
  margin-top: 30px;
}

.docs-cat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.docs-cat-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.docs-cat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 12px 30px rgba(2, 13, 42, 0.6);
}

.docs-cat-card:hover::before {
  opacity: 1;
}

.docs-cat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.docs-cat-card-icon {
  font-size: 2rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.15);
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.docs-cat-card-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}

.docs-cat-card-links {
  list-style: none;
  padding: 0;
  margin-top: 14px;
}

.docs-cat-card-links li {
  margin-bottom: 8px;
}

.docs-cat-card-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.92rem;
  padding: 6px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.docs-cat-card-links a:hover {
  background: rgba(37, 99, 235, 0.15);
  color: var(--cyan);
  transform: translateX(-4px);
}

@media (max-width: 1100px) {
  .docs-wrapper {
    grid-template-columns: 260px 1fr;
  }
  .docs-wrapper .sidebar-sticky {
    display: none;
  }
}

@media (max-width: 800px) {
  .docs-wrapper {
    grid-template-columns: 1fr;
  }
  .docs-sidebar {
    position: static;
    max-height: none;
    margin-bottom: 24px;
  }
  .docs-main-article {
    padding: 24px 20px;
  }
}
