/* testimonials.css — Testimonial marquee, cards, modal and navigation.

   Extracted from the old components.css. LOAD ORDER MATTERS: these files were
   cut as contiguous slices of one stylesheet, so they must stay linked in this
   order or the cascade changes:
     timeline -> testimonials -> contact -> track-record -> contact-dark -> chrome -> experience -> dark-theme
*/

/* Testimonials Section */
.testimonials-section {
    position: relative;
    overflow: hidden;
}

.testimonials-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Testimonial Marquee */
.testimonial-marquee-wrapper {
    margin-top: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    overflow: hidden;
    /* Extend beyond container */
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
}

.testimonial-marquee-row {
    display: flex;
    gap: var(--space-md);
    width: max-content;
}

.testimonial-marquee-row.scroll-left {
    animation: marqueeLeft 60s linear infinite;
}

.testimonial-marquee-row.scroll-right {
    animation: marqueeRight 60s linear infinite;
}

@keyframes marqueeLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes marqueeRight {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* Testimonial Cards */
.testimonial-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: var(--space-md);
    cursor: pointer;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    width: 400px;
    flex-shrink: 0;
}

.testimonial-card:hover {
    border-color: rgba(var(--color-accent-rgb), 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.testimonial-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text);
    margin: 0 0 var(--space-md);
    font-style: italic;
    opacity: 0.8;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.testimonial-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.testimonial-info h4 {
    font-size: 0.85rem;
    margin: 0;
    color: var(--color-text);
    font-weight: 600;
    line-height: 1.3;
}

.testimonial-info p {
    font-size: 0.75rem;
    opacity: 0.6;
    margin: 0;
    color: var(--color-text);
}

/* Hide old quote marks — not used in marquee cards */
.quote-open,
.quote-close {
    display: none;
}

/* Testimonial Modal - Inherits from unified modal system */
.testimonial-modal {
    /* Inherits base modal styles from base.css */
}

.testimonial-modal .modal-content {
    max-width: 800px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Modal uses same testimonial-quote styles as cards */
.testimonial-modal .modal-content {
    overflow: visible;
}

.testimonial-quote {
    overflow: visible;
    padding: var(--space-sm);
}

.testimonial-full-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--color-text);
    margin: 0;
    font-style: italic;
    white-space: pre-line;
}

.testimonial-full-author {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: rgba(0, 0, 0, 0.02);
}

.testimonial-full-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(0, 0, 0, 0.08);
}

.testimonial-full-name {
    font-size: 1.3rem;
    margin: 0 0 4px 0;
    color: var(--color-text);
    font-weight: 600;
}

.testimonial-full-position {
    font-size: 1rem;
    margin: 0;
    color: var(--color-accent);
    opacity: 0.8;
}

/* Testimonial card mobile */
@media (max-width: 768px) {
    .testimonial-card {
        width: 300px;
    }

    .testimonial-marquee-wrapper {
        gap: var(--space-sm);
    }
}



/* Testimonial Navigation */
.testimonial-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    color: var(--color-text);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1000;
}

.testimonial-nav-btn:hover {
    background: rgba(var(--color-accent-rgb), 0.1);
    border-color: rgba(var(--color-accent-rgb), 0.3);
    transform: translateY(-50%) scale(1.05);
}

.testimonial-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.testimonial-nav-btn svg {
    width: 20px;
    height: 20px;
}

.testimonial-prev {
    left: -80px;
}

.testimonial-next {
    right: -80px;
}

/* Mobile navigation buttons */
.testimonial-nav-mobile {
    display: none;
    flex-direction: row;
    gap: var(--space-md);
    justify-content: center;
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.5);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.testimonial-prev-mobile,
.testimonial-next-mobile {
    position: relative;
    top: auto;
    transform: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-prev-mobile:hover,
.testimonial-next-mobile:hover {
    transform: scale(1.05);
    background: rgba(var(--color-accent-rgb), 0.2);
    border-color: rgba(var(--color-accent-rgb), 0.4);
}

.testimonial-prev-mobile:active,
.testimonial-next-mobile:active {
    transform: scale(0.95);
}

.testimonial-prev-mobile svg,
.testimonial-next-mobile svg {
    width: 20px;
    height: 20px;
}

/* Responsive behavior */
@media (max-width: 1024px) {
    .testimonial-prev,
    .testimonial-next {
        display: none;
    }
    
    .testimonial-nav-mobile {
        display: flex;
    }
}
