/* 404 — page not found (404.php). Builds on .about-hero / .about-cta-band from styles.css */
.rh-404-hero {
  padding: 3.4rem 0 4rem;
  text-align: center;
}

.rh-404-inner {
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rh-404-hero .about-hero-desc {
  max-width: 640px;
}

.rh-404-actions {
  justify-content: center;
}

.rh-404-code {
  direction: ltr;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: clamp(5rem, 3.6rem + 7vw, 9rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: #FFFFFF;
  margin-bottom: 1.2rem;
  animation: aboutIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.rh-404-code > span:not(.rh-404-zero) {
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
}

.rh-404-zero {
  width: 0.82em;
  height: 0.82em;
  color: #FFFFFF;
  display: inline-flex;
}

.rh-404-zero svg {
  width: 100%;
  height: 100%;
}

.rh-404-ring {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transform: rotate(-90deg);
  transform-origin: 60px 60px;
  animation: rh404Ring 1.4s cubic-bezier(0.65, 0, 0.35, 1) 0.2s forwards;
}

.rh-404-pulse {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: rh404Pulse 2.4s ease-in-out 0.9s infinite;
}

@keyframes rh404Ring {
  to { stroke-dashoffset: 0; }
}

@keyframes rh404Pulse {
  0% { stroke-dashoffset: 100; opacity: 1; }
  55% { stroke-dashoffset: 0; opacity: 1; }
  85%, 100% { stroke-dashoffset: 0; opacity: 0; }
}

.rh-404-back {
  cursor: pointer;
}

/* Quick links */
.rh-404-links {
  background: var(--bg-page);
  padding: var(--space-fluid-lg) 0;
}

.rh-404-links-title {
  font-size: var(--text-section);
  color: var(--rh-navy);
  text-align: center;
  margin-bottom: 1.6rem;
}

.rh-404-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.rh-404-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.15rem;
  box-shadow: var(--shadow-card);
  color: var(--text-main);
  transition: var(--transition);
}

.rh-404-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(43, 122, 138, 0.3);
}

.rh-404-card:focus-visible {
  outline: 2px solid var(--rh-teal);
  outline-offset: 2px;
}

.rh-404-card-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 14px;
  background: var(--rh-teal-light);
  border: 1px solid rgba(43, 122, 138, 0.12);
  color: var(--rh-teal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.rh-404-card:hover .rh-404-card-icon {
  background: var(--rh-teal);
  color: #FFFFFF;
}

.rh-404-card-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  flex: 1;
}

.rh-404-card-text strong {
  font-size: var(--text-card-title);
  color: var(--rh-navy);
}

.rh-404-card-text small {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.rh-404-card-arrow {
  color: var(--rh-teal);
  font-size: 1.1rem;
  transition: var(--transition);
}

.rh-404-card:hover .rh-404-card-arrow {
  transform: translateX(-4px);
}

body.lang-en .rh-404-card-arrow {
  transform: scaleX(-1);
}

body.lang-en .rh-404-card:hover .rh-404-card-arrow {
  transform: scaleX(-1) translateX(-4px);
}

@media (max-width: 960px) {
  .rh-404-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .rh-404-hero {
    padding: 2.4rem 0 2.8rem;
  }

  .rh-404-grid {
    grid-template-columns: 1fr;
  }

  .rh-404-actions > * {
    flex: 1 1 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rh-404-code,
  .rh-404-ring,
  .rh-404-pulse {
    animation: none !important;
    stroke-dashoffset: 0;
  }
}
