/* Video Testimonials Section - Masonry Style */
.video-testimonials-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    overflow: hidden;
}

.video-testimonials-header {
    text-align: center;
    margin-bottom: 4rem;
    padding: 0 1rem;
}

.video-testimonials-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.video-testimonials-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.video-testimonials-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Masonry Grid Container */
.video-masonry-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 950px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Video Card */
.video-testimonial-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.video-testimonial-card::before {
    content: '';
    display: block;
    padding-top: 177.78%; /* 9:16 aspect ratio */
}

.video-testimonial-card:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}

/* Hover states with rotation preserved */
.video-testimonial-card:nth-child(1):hover {
    transform: rotate(-6deg) translateY(-8px) scale(1.02);
}

.video-testimonial-card:nth-child(2):hover {
    transform: rotate(4deg) scaleX(-1) translateY(-8px) scale(1.02);
}

.video-testimonial-card:nth-child(3):hover {
    transform: rotate(-3deg) translateY(-8px) scale(1.02);
}

.video-testimonial-card:nth-child(4):hover {
    transform: rotate(5deg) scaleX(-1) translateY(-8px) scale(1.02);
}

.video-testimonial-card:nth-child(5):hover {
    transform: rotate(-4deg) translateY(-8px) scale(1.02);
}

.video-testimonial-card:nth-child(6):hover {
    transform: rotate(6deg) scaleX(-1) translateY(-8px) scale(1.02);
}

/* Hover states for flipped play buttons */
.video-testimonial-card:nth-child(2):hover .video-play-button,
.video-testimonial-card:nth-child(4):hover .video-play-button,
.video-testimonial-card:nth-child(6):hover .video-play-button {
    transform: translate(-50%, -50%) scaleX(-1) scale(1.1);
    background: var(--primary);
}

/* Random staggered heights and rotations for organic masonry effect */
.video-testimonial-card:nth-child(1) {
    margin-top: 0;
    transform: rotate(-6deg);
}

.video-testimonial-card:nth-child(2) {
    margin-top: 3rem;
    transform: rotate(4deg) scaleX(-1); /* Mirrored/Flipped */
}

.video-testimonial-card:nth-child(3) {
    margin-top: 1rem;
    transform: rotate(-3deg);
}

.video-testimonial-card:nth-child(4) {
    margin-top: 0;
    transform: rotate(5deg) scaleX(-1); /* Mirrored/Flipped */
}

.video-testimonial-card:nth-child(5) {
    margin-top: 2.5rem;
    transform: rotate(-4deg);
}

.video-testimonial-card:nth-child(6) {
    margin-top: 1rem;
    transform: rotate(6deg) scaleX(-1); /* Mirrored/Flipped */
}

/* Fix flipped cards - ensure text and controls stay readable */
.video-testimonial-card:nth-child(2) .video-info,
.video-testimonial-card:nth-child(4) .video-info,
.video-testimonial-card:nth-child(6) .video-info {
    transform: scaleX(-1) translateY(10px);
}

.video-testimonial-card:nth-child(2):hover .video-info,
.video-testimonial-card:nth-child(4):hover .video-info,
.video-testimonial-card:nth-child(6):hover .video-info,
.video-testimonial-card:nth-child(2).playing .video-info,
.video-testimonial-card:nth-child(4).playing .video-info,
.video-testimonial-card:nth-child(6).playing .video-info {
    transform: scaleX(-1) translateY(0);
}

.video-testimonial-card:nth-child(2) .video-sound-toggle,
.video-testimonial-card:nth-child(4) .video-sound-toggle,
.video-testimonial-card:nth-child(6) .video-sound-toggle {
    transform: scaleX(-1);
    left: 0.75rem;
    right: auto;
}

.video-testimonial-card:nth-child(2) .video-play-button,
.video-testimonial-card:nth-child(4) .video-play-button,
.video-testimonial-card:nth-child(6) .video-play-button {
    transform: translate(-50%, -50%) scaleX(-1);
}

/* Video Element */
.video-testimonial-card video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Gradient Overlay */
.video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    pointer-events: none;
    z-index: 2;
}

/* Play Button */
.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.video-play-button svg {
    width: 18px;
    height: 18px;
    fill: var(--primary);
    margin-left: 3px;
}

.video-testimonial-card:hover .video-play-button {
    transform: translate(-50%, -50%) scale(1.1);
    background: var(--primary);
}

.video-testimonial-card:hover .video-play-button svg {
    fill: white;
}

.video-testimonial-card.playing .video-play-button {
    opacity: 0;
    visibility: hidden;
}

/* Video Info */
.video-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    z-index: 3;
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.3s ease;
}

.video-testimonial-card:hover .video-info,
.video-testimonial-card.playing .video-info {
    transform: translateY(0);
    opacity: 1;
}

.video-author-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.15rem;
}

.video-author-title {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Sound Toggle Button */
.video-sound-toggle {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 4;
    opacity: 0;
    transition: all 0.3s ease;
}

.video-testimonial-card:hover .video-sound-toggle,
.video-testimonial-card.playing .video-sound-toggle {
    opacity: 1;
}

.video-sound-toggle svg {
    width: 16px;
    height: 16px;
    fill: white;
}

.video-sound-toggle:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .video-masonry-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
        max-width: 800px;
    }

    .video-testimonial-card:nth-child(1) {
        margin-top: 0;
        transform: rotate(-5deg);
    }

    .video-testimonial-card:nth-child(2) {
        margin-top: 2.5rem;
        transform: rotate(4deg) scaleX(-1);
    }

    .video-testimonial-card:nth-child(3) {
        margin-top: 1rem;
        transform: rotate(-3deg);
    }

    .video-testimonial-card:nth-child(4) {
        margin-top: 0;
        transform: rotate(5deg) scaleX(-1);
    }

    .video-testimonial-card:nth-child(5) {
        margin-top: 2rem;
        transform: rotate(-4deg);
    }

    .video-testimonial-card:nth-child(6) {
        margin-top: 0.5rem;
        transform: rotate(3deg) scaleX(-1);
    }
}

@media (max-width: 992px) {
    .video-testimonials-section {
        padding: 4rem 0;
    }

    .video-testimonials-title {
        font-size: 2.25rem;
    }

    .video-masonry-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
        padding: 0 1.5rem;
        max-width: 650px;
    }

    .video-testimonial-card:nth-child(1) {
        margin-top: 0;
        transform: rotate(-4deg);
    }

    .video-testimonial-card:nth-child(2) {
        margin-top: 2rem;
        transform: rotate(3deg) scaleX(-1);
    }

    .video-testimonial-card:nth-child(3) {
        margin-top: 0.5rem;
        transform: rotate(-2deg);
    }

    .video-testimonial-card:nth-child(4) {
        margin-top: 0;
        transform: rotate(4deg) scaleX(-1);
    }

    .video-testimonial-card:nth-child(5) {
        margin-top: 1.5rem;
        transform: rotate(-3deg);
    }

    .video-testimonial-card:nth-child(6) {
        margin-top: 0.5rem;
        transform: rotate(2deg) scaleX(-1);
    }
}

@media (max-width: 768px) {
    .video-testimonials-header {
        margin-bottom: 2.5rem;
    }

    .video-testimonials-title {
        font-size: 1.875rem;
    }

    .video-testimonials-subtitle {
        font-size: 1rem;
    }

    .video-masonry-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        max-width: 520px;
    }

    /* Keep tilts on mobile */
    .video-testimonial-card:nth-child(1) {
        margin-top: 0;
        transform: rotate(-4deg);
    }

    .video-testimonial-card:nth-child(2) {
        margin-top: 1.5rem;
        transform: rotate(3deg) scaleX(-1);
    }

    .video-testimonial-card:nth-child(3) {
        margin-top: 0.5rem;
        transform: rotate(-2deg);
    }

    .video-testimonial-card:nth-child(4) {
        margin-top: 0;
        transform: rotate(3deg) scaleX(-1);
    }

    .video-testimonial-card:nth-child(5) {
        margin-top: 1.5rem;
        transform: rotate(-3deg);
    }

    .video-testimonial-card:nth-child(6) {
        margin-top: 0.5rem;
        transform: rotate(2deg) scaleX(-1);
    }

    .video-play-button {
        width: 40px;
        height: 40px;
    }

    .video-play-button svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .video-testimonials-section {
        padding: 3rem 0;
    }

    .video-testimonials-title {
        font-size: 1.5rem;
    }

    .video-masonry-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
        padding: 0 0.75rem;
        max-width: 380px;
    }

    /* Keep tilts on small screens */
    .video-testimonial-card:nth-child(1) {
        margin-top: 0;
        transform: rotate(-3deg);
    }

    .video-testimonial-card:nth-child(2) {
        margin-top: 1rem;
        transform: rotate(2deg) scaleX(-1);
    }

    .video-testimonial-card:nth-child(3) {
        margin-top: 0.5rem;
        transform: rotate(-2deg);
    }

    .video-testimonial-card:nth-child(4) {
        margin-top: 0;
        transform: rotate(3deg) scaleX(-1);
    }

    .video-testimonial-card:nth-child(5) {
        margin-top: 1rem;
        transform: rotate(-2deg);
    }

    .video-testimonial-card:nth-child(6) {
        margin-top: 0.5rem;
        transform: rotate(2deg) scaleX(-1);
    }

    .video-play-button {
        width: 32px;
        height: 32px;
    }

    .video-play-button svg {
        width: 14px;
        height: 14px;
        margin-left: 2px;
    }

    .video-info {
        padding: 0.5rem;
    }

    .video-author-name {
        font-size: 0.7rem;
    }

    .video-author-title {
        font-size: 0.6rem;
    }

    .video-sound-toggle {
        width: 28px;
        height: 28px;
        top: 0.5rem;
        right: 0.5rem;
    }

    .video-sound-toggle svg {
        width: 14px;
        height: 14px;
    }

    .video-testimonial-card:nth-child(2) .video-sound-toggle,
    .video-testimonial-card:nth-child(4) .video-sound-toggle,
    .video-testimonial-card:nth-child(6) .video-sound-toggle {
        left: 0.5rem;
    }
}
