/* GG Newsletter Banner (v2) */

.gg-newsletter-banner {
  /* Background image (set inline via CSS variable) */
  background-image: var(--gg-newsletter-banner-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  /* Height control */
  min-height: 240px;
  max-height: 820px;

  /* Spacing + shape */
  margin: 2em 0;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

/* Background overlay */
.gg-newsletter-banner__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.10),
    rgba(255, 255, 255, 0.35)
  );
}

/*
  Layout: CSS Grid:
  Desktop:
    [ content ][ media  ]
    [ actions ][ media  ]
  Mobile:
    content
    media
    actions
*/
.gg-newsletter-banner__inner {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 0; /* was 2.2em 1.2em */
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "media content"
    "media actions";
  gap: 1.2em 1.4em;
  align-items: center;
}

/* Text container */
.gg-newsletter-banner__content {
  grid-area: content;
  max-width: 620px;
  background: white;
  padding: 1.2em;
  border: 1px solid #fff;
  border-radius: 5px;
}

.gg-newsletter-banner__title {
  margin: 0 0 0.4em 0;
  font-size: 1.8em;
  line-height: 1.15;
  /* color: #ffffff !important; */
}

.gg-newsletter-banner__text {
  margin: 0 0 0.8em 0;
  line-height: 1.6;
  font-size: 1.05em;
  /* color: #ffffff; */
}

.gg-newsletter-banner__note {
  margin: 0;
  font-size: 0.95em;
  opacity: 0.9;
  /* color: #ffffff; */
}

/* side image */
.gg-newsletter-banner__media {
  grid-area: media;
  align-self: center;
  justify-self: start;
  /* max-width: 260px; */
  width: 100%;
}

.gg-newsletter-banner__media-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: contain;
}

/* CTA button */
.gg-newsletter-banner__actions {
  grid-area: actions;
  margin-top: 0.6em;
}

.gg-newsletter-banner__button {
  display: inline-block;
  outline: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition-property: background-color, border-color, color, box-shadow, filter;
  transition-duration: .3s;
  border: 1px solid #5f0c82;
  border-radius: 5px;
  letter-spacing: 2px;
  min-width: 160px;
  white-space: normal;
  font-weight: 500;
  text-align: center;
  padding: 16px 21px 21px;
  color: #5f0c82 !important;
  background-color: white;
  height: 48px;
  /* margin-bottom: 6px;
  margin-top: 10px; */
}

.gg-newsletter-banner__button:hover,
.gg-newsletter-banner__button:focus {
  text-decoration: none !important;
  transform: translateY(-1px);
  background-color: #f5edf8;
  color: #5f0c82 !important;
}

.gg-newsletter-banner__button:active {
  transform: translateY(0);
}

/* Responsive tweaks */
@media (min-width: 900px) {
  .gg-newsletter-banner {
    min-height: 320px;
  }
  .gg-newsletter-banner__inner {
    padding: 3em 1.4em;
  }
  .gg-newsletter-banner__title {
    font-size: 2.2em;
  }
}

/* Mobile: image moves below content and above actions */
@media (max-width: 600px) {

/* Let the banner grow naturally (from earlier fix) */
  .gg-newsletter-banner {
    max-height: none;
    min-height: 0;
  }
  .gg-newsletter-banner__inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "content"
      "media"
      "actions";
    gap: 1em;
    text-align: center;
    justify-items: center;
  }

/* Center text block */
  .gg-newsletter-banner__content {
    max-width: 100%;
  }
/* Center the image */
  .gg-newsletter-banner__media {
    justify-self: center;
    max-width: 320px; /*
  }
/* Center the button */
  .gg-newsletter-banner__actions {
    justify-self: center;
  }
}

@media (max-width: 480px) {
  .gg-newsletter-banner {
    min-height: 220px;
    border-radius: 10px;
  }
  .gg-newsletter-banner__inner {
    padding: 1.6em 1em;
  }
  .gg-newsletter-banner__title {
    font-size: 1.55em;
  }
}