/* ================================================================
   ERROR PAGES STYLESHEET — 404 & 500
   Integrated with main site style.css
   ================================================================ */

.error-hero {
  min-height: calc(100vh - 73px);
  margin-top: 73px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
  background: linear-gradient(145deg, var(--bg-dark) 0%, #1a2744 50%, #0e3a52 100%);
  position: relative;
  overflow: hidden;
}

/* Background grid — matches hero::before in style.css */
.error-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(8,145,178,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8,145,178,0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}

/* Background orbs */
.error-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.error-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.12;
}
.error-orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--primary), transparent 70%);
  top: -200px;
  left: -100px;
  animation: orbFloat 12s ease-in-out infinite alternate;
}
.error-orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  bottom: -150px;
  right: -100px;
  animation: orbFloat 14s ease-in-out infinite alternate;
  animation-delay: 3s;
}

.error-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(8,145,178,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8,145,178,0.03) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
}

/* Content wrapper */
.error-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  animation: fadeInUp 0.9s ease both;
}

/* ═══ Error Code Display ═══ */
.error-code {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
  font-family: var(--font-display);
}

.error-digit {
  font-size: clamp(5rem, 14vw, 9rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  cursor: default;
  transition: transform 0.3s ease;
  user-select: none;
}
.error-digit:hover {
  transform: scale(1.08);
}

.error-icon-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-icon-ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 40px rgba(8,145,178,0.3);
}
.error-icon-ring i {
  font-size: 2rem;
  color: #fff;
}

.error-icon-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(8,145,178,0.3);
  animation: pulseRing 2s ease-in-out infinite;
}

@keyframes pulseRing {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ═══ Typography ═══ */
.error-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.2;
}
.error-title em {
  font-style: italic;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.error-desc {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 560px;
  margin: 0 auto 40px;
}

/* ═══ Actions ═══ */
.error-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.error-actions .btn {
  min-width: 180px;
}

/* ═══ Suggestions ═══ */
.error-suggestions {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 40px;
}
.error-suggest-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}
.error-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.error-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(8,145,178,0.08);
  border: 1px solid rgba(8,145,178,0.2);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--primary);
  transition: all 0.3s ease;
  text-decoration: none;
}
.error-links a:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(8,145,178,0.3);
}
.error-links a i {
  font-size: var(--text-xs);
}

/* ═══ Quote ═══ */
.error-quote {
  border-top: 1px solid var(--border);
  padding-top: 32px;
}
.error-quote blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-xl);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}
.error-quote cite {
  font-size: var(--text-sm);
  font-style: normal;
  color: var(--text-muted);
  font-weight: 500;
}

/* ═══ 500 Page Variants ═══ */
.error-500 .error-icon-ring {
  background: linear-gradient(135deg, var(--danger), #dc2626);
  box-shadow: 0 0 40px rgba(239,68,68,0.3);
}
.error-500 .error-digit {
  background: linear-gradient(135deg, var(--danger), #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.error-500 .error-icon-pulse {
  border-color: rgba(239,68,68,0.3);
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  .error-hero {
    padding: 60px 20px;
    min-height: auto;
  }

  .error-code {
    gap: 12px;
    margin-bottom: 28px;
  }

  .error-digit {
    font-size: clamp(3.5rem, 18vw, 6rem);
  }

  .error-icon-wrap {
    width: 70px;
    height: 70px;
  }

  .error-icon-ring {
    width: 56px;
    height: 56px;
  }

  .error-icon-ring i {
    font-size: 1.4rem;
  }

  .error-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: 12px;
  }

  .error-desc {
    font-size: var(--text-base);
    margin-bottom: 28px;
  }

  .error-actions {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
  }

  .error-actions .btn {
    width: 100%;
    max-width: 280px;
    min-width: unset;
  }

  .error-suggestions {
    padding: 20px;
    margin-bottom: 28px;
  }

  .error-links {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .error-links a {
    width: 100%;
    max-width: 240px;
    justify-content: center;
  }

  .error-quote {
    padding-top: 24px;
  }

  .error-quote blockquote {
    font-size: var(--text-lg);
  }
}

@media (max-width: 480px) {
  .error-hero {
    padding: 48px 16px;
  }

  .error-digit {
    font-size: clamp(3rem, 16vw, 5rem);
  }

  .error-icon-wrap {
    width: 56px;
    height: 56px;
  }

  .error-icon-ring {
    width: 44px;
    height: 44px;
  }

  .error-icon-ring i {
    font-size: 1.1rem;
  }

  .error-suggestions {
    padding: 16px;
  }

  .error-quote blockquote {
    font-size: var(--text-base);
  }
}

/* ═══ LIGHT THEME ADJUSTMENTS ═══ */
[data-theme="light"] .error-hero {
  background: linear-gradient(145deg, #e0f2fe 0%, #f0f9ff 50%, #ffffff 100%);
}

[data-theme="light"] .error-hero::before {
  background-image:
    linear-gradient(rgba(8,145,178,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8,145,178,0.06) 1px, transparent 1px);
}

[data-theme="light"] .error-suggestions {
  background: var(--bg-card);
  border-color: var(--border);
}

[data-theme="light"] .error-grid {
  background-image:
    linear-gradient(rgba(8,145,178,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8,145,178,0.04) 1px, transparent 1px);
}

[data-theme="light"] .error-quote {
  border-top-color: var(--border);
}