/* Customer Reviews Section */
.customer-reviews-section {
    padding: 120px 0;
    background: #ffffff;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.customer-reviews-section .container {
    position: relative;
    margin: 0 auto;
    padding: 0 20px; /* Reduced padding for better mobile experience */
    max-width: 1400px;
    width: 100%;
}

.customer-reviews-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" stop-color="rgba(245,32,8,0.02)"/><stop offset="100%" stop-color="rgba(245,32,8,0)"/></radialGradient></defs><rect width="100" height="20" fill="url(%23a)"/></svg>') repeat;
    pointer-events: none;
}

.reviews-title {
    text-align: center;
    font-size: 2.8rem;
    color: var(--secondary-color);
    margin-bottom: 16px;
    font-weight: 800;
    position: relative;
    letter-spacing: -0.5px;
}

.reviews-title::after {
    content: '';
    display: block;
    width: 120px;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), #ff8c42);
    margin: 24px auto 0;
    border-radius: 3px;
    box-shadow: 0 6px 20px rgba(245, 32, 8, 0.25);
}

.reviews-subtitle {
    text-align: center;
    color: #64748b;
    margin-bottom: 60px;
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Reviews Carousel */
.reviews-carousel {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    width: 100%;
    padding: 40px 0;
    background: linear-gradient(135deg, #ffffff 0%, rgba(245, 32, 8, 0.02) 100%);
}

.reviews-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%; /* Will be set by JavaScript based on actual review count */
    height: auto;
}

.review-card {
    flex: 0 0 calc(100% / 6); /* Each card takes 1/6 of track width */
    width: calc(100% / 6);
    background: #ffffff;
    border-radius: 14px;
    padding: 36px 28px;
    margin: 0 10px;
    border: 1px solid #e5e7eb;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
    box-sizing: border-box;
    min-height: 340px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.review-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, #ff8c42 100%);
    border-radius: 14px 14px 0 0;
}

.review-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: rgba(245, 32, 8, 0.2);
    background: linear-gradient(135deg, #ffffff 0%, rgba(245, 32, 8, 0.02) 100%);
}

.review-card::before {
    content: '"';
    position: absolute;
    top: -8px;
    left: 24px;
    font-size: 100px;
    color: rgba(245, 32, 8, 0.12);
    font-family: Georgia, serif;
    line-height: 1;
    z-index: 1;
}

.review-content {
    position: relative;
    z-index: 2;
    padding-top: 12px;
}

.review-stars {
    display: flex;
    gap: 6px;
    margin-bottom: 24px;
    justify-content: center;
}

.review-stars i {
    color: #fbbf24;
    font-size: 18px;
    text-shadow: 0 2px 4px rgba(251, 191, 36, 0.3);
    animation: starTwinkle 2s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.1s);
}

.review-stars i:nth-child(1) { --i: 0; }
.review-stars i:nth-child(2) { --i: 1; }
.review-stars i:nth-child(3) { --i: 2; }
.review-stars i:nth-child(4) { --i: 3; }
.review-stars i:nth-child(5) { --i: 4; }

@keyframes starTwinkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.review-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #4b5563;
    margin-bottom: 30px;
    text-align: center;
    font-style: normal;
    font-weight: 400;
    position: relative;
    letter-spacing: 0.2px;
}

.review-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid rgba(245, 32, 8, 0.08);
    margin-top: auto;
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #ff6b4a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    box-shadow: 0 8px 20px rgba(245, 32, 8, 0.3);
    flex-shrink: 0;
    overflow: hidden;
    border: 3px solid white;
    position: relative;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.author-avatar img:error,
.author-avatar img:not([src]) {
    display: none;
}

.author-avatar:not(:has(img)),
.author-avatar:has(img:error) {
    background: linear-gradient(135deg, var(--primary-color), #ff6b4a);
    color: white;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-avatar:not(:has(img))::after,
.author-avatar:has(img:error)::after {
    content: '👤';
    font-size: 28px;
}

.author-avatar:hover img {
    transform: scale(1.05);
}

.author-info {
    text-align: center;
}

.author-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 4px;
    letter-spacing: 0.2px;
}

.author-title {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

/* Navigation arrows */
.reviews-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--primary-color), #ff6b4a);
    border: none;
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    font-size: 20px;
    z-index: 10;
    box-shadow: 0 8px 24px rgba(245, 32, 8, 0.3);
    /* Ensure arrows are always visible */
    min-width: 56px;
    min-height: 56px;
    flex-shrink: 0;
}

.reviews-nav:hover {
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 14px 36px rgba(245, 32, 8, 0.4);
}

.reviews-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.reviews-prev {
    left: 15px; /* Position inside container with padding */
}

.reviews-next {
    right: 15px; /* Position inside container with padding */
}

/* Review dots indicator */
.reviews-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
}

.review-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(245, 32, 8, 0.3);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.review-dot:hover {
    border-color: var(--primary-color);
    transform: scale(1.2);
}

.review-dot.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(245, 32, 8, 0.2);
}

.review-dot.active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
}

/* Responsive Design */
@media (max-width: 992px) {
    .customer-reviews-section {
        padding: 60px 0;
    }
    
    .customer-reviews-section .container {
        padding: 0 15px;
    }
    
    .reviews-carousel {
        margin: 0;
        border-radius: 15px;
    }
    
    .reviews-title {
        font-size: 1.9rem;
    }
    
    .review-card {
        padding: 35px 25px;
        min-height: 300px;
        border-radius: 15px;
    }
    
    .review-text {
        font-size: 1.1rem;
    }
    
    .reviews-nav {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
    
    .reviews-prev {
        left: 10px;
    }
    
    .reviews-next {
        right: 10px;
    }
    
    .reviews-dots {
        gap: 10px;
        margin-top: 35px;
    }
    
    .review-dot {
        width: 6px;
        height: 6px;
        border-width: 1px;
    }
    
    .review-dot.active::after {
        width: 2px;
        height: 2px;
    }
}

@media (max-width: 768px) {
    .customer-reviews-section {
        padding: 50px 0;
    }
    
    .customer-reviews-section .container {
        padding: 0 10px;
    }
    
    .reviews-title {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }
    
    .reviews-subtitle {
        font-size: 1rem;
        margin-bottom: 35px;
    }
    
    .reviews-carousel {
        margin: 0;
        border-radius: 12px;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    }
    
    .review-card {
        padding: 30px 20px;
        min-height: 280px;
        border-radius: 12px;
    }
    
    .review-card::before {
        font-size: 70px;
        top: -3px;
        left: 15px;
    }
    
    .review-text {
        font-size: 1.05rem;
        line-height: 1.6;
        margin-bottom: 25px;
    }
    
    .review-author {
        flex-direction: row;
        text-align: left;
        gap: 15px;
        justify-content: flex-start;
    }
    
    .author-info {
        text-align: left;
    }
    
    .author-avatar {
        width: 50px;
        height: 50px;
        font-size: 22px;
        flex-shrink: 0;
        border-width: 2px;
    }
    
    .author-name {
        font-size: 1.1rem;
        margin-bottom: 2px;
    }
    
    .author-title {
        font-size: 0.9rem;
    }
    
    .reviews-nav {
        width: 42px;
        height: 42px;
        font-size: 15px;
        backdrop-filter: blur(8px);
    }
    
    .reviews-prev {
        left: 8px;
    }
    
    .reviews-next {
        right: 8px;
    }
    
    .review-stars {
        margin-bottom: 18px;
        justify-content: flex-start;
    }
    
    .review-stars i {
        font-size: 18px;
    }
    
    .reviews-dots {
        margin-top: 35px;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .customer-reviews-section {
        padding: 40px 0;
    }
    
    .customer-reviews-section .container {
        padding: 0 8px;
    }
    
    .reviews-title {
        font-size: 1.6rem;
        margin-bottom: 8px;
    }
    
    .reviews-subtitle {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }
    
    .reviews-carousel {
        margin: 0;
        border-radius: 10px;
    }
    
    .review-card {
        padding: 25px 18px;
        min-height: 260px;
        border-radius: 10px;
    }
    
    .review-card::before {
        font-size: 60px;
        top: -2px;
        left: 12px;
    }
    
    .review-text {
        font-size: 1rem;
        margin-bottom: 20px;
        line-height: 1.5;
    }
    
    .author-name {
        font-size: 1.05rem;
    }
    
    .author-title {
        font-size: 0.88rem;
    }
    
    .reviews-nav {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }
    
    .reviews-prev {
        left: 6px;
    }
    
    .reviews-next {
        right: 6px;
    }
    
    .reviews-dots {
        gap: 5px;
        margin-top: 30px;
    }
    
    .review-dot {
        width: 4px;
        height: 4px;
        border-width: 1px;
    }
    
    .review-dot.active::after {
        width: 1px;
        height: 1px;
    }
    
    .review-stars {
        margin-bottom: 16px;
    }
    
    .review-stars i {
        font-size: 16px;
    }
}

@media (max-width: 375px) {
    .customer-reviews-section {
        padding: 35px 0;
    }
    
    .customer-reviews-section .container {
        padding: 0 5px;
    }
    
    .reviews-title {
        font-size: 1.5rem;
        margin-bottom: 6px;
    }
    
    .reviews-subtitle {
        font-size: 0.9rem;
        margin-bottom: 25px;
    }
    
    .reviews-carousel {
        margin: 0;
        border-radius: 8px;
    }
    
    .review-card {
        padding: 22px 15px;
        min-height: 240px;
        border-radius: 8px;
    }
    
    .review-card::before {
        font-size: 50px;
        top: -1px;
        left: 10px;
    }
    
    .review-text {
        font-size: 0.95rem;
        line-height: 1.4;
        margin-bottom: 18px;
    }
    
    .author-avatar {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .author-name {
        font-size: 1rem;
    }
    
    .author-title {
        font-size: 0.85rem;
    }
    
    .reviews-nav {
        width: 35px;
        height: 35px;
        font-size: 13px;
    }
    
    .reviews-prev {
        left: 5px;
    }
    
    .reviews-next {
        right: 5px;
    }
    
    .reviews-dots {
        margin-top: 25px;
        gap: 3px;
    }
    
    .review-dot {
        width: 3px;
        height: 3px;
        border-width: 1px;
    }
    
    .review-dot.active::after {
        width: 1px;
        height: 1px;
    }
    
    .review-stars i {
        font-size: 15px;
    }
}

/* Enhanced hover effects for desktop - Desktop only */
@media (min-width: 769px) {
    .review-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    }
    
    .review-card:hover .author-avatar {
        transform: scale(1.05);
        box-shadow: 0 12px 25px rgba(245, 32, 8, 0.4);
    }
    
    .review-card:hover .author-avatar img {
        transform: scale(1.1);
    }
}

/* Animation for smooth entry */
.review-card {
    opacity: 0;
    transform: translateY(20px);
    animation: slideInUp 0.6s ease-out forwards;
}

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced mobile touch interactions */
@media (max-width: 768px) {
    .reviews-nav:active {
        transform: translateY(-50%) scale(0.9);
        background: var(--primary-color);
        color: white;
    }
    
    .review-dot:active {
        transform: scale(0.9);
    }
    
    /* Improve touch targets */
    .reviews-nav {
        min-width: 44px;
        min-height: 44px;
    }
    
    .review-dot {
        min-width: 32px;
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }
    
    .review-dot::before {
        content: '';
        width: 4px;
        height: 4px;
        border-radius: 50%;
        border: 1px solid rgba(245, 32, 8, 0.3);
        background: transparent;
        transition: all 0.3s ease;
        position: absolute;
    }
    
    .review-dot.active::before {
        background: var(--primary-color);
        border-color: var(--primary-color);
        box-shadow: 0 0 0 1px rgba(245, 32, 8, 0.2);
    }
    
    .review-dot.active::after {
        content: '';
        width: 1px;
        height: 1px;
        background: white;
        border-radius: 50%;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}

/* Professional enhancements for mobile */
@media (max-width: 768px) {
    .customer-reviews-section::before {
        opacity: 0.5;
    }
    
    .reviews-title::after {
        width: 60px;
        height: 3px;
        margin-top: 12px;
    }
    
    .review-card {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    }
    
    .review-card:hover {
        transform: none; /* Disable hover effects on mobile */
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    }
    
    .review-card:hover .author-avatar {
        transform: none;
        box-shadow: 0 8px 20px rgba(245, 32, 8, 0.3);
    }
}

/* Ultra-wide mobile screens */
@media (max-width: 480px) and (orientation: landscape) {
    .customer-reviews-section {
        padding: 30px 0;
    }
    
    .review-card {
        padding: 20px 15px;
        min-height: 220px;
    }
    
    .review-text {
        font-size: 0.9rem;
        line-height: 1.4;
    }
}

/* Extra small screens optimization */
@media (max-width: 320px) {
    .customer-reviews-section .container {
        padding: 0 3px;
    }
    
    .reviews-title {
        font-size: 1.3rem;
    }
    
    .reviews-subtitle {
        font-size: 0.85rem;
    }
    
    .review-card {
        padding: 20px 12px;
        min-height: 220px;
    }
    
    .review-text {
        font-size: 0.9rem;
    }
    
    .author-name {
        font-size: 0.95rem;
    }
    
    .author-title {
        font-size: 0.8rem;
    }
    
    .reviews-nav {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .reviews-prev {
        left: 3px;
    }
    
    .reviews-next {
        right: 3px;
    }
    
    .reviews-dots {
        margin-top: 20px;
        gap: 2px;
    }
    
    .review-dot {
        width: 3px;
        height: 3px;
        border-width: 1px;
    }
    
    .review-dot.active::after {
        width: 1px;
        height: 1px;
    }
}

/* Improve accessibility on all screen sizes */
@media (prefers-reduced-motion: reduce) {
    .reviews-track {
        transition: none;
    }
    
    .review-card {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .review-stars i {
        animation: none;
    }
}

/* Focus styles for accessibility */
.reviews-nav:focus,
.review-dot:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.reviews-nav:focus:not(:focus-visible),
.review-dot:focus:not(:focus-visible) {
    outline: none;
}

/* Professional enhancements for mobile */
@media (max-width: 768px) {
    .customer-reviews-section::before {
        opacity: 0.5;
    }
    
    .reviews-title::after {
        width: 60px;
        height: 3px;
        margin-top: 12px;
    }
    
    .review-card {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    }
    
    .review-card:hover {
        transform: none; /* Disable hover effects on mobile */
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    }
    
    .review-card:hover .author-avatar {
        transform: none;
        box-shadow: 0 8px 20px rgba(245, 32, 8, 0.3);
    }
}

/* Ultra-wide mobile screens */
@media (max-width: 480px) and (orientation: landscape) {
    .customer-reviews-section {
        padding: 30px 0;
    }
    
    .review-card {
        padding: 20px 15px;
        min-height: 220px;
    }
    
    .review-text {
        font-size: 0.9rem;
        line-height: 1.4;
    }
}

/* Extra small screens optimization */
@media (max-width: 320px) {
    .customer-reviews-section .container {
        padding: 0 3px;
    }
    
    .reviews-title {
        font-size: 1.3rem;
    }
    
    .reviews-subtitle {
        font-size: 0.85rem;
    }
    
    .review-card {
        padding: 20px 12px;
        min-height: 220px;
    }
    
    .review-text {
        font-size: 0.9rem;
    }
    
    .author-name {
        font-size: 0.95rem;
    }
    
    .author-title {
        font-size: 0.8rem;
    }
    
    .reviews-nav {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .reviews-prev {
        left: 3px;
    }
    
    .reviews-next {
        right: 3px;
    }

}

/* Improve accessibility on all screen sizes */
@media (prefers-reduced-motion: reduce) {
    .reviews-track {
        transition: none;
    }
    
    .review-card {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .review-stars i {
        animation: none;
    }
}