/* Testimonials Section Styles */
.testimonial-card {
    background: linear-gradient(135deg, #1f2937, #111827);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.3);
    border: 1px solid #374151;
    transition: all 0.3s ease;
    min-width: 300px;
    max-width: 400px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.testimonial-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-gold);
    box-shadow: 0 20px 40px -20px rgba(255, 215, 0, 0.1);
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.testimonial-image {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    border: 2px solid var(--accent-gold);
    overflow: hidden;
}

.testimonial-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-info {
    flex: 1;
}

.testimonial-name {
    font-size: 1.125rem;
    font-weight: 600;
    background: linear-gradient(90deg, var(--accent-gold), var(--light-gold));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.testimonial-role {
    font-size: 0.875rem;
    color: #9ca3af;
}

.testimonial-company {
    font-size: 0.875rem;
    color: #d1d5db;
}

.testimonial-quote {
    position: relative;
    color: #d1d5db;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.testimonial-quote::before {
    content: '"';
    position: absolute;
    left: -0.5rem;
    top: -1rem;
    font-size: 2.5rem;
    color: var(--accent-gold);
    opacity: 0.5;
}

.testimonial-project {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #374151;
}

.testimonial-project-title {
    font-size: 0.875rem;
    color: var(--accent-gold);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.testimonial-location {
    font-size: 0.875rem;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.testimonial-location svg {
    width: 1rem;
    height: 1rem;
}

/* Navigation Controls */
.testimonial-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.testimonial-nav button {
    padding: 0.75rem;
    border-radius: 9999px;
    background-color: #1f2937;
    border: 1px solid #374151;
    transition: border-color 0.3s ease;
}

.testimonial-nav button:hover {
    border-color: var(--accent-gold);
}

.testimonial-nav button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.testimonial-nav button:disabled:hover {
    border-color: #374151;
}

/* Indicators */
.testimonial-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.testimonial-indicator {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background-color: #374151;
    transition: all 0.3s ease;
}

.testimonial-indicator.active {
    width: 1rem;
    background-color: var(--accent-gold);
}

/* Animation */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.testimonial-card {
    animation: fadeSlideIn 0.5s ease-out forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* On small screens we want the track to stack vertically
       so a single card is centered and looks like a column list. */
    #testimonials-track {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
        overflow-x: visible; /* remove horizontal scroll on mobile */
        align-items: center; /* center cards */
    }

    .testimonial-card {
        /* Make cards full-width but keep a comfortable side gutter */
        flex: 0 0 auto;
        width: calc(100% - 2rem);
        max-width: 720px;
        min-width: 0;
        margin: 0.25rem auto; /* center and small vertical spacing */
    }

    /* Hide snapping on mobile for natural vertical scroll */
    #testimonials-track {
        scroll-snap-type: none;
    }
}

/* Container & scroll behavior for horizontal layout on larger screens */
#testimonials-container {
    width: 100%;
    overflow: hidden;
}

/* On wide screens allow content to breathe outside container if needed */
@media (min-width: 1024px) {
    #testimonials-container { overflow: visible; }
}

/* Hide any leftover debug badges */
.testimonials-debug-badge { display: none !important; }

#testimonials-track {
    display: flex;
    gap: 1.5rem;
    padding: 1rem;
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden; /* hide scrollbar on desktop/tablet slider */
    scroll-snap-type: x mandatory;
}

.testimonial-card {
    scroll-snap-align: start;
    flex: 0 0 auto; /* default for larger screens */
}

@media (min-width: 769px) and (max-width: 1023px) {
    /* Tablet: slightly larger cards but still comfortable for horizontal scroll */
    .testimonial-card {
        flex: 0 0 60%;
        max-width: 640px;
        min-width: 320px;
    }
}

@media (min-width: 1024px) {
    /* Desktop: use compact cards, allow multiple cards in view */
    .testimonial-card {
        flex: 0 0 320px;
        min-width: 300px;
        max-width: 400px;
    }
    #testimonials-track {
        gap: 2rem;
        padding: 1.5rem 2rem;
    }
}

/* Final mobile override to ensure cascade doesn't re-enable horizontal layout */
@media (max-width: 768px) {
    #testimonials-track {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        padding: 1rem 0 !important;
        overflow-x: visible !important;
        scroll-snap-type: none !important;
        align-items: center !important;
    }

    .testimonial-card {
        width: calc(100% - 2rem) !important;
        max-width: 720px !important;
        margin: 0.25rem auto !important;
    }
}

/* Hide slider controls on small screens in case JS left them in place */
@media (max-width: 820px) {
    .testimonial-nav,
    .testimonial-indicators,
    .testimonials-debug-badge {
        display: none !important;
    }
}

/* Ensure testimonial navigation is centered within the page/container */
.testimonial-nav {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem 0 0 0;
}

/* Extra-small screens polish */
@media (max-width: 360px) {
    .testimonial-card { padding: 1rem; }
    .testimonial-name { font-size: 1rem; }
    .testimonial-role, .testimonial-company, .testimonial-location { font-size: 0.8rem; }
}
