/* --- Global & Base Styles --- */
.uafe-review-widget-wrapper :root {
    --font-family: 'Poppins', sans-serif;
    --bg-color: #f0f2f5;
    --section-bg: #ffffff;
    --text-dark: #2d3748;
    --text-light: #718096;
    --accent-color: #667eea;
    --accent-color-light: #a3bffa;
    --star-color: #f6ad55;
    --verified-color: #38a169;
}

.uafe-review-widget-wrapper * {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.uafe-review-widget-wrapper body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-light);
}

.uafe-review-widget-wrapper .section-container {
    padding: 4rem 1rem;
    overflow: hidden;
}

.uafe-review-widget-wrapper .section-container:nth-child(even) {
    background-color: var(--section-bg);
}

.uafe-review-widget-wrapper .container {
    max-width: 1200px;
    margin: 0 auto;
}

.uafe-review-widget-wrapper .section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-dark);
    margin-bottom: 4rem;
}

/* --- General Animation --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*
========================================
LAYOUT 1: DETAILED REVIEW SUMMARY
========================================
*/
.uafe-review-widget-wrapper #layout1 .review-summary-card {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.07);
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: center;
}

.uafe-review-widget-wrapper #layout1 .overall-rating-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.uafe-review-widget-wrapper #layout1 .overall-rating-box .rating-value {
    font-size: 3rem;
    font-weight: 700;
    color: #2d3748;
}

.uafe-review-widget-wrapper #layout1 .overall-rating-box .stars {
    font-size: 1.25rem;
    color: #f6ad55;
    margin: 0.5rem 0;
}

.uafe-review-widget-wrapper #layout1 .overall-rating-box .review-count {
    font-size: 0.9rem;
}

.uafe-review-widget-wrapper #layout1 .rating-histogram {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.uafe-review-widget-wrapper #layout1 .rating-bar-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.uafe-review-widget-wrapper #layout1 .rating-bar-label {
    font-size: 0.875rem;
    flex-shrink: 0;
}

.uafe-review-widget-wrapper #layout1 .rating-bar-track {
    width: 100%;
    background-color: #e2e8f0;
    border-radius: 999px;
    height: 0.625rem;
}

.uafe-review-widget-wrapper #layout1 .rating-bar-fill {
    background-color: #f6ad55;
    height: 100%;
    border-radius: 999px;
    animation: fillBar 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes fillBar { from { width: 0%; } }

.uafe-review-widget-wrapper #layout1 .rating-bar-count {
    font-size: 0.875rem;
    font-weight: 500;
    width: 2rem;
    text-align: right;
}

.uafe-review-widget-wrapper #layout1 .individual-review-card {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(40px);
}

.uafe-review-widget-wrapper #layout1 .individual-review-card.is-visible {
    animation: fadeInUp 0.6s ease-out forwards;
}

.uafe-review-widget-wrapper #layout1 .review-header {
    display: flex;
    gap: 1rem;
}

.uafe-review-widget-wrapper #layout1 .review-header img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.uafe-review-widget-wrapper #layout1 .review-meta {
    width: 100%;
}

.uafe-review-widget-wrapper #layout1 .meta-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.uafe-review-widget-wrapper #layout1 .reviewer-name {
    font-weight: 600;
    color: #2d3748;
}

.uafe-review-widget-wrapper #layout1 .verified-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: #38a169;
    border: 1px solid #38a169;
    padding: 2px 6px;
    border-radius: 999px;
    margin-top: 0.25rem;
    display: inline-block;
}

.uafe-review-widget-wrapper #layout1 .review-date {
    font-size: 0.875rem;
}

.uafe-review-widget-wrapper #layout1 .review-content .stars {
    color: #f6ad55;
    margin: 0.75rem 0;
}

.uafe-review-widget-wrapper #layout1 .review-content h5 {
    font-weight: 600;
    font-size: 1.1rem;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.uafe-review-widget-wrapper #layout1 .review-content p {
    line-height: 1.6;
}

/*
========================================
LAYOUT 2: MODERN ANIMATED GRID
========================================
*/
.uafe-review-widget-wrapper #layout2 .reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.uafe-review-widget-wrapper #layout2 .review-card {
    background-color: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    opacity: 0;
    transform: translateY(40px);
    transition: box-shadow 0.3s ease;
}

.uafe-review-widget-wrapper #layout2 .review-card.is-visible {
     animation: fadeInUp 0.6s ease-out forwards;
}

.uafe-review-widget-wrapper #layout2 .review-card:hover {
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

.uafe-review-widget-wrapper #layout2 .review-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.uafe-review-widget-wrapper #layout2 .review-header img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.uafe-review-widget-wrapper #layout2 .reviewer-info .name {
    font-weight: 600;
    color: #2d3748;
}

.uafe-review-widget-wrapper #layout2 .reviewer-info .verified {
    font-size: 0.8rem;
    color: #38a169;
    font-weight: 500;
}

.uafe-review-widget-wrapper #layout2 .review-title {
    font-weight: 600;
    color: #2d3748;
    font-size: 1.1rem;
    margin: 1rem 0 0.5rem;
}

.uafe-review-widget-wrapper #layout2 .stars {
    color: #f6ad55;
    margin-bottom: 1rem;
}

.uafe-review-widget-wrapper #layout2 .review-body {
    font-size: 0.9rem;
    line-height: 1.6;
}


/*
========================================
LAYOUT 3: 3D TESTIMONIAL GRID
========================================
*/
.uafe-review-widget-wrapper #layout3 .reviews-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5rem 2rem;
}

.uafe-review-widget-wrapper #layout3 .review-card-container {
    opacity: 0;
    perspective: 1000px;
    transform: translateY(50px);
}

.uafe-review-widget-wrapper #layout3 .review-card-container.is-visible {
    animation: fadeInUp 0.8s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

.uafe-review-widget-wrapper #layout3 .review-card {
    position: relative;
    padding: 4rem 1.5rem 1.5rem;
    border-radius: 1.5rem;
    text-align: center;
    height: 100%;
    transition: transform 0.4s ease;
    transform-style: preserve-3d;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
}

.uafe-review-widget-wrapper #layout3 .review-card-avatar {
    position: absolute;
    top: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
}

.uafe-review-widget-wrapper #layout3 .review-card-avatar img {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    object-fit: cover;
}

.uafe-review-widget-wrapper #layout3 .name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
}

.uafe-review-widget-wrapper #layout3 .location {
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.uafe-review-widget-wrapper #layout3 .stars {
    color: #f6ad55;
    margin-bottom: 1rem;
}

.uafe-review-widget-wrapper #layout3 .review-content {
    font-size: 0.9rem;
    line-height: 1.6;
}

.uafe-review-widget-wrapper #layout3 .highlight-card {
    background: linear-gradient(45deg, #8e2de2, #4a00e0);
    color: #fff;
    transform: scale(1.05);
}
.uafe-review-widget-wrapper #layout3 .highlight-card .name, .uafe-review-widget-wrapper #layout3 .highlight-card .review-content, .uafe-review-widget-wrapper #layout3 .highlight-card .location {
    color: #fff;
}


/*
========================================
LAYOUT 4: CLEAN TESTIMONIAL CAROUSEL
========================================
*/
.uafe-review-widget-wrapper #layout4 .swiper-container {
    width: 100%;
    padding: 3rem 0;
}

.uafe-review-widget-wrapper #layout4 .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.uafe-review-widget-wrapper #layout4 .testimonial-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 2.5rem;
    padding-top: 5rem;
    width: 100%;
    max-width: 380px;
    position: relative;
    text-align: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.uafe-review-widget-wrapper #layout4 .testimonial-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(45deg, #a3bffa, #667eea);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.uafe-review-widget-wrapper #layout4 .testimonial-card:hover::before {
    opacity: 1;
}

.uafe-review-widget-wrapper #layout4 .testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 30px rgba(102, 126, 234, 0.15);
}

.uafe-review-widget-wrapper #layout4 .testimonial-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #ffffff;
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.uafe-review-widget-wrapper #layout4 .testimonial-quote {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 4rem;
    color: #667eea;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
}

.uafe-review-widget-wrapper #layout4 .testimonial-card:hover .testimonial-quote {
    opacity: 0.1;
    transform: scale(1);
}

.uafe-review-widget-wrapper #layout4 .testimonial-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.uafe-review-widget-wrapper #layout4 .testimonial-stars {
    color: #f6ad55;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.uafe-review-widget-wrapper #layout4 .testimonial-review {
    font-size: 0.95rem;
    line-height: 1.8;
}

.uafe-review-widget-wrapper #layout4 .swiper-pagination {
    position: static;
    margin-top: 2.5rem;
}

.uafe-review-widget-wrapper #layout4 .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background-color: #d1d5db;
    opacity: 1;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.uafe-review-widget-wrapper #layout4 .swiper-pagination-bullet-active {
    background-color: #667eea;
    transform: scale(1.25);
}

/*
========================================
LAYOUT 5: COVERFLOW CAROUSEL
========================================
*/
.uafe-review-widget-wrapper #layout5 .swiper-container {
    width: 100%;
    padding-top: 50px;
    padding-bottom: 50px;
}

.uafe-review-widget-wrapper #layout5 .swiper-slide {
    background-position: center;
    background-size: cover;
    width: 320px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 400px;
}

.uafe-review-widget-wrapper #layout5 .ImgHolder {
    background-color: #4361ee;
    display: flex;
    width: 100%;
    padding: 20px;
    border-bottom-left-radius: 25px;
    height: 500px;
}

.uafe-review-widget-wrapper #layout5 .ImgHolder img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: auto;
    object-fit: cover;
    border: 3px solid #4361ee;
    outline: 3px solid white;
}

.uafe-review-widget-wrapper #layout5 .ContentHolder {
    position: relative;
    padding: 20px;
    background-color: white;
    border-top-right-radius: 25px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.uafe-review-widget-wrapper #layout5 .ContentHolder::before {
    background-color: #4361ee;
    content: '';
    width: 50px;
    height: 50px;
    position: absolute;
    top: -1px;
    right: -1px;
    z-index: 0;
    clip-path: polygon(100% 0, 0 0, 100% 100%);
}

.uafe-review-widget-wrapper #layout5 .ContentHolder h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.uafe-review-widget-wrapper #layout5 .stars {
    color: #ffb703;
    margin-bottom: 1rem;
}

.uafe-review-widget-wrapper #layout5 .review-body {
    font-size: 0.9rem;
    line-height: 1.6;
    flex-grow: 1;
}

.uafe-review-widget-wrapper #layout5 .swiper-pagination {
    position: static;
    margin-top: 2rem;
}

.uafe-review-widget-wrapper #layout5 .swiper-pagination-bullet {
    background-color: #667eea;
    opacity: 0.5;
}

.uafe-review-widget-wrapper #layout5 .swiper-pagination-bullet-active {
    opacity: 1;
}


/* --- Responsive Media Queries --- */
 @media (min-width: 768px) {
    .uafe-review-widget-wrapper #layout1 .review-summary-card {
         grid-template-columns: 1fr 2fr;
     }
    .uafe-review-widget-wrapper #layout1 .overall-rating-box {
         border-bottom: 0;
         border-right: 1px solid #e2e8f0;
         padding-bottom: 0;
         padding-right: 1.5rem;
     }
    .uafe-review-widget-wrapper #layout1 .rating-histogram {
        padding-left: 1.5rem;
    }
    .uafe-review-widget-wrapper #layout3 .reviews-grid {
         grid-template-columns: repeat(2, 1fr);
     }
 }
 @media (min-width: 1024px) {
    .uafe-review-widget-wrapper #layout3 .reviews-grid {
         grid-template-columns: repeat(4, 1fr);
     }
 }

/* ============================================
   Responsive Design - Tablet & Mobile
   ============================================ */

@media (max-width: 768px) {
    .uafe-review-widget-wrapper .section-container {
        padding: 2rem 1rem;
    }

    .uafe-review-widget-wrapper .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    /* Layout 1 Responsive */
    .uafe-review-widget-wrapper #layout1 .review-summary-card {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .uafe-review-widget-wrapper #layout1 .overall-rating-box {
        border-bottom: 1px solid #e2e8f0;
        border-right: 0;
        padding-bottom: 1rem;
        padding-right: 0;
    }

    .uafe-review-widget-wrapper #layout1 .rating-histogram {
        padding-left: 0;
        padding-top: 1rem;
    }

    .uafe-review-widget-wrapper #layout1 .overall-rating-box .rating-value {
        font-size: 2.5rem;
    }

    /* Layout 2 Responsive */
    .uafe-review-widget-wrapper #layout2 .reviews-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Layout 3 Responsive */
    .uafe-review-widget-wrapper #layout3 .reviews-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Layout 4 Responsive */
    .uafe-review-widget-wrapper #layout4 .swiper-container {
        padding: 2rem 0;
    }

    .uafe-review-widget-wrapper #layout4 .testimonial-card {
        padding: 2rem;
        padding-top: 4rem;
        max-width: 100%;
    }

    .uafe-review-widget-wrapper #layout4 .testimonial-avatar {
        width: 70px;
        height: 70px;
        top: -35px;
    }

    .uafe-review-widget-wrapper #layout4 .testimonial-name {
        font-size: 1.1rem;
    }

    .uafe-review-widget-wrapper #layout4 .testimonial-review {
        font-size: 0.9rem;
    }

    /* Layout 5 Responsive */
    .uafe-review-widget-wrapper #layout5 .swiper-container {
        padding-top: 30px;
        padding-bottom: 30px;
    }

    .uafe-review-widget-wrapper #layout5 .swiper-slide {
        width: 280px;
        height: 350px;
    }

    .uafe-review-widget-wrapper #layout5 .ImgHolder {
        height: 400px;
        padding: 15px;
    }

    .uafe-review-widget-wrapper #layout5 .ImgHolder img {
        width: 60px;
        height: 60px;
    }

    .uafe-review-widget-wrapper #layout5 .ContentHolder {
        padding: 15px;
    }

    .uafe-review-widget-wrapper #layout5 .ContentHolder h3 {
        font-size: 1rem;
    }

    .uafe-review-widget-wrapper #layout5 .review-body {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .uafe-review-widget-wrapper .section-container {
        padding: 1.5rem 0.5rem;
    }

    .uafe-review-widget-wrapper .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    /* Layout 1 Mobile */
    .uafe-review-widget-wrapper #layout1 .review-summary-card {
        padding: 0.75rem;
        border-radius: 0.75rem;
    }

    .uafe-review-widget-wrapper #layout1 .overall-rating-box .rating-value {
        font-size: 2rem;
    }

    .uafe-review-widget-wrapper #layout1 .overall-rating-box .stars {
        font-size: 1rem;
    }

    .uafe-review-widget-wrapper #layout1 .individual-review-card {
        padding: 1rem;
        border-radius: 0.75rem;
    }

    /* Layout 2 Mobile */
    .uafe-review-widget-wrapper #layout2 .review-card {
        padding: 1.25rem;
    }

    /* Layout 3 Mobile */
    .uafe-review-widget-wrapper #layout3 .review-card-container {
        padding: 1.25rem;
    }

    .uafe-review-widget-wrapper #layout3 .review-card-avatar img {
        width: 4rem;
        height: 4rem;
    }

    .uafe-review-widget-wrapper #layout3 .name {
        font-size: 1.1rem;
    }

    /* Layout 4 Mobile */
    .uafe-review-widget-wrapper #layout4 .swiper-container {
        padding: 1.5rem 0;
    }

    .uafe-review-widget-wrapper #layout4 .testimonial-card {
        padding: 1.5rem;
        padding-top: 3.5rem;
        border-radius: 15px;
    }

    .uafe-review-widget-wrapper #layout4 .testimonial-avatar {
        width: 60px;
        height: 60px;
        top: -30px;
    }

    .uafe-review-widget-wrapper #layout4 .testimonial-name {
        font-size: 1rem;
    }

    .uafe-review-widget-wrapper #layout4 .testimonial-stars {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .uafe-review-widget-wrapper #layout4 .testimonial-review {
        font-size: 0.85rem;
        line-height: 1.6;
    }

    .uafe-review-widget-wrapper #layout4 .swiper-pagination {
        margin-top: 1.5rem;
    }

    .uafe-review-widget-wrapper #layout4 .swiper-pagination-bullet {
        width: 10px;
        height: 10px;
    }

    /* Layout 5 Mobile */
    .uafe-review-widget-wrapper #layout5 .swiper-container {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .uafe-review-widget-wrapper #layout5 .swiper-slide {
        width: 250px;
        height: 320px;
    }

    .uafe-review-widget-wrapper #layout5 .ImgHolder {
        height: 350px;
        padding: 12px;
    }

    .uafe-review-widget-wrapper #layout5 .ImgHolder img {
        width: 50px;
        height: 50px;
    }

    .uafe-review-widget-wrapper #layout5 .ContentHolder {
        padding: 12px;
    }

    .uafe-review-widget-wrapper #layout5 .ContentHolder h3 {
        font-size: 0.9rem;
    }

    .uafe-review-widget-wrapper #layout5 .review-body {
        font-size: 0.8rem;
    }

    .uafe-review-widget-wrapper #layout5 .swiper-pagination {
        margin-top: 1.5rem;
    }
}

/* ============================================
   Swiper Container Fixes
   ============================================ */

.uafe-review-widget-wrapper .swiper-container {
    width: 100%;
    overflow: hidden;
}

.uafe-review-widget-wrapper .swiper-wrapper {
    display: flex;
    width: 100%;
}

.uafe-review-widget-wrapper .swiper-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    position: relative;
}

/* Ensure Swiper is visible after initialization */
.uafe-review-widget-wrapper .swiper-container.swiper-container-initialized {
    opacity: 1;
    visibility: visible;
}

/* Fix for Swiper pagination visibility */
.uafe-review-widget-wrapper .swiper-pagination {
    position: relative;
    text-align: center;
    transition: 0.3s opacity;
    transform: translateZ(0);
    z-index: 10;
}

.uafe-review-widget-wrapper .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    display: inline-block;
    border-radius: 50%;
    background: #000;
    opacity: 0.2;
    margin: 0 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.uafe-review-widget-wrapper .swiper-pagination-bullet-active {
    opacity: 1;
    transform: scale(1.2);
}