.ars-reviews-widget {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: transparent !important;
}

.ars-reviews-container {
    position: relative;
    display: flex;
    gap: 20px;
    transition: all 0.5s ease;
    align-items: stretch;
}

.ars-review-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: 320px;
}


.ars-review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

.ars-review-card.active {
    opacity: 1;
    transform: translateY(0);
}

.ars-review-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
}

.ars-author-photo {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2px;
    flex-shrink: 0;
}

.ars-author-photo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
}

.ars-author-info {
    flex: 1;
}

.ars-author-name {
    margin: 0 0 5px 0;
    font-size: 15px;
    font-weight: 600;
    color: #1a202c;
}

.ars-rating {
    display: flex;
    gap: 2px;
}

.ars-star {
    color: #e2e8f0;
    font-size: 14px;
    transition: all 0.3s ease;
}

.ars-star-filled {
    color: #FFD700;
    animation: starPop 0.4s ease;
}

@keyframes starPop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.ars-review-content {
    margin-bottom: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ars-review-text {
    color: #4a5568;
    line-height: 1.5;
    font-size: 13px;
    margin: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.ars-review-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
    margin-top: auto;
}

.ars-review-date {
    color: #a0aec0;
    font-size: 11px;
}

.ars-google-icon svg {
    width: 18px;
    height: 18px;
}

/* Grid Carousel Mode */
.ars-mode-grid-carousel {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.ars-mode-grid-carousel .ars-reviews-container {
    display: flex !important;
    gap: 25px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    align-items: stretch;
    width: max-content;
    cursor: grab;
    flex-wrap: nowrap;
}

.ars-mode-grid-carousel .ars-review-card {
    flex: 0 0 calc(100% / var(--columns-desktop, 3) - 25px);
    width: calc(100% / var(--columns-desktop, 3) - 25px);
    min-width: 250px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    height: auto;
}

/* Remove sliding mode - always use grid for consistent heights */

/* Static Grid Mode */
.ars-mode-grid .ars-reviews-container {
    display: grid !important;
    grid-template-columns: repeat(var(--columns-desktop, 3), 1fr);
    grid-auto-rows: minmax(min-content, 1fr);
    gap: 25px;
    align-items: stretch;
}

.ars-mode-grid .ars-review-card {
    opacity: 1;
    transform: translateY(0);
    min-width: auto;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Ensure all cards are visible immediately */
.ars-reviews-widget .ars-review-card {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Single Carousel Mode */
.ars-mode-carousel .ars-reviews-container {
    display: flex;
    transition: transform 0.5s ease;
    align-items: stretch;
}

.ars-mode-carousel .ars-review-card {
    flex: 0 0 100%;
    display: flex;
    flex-direction: column;
}

/* Navigation */
.ars-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: calc(100% + 100px);
    left: -50px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
}

.ars-nav-prev,
.ars-nav-next {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.8);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    pointer-events: all;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.ars-nav-prev:hover,
.ars-nav-next:hover {
    background: rgba(0, 0, 0, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.ars-nav-prev::before {
    content: '‹';
}

.ars-nav-next::before {
    content: '›';
}

.ars-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 25px;
    padding: 10px;
}

.ars-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.ars-dot:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: scale(1.1);
}

.ars-dot.active {
    background: #000000;
    transform: scale(1.2);
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Fade Mode */
.ars-mode-fade .ars-review-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 1s ease;
}

.ars-mode-fade .ars-review-card.active {
    opacity: 1;
}

/* Style Variations */
.ars-style-modern .ars-review-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.ars-style-glass .ars-review-card {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.ars-style-minimal .ars-review-card {
    background: #ffffff !important;
    box-shadow: none !important;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.ars-style-classic .ars-review-card {
    background: linear-gradient(to bottom, #f7fafc 0%, #ffffff 100%) !important;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

/* Responsive Grid Columns */
[data-columns-desktop="1"] { --columns-desktop: 1; }
[data-columns-desktop="2"] { --columns-desktop: 2; }
[data-columns-desktop="3"] { --columns-desktop: 3; }
[data-columns-desktop="4"] { --columns-desktop: 4; }
[data-columns-desktop="5"] { --columns-desktop: 5; }
[data-columns-desktop="6"] { --columns-desktop: 6; }

[data-columns-tablet="1"] { --columns-tablet: 1; }
[data-columns-tablet="2"] { --columns-tablet: 2; }
[data-columns-tablet="3"] { --columns-tablet: 3; }
[data-columns-tablet="4"] { --columns-tablet: 4; }

[data-columns-mobile="1"] { --columns-mobile: 1; }
[data-columns-mobile="2"] { --columns-mobile: 2; }

/* Tablet Responsive */
@media (max-width: 1024px) and (min-width: 769px) {
    .ars-mode-grid .ars-reviews-container {
        grid-template-columns: repeat(var(--columns-tablet, 2), 1fr);
        grid-auto-rows: 1fr;
    }
    
    .ars-mode-grid-carousel .ars-review-card {
        flex: 0 0 calc((100% - (var(--columns-tablet, 2) - 1) * 25px) / var(--columns-tablet, 2));
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ars-review-card {
        padding: 15px;
        max-height: 280px;
    }
    
    .ars-author-photo {
        width: 40px;
        height: 40px;
    }
    
    .ars-author-name {
        font-size: 14px;
    }
    
    .ars-review-text {
        font-size: 12px;
        -webkit-line-clamp: 3;
    }
    
    .ars-mode-grid .ars-reviews-container {
        grid-template-columns: repeat(var(--columns-mobile, 1), 1fr);
        grid-auto-rows: 1fr;
        gap: 15px;
    }
    
    .ars-mode-grid-carousel .ars-review-card {
        flex: 0 0 calc((100% - (var(--columns-mobile, 1) - 1) * 15px) / var(--columns-mobile, 1));
    }
    
    .ars-navigation {
        width: calc(100% + 60px);
        left: -30px;
    }
    
    .ars-nav-prev,
    .ars-nav-next {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
}

/* Hover Effects and Animations */
@keyframes scrollText {
    0%, 10% {
        transform: translateY(0);
    }
    90%, 100% {
        transform: translateY(calc(-100% + 80px));
    }
}

.ars-review-card {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ars-review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.ars-review-text {
    overflow: hidden;
    position: relative;
}

.ars-review-card:hover .ars-review-text {
    overflow: visible;
}

/* Lightbox Styles */
#ars-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
}

.ars-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.ars-lightbox-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: lightboxOpen 0.3s ease;
}

@keyframes lightboxOpen {
    from {
        opacity: 0;
        transform: translate(-50%, -48%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.ars-lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.ars-lightbox-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

.ars-lightbox-review {
    padding: 30px;
}

.ars-lightbox-header {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.ars-lightbox-author-photo img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
}

.ars-default-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
}

.ars-lightbox-author-info {
    flex: 1;
}

.ars-lightbox-author-name {
    margin: 0 0 10px 0;
    font-size: 22px;
    font-weight: 600;
    color: #333;
}

.ars-lightbox-rating {
    margin-bottom: 8px;
}

.ars-lightbox-rating .ars-star {
    font-size: 20px;
    color: #ddd;
}

.ars-lightbox-rating .ars-star-filled {
    color: #FFD700;
}

.ars-lightbox-date {
    color: #999;
    font-size: 14px;
}

.ars-lightbox-text {
    font-size: 16px;
    line-height: 1.6;
    color: #444;
    margin-bottom: 25px;
}

.ars-lightbox-footer {
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
}

.ars-google-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #999;
    font-size: 14px;
}

/* Responsive for Lightbox */
@media (max-width: 768px) {
    .ars-lightbox-content {
        width: 95%;
        max-height: 90vh;
        border-radius: 10px;
    }
    
    .ars-lightbox-review {
        padding: 20px;
    }
    
    .ars-lightbox-author-photo img,
    .ars-default-avatar {
        width: 50px;
        height: 50px;
    }
    
    .ars-lightbox-author-name {
        font-size: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ars-review-card {
        animation: none;
        opacity: 1;
        transform: translateY(0);
    }
    
    .ars-star-filled {
        animation: none;
    }
    
    .ars-reviews-container {
        transition: none;
    }
}