/* Newsletter Section */

.newsletter-section {
  padding-block: clamp(38px, 4vw, 110px);
  background: #fff;
  width: 100%;
}

.newsletter-container {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
}

.newsletter-image .image-container {
  width: min(680px, 100%);
  aspect-ratio: 4 / 3;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.newsletter-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---- Right (green card) ---- */
.newsletter-content {
  position: relative;
  z-index: 1;
}

.newsletter-card {
  position: relative;
  isolation: isolate;
  width: clamp(460px, 46vw, 560px);
  min-height: clamp(260px, 28vw, 340px);
  margin-left: -72px;
  border-radius: calc(var(--radius) + 2px);
  color: #fff;
  padding: clamp(24px, 4vw, 40px);
  display: flex;
  gap: 15px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #16a534;
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.28);
  overflow: hidden;
  cursor: pointer;
}

.newsletter-icon {
  width: 56px;
  height: 56px;
  color: #fff;
  opacity: 0.95;
}

.newsletter-title {
  margin: 2px 0;
  font-weight: 800;
  font-size: 25px;
  letter-spacing: -0.01em;
}

.newsletter-description {
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  line-height: 1.65;
  max-width: 52ch;
}

.newsletter-form {
  display: flex;
  gap: 0;
  border-radius: 9999px;
  overflow: hidden;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 24px rgba(0, 0, 0, 0.18);
}

.field-wrap {
  position: relative;
  flex: 1;
}

.email-input {
  width: 100%;
  height: var(--pill-h);
  padding: 0 16px 0 20px;
  border: 0;
  outline: none;
  font-size: 15px;
  color: #0a0c12;
  background: transparent;
}

.email-input::placeholder {
  color: #a8b0b8;
}

#email-field.has-error .email-input {
  outline: 2px solid #fca5a5;
  outline-offset: -2px;
}

.error-msg {
  position: absolute;
  left: 20px;
  right: 20px;
  top: calc(100% + 6px);
  font-size: 12px;
  color: #ffd4d4;
  opacity: 0;
  transform: translateY(4px);
  transition: 0.2s;
}

#email-field.has-error .error-msg {
  opacity: 1;
  transform: translateY(0);
}

.subscribe-button {
  height: 65px;
  padding: 0 clamp(18px, 3.4vw, 28px);
  border: 0;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  background: #16a534;
  box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.08);
}

.subscribe-button:hover {
  filter: brightness(1.04);
}

.subscribe-button:active {
  transform: translateY(1px);
}

.subscribe-button:disabled {
  opacity: 0.85;
  cursor: default;
}

.newsletter-form:focus-within {
  box-shadow: 0 0 0 3px rgba(31, 179, 74, 0.35), 0 10px 24px rgba(0, 0, 0, 0.18);
}

@media (max-width: 900px) {
  .newsletter-section {
    padding: 0;
  }

  .newsletter-container {
    margin: 0 auto;
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .newsletter-photo img {
    border-radius: 16px;
    max-width: 100%;
  }

  .newsletter-image .image-container {
    margin: 0 auto;
  }

  .newsletter-card {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
  }

  .newsletter-photo img {
    width: 100%;
  }

  .email-input {
    padding: 14px 16px 0 40px;
  }
}

@media (max-width: 768px) {
  .newsletter-container {
    margin: 0 20px;
    grid-template-columns: 1fr;
    gap: 30px;
  }
}
