/* ========================================
   Testimony Video Grid & Cards
   ======================================== */

.testimony__video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.testimony__video-card {
    position: relative;
    background: #fff;
    border-radius: var(--rad-s);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.testimony__video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.testimony__video-card__thumbnail {
    position: relative;
    width: 100%;
    padding-top: 75%; /* Ratio 4:3 */
    overflow: hidden;
    background: #f0f0f0;
}

.testimony__video-card__thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.testimony__video-card:hover .testimony__video-card__thumbnail img {
    transform: scale(1.05);
}

.testimony__video-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    transition: transform 0.3s ease;
    color: var(--color-primary, #0066cc);
}

.testimony__video-card:hover .testimony__video-card__play {
    transform: translate(-50%, -50%) scale(1.1);
}

.testimony__video-card__play svg {
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.testimony__video-card__info {
    padding: 20px;
    background: #fff;
}

.testimony__video-card__name {
    margin: 0 0 8px 0;
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-primary);
}

.testimony__video-card__function {
    margin: 0 0 5px 0;
    font-weight: 600;
    line-height: 1.4;
}

.testimony__video-card__site {
    margin: 0;
    line-height: 1.4;
}

/* ========================================
   Video Modal/Popup
   ======================================== */

.testimony-video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.testimony-video-modal.active {
    display: flex;
    opacity: 1;
}

.testimony-video-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.testimony-video-modal__content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    background: #fff;
    border-radius: 12px;
    max-width: 600px;
    z-index: 2;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.testimony-video-modal.active .testimony-video-modal__content {
    transform: scale(1);
}

.testimony-video-modal__close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #333;
    font-size: 40px;
    cursor: pointer;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    line-height: 1;
    padding-bottom: 5px;
    z-index: 3;
    transition: all 0.3s ease;
}

.testimony-video-modal__close:hover {
    background: #fff;
    transform: scale(1.1);
}

.testimony-video-modal__header {
    padding: 20px 25px;
    background: #f8f8f8;
    border-bottom: 1px solid #e0e0e0;
    border-radius: var(--radius);
}

.testimony-video-modal__header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.testimony-video-modal__video {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* Ratio 16:9 */
    background: #000;
}

.testimony-video-modal__video iframe,
.testimony-video-modal__video video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ========================================
   Responsive Styles
   ======================================== */

@media (max-width: 1024px) {
    .testimony__video-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .testimony__video-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .testimony__video-card__info {
        padding: 15px;
    }
    
    .testimony__video-card__name {
        font-size: 16px;
    }
    
    .testimony__video-card__function {
        font-size: 13px;
    }
    
    .testimony__video-card__site {
        font-size: 12px;
    }
    
    .testimony-video-modal__content {
        width: 95%;
    }
    
    .testimony-video-modal__close {
        top: -45px;
        width: 40px;
        height: 40px;
        font-size: 35px;
    }
    
    .testimony-video-modal__header {
        padding: 15px 20px;
    }
    
    .testimony-video-modal__header h3 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .testimony__video-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .testimony__video-card__play svg {
        width: 50px;
        height: 50px;
    }
    
    .testimony-video-modal__close {
        top: 10px;
        right: 10px;
        background: rgba(255, 255, 255, 0.95);
    }
    
    .testimony-video-modal__header {
        padding: 12px 15px;
    }
    
    .testimony-video-modal__header h3 {
        font-size: 16px;
    }
}

/* Prevent body scroll when modal is open */
body.testimony-modal-open {
    overflow: hidden;
}

/* Accessibility */
.testimony-video-modal__close:focus {
    outline: 3px solid #4A90E2;
    outline-offset: 2px;
}

.testimony__video-card:focus {
    outline: 3px solid #4A90E2;
    outline-offset: 2px;
}

