/* Nordic Accessible Testimonial Slider Styles */
.nordic-testimonial-slider-wrapper {
    margin: 2rem 0;
    position: relative;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Screen reader only text */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.nordic-testimonial-slider {
    position: relative;
    width: 100%;
    height: auto;
    padding: 0 60px;
}

.nordic-testimonial-slider .swiper-slide {
    height: auto;
    display: flex;
    align-items: stretch;
}

/* Testimonial Item Styles */
.nordic-testimonial-slider .testimonial-item {
    width: 100%;
    padding: 2rem;
    text-align: center;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e1e1e1;
}

.nordic-testimonial-slider .testimonial-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.nordic-testimonial-slider .testimonial-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

/* Title Styles */
.nordic-testimonial-slider .testimonial-title {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

/* Rating Styles */
.nordic-testimonial-slider .testimonial-rating {
    margin: 0 0 1.5rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.nordic-testimonial-slider .star {
    font-size: 1.2rem;
    color: #ddd;
    transition: color 0.3s ease;
}

.nordic-testimonial-slider .star.filled {
    color: #b50b0b;
}

/* Content Styles */
.nordic-testimonial-slider .testimonial-entry-content {
    flex-grow: 1;
    margin: 0 0 1.5rem 0;
}

.nordic-testimonial-slider .testimonial-entry-content blockquote {
    margin: 0;
    padding: 0;
    border: none;
    font-style: italic;
}

.nordic-testimonial-slider .testimonial-entry-content blockquote p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
}

/* Adjust spacing when no rating is shown */
.nordic-testimonial-slider .testimonial-entry-content.no-rating {
    margin-top: 0.5rem;
}

/* Author Styles */
.nordic-testimonial-slider .testimonial-author {
    margin-top: auto;
}

.nordic-testimonial-slider .person-name {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

/* Navigation Buttons - Positioned outside the slider */
.nordic-testimonial-slider-wrapper .swiper-button-prev,
.nordic-testimonial-slider-wrapper .swiper-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
      background: rgba(0, 0, 0, .5);
    color: #fff;
    border: 2px solid #ddd;
    border-radius: 50%;
   
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.nordic-testimonial-slider-wrapper .swiper-button-prev:hover,
.nordic-testimonial-slider-wrapper .swiper-button-next:hover {
     background-color: #6c94d5;
    color: #fff;
    border-color: #333;
    transform: translateY(-50%) scale(1.1);
}

.nordic-testimonial-slider-wrapper .swiper-button-prev:focus,
.nordic-testimonial-slider-wrapper .swiper-button-next:focus {
      background-color: #6c94d5;
    color: #fff;
    border-color: #333;
    outline: 3px solid #007cba;
    outline-offset: 2px;
}

.nordic-testimonial-slider-wrapper .swiper-button-prev {
    left: 10px;
}

.nordic-testimonial-slider-wrapper .swiper-button-next {
    right: 10px;
}

.nordic-testimonial-slider .swiper-button-prev:after,
.nordic-testimonial-slider .swiper-button-next:after {
    content: none;
}

/* Pagination as list - Enhanced visibility */
.testimonial-pagination-nav {
    margin-top: 2rem;
    text-align: center;
    display: block !important;
    visibility: visible !important;
}

.testimonial-pagination-list,
.swiper-pagination {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 12px !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.testimonial-pagination-list li,
.swiper-pagination li {
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    visibility: visible !important;
}

/* Pagination bullets - Multiple selectors for specificity */
.swiper-pagination-bullet,
.nordic-testimonial-slider .swiper-pagination-bullet,
.testimonial-pagination-list .swiper-pagination-bullet,
.testimonial-pagination-list button {
    width: 14px !important;
    height: 14px !important;
    background: #ddd !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    border: none !important;
    padding: 0 !important;
    display: block !important;
    margin: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: static !important;
}

.swiper-pagination-bullet:hover,
.nordic-testimonial-slider .swiper-pagination-bullet:hover,
.testimonial-pagination-list .swiper-pagination-bullet:hover,
.testimonial-pagination-list button:hover {
    background: #666 !important;
    transform: scale(1.3) !important;
}

.swiper-pagination-bullet:focus,
.nordic-testimonial-slider .swiper-pagination-bullet:focus,
.testimonial-pagination-list .swiper-pagination-bullet:focus,
.testimonial-pagination-list button:focus {
    background: #666 !important;
    outline: 3px solid #007cba !important;
    outline-offset: 3px !important;
}

.swiper-pagination-bullet-active,
.nordic-testimonial-slider .swiper-pagination-bullet-active,
.testimonial-pagination-list .swiper-pagination-bullet-active,
.testimonial-pagination-list button.swiper-pagination-bullet-active {
    background: #333 !important;
    transform: scale(1.4) !important;
}

/* Override any Swiper defaults that might hide pagination */
.swiper-pagination-hidden {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.swiper-wrapper {
    margin-bottom: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nordic-testimonial-slider {
        padding: 0 50px;
    }
    
    .nordic-testimonial-slider-wrapper .swiper-button-prev,
    .nordic-testimonial-slider-wrapper .swiper-button-next {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    
    .nordic-testimonial-slider .testimonial-item {
        padding: 1.5rem;
    }
    
    .nordic-testimonial-slider .testimonial-title {
        font-size: 1.1rem;
    }
    
    .nordic-testimonial-slider .testimonial-entry-content blockquote p {
        font-size: 0.95rem;
    }
    
    /* Make pagination bullets slightly larger on mobile */
    .swiper-pagination-bullet,
    .nordic-testimonial-slider .swiper-pagination-bullet,
    .testimonial-pagination-list .swiper-pagination-bullet,
    .testimonial-pagination-list button {
        width: 16px !important;
        height: 16px !important;
    }
}

@media (max-width: 480px) {
    .nordic-testimonial-slider {
        padding: 0 45px;
    }
    
    .nordic-testimonial-slider-wrapper .swiper-button-prev {
        left: 5px;
    }
    
    .nordic-testimonial-slider-wrapper .swiper-button-next {
        right: 5px;
    }
    
    .nordic-testimonial-slider .testimonial-item {
        padding: 1.25rem;
    }
    
    .nordic-testimonial-slider .testimonial-title {
        font-size: 1rem;
    }
    
    .nordic-testimonial-slider .testimonial-entry-content blockquote p {
        font-size: 0.9rem;
    }
}

/* Focus Management */
.nordic-testimonial-slider[aria-hidden="true"] * {
    visibility: hidden;
}

.nordic-testimonial-slider .swiper-slide[aria-hidden="true"] a,
.nordic-testimonial-slider .swiper-slide[aria-hidden="true"] button {
    tabindex: -1;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .nordic-testimonial-slider .testimonial-item {
        border: 3px solid;
    }
    
    .nordic-testimonial-slider-wrapper .swiper-button-prev,
    .nordic-testimonial-slider-wrapper .swiper-button-next {
        border-width: 3px;
    }
    
    .swiper-pagination-bullet,
    .nordic-testimonial-slider .swiper-pagination-bullet,
    .testimonial-pagination-list .swiper-pagination-bullet,
    .testimonial-pagination-list button {
        border: 2px solid !important;
    }
}

/* Print Styles */
@media print {
    .nordic-testimonial-slider-wrapper .swiper-button-prev,
    .nordic-testimonial-slider-wrapper .swiper-button-next,
    .testimonial-pagination-nav {
        display: none;
    }
    
    .nordic-testimonial-slider .swiper-slide {
        page-break-inside: avoid;
    }
}