/* Testimonials Container */
.testimonials-section {
    padding: 60px 0;
    margin-top: 20px;
}

.testimonials-swiper {
    padding: 0 20px 40px 20px;
}

.testimonial-card {
    transition: transform 0.3s ease;
    height: 100%;
}

.testimonial-card .card {
    height: 320px;
    width: 100%;
    max-width: 350px;
    min-height: 320px;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.testimonial-card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.testimonial-card blockquote p {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

.testimonial-card:hover .card {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Category Badge/Button */
.category-btn {
    text-decoration: none;
    display: inline-block;
    border: 4px solid #e0e0e0;
    color: #262626;
    background-color: #ffffff;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: #f8f9fa;
    transition: width 0.35s ease;
    z-index: -1;
}

.category-btn:hover {
    color: #262626 !important;
    border-color: #7FC7E4;
    box-shadow: 0 2px 8px rgba(127, 199, 228, 0.2);
    transform: scale(1.05);
}

.category-btn:hover::before {
    width: 100%;
}

.category-btn:active {
    transform: scale(0.98);
}

@media (max-width: 768px) {
    .category-btn {
        flex: 0 1 calc(50% - 0.75rem) !important;
        min-width: 100px !important;
    }
}

@media (max-width: 480px) {
    .category-btn {
        flex: 0 1 100% !important;
    }
}

/* Modal Content & Shadow */
.modal-content {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

#testimonialModal .modal-dialog {
    margin-left: auto !important;
    margin-right: auto !important;
}

#modalRating {
    line-height: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

#modalRating i {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Half star styling */
.star-half-container {
    position: relative;
    display: inline-block;
}

.star-half-container .star-empty {
    color: #E0E0E0;
}

.star-half-container .star-half-fill {
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    overflow: hidden;
    color: #FFD700;
}

/* Image Gallery in Cards */
.testimonial-image-thumb {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-image-thumb:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(127, 199, 228, 0.5) !important;
}

[class*="testimonial-images-swiper"] .swiper-button-next,
[class*="testimonial-images-swiper"] .swiper-button-prev {
    width: 25px;
    height: 25px;
}

[class*="testimonial-images-swiper"] .swiper-button-next::after,
[class*="testimonial-images-swiper"] .swiper-button-prev::after {
    font-size: 14px;
    font-weight: bold;
}

/* Modal Swiper */
.modal-testimonial-swiper {
    padding: 20px 50px;
    overflow: hidden;
}

.modal-testimonial-swiper .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-testimonial-swiper .swiper-button-next,
.modal-testimonial-swiper .swiper-button-prev {
    width: 40px;
    height: 40px;
}

.modal-testimonial-swiper .swiper-button-next::after,
.modal-testimonial-swiper .swiper-button-prev::after {
    font-size: 20px;
}

#modalImagesSwiper .swiper-pagination {
    text-align: center;
}

#modalImagesSwiper .swiper-pagination-bullet {
    background: #7FC7E4;
    opacity: 0.5;
    width: 10px;
    height: 10px;
    margin: 0 5px;
}

#modalImagesSwiper .swiper-pagination-bullet-active {
    opacity: 1;
    background: #7FC7E4;
}

.modal-testimonial-swiper img {
    transition: transform 0.3s ease;
    max-width: 100%;
    height: auto;
}

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

@media (max-width: 768px) {
    .modal-testimonial-swiper {
        padding: 10px 40px;
    }

    #testimonialModal .modal-body {
        padding: 2rem 1rem !important;
    }

    .modal-testimonial-swiper img {
        width: 150px !important;
        height: 150px !important;
        max-width: 150px;
    }
}

@media (max-width: 576px) {
    .modal-testimonial-swiper {
        padding: 10px 35px;
    }

    #testimonialModal .modal-body {
        padding: 1.5rem 0.5rem !important;
    }

    .modal-testimonial-swiper img {
        width: 120px !important;
        height: 120px !important;
        max-width: 120px;
    }
}

/* Fullscreen Image Modal Styles */
#imageModal .modal-content {
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

#imageModal .modal-body {
    transition: opacity 0.3s ease;
}

#fullscreenImage {
    animation: zoomIn 0.3s ease;
    transition: opacity 0.15s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-30px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(30px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-left {
    animation: slideInLeft 0.3s ease;
}

.slide-in-right {
    animation: slideInRight 0.3s ease;
}

.fullscreen-nav-btn {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0.8;
    z-index: 1056;
    padding: 0;
    cursor: pointer;
}

.fullscreen-nav-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.6);
    opacity: 1;
    transform: translateY(-50%) scale(1.15);
}

.fullscreen-nav-btn i {
    color: white;
    font-size: 2rem;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .fullscreen-nav-btn {
        width: 50px;
        height: 50px;
    }

    .fullscreen-nav-btn i {
        font-size: 1.5rem;
    }

    .fullscreen-nav-btn:hover {
        transform: translateY(-50%) scale(1.1);
    }
}

@media (min-width: 577px) and (max-width: 991px) {
    #testimonialModal .modal-dialog {
        max-width: 90%;
        margin: 1.75rem auto !important;
    }
}

@media (max-width: 768px) {
    .testimonials-swiper {
        padding: 0 10px 30px 10px;
    }

    .modal-dialog {
        margin: 10px;
    }

    #testimonialModal .modal-dialog {
        margin: 10px auto !important;
    }

    #fullscreenImage {
        max-width: 95%;
        max-height: 85vh;
    }
}

@media (max-width: 576px) {
    #testimonialModal .modal-dialog {
        margin: 0.5rem auto !important;
        max-width: calc(100% - 1rem);
    }
}