/* Trailers Section */
.trailers {
    padding: 6rem 0;
    background: var(--color-background);
}

.trailers__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.trailer__item {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.trailer__item:hover {
    transform: translateY(-5px);
}

.trailer__thumbnail {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: var(--color-dark);
}

.trailer__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.trailer__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.trailer__item:hover .trailer__overlay {
    opacity: 1;
}

.trailer__item:hover .trailer__thumbnail img {
    transform: scale(1.05);
}

.play-icon {
    width: 64px;
    height: 64px;
    fill: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.trailer__title {
    margin-top: 1rem;
    font-size: 1.2rem;
    color: var(--color-text);
    text-align: center;
}

/* Video Modal */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-modal.active {
    display: flex;
    opacity: 1;
}

.video-modal__content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    margin: auto;
    aspect-ratio: 16/9;
}

.video-modal__close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}

.video-modal__player {
    width: 100%;
    height: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .trailers__grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .video-modal__content {
        width: 95%;
    }
}
