/* ===== NEWSLETTER ENHANCED STYLES ===== */

.newsletter {
    border-radius: var(--radius);
    padding: 80px 32px;
    /* Background vibrante com gradiente animado */
    background: linear-gradient(135deg, 
        #00e0ff 0%, 
        #ff0066 25%, 
        #8b5cf6 50%, 
        #00e0ff 75%, 
        #ff0066 100%
    );
    background-size: 400% 400%;
    animation: gradientShift 8s ease-in-out infinite;
    text-align: center;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 32px;
    box-shadow: 
        0 20px 40px rgba(0, 224, 255, 0.3),
        0 0 60px rgba(255, 0, 102, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    margin-top: 80px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animação do gradiente de fundo */
@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Overlay para melhor legibilidade */
.newsletter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.15);
    z-index: 0;
}

/* Partículas animadas melhoradas */
.newsletter .particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.newsletter .particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 6s infinite ease-in-out;
}

.newsletter .particle:nth-child(odd) {
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.8);
    animation-duration: 8s;
}

.newsletter .particle:nth-child(even) {
    width: 2px;
    height: 2px;
    background: rgba(0, 224, 255, 0.9);
    animation-duration: 10s;
}

.newsletter .particle.magenta {
    background: rgba(255, 0, 102, 0.8);
    animation-duration: 7s;
}

@keyframes particleFloat {
    0%, 100% {
        opacity: 0;
        transform: translateY(100px) scale(0);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(1);
    }
}

/* Container com z-index maior */
.newsletter > .container {
    position: relative;
    z-index: 2;
}

/* Título com efeito neon */
.newsletter h3 {
    font-family: var(--font-pixel);
    font-size: clamp(1.5rem, 4vw, 2rem);
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(0, 224, 255, 0.6),
        0 0 30px rgba(0, 224, 255, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from {
        text-shadow: 
            0 0 10px rgba(255, 255, 255, 0.8),
            0 0 20px rgba(0, 224, 255, 0.6),
            0 0 30px rgba(0, 224, 255, 0.4),
            0 2px 4px rgba(0, 0, 0, 0.3);
    }
    to {
        text-shadow: 
            0 0 15px rgba(255, 255, 255, 1),
            0 0 25px rgba(0, 224, 255, 0.8),
            0 0 35px rgba(0, 224, 255, 0.6),
            0 2px 4px rgba(0, 0, 0, 0.3);
    }
}

/* Descrição com melhor contraste */
.newsletter p {
    font-size: 1.1rem;
    max-width: 600px;
    margin-inline: auto;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    line-height: 1.6;
    font-weight: 500;
}

/* Formulário melhorado */
.newsletter form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    max-width: 650px;
    margin-inline: auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Input melhorado */
.newsletter input[type="email"] {
    flex: 1 1 300px;
    padding: 18px 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    font-weight: 500;
}

.newsletter input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

.newsletter input[type="email"]:focus {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 
        0 0 20px rgba(255, 255, 255, 0.3),
        0 0 40px rgba(0, 224, 255, 0.2);
    transform: translateY(-2px);
}

/* Botão melhorado com animações */
.newsletter button[type="submit"] {
    padding: 18px 36px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
    color: #1a1a1a;
    font-weight: 700;
    font-family: var(--font-sans);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.2),
        0 0 20px rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.newsletter button[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(255, 255, 255, 0.5);
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
}

.newsletter button[type="submit"]:active {
    transform: translateY(-1px);
}

/* Efeito ripple no botão */
.newsletter button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(0, 224, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.newsletter button[type="submit"]:active::before {
    width: 300px;
    height: 300px;
}

/* Texto pequeno melhorado */
.newsletter small {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    font-weight: 400;
}

/* Mensagem de sucesso */
#newsletterSuccessMessage {
    color: #fff !important;
    background: rgba(0, 224, 255, 0.2);
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid rgba(0, 224, 255, 0.4);
    backdrop-filter: blur(5px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Responsividade */
@media (max-width: 768px) {
    .newsletter {
        padding: 60px 20px;
        margin-top: 60px;
    }
    
    .newsletter form {
        padding: 16px;
        gap: 16px;
    }
    
    .newsletter input[type="email"] {
        flex: 1 1 100%;
        padding: 16px 20px;
    }
    
    .newsletter button[type="submit"] {
        flex: 1 1 100%;
        padding: 16px 24px;
    }
    
    .newsletter h3 {
        font-size: 1.3rem;
        letter-spacing: 1px;
    }
    
    .newsletter p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .newsletter {
        padding: 40px 16px;
    }
    
    .newsletter h3 {
        font-size: 1.2rem;
    }
    
    .newsletter p {
        font-size: 0.95rem;
    }
}