/* ==========================================================================
   BG Renderer Max — Modern Design (based on Extrabite Catalogue Redesign)
   Light & Dark Theme Support
   ========================================================================== */

/* --- CSS VARIABLES - LIGHT THEME (Default) --- */
:root {
  --bg-main: #FFFFFF;
  --bg-card: #F8F9FA;
  --bg-card-hover: #F0F1F3;
  --bg-elevated: #FFFFFF;
  --border-color: #E5E7EB;
  --border-subtle: #F3F4F6;
  --text-main: #111111;
  --text-secondary: #374151;
  --text-muted: #6B7280;
  --text-dim: #9CA3AF;
  --accent-lime: #84CC16;
  --accent-lime-hover: #65A30D;
  --accent-lime-dim: rgba(132, 204, 22, 0.12);
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;
  --info: #3B82F6;
  --container-width: 1200px;
  --container-padding: clamp(20px, 4vw, 40px);
  --section-spacing: clamp(64px, 8vw, 100px);
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 20px rgba(132, 204, 22, 0.25);
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;
  --sidebar-width: 280px;
}

/* --- DARK THEME --- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-main: #111111;
    --bg-card: #1C1C1C;
    --bg-card-hover: #252525;
    --bg-elevated: #1a1a1a;
    --border-color: #2A2A2A;
    --border-subtle: #222222;
    --text-main: #FFFFFF;
    --text-secondary: #E5E5E5;
    --text-muted: #9CA3AF;
    --text-dim: #6B7280;
    --accent-lime: #D4FF00;
    --accent-lime-hover: #bce600;
    --accent-lime-dim: rgba(212, 255, 0, 0.15);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(212, 255, 0, 0.2);
  }
}

/* --- RESET & BASE --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 100px; font-size: 16px; }

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: 'Inter', 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

::selection { background: var(--accent-lime); color: #000; }
a { text-decoration: none; color: inherit; transition: color var(--transition-base); }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; border-radius: var(--radius-sm); }

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; margin: 0;
}
h1 { font-size: clamp(2.5rem, 2rem + 3vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); }
h3 { font-size: clamp(1.25rem, 1rem + 0.5vw, 1.5rem); }

/* --- UTILITIES --- */
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 var(--container-padding); }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent-lime); }
.section-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 1.5rem; }
.section-link { font-size: 0.9rem; color: var(--text-muted); transition: color var(--transition-base); }
.section-link:hover { color: var(--accent-lime); }

/* --- BUTTONS --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 14px 28px; font-weight: 600; font-size: 0.95rem; border-radius: var(--radius-sm);
  cursor: pointer; border: none; transition: all var(--transition-base);
  font-family: inherit; text-decoration: none;
  touch-action: manipulation;
}
.btn-sm { padding: 8px 16px; font-size: 0.875rem; }
.btn-primary { background-color: var(--accent-lime); color: #000; box-shadow: 0 2px 8px rgba(132, 204, 22, 0.25); }
.btn-primary:hover { background-color: var(--accent-lime-hover); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(132, 204, 22, 0.35); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary { background-color: var(--bg-card); color: var(--text-main); border: 1px solid var(--border-color); }
.btn-secondary:hover { background-color: var(--bg-card-hover); border-color: #444; }
.btn-outline { background-color: transparent; color: var(--text-main); border: 1px solid #444; }
.btn-outline:hover { border-color: var(--text-main); background-color: rgba(255, 255, 255, 0.05); }

/* --- HEADER --- */
.header-redesign {
  padding: 16px 0; border-bottom: 1px solid var(--border-color);
  background-color: rgba(255, 255, 255, 0.85); position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
@media (prefers-color-scheme: dark) {
  .header-redesign { background-color: rgba(17, 17, 17, 0.85); }
}
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.header-left { display: flex; align-items: center; gap: 40px; }
.logo-redesign { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.5rem; color: var(--text-main); }
.logo-redesign:hover { color: var(--accent-lime); }
.logo-icon { width: 32px; height: 32px; border-radius: 6px; object-fit: contain; }
.btn-header-outline { background: transparent; color: var(--text-main); border: 1.5px solid var(--border-color); border-radius: var(--radius-md); padding: 8px 20px; font-size: 0.875rem; font-weight: 600; transition: all var(--transition-base); white-space: nowrap; }
.btn-header-outline:hover { border-color: var(--text-main); background: rgba(255, 255, 255, 0.05); }
.nav-links-redesign { display: flex; gap: 24px; }
.nav-links-redesign a { font-size: 0.9rem; font-weight: 500; color: var(--text-muted); transition: color var(--transition-base); }
.nav-links-redesign a:hover { color: var(--text-main); }
.header-right { display: flex; align-items: center; gap: 16px; }

/* Mobile Menu */
.mobile-menu-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; cursor: pointer; background: none; border: none; }
.mobile-menu-toggle span { display: block; width: 24px; height: 2px; background: var(--text-main); transition: all var(--transition-base); }

/* --- HERO SECTION --- */
.hero { padding: var(--section-spacing) 0; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 60px; align-items: center; }
.hero-content h1 { margin-bottom: 24px; }
.hero-content p { font-size: 1.125rem; color: var(--text-muted); margin-bottom: 36px; max-width: 540px; line-height: 1.7; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--accent-lime-dim); border-radius: var(--radius-full); font-size: 0.875rem; color: var(--accent-lime); margin-bottom: 24px; }

/* Homepage hero — centered variant */
.hero--home .hero-content { max-width: 720px; margin: 0 auto; text-align: center; }
.hero--home .hero-badge { justify-content: center; }
.hero--home .hero-content p { max-width: 560px; margin-left: auto; margin-right: auto; margin-bottom: 36px; }
.hero--home .hero-actions { justify-content: center; }

/* --- FEATURES GRID --- */
.features-section { padding: var(--section-spacing) 0; }
.features-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.feature-card { background-color: var(--bg-card); border: 1px solid var(--border-color); padding: 24px; border-radius: var(--radius-lg); display: flex; align-items: flex-start; gap: 20px; transition: all var(--transition-base); cursor: default; }
.feature-card:hover { background-color: var(--bg-card-hover); transform: translateY(-2px); border-color: #3a3a3a; }
.icon-box { width: 52px; height: 52px; background-color: var(--accent-lime-dim); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: var(--accent-lime); flex-shrink: 0; }
.feature-info { flex: 1; }
.feature-info h4 { font-weight: 600; margin-bottom: 6px; font-size: 1rem; }
.feature-info span { font-size: 0.875rem; color: var(--text-muted); line-height: 1.5; }

/* --- DOC LAYOUT (Sidebar + Content) --- */
.doc-layout {
  display: flex;
  min-height: calc(100vh - 65px);
}

.doc-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background-color: var(--bg-card);
  border-right: 1px solid var(--border-color);
  padding: 24px 20px;
  position: sticky;
  top: 65px;
  height: calc(100vh - 65px);
  overflow-y: auto;
}

.doc-sidebar-logo {
  display: block;
  margin-bottom: 24px;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text-main);
  text-decoration: none;
}
.doc-sidebar-logo:hover {
  color: var(--accent-lime);
}

.doc-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.doc-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition-base), background-color var(--transition-base);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-nav a:hover {
  color: var(--text-main);
  background-color: var(--bg-card-hover);
}

.doc-nav a.active {
  color: var(--accent-lime);
  background-color: var(--accent-lime-dim);
  font-weight: 600;
}

.doc-content {
  flex: 1;
  min-width: 0;
  background-color: var(--bg-main);
  overflow-x: hidden;
}

.doc-content-inner {
  max-width: 800px;
  padding: 40px 48px 120px;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* --- DOC CONTENT TYPOGRAPHY --- */
.doc-content-inner h1,
.doc-content-inner h2,
.doc-content-inner h3 {
  position: relative;
  scroll-margin-top: 100px;
}

.heading-anchor {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  opacity: 0;
  color: var(--text-muted);
  transition: opacity 0.2s ease, color 0.2s ease;
  vertical-align: middle;
  text-decoration: none;
  padding: 4px;
  border-radius: 4px;
}

.heading-anchor svg {
  width: 18px;
  height: 18px;
}

.doc-content-inner h1 .heading-anchor svg { width: 20px; height: 20px; }

.doc-content-inner h1:hover .heading-anchor,
.doc-content-inner h2:hover .heading-anchor,
.doc-content-inner h3:hover .heading-anchor,
.heading-anchor:focus-visible {
  opacity: 0.6;
}

.heading-anchor:hover {
  opacity: 1 !important;
  color: var(--accent-lime);
  background: rgba(132, 204, 22, 0.08);
}

.heading-anchor:focus-visible {
  outline: 2px solid var(--accent-lime);
  outline-offset: 2px;
  opacity: 1;
}

:target > .heading-anchor {
  opacity: 0.8;
  color: var(--accent-lime);
}

.doc-content-inner h1 {
  font-size: clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
  margin-bottom: 24px;
  color: var(--text-main);
}

.doc-content-inner h2 {
  font-size: 1.35rem;
  margin-top: 48px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.doc-content-inner h3 {
  font-size: 1.1rem;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--text-main);
}

.doc-content-inner p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
  max-width: 65ch;
}

.doc-content-inner a {
  color: var(--accent-lime);
  transition: opacity var(--transition-base);
}

.doc-content-inner a:hover {
  text-decoration: underline;
}

.doc-content-inner ul,
.doc-content-inner ol {
  color: var(--text-secondary);
  line-height: 1.8;
  padding-left: 1.5rem;
  margin-bottom: 16px;
  list-style: disc;
}

.doc-content-inner ol {
  list-style: decimal;
}

.doc-content-inner li {
  margin-bottom: 6px;
}

.doc-content-inner img {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin: 20px 0;
  max-width: min(100%, 640px);
  height: auto;
}

.doc-content-inner mark {
  background-color: var(--accent-lime-dim);
  color: var(--accent-lime);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.doc-content-inner code {
  background-color: var(--bg-card);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.doc-content-inner table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.doc-content-inner th,
.doc-content-inner td {
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  text-align: left;
  vertical-align: top;
}

.doc-content-inner th {
  background-color: var(--bg-card);
  font-weight: 600;
  color: var(--text-main);
}

.doc-content-inner td {
  color: var(--text-secondary);
}

/* YouTube embed */
.youtube-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  margin: 24px 0;
}

.youtube-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
  border-radius: var(--radius-lg);
}

/* Table responsive wrapper */
.doc-content-inner .table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 20px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.doc-content-inner .table-wrapper table {
  margin: 0;
  border-radius: 0;
}

.doc-content-inner .table-wrapper th:first-child,
.doc-content-inner .table-wrapper td:first-child { border-left: none; }
.doc-content-inner .table-wrapper th:last-child,
.doc-content-inner .table-wrapper td:last-child { border-right: none; }
.doc-content-inner .table-wrapper tr:first-child th,
.doc-content-inner .table-wrapper tr:first-child td { border-top: none; }
.doc-content-inner .table-wrapper tr:last-child th,
.doc-content-inner .table-wrapper tr:last-child td { border-bottom: none; }

/* --- MOBILE DOC NAVIGATION --- */
.doc-mobile-nav-wrapper {
  display: none; /* shown via media query at <= 1024px */
  position: relative;
  padding: 12px var(--container-padding);
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-card);
}

.doc-mobile-nav-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 16px;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--transition-base);
}

.doc-mobile-nav-toggle:hover,
.doc-mobile-nav-toggle:focus-visible {
  border-color: var(--accent-lime);
}

.doc-mobile-nav-toggle svg {
  transition: transform var(--transition-base);
  flex-shrink: 0;
}

.doc-mobile-nav-dropdown.open + .doc-mobile-nav-toggle svg,
.doc-mobile-nav-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.doc-mobile-nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: var(--container-padding);
  right: var(--container-padding);
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  max-height: 60vh;
  overflow-y: auto;
  padding: 8px;
}

.doc-mobile-nav-dropdown.open {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.doc-mobile-nav-dropdown a {
  display: block;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition-base), background-color var(--transition-base);
  touch-action: manipulation;
  min-height: 44px;
}

.doc-mobile-nav-dropdown a:hover {
  color: var(--text-main);
  background-color: var(--bg-card-hover);
}

.doc-mobile-nav-dropdown a.active {
  color: var(--accent-lime);
  background-color: var(--accent-lime-dim);
  font-weight: 600;
}

/* Mobile nav group (collapsible) */
.nav-group {
  border-top: 1px solid var(--border-subtle);
  margin-top: 4px;
  padding-top: 4px;
}

.nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  touch-action: manipulation;
  transition: color var(--transition-base);
}

.nav-group-toggle:hover { color: var(--accent-lime); }

.nav-group-toggle svg {
  transition: transform var(--transition-base);
  flex-shrink: 0;
}

.nav-group-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.nav-group-items {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding-left: 8px;
}

.nav-group-items.open {
  display: flex;
}

/* Desktop sidebar nav group */
.nav-group-desktop {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.nav-group-label {
  display: block;
  padding: 4px 12px 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* --- SKIP TO CONTENT --- */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 999;
  padding: 12px 24px;
  background: var(--accent-lime);
  color: #000;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top var(--transition-fast);
}

.skip-to-content:focus {
  top: 16px;
}

/* --- BACK TO TOP BUTTON --- */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--transition-base), visibility var(--transition-base), transform var(--transition-base), color var(--transition-base), background-color var(--transition-base);
  touch-action: manipulation;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  color: var(--accent-lime);
  background: var(--bg-card-hover);
  border-color: var(--accent-lime);
}

/* --- FOCUS STYLES --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent-lime);
  outline-offset: 2px;
}

/* --- CTA SECTION --- */
.cta-section { padding: var(--section-spacing) 0; text-align: center; background: linear-gradient(180deg, transparent, rgba(132, 204, 22, 0.03)); }
.cta-content { max-width: 600px; margin: 0 auto; }
.cta-content h2 { margin-bottom: 16px; }
.cta-content p { color: var(--text-muted); margin-bottom: 32px; font-size: 1.1rem; }
.cta-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* --- BREADCRUMBS --- */
.breadcrumbs { padding: 16px 0 0; }
.breadcrumbs ol { display: flex; align-items: center; gap: 8px; list-style: none; margin: 0; padding: 0; font-size: 0.85rem; color: var(--text-muted); flex-wrap: wrap; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 8px; opacity: 0.5; }
.breadcrumbs a { color: var(--text-muted); transition: color var(--transition-base); }
.breadcrumbs a:hover { color: var(--accent-lime); }
.breadcrumbs [aria-current="page"] { color: var(--text-main); }

/* --- ABOUT PAGE --- */
.about-section { padding: var(--section-spacing) 0; }
.about-inner { max-width: 720px; margin: 0 auto; }
.about-section h1 { text-align: center; margin-bottom: 16px; }
.about-lead { text-align: center; color: var(--text-muted); font-size: 1.1rem; margin-bottom: 48px; }
.about-body { line-height: 1.8; color: var(--text-secondary); }
.about-body p { margin-bottom: 16px; }
.about-body h2 { margin-top: 48px; margin-bottom: 16px; }
.about-body a { color: var(--accent-lime); }
.about-body a:hover { text-decoration: underline; }

/* --- 404 PAGE --- */
.error-page { min-height: 70vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: var(--section-spacing) var(--container-padding); }
.error-content { max-width: 640px; width: 100%; }
.error-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--accent-lime-dim); border-radius: var(--radius-full); font-size: 0.875rem; color: var(--accent-lime); margin-bottom: 20px; font-weight: 500; }
.error-badge svg { width: 16px; height: 16px; }
.error-content h1 { font-size: clamp(5rem, 12vw, 8rem); font-weight: 900; line-height: 1; margin-bottom: 12px; background: linear-gradient(135deg, var(--accent-lime) 0%, var(--text-main) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; letter-spacing: -0.04em; }
.error-subtitle { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 40px; max-width: none; line-height: 1.6; }

/* 404 Product cards */
.error-cards { display: flex; flex-direction: column; gap: 12px; margin-bottom: 40px; text-align: left; }
.error-card { display: flex; align-items: center; gap: 16px; padding: 20px 24px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); transition: all var(--transition-base); text-decoration: none; color: inherit; }
.error-card:hover { background: var(--bg-card-hover); transform: translateY(-2px); border-color: var(--accent-lime); box-shadow: var(--shadow-md); }
.error-card--primary { border-color: var(--accent-lime); background: var(--accent-lime-dim); }
.error-card--primary:hover { box-shadow: var(--shadow-glow); }
.error-card-icon { width: 48px; height: 48px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--accent-lime-dim); color: var(--accent-lime); }
.error-card-icon svg { width: 24px; height: 24px; }
.error-card-icon--gifgun { background: rgba(255, 107, 107, 0.12); color: #FF6B6B; }
.error-card-icon--extrabite { background: rgba(99, 102, 241, 0.12); color: #818CF8; }
.error-card-body { flex: 1; min-width: 0; }
.error-card-body h3 { font-size: 1rem; font-weight: 700; margin-bottom: 2px; }
.error-card-body span { font-size: 0.875rem; color: var(--text-muted); line-height: 1.5; }
.error-card-arrow { color: var(--text-dim); flex-shrink: 0; transition: transform var(--transition-base), color var(--transition-base); }
.error-card-arrow svg { width: 18px; height: 18px; }
.error-card:hover .error-card-arrow { color: var(--accent-lime); transform: translateX(3px); }

.error-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 480px) {
  .error-card { padding: 16px; gap: 12px; }
  .error-card-icon { width: 40px; height: 40px; }
  .error-card-icon svg { width: 20px; height: 20px; }
  .error-actions { flex-direction: column; }
  .error-actions .btn { width: 100%; }
}

/* --- FOOTER --- */
.footer-redesign { border-top: 1px solid var(--border-color); padding: 40px 0 28px; margin-top: 0; background-color: var(--bg-main); }
.footer-columns { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col-brand { gap: 12px; }
.footer-col-title { font-size: 0.8rem; font-weight: 600; color: var(--text-main); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.footer-brand-link { font-weight: 700; font-size: 0.95rem; color: var(--text-main); text-decoration: none; letter-spacing: -0.02em; white-space: nowrap; }
.footer-brand-link:hover { color: var(--accent-lime); }
.footer-col a { color: var(--text-muted); font-size: 0.85rem; text-decoration: none; transition: color var(--transition-base); white-space: nowrap; }
.footer-col a:hover { color: var(--text-main); }
.footer-socials { display: flex; gap: 2px; }
.footer-socials a { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); color: var(--text-dim); transition: color var(--transition-base), background-color var(--transition-base); }
.footer-socials a svg { width: 15px; height: 15px; }
.footer-socials a:hover { color: var(--text-main); background-color: var(--bg-card); }
.footer-bottom { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-bottom p { margin: 0; color: var(--text-dim); font-size: 0.8rem; }

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .doc-sidebar { display: none; }
  .doc-content-inner { padding: 24px 20px 80px; }
  .doc-mobile-nav-wrapper { display: block; }
  html { scroll-padding-top: 130px; }
}

@media (max-width: 768px) {
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
  .header-left { gap: 0; }
  .nav-links-redesign { display: none; }
  .header-right { gap: 8px; }
  .btn-header-outline { display: none; }
  .mobile-menu-toggle { display: flex; }
  .features-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .feature-card { padding: 16px; flex-direction: column; text-align: center; }
  .feature-card .icon-box { margin: 0 auto 8px; }
  .footer-columns { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-socials { margin-left: 0; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
  .section-title { font-size: 1.1rem; }
  .cta-content p { font-size: 1rem; }
  .doc-content-inner h1 { font-size: 1.5rem; }
  .doc-content-inner h2 { font-size: 1.2rem; }
  .doc-content-inner table { font-size: 0.8rem; }
  .doc-content-inner th,
  .doc-content-inner td { padding: 8px 10px; }
}

@media (max-width: 480px) {
  .features-grid { grid-template-columns: 1fr 1fr; }
  .btn { padding: 12px 20px; font-size: 0.9rem; }
  .doc-content-inner { padding: 16px 16px 60px; }
  .doc-content-inner p { font-size: 1.0625rem; }
  .footer-columns { grid-template-columns: 1fr; }
}

/* --- ANIMATIONS --- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade-in { animation: fadeInUp 0.6s ease forwards; }
.features-grid .feature-card { opacity: 0; animation: fadeInUp 0.5s ease forwards; }
.features-grid .feature-card:nth-child(1) { animation-delay: 0.1s; }
.features-grid .feature-card:nth-child(2) { animation-delay: 0.15s; }
.features-grid .feature-card:nth-child(3) { animation-delay: 0.2s; }
.features-grid .feature-card:nth-child(4) { animation-delay: 0.25s; }
.features-grid .feature-card:nth-child(5) { animation-delay: 0.3s; }
.features-grid .feature-card:nth-child(6) { animation-delay: 0.35s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* Print */
@media print {
  .header-redesign, .footer-redesign, .btn, .doc-sidebar, video { display: none !important; }
  body { background: white; color: black; }
  .doc-content-inner { padding: 0; max-width: 100%; }
}
