/* ============================================================
   resources.css — Resources Documentation Engine
   ============================================================ */

:root {
  --docs-bg: #071019;
  --docs-panel: rgba(10, 21, 34, 0.9);
  --docs-line: rgba(255,255,255,0.08);
  --docs-line-strong: rgba(255,255,255,0.14);
  --docs-muted: #93a7bb;
  --docs-orange: #ff6a00;
  --docs-orange-2: #ff944d;
  --docs-cyan: #39d0ff;
  --docs-green: #2ee6a6;
  --docs-yellow: #ffd166;
  --docs-red: #ff6b6b;
  --docs-radius: 18px;
  --docs-radius-lg: 24px;
}

/* ── Atmospheric Background ──────────────────────────────── */
.resources-atmosphere {
  background: 
    radial-gradient(circle at 20% 0%, rgba(255, 106, 0, 0.15), transparent 35%),
    radial-gradient(circle at 85% 12%, rgba(57, 208, 255, 0.1), transparent 28%),
    linear-gradient(180deg, #050b12 0%, #071019 40%, #050c13 100%);
  min-height: 100vh;
  min-height: 100dvh;
}

/* ── Docs Shell Grid ─────────────────────────────────────── */
.docs-shell {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  min-height: 800px;
  border-top: 1px solid var(--docs-line);
}

/* ── Sidebar ─────────────────────────────────────────────── */
.docs-sidebar {
  border-right: 1px solid var(--docs-line);
  background: rgba(255,255,255,0.01);
  padding: 32px 24px;
  position: sticky;
  top: 80px; /* Offset for main nav */
  height: calc(100vh - 80px);
  height: calc(100dvh - 80px);
  overflow-y: auto;
}

.nav-group { margin-bottom: 32px; }
.nav-group h4 {
  margin: 0 0 14px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8aa0b7;
  padding: 0 12px;
}

.nav-item {
  display: flex; 
  align-items: center; 
  justify-content: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  color: #dce7f1;
  transition: 0.2s ease;
  margin-bottom: 4px;
  text-decoration: none;
}

.nav-item:hover, .nav-item.active {
  background: linear-gradient(90deg, rgba(255,106,0,0.12), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,106,0,0.16);
  color: #fff;
}

.nav-item small { margin-left: auto; color: #7f95ab; font-size: 11px; }

.nav-item.sub-item {
  padding-left: 32px;
  font-size: 13px;
  opacity: 0.85;
}


/* ── Main Content Area ───────────────────────────────────── */
.docs-content {
  padding: 48px 64px 80px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
}

/* 28px Law: Mandatory Buffer */
.breadcrumb {
  color: #8ca3b8;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.article-title {
  margin: 0 0 28px !important;
  line-height: 1.1;
}

.article-meta {
  display: flex; 
  flex-wrap: wrap; 
  gap: 10px 16px;
  margin-bottom: 28px;
  color: var(--docs-muted); 
  font-size: 13px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--docs-line);
}

/* ── Typography Calibration ──────────────────────────────── */
.article-body {
  color: #c7d5e2; 
  line-height: 1.8; 
  font-size: 16px;
}

.article-body p { margin-bottom: 1.6em; }
.article-body h2 { margin-top: 48px; margin-bottom: 20px; font-size: 32px; letter-spacing: -0.03em; color: #fff; }
.article-body h3 { margin-top: 32px; margin-bottom: 16px; font-size: 24px; letter-spacing: -0.02em; color: #fff; }


/* ── Knowledge Taxonomy Cards ───────────────────────────── */
.taxonomy-card {
  padding: 24px;
  border: 1px solid var(--docs-line);
  border-radius: 20px;
  background: rgba(255,255,255,0.02);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  height: 100%;
}
.taxonomy-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 148, 77, 0.25);
  background: linear-gradient(180deg, rgba(255, 148, 77, 0.05), rgba(255, 255, 255, 0.02));
}
.taxonomy-card strong { display: block; margin-bottom: 12px; font-size: 18px; }
.taxonomy-card p { margin-bottom: 16px; font-size: 14px; line-height: 1.6; color: var(--docs-muted); }
.taxonomy-card ul { margin: 0; padding-left: 18px; list-style-type: circle; }
.taxonomy-card ul li { margin-bottom: 8px; font-size: 13px; color: #d7e3ee; }
.taxonomy-card ul li a { color: inherit; text-decoration: none; transition: color 0.2s; }
.taxonomy-card ul li a:hover { color: var(--docs-orange-2); }

/* ── MDX Components ──────────────────────────────────────── */

.callout {
  margin: 28px 0; /* Enforced 28px Law for breathing room */
  padding: 20px 24px;
  border-radius: 18px;
  border: 1px solid var(--docs-line-strong);
  background: rgba(255,255,255,0.03);
  position: relative;
  overflow: hidden;
}

.callout:before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--docs-orange), var(--docs-orange-2));
}

.callout.info:before { background: linear-gradient(180deg, var(--docs-cyan), #77e0ff); }
.callout.success:before { background: linear-gradient(180deg, var(--docs-green), #9effd8); }
.callout.warn:before { background: linear-gradient(180deg, var(--docs-yellow), #ffe4a3); }
.callout.danger:before { background: linear-gradient(180deg, var(--docs-red), #ff9b9b); }

.callout strong { display: block; margin: 0 0 8px 0; font-size: 15px; color: #fff; }
.callout p { margin: 0; font-size: 14px; color: #cad9e7; line-height: 1.6; }

.code-block {
  background: #06111b;
  border: 1px solid rgba(57,208,255,0.14);
  border-radius: 18px;
  overflow: hidden;
  margin: 32px 0;
}

.code-top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(57,208,255,0.05);
  font-size: 12px; color: #9cc8d9;
  letter-spacing: 0.08em; text-transform: uppercase;
}

.copy-btn {
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: #fff; border-radius: 10px;
  padding: 6px 12px; font-size: 11px; cursor: pointer;
  transition: background 0.2s;
}

.copy-btn:hover { background: rgba(255,255,255,0.08); }

pre {
  margin: 0; 
  padding: 24px; 
  overflow: auto; 
  font-size: 13.5px; 
  line-height: 1.7; 
  font-family: var(--font-mono); 
  color: #d4e7ff;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1280px) {
  .docs-shell { grid-template-columns: 260px minmax(0, 1fr); }
  .docs-content { padding: 40px 48px; }
}

@media (max-width: 991px) {
  .docs-shell { grid-template-columns: 1fr; }
  .docs-sidebar { display: none; }
  .docs-content { padding: 32px 24px; }
}

/* ── Legacy Landing Page Compatibility ───────────────────── */
.split {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

@media (max-width: 991px) {
  .split { flex-direction: column; gap: 24px; }
}

.featured-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.resource-search-wrapper { max-width: 600px; margin: 32px auto 0; position: relative; }

.resource-search-input {
  width: 100%; padding: 16px 20px 16px 52px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff; font-size: 16px; transition: 0.2s ease;
}
.resource-search-icon { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--docs-muted); pointer-events: none; }

/* ── Performance: Content Visibility ─────────────────────── */
.reveal {
  content-visibility: auto;
  contain-intrinsic-size: 0 500px;
}

    .video-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
        margin-top: 32px;
    }

    .video-card {
        text-decoration: none;
        transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
        position: relative;
        overflow: hidden;
    }

    .video-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    }

    .video-thumb {
        position: relative;
        aspect-ratio: 16/9;
        border-radius: 12px;
        overflow: hidden;
        margin-bottom: 16px;
        border: 1px solid rgba(255,255,255,0.08);
    }

    .video-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s ease;
    }

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

    .play-overlay {
        position: absolute;
        inset: 0;
        background: rgba(0,0,0,0.3);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .video-card:hover .play-overlay {
        opacity: 1;
    }

    .play-btn {
        width: 54px;
        height: 54px;
        background: var(--orange2);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        box-shadow: 0 10px 20px rgba(255,102,0,0.4);
        transform: scale(0.8);
        transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .video-card:hover .play-btn {
        transform: scale(1);
    }

    .video-info h4 {
        margin: 0 0 8px;
        font-size: 16px;
        line-height: 1.4;
        color: var(--text);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .video-meta {
        font-size: 13px;
        color: var(--muted);
    }

    @media (max-width: 992px) {
        .video-grid { grid-template-columns: repeat(2, 1fr); }
    }
    @media (max-width: 600px) {
        .video-grid { grid-template-columns: 1fr; }
    }

/* ── Blog & Resource Scoped Components ── */
:root {
  --wg-navy: #080E1A;
  --wg-blue: #192F56;
  --wg-blue-2: #3B4561;
  --wg-orange: #FF6600;
  --wg-orange-soft: #FF8A33;
  --wg-text: #EAF1FF;
  --wg-muted: #9BA8C1;
  --wg-border: rgba(255, 255, 255, 0.11);
  --wg-glass: rgba(14, 24, 43, 0.72);
  --wg-glass-2: rgba(25, 47, 86, 0.45);
  --wg-card: rgba(11, 19, 35, 0.86);
}

.control-panel {
  margin: 32px 0 34px;
  padding: 18px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.035));
  border: 1px solid var(--wg-border);
  box-shadow: 0 24px 90px rgba(0,0,0,0.32);
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr auto;
  gap: 12px;
}

.resource-tabs {
  margin-top: 54px;
  display: grid;
  grid-template-columns: repeat(8, minmax(110px, 1fr));
  gap: 10px;
}
.resource-tabs a {
  text-align: center;
  padding: 13px 10px;
  border-radius: 16px;
  color: var(--wg-muted);
  border: 1px solid var(--wg-border);
  background: rgba(255,255,255,0.035);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.resource-tabs a.active, .resource-tabs a:hover {
  color: #fff;
  border-color: rgba(255,102,0,0.5);
  background: rgba(255,102,0,0.11);
}

.input, .select {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(8,14,26,0.76);
  color: #fff;
  border-radius: 18px;
  padding: 15px 16px;
  outline: none;
  font-size: 14px;
}
.input::placeholder { color: rgba(234,241,255,0.5); }

.main-grid {
  display: grid;
  grid-template-columns: 1.8fr 0.92fr;
  gap: 26px;
  align-items: start;
}

.featured-card {
  min-height: 430px;
  border-radius: 34px;
  padding: 34px;
  border: 1px solid rgba(255,255,255,0.13);
  background:
    linear-gradient(135deg, rgba(25,47,86,0.74), rgba(8,14,26,0.9)),
    radial-gradient(circle at 80% 15%, rgba(255,102,0,0.25), transparent 26%);
  box-shadow: 0 30px 120px rgba(0,0,0,0.38);
  position: relative;
  overflow: hidden;
}

.featured-card::after {
  content: "";
  position: absolute;
  right: -100px;
  bottom: -100px;
  width: 310px;
  height: 310px;
  border: 1px solid rgba(255,102,0,0.24);
  border-radius: 50%;
  box-shadow: inset 0 0 70px rgba(255,102,0,0.08), 0 0 90px rgba(255,102,0,0.12);
}

.tag {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255,102,0,0.12);
  color: #FFD2B8;
  border: 1px solid rgba(255,102,0,0.28);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.meta {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: rgba(234,241,255,0.72);
  font-size: 13px;
}
.meta span { padding: 8px 12px; border: 1px solid var(--wg-border); border-radius: 999px; background: rgba(255,255,255,0.04); }

.side-panel {
  border-radius: 30px;
  padding: 24px;
  background: var(--wg-glass);
  border: 1px solid var(--wg-border);
  box-shadow: 0 30px 90px rgba(0,0,0,0.28);
}
.side-panel h3 { margin: 0 0 18px; font-size: 20px; }

.topic-list { display: grid; gap: 10px; }
.topic-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(255,255,255,0.035);
  color: var(--wg-muted);
  font-weight: 700;
  font-size: 14px;
}
.topic-item strong { color: #fff; }
.topic-item small { color: rgba(255,255,255,0.45); }

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.article-card {
  border-radius: 26px;
  overflow: hidden;
  background: var(--wg-card);
  border: 1px solid var(--wg-border);
  box-shadow: 0 20px 65px rgba(0,0,0,0.24);
  transition: transform .2s ease, border-color .2s ease;
}
.article-card:hover { transform: translateY(-4px); border-color: rgba(255,102,0,0.42); }

.thumb {
  height: 160px;
  background:
    radial-gradient(circle at 70% 20%, rgba(255,102,0,0.33), transparent 24%),
    linear-gradient(135deg, rgba(25,47,86,0.96), rgba(8,14,26,0.9));
  position: relative;
  overflow: hidden;
}
.thumb::before {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 22px;
  background-image: linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px), linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 28px 28px;
}

.article-body { padding: 22px; }
.article-body h3 { margin: 14px 0 10px; line-height: 1.25; font-size: 19px; letter-spacing: -0.02em; }
.article-body p { margin: 0; color: var(--wg-muted); line-height: 1.62; font-size: 14px; }

.article-foot {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: rgba(234,241,255,0.58);
  font-size: 12px;
  font-weight: 700;
}

.library-layout {
  margin-top: 54px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}

.filter-sidebar {
  position: sticky;
  top: 96px;
  border-radius: 28px;
  padding: 22px;
  border: 1px solid var(--wg-border);
  background: rgba(8,14,26,0.72);
}

.filter-group { margin-bottom: 24px; }
.filter-group h4 { margin: 0 0 12px; color: rgba(234,241,255,0.78); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; }
.filter-group .check {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--wg-muted);
    margin: 10px 0;
    font-size: 14px;
    cursor: pointer;
}
.filter-group .check input[type="checkbox"] {
    accent-color: var(--wg-orange);
    width: auto !important;
    flex-shrink: 0;
    margin: 0;
    display: inline-block !important;
}


.library-list { display: grid; gap: 14px; }
.list-card {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid var(--wg-border);
  background: rgba(255,255,255,0.035);
  transition: border-color .2s ease, background .2s ease;
}
.list-card:hover { border-color: rgba(255,102,0,0.38); background: rgba(255,255,255,0.055); }

.mini-thumb { height: 92px; border-radius: 18px; background: linear-gradient(135deg, rgba(25,47,86,0.95), rgba(255,102,0,0.15)); border: 1px solid rgba(255,255,255,0.08); }
.list-card h3 { margin: 8px 0 8px; font-size: 19px; letter-spacing: -0.02em; }
.list-card p { margin: 0; color: var(--wg-muted); line-height: 1.55; font-size: 14px; max-width: 670px; }
.read-link { color: #FFD2B8; font-weight: 800; font-size: 13px; white-space: nowrap; }

.pagination {
  margin: 30px 0 76px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.page-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--wg-border);
  background: rgba(255,255,255,0.04);
  color: var(--wg-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
.page-btn.active { background: var(--wg-orange); color: #fff; border-color: var(--wg-orange); }

.section-head {
  margin: 54px 0 22px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}
.section-head h2 { margin: 0; font-size: 34px; letter-spacing: -0.035em; }
.section-head p { margin: 8px 0 0; color: var(--wg-muted); }

@media (max-width: 1060px) {
  .resource-tabs { grid-template-columns: repeat(4, 1fr); }
  .control-panel { grid-template-columns: 1fr 1fr; }
  .main-grid, .library-layout { grid-template-columns: 1fr; }
  .filter-sidebar { position: static; }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .resource-tabs { grid-template-columns: repeat(2, 1fr); }
  .control-panel { grid-template-columns: 1fr; }
  .article-grid { grid-template-columns: 1fr; }
  .list-card { grid-template-columns: 1fr; }
  .mini-thumb { height: 130px; }
  .featured-card { padding: 24px; min-height: auto; }
}

/* pulse-dot animation styling */
.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--wg-orange, #FF6600);
  border-radius: 50%;
  box-shadow: 0 0 16px var(--wg-orange, #FF6600);
  animation: pulse-dot-anim 1.4s ease-in-out infinite;
  display: inline-block;
  flex-shrink: 0;
}
@keyframes pulse-dot-anim {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.55; }
}

/* ── Strict Specificity Overrides ── */
.resource-tabs a,
.topic-item,
.read-link,
.nav__pill {
    text-decoration: none !important;
    color: inherit;
}
.resource-tabs a:hover,
.topic-item:hover {
    text-decoration: none !important;
}