/* ==========================================
   NEWSLETTER SECTION - APPLE STYLE
   ========================================== */

.newsletter-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-primary);
}

.newsletter-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: var(--border-radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.newsletter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.05) 0%, rgba(48, 209, 88, 0.03) 100%);
    pointer-events: none;
}

.newsletter-content h3 {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.newsletter-content .lead {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.newsletter-privacy {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    margin: 0;
    display: flex;
    align-items: center;
}

.newsletter-privacy i {
    color: var(--accent-color);
}

.newsletter-form {
    position: relative;
    z-index: 2;
}

.newsletter-input-group {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--border-radius);
    padding: 0.5rem;
    transition: var(--transition-fast);
}

.newsletter-input-group:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.newsletter-input {
    background: transparent !important;
    border: none !important;
    color: var(--text-primary) !important;
    font-size: 17px;
    font-weight: 500;
    padding: 0.875rem 1rem !important;
    box-shadow: none !important;
}

.newsletter-input::placeholder {
    color: var(--text-tertiary);
}

.newsletter-input:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

.newsletter-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    border: none;
    color: white;
    font-weight: 600;
    font-size: 16px;
    padding: 0.875rem 1.5rem;
    border-radius: calc(var(--border-radius) - 4px);
    transition: var(--transition-fast);
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
}

.newsletter-btn:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #004494 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
    color: white;
}

.newsletter-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
}

#newsletter-success {
    background: rgba(48, 209, 88, 0.1);
    border: 1px solid rgba(48, 209, 88, 0.3);
    color: var(--accent-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    font-weight: 500;
}

/* Mobile Responsiveness */
@media (max-width: 991.98px) {
    .newsletter-card {
        padding: 2rem;
    }
    
    .newsletter-content {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .newsletter-content h3 {
        font-size: 1.75rem;
    }
    
    .newsletter-input-group {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .newsletter-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 767.98px) {
    .newsletter-section {
        margin-top: 3rem;
        padding-top: 2rem;
    }
    
    .newsletter-card {
        padding: 1.5rem;
    }
    
    .newsletter-content h3 {
        font-size: 1.5rem;
    }
    
    .newsletter-content .lead {
        font-size: 1rem;
    }
}

/* ==========================================
   TURNSTILE INTEGRATION
   ========================================== */

.turnstile-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    min-height: 65px; /* Reserve space for Turnstile widget */
}

.turnstile-wrapper .cf-turnstile {
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* Dark mode adjustments for Turnstile */
[data-bs-theme="dark"] .turnstile-wrapper iframe {
    filter: brightness(0.9) contrast(1.1);
}

/* Mobile adjustments for Turnstile */
@media (max-width: 768px) {
    .turnstile-wrapper {
        transform: scale(0.9);
        transform-origin: center;
    }
}
