/* ============================================
   ENHANCED TESTIMONIAL PAGE STYLES
   ============================================ */

/* Testimonial Hero Section */
.testimonial-hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #0a1628 100%);
    color: white;
    padding: 100px 0 80px;
    text-align: center;
}

.hero-label {
    color: var(--accent-orange);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    font-size: 14px;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 18px;
    color: #9ca3af;
    max-width: 700px;
    margin: 0 auto 60px;
    line-height: 1.6;
}

/* Trust Stats */
.trust-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 56px;
    font-weight: 800;
    color: var(--accent-orange);
    margin-bottom: 10px;
    font-family: 'Public Sans', sans-serif;
}

.stat-label {
    font-size: 16px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Rating Summary Section */
.rating-summary-section {
    padding: 60px 0;
    background: #f9fafb;
}

.rating-summary-card {
    background: white;
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    align-items: center;
}

.overall-rating {
    text-align: center;
    padding: 30px;
    border-right: 2px solid #e5e7eb;
}

.rating-number {
    font-size: 72px;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.rating-stars {
    font-size: 32px;
    margin-bottom: 15px;
    color: #fbbf24;
}

.rating-stars .star {
    margin: 0 2px;
}

.rating-stars .star.filled {
    color: #fbbf24;
}

.rating-stars .star.half {
    background: linear-gradient(90deg, #fbbf24 50%, #d1d5db 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rating-count {
    font-size: 16px;
    color: #111827;
}

/* Rating Distribution */
.rating-distribution {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rating-bar-item {
    display: grid;
    grid-template-columns: 50px 1fr 60px;
    align-items: center;
    gap: 15px;
}

.rating-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.rating-bar-bg {
    height: 12px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 6px;
    transition: width 1s ease;
}

.rating-percentage {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    text-align: right;
}

/* Filter Section */
.filter-section {
    padding: 40px 0;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 70px;
    z-index: 100;
}

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 24px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-main);
}

.filter-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
}

.sort-select {
    padding: 12px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    background: white;
    cursor: pointer;
    font-family: var(--font-main);
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-blue);
}

/* Featured Carousel Section */
.featured-carousel-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a6e 100%);
}

.section-title {
    text-align: center;
    font-size: 38px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 50px;
    letter-spacing: -0.5px;
}

.carousel-container {
    position: relative;
    max-width: 860px;
    margin: 0 auto;
    /* No overflow:hidden — so buttons are not clipped */
    padding: 0 70px;
    box-sizing: border-box;
}

.carousel-track {
    display: block;
    position: relative;
}

.carousel-slide {
    opacity: 0;
    transition: opacity 0.5s ease;
    display: none;
}

.carousel-slide.active {
    opacity: 1;
    display: block;
}

.featured-testimonial {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 52px 56px 44px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.featured-testimonial::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, #2563eb, #f59e0b);
    border-radius: 20px 20px 0 0;
}

.quote-icon-large {
    font-size: 90px;
    line-height: 1;
    font-family: Georgia, serif;
    background: linear-gradient(135deg, #3b82f6, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: -20px;
    display: block;
    position: static;
    opacity: 1;
}

.featured-quote {
    font-size: 20px;
    line-height: 1.75;
    color: #f59e0b;
    font-style: italic;
    margin-bottom: 36px;
    position: relative;
    z-index: 1;
}

.featured-author {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.author-info strong {
    display: block;
    font-size: 18px;
    color: #ffffff;
    margin-bottom: 4px;
}

.author-info span {
    font-size: 14px;
    color: #94a3b8;
}

.featured-rating {
    font-size: 22px;
    color: #f59e0b;
    letter-spacing: 3px;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    font-size: 28px;
    font-weight: 300;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
}

.carousel-btn:hover {
    background: #f59e0b;
    border-color: #f59e0b;
    color: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.5);
}

.carousel-btn.prev {
    left: 0;
}

.carousel-btn.next {
    right: 0;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 30px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d1d5db;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--primary-blue);
    width: 32px;
    border-radius: 6px;
}

/* Testimonials Grid Section */
.testimonials-grid-section {
    padding: 80px 0;
    background: #f9fafb;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 30px;
}

/* Enhanced Testimonial Cards */
.testimonial-card-enhanced {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.testimonial-card-enhanced:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rating-stars-small {
    font-size: 18px;
    color: #fbbf24;
}

.rating-stars-small .star {
    margin-right: 2px;
}

.rating-stars-small .star.filled {
    color: #fbbf24;
}

.rating-stars-small .star.half {
    background: linear-gradient(90deg, #fbbf24 50%, #d1d5db 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.verified-badge {
    font-size: 12px;
    color: #10b981;
    font-weight: 600;
    background: #d1fae5;
    padding: 4px 12px;
    border-radius: 12px;
}

.testimonial-text {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-color);
    font-style: italic;
    flex: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.author-details {
    flex: 1;
}

.author-details strong {
    display: block;
    font-size: 16px;
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.author-details span {
    display: block;
    font-size: 14px;
    color: #111827;
    margin-bottom: 3px;
}

.project-info {
    font-size: 13px !important;
    color: var(--primary-blue) !important;
    font-weight: 600 !important;
}

.helpful-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.helpful-btn:hover {
    background: #e0edff;
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.helpful-btn.marked {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
}

.thumb-icon {
    font-size: 16px;
}

/* CTA Section */
.testimonial-cta-section {
    padding: 80px 0;
    background: white;
}

.cta-card {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark) 100%);
    padding: 60px;
    border-radius: 20px;
    text-align: center;
    color: white;
}

.cta-card h2 {
    font-size: 42px;
    margin-bottom: 20px;
    color: white;
}

.cta-card p {
    font-size: 18px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-secondary {
    padding: 16px 32px;
    background: transparent;
    border: 2px solid white;
    color: white;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-blue);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 50px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 36px;
    font-weight: 300;
    color: #111827;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--primary-dark);
}

.modal-content h2 {
    font-size: 32px;
    margin-bottom: 10px;
    color: var(--primary-dark);
}

.modal-content>p {
    color: #111827;
    margin-bottom: 30px;
}

.review-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.star-rating-input {
    display: flex;
    gap: 8px;
    font-size: 32px;
}

.star-input {
    color: #d1d5db;
    cursor: pointer;
    transition: all 0.2s ease;
}

.star-input:hover,
.star-input.active {
    color: #fbbf24;
    transform: scale(1.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }

    .trust-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .stat-number {
        font-size: 42px;
    }

    .rating-summary-card {
        grid-template-columns: 1fr;
        padding: 30px;
        gap: 30px;
    }

    .overall-rating {
        border-right: none;
        border-bottom: 2px solid #e5e7eb;
        padding-bottom: 30px;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-buttons {
        justify-content: center;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .carousel-btn.prev {
        left: 10px;
    }

    .carousel-btn.next {
        right: 10px;
    }

    .featured-testimonial {
        padding: 40px 30px;
    }

    .featured-quote {
        font-size: 18px;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .cta-card h2 {
        font-size: 28px;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .modal-content {
        padding: 30px;
    }
}

/* Animation for filtering */
.testimonial-card-enhanced.fade-out {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.testimonial-card-enhanced.fade-in {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
}