/* ===== AffiliatePro Installation Guide — Premium UI ===== */
@font-face {
  font-display: block;
  font-family: "bootstrap-icons";
  src: url("../bootstrap-icons/font/bootstrap-icons.woff2") format("woff2"),
       url("../bootstrap-icons/font/bootstrap-icons.woff") format("woff");
}

:root {
  --guide-primary: #2563eb;
  --guide-primary-dark: #1d4ed8;
  --guide-dark: #0f172a;
  --guide-muted: #64748b;
  --guide-accent: #10b981;
  --guide-warning: #f59e0b;
  --guide-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%);
  --guide-gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  --guide-shadow: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.06);
  --guide-shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
  --guide-radius: 12px;
  --guide-radius-lg: 16px;
  --guide-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 32px;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f8fafc;
  color: var(--guide-dark);
  line-height: 1.65;
}

/* ===== Sidebar ===== */
.sidebar {
  background: var(--guide-gradient-hero);
  box-shadow: 4px 0 24px rgba(0,0,0,0.06);
  padding: 2rem 0.75rem;
}

.sidebar .nav-link {
  color: rgba(255,255,255,0.85);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s var(--guide-ease);
}

.sidebar .nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.sidebar .nav-link.active {
  background: var(--guide-gradient) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

/* ===== Hero ===== */
.guide-hero {
  background: var(--guide-gradient-hero);
  color: #fff;
  border-radius: var(--guide-radius-lg);
  padding: 3rem;
  margin-bottom: 2rem;
  box-shadow: var(--guide-shadow-lg);
  position: relative;
  overflow: hidden;
}

.guide-hero::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

/* Back to Home — prominent, always visible */
.guide-back-home {
  display: inline-flex !important;
  align-items: center;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.guide-back-home:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.guide-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.15);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(8px);
}

.guide-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.guide-hero .lead {
  opacity: 0.95;
  font-size: 1.15rem;
  max-width: 600px;
}

/* Quick Links Strip */
.guide-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 1.5rem;
}

.guide-quick-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #fff;
  border-radius: 8px;
  color: var(--guide-dark);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  box-shadow: var(--guide-shadow);
  transition: all 0.2s var(--guide-ease);
}

.guide-quick-link:hover {
  color: var(--guide-primary);
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.08);
}

/* ===== Section Titles ===== */
.guide-section {
  margin-bottom: 3rem;
}

.guide-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--guide-dark);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.guide-section h2 .bi {
  color: var(--guide-primary);
  font-size: 1.25rem;
}

/* ===== Quick Start — Step Cards ===== */
.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guide-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: #fff;
  border-radius: var(--guide-radius);
  border: 1px solid #e2e8f0;
  box-shadow: var(--guide-shadow);
  transition: all 0.2s var(--guide-ease);
}

.guide-step:hover {
  border-color: rgba(37, 99, 235, 0.2);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.guide-step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--guide-gradient);
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
}

.guide-step-content {
  flex: 1;
}

.guide-step-content code {
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.9em;
}

/* ===== Cards ===== */
.guide-card {
  background: #fff;
  border-radius: var(--guide-radius);
  border: 1px solid #e2e8f0;
  box-shadow: var(--guide-shadow);
  overflow: hidden;
  transition: all 0.2s var(--guide-ease);
}

.guide-card:hover {
  box-shadow: 0 12px 28px rgba(0,0,0,0.06);
}

/* Requirements Grid */
.guide-req-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.guide-req-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 1rem 1.25rem;
  background: #fff;
  border-radius: var(--guide-radius);
  border: 1px solid #e2e8f0;
  transition: all 0.2s var(--guide-ease);
}

.guide-req-item:hover {
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
}

.guide-req-item .bi {
  font-size: 1.25rem;
  color: var(--guide-accent);
  flex-shrink: 0;
}

/* Installation Steps */
.guide-install-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: install-step;
}

.guide-install-steps li {
  counter-increment: install-step;
  position: relative;
  padding: 1rem 0 1rem 3rem;
  border-bottom: 1px solid #f1f5f9;
}

.guide-install-steps li:last-child {
  border-bottom: none;
}

.guide-install-steps li::before {
  content: counter(install-step);
  position: absolute;
  left: 0;
  top: 1rem;
  width: 28px;
  height: 28px;
  background: #e2e8f0;
  color: var(--guide-dark);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.guide-install-steps li code {
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.9em;
}

/* Checklist */
.guide-checklist {
  padding: 1.5rem;
}

.guide-checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f5f9;
  transition: opacity 0.2s;
}

.guide-checklist-item:last-child {
  border-bottom: none;
}

.guide-checklist-item .bi-check-circle-fill {
  color: var(--guide-accent);
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* Troubleshooting */
.guide-trouble-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guide-trouble-item {
  padding: 1.25rem 1.5rem;
  background: #fff;
  border-radius: var(--guide-radius);
  border-left: 4px solid var(--guide-primary);
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--guide-primary);
  box-shadow: var(--guide-shadow);
  transition: all 0.2s var(--guide-ease);
}

.guide-trouble-item:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.guide-trouble-item strong {
  display: block;
  margin-bottom: 6px;
  color: var(--guide-dark);
  font-size: 1rem;
}

.guide-trouble-item p {
  margin: 0;
  color: var(--guide-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.guide-trouble-item code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

/* Alerts */
.guide-alert {
  padding: 1.25rem 1.5rem;
  border-radius: var(--guide-radius);
  border: 1px solid;
}

.guide-alert-warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.guide-alert-info {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0369a1;
}

.guide-alert code {
  background: rgba(0,0,0,0.06);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Back to Top */
.btn-back-top {
  width: 52px;
  height: 52px;
  padding: 0;
  background: var(--guide-gradient);
  border: none;
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
  transition: all 0.25s var(--guide-ease);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.btn-back-top:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.4);
  color: #fff;
}

/* ===== Mobile App — Premium Block ===== */
.mobile-premium-card {
  background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--guide-primary);
  border-radius: var(--guide-radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.06);
  transition: all 0.3s var(--guide-ease);
}

.mobile-premium-card:hover {
  box-shadow: 0 20px 40px -12px rgba(37, 99, 235, 0.15);
  border-left-color: var(--guide-accent);
}

.mobile-premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.mobile-premium-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--guide-dark);
  margin-bottom: 0.75rem;
}

.mobile-premium-card .mobile-desc {
  color: var(--guide-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.mobile-feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.5rem;
}

.mobile-feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0fdf4;
  color: #059669;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
}

.mobile-feature-tag .bi {
  font-size: 0.9rem;
}

.mobile-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.mobile-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.25s var(--guide-ease);
}

.mobile-cta-btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.mobile-cta-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45);
  color: #fff !important;
  text-decoration: none !important;
}

.mobile-cta-btn-primary,
.mobile-cta-btn-primary .bi {
  color: #fff !important;
}

.mobile-cta-btn-outline {
  background: #fff;
  color: var(--guide-primary);
  border: 2px solid var(--guide-primary);
}

.mobile-cta-btn-outline:hover {
  background: #f0f9ff;
  color: var(--guide-primary-dark);
  transform: translateY(-1px);
}

.mobile-free-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--guide-muted);
}

.mobile-free-label .bi {
  font-size: 1.2rem;
  color: var(--guide-accent);
}

/* Mobile App & Support sections */
.guide-section ul:not(.guide-install-steps) {
  padding-left: 1.5rem;
}

.guide-section ul li {
  margin-bottom: 0.75rem;
}

.guide-section ul code {
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.9em;
}

/* Links */
.guide-section a {
  color: var(--guide-primary);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.guide-section a:hover {
  color: var(--guide-primary-dark);
  text-decoration: underline;
}

/* Buttons in guide sections — .guide-section a was overriding btn-primary text to blue */
.guide-section a.btn {
  text-decoration: none;
}
.guide-section a.btn-primary,
.guide-section a.btn-primary .bi {
  color: #fff !important;
}
.guide-section a.btn-primary:hover,
.guide-section a.btn-primary:focus,
.guide-section a.btn-primary:hover .bi,
.guide-section a.btn-primary:focus .bi {
  color: #fff !important;
  text-decoration: none;
}

/* Responsive */
@media (max-width: 767.98px) {
  .guide-hero {
    padding: 2rem;
  }

  .guide-hero h1 {
    font-size: 1.75rem;
  }

  .guide-quick-links {
    flex-direction: column;
  }

  .guide-req-grid {
    grid-template-columns: 1fr;
  }

  .mobile-cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .mobile-cta-btn {
    justify-content: center;
  }
}

/* ===== Guide Screenshots ===== */
.guide-screenshot {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--guide-radius);
  border: 1px solid #e2e8f0;
  box-shadow: var(--guide-shadow-lg);
  margin: 1.5rem 0;
}

.guide-screenshot--compact {
  margin: 0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.guide-screenshot--zoom {
  cursor: pointer;
  transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.guide-screenshot--zoom:hover {
  opacity: 0.95;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.guide-screenshot-wrap {
  margin: 1.5rem 0;
}

.guide-screenshot-caption {
  font-size: 0.875rem;
  color: var(--guide-muted);
  margin-top: 0.5rem;
  padding-left: 0.25rem;
  line-height: 1.5;
}

/* Installation walkthrough — visual preview before steps */
.guide-walkthrough {
  overflow: hidden;
}

.guide-walkthrough-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--guide-primary);
}

.guide-walkthrough .col-md-6:first-child {
  border-right: 1px solid #e2e8f0;
}

@media (max-width: 767.98px) {
  .guide-walkthrough .col-md-6:first-child {
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }
}
