/* =============================================
   Google Reviews Carousel – Card Slider
   ============================================= */

/* --- Reset --- */
.tbgr-carousel,
.tbgr-carousel *,
.tbgr-carousel *::before,
.tbgr-carousel *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* --- Container --- */
.tbgr-carousel {
    max-width: 75rem;
    margin: 2.5rem auto;
    padding: 0 1.25rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    user-select: none;
}

/* --- Viewport (clips overflow) --- */
.tbgr-viewport {
    overflow: hidden;
    overflow: clip;
    clip-path: inset(0);
    position: relative;
    cursor: grab;
}
.tbgr-viewport.is-dragging {
    cursor: grabbing;
}

/* --- Track (horizontal strip moved via transform) --- */
.tbgr-track {
    display: flex;
    will-change: transform;
}
.tbgr-track.is-animating {
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Card wrapper --- */
.tbgr-card {
    flex: 0 0 33.333%;
    padding: 0.75rem;
    transition: transform 0.4s ease;
    transform: scale(0.82);
}

/* Center card is bigger (desktop only) */
.tbgr-card.is-center {
    transform: scale(1);
    z-index: 2;
}

/* Kill card transitions during infinite jump */
.tbgr-no-transition .tbgr-card {
    transition: none !important;
}

/* --- Card inner (the white box) --- */
.tbgr-card-inner {
    background: #fff;
    border-radius: 1.25rem;
    box-shadow: 0 0.125rem 0.75rem rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* --- Card header --- */
.tbgr-card-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem 0.75rem;
    gap: 0.75rem;
}

.tbgr-card-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #e8eaed;
}

.tbgr-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tbgr-card-avatar-letter {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
}

.tbgr-card-meta {
    flex: 1;
    min-width: 0;
}

.tbgr-card-name {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #202124;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tbgr-card-stars {
    display: flex;
    gap: 1px;
    margin-top: 0.125rem;
}

.tbgr-star { font-size: 1rem; line-height: 1; }
.tbgr-star.filled { color: #FBBC04; }
.tbgr-star.empty  { color: #dadce0; }

.tbgr-card-google-icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
}
.tbgr-card-google-icon svg {
    width: 2rem;
    height: 2rem;
    display: block;
}

/* --- Card image --- */
.tbgr-card-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}
.tbgr-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- Card body --- */
.tbgr-card-body {
    padding: 1rem 1.25rem 1.25rem;
    flex: 1;
}

.tbgr-card-text {
    font-size: 1rem;
    line-height: 1.65;
    color: #3c4043;
    margin: 0;
}

.tbgr-read-more {
    display: inline;
    color: #A8000E !important;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    margin-left: 0.125rem;
}
.tbgr-read-more:hover {
    text-decoration: underline;
    color: #8a000b !important;
}

/* --- Dots --- */
.tbgr-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 0 0.5rem;
}

.tbgr-dot {
    display: inline-block;
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 50%;
    background: #bdc1c6;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}
.tbgr-dot:hover {
    background: #80868b;
}
.tbgr-dot.active {
    background: #202124;
    transform: scale(1.2);
}

/* --- Modal --- */
.tbgr-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    inset: 0;
}
.tbgr-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}
.tbgr-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}
.tbgr-modal-content {
    position: relative;
    z-index: 1;
    background: #fff;
    padding: 2rem;
    border-radius: 1.25rem;
    max-width: 35rem;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 1.25rem 3.75rem rgba(0, 0, 0, 0.25);
}
.tbgr-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    font-size: 1.75rem;
    color: #5f6368;
    cursor: pointer;
    line-height: 1;
}
.tbgr-modal-close:hover { color: #202124; }
.tbgr-modal-body p {
    font-size: 1rem;
    line-height: 1.75;
    color: #3c4043;
    margin: 0;
}

/* =============================================
   Responsive
   ============================================= */

/* Tablet: <=1024  →  2 full cards, no scale effect */
@media (max-width: 1024px) {
    .tbgr-card {
        transform: scale(1) !important;
        transition: none !important;
    }
}

/* Mobile: <=767  →  1 card */
@media (max-width: 767px) {
    .tbgr-carousel { padding: 0 0.75rem; }
    .tbgr-card {
        padding: 0 !important;
        transform: scale(1) !important;
        transition: none !important;
    }
    .tbgr-card-inner {
        border-radius: 1rem;
        margin: 0.5rem 0.75rem;
    }
    .tbgr-card-header { padding: 0.875rem 1rem 0.625rem; }
    .tbgr-card-body   { padding: 0.75rem 1rem 1rem; }
    .tbgr-modal-content { padding: 1.5rem 1.25rem; }
}
