/* Video background - positioned outside content container, full viewport width */
.hero-video-background {
  position: absolute;
  width: 100%;
  top: 80px;
  left: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  height: 480px;
}

@media (max-width: 1359px) {
  .hero-video-background {
    width: auto;
  }
}

@media (max-width: 999px) {
  .hero-video-background {
    top: 60px;
  }
}

.hero-video-background video {
  position: relative;
  width: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 1359px) {
  .hero-video-background video {
    width: 100%;
  height: 100%;
  object-fit: cover;       /* scales and fills, preserves ratio */
  object-position: center; /* centers horizontally (and vertically) */
  }
}

/* Green overlay on video */
.hero-video-background::before {
  content: "";
  position: absolute;
  inset: 0;
  /* background: rgba(34, 139, 34, 0.5); */
  background: linear-gradient(
    to top right,
    rgba(0,60,50,0.8),
    rgba(0,0,0,0.8)
  );

  pointer-events: none;
  z-index: 1;
}

/* Hero section - the first section with content */
.hero-wrapper {
  position: relative;
  z-index: 2;
  /* Restore original hero vertical spacing and height */
  margin: 20px 0;
  display: flex;
  align-items: center;
  min-height: 500px;
  min-width: 100%;
}

/* Style the columns container inside hero-wrapper with a nice box */
.hero-wrapper > .columns {
  position: relative;
  z-index: 2;
  /* background: rgba(0, 0, 0, 0.40); */
  padding: 50px;
  margin-bottom: 0;
  border-radius: 20px;
  /* backdrop-filter: blur(3px); */
  /* box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4); */
  width: 100%;
}

/* Make single-column hero sections span the full width of the grid
   Theme defines columns grid using repeat(12, 1fr). When only 1 column
   is present, the grid child may not auto-span the full width. Force it
   for the hero to make the intro text span the entire content container. */
.hero-wrapper > .columns.columns-1 > * {
  grid-column: 1 / -1 !important;
}

/* Ensure the intro content inside a single-column hero spans the full width
   of the hero box and isn't limited by potential max-widths elsewhere. */
.hero-wrapper > .columns.columns-1 .intro,
.hero-wrapper > .columns.columns-1 .intro p {
  width: 100% !important;
  max-width: 100% !important;
}

/* Reduce the space between the hero wrapper and following content
   without changing the hero's height: */
/* Remove default paragraph margin if a stray paragraph exists between */
.hero-wrapper + p {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
/* Reduce the top margin of columns that follow the hero wrapper */
.hero-wrapper + .columns,
.hero-wrapper + p + .columns,
.hero-wrapper ~ .columns {
  /* Move the following columns up to reduce white space under the hero
     while keeping the hero padding and height intact. */
  margin-top: -32px !important;
}

@media (max-width: 799px) {
  .hero-wrapper > .columns {
    padding: 30px 25px;
  }
  /* Less negative overlap on mobile to avoid content overlap issues */
  .hero-wrapper + .columns,
  .hero-wrapper + p + .columns,
  .hero-wrapper ~ .columns {
    margin-top: -16px !important;
  }
}

/* Title styling inside hero */
.hero-wrapper h1 {
  color: #ffffff !important;
  font-size: 3.5rem;
  margin-top: 0;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 
    -1px -1px 0 rgba(255, 255, 255, 0.5),
    1px -1px 0 rgba(255, 255, 255, 0.5),
    -1px 1px 0 rgba(255, 255, 255, 0.5),
    1px 1px 0 rgba(255, 255, 255, 0.5),
    0 3px 6px rgba(0, 0, 0, 0.4);
}

@media (min-width: 800px) {
  .hero-wrapper h1 {
    font-size: 5.5rem;
  }
}

/* Intro text and paragraphs styling */
.hero-wrapper .intro,
.hero-wrapper p {
  color: white !important;
  font-size: 1.9rem;
  line-height: 1.7;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Make other text white and readable */
.hero-wrapper h2,
.hero-wrapper h3 {
  color: white !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Style images inside hero */
.hero-wrapper img {
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  opacity: 0.8;
}

/* Make sure the content section allows the video to show */
#content {
  position: relative;
}