/* Estilos para a seção de depoimentos */
.testimonials-section {
    background-color: #f8f9fa;
    padding: 80px 0;
    position: relative;
}

.testimonials-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
}

.testimonial-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    width: 100%;
    max-width: 350px;
    transition: all 0.3s ease;
    position: relative;
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.testimonial-content {
    padding: 5px;
    position: relative;
}

.testimonial-rating {
    color: var(--color-orange);
    font-size: 0.85rem;
    margin-top: 5px;
}

/* Estrelas dentro do testimonial-author */
.testimonial-author .testimonial-rating {
    margin-top: 5px;
    margin-bottom: 0;
    font-size: 0.8rem;
}

.testimonial-author .testimonial-rating i {
    margin-right: 2px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    background: rgba(2, 0, 133, 0.03);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
    gap: 5px;
}

.testimonial-author .author-info {
    flex: 1;
    min-width: 0;
}

.testimonial-rating {
    color: var(--color-orange);
    font-size: 0.8rem;
    width: 100%;
    text-align: center;
    margin-top: 3px;
    margin-bottom: 0;
}

.testimonial-rating i {
    margin-right: 2px;
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 3px solid rgba(2, 0, 133, 0.1);
}

.author-info {
    flex: 1;
}

.author-name {
    font-weight: 700;
    color: var(--color-blue);
    margin-bottom: 0px;
}

.author-role {
    font-size: 0.85rem;
    color: var(--color-text);
    opacity: 0.8;
    margin-bottom: 0px;
}

/* Modal de Vídeo - Ajustes */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1;
}

.modal-container {
    position: relative;
    z-index: 2;
    background: transparent; /* Removemos o fundo branco */
    border-radius: 0; /* Removemos o border-radius */
    box-shadow: none; /* Removemos a sombra */
    max-width: 90%; /* Limite máximo para dispositivos móveis */
}

.modal-close-btn {
    position: absolute;
    top: -40px; /* Posicionamos acima do vídeo */
    right: 0;
    background: rgba(255, 255, 255, 0.8);
    color: #333;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: all 0.3s ease;
}

.modal-close-btn:hover {
    background: var(--color-red);
    color: white;
}

.video-wrapper {
    position: relative;
    width: auto; /* A largura será definida pelo vídeo */
    height: auto;
}

.video-wrapper video {
    display: block;
    max-width: 100%;
    max-height: 80vh; /* Limite de altura para manter a proporção */
    background: #000;
    border-radius: 8px; /* Adicionamos um leve border-radius apenas ao vídeo */
}

/* Container do vídeo embedado no card */
.testimonial-video-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 15px;
    aspect-ratio: 9 / 16;
    max-height: 420px;
}

/* Crop wrapper - para cortar bordas pretas se necessário */
.testimonial-video-crop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-video-iframe {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    border: none;
    pointer-events: auto;
}

/* Ajuste para vídeos HTML5 locais - ocupar todo o container sem crop excessivo */
.testimonial-video-crop video.testimonial-video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
    pointer-events: auto;
}

/* Overlay de play sobre o vídeo */
.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 2;
    transition: opacity 0.3s ease, background 0.3s ease;
    pointer-events: auto;
}

.video-play-overlay i {
    font-size: 3rem;
    color: white;
    background: rgba(2, 0, 133, 0.8);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background 0.3s ease;
    padding-left: 5px;
}

.video-play-overlay:hover {
    background: rgba(0, 0, 0, 0.5);
}

.video-play-overlay:hover i {
    transform: scale(1.1);
    background: rgba(2, 0, 133, 1);
}

.video-play-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Quando o vídeo entrar em tela cheia nativa, mostrar o vídeo inteiro com barras pretas laterais */
.testimonial-video-crop video.testimonial-video-iframe:fullscreen {
    object-fit: contain;
    background: #000;
}
.testimonial-video-crop video.testimonial-video-iframe:-webkit-full-screen {
    object-fit: contain;
    background: #000;
}
.testimonial-video-crop video.testimonial-video-iframe:-moz-full-screen {
    object-fit: contain;
    background: #000;
}
.testimonial-video-crop video.testimonial-video-iframe:-ms-fullscreen {
    object-fit: contain;
    background: #000;
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsivo */
@media (max-width: 768px) {
    .testimonials-container {
        flex-direction: column;
        align-items: center;
    }
    
    .testimonial-card {
        max-width: 100%;
    }
    
    .modal-container {
        max-width: 800px; /* Largura máxima para desktop */
    }
    
    .modal-close-btn {
        top: 15px;
        right: 15px;
        background: rgba(0, 0, 0, 0.5);
        color: white;
        width: 40px;
        height: 40px;
    }
}

/* Estilos para o iframe do Google Drive - Vídeos verticais (formato story) */
#driveVideoContainer {
    position: relative;
    /* Removemos o padding-bottom fixo para não forçar 16:9 */
    height: auto;
    overflow: hidden;
    width: 100%;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
}

#driveVideoFrame {
    /* O iframe vai se ajustar ao tamanho natural do vídeo */
    width: auto;
    height: 70vh; /* Altura máxima de 70% da viewport */
width: 100%;
    border: none;
    display: block;
    margin: 0 auto;
}

/* Para telas muito largas, limitamos a largura */
@media (min-width: 768px) {
    #driveVideoFrame {
        width: auto;
        height: 80vh;
    }
}

/* Para telas menores (celular) */
@media (max-width: 767px) {
    #driveVideoFrame {
        height: 60vh;
        width: auto;
    }
}

/* Ajuste para o modal existente - vídeos locais */
.video-wrapper video {
    max-height: 85vh;
    max-width: 90vw;
    width: auto;
    height: auto;
    outline: none;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

/* Container do modal */
.video-modal .modal-container {
    max-width: 90vw;
    width: auto;
    background: transparent;
    border-radius: 16px;
    position: relative;
    display: flex;
    justify-content: center;
}

/* Wrapper do vídeo */
.video-wrapper {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    line-height: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

/* Para vídeos verticais, centralizar melhor */
.video-wrapper iframe,
.video-wrapper video {
    border-radius: 8px;
}

/* Botão de fechar ajustado */
.modal-close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.modal-close-btn:hover {
    background: rgba(0,0,0,0.9);
    transform: scale(1.1);
}

/* Responsividade para telas muito pequenas */
@media (max-width: 480px) {
    
    #driveVideoFrame,
    .video-wrapper video {
        max-height: 60vh;
        max-width: 95vw;
        width: auto;
        height: auto;
    }
    
    .modal-close-btn {
        top: -35px;
        right: 5px;
        width: 32px;
        height: 32px;
    }
}

/* ===== CARROSSEL DE DEPOIMENTOS ===== */
.testimonials-carousel {
    position: relative;
    max-width: 1140px;
    margin: 50px auto 0;
    padding: 0 50px;
}

.testimonials-track {
    display: flex;
    overflow: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 0;
}

.testimonials-track .testimonial-card {
    flex: 0 0 calc(100% / 3);
    max-width: calc(100% / 3);
    min-width: 0;
    scroll-snap-align: start;
    box-sizing: border-box;
}

/* Setas de navegação */
.testimonial-prev,
.testimonial-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-blue);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(2, 0, 133, 0.3);
}

.testimonial-prev {
    left: 0;
}

.testimonial-next {
    right: 0;
}

.testimonial-prev:hover,
.testimonial-next:hover {
    background: var(--color-yellow);
    color: var(--color-blue);
    transform: translateY(-50%) scale(1.1);
}

.testimonial-prev i,
.testimonial-next i {
    font-size: 1.2rem;
}

/* Indicadores */
.testimonial-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
}

.testimonial-indicators .indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.testimonial-indicators .indicator.active {
    background: var(--color-blue);
    transform: scale(1.2);
}

.testimonial-indicators .indicator:hover {
    background: var(--color-yellow);
}

/* Tablets - 2 vídeos por vez */
@media (max-width: 992px) {
    .testimonials-carousel {
        max-width: 700px;
    }

    .testimonials-track .testimonial-card {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Mobile - 1 vídeo por vez */
@media (max-width: 768px) {
    .testimonials-carousel {
        padding: 0 10px;
        max-width: 350px;
    }

    .testimonials-track .testimonial-card {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .testimonial-prev,
    .testimonial-next {
        width: 36px;
        height: 36px;
    }

    .testimonial-prev i,
    .testimonial-next i {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .testimonials-carousel {
        padding: 0 10px;
        max-width: 300px;
    }

    .testimonial-prev,
    .testimonial-next {
        width: 32px;
        height: 32px;
    }
}
