/* Newsletter Enhanced Section */
.newsletter-enhanced {
  position: relative;
  overflow: hidden;
  padding: 80px 0;
}

.newsletter-card {
  background: linear-gradient(135deg, var(--bg-alt), #0a1511);
  border: 1px solid rgba(158, 209, 178, 0.15);
  border-radius: 40px;
  padding: 60px 40px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 30px 50px -20px rgba(0, 0, 0, 0.5);
}

.newsletter-card:hover {
  transform: translateY(-10px) scale(1.01);
  border-color: var(--accent);
  box-shadow: 0 40px 60px -20px rgba(158, 209, 178, 0.3);
}

/* Background Patterns */
.newsletter-bg-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.pattern-circle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(158, 209, 178, 0.1) 0%,
    transparent 70%
  );
  animation: floatSlow 20s infinite ease-in-out;
}

.pattern-circle:nth-child(1) {
  width: 300px;
  height: 300px;
  top: -150px;
  right: -100px;
  background: radial-gradient(
    circle,
    rgba(158, 209, 178, 0.15) 0%,
    transparent 70%
  );
}

.pattern-circle:nth-child(2) {
  width: 200px;
  height: 200px;
  bottom: -100px;
  left: -50px;
  background: radial-gradient(
    circle,
    rgba(158, 209, 178, 0.1) 0%,
    transparent 70%
  );
  animation-delay: -5s;
}

.pattern-circle:nth-child(3) {
  width: 150px;
  height: 150px;
  top: 20%;
  left: 20%;
  background: radial-gradient(
    circle,
    rgba(158, 209, 178, 0.05) 0%,
    transparent 70%
  );
  animation-delay: -10s;
}

.pattern-dots {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(
    rgba(158, 209, 178, 0.1) 1px,
    transparent 1px
  );
  background-size: 30px 30px;
  animation: moveDots 30s linear infinite;
}

@keyframes moveDots {
  0% {
    transform: translateX(0) translateY(0);
  }
  100% {
    transform: translateX(30px) translateY(30px);
  }
}

/* Floating Elements */
.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.floating-element {
  position: absolute;
  width: 50px;
  height: 50px;
  background: rgba(158, 209, 178, 0.1);
  border: 1px solid rgba(158, 209, 178, 0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.5rem;
  backdrop-filter: blur(5px);
  animation: float 6s infinite ease-in-out;
}

.element-1 {
  top: 15%;
  left: 10%;
  animation-delay: 0s;
}

.element-2 {
  bottom: 20%;
  right: 12%;
  animation-delay: -2s;
}

.element-3 {
  top: 30%;
  right: 15%;
  animation-delay: -4s;
}

.element-4 {
  bottom: 25%;
  left: 15%;
  animation-delay: -1s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

@keyframes floatSlow {
  0%,
  100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(-20px, 20px);
  }
  50% {
    transform: translate(20px, -20px);
  }
  75% {
    transform: translate(20px, 20px);
  }
}

/* Newsletter Content */
.newsletter-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
  margin: 0 auto;
}

.newsletter-header {
  text-align: center;
  margin-bottom: 40px;
}

.newsletter-badge {
  display: inline-block;
  margin-bottom: 20px;
}

.badge-pulse {
  display: inline-flex;
  align-items: center;
  background: rgba(158, 209, 178, 0.1);
  border: 1px solid rgba(158, 209, 178, 0.2);
  border-radius: 50px;
  padding: 8px 20px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  backdrop-filter: blur(5px);
  animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
  0%,
  100% {
    box-shadow: 0 0 10px rgba(158, 209, 178, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(158, 209, 178, 0.6);
  }
}

.newsletter-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.2;
  position: relative;
  display: inline-block;
}

.text-gradient {
  background: linear-gradient(135deg, var(--accent), #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  display: inline-block;
}

.title-decoration {
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0);
  animation: slideIn 1s ease forwards;
  animation-delay: 0.5s;
}

@keyframes slideIn {
  to {
    transform: scaleX(1);
  }
}

.newsletter-description {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 600px;
  margin: 0 auto;
}

/* Stats Bar */
.newsletter-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  margin-bottom: 50px;
  padding: 20px;
  background: rgba(158, 209, 178, 0.05);
  border-radius: 60px;
  border: 1px solid rgba(158, 209, 178, 0.1);
  backdrop-filter: blur(10px);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-icon {
  width: 40px;
  height: 40px;
  background: rgba(158, 209, 178, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.stat-item:hover .stat-icon {
  background: var(--accent);
  color: var(--bg-main);
  transform: rotate(360deg);
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-divider {
  width: 1px;
  height: 30px;
  background: rgba(158, 209, 178, 0.2);
}

/* Subscription Form */
.subscription-container {
  margin-bottom: 40px;
}

.subscription-form {
  max-width: 600px;
  margin: 0 auto 20px;
}

.form-group {
  display: flex;
  gap: 15px;
  align-items: center;
  background: rgba(158, 209, 178, 0.03);
  border: 1px solid rgba(158, 209, 178, 0.1);
  border-radius: 60px;
  padding: 5px;
  transition: all 0.3s ease;
}

.form-group:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(158, 209, 178, 0.2);
  transform: scale(1.02);
}

.input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 20px;
  color: var(--text-muted);
  font-size: 1rem;
  transition: color 0.3s ease;
}

.input-wrapper:focus-within .input-icon {
  color: var(--accent);
}

.newsletter-input-enhanced {
  width: 100%;
  background: transparent;
  border: none;
  padding: 18px 20px 18px 50px;
  color: var(--text-main);
  font-size: 1rem;
  outline: none;
}

.newsletter-input-enhanced::placeholder {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.input-focus-ring {
  position: absolute;
  bottom: -1px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.input-wrapper:focus-within .input-focus-ring {
  width: calc(100% - 40px);
}

.btn-subscribe {
  position: relative;
  background: linear-gradient(135deg, var(--accent), #78a98a);
  border: none;
  border-radius: 50px;
  padding: 15px 35px;
  color: var(--bg-main);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.btn-subscribe:hover {
  transform: translateX(5px);
  box-shadow: 0 10px 25px rgba(158, 209, 178, 0.4);
}

.btn-subscribe:hover .btn-icon {
  transform: translateX(5px) rotate(45deg);
}

.btn-text {
  position: relative;
  z-index: 2;
}

.btn-icon {
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease;
}

.btn-glow {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.btn-subscribe:hover .btn-glow {
  left: 100%;
}

/* Trust Badges */
.trust-badges {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.trust-item:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

.trust-item i {
  font-size: 1rem;
  color: var(--accent);
}

/* Social Proof */
.social-proof {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid rgba(158, 209, 178, 0.1);
}

.proof-avatars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.avatar-group {
  display: flex;
  align-items: center;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--bg-alt);
  margin-left: -10px;
  background-size: cover;
  background-position: center;
  transition: transform 0.3s ease;
}

.avatar:first-child {
  margin-left: 0;
}

.avatar:hover {
  transform: scale(1.1);
  z-index: 10;
  border-color: var(--accent);
}

.avatar-count {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(158, 209, 178, 0.1);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-left: -5px;
}

.proof-text {
  display: flex;
  align-items: center;
  gap: 5px;
}

.rating-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-left: 5px;
}

/* Success Message */
.success-message {
  display: none;
  align-items: center;
  gap: 20px;
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid rgba(76, 175, 80, 0.3);
  border-radius: 16px;
  padding: 20px;
  margin-top: 20px;
  animation: slideUp 0.5s ease;
}

.success-message.show {
  display: flex;
}

.success-icon {
  width: 50px;
  height: 50px;
  background: rgba(76, 175, 80, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4caf50;
  font-size: 1.5rem;
  animation: pulse 2s infinite;
}

.success-content h4 {
  color: #4caf50;
  margin-bottom: 5px;
  font-size: 1.1rem;
}

.success-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .newsletter-card {
    padding: 40px 20px;
  }

  .newsletter-title {
    font-size: 2.2rem;
  }

  .newsletter-stats {
    flex-direction: column;
    gap: 15px;
    border-radius: 30px;
    padding: 20px;
  }

  .stat-divider {
    width: 50%;
    height: 1px;
  }

  .form-group {
    flex-direction: column;
    background: transparent;
    border: none;
    padding: 0;
  }

  .input-wrapper {
    width: 100%;
    background: rgba(158, 209, 178, 0.03);
    border: 1px solid rgba(158, 209, 178, 0.1);
    border-radius: 60px;
    margin-bottom: 10px;
  }

  .btn-subscribe {
    width: 100%;
    justify-content: center;
  }

  .trust-badges {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .proof-avatars {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 576px) {
  .newsletter-title {
    font-size: 1.8rem;
  }

  .floating-element {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .stat-item {
    width: 100%;
    justify-content: center;
  }
}

/* Additional CSS for enhanced newsletter functionality */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Form submitting state */
.form-group.is-submitting {
  opacity: 0.8;
  pointer-events: none;
}

/* Error state animation */
.form-group.has-error {
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

/* Success message error state */
.success-message.error {
  background: rgba(244, 67, 54, 0.1);
  border-color: rgba(244, 67, 54, 0.3);
}

.success-message.error .success-icon {
  background: rgba(244, 67, 54, 0.2);
}

/* Input validation styles */
.newsletter-input-enhanced:invalid {
  border-color: #f44336;
}

.newsletter-input-enhanced:valid {
  border-color: var(--accent);
}

/* Toast notification enhancements */
.toast-notification {
  z-index: 9999;
}

/* Disabled button state */
.btn-subscribe:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-subscribe:disabled:hover {
  transform: none;
  box-shadow: none;
}
