/* Guides page — cards, steps, TOC, scroll reveals */

.page-guides {
  background: #f8fafc;
}

/* Table of contents */
.guides-toc {
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.guides-toc-inner h2 {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1.25rem;
}

.guides-toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.guides-toc-grid a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 0.75rem;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.guides-toc-grid a::before {
  content: "";
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #38bdf8);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
  transition: transform 0.2s ease;
}

.guides-toc-grid a:hover {
  color: #2563eb;
  border-color: rgba(59, 130, 246, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.12);
}

.guides-toc-grid a:hover::before {
  transform: scale(1.3);
}

/* Section blocks */
.guides-section {
  position: relative;
}

.guides-section-alt {
  background: linear-gradient(180deg, #fff 0%, #f8fafc 50%, #fff 100%);
}

.guides-section-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, #3b82f6, transparent) 1;
}

/* Main feature card */
.guide-card-main {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(59, 130, 246, 0.15) !important;
  box-shadow:
    0 4px 24px rgba(59, 130, 246, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.8) inset !important;
}

.guide-card-main::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #38bdf8, #3b82f6);
  background-size: 200% 100%;
  animation: guide-shimmer 4s ease infinite;
}

@keyframes guide-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.guide-card-main:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(59, 130, 246, 0.15) !important;
}

.guide-card-main .site-img {
  border-radius: 0.875rem;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.1);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.guide-card-main:hover .site-img {
  transform: scale(1.01);
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.15);
}

/* Steps */
.guide-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.guide-step {
  display: flex;
  gap: 1rem;
  padding: 1.125rem 1.25rem;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.6), rgba(255, 255, 255, 0.9));
  border: 1px solid rgba(191, 219, 254, 0.5);
  border-radius: 0.875rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.guide-step:hover {
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.1);
  transform: translateX(4px);
}

html[dir="rtl"] .guide-step:hover {
  transform: translateX(-4px);
}

.guide-step-num {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-radius: 0.625rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.guide-step h3 {
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.35rem;
}

.guide-step p {
  font-size: 0.875rem;
  line-height: 1.65;
  color: #475569;
}

.guide-step a {
  color: #2563eb;
  font-weight: 500;
}

/* Info pair cards */
.guide-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.guide-info-card {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.guide-info-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.12);
}

.guide-info-card h3 {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.75rem;
  padding-left: 0.75rem;
  border-left: 3px solid #3b82f6;
}

html[dir="rtl"] .guide-info-card h3 {
  padding-left: 0;
  padding-right: 0.75rem;
  border-left: none;
  border-right: 3px solid #3b82f6;
}

.guide-info-card ul {
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.6;
}

.guide-info-card li {
  margin-bottom: 0.35rem;
}

/* Callouts */
.guide-callout {
  padding: 1.5rem 1.75rem;
  border-radius: 1rem;
  position: relative;
  overflow: hidden;
}

.guide-callout-warning {
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.9), rgba(255, 251, 235, 0.95));
  border: 1px solid rgba(251, 191, 36, 0.4);
  box-shadow: 0 8px 28px rgba(245, 158, 11, 0.1);
}

.guide-callout-warning::before {
  content: "!";
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: #b45309;
  background: rgba(251, 191, 36, 0.25);
  border-radius: 50%;
}

html[dir="rtl"] .guide-callout-warning::before {
  right: auto;
  left: 1.25rem;
}

.guide-callout h3 {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.guide-callout p {
  font-size: 0.875rem;
  line-height: 1.65;
  color: #57534e;
}

/* Troubleshooting fix cards */
.guide-fix-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.guide-fix-card {
  padding: 1.5rem 1.75rem;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 1rem;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
  position: relative;
  padding-left: 1.75rem;
}

.guide-fix-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1rem;
  bottom: 1rem;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #94a3b8, #cbd5e1);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.guide-fix-card:hover {
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 12px 36px rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

.guide-fix-card:hover::before {
  background: linear-gradient(180deg, #3b82f6, #38bdf8);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
}

html[dir="rtl"] .guide-fix-card {
  padding-left: 1.75rem;
  padding-right: 1.75rem;
}

html[dir="rtl"] .guide-fix-card::before {
  left: auto;
  right: 0;
  border-radius: 4px 0 0 4px;
}

.guide-fix-card h3 {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.guide-fix-card p {
  font-size: 0.875rem;
  line-height: 1.65;
  color: #475569;
}

.guide-fix-solution {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1d4ed8 !important;
  background: rgba(59, 130, 246, 0.08);
  border-radius: 0.5rem;
  border: 1px solid rgba(59, 130, 246, 0.15);
}

.guide-fix-solution::before {
  content: "✓";
  flex-shrink: 0;
  font-weight: 800;
}

/* Antivirus / large content card */
.guide-card-panel {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(59, 130, 246, 0.12);
  border-radius: 1.25rem;
  box-shadow:
    0 8px 40px rgba(59, 130, 246, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset;
}

.guide-card-panel:hover {
  box-shadow: 0 16px 48px rgba(59, 130, 246, 0.12);
}

.guide-card-panel ol {
  padding-left: 1.25rem;
}

/* Tip cards grid */
.guide-tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem;
}

.guide-tip-card {
  padding: 1.5rem;
  background: linear-gradient(145deg, rgba(239, 246, 255, 0.95), rgba(255, 255, 255, 0.9));
  border: 1px solid rgba(147, 197, 253, 0.45);
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

.guide-tip-card::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.guide-tip-card:hover {
  transform: translateY(-5px) scale(1.01);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 16px 40px rgba(59, 130, 246, 0.15);
}

.guide-tip-card:hover::after {
  opacity: 1;
}

.guide-tip-card h3 {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.guide-tip-card p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #475569;
  position: relative;
  z-index: 1;
}

/* Scroll reveal */
.guide-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.guide-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.guides-section p.text-slate-600 {
  line-height: 1.7;
}

@media (prefers-reduced-motion: reduce) {
  .guide-reveal,
  .guide-card-main::before {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }

  .guide-step:hover,
  .guide-info-card:hover,
  .guide-fix-card:hover,
  .guide-tip-card:hover,
  .guide-card-main:hover {
    transform: none;
  }
}
