/* =========================================
   Zippy Review Slider – Main Styles
   ========================================= */

/* ---------- CSS Custom Properties ---------- */
.review-slider-wrapper {
    --zippy-featured-bg:    #f4f7ff;
    --zippy-featured-scale: 1.08;
    --zippy-review-lines:   12;
    --zippy-nav-offset:     60px;
    position: relative;
    padding: 40px 0 60px;
}

/* =========================================
   Navigation – Outside
   ========================================= */
.review-slider-wrapper.nav-outside {
    padding-left:  var(--zippy-nav-offset);
    padding-right: var(--zippy-nav-offset);
}

.zippy-nav-outside {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 10;
    display: flex;
    justify-content: space-between;
}

.zippy-nav-outside .swiper-button-prev,
.zippy-nav-outside .swiper-button-next {
    pointer-events: all;
    position: static;
    transform: none;
    margin-top: 0;
    flex-shrink: 0;
}

/* =========================================
   Swiper Core
   ========================================= */
.zippy-review-slider {
    width: 100%;
    overflow: hidden;
    padding: 70px 0 !important;
}

/* stretch = all visible slides share the same height → uniform card heights */
.zippy-review-slider .swiper-wrapper {
    align-items: stretch;
}

.zippy-review-slider .swiper-slide {
    height: auto;
    box-sizing: border-box;
    transition: transform 0.4s ease, opacity 0.4s ease;
    opacity: 0.6;
}

.zippy-review-slider .swiper-slide-active {
    opacity: 1;
}

/* =========================================
   Featured-Center Mode
   ========================================= */
.review-slider-wrapper.has-featured-center-card .swiper-slide-active .review-card {
    background-color: var(--zippy-featured-bg) !important;
    transform: scale(var(--zippy-featured-scale));
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    z-index: 2;
}

.review-slider-wrapper.has-featured-center-card .swiper-slide:not(.swiper-slide-active) {
    opacity: 0.75;
}

/* =========================================
   Review Card
   ========================================= */
.review-card {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    height: 100%;          /* fills the slide height so all cards match */
    box-sizing: border-box;
    overflow: hidden;      /* safe again — nothing expands inline */
    transition: background-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
}

/* ---------- Quote Icon ---------- */
.review-quote-icon {
    margin-bottom: 12px;
    line-height: 1;
    flex-shrink: 0;
}

.review-quote-icon svg {
    display: block;
    transition: fill 0.4s ease, opacity 0.4s ease;
}

/* ---------- Review Content (clamped) ---------- */
.review-content {
    flex: 1;
    color: #666666;
    font-style: italic;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 16px;
    overflow: hidden;
    transition: color 0.4s ease;
}

.review-content p {
    margin: 0 0 0.75em;
}

.review-content p:last-child {
    margin-bottom: 0;
}

/* Clamp text inside card – clicking "Read full" opens modal, not inline */
.review-slider-wrapper.has-clamped-review-text .review-content-text {
    display: -webkit-box;
    -webkit-line-clamp: var(--zippy-review-lines);
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Read Full Button ---------- */
.review-read-full {
    text-align: end !important;
    background-color: transparent !important;
    padding-top: 0 !important;
    color: #1a1a1a !important;
    text-transform: none !important; 
    text-decoration: underline;
    font-weight: 500 !important; 
}

.swiper-slide-active .review-read-full {
    color: #fff !important;
}


.review-read-full:hover {
    background: #f0c800;
    transform: translateY(-1px);
    text-decoration: underline;
}

/* ---------- Star Rating ---------- */
.review-stars {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.review-stars .star {
    font-size: 18px;
    line-height: 1;
    color: #e0e0e0;
    transition: color 0.4s ease;
}

.review-stars .star.filled {
    color: #FFD700;
}

/* ---------- Author ---------- */
.review-author {
    display: flex;
    flex-direction: column;
    text-align: center;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    flex-shrink: 0;
}

.review-author-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.review-author-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.review-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.review-author-name {
    font-weight: 700;
    font-size: 15px;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: color 0.4s ease;
}

.review-author-title {
    font-size: 13px;
    color: #4169E1;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.4s ease;
}

/* =========================================
   Swiper Navigation Buttons
   ========================================= */
.zippy-review-slider .swiper-button-prev,
.zippy-review-slider .swiper-button-next,
.zippy-nav-outside .swiper-button-prev,
.zippy-nav-outside .swiper-button-next {
    color: #4169E1;
    background-color: #ffffff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.zippy-review-slider .swiper-button-prev:hover,
.zippy-review-slider .swiper-button-next:hover,
.zippy-nav-outside .swiper-button-prev:hover,
.zippy-nav-outside .swiper-button-next:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.zippy-review-slider .swiper-button-prev::after,
.zippy-review-slider .swiper-button-next::after,
.zippy-nav-outside .swiper-button-prev::after,
.zippy-nav-outside .swiper-button-next::after {
    font-size: 18px;
    font-weight: 700;
}

.zippy-review-slider .swiper-button-prev,
.zippy-review-slider .swiper-button-next {
    top: calc(50% - 25px);
    transform: translateY(-50%);
}

/* =========================================
   Swiper Pagination
   ========================================= */
.zippy-review-slider .swiper-pagination {
    bottom: 0;
}

.zippy-review-slider .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #cccccc;
    opacity: 1;
}

.zippy-review-slider .swiper-pagination-bullet-active {
    background-color: #4169E1;
}

/* =========================================
   Layout: Center
   ========================================= */
.review-card.layout-center {
    justify-content: center;
}

.review-card.layout-center .review-content {
    flex: 0 0 auto;
}

/* =========================================
   READ FULL MODAL
   ========================================= */

/* Prevent body scroll while modal open */
body.zippy-modal-open {
    overflow: hidden;
}

#zippy-review-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Semi-transparent backdrop */
.zippy-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    cursor: pointer;
}

/* Dialog box */
.zippy-modal-dialog {
    position: relative;
    z-index: 1;
    background: #ffffff;
    border-radius: 14px;
    padding: 48px 40px 40px;
    width: min(640px, 92vw);
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
    display: flex;
    flex-direction: column;
    gap: 20px;
    /* Smooth scroll inside dialog */
    overscroll-behavior: contain;
}

/* Close button */
.zippy-modal-close {
    position: absolute;
    top: 16px;
    right: 18px;
    outline: none !important;
    background: none !important;
    border: none !important;
    font-size: 28px !important;
    line-height: 1;
    color: #999999 !important;
    cursor: pointer;
    padding: 4px 8px !important;
    border-radius: 6px;
    transition: color 0.15s ease, background 0.15s ease;
}

.zippy-modal-close:hover {
    color: #1a1a1a;
    background: #f0f0f0;
}

/* Stars inside modal */
.zippy-modal-stars {
    display: flex;
    gap: 3px;
}

.zippy-modal-stars .star {
    font-size: 22px;
    color: #e0e0e0;
}

.zippy-modal-stars .star.filled {
    color: #FFD700;
}

/* Full review text */
.zippy-modal-content {
    font-size: 16px;
    line-height: 1.8;
    color: #444444;
    font-style: italic;
}

.zippy-modal-content p {
    margin: 0 0 0.8em;
}

.zippy-modal-content p:last-child {
    margin-bottom: 0;
}

/* Author row at the bottom */
.zippy-modal-author {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
    margin-top: auto;
}

.zippy-modal-author-image {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.zippy-modal-author-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.zippy-modal-author-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.zippy-modal-author-name {
    font-weight: 700;
    font-size: 15px;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.zippy-modal-author-title {
    font-size: 13px;
    color: #4169E1;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 1024px) {
    .review-slider-wrapper.has-featured-center-card .swiper-slide-active .review-card {
        transform: scale(1);
    }

    .review-slider-wrapper.nav-outside {
        padding-left:  44px;
        padding-right: 44px;
    }
}

@media (max-width: 767px) {
    .zippy-review-slider .swiper-slide {
        opacity: 1;
    }

    .review-slider-wrapper.has-featured-center-card .swiper-slide:not(.swiper-slide-active) {
        opacity: 1;
    }

    .review-slider-wrapper.has-featured-center-card .swiper-slide-active .review-card {
        transform: scale(1);
    }

    .review-slider-wrapper.nav-outside {
        padding-left:  36px;
        padding-right: 36px;
    }

    .zippy-modal-dialog {
        padding: 40px 24px 32px;
    }
}