.roleta_section {
    position: relative;
    padding: 2rem 0;
    margin: var(--double-gutter) 0;
    overflow-x: hidden;
}

.roleta_section .section-header {
    margin-bottom: 9rem;
    color: var(--cor-primaria);
    padding-bottom: 5px;
    word-break: break-word; /* - permite quebra de palavras longas */
    hyphens: auto; /*  hifenização automática */
}

.carrossel-roleta {
    position: relative;
    width: 100%;
    margin: 3rem auto;
    perspective: 10000px;
    margin-bottom: calc(var(--double-gutter) + 5.5rem); /* margem padrão + raio da altura dos cards */
}

.roleta-container {
    position: absolute;
    width: 20rem;
    height: 13rem;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transform-style: preserve-3d;
    animation: rotacao 180s infinite linear; /* define a velocidade para uma rotação completa */
}

.roleta-container.paused {
    animation-play-state: paused;
}

.servico-item {
    position: absolute;
    width: 12rem; /* Largura menor para formato retrato */
    height: 18rem; /* Altura maior */
    border-radius: 12px;
    transform-origin: center;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transition: all 0.6s ease;
    position: absolute;
}

.servico-item:hover {
    transform: scale(1.15);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    border: 10px solid rgba(0,44,67,0.8);
}

.servico-item img {
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    background-color: var(--cor-ternaria);
}

.img-placeholder {
    width: 100%;
    height: 100%;
    background-color: var(--cor-primaria);
    color: var(--bs-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    text-align: center;
    padding: 10px;
}

.servico-info h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--cor-ternaria) !important;
}

.servico-info p {
    color: var(--cor-letra) !important;
    font-size: 0.9rem;
    margin: 0;
}

.modal-zoom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(218, 177, 87, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.modal-zoom.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    max-width: 85%;
    max-height: 85%;
    position: relative;
    text-align: center;
}

.modal-content img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border: 2px solid #fff;
}

.modal-info {
    color: white;
    text-align: center;
    margin-top: 25px;
    padding: 0 20px;
}

.modal-info h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #fff;
}

.modal-info p {
    font-size: 1.2rem;
    color: #ccc;
}

i.bi-globe2 {
    font-size: 1.2rem;
    color: white !important;
}

.fechar-modal {
    position: absolute;
    top: 30px;
    right: 30px;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    background: none;
    border: none;
    transition: transform 0.3s ease;
}

.fechar-modal:hover {
    transform: rotate(90deg);
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 60px;
    font-size: 24px;
    cursor: pointer;
    z-index: 1001;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-arrow:hover {
    background: rgba(0, 0, 0, 0.8);
}

.nav-prev {
    left: 20px;
}

.nav-next {
    right: 20px;
}

@keyframes rotacao {
    from {
        transform: translate(-50%, -50%) rotateY(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotateY(360deg);
    }
}

@media (min-width: 1081px) {
    .carrossel-roleta {
        margin-bottom: calc(var(--double-gutter) + 15rem);
    }

    .servico-item {
        width: 15rem;
        height: 18rem;
    }
}

@media (max-width: 768px) {
    .roleta_section {
        margin: 0;
    }
    .roleta_section .section-header {
        margin-bottom: 0;
    }
    .carrossel-roleta {
        perspective: 1000px;
        overflow: hidden;
        height: 25rem;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    .roleta-container {
        width: 100%;
        height: 15rem;
        transform: translate(-50%, -50%);
        transform-style: preserve-3d;
        animation: rotacao 60s infinite linear; /* define a velocidade para uma rotação completa */
    }
    .servico-item {
        width: 35vw;
        height: 50vw;
        max-width: 12rem;
        max-height: 18rem;
    }

    .modal-content {
        max-width: 95%;
    }

    .modal-info h3 {
        font-size: 1.4rem;
    }

    .modal-info p {
        font-size: 1rem;
    }
    .nav-arrow {
        width: 30px;
        height: 50px;
        font-size: 18px;
    }
    .nav-prev {
        left: 10px;
    }
    .nav-next {
        right: 10px;
    }
}
