/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9000;
    /* Reduced z-index to be below header */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideIn 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 9001;
}

.close-btn {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.3s;
    z-index: 9002;
}

.close-btn:hover {
    color: #000;
}

.modal-content h2 {
    margin-top: 0;
    color: #333;
    font-size: 24px;
}

.modal-content p {
    color: #666;
    margin-bottom: 20px;
}

.subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.subscribe-form input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.subscribe-form input:focus {
    outline: none;
    border-color: #4CAF50;
}

.subscribe-btn {
    padding: 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.subscribe-btn:hover {
    background-color: #45a049;
}

.success-message {
    display: none;
    padding: 15px;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    margin-top: 15px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-content {
        padding: 20px;
        margin: 20px;
        width: calc(100% - 40px);
    }

    .close-btn {
        right: 10px;
        top: 10px;
        font-size: 24px;
    }
}