.hero {
  display: flex;
  flex-direction: column;
  gap: 54px;
  align-items: center;
  min-height: 500px;
  background-color: var(--color-gray-100);
  overflow: hidden;
  padding-top: 32px;
  position: relative;
}

/* Hero CGI Variant - Overlay Layout */
.hero--cgi {

  position: relative;
  background: linear-gradient(135deg, rgba(241, 107, 80, 0.05) 0%, rgba(255, 255, 255, 0.9) 100%);

  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0px;

  @media (min-width: 1440px) {
    min-height: auto;
    height: auto;
  }

  @media (min-width: 769px) and (max-width: 1439px) {
    min-height: auto;
    height: auto;
  }

  @media (max-width: 768px) {
    min-height: auto;
    height: auto;
    /* padding: 0px; */
  }
}

/* Hero Background */
.hero__background {
  position: relative;
  inset: 0;
  z-index: 0;

  @media (max-width: 767px) {
    width: 100%;
  }

  @media (max-width: 425px) {
    height: 675px;
  }
}

.hero__background img {
  width: 100%;
  /*height: 100%;*/
  object-fit: cover;
  height: auto;
}



.hero__bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 59.03% 49.34%;
}

.hero__container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap);
  align-items: center;
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  position: relative;
  z-index: 2;


  @media (max-width: 767px) {
    min-height: auto;
    bottom: 24px;
    flex-direction: column;
  }

}


.hero--cgi .hero__container {

  position: absolute;
  z-index: 3;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: auto;
  min-height: auto;

  @media (min-width: 1440px) {
    height: 100%;
    min-height: 700px;
  }

  @media (max-width: 768px) {
    height: auto;
    min-height: 350px;
    position: absolute;
  }

}

.hero--cgi .hero__content {
  max-width: 388px;
  text-align: left;
  margin-top: -100px;
  z-index: 4;

  @media (min-width: 769px) {
    margin-top: 40px;
  }
}

.hero--cgi .hero__title {
  color: var(--color-primary);
  text-shadow: 0 0 40px rgba(0, 0, 0, 0.50), 0 0 40px #000, 0 0 60px #000;
  /* H1 */
  font-size: 52px;
  font-style: normal;
  font-weight: 400;
  font-family: var(--font-tilt-neon);
  margin-bottom: var(--space-md);
  line-height: 1.2;
}

.hero--cgi .hero__title-main {
  color: var(--color-primary-dark);
  font-size: 52px;
  font-weight: var(--font-weight-normal);
  display: block;
  margin-bottom: 0;
  font-style: normal;
  line-height: 60px;
  align-self: stretch;
  text-shadow: none;

  @media (max-width: 767px) {
    margin-bottom: 0px;
  }
}

.hero--cgi .hero__title-sub {
  color: var(--color-secondary);
  font-size: 1.8rem;
  font-weight: var(--font-weight-medium);
  display: block;
  line-height: 1.3;
  margin-bottom: var(--space-md);
  text-shadow: none;
}

.hero--cgi .hero__title-sub-2 {
  margin-bottom: 0;
}

.section {
  padding: var(--space-5xl) 0;
  position: relative;
  overflow: hidden;
}

/* Event Section */
.section--event {
  padding: 0;
  background-size: 185.25% 605.45%;
  background-position: top;
  background-repeat: no-repeat;
  opacity: 1;
  position: relative;
  z-index: 4;

  @media (min-width: 1300px) {
    margin-top: -130px !important;
    padding-bottom: 60px;
  }

  background-image: none;
  background-color: unset;

  margin-top: 0px;

  @media (max-width: 767px) {
    padding-bottom: 40px;
    padding-top: 40px;
  }


  @media (min-width: 768px) and (max-width: 1300px) {
    margin-top: 0px;
    padding-top: 60px;
    background-image: url('../../images/backgrounds/lab-background.png') !important;
    background-size: cover !important;
    padding-bottom: 60px;
  }

}

.section--event::before {

  content: '';
  position: absolute;
  height: 18px;
  width: 100%;
  top: auto;
  bottom: 60%;
  left: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    #DEE1E3 0%,
    #FFFBE6 25.48%,
    #D4CBBF 59.62%,
    #EDECEC 79.81%,
    #D6D4BA 100%
  );

  @media (min-width: 1300px) {
    content: '';
    position: absolute;
    height: 18px;
    width: 100%;
    top: auto;
    bottom: 60%;
    left: 0;
    z-index: 1;
    background: linear-gradient(
      90deg,
      #DEE1E3 0%,
      #FFFBE6 25.48%,
      #D4CBBF 59.62%,
      #EDECEC 79.81%,
      #D6D4BA 100%
    );
  }
}

.section--event::after {
  content: '';
  position: absolute;
  height: 60%; /* Show only bottom 50% */
  width: 200%;
  bottom: 0;
  left: 0;
  z-index: 1;
  background-image: url('../../images/backgrounds/brick-background.webp') !important;
  background-repeat: no-repeat !important;
  background-size: 185.25% 1000%;
  background-position: center bottom !important;

  @media (min-width: 1300px) {
    background-image: url('../../images/backgrounds/brick-background.webp') !important;
    background-repeat: no-repeat !important;
    background-size: 185.25% 1000%;
    background-position: center bottom !important;
  }
}

/* Section Container */
.section__container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.section--event .section__container {
  position: relative;
  z-index: 2;
}

/* Event Card */
.event-card {
  padding: var(--space-lg);
  margin: 0 auto;
  border: 2px solid var(--color-primary);
  @media (min-width: 769px) {
    max-width: 70%;
  }
}

.event-card-wrapper {
  padding: 24px;
}

.event-card__content {
  text-align: center;
  padding: 10px 0 var(--space-lg) 0;

  @media (max-width: 767px) {
    padding: 0px;
  }
}

.event-card__title {
  font-family: var(--font-tilt-neon);
  color: var(--color-primary);
  line-height: normal;
  margin-bottom: var(--space-md, 1rem);
  font-weight: var(--font-weight-normal);
  font-size: 40px;
}

.event-card__text {
  font-family: var(--font-agenda);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 24px;
  margin-bottom: var(--space-lg, 1.5rem);

  @media (max-width: 767px) {
    margin-bottom: 24px;
  }
}

/* Confidence Section */
.section--confidence {
  background-color: var(--color-primary);
  padding: var(--space-4xl) 0;
  color: var(--color-white);
  box-shadow: var(--shadow-card);
  /* top: -206px; */

  @media (min-width: 1400px) {
    background-image: url(/themes/custom/dawnzera_full/images/backgrounds/updated-desktop-pipe-upper.webp);
    background-repeat: no-repeat;
    background-position: left top 1rem;
  }
}

.confidence__content {
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}

.confidence__title {
  font-family: var(--font-tilt-neon);
  font-size: 32px;
  color: var(--color-white);
  margin-bottom: var(--space-lg);
}

.confidence__subtitle {
  font-family: var(--font-agenda);
  font-size: 26px;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: var(--space-lg);
}

.confidence__buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: 1440px;
  margin: 0 auto;

  @media (min-width: 1086px) {
    flex-direction: row;
  }
}

.confidence__button-row {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.confidence__button-row .btn {
  flex: 0 1 auto;
  align-items: center;
  align-self: stretch;
  justify-content: space-between;
  width: auto;
  min-width: 503px;
  height: auto;
  padding: var(--space-sm) 20px var(--space-sm) 22px;
  line-height: 1.4;
}

.confidence__button-row .btn:hover {
  background-color: #FCEEE7;
  text-decoration: none;
  color: var(--color-primary);
  border: 2.4px solid var(--color-primary);
}

.confidence__button-row .btn:focus {
  outline: 2px solid #FFFFFF;
  outline-offset: 2px;
}

/* Ionis Section */
.section-ionis {

  background-image: url('../../images/backgrounds/brick-background.webp');
  background-size: 185.25% 500%;
  background-position: top;
  background-repeat: no-repeat;

  opacity: 1;
  position: relative;
  padding: 0px;

  @media (max-width: 767px) {
    display: flex;
    flex-direction: column;
    gap: 40px;
  }
}

.section-ionis-inner-wrapper {
  padding: 40px 0;
  @media (max-width: 767px) {
    padding: 0px;
  }
}

.section-ionis-wrapper {

  @media (min-width: 1400px) {
    background-image: url(/themes/custom/dawnzera_full/images/backgrounds/updated-desktop-pipe-lower.webp);
    background-repeat: repeat-y;
    background-size: auto;
    background-position: left top;
  }

}

.bottom-pipe {
  width: 100%;

  img {
    width: 97%;
  }

  &.lower-pipe {
    margin-left: 1.5rem;
  }
}

.section--ionis::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-overlay-light);
  z-index: 1;
}

.section--ionis .section__container {
  position: relative;
  z-index: 2;
}

/* Ionis Card */
.ionis-card {
  border-radius: 24px;
  padding: var(--space-2xl);
  margin: 0 auto;
  box-shadow: var(--shadow-card);
  border: 8px solid transparent;
  max-width: 1200px;
  background: linear-gradient(white, white) padding-box, linear-gradient(90deg, #DEE1E3, #FFFBE6, #D4CBBF, #EDECEC, #D6D4BA) border-box;


  @media (max-width: 767px) {
    padding: 32px;
  }
}

.ionis-card__content {
  display: flex;
  gap: var(--space-xl);
  align-items: flex-start;
}

.ionis-card__logo {
  flex-shrink: 0;

  @media (max-width: 768px) {
    align-self: center;
  }
}

.ionis-logo {
  width: 305px;
  height: 176px;
}

.ionis-card__text {
  flex: 1;
}

.ionis-card__title {
  font-family: var(--font-tilt-neon);
  font-size: 32px;
  color: var(--color-text-primary);
  line-height: 1.2;
  margin-bottom: var(--space-lg);
  font-weight: var(--font-weight-normal);

  @media (max-width: 767px) {
    margin-bottom: 22px;
  }
}

.ionis-card__description {
  font-family: var(--font-agenda);
  font-size: 20px;
  color: var(--color-text-primary);
  line-height: 1.4;
  margin-bottom: var(--space-xl);

  @media (max-width: 767px) {
    margin-bottom: 22px;
  }
}

/************ Pipes Section ***************/

.section--pipes {
  max-width: 1440px;
  height: 1px;
  margin: 0 auto;
  position: relative;
}
.section--pipes-mobile {
  display: none;
}
@media (max-width: 641px) {
  .action-cards-section {
    padding-top: 0;
  }
  .section--pipes-mobile {
    display: block;
    margin-bottom: 50px;
  }
}
/* Desktop */
.pipes-container {
  img {
    display: none;
  }
}
@media (min-width: 1400px) {
  .pipes-container {
    background: unset;
    height: 913px;
    width: 86px;
    margin-bottom: 50px;
    position: absolute;
    top: -6vw;
    right: 0;
    z-index: 5;
  }

  .pipes-container img {
    display: block;
    height: 100%;
  }
}

/* Pipes Section Left */

.section--pipes-left {
  max-width: 1440px;
  height: 1px;
  margin: auto 0;
  position: relative;
  top: -335px;
  display: none;
}
.section--pipes-mobile {
  display: none;
}
@media (max-width: 641px) {
  .action-cards-section {
    padding-top: 0;
  }
  .section--pipes-mobile {
    display: block;
    margin-bottom: 50px;
  }
}

.pipes-container-left {
  img {
    display: none;
  }
}
@media (min-width: 1400px) {
  .pipes-container-left {
    background: unset;
    height: 700px;
    width: 86px;
    margin-bottom: 50px;
    position: absolute;
    top: -143px;
    left: 0; /* ← Move to the left */
    z-index: 5;
  }

  .pipes-container-left img {
    display: block;
    max-height: 690px;
    height: 100%;
  }
}

/* Default to show desktop image */
.desktop-only {
  display: block;
}
.mobile-only {
  display: none;
}

/* Mobile Styles */
@media (max-width: 767px) {

  .desktop-only {
    display: none;
  }
  .mobile-only {
    display: block;
  }


  .hero--cgi .hero__content {
    margin-top: 600px;
  }

  .hero--cgi .hero__title-main {
    font-size: 42px;
    line-height: 1.1;
  }

  .hero--cgi .hero__title-sub {
    font-size: 26px;
    margin-bottom: 24px;
  }

  .hero--cgi .hero__title-sub-2 {
    margin-bottom: 0;
  }

  .btn--primary {
    width: 100%;
  }

  .hero__background img {
    width: 100%;
    height: auto;       /* height adapts to full image size */
    object-fit: contain;
  }

  /* Adjust other elements to move down as per image height */
  .hero__container {
    position: relative;
    margin-top: 10px;   /* space after image */
  }


  .event-card {
    position: relative;
  }

  .section--event::before {
    background: none;
  }

  .section--event::after {
    top: 200px;
    height: 100%;
  }

  .event-card__title {
    font-size: 24px;

    @media (max-width: 767px) {
      font-size: 26px;
      margin-bottom: 1rem;
    }
  }

  .section--confidence {
    padding: 40px 0;
  }

  .confidence__content {
    position: relative;
    text-align: left;
    max-width: none;
  }

  .confidence__title {
    font-size: 26px;
    font-weight: 400;
  }

  .confidence__subtitle {
    font-size: 26px;
  }

  .confidence__button-row .btn {
    max-width: none;
    width: 100%;
    min-width: 0;
    text-align: left;
    gap: 10px;
    padding: 10px 21px 8px 29px;
    line-height: normal;
  }

  .ionis-card__content {
    text-align: left;
  }

}

@media (max-width: 440px) {
  .hero__title-sub.mobile-hide-br br {
    display: none;
  }
}

/* Tablet Styles */
@media (min-width: 768px) and (max-width: 1024px) {
  .hero--cgi .hero__content {
    max-width: 245px;
    text-align: left;
    margin-top: 50px;
    z-index: 4;
  }
  .hero--cgi .hero__title-main {
    font-size: 35px;
    line-height: 1.1;
    padding: 5px;
  }
  .hero--cgi .hero__title-sub {
    font-size: 25px;
    line-height: 1.1;
    padding: 5px;
  }
}

/* Laptop and Small Desktop Styles */
@media (min-width: 1024px) and (max-width: 1279px) {
  .hero--cgi .hero__content {
    max-width: 35%;
    text-align: left;
    margin-top: 100px;
    z-index: 4;
  }
}

.event_2 {
  border-radius: 24px;
  border: 2px solid #E2422D;
  background: #FFF;
  box-shadow: 0 0 8px 0 #C94808, 0 0 8px 0 #E08A67;
  padding: 0px;
}

.event_3 {
  border-radius: 22px;
  border: 2px solid #F59785;
  background: #FFF;
}

.event_4 {
  border-radius: 20px;
  border: 2px solid #FDE5E0;
  background: #FFF;
}

.event_5 {
  border-radius: 18px;
  background: #FFF;
  box-shadow: 0 0 8px 0 #C94808 inset, 0 0 8px 0 #E08A67 inset;
}
@media (min-width:1400px){
  .home-page-top-pipe {
    top: -150px;
  }

}

@media (min-width:768px) {
  .btn--primary{
    padding-left: 24px;
    padding-right: 24px;
    max-width: fit-content;
    width: 100%;
  }
}

.hero.hero--cgi .hero__container .hero__content .why-dawnzera-btn {
  border: 2px solid #C94808;
}

@media (max-width:768px) {
  .section-ionis .section__container{
    margin-block: 40px; 
  }
}