/* ============================================================
   CleanupApple — Professional Apple Device Cleaning & Care
   IDE-Inspired Professional Theme (based on WindosFTP patterns)
   ============================================================ */

/* --- CSS VARIABLES --- */
:root {
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-card: #f8fafc;
  --text: #334155;
  --text-heading: #1e293b;
  --text-muted: #64748b;
  --primary: #16a34a;
  --primary-light: #22c55e;
  --primary-bg: #f0fdf4;
  --secondary: #f59e0b;
  --secondary-bg: #fffbeb;
  --success: #10b981;
  --success-bg: #ecfdf5;
  --error: #ef4444;
  --error-bg: #fef2f2;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --terminal-bg: #0d1117;
  --terminal-text: #58a6ff;
  --terminal-green: #3fb950;
  --terminal-prompt: #f0883e;
  --nav-bg: #1e293b;
  --nav-text: #e2e8f0;
  --nav-active: #16a34a;
  --nav-tab-bg: #334155;
  --nav-tab-active: #1e293b;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1);
  --shadow-xl: 0 20px 25px rgba(0,0,0,.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', 'Menlo', 'Cascadia Code', 'JetBrains Mono', monospace;
  --transition: .25s ease;
}

[data-theme="dark"] {
  --bg: #111827;
  --bg-alt: #1f2937;
  --bg-card: #1f2937;
  --text: #cbd5e1;
  --text-heading: #e2e8f0;
  --text-muted: #94a3b8;
  --primary: #22c55e;
  --primary-light: #4ade80;
  --primary-bg: #14532d;
  --secondary: #f59e0b;
  --secondary-bg: #451a03;
  --success: #34d399;
  --success-bg: #064e3b;
  --error: #f87171;
  --error-bg: #450a0a;
  --border: #374151;
  --border-light: #1f2937;
  --nav-bg: #0f172a;
  --nav-tab-bg: #1e293b;
  --nav-tab-active: #0f172a;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.2);
  --shadow-md: 0 4px 6px rgba(0,0,0,.25);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.3);
  --shadow-xl: 0 20px 25px rgba(0,0,0,.35);
}

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-light); text-decoration: underline; }
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-body);
  color: var(--text-heading);
  line-height: 1.3;
  font-weight: 700;
}
h1 { font-size: 2.4rem; }
h2 { font-size: 1.9rem; margin-bottom: .75rem; }
h3 { font-size: 1.4rem; margin-bottom: .5rem; }
h4 { font-size: 1.15rem; }
p { margin-bottom: 1rem; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: .35rem; }

/* --- CONTAINER --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 900px; margin: 0 auto; padding: 0 1.5rem; }

/* ============================================================
   NAVIGATION — IDE TABS STYLE
   ============================================================ */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  background: var(--nav-bg);
  border-bottom: 2px solid var(--primary);
  box-shadow: var(--shadow-md);
}
.navbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
}
.navbar-brand {
  display: flex; align-items: center; gap: .5rem;
  color: var(--primary-light); font-weight: 700; font-size: 1.15rem;
  text-decoration: none; padding: .75rem 0; white-space: nowrap;
}
.navbar-brand:hover { color: #fff; text-decoration: none; }
.navbar-brand .brand-icon { font-size: 1.3rem; }

/* IDE Tab Navigation */
.nav-tabs-ide {
  display: flex; align-items: flex-end; gap: 2px;
  list-style: none; padding: 0; margin: 0;
}
.nav-tabs-ide li a {
  display: flex; align-items: center; gap: .4rem;
  padding: .6rem 1rem;
  font-size: .85rem;
  font-weight: 500;
  color: var(--nav-text);
  background: var(--nav-tab-bg);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  text-decoration: none;
  transition: all var(--transition);
  border: 1px solid transparent;
  border-bottom: none;
  position: relative;
  top: 1px;
  opacity: .75;
  white-space: nowrap;
}
.nav-tabs-ide li a:hover,
.nav-tabs-ide li a.active {
  background: var(--nav-tab-active);
  color: #fff;
  opacity: 1;
  border-color: var(--border) var(--border) transparent;
}
.nav-tabs-ide li a.active::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 2px; background: var(--primary);
}
.nav-tab-icon { font-size: 1rem; }

/* Mobile menu */
.nav-toggle {
  display: none; background: none; border: none;
  color: var(--nav-text); font-size: 1.6rem; cursor: pointer;
  padding: .5rem;
}

/* Theme toggle in nav */
.theme-toggle {
  background: var(--nav-tab-bg); border: 1px solid var(--border);
  color: var(--nav-text); font-size: 1rem; cursor: pointer;
  padding: .45rem .75rem; border-radius: var(--radius-sm);
  transition: all var(--transition);
  margin-left: .5rem;
}
.theme-toggle:hover { background: var(--primary); color: #fff; }

/* ============================================================
   HERO — ANIMATED CLEANING DASHBOARD
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--nav-bg) 0%, #0f172a 100%);
  padding: 4.5rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 80%, rgba(22,163,74,.15) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(245,158,11,.1) 0%, transparent 50%);
}
.hero-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
  align-items: center; position: relative; z-index: 1;
}

/* Dashboard window (replaces terminal) */
.dashboard-window {
  background: var(--terminal-bg); border-radius: var(--radius-md);
  border: 1px solid #30363d;
  box-shadow: 0 16px 48px rgba(0,0,0,.4);
  overflow: hidden;
}
.dashboard-titlebar {
  display: flex; align-items: center; gap: .5rem;
  padding: .6rem 1rem;
  background: #161b22; border-bottom: 1px solid #30363d;
}
.dashboard-dot {
  width: 12px; height: 12px; border-radius: 50%;
}
.dashboard-dot.red { background: #ff5f57; }
.dashboard-dot.yellow { background: #febc2e; }
.dashboard-dot.green { background: #28c840; }
.dashboard-title {
  font-family: var(--font-mono); font-size: .75rem;
  color: #8b949e; margin-left: auto;
}
.dashboard-body {
  padding: 1.25rem;
  font-family: var(--font-mono); font-size: .85rem; line-height: 1.8;
}
.dash-line { display: block; }
.dash-label { color: #8b949e; }
.dash-value { color: var(--terminal-green); }
.dash-status { color: #58a6ff; }
.dash-warning { color: #febc2e; }
.dash-success { color: #3fb950; }
.dash-progress-bar {
  display: inline-block; width: 160px; height: 8px;
  background: #1e293b; border-radius: 4px; overflow: hidden;
  vertical-align: middle; margin: 0 .5rem;
}
.dash-progress-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--primary), var(--success));
  animation: progressFill 2.5s ease-out forwards;
}
@keyframes progressFill {
  from { width: 0%; } to { width: var(--fill, 100%); }
}

.hero-content { color: #e2e8f0; }
.hero-content h1 {
  font-size: 2.6rem; color: #f8fafc;
  margin-bottom: 1rem; line-height: 1.2;
}
.hero-content h1 span { color: var(--primary-light); }
.hero-content p {
  font-size: 1.15rem; color: #94a3b8;
  margin-bottom: 1.75rem; max-width: 520px;
}
.hero-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .75rem 1.75rem;
  background: var(--primary); color: #fff;
  font-size: .95rem;
  font-weight: 600; border-radius: var(--radius-sm);
  text-decoration: none; transition: all var(--transition);
  border: 2px solid var(--primary);
}
.hero-btn:hover { background: transparent; color: var(--primary-light); text-decoration: none; }
.hero-btn-secondary {
  background: transparent; color: #e2e8f0;
  border-color: #475569;
  margin-left: .75rem;
}
.hero-btn-secondary:hover { border-color: var(--primary-light); color: var(--primary-light); }

/* Connection status bar */
.connection-status {
  margin-top: 2.5rem; padding: .75rem 1.25rem;
  background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.3);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-size: .8rem; color: var(--terminal-green);
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--terminal-green);
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50% { opacity: .4; }
}
.status-item { display: flex; align-items: center; gap: .35rem; }
.status-label { color: #8b949e; }

/* Service progress visual */
.service-visual {
  margin-top: 2rem;
}
.service-bar {
  display: flex; align-items: center; gap: .75rem;
  margin-bottom: .6rem;
  font-family: var(--font-mono); font-size: .78rem; color: #94a3b8;
}
.service-name { min-width: 140px; color: #e2e8f0; }
.service-progress {
  flex: 1; height: 6px; background: #1e293b;
  border-radius: 3px; overflow: hidden;
}
.service-progress-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--success));
  animation: progressFill 2.5s ease-out forwards;
}
.service-bar:nth-child(2) .service-progress-fill { animation-delay: .3s; }
.service-bar:nth-child(3) .service-progress-fill { animation-delay: .6s; }
.service-pct { min-width: 40px; text-align: right; color: var(--success); }

/* ============================================================
   SECTION STYLES
   ============================================================ */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--bg-alt); }
.section-header {
  text-align: center; margin-bottom: 3rem;
}
.section-header h2 { margin-bottom: .5rem; }
.section-header p { color: var(--text-muted); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }
.section-badge {
  display: inline-block; font-size: .78rem;
  font-weight: 600; color: var(--primary); background: var(--primary-bg);
  padding: .3rem .85rem; border-radius: 20px;
  margin-bottom: .75rem; letter-spacing: .03em;
}

/* ============================================================
   SERVICE CARDS — Grid (mirrors guide-grid)
   ============================================================ */
.guide-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}
.guide-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1.75rem;
  transition: all var(--transition); position: relative;
  overflow: hidden;
}
.guide-card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.guide-card-icon {
  font-size: 2rem; margin-bottom: .75rem;
  width: 56px; height: 56px; display: flex; align-items: center;
  justify-content: center; background: var(--primary-bg);
  border-radius: var(--radius-sm);
}
.guide-card h3 {
  color: var(--text-heading);
  margin-bottom: .5rem;
}
.guide-card p { color: var(--text-muted); font-size: .95rem; margin-bottom: 1rem; }
.guide-card-link {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .85rem;
  font-weight: 600; color: var(--primary);
}
.guide-card-link:hover { gap: .6rem; text-decoration: none; }

/* ============================================================
   BEFORE/AFTER FLIP CARDS (mirrors protocol cards)
   ============================================================ */
.protocol-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}
.protocol-card {
  perspective: 800px; height: 280px; cursor: pointer;
}
.protocol-card-inner {
  position: relative; width: 100%; height: 100%;
  transition: transform .6s ease;
  transform-style: preserve-3d;
}
.protocol-card:hover .protocol-card-inner { transform: rotateY(180deg); }
.protocol-card-front, .protocol-card-back {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  border-radius: var(--radius-md); padding: 1.5rem;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center;
  border: 1px solid var(--border);
}
.protocol-card-front {
  background: var(--bg-card);
}
.protocol-card-back {
  background: var(--primary-bg);
  transform: rotateY(180deg);
  font-size: .9rem;
}
.protocol-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.protocol-name {
  font-weight: 700;
  font-size: 1.1rem; color: var(--text-heading);
  margin-bottom: .25rem;
}
.protocol-port {
  font-size: .8rem;
  color: var(--text-muted);
}
.protocol-back-title {
  font-weight: 700;
  color: var(--text-heading); margin-bottom: .75rem;
}
.protocol-detail {
  display: flex; justify-content: space-between;
  width: 100%; padding: .3rem 0;
  border-bottom: 1px dashed var(--border);
  font-size: .85rem;
}
.protocol-detail-label { color: var(--text-muted); }
.protocol-detail-value { font-weight: 600; color: var(--text-heading); }

/* ============================================================
   STATS
   ============================================================ */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem; text-align: center;
}
.stat-card {
  padding: 1.75rem; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-md);
}
.stat-number {
  font-family: var(--font-mono); font-size: 2rem;
  font-weight: 700; color: var(--primary);
  margin-bottom: .25rem;
}
.stat-label { color: var(--text-muted); font-size: .9rem; }

/* ============================================================
   WHY CHOOSE US SECTION
   ============================================================ */
.why-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.why-card {
  padding: 1.5rem; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  transition: all var(--transition);
}
.why-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }
.why-icon { font-size: 1.75rem; margin-bottom: .75rem; }
.why-card h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.why-card p { color: var(--text-muted); font-size: .93rem; margin: 0; }

/* ============================================================
   PROCESS STEPS
   ============================================================ */
.process-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem; counter-reset: step;
}
.process-card {
  padding: 1.75rem; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  position: relative; text-align: center;
  transition: all var(--transition);
}
.process-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }
.process-number {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem;
  margin: 0 auto .75rem;
}
.process-icon { font-size: 1.5rem; margin-bottom: .5rem; }
.process-card h3 { font-size: 1.05rem; margin-bottom: .5rem; }
.process-card p { color: var(--text-muted); font-size: .9rem; margin: 0; }

/* ============================================================
   CTA BANNER (mirrors newsletter)
   ============================================================ */
.cta-section {
  background: linear-gradient(135deg, var(--nav-bg) 0%, #0f172a 100%);
  padding: 3.5rem 0; text-align: center; color: #e2e8f0;
}
.cta-section h2 { color: #f8fafc; margin-bottom: .5rem; }
.cta-section p { color: #94a3b8; margin-bottom: 1.5rem; max-width: 560px; margin-left: auto; margin-right: auto; }
.cta-buttons { display: flex; justify-content: center; gap: .75rem; flex-wrap: wrap; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--nav-bg); color: #94a3b8;
  padding: 3.5rem 0 1.5rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2rem; margin-bottom: 2.5rem;
}
.footer-brand {
  font-size: 1.15rem;
  color: var(--primary-light); font-weight: 700;
  margin-bottom: .75rem;
}
.footer p { font-size: .9rem; line-height: 1.6; color: #94a3b8; }
.footer h4 {
  font-size: .9rem; color: #e2e8f0; margin-bottom: .75rem;
  text-transform: uppercase; letter-spacing: .05em;
}
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: .4rem; }
.footer-links a { color: #94a3b8; font-size: .9rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--primary-light); text-decoration: none; }
.footer-contact-item {
  display: flex; align-items: flex-start; gap: .5rem;
  margin-bottom: .5rem; font-size: .88rem;
}
.footer-contact-item .icon { flex-shrink: 0; }
.footer-bottom {
  border-top: 1px solid #1e293b; padding-top: 1.25rem;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: .5rem;
  font-size: .82rem;
}
.footer-bottom-links { display: flex; gap: 1rem; }
.footer-bottom-links a { color: #64748b; }
.footer-bottom-links a:hover { color: var(--primary-light); }

/* ============================================================
   ABOUT & CONTACT & LEGAL PAGES
   ============================================================ */
.page-hero {
  background: linear-gradient(135deg, var(--nav-bg) 0%, #0f172a 100%);
  padding: 3rem 0 2.5rem; color: #e2e8f0;
}
.page-hero h1 { color: #f8fafc; margin-bottom: .5rem; }
.page-hero p { color: #94a3b8; font-size: 1.1rem; }

.page-content {
  padding: 3rem 0;
}
.page-content h2 { margin-top: 2rem; margin-bottom: .75rem; font-size: 1.5rem; }
.page-content h3 { margin-top: 1.5rem; }
.page-content ul, .page-content ol { margin-bottom: 1rem; }

/* Team cards */
.team-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem; margin: 1.5rem 0;
}
.team-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1.5rem; text-align: center;
}
.team-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--primary-bg); display: flex; align-items: center;
  justify-content: center; font-size: 2rem;
  margin: 0 auto .75rem;
}
.team-card h3 { font-size: 1.05rem; margin-bottom: .25rem; }
.team-role { color: var(--primary); font-size: .82rem; }

/* Contact form */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
}
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: .85rem; font-weight: 600;
  margin-bottom: .4rem; color: var(--text-heading);
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: .7rem 1rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: .95rem;
  transition: border-color var(--transition);
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22,163,74,.1);
}
.form-group textarea { min-height: 140px; resize: vertical; }
.btn-submit {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .75rem 2rem; background: var(--primary);
  color: #fff; border: none; border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 600; cursor: pointer;
  transition: background var(--transition);
}
.btn-submit:hover { background: var(--primary-light); }

/* Info cards on contact */
.info-cards {
  display: grid; gap: 1rem;
}
.info-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1.25rem;
  display: flex; align-items: flex-start; gap: .75rem;
}
.info-card-icon {
  font-size: 1.5rem; flex-shrink: 0;
  width: 44px; height: 44px; display: flex; align-items: center;
  justify-content: center; background: var(--primary-bg);
  border-radius: var(--radius-sm);
}
.info-card h4 { font-size: .95rem; margin-bottom: .2rem; }
.info-card p { color: var(--text-muted); font-size: .88rem; margin: 0; }

/* FAQ Accordion */
.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  margin-bottom: .5rem; overflow: hidden;
  background: var(--bg-card);
}
.faq-question {
  width: 100%; padding: 1rem 1.25rem;
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  font-size: .95rem; font-weight: 600; color: var(--text-heading);
  font-family: var(--font-body);
  transition: background var(--transition);
}
.faq-question:hover { background: var(--primary-bg); }
.faq-question .faq-toggle { font-size: 1.2rem; color: var(--primary); transition: transform var(--transition); }
.faq-item.open .faq-question .faq-toggle { transform: rotate(45deg); }
.faq-answer {
  max-height: 0; overflow: hidden; transition: max-height .3s ease;
}
.faq-answer-inner {
  padding: 0 1.25rem 1rem;
  font-size: .93rem; color: var(--text-muted);
}
.faq-item.open .faq-answer {
  max-height: 500px;
}

/* Legal pages */
.legal-content { max-width: 800px; margin: 0 auto; padding: 3rem 1.5rem; }
.legal-content h1 { margin-bottom: .5rem; }
.legal-content h2 { margin-top: 2.5rem; font-size: 1.4rem; }
.legal-content h3 { margin-top: 1.5rem; font-size: 1.15rem; }
.legal-updated {
  color: var(--text-muted);
  font-size: .85rem; margin-bottom: 2rem;
}
.cookie-table {
  width: 100%; border-collapse: collapse; margin: 1.5rem 0;
  font-size: .9rem;
}
.cookie-table th, .cookie-table td {
  padding: .6rem .75rem; text-align: left;
  border-bottom: 1px solid var(--border);
}
.cookie-table th {
  background: var(--bg-alt);
  font-size: .85rem; font-weight: 600;
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
  position: fixed; bottom: 2rem; right: 2rem;
  width: 44px; height: 44px;
  background: var(--primary); color: #fff;
  border: none; border-radius: 50%;
  font-size: 1.2rem; cursor: pointer;
  display: none; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition); z-index: 900;
}
.back-to-top:hover { background: var(--primary-light); transform: translateY(-2px); }
.back-to-top.visible { display: flex; }

/* ============================================================
   ARTICLE PAGES — hero, TOC, callouts, CTA card, related
   ============================================================ */
.article-hero {
  background: linear-gradient(135deg, var(--nav-bg) 0%, #0f172a 100%);
  padding: 3rem 0 2.5rem; color: #e2e8f0; position: relative; overflow: hidden;
}
.article-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 15% 85%, rgba(22,163,74,.18) 0%, transparent 55%),
              radial-gradient(circle at 85% 15%, rgba(245,158,11,.1) 0%, transparent 55%);
}
.article-hero .container { position: relative; z-index: 1; }
.article-hero h1 { color: #f8fafc; font-size: 2.1rem; margin-bottom: .75rem; max-width: 820px; line-height: 1.25; }
.article-hero .article-lede { color: #cbd5e1; font-size: 1.1rem; max-width: 820px; margin-bottom: 1.25rem; }
.article-meta {
  display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .5rem;
}
.article-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .8rem; border-radius: 20px;
  font-family: var(--font-mono); font-size: .78rem; font-weight: 600;
  background: rgba(22,163,74,.15); color: var(--terminal-green);
  border: 1px solid rgba(22,163,74,.3);
}
.article-badge.secondary { background: rgba(245,158,11,.12); color: var(--secondary); border-color: rgba(245,158,11,.3); }
.article-badge.info { background: rgba(88,166,255,.12); color: #58a6ff; border-color: rgba(88,166,255,.3); }

.article-layout {
  display: grid; grid-template-columns: 240px 1fr; gap: 2.5rem;
  padding: 3rem 0; max-width: 1200px; margin: 0 auto; padding-left: 1.5rem; padding-right: 1.5rem;
}
.toc-sidebar {
  position: sticky; top: 90px; align-self: start;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1.1rem 1.1rem 1.1rem 1.25rem;
  max-height: calc(100vh - 110px); overflow-y: auto;
}
.toc-sidebar h4 {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--primary); margin-bottom: .6rem;
}
.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-list li { margin: 0; border-left: 2px solid var(--border); }
.toc-list li a {
  display: block; padding: .35rem .75rem; font-size: .86rem;
  color: var(--text-muted); text-decoration: none; transition: all var(--transition);
  line-height: 1.4;
}
.toc-list li a:hover { color: var(--primary); background: var(--primary-bg); text-decoration: none; }

.article-body { min-width: 0; }
.article-body h2 {
  font-size: 1.55rem; margin-top: 2.25rem; margin-bottom: .75rem;
  padding-bottom: .4rem; border-bottom: 2px solid var(--border);
  scroll-margin-top: 90px;
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 { font-size: 1.15rem; margin-top: 1.5rem; margin-bottom: .5rem; }
.article-body p { margin-bottom: 1rem; }
.article-body ul, .article-body ol { margin-bottom: 1.2rem; padding-left: 1.5rem; }
.article-body li { margin-bottom: .45rem; }
.article-body li strong { color: var(--text-heading); }

/* Callout boxes */
.callout {
  display: flex; gap: .85rem; align-items: flex-start;
  padding: 1rem 1.2rem; margin: 1.25rem 0;
  border-left: 4px solid var(--primary); border-radius: var(--radius-sm);
  background: var(--primary-bg);
}
.callout .callout-icon { font-size: 1.4rem; flex-shrink: 0; line-height: 1; margin-top: .15rem; }
.callout .callout-body { flex: 1; min-width: 0; }
.callout .callout-title {
  font-weight: 700; color: var(--text-heading);
  margin-bottom: .25rem; font-size: .95rem;
}
.callout p:last-child { margin-bottom: 0; }
.callout.warning { border-left-color: var(--secondary); background: var(--secondary-bg); }
.callout.danger { border-left-color: var(--error); background: var(--error-bg); }
.callout.info { border-left-color: #58a6ff; background: rgba(88,166,255,.08); }
[data-theme="dark"] .callout.info { background: rgba(88,166,255,.12); }

/* Terminal/code blocks */
.article-terminal {
  background: var(--terminal-bg); border-radius: var(--radius-md);
  border: 1px solid #30363d; margin: 1.25rem 0; overflow: hidden;
}
.article-terminal-title {
  display: flex; align-items: center; gap: .5rem;
  padding: .5rem 1rem;
  background: #161b22; border-bottom: 1px solid #30363d;
  font-family: var(--font-mono); font-size: .75rem; color: #8b949e;
}
.article-terminal-title .dashboard-dot { width: 10px; height: 10px; }
.article-terminal-title .title-label { margin-left: auto; }
.article-terminal pre {
  margin: 0; padding: 1rem 1.25rem;
  font-family: var(--font-mono); font-size: .85rem; line-height: 1.65;
  color: #e6edf3; overflow-x: auto; white-space: pre;
}
.article-terminal .prompt { color: var(--terminal-prompt); user-select: none; }
.article-terminal .cmd { color: #58a6ff; }
.article-terminal .comment { color: #8b949e; font-style: italic; }
.article-terminal .out { color: var(--terminal-green); }

/* Article table */
.article-table {
  width: 100%; border-collapse: collapse; margin: 1.25rem 0;
  font-size: .92rem; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
}
.article-table th, .article-table td {
  padding: .7rem .85rem; text-align: left; border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.article-table th {
  background: var(--bg-alt); font-size: .85rem; font-weight: 700;
  color: var(--text-heading); text-transform: uppercase; letter-spacing: .03em;
}
.article-table tr:last-child td { border-bottom: none; }
.article-table tr:hover td { background: var(--primary-bg); }

/* Steps list (numbered) */
.steps-list { counter-reset: step; list-style: none; padding: 0; margin: 1.25rem 0; }
.steps-list li {
  position: relative; padding: .15rem 0 .5rem 2.5rem;
  counter-increment: step; margin-bottom: .75rem;
}
.steps-list li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
  font-family: var(--font-mono);
}

/* CTA card (end of article) */
.article-cta { padding: 2rem 0 1rem; }
.cta-card {
  background: linear-gradient(135deg, var(--nav-bg) 0%, #0f172a 100%);
  color: #e2e8f0; border-radius: var(--radius-lg);
  padding: 2.5rem 2rem; text-align: center;
  border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.cta-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 80%, rgba(22,163,74,.2) 0%, transparent 55%),
              radial-gradient(circle at 80% 20%, rgba(245,158,11,.12) 0%, transparent 55%);
}
.cta-card > * { position: relative; z-index: 1; }
.cta-card .cta-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.cta-card h2 { color: #f8fafc; font-size: 1.75rem; margin-bottom: .6rem; border: none; padding: 0; }
.cta-card p { color: #cbd5e1; max-width: 620px; margin: 0 auto 1.5rem; font-size: 1rem; }
.cta-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 2rem; background: var(--primary); color: #fff;
  font-size: 1rem; font-weight: 600; border-radius: var(--radius-sm);
  text-decoration: none; transition: all var(--transition);
  border: 2px solid var(--primary);
}
.cta-btn:hover { background: transparent; color: var(--primary-light); text-decoration: none; }
.cta-trust {
  margin-top: 1.25rem; font-family: var(--font-mono); font-size: .8rem;
  color: #94a3b8; display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem;
}

/* Related articles */
.related-articles { padding: 3rem 0; background: var(--bg-alt); }
.related-articles-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem; margin-top: 1.5rem;
}
.related-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1.5rem;
  transition: all var(--transition); display: block; color: inherit; text-decoration: none;
}
.related-card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-lg);
  border-color: var(--primary); text-decoration: none; color: inherit;
}
.related-card-icon { font-size: 1.75rem; margin-bottom: .6rem; }
.related-card h3 { font-size: 1.05rem; color: var(--text-heading); margin-bottom: .4rem; }
.related-card p { color: var(--text-muted); font-size: .9rem; margin: 0; }
.related-card-link {
  display: inline-block; margin-top: .6rem;
  font-size: .82rem; color: var(--primary); font-weight: 600;
}

/* Services dropdown in nav */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { cursor: pointer; }
.nav-dropdown-menu {
  position: absolute; top: 100%; left: 0; min-width: 280px;
  background: var(--nav-bg); border: 1px solid var(--border);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  padding: .35rem; margin: 0; list-style: none;
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: all .18s ease; z-index: 1001;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-dropdown-menu li { margin: 0; }
.nav-dropdown-menu li a {
  display: flex; align-items: center; gap: .5rem;
  padding: .55rem .75rem; font-size: .85rem;
  color: var(--nav-text); border-radius: var(--radius-sm);
  text-decoration: none; transition: all var(--transition);
  background: transparent; opacity: .85; border: none; top: 0;
}
.nav-dropdown-menu li a:hover {
  background: var(--nav-tab-active); color: #fff; opacity: 1;
}
.nav-dropdown-menu li a.active { background: var(--nav-tab-active); color: var(--primary-light); opacity: 1; }
.nav-dropdown-menu li a::after { display: none !important; }

/* Responsive adjustments */
@media (max-width: 1024px) {
  .article-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  .toc-sidebar { position: static; max-height: none; }
}
@media (max-width: 768px) {
  .article-hero h1 { font-size: 1.6rem; }
  .cta-card { padding: 1.75rem 1.25rem; }
  .cta-card h2 { font-size: 1.4rem; }
  .article-body h2 { font-size: 1.3rem; }
  .nav-dropdown-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; background: transparent; padding: 0;
    display: none;
  }
  .nav-dropdown.mobile-open .nav-dropdown-menu { display: block; }
}

/* ============================================================
   COOKIE BANNER
   ============================================================ */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--nav-bg); color: #e2e8f0;
  padding: 1.25rem; z-index: 9999;
  box-shadow: 0 -4px 12px rgba(0,0,0,.2);
  display: none;
}
.cookie-banner.show { display: block; }
.cookie-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center;
  justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
}
.cookie-text { flex: 1; font-size: .9rem; }
.cookie-text a { color: var(--primary-light); }
.cookie-buttons { display: flex; gap: .5rem; }
.cookie-btn {
  padding: .5rem 1.25rem; border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600; cursor: pointer; border: none;
  transition: all var(--transition);
}
.cookie-accept { background: var(--primary); color: #fff; }
.cookie-accept:hover { background: var(--primary-light); }
.cookie-decline { background: #374151; color: #e2e8f0; }
.cookie-decline:hover { background: #475569; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-content { text-align: center; }
  .hero-content p { margin: 0 auto 1.75rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  body { font-size: 16px; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  .container { padding: 0 1rem; }
  .section { padding: 3rem 0; }
  .nav-tabs-ide { display: none; }
  .nav-toggle { display: block; }
  .nav-tabs-ide.open {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--nav-bg); border-top: 1px solid var(--border);
    padding: .5rem; gap: 0;
    box-shadow: var(--shadow-lg);
  }
  .nav-tabs-ide.open li a {
    border-radius: var(--radius-sm); width: 100%;
  }
  .hero { padding: 3rem 0 2.5rem; }
  .hero-content h1 { font-size: 2rem; }
  .guide-grid { grid-template-columns: 1fr; }
  .protocol-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .protocol-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .hero-content h1 { font-size: 1.6rem; }
}
