html,
body#page {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100%; /* stretch to viewport height */
  flex-direction: column; /* stack: header → main → footer */
}

#page-hero {
  position: relative; /* not fixed and so the canvas positions inside it */
  overflow: hidden; /* prevents canvas overflow scrollbars */
  width: auto;
  min-height: 30vh;
  height: auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-top: 120px; /* same as header height */
  padding: 30px;
  box-sizing: border-box;
}

/* Overlay image above canvas, below text */
#page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../images/page-hero.jpg"); /* overlay */
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0.5; /* semi-transparency */
  z-index: 1; /* above canvas, below text */
  pointer-events: none; /* don’t block clicks */
}

#page-hero .page-hero-inner {
  position: relative;
  z-index: 2; /* above the image overlay */
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Align children (h1 and breadcrumbs) to the left */
  z-index: 2; /* sits above the image overlay */
}

#page-hero h1 {
  color: var(--color-accent);
  font-size: 2rem;
  margin: 0;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  display: block;
  /* Text shadow: x-offset y-offset blur-radius color */
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9);
}

#page-hero .breadcrumbs {
  text-align: left;
  align-self: flex-start; /* Ensure breadcrumbs stay left */
  margin-top: 0.5em;
  display: flex;
  align-items: center;
}

#page-hero .breadcrumbs p {
  margin: 0;
  font-weight: 500;
  /* Text shadow: x-offset y-offset blur-radius color */
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9);
}

#page-hero .breadcrumbs a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 900;
  /* Text shadow: x-offset y-offset blur-radius color */
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
}

#page-hero .breadcrumbs a:hover {
  color: var(--color-accent);
}

/* Canvas: background layer */
.canvasid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block; /* removes inline gap */
  background: #021636;
  z-index: 0; /* behind the inner content */
}

main {
  flex: 1; /* pushes footer down if content is short */
}

#backToTop {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

#backToTop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.container {
  max-width: 1024px;
  margin: 20px auto;
  padding: 24px 20px;
  background: var(--neutral-04, rgba(255, 255, 255, 0.04));
  border-radius: 1rem;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.container p {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--color-base-opposite);
  margin-bottom: 1.5em;
  text-align: left;
}

.container a {
  font-size: 1.15rem;
  line-height: 1.7;
  margin-bottom: 1.5em;
  text-align: left;
}

/* 404 Page Styling */
.page-404 {
  text-align: center; /* center text + inline elements */
  display: flex; /* flexbox for vertical centering */
  flex-direction: column; /* stack elements vertically */
  align-items: center; /* horizontal center */
  justify-content: center; /* vertical center if parent has height */
  min-height: 60vh; /* give it space to center nicely */
  padding: 2rem;
}

.page-404 .page-title {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.page-404 .page-description {
  max-width: 600px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
  line-height: 1.6;
}

.page-404 .error-actions {
  display: flex;
  gap: 1rem; /* space between buttons */
  margin-bottom: 2rem;
  flex-wrap: wrap; /* stack buttons on small screens */
  justify-content: center;
}

.page-404 .btn-bl {
  padding: 0.75rem 1.5rem;
}

.page-404 .error-image img {
  max-width: 280px;
  height: auto;
  margin: 0 auto;
  display: block;
}

/* What We RAWk Page Styles */
/* Base styles */
.page-image img {
  max-width: 100%;
  height: auto;
  border: 4px solid var(--color-primary);
  border-radius: 10px;
  transition: all 0.3s ease;
}

/* Hover effect */
.page-image img:hover {
  transform: scale(1.05); /* smoother than width change */
  border-color: var(--color-accent);
}
