/* =========================================================
   Content pages (guide/, insights/) — reading-optimized
   3-column layout with mini-hero
   ========================================================= */

.xc-content {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px 64px;
  display: grid;
  grid-template-columns: 240px minmax(0, 760px) 220px;
  gap: 48px;
  align-items: start;
}

/* On narrower viewports, drop the sidebars */
@media (max-width: 1280px) {
  .xc-content { grid-template-columns: 220px minmax(0, 1fr); gap: 32px; max-width: 1100px; }
  .xc-content .xc-toc { display: none; }
}

@media (max-width: 960px) {
  .xc-content { grid-template-columns: 1fr; gap: 0; padding: 0 16px 48px; }
  .xc-content .xc-sidebar { display: none; }
}

/* ─── Mini hero (top of each article) ─── */

.xc-mini-hero {
  grid-column: 1 / -1;
  margin: 0 -24px 32px;
  padding: 48px 24px 36px;
  background: linear-gradient(180deg,
              rgba(15, 32, 48, 0.95) 0%,
              rgba(10, 22, 32, 0.85) 100%);
  border-bottom: 1px solid var(--xc-border);
  border-top: 1px solid var(--xc-border);
  position: relative;
  overflow: hidden;
}

.xc-mini-hero::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
              transparent 0%,
              var(--xc-accent) 50%,
              transparent 100%);
  opacity: 0.6;
}

.xc-mini-hero-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}

.xc-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--xc-accent);
  margin-bottom: 14px;
}

.xc-tag span {
  color: var(--xc-text-muted);
  margin: 0 8px;
}

.xc-mini-hero h1 {
  font-size: 2rem !important;
  font-weight: 700 !important;
  color: var(--xc-text) !important;
  margin: 0 0 16px !important;
  line-height: 1.2 !important;
  letter-spacing: -0.01em !important;
  display: block !important;
}

.xc-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--xc-text-muted);
}

.xc-meta strong {
  color: var(--xc-text-soft);
  font-weight: 500;
}

/* ─── Sidebar (left, in-section navigation) ─── */

.xc-sidebar {
  position: sticky;
  top: 88px;
  font-size: 0.88rem;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding-right: 8px;
}

.xc-sidebar h4 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--xc-text-muted);
  margin: 0 0 12px;
}

.xc-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.xc-sidebar li {
  margin: 0;
  padding: 0;
}

.xc-sidebar a {
  display: block;
  padding: 6px 10px;
  color: var(--xc-text-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  border-radius: 0 4px 4px 0;
  transition: all 0.15s ease;
}

.xc-sidebar a:hover {
  color: var(--xc-text);
  background: var(--xc-bg-card);
  border-left-color: var(--xc-border-hi);
}

.xc-sidebar a.active {
  color: var(--xc-accent);
  background: var(--xc-accent-soft);
  border-left-color: var(--xc-accent);
}

/* ─── TOC (right, in-page) ─── */

.xc-toc {
  position: sticky;
  top: 88px;
  font-size: 0.82rem;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding-left: 16px;
  border-left: 1px solid var(--xc-border);
}

.xc-toc h4 {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--xc-text-muted);
  margin: 0 0 12px;
}

.xc-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.xc-toc li {
  margin: 0;
  line-height: 1.5;
}

.xc-toc a {
  display: block;
  padding: 5px 0;
  color: var(--xc-text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.xc-toc a:hover { color: var(--xc-text); }
.xc-toc a.active { color: var(--xc-accent); }
.xc-toc .toc-h3 { padding-left: 12px; font-size: 0.78rem; }

/* ─── Article body (middle column) ─── */

.xc-content .md-typeset,
.xc-content > *:not(.xc-mini-hero):not(.xc-sidebar):not(.xc-toc) {
  grid-column: 2;
}

.xc-content > h1:first-of-type { display: none; }

.xc-content .md-typeset h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--xc-text);
  margin: 2.8rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--xc-border);
  scroll-margin-top: 88px;
}

.xc-content .md-typeset h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--xc-text);
  margin: 2rem 0 0.8rem;
  scroll-margin-top: 88px;
}

.xc-content .md-typeset p,
.xc-content .md-typeset li {
  color: var(--xc-text-soft);
  line-height: 1.75;
  font-size: 0.95rem;
}

.xc-content .md-typeset strong {
  color: var(--xc-text);
  font-weight: 600;
}

.xc-content .md-typeset a {
  color: var(--xc-accent);
  text-decoration: none;
  border-bottom: 1px dashed rgba(0, 188, 212, 0.4);
  transition: all 0.15s ease;
}

.xc-content .md-typeset a:hover {
  color: var(--xc-accent-hi);
  border-bottom-color: var(--xc-accent-hi);
}

/* ─── Code blocks ─── */

.xc-content .md-typeset code {
  background: rgba(0, 188, 212, 0.1);
  color: var(--xc-accent-hi);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.86em;
  border: 1px solid rgba(0, 188, 212, 0.15);
}

.xc-content .md-typeset pre code {
  background: transparent;
  border: none;
  color: var(--xc-text);
  padding: 0;
}

.xc-content .md-typeset pre {
  background: #0a1620;
  border: 1px solid var(--xc-border);
  border-radius: 8px;
  padding: 0;
}

.xc-content .md-typeset .highlight {
  background: transparent;
}

/* ─── Tables ─── */

.xc-content .md-typeset table:not([class]) {
  background: var(--xc-bg-card);
  border: 1px solid var(--xc-border);
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.9rem;
  display: table;
  width: 100%;
}

.xc-content .md-typeset table:not([class]) th {
  background: rgba(0, 188, 212, 0.08);
  color: var(--xc-text);
  font-weight: 600;
  padding: 12px 14px;
  border-bottom: 1px solid var(--xc-border);
}

.xc-content .md-typeset table:not([class]) td {
  color: var(--xc-text-soft);
  padding: 10px 14px;
  border-bottom: 1px solid var(--xc-border);
}

.xc-content .md-typeset table:not([class]) tr:last-child td {
  border-bottom: none;
}

.xc-content .md-typeset table:not([class]) code {
  background: rgba(255, 255, 255, 0.05);
  color: var(--xc-accent-hi);
}

/* ─── Admonitions (info/tip/warning/danger) ─── */

.xc-content .md-typeset .admonition,
.xc-content .md-typeset details {
  background: var(--xc-bg-card);
  border: 1px solid var(--xc-border);
  border-left-width: 4px;
  border-radius: 6px;
  font-size: 0.9rem;
  box-shadow: none;
}

.xc-content .md-typeset .admonition.note,
.xc-content .md-typeset .admonition.info,
.xc-content .md-typeset details.note,
.xc-content .md-typeset details.info {
  border-left-color: #5dadec;
}

.xc-content .md-typeset .admonition.tip,
.xc-content .md-typeset details.tip {
  border-left-color: var(--xc-accent);
}

.xc-content .md-typeset .admonition.warning,
.xc-content .md-typeset details.warning {
  border-left-color: #ffa726;
}

.xc-content .md-typeset .admonition.danger,
.xc-content .md-typeset details.danger {
  border-left-color: #ef5350;
}

.xc-content .md-typeset .admonition-title {
  color: var(--xc-text);
  background: rgba(255, 255, 255, 0.03);
  font-weight: 600;
}

/* ─── Images ─── */

.xc-content .md-typeset img {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--xc-border);
  margin: 1.2rem 0;
}

/* ─── Page meta (last updated, prev/next) ─── */

.xc-page-meta {
  grid-column: 2;
  margin-top: 4rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--xc-border);
  font-size: 0.78rem;
  color: var(--xc-text-muted);
  letter-spacing: 0.04em;
}

/* ─── Guide landing page — featured article + cards grid ─── */

.xc-guide-featured {
  max-width: 1100px;
  margin: 2rem auto 3rem;
  padding: 36px 32px;
  background: linear-gradient(135deg,
              rgba(0, 188, 212, 0.06) 0%,
              rgba(7, 18, 26, 0.4) 100%);
  border: 1px solid rgba(0, 188, 212, 0.25);
  border-radius: 16px;
}

.xc-guide-featured .xc-tag {
  margin-bottom: 12px;
}

.xc-guide-featured h2 {
  font-size: 1.8rem !important;
  margin: 0 0 12px !important;
  color: var(--xc-text) !important;
  border: none !important;
  padding: 0 !important;
}

.xc-guide-featured p {
  color: var(--xc-text-soft);
  margin-bottom: 1.4rem;
  line-height: 1.7;
}

.xc-guide-grid {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.xc-guide-card {
  background: var(--xc-bg-card);
  border: 1px solid var(--xc-border);
  border-radius: 12px;
  padding: 1.4rem 1.5rem;
  transition: all 0.2s ease;
  text-decoration: none !important;
  display: block;
  color: inherit !important;
}

.xc-guide-card:hover {
  border-color: rgba(0, 188, 212, 0.4);
  background: var(--xc-bg-card-hi);
  transform: translateY(-2px);
}

.xc-guide-card .xc-tag {
  margin-bottom: 8px;
  font-size: 0.68rem;
}

.xc-guide-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--xc-text);
  margin: 0 0 8px;
}

.xc-guide-card p {
  font-size: 0.85rem;
  color: var(--xc-text-muted);
  line-height: 1.55;
  margin: 0;
}

/* Sub-section divider in sidebar */
.xc-sidebar .xc-side-group {
  margin-bottom: 18px;
}

/* Mobile content tweaks */
@media (max-width: 768px) {
  .xc-mini-hero {
    margin: 0 -16px 24px;
    padding: 32px 16px 28px;
  }
  .xc-mini-hero h1 { font-size: 1.5rem !important; }
  .xc-meta { gap: 12px; font-size: 0.78rem; }
}


/* ===== UAV cinematic layering fix ===== */

.hero-section::after,
.md-content .hero::after,
.hero-banner::after{
    content:"";
    position:absolute;
    inset:0;
    background-image:url('https://images.unsplash.com/photo-1517976547714-720226b864c1?q=80&w=1600&auto=format&fit=crop');
    background-size:cover;
    background-repeat:no-repeat;
    background-position:center top -180px;
    opacity:0.16;
    filter:blur(1.8px);
    mix-blend-mode:screen;
    transform:scale(1.05);
    pointer-events:none;
}

/* UAV higher and farther away */
.hero-section,
.hero-banner{
    overflow:hidden;
}

/* product becomes primary subject */
.hero-product-image,
.hero img{
    position:relative;
    z-index:5;
    transform:
        perspective(1200px)
        rotateY(-10deg)
        translateY(30px)
        scale(1.08);
    filter:
        drop-shadow(0 0 32px rgba(60,120,255,0.42))
        drop-shadow(0 24px 54px rgba(0,0,0,0.68));
}

/* typography refinement */
.hero-title,
.hero-section h1{
    max-width:620px;
    line-height:0.96 !important;
}

/* cinematic atmosphere */
.hero-section::before{
    background:
      radial-gradient(circle at 72% 18%, rgba(80,120,255,0.16), transparent 30%),
      linear-gradient(to bottom, rgba(2,5,12,0.34), rgba(2,5,12,0.84));
}

/* HUD style panel */
.hero-features,
.hero-right-panel{
    backdrop-filter: blur(14px);
    background: rgba(5,14,28,0.28);
    border:1px solid rgba(120,170,255,0.14);
}



/* ===== SparkNavi Blue product page cinematic background ===== */

.xc-prod-hero,
.xc-product-hero,
.md-content:has(.xc-prod-hero) .xc-prod-hero,
.md-content:has(.xc-product-hero) .xc-product-hero {
  position: relative !important;
  background:
    linear-gradient(90deg,
      rgba(2,8,18,.96) 0%,
      rgba(2,8,18,.82) 38%,
      rgba(2,8,18,.40) 68%,
      rgba(2,8,18,.88) 100%),
    linear-gradient(180deg,
      rgba(2,8,18,.20) 0%,
      rgba(2,8,18,.50) 55%,
      rgba(2,8,18,.96) 100%),
    url('../assets/product-blue-uav-mountain-bg.png') center center / cover no-repeat !important;
  overflow: hidden !important;
}

.xc-prod-hero::before,
.xc-product-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 68% 38%, rgba(70,140,255,.15), transparent 32%),
    linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.35));
  pointer-events: none;
  z-index: 0;
}

.xc-prod-hero::after,
.xc-product-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(80,150,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80,150,255,.06) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: .28;
  pointer-events: none;
  z-index: 1;
}

.xc-prod-hero > *,
.xc-product-hero > * {
  position: relative;
  z-index: 2;
}
