/* ================================================================
   NEWSLETTER SECTION STYLES
   Add this to your existing style.css or include as separate file
   ================================================================ */

.newsletter-section {
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darkest) 50%, #0c1e35 100%);
  border-top: 1px solid rgba(8,145,178,0.15);
  border-bottom: 1px solid rgba(8,145,178,0.15);
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.newsletter-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.newsletter-content {
  max-width: 540px;
}

.newsletter-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--primary);
  border: 1px solid rgba(8,145,178,0.3);
  background: rgba(8,145,178,0.07);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  margin-bottom: 20px;
}

.newsletter-title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 16px;
}
.newsletter-title em {
  font-style: italic;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.newsletter-desc {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 32px;
}

/* Form */
.newsletter-form {
  margin-bottom: 32px;
}

.newsletter-input-wrap {
  display: flex;
  gap: 0;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-full);
  padding: 6px;
  transition: all 0.3s ease;
  position: relative;
}
.newsletter-input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(8,145,178,0.1), 0 8px 32px rgba(8,145,178,0.15);
  transform: translateY(-2px);
}

.newsletter-input-icon {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: var(--text-base);
  pointer-events: none;
  transition: color 0.3s ease;
}
.newsletter-input-wrap:focus-within .newsletter-input-icon {
  color: var(--primary);
}

.newsletter-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 14px 16px 14px 48px;
  font-size: var(--text-base);
  font-family: var(--font-body);
  color: var(--text-primary);
  outline: none;
  min-width: 0;
}
.newsletter-input-wrap input::placeholder {
  color: var(--text-muted);
}

.newsletter-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-size: var(--text-base);
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.newsletter-submit:hover {
  transform: translateX(4px);
  box-shadow: 0 8px 24px rgba(8,145,178,0.4);
  filter: brightness(1.1);
}
.newsletter-submit:active {
  transform: translateX(2px) scale(0.98);
}
.newsletter-submit.loading {
  opacity: 0.7;
  pointer-events: none;
}
.newsletter-submit.success {
  background: linear-gradient(135deg, var(--success), #059669);
}

/* Messages */
.newsletter-error {
  display: block;
  font-size: var(--text-sm);
  color: var(--danger);
  margin-top: 10px;
  min-height: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.newsletter-error.show {
  opacity: 1;
}

.newsletter-success {
  display: none;
  font-size: var(--text-sm);
  color: var(--success);
  margin-top: 10px;
  align-items: center;
  gap: 6px;
}
.newsletter-success.show {
  display: flex;
}
.newsletter-success i {
  font-size: var(--text-base);
}

/* Stats */
.newsletter-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 24px;
}
.ns-stat {
  text-align: center;
}
.ns-stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.ns-stat-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* Privacy note */
.newsletter-privacy {
  font-size: var(--text-xs);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.newsletter-privacy i {
  color: var(--success);
}
.newsletter-privacy a {
  color: var(--primary);
  text-decoration: underline;
  transition: color 0.3s ease;
}
.newsletter-privacy a:hover {
  color: var(--accent);
}

/* Visual Side */
.newsletter-visual {
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.newsletter-orb {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(8,145,178,0.15), transparent 70%);
  animation: orbFloat 8s ease-in-out infinite alternate;
  filter: blur(40px);
}

.newsletter-pattern {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(8,145,178,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8,145,178,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  border-radius: var(--radius-xl);
  opacity: 0.5;
}

.newsletter-floating-icons {
  position: relative;
  width: 100%;
  height: 100%;
}
.newsletter-floating-icons i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  font-size: 1.5rem;
  color: rgba(8,145,178,0.3);
  animation: floatIcon 4s ease-in-out infinite;
  animation-delay: var(--delay);
}
@keyframes floatIcon {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.3; }
  50% { transform: translateY(-20px) rotate(10deg); opacity: 0.6; }
}

/* Responsive */
@media (max-width: 1024px) {
  .newsletter-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .newsletter-visual {
    height: 250px;
    order: -1;
  }
  .newsletter-orb {
    width: 200px;
    height: 200px;
  }
}

@media (max-width: 768px) {
  .newsletter-section {
    padding: 72px 0;
  }
  .newsletter-input-wrap {
    flex-direction: column;
    border-radius: var(--radius-lg);
    padding: 8px;
  }
  .newsletter-input-wrap input {
    padding: 12px 12px 12px 40px;
    text-align: center;
  }
  .newsletter-input-icon {
    left: 16px;
  }
  .newsletter-submit {
    width: 100%;
    justify-content: center;
    border-radius: var(--radius-md);
  }
  .newsletter-stats {
    gap: 20px;
    justify-content: center;
  }
  .newsletter-floating-icons i {
    font-size: 1.2rem;
  }
}

/* Light theme */
[data-theme="light"] .newsletter-section {
  background: linear-gradient(135deg, #f4f8fc 0%, #e9f1f9 50%, #ffffff 100%);
}
[data-theme="light"] .newsletter-input-wrap {
  background: #ffffff;
  border-color: #dde8f4;
}
[data-theme="light"] .newsletter-orb {
  background: radial-gradient(circle, rgba(8,145,178,0.1), transparent 70%);
}
[data-theme="light"] .newsletter-pattern {
  background-image: 
    linear-gradient(rgba(8,145,178,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8,145,178,0.06) 1px, transparent 1px);
}
