.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    background: #111111;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    aspect-ratio: 16 / 9;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.5);
}

.gallery-item img, .gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.gallery-item video::before {
    content: "\25B6";
    position: absolute;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.8);
    pointer-events: none;
    z-index: 2;
}

#media-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
}

#media-modal.hidden {
    display: none;
}

#modal-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

#modal-content img, #modal-content video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

#close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    z-index: 1001;
}

#modal-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

#modal-navigation .nav-button {
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    pointer-events: all;
    padding: 10px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

#modal-navigation .nav-button:hover {
    background: rgba(255, 255, 255, 0.6);
    color: black;
}
