    /* Overlay de fundo escuro */
    .modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.85);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 9999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        padding: 20px;
    }

    .modal-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Container da modal */
    .modal-container {
        position: relative;
        max-width: 500px;
        width: 100%;
        transform: scale(0.7);
        transition: transform 0.3s ease;
    }

    .modal-overlay.active .modal-container {
        transform: scale(1);
    }

    /* Link clicável da imagem */
    .modal-link {
        display: block;
        text-decoration: none;
    }

    .modal-image {
        display: block;
        width: 100%;
        height: auto;
        border-radius: 12px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
        transition: transform 0.3s ease;
    }

    .modal-link:hover .modal-image {
        transform: scale(1.02);
    }

    /* Botão de fechar - posicionado FORA da imagem */
    .modal-close {
        position: absolute;
        top: -50px;
        right: 0;
        width: 45px;
        height: 45px;
        background: #ff4444;
        border: 3px solid #ffffff;
        border-radius: 50%;
        color: #ffffff;
        font-size: 26px;
        font-weight: bold;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 20px rgba(255, 68, 68, 0.5);
        transition: all 0.3s ease;
        z-index: 10001;
    }

    .modal-close:hover {
        background: #cc0000;
        transform: rotate(90deg) scale(1.15);
        box-shadow: 0 6px 25px rgba(255, 68, 68, 0.7);
    }

    /* Responsivo */
    @media (max-width: 768px) {
        .modal-overlay {
            padding: 15px;
        }

        .modal-close {
            top: -45px;
            width: 40px;
            height: 40px;
            font-size: 22px;
        }

        .modal-image {
            border-radius: 8px;
        }
    }

    @media (max-width: 480px) {
        .modal-close {
            top: -40px;
            width: 36px;
            height: 36px;
            font-size: 20px;
            right: 5px;
        }
    }