/**
 * Reviews & Testimonials Section
 * Layout com sidebar de plataformas (Tripadvisor, Google, Trustpilot)
 * e grid de 6 cards de avaliações reais de viajantes.
 *
 * @package Borboleta_Travel
 */

/* ==========================================================================
   Seção de Avaliações
   ========================================================================== */
.reviews-section {
    background-color: #F8FAF9;
    padding: var(--bt-space-24) 0 var(--bt-space-20);
    position: relative;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   Cabeçalho
   ========================================================================== */
.reviews-header {
    text-align: center;
    margin-bottom: var(--bt-space-14);
}

.reviews-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--bt-space-2);
    padding: 6px 16px;
    background: rgba(78, 113, 102, 0.1);
    color: var(--bt-color-sage);
    border-radius: var(--bt-radius-full);
    font-family: var(--bt-font-family-ui);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: var(--bt-space-3);
}

.reviews-badge svg {
    color: #00AA6C;
}

.reviews-title {
    font-family: var(--bt-font-family-heading);
    font-size: clamp(2rem, 3.5vw, 2.65rem);
    font-weight: 700;
    color: var(--bt-color-teal);
    line-height: var(--bt-line-height-tight);
    margin: 0 0 var(--bt-space-3);
    letter-spacing: -0.02em;
}

.reviews-subtitle {
    font-family: var(--bt-font-family-body);
    font-size: var(--bt-fs-base);
    color: var(--bt-color-gray-600);
    max-width: 600px;
    margin: 0 auto;
    line-height: var(--bt-line-height-base);
}

/* ==========================================================================
   Layout Principal: Sidebar + Grid
   ========================================================================== */
.reviews-content-wrapper {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: var(--bt-space-8);
    align-items: start;
}

/* ==========================================================================
   Sidebar de Plataformas (Tripadvisor, Google, Trustpilot)
   ========================================================================== */
.reviews-sidebar {
    display: flex;
    flex-direction: column;
}

.platform-card {
    background: var(--bt-color-white);
    border-radius: 18px;
    border: 1px solid #EAEAEA;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
    overflow: hidden;
    position: relative;
}

.platform-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* Card Ativo / Tripadvisor */
.platform-card--active {
    background: #EFF9F4;
    border: 1.5px solid #C4E8D7;
}

.platform-card--active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #00AA6C;
    border-radius: 18px 0 0 18px;
}

.platform-card-inner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 16px;
    text-decoration: none;
    color: inherit;
}

.platform-icon-wrap {
    width: 44px;
    height: 44px;
    background: var(--bt-color-white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #F0F0F0;
}

.platform-details {
    flex: 1;
    min-width: 0;
}

.platform-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.platform-name {
    font-family: var(--bt-font-family-ui);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--bt-color-charcoal);
    margin: 0;
}

.platform-arrow {
    color: #A4B0B5;
    transition: transform 0.2s ease, color 0.2s ease;
}

.platform-card:hover .platform-arrow {
    transform: translateX(3px);
    color: var(--bt-color-teal);
}

/* Pontuação com Bolinhas (Tripadvisor) */
.platform-rating-bubbles {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 4px;
}

.platform-rating-bubbles .bubble-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #00AA6C;
    display: inline-block;
}

/* Estrelas do Google */
.platform-rating-stars {
    display: flex;
    align-items: center;
    gap: 2px;
    color: #FBBC05;
    font-size: 0.85rem;
    margin-bottom: 4px;
    line-height: 1;
}

/* Estrelas do Trustpilot */
.platform-rating-trustpilot {
    display: flex;
    align-items: center;
    gap: 2px;
    color: #00B67A;
    font-size: 0.85rem;
    margin-bottom: 4px;
    line-height: 1;
}

.platform-score-text {
    font-family: var(--bt-font-family-ui);
    font-size: 0.775rem;
    font-weight: 600;
    color: #64747B;
    margin: 0;
}

/* Link "See all reviews" */
.platform-see-all {
    margin: 8px 0 16px 4px;
}

.see-all-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--bt-font-family-ui);
    font-size: 0.8125rem;
    font-weight: 700;
    color: #00AA6C;
    text-decoration: none;
    transition: color 0.2s ease, gap 0.2s ease;
}

.platform-card--google + .platform-see-all .see-all-link {
    color: #1A73E8;
}

.see-all-link:hover {
    text-decoration: underline;
    gap: 6px;
}



/* ==========================================================================
   Grid de Reviews (Direita)
   ========================================================================== */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--bt-space-5);
}

/* ==========================================================================
   Card de Review Individual
   ========================================================================== */
.review-card {
    background: var(--bt-color-white);
    border-radius: 18px;
    border: 1px solid #ECEEEF;
    padding: 22px 20px 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.025);
    display: flex;
    flex-direction: column;
    transition:
        transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.3s ease,
        border-color 0.25s ease;
    position: relative;
}

.review-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.07);
    border-color: #BEE3D3;
}

/* Linha do Autor */
.review-author-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--bt-space-3);
}

.review-author-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.review-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #F0F2F2;
}

.review-author-meta {
    min-width: 0;
}

.review-author-name {
    font-family: var(--bt-font-family-ui);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--bt-color-charcoal);
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.review-travel-info {
    font-family: var(--bt-font-family-body);
    font-size: 0.775rem;
    color: #8C99A0;
    margin-top: 2px;
    display: block;
}

/* Aspas Decorativas */
.review-quote-icon {
    color: #C8E2D6;
    flex-shrink: 0;
    margin-left: 8px;
    display: flex;
    align-items: center;
}

/* Bolinhas Verdes de Avaliação */
.review-rating-bubbles {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: var(--bt-space-3);
}

.review-rating-bubbles .bubble-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #00AA6C;
    display: inline-block;
}

/* Título da Avaliação */
.review-title {
    font-family: var(--bt-font-family-ui);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--bt-color-charcoal);
    margin: 0 0 var(--bt-space-2);
    line-height: 1.35;
}

/* Corpo / Texto do Review */
.review-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.review-text {
    font-family: var(--bt-font-family-body);
    font-size: 0.84rem;
    color: #55646A;
    line-height: 1.6;
    margin: 0 0 var(--bt-space-2);
}

.review-text--full {
    display: none;
}

.review-card.is-expanded .review-text--excerpt {
    display: none;
}

.review-card.is-expanded .review-text--full {
    display: block;
}

/* Botão "Read more" */
.btn-review-expand {
    background: none;
    border: none;
    padding: 0;
    font-family: var(--bt-font-family-ui);
    font-size: 0.8125rem;
    font-weight: 700;
    color: #00AA6C;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    margin-bottom: var(--bt-space-4);
    align-self: flex-start;
    transition: color 0.2s ease;
}

.btn-review-expand:hover {
    color: var(--bt-color-teal);
}

.expand-label-less {
    display: none;
}

.review-card.is-expanded .expand-label-more {
    display: none;
}

.review-card.is-expanded .expand-label-less {
    display: inline;
}

.expand-chevron {
    transition: transform 0.25s ease;
}

.review-card.is-expanded .expand-chevron {
    transform: rotate(180deg);
}

/* Rodapé do Card de Review */
.review-card-footer {
    margin-top: auto;
    padding-top: var(--bt-space-3);
    border-top: 1px solid #F2F4F4;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.review-platform-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--bt-font-family-ui);
    font-size: 0.775rem;
    font-weight: 600;
    color: #6D7D84;
}

.platform-mini-icon {
    flex-shrink: 0;
}

.review-verified-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ==========================================================================
   Responsividade
   ========================================================================== */
@media (max-width: 1200px) {
    .reviews-content-wrapper {
        grid-template-columns: 240px 1fr;
        gap: var(--bt-space-5);
    }

    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .reviews-content-wrapper {
        grid-template-columns: 1fr;
        gap: var(--bt-space-8);
    }

    .reviews-sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--bt-space-4);
    }
}

@media (max-width: 680px) {
    .reviews-section {
        padding: var(--bt-space-16) 0 var(--bt-space-14);
    }

    .reviews-sidebar {
        grid-template-columns: 1fr;
    }

    /* Celulares: depoimentos em carrossel horizontal com deslize (scroll-snap) */
    .reviews-grid {
        display: grid;
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: 86%;
        gap: var(--bt-space-4);
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin: 0 calc(var(--bt-container-padding) * -1);
        padding: 4px var(--bt-container-padding) 14px;
        scroll-padding-inline: var(--bt-container-padding);
    }

    .reviews-grid::-webkit-scrollbar {
        display: none;
    }

    .review-card {
        padding: 18px 16px;
        scroll-snap-align: start;
    }

    .review-card:hover {
        transform: none;
    }
}
