/*
  PROPRIETARY CODE - vivahigienizado.com.br
  Carrossel 3D Cilíndrico de Depoimentos
*/

/* ========================================
   SEÇÃO DE DEPOIMENTOS
   ======================================== */

.testimonials {
    padding: 80px 10px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    text-align: center;
    overflow-x: hidden;
}

.testimonials h2 {
    font-size: 2.8rem;
    color: var(--color-primary-dark);
    margin-bottom: 60px;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.testimonials h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-neon-primary);
}

/* ========================================
   CARROSSEL 3D - ESTRUTURA
   ======================================== */

.carousel-3d-container {
    position: relative;
    max-width: 95%;
    width: 100%;
    margin: 0 auto;
    padding: 40px 0;
    overflow-x: hidden;
}

.scene-3d {
    width: 100%;
    height: 650px;
    position: relative;
    perspective: 1500px;
    perspective-origin: 50% 50%;
    isolation: isolate;
}

.scene-3d::before {
    content: '';
    position: absolute;
    inset: 26px 4% 26px;
    background: radial-gradient(circle at center, rgba(7, 22, 33, 0.96) 0%, rgba(8, 24, 36, 0.92) 58%, rgba(8, 24, 36, 0.88) 100%);
    border-radius: 28px;
    box-shadow: inset 0 0 0 1px rgba(167, 227, 250, 0.12);
    z-index: 0;
    pointer-events: none;
}

.carousel-3d {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transform-style: preserve-3d;
    transform-origin: center center;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

/* ========================================
   CÉLULAS DO CARROSSEL
   ======================================== */

.carousel__cell {
    position: absolute;
    width: 336px;
    height: 430px;
    left: 50%;
    top: 50%;
    margin-left: -168px;
    margin-top: -215px;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    filter: blur(1.2px);
}

.carousel__cell.is-selected,
.carousel__cell.is-near {
    opacity: 1;
    visibility: visible;
}

.carousel__cell.is-selected {
    z-index: 6;
}

.carousel__cell.is-near {
    z-index: 4;
}

.carousel__cell.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    filter: blur(2.2px);
}

/* ========================================
   CARDS DE DEPOIMENTO
   ======================================== */

.testimonial-card {
    background: #184f6d;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
    padding: 32px 26px 24px;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.5s ease;
    transform: scale(0.84);
    opacity: 0.22;
}

/* Card central recebe efeito especial */
.carousel__cell.is-selected .testimonial-card {
    background: #123d59;
    box-shadow: 
        0 20px 48px rgba(0, 0, 0, 0.7),
        0 0 12px rgba(167, 227, 250, 0.2),
        inset 0 0 22px rgba(167, 227, 250, 0.08);
    border-color: rgba(167, 227, 250, 0.86);
    transform: scale(1.1);
    opacity: 1;
}

.carousel__cell.is-near .testimonial-card {
    transform: scale(0.8);
    opacity: 0.08;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    filter: grayscale(0.55) brightness(0.46);
}

/* ========================================
   HEADER DO CARD
   ======================================== */

.testimonial-header {
    display: none;
}

.testimonial-avatar {
    display: none;
}

.carousel__cell.is-selected .testimonial-avatar {
    display: none;
}

/* ========================================
   CORPO DO CARD
   ======================================== */

.testimonial-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.stars {
    color: #FFD700;
    font-size: 1.4rem;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.testimonial-text {
    font-style: italic;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.7;
    margin: 0;
    flex: 1;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.carousel__cell.is-selected .testimonial-text {
    font-size: 1.08rem;
    color: rgba(255, 255, 255, 1);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.carousel__cell.is-near .testimonial-text,
.carousel__cell.is-near .testimonial-message {
    color: rgba(255, 255, 255, 0.22);
}

.carousel__cell.is-near .stars,
.carousel__cell.is-near .testimonial-rating,
.carousel__cell.is-near .testimonial-avatar {
    opacity: 0.14;
}

.carousel__cell.is-near .testimonial-text,
.carousel__cell.is-near .testimonial-message,
.carousel__cell.is-near .stars,
.carousel__cell.is-near .testimonial-rating,
.carousel__cell.is-near .testimonial-footer {
    display: none;
}

.carousel__cell.is-near .testimonial-header {
    margin-bottom: 0;
}

.carousel__cell.is-near .testimonial-body {
    justify-content: center;
}

/* ========================================
   FOOTER DO CARD
   ======================================== */

.testimonial-footer {
    padding-top: 20px;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    margin-top: auto;
}

.testimonial-message {
    color: rgba(255, 255, 255, 0.96);
    font-size: 1.04rem;
    line-height: 1.6;
    margin: 0;
    font-style: italic;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.carousel__cell.is-selected .testimonial-message {
    font-size: 1.12rem;
    color: rgba(255, 255, 255, 1);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.testimonial-author {
    display: none;
}

.testimonial-rating {
    background: var(--gradient-primary);
    color: var(--color-text-white);
    padding: 4px 8px;
    border-radius: var(--border-radius-md);
    font-size: 0.95rem;
    font-weight: 700;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: inline-block;
    margin: 0 4px;
}

.carousel__cell.is-selected .testimonial-rating {
    padding: 5px 10px;
    font-size: 1rem;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* ========================================
   CONTROLES DO CARROSSEL
   ======================================== */

.carousel-3d-controls {
    position: relative;
    text-align: center;
    margin-top: 40px;
    z-index: 100;
}

.carousel-3d-btn {
    background: var(--gradient-primary);
    color: var(--color-text-white);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: var(--radius-round);
    font-size: 2.5rem;
    cursor: pointer;
    margin: 0 15px;
    box-shadow: 0 8px 20px rgba(32, 106, 141, 0.4);
    transition: all 0.3s ease;
    font-weight: 300;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.carousel-3d-btn:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 
        0 12px 30px rgba(32, 106, 141, 0.5),
        0 0 25px rgba(167, 227, 250, 0.5);
    background: linear-gradient(135deg, #1D4F73 0%, #206a8d 100%);
}

.carousel-3d-btn:active {
    transform: scale(0.95);
}

/* ========================================
   RESPONSIVO
   ======================================== */

@media (max-width: 1024px) {
    .scene-3d {
        height: 590px;
        perspective: 1250px;
    }

    .carousel__cell {
        width: 308px;
        height: 360px;
        margin-left: -154px;
        margin-top: -180px;
    }

    .testimonial-card {
        padding: 26px 22px;
    }
}

@media (max-width: 768px) {
    .testimonials {
        padding: 60px 12px;
    }

    .testimonials h2 {
        font-size: 2.2rem;
        margin-bottom: 40px;
    }

    .scene-3d {
        height: 500px;
        perspective: 1050px;
    }

    .carousel__cell {
        width: 252px;
        height: 330px;
        margin-left: -126px;
        margin-top: -165px;
    }

    .testimonial-card {
        padding: 22px 18px;
    }

    .testimonial-avatar {
        width: 85px;
        height: 85px;
    }

    .carousel__cell.is-selected .testimonial-avatar {
        width: 95px;
        height: 95px;
    }

    .testimonial-text {
        font-size: 0.95rem;
    }

    .carousel-3d-btn {
        width: 50px;
        height: 50px;
        font-size: 2rem;
        margin: 0 10px;
    }
}

@media (max-width: 480px) {
    .testimonials {
        padding: 50px 8px;
    }

    .testimonials h2 {
        font-size: 1.8rem;
    }

    .scene-3d {
        height: 420px;
        perspective: 850px;
    }

    .carousel__cell {
        width: 200px;
        height: 280px;
        margin-left: -100px;
        margin-top: -140px;
    }

    .testimonial-card {
        padding: 18px 14px;
    }

    .testimonial-avatar {
        width: 75px;
        height: 75px;
    }

    .carousel__cell.is-selected .testimonial-avatar {
        width: 85px;
        height: 85px;
    }

    .testimonial-text {
        font-size: 0.88rem;
        line-height: 1.5;
    }

    .testimonial-message {
        font-size: 0.88rem;
        line-height: 1.4;
        word-wrap: break-word;
    }

    .carousel__cell.is-selected .testimonial-message {
        font-size: 0.94rem;
    }

    .testimonial-rating {
        font-size: 0.76rem;
        padding: 3px 6px;
    }

    .carousel__cell.is-selected .testimonial-rating {
        font-size: 0.80rem;
        padding: 4px 7px;
    }

    .carousel-3d-btn {
        width: 45px;
        height: 45px;
        font-size: 1.8rem;
    }
}

/* Extra pequeno - dispositivos < 360px */
@media (max-width: 360px) {
    .scene-3d {
        height: 390px;
        perspective: 800px;
    }

    .carousel__cell {
        width: 180px;
        height: 260px;
        margin-left: -90px;
        margin-top: -130px;
    }

    .testimonial-card {
        padding: 16px 12px;
    }

    .testimonial-avatar {
        width: 70px;
        height: 70px;
    }

    .carousel__cell.is-selected .testimonial-avatar {
        width: 78px;
        height: 78px;
    }

    .testimonial-text {
        font-size: 0.85rem;
    }

    .testimonial-message {
        font-size: 0.84rem;
    }

    .carousel__cell.is-selected .testimonial-message {
        font-size: 0.90rem;
    }

    .carousel-3d-btn {
        width: 42px;
        height: 42px;
        font-size: 1.6rem;
        margin: 0 8px;
    }
}
