/* ==========================================================================
   SUBSCRIPTION / NEWSLETTER SECTION
   ========================================================================== */

/* Section wrapper - full width with minimal side padding */
.section-subscription {
  padding: var(--section-padding-y) 24px;
  background: #004222;
  display: flex;
  justify-content: center;
  align-items: center;
}

.section-subscription .container {
  max-width: 100%;
  padding: 0;
  margin: 0;
}

/* Newsletter box - constrained width with background image */
.newsletter-box {
  background-image: url('../assets/heroes/newsletter-bg.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 48px;
  padding: 32px 40px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  max-width: 780px;
  width: 100%;
  height: 245px;
  margin: 0 auto;
}

/* Gradient overlay for readability */
.newsletter-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.12) 55%, rgba(0, 0, 0, 0.05) 100%);
  z-index: 1;
  border-radius: inherit;
}

/* Newsletter title - left column */
.newsletter-title {
  position: relative;
  z-index: 2;
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin: 0;
  line-height: 1.4;
  max-width: 50%;
}

/* Form container - white capsule */
.newsletter-form {
  position: relative;
  z-index: 3;
  display: flex;
  gap: 0;
  align-items: center;
  flex-wrap: nowrap;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 100px;
  padding: 0;
  margin: 0;
  height: 60px;
  width: 100%;
}

/* Form group wrapper */
.newsletter-form .form-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  flex: 1;
  margin: 0;
  padding: 0 24px;
  min-width: 0;
}

/* Label - screen reader only */
.newsletter-form label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Email input field */
.newsletter-form input[type="email"] {
  padding: 10px 16px;
  border: none;
  background: transparent;
  font-size: 16px;
  color: #333;
  flex: 1;
  min-width: 0;
  outline: none;
}

.newsletter-form input[type="email"]::placeholder {
  color: #999;
}

/* Submit button - sentence case, matches btn-primary style */
.newsletter-form button[type="submit"] {
  background: var(--color-green-200);
  color: var(--color-green-900);
  border: none;
  border-radius: 100px;
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
  font-weight: var(--font-bold);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-all);
  flex-shrink: 0;
  text-transform: none;
  letter-spacing: 0;
  margin-left: auto;
  align-self: center;
  width: auto !important;
}

.newsletter-form button[type="submit"]:hover {
  background: var(--color-green-400);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}

.newsletter-form button[type="submit"]:active {
  background: var(--color-green-400);
  transform: translateY(0);
}

@media (max-width: 768px) {
  .section-subscription {
    padding: var(--section-padding-y-mobile) var(--section-padding-x-mobile);
  }
  .newsletter-box {
    width: 100%;
    max-width: 100%;
    min-height: 0;
    height: auto;
    padding: var(--space-6) var(--space-5);
    border-radius: var(--radius-3xl);
    gap: var(--space-4);
    background-size: cover;
    background-position: center;
  }
  .newsletter-box::before {
    border-radius: inherit;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.22) 0%, rgba(0, 0, 0, 0.14) 65%, rgba(0, 0, 0, 0.08) 100%);
  }
  .newsletter-title {
    max-width: 100%;
    font-size: var(--text-base);
    line-height: 1.3;
  }
  .newsletter-form {
    position: static;
    width: 100%;
    flex-direction: row;
    align-items: center;
    overflow: hidden;
    min-height: 52px;
  }
  .newsletter-form .form-group {
    flex: 1;
    min-width: 0;
    padding: 0 var(--space-4);
  }
  .newsletter-form input[type="email"] {
    font-size: var(--text-base);
    padding: var(--space-2) var(--space-3);
  }
  .newsletter-form button[type="submit"] {
    flex-shrink: 0;
    font-size: 0.95rem;
    padding: var(--space-2) var(--space-3);
    max-width: none;
    margin: 0 var(--space-2) 0 0;
    white-space: nowrap;
    line-height: 1.2;
  }
}

@media (max-width: 430px) {
  .newsletter-box {
    padding: var(--space-5) var(--space-4);
    border-radius: var(--radius-2xl);
  }

  .newsletter-title {
    font-size: var(--text-sm);
    line-height: 1.28;
  }

  .newsletter-form {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2);
    height: auto;
    min-height: 0;
    padding: var(--space-2);
    border-radius: var(--radius-xl);
  }

  .newsletter-form .form-group {
    width: 100%;
    padding: 0 var(--space-3);
    min-height: 44px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.92);
  }

  .newsletter-form input[type="email"] {
    font-size: 0.95rem;
    padding: var(--space-2) 0;
  }

  .newsletter-form button[type="submit"] {
    width: 100% !important;
    margin: 0;
    padding: 10px 14px;
    font-size: 0.95rem;
    border-radius: var(--radius-full);
  }
}
