/**
 * Happy Customers Widget Styles
 * Package: Netrobit_Core
 */

.netrobit-happy-customers,
.netrobit-happy-customers * {
    box-sizing: border-box;
}

.netrobit-happy-customers {
    position: relative;
    padding: 20px 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Swiper Structure */
.netrobit-happy-customers .swiper-container {
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    list-style: none;
    padding: 20px 0 40px;
    /* Reduced bottom padding to bring pagination closer */
    z-index: 1;
}

.netrobit-happy-customers .swiper-wrapper {
    display: flex;
    transition-property: transform;
    box-sizing: content-box;
    align-items: stretch;
}

/* Fallback/CLS Prevention: Ensure cards are visible in a row before init */
.netrobit-happy-customers .swiper-container:not(.swiper-container-initialized) .swiper-wrapper {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding-bottom: 20px;
}

.netrobit-happy-customers .swiper-container:not(.swiper-container-initialized) .swiper-slide {
    width: calc(25% - 15px);
    flex-shrink: 0;
}

@media (max-width: 1024px) {
    .netrobit-happy-customers .swiper-container:not(.swiper-container-initialized) .swiper-slide {
        width: calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .netrobit-happy-customers .swiper-container:not(.swiper-container-initialized) .swiper-slide {
        width: calc(100% - 40px);
    }
}

.netrobit-happy-customers .swiper-slide {
    flex-shrink: 0;
    height: auto;
    position: relative;
    transition-property: transform;
}

/* Card Style - Full Image Modern */
.netrobit-testimonial-card {
    background: #000;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 420px;
    /* Consistent height */
    display: flex;
    flex-direction: column;
    position: relative;
    border: none;
    will-change: transform;
}

.netrobit-testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.netrobit-testimonial-img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    transition: transform 0.8s ease;
    display: block;
}

.netrobit-testimonial-card:hover .netrobit-testimonial-img {
    transform: scale(1.1);
}

.netrobit-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px 30px 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.6) 40%, transparent 100%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    pointer-events: none;
}

.netrobit-client-info h4 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.netrobit-client-treatment {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    margin-top: 8px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.netrobit-card-bottom {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.netrobit-testimonial-country {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #ffffff;
    font-weight: 500;
}

.netrobit-testimonial-country img,
.netrobit-testimonial-country i {
    width: auto;
    max-width: 22px;
    margin-right: 10px !important;
    border-radius: 2px;
}

/* Video Trigger */
.netrobit-video-trigger {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.25);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer !important;
    z-index: 99;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: auto !important;
    padding: 0;
    margin: 0;
    outline: none;
}

.netrobit-video-trigger svg {
    width: 28px;
    height: 28px;
    color: #ffffff;
    fill: none;
    margin-left: 4px;
    /* Optical centering for triangle icon */
}

.netrobit-testimonial-card:hover .netrobit-video-trigger {
    background: #ffffff;
    transform: translate(-50%, -50%) scale(1.1);
    border-color: #ffffff;
}

.netrobit-testimonial-card:hover .netrobit-video-trigger svg {
    color: #000000;
}

/* Minimal Arrow Styling */
.netrobit-happy-customers .swiper-button-next,
.netrobit-happy-customers .swiper-button-prev {
    position: absolute;
    top: calc(50% - 20px);
    /* Vertical alignment with play buttons */
    width: 60px;
    height: 60px;
    background: transparent;
    color: #ffffff;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 50;
    margin-top: -30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.netrobit-happy-customers .swiper-button-next svg,
.netrobit-happy-customers .swiper-button-prev svg {
    width: 36px;
    height: 36px;
}

.netrobit-happy-customers:hover .swiper-button-next,
.netrobit-happy-customers:hover .swiper-button-prev {
    opacity: 1;
    visibility: visible;
}

.netrobit-happy-customers .swiper-button-next:after,
.netrobit-happy-customers .swiper-button-prev:after {
    display: none;
}

.netrobit-happy-customers .swiper-button-next:hover,
.netrobit-happy-customers .swiper-button-prev:hover {
    transform: scale(1.1);
    color: #ffffff;
}

.netrobit-happy-customers .swiper-button-prev {
    left: 10px;
}

.netrobit-happy-customers .swiper-button-next {
    right: 10px;
}

/* Pagination - Hidden by default, shown via conditional rendering */
/* .netrobit-happy-customers .swiper-pagination {
    display: none !important;
} */

/* Mobile Adjustments */
@media (max-width: 1024px) {
    .netrobit-testimonial-card {
        height: 380px;
    }
}

@media (max-width: 768px) {

    .netrobit-happy-customers .swiper-button-next,
    .netrobit-happy-customers .swiper-button-prev {
        display: none !important;
    }
}

/* =========================================
   Layout: Text Review (KlinikNo1 Style)
   ========================================= */

/* Pagination Dots - Make visible */
.netrobit-happy-customers .swiper-pagination {
    display: block !important;
    position: relative !important;
    bottom: auto !important;
    width: 100% !important;
    text-align: center;
    margin-top: 0px;
    /* Reduced gap */
    z-index: 10;
}

.netrobit-happy-customers .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #e1e8ed;
    opacity: 1;
    transition: all 0.3s ease;
    display: inline-block;
    margin: 0 4px;
    border-radius: 50%;
    /* Make them round */
}

.netrobit-happy-customers .swiper-pagination-bullet-active {
    background: #0E384C;
    width: 24px;
    border-radius: 10px;
    /* Oval shape for active */
}

/* Text Review Card Container */
.netrobit-testimonial-card.layout-text-review {
    background: #ffffff;
    border: 1px solid rgba(14, 56, 76, 0.07);
    border-radius: 24px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    height: 420px;
    /* Consistent height */
    box-shadow: none;
    transition: all 0.3s ease;
}

.netrobit-testimonial-card.layout-text-review:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
    border-color: rgba(14, 56, 76, 0.15);
}

/* Stars */
.netrobit-testimonial-card.layout-text-review .netrobit-review-stars {
    margin-bottom: 20px;
    color: #FFD222;
    font-size: 18px;
    display: flex;
    gap: 4px;
}

/* Content */
.netrobit-testimonial-card.layout-text-review .netrobit-review-content {
    flex-grow: 1;
    overflow: hidden;
    margin-bottom: 20px;
}

.netrobit-testimonial-card.layout-text-review .netrobit-review-content p {
    font-family: 'Onest', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #527282;
    font-weight: 400;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 8;
    /* Limit lines to prevent overflow */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Footer (Author Info) */
.netrobit-testimonial-card.layout-text-review .netrobit-review-footer {
    border-top: 1px solid rgba(14, 56, 76, 0.05);
    padding-top: 20px;
    margin-top: auto;
}

.netrobit-testimonial-card.layout-text-review .netrobit-client-info h4 {
    color: #0E384C;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.netrobit-testimonial-card.layout-text-review .netrobit-testimonial-country {
    display: flex;
    align-items: center;
    color: #8faab8;
    font-size: 14px;
    font-weight: 500;
}

.netrobit-testimonial-card.layout-text-review .netrobit-testimonial-country span {
    color: #8faab8;
}

@media (max-width: 768px) {
    .netrobit-testimonial-card.layout-text-review {
        height: auto;
        min-height: 300px;
        padding: 20px;
        margin-bottom: 30px;
        /* Add space for pagination */
    }

    .netrobit-happy-customers .swiper-pagination {
        margin-top: 10px;
        position: relative !important;
        bottom: 0 !important;
    }

    .netrobit-testimonial-card.layout-text-review .netrobit-review-stars {
        font-size: 16px;
        margin-bottom: 15px;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .netrobit-testimonial-card.layout-text-review .netrobit-review-content p {
        font-size: 14px;
        -webkit-line-clamp: 6;
    }
}