/* Common Hero Styles */
header.bg-primary {
  .content {
    position: relative;
    z-index: 1;
  }

  h1 {
    font-size: 3rem;
    font-weight: bold;
  }

  p {
    font-size: 1.25rem;
  }

  .btn {
    font-size: 1rem;
    padding: 0.75rem 1.25rem;
  }
}

/*************************************
 * Constrained Hero
 *************************************/
header.hero-constrained {
  position: relative;
  background-color: var(--primary-color);
  border-radius: .5rem;
  overflow: hidden;
  height: 200px;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}

/* Left Section (Solid Color) - leftmost solid band */
header.hero-constrained .hero-left-band {
  position: absolute;
  inset: 0;
  background-color: var(--primary-color);
  clip-path: polygon(0 0, 40% 0, 55% 100%, 0% 100%);
  z-index: 1; /* Same level as middle overlay */
}

/* Base Background Image Layer */
header.hero-constrained::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hero-image) no-repeat center center / cover;
  clip-path: polygon(60% 0, 100% 0, 100% 100%, 80% 100%);
  z-index: 0; /* Lowest layer - background image */
}

/* Middle Section (Tinted Background) */
header.hero-constrained::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hero-image) no-repeat center center / cover;
  clip-path: polygon(0 0, 70% 0, 85% 100%, 0% 100%);
  z-index: 1; /* Middle layer - tinted overlay */
  backdrop-filter: blur(3px);
}

/* Middle overlay tint */
header.hero-constrained .hero-tint {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--hero-block-tint);
  clip-path: polygon(0 0, 70% 0, 85% 100%, 0% 100%);
  z-index: 1; /* Same level as middle overlay */
}

/* Middle Section Shadow */
header.hero-constrained .middle-shadow {
  position: absolute;
  inset: 0;
  clip-path: polygon(40% 0, 70% 0, 85% 100%, 55% 100%);
  background: linear-gradient(
    50deg,
    var(--primary-shadow-color) 20%,
    hsla(var(--primary-color-hsl), 0) 65%
  );
  z-index: 2; /* Shadow layer */
  pointer-events: none;
  mix-blend-mode: multiply;
}

/* Right Section Shadow */
header.hero-constrained .right-shadow {
  position: absolute;
  inset: 0;
  clip-path: polygon(60% 0, 100% 0, 100% 100%, 80% 100%);
  background: linear-gradient(
    50deg,
    var(--primary-shadow-color) 20%,
    hsla(var(--primary-color-hsl), 0) 65%
  );
  z-index: 2; /* Shadow layer */
  pointer-events: none;
  mix-blend-mode: multiply;
}

/* Content */
header.hero-constrained .container {
  position: relative;
  z-index: 3; /* Highest layer - content */
}

/*************************************
 * New Hero Full Design
 *************************************/
.hero-full {
  position: relative;
  width: 100%;
  height: 350px;
  overflow: visible;
  display: flex;
  align-items: flex-end;
}

/* Background image covers full width */
.hero-full .hero-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--hero-image) no-repeat center center / cover;
  z-index: 0; /* 1. Base background image (lowest) */
}

/* Middle tinted overlay container */
.hero-full .hero-overlay-container {
  position: absolute;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* 2. Middle tinted overlay band */
  display: flex;
  justify-content: center;
}

/* Single overlay shadow - matches the tinted band exactly */
.hero-full .hero-overlay-container .hero-overlay-shadow {
  position: absolute;
  top: 0;
  width: var(--container-max-width, 1320px);
  height: 100%;
  padding: 0 var(--bs-gutter-x, 0.75rem);
  margin: 0 auto;
  pointer-events: none;
  z-index: 2; /* 3. Faux drop shadow */
}

.hero-full .hero-overlay-container .hero-overlay-shadow::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    50deg,
    var(--primary-shadow-color) 10%,
    hsla(var(--primary-color-hsl), 0) 55%
  );
  clip-path: polygon(0 0, 65% 0, 85% 100%, 0% 100%);
  mix-blend-mode: multiply;
}

/* Left band container */
.hero-full .hero-left-container {
  position: absolute;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3; /* 4. Left band container */
  display: flex;
  justify-content: flex-start;
}

/* Left solid color panel */
.hero-full .hero-left-band {
  position: absolute;
  top: 0;
  left: 0;
  width: calc((100vw - var(--container-max-width, 1320px)) / 2 + 5px);
  height: 100%;
  background-color: var(--primary-color);
  z-index: 1; /* Relative to its container */
}

/* Middle tinted overlay band */
.hero-full .hero-overlay-container .hero-overlay {
  position: relative;
  width: var(--container-max-width, 1320px);
  /* max-width: 100%; */
  height: 100%;
  padding: 0 var(--bs-gutter-x, 0.75rem);
  margin: 0 auto;
}

.hero-full .hero-overlay-container .hero-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--hero-block-tint);
  clip-path: polygon(0 0, 65% 0, 85% 100%, 0% 100%);
  backdrop-filter: blur(3px);
}

/* Solid Color Slant overlay */
.hero-full .hero-overlay-container .hero-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--primary-color);
  clip-path: polygon(0 0, 5% 0, 25% 100%, 0% 100%);
  z-index: 3;
}

/* Content container */
.hero-full .container {
  position: relative;
  z-index: 4; /* Highest z-index after removing SVG layer */
  overflow: visible; /* Allow content to extend beyond container boundaries */
}

/* Content styling */
.hero-full .hero-content {
  color: white;
  max-width: 100%; /* Changed from 75% to accommodate the new two-column layout */
  padding: 2rem 0;
  margin: 0;
  text-align: left;
  overflow: visible; /* Allow content to extend beyond hero-content boundaries */
}

/* Hero logo styling */
.hero-full .hero-logo {
  display: block;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .hero-full .hero-logo {
    margin: 0;
    margin-bottom: 1rem;
  }
}

/* Join link specific styling */
.hero-full .join-link {
  transition: all 0.3s ease;
}

.hero-full .join-link:hover {
  color: var(--acs-yellow) !important;
  background-color: var(--acs-blue) !important;
}

/*************************************
 * Responsive Styles
 *************************************/
/* Tablet (< 992px) */
@media (max-width: 991.98px) {  
  /* Hero Full responsive */
  .hero-full {
    height: auto;
    min-height: 300px;
  }
  
  /* Add margin to homepage hero title at breakpoints where the header logo is displayed */
  .hero-full .hero-title {
    margin-top: 65px;
  }
  
  /* Hide left band and slant for responsive views */
  .hero-full .hero-left-band,
  .hero-full .hero-overlay-container .hero-overlay::after {
    display: none;
  }
  
  /* Full width overlay without slants */
  .hero-full .hero-overlay-container .hero-overlay::before {
    clip-path: none;
    width: 100%;
  }
  
  /* Adjust shadow to match full overlay */
  .hero-full .hero-overlay-container .hero-overlay-shadow::before {
    clip-path: none;
    width: 100%;
  }
  
  .hero-full .hero-content {
    /* max-width: 90%; */
    text-align: center;
  }
  
  /* Constrained responsive */
  header.hero-constrained::after,
  header.hero-constrained .right-shadow {
    display: none;
  }
  
  /* Adjust the left band on tablet */
  header.hero-constrained .hero-left-band {
    clip-path: polygon(0 0, 70% 0, 85% 100%, 0% 100%);
  }
  
  header.hero-constrained::before {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
    width: 100%;
  }
  
  header.hero-constrained .hero-tint {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
    width: 100%;
  }
  
  header.hero-constrained .middle-shadow {
    clip-path: polygon(70% 0, 100% 0, 100% 100%, 85% 100%);
    width: 100%;
    background: linear-gradient(
      53deg,
      var(--primary-shadow-color) 50%,
      hsla(var(--primary-color-hsl), 0) 85%
    );
  }
  
  header.hero-constrained {
    background-color: var(--primary-color);
  }
}

/* Mobile (< 768px) */
@media (max-width: 767.98px) {
  /* Hero Full mobile responsive */
  /* Left band and slant already hidden from tablet breakpoint */
  
  /* Full overlay for mobile */
  .hero-full .hero-overlay-container .hero-overlay::before,
  .hero-full .hero-overlay-container .hero-overlay-shadow::before {
    clip-path: none;
    width: 100%;
  }
  
  .hero-full .hero-content {
    max-width: 100%;
    text-align: center;
  }
  
  /* Constrained hero mobile - full tint overlay only */
  header.hero-constrained .hero-left-band,
  header.hero-constrained .middle-shadow {
    display: none;
  }
  
  header.hero-constrained::before {
    clip-path: none;
    width: 100%;
  }
  
  header.hero-constrained .hero-tint {
    clip-path: none;
    width: 100%;
    background-color: var(--hero-block-tint);
  }
  
  header.hero-constrained .container {
    max-width: 100%;
  }
}

/*************************************
 * Block Hero (Optional Component)
 *************************************/
.hero-block {
  position: relative;
  border-radius: 0.5rem;
  overflow: hidden;
  height: 100%;
  background: var(--hero-image) no-repeat center center / cover;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem;
  color: white;
}

.hero-block::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--hero-block-tint);
  mix-blend-mode: overlay;
  z-index: 1;
}

.hero-block h2,
.hero-block p,
.hero-block button {
  position: relative;
  z-index: 2;
}

/* Remove the fade effect CSS */
@media (min-width: 992px) {
  /* Only apply fade effect on desktop */
  .hero-full {
    /* transition: opacity 0.3s ease-out; */
  }
}

/*************************************
 * Secondary Hero (Half-height Full-width)
 *************************************/
.hero-secondary {
  position: relative;
  width: 100%;
  height: 175px; /* Half of hero-full's 350px */
  overflow: hidden;
  display: flex;
  align-items: flex-end; /* Change from center to flex-end to align to bottom */
}

/* Background image covers full width */
.hero-secondary .hero-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--hero-image) no-repeat center center / cover;
  z-index: 0;
}

/* Middle tinted overlay container */
.hero-secondary .hero-overlay-container {
  position: absolute;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: flex;
  justify-content: center;
}

/* Single overlay shadow - matches the tinted band exactly */
.hero-secondary .hero-overlay-container .hero-overlay-shadow {
  position: absolute;
  top: 0;
  width: var(--container-max-width, 1320px);
  height: 100%;
  padding: 0 var(--bs-gutter-x, 0.75rem);
  margin: 0 auto;
  pointer-events: none;
  z-index: 2;
}

.hero-secondary .hero-overlay-container .hero-overlay-shadow::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    50deg,
    var(--primary-shadow-color) 35%,
    hsla(var(--primary-color-hsl), 0) 60%
  );
  clip-path: polygon(0 0, 85% 0%, 85% 100%, 0% 100%);
  mix-blend-mode: multiply;
}

/* Left band container */
.hero-secondary .hero-left-container {
  position: absolute;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  display: flex;
  justify-content: flex-start;
}

/* Left solid color panel */
.hero-secondary .hero-left-band {
  position: absolute;
  top: 0;
  left: 0;
  width: calc((100vw - var(--container-max-width, 1320px)) / 2 + 5px);
  height: 100%;
  background-color: var(--primary-color);
  z-index: 1;
}

/* Middle tinted overlay band */
.hero-secondary .hero-overlay-container .hero-overlay {
  position: relative;
  width: var(--container-max-width, 1320px);
  height: 100%;
  padding: 0 var(--bs-gutter-x, 0.75rem);
  margin: 0 auto;
}

.hero-secondary .hero-overlay-container .hero-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--hero-block-tint);
  clip-path: polygon(0 0, 75% 0, 85% 100%, 0% 100%);
  backdrop-filter: blur(3px);
}

/* Solid Color Slant overlay */
.hero-secondary .hero-overlay-container .hero-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--primary-color);
  clip-path: polygon(0 0, 45% 0, 55% 100%, 0% 100%);
  z-index: 3;
}

/* Content container */
.hero-secondary .container {
  position: relative;
  z-index: 4;
}

/* Content styling */
.hero-secondary .hero-content {
  color: white;
  max-width: 100%;
  margin: 0;
  text-align: left;
}

.hero-secondary .hero-content h2 {
  margin: 0 0 1.5rem 0; /* Add bottom margin to the heading */
}

/* Responsive styles for hero-secondary */
@media (max-width: 991.98px) {
  .hero-secondary {
    height: 150px;
  }
  
  .hero-secondary .hero-content h2 {
    margin-bottom: 1.25rem;
  }
}

@media (max-width: 767.98px) {
  .hero-secondary {
    height: 125px;
  }
  
  .hero-secondary .hero-content h2 {
    margin-bottom: 1rem;
  }
}

.ncss-hero-text {
  font-family: 'Merriweather', serif;
  font-weight: 600;
  color: var(--primary-color);
}