/* Newsletter Floating Button */
.newsletter-floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #00507d;
    color: white;
    border: none;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    z-index: 998;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
}

/* Adjust position if scroll-to-top button exists */
.scroll-to-top-button + .newsletter-floating-btn,
#scroll-to-top + .newsletter-floating-btn {
    bottom: 80px; /* Adjust based on your scroll button height */
}

.newsletter-floating-btn:hover {
    background-color: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 124, 186, 0.4);
}

/* Pulsating animation */
@keyframes pulsate {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 6px 25px rgba(0, 124, 186, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
    }
}

.newsletter-floating-btn.pulsate {
    animation: pulsate 2s ease-in-out infinite;
}

/* Newsletter Popup */
.newsletter-popup {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.newsletter-popup-content {
    background-color: #ffffff;
    margin: 10% auto;
    padding: 40px;
    border: 1px solid #ddd;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.newsletter-popup-content h2 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #333;
    text-align: center;
}

.newsletter-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 30px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
}

.newsletter-close:hover,
.newsletter-close:focus {
    color: #333;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .newsletter-floating-btn {
        padding: 12px 20px;
        font-size: 14px;
        bottom: 15px;
        right: 15px;
    }

    .scroll-to-top-button + .newsletter-floating-btn,
    #scroll-to-top + .newsletter-floating-btn {
        bottom: 70px;
    }

    .newsletter-popup-content {
        width: 95%;
        padding: 30px 20px;
        margin: 20% auto;
    }
}
