/**
 * SHG Testimonials Styles
 */

.shg-testimonials-wrapper {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

.testimonials-title {
    text-align: center;
    font-size: 48px;
    font-weight: 400;
    font-family: 'Playfair Display', Georgia, serif;
    margin-bottom: 60px;
    color: #2c2c2c;
}

.shg-testimonials-container {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.shg-testimonials-container .testimonial-card {
    flex: 0 0 auto;
}

.shg-testimonials-container[data-columns="1"] .testimonial-card {
    width: 100%;
}

.shg-testimonials-container[data-columns="2"] .testimonial-card {
    width: calc((100% - 30px) / 2);
}

.shg-testimonials-container[data-columns="3"] .testimonial-card {
    width: calc((100% - 60px) / 3);
}

.shg-testimonials-container[data-columns="4"] .testimonial-card {
    width: calc((100% - 90px) / 4);
}

@media (max-width: 992px) {
    .shg-testimonials-container[data-columns="3"] .testimonial-card,
    .shg-testimonials-container[data-columns="4"] .testimonial-card {
        width: calc((100% - 30px) / 2);
    }
}

@media (max-width: 576px) {
    .shg-testimonials-container .testimonial-card {
        width: 100% !important;
    }
}

/* Testimonial Card */
.testimonial-card {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e5e5;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    max-height: 400px;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-color: #d0d0d0;
}

/* Header with Avatar and User Info */
.testimonial-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.testimonial-avatar {
    width: 63px;
    height: 63px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #d0ab76;
}

.testimonial-avatar-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
}

.testimonial-user-info {
    flex: 1;
}

.testimonial-user-name {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #2c2c2c;
}

.testimonial-user-badge {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

/* Rating */
.testimonial-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
}

.testimonial-rating .star {
    width: 20px;
    height: 20px;
    display: inline-block;
}

.testimonial-rating .star-filled,
.testimonial-rating .star-empty {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.testimonial-date {
    font-size: 13px;
    color: #999;
    margin-left: 10px;
}

/* Content */
.testimonial-content {
    font-size: 16px;
    line-height: 1.7;
    color: #555;
    margin-bottom: 20px;
    flex-grow: 1;
    max-height: 380px;
    overflow: hidden;
}

.testimonial-content p {
    margin: 0 0 10px 0;
}

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


/* Reactions */
.testimonial-reactions {
    display: flex;
    gap: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.testimonial-reactions .reaction {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #666;
}

.testimonial-reactions .reaction .icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.testimonial-reactions .reaction.heart .heart-icon {
    width: 24px;
    height: 24px;
}

.testimonial-reactions .reaction .count {
    font-weight: 500;
    color: #666;
}

/* Navigation */
.testimonials-navigation {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    align-items: center;
    margin-top: 30px;
}

.testimonials-navigation button {
    border: none;
    background: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.testimonials-navigation button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease, opacity 0.3s ease;
    position: absolute;
}

/* Arrow directions - Previous button points LEFT, Next button points RIGHT */
.testimonials-prev .btn-active {
    transform: scaleX(-1);
}

.testimonials-prev .btn-disabled {
    transform: scaleX(1);
}

.testimonials-next .btn-active {
    transform: scaleX(1);
}

.testimonials-next .btn-disabled {
    transform: scaleX(-1);
}

/* Show dark icon when active, hide light icon */
.testimonials-navigation button .btn-active {
    opacity: 1;
    visibility: visible;
}

.testimonials-navigation button .btn-disabled {
    opacity: 0;
    visibility: hidden;
}

/* When disabled, hide dark icon and show light icon */
.testimonials-navigation button:disabled .btn-active {
    opacity: 0;
    visibility: hidden;
}

.testimonials-navigation button:disabled .btn-disabled {
    opacity: 1;
    visibility: visible;
}

.testimonials-navigation button:disabled {
    cursor: not-allowed;
}

/* Hover effect - no transform changes, buttons stay in place */
.testimonials-navigation button:hover {
    opacity: 0.8;
}

.testimonials-navigation button:disabled:hover {
    opacity: 1;
}

/* Carousel Mode */
.shg-testimonials-container.carousel-mode {
    overflow: hidden;
    position: relative;
}

.shg-testimonials-container.carousel-mode .testimonial-card {
    scroll-snap-align: start;
}

/* Responsive adjustments */
/* Modal Styles */
.testimonial-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #e8d8bf;
}

.modal-content-wrapper {
    position: relative;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    background: #fff;
    border-radius: 20px;
    z-index: 100000;
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    z-index: 100001;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    border: none;
    background: transparent;
    cursor: pointer;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    padding: 0;
}

.modal-nav:hover {
    opacity: 0.8;
}

.modal-nav img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.modal-prev {
    left: 10px;
}

.modal-prev img {
    transform: scaleX(-1);
}

.modal-next {
    right: 10px;
}

.modal-content {
    padding: 60px 75px 40px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.modal-avatar-wrapper {
    flex-shrink: 0;
}

.modal-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #d0ab76;
}

.modal-user-name {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #2c2c2c;
}

.modal-user-badge {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.modal-rating {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.modal-stars {
    display: flex;
    gap: 5px;
}

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

.modal-text {
    font-size: 17px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 30px;
}

.modal-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.modal-gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.modal-gallery img:hover {
    transform: scale(1.05);
}

.modal-gallery.has-1 {
    grid-template-columns: 1fr;
}

.modal-gallery.has-2 {
    grid-template-columns: repeat(2, 1fr);
}

.modal-reactions {
    display: none;
}

/* Clickable card cursor */
.testimonial-card {
    cursor: pointer;
}

@media (max-width: 768px) {
    .testimonials-title {
        font-size: 36px;
        margin-bottom: 40px;
    }

    .testimonial-card {
        padding: 25px;
    }

    .testimonial-avatar {
        width: 53px;
        height: 53px;
    }

    .testimonial-user-name {
        font-size: 16px;
    }

    .testimonial-content {
        font-size: 15px;
    }

    .modal-content-wrapper {
        width: 95%;
    }

    .modal-content {
        padding: 50px 50px 30px;
    }

    .modal-gallery {
        grid-template-columns: 1fr !important;
    }

    .modal-nav {
        width: 35px;
        height: 35px;
    }

    .modal-nav img {
        width: 35px;
        height: 35px;
    }

    .modal-prev {
        left: 5px;
    }

    .modal-next {
        right: 5px;
    }
}
