/* Photos */
.photo-thumb {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    cursor: pointer;
}

.photo-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-thumb .photo-overlay {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.photo-thumb .photo-overlay i {
    font-size: 20px;
    color: #fff;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    padding: 5px;
    cursor: pointer;
    transition: transform 0.2s;
}

.photo-thumb .photo-overlay i:hover {
    transform: scale(1.1);
}

.photo-thumb.enlarged {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 80%;
    padding: 0;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background: #000;
}

.photo-thumb.enlarged img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.photo-thumb.enlarged .photo-overlay {
    display: none;
}

/* Videos */
.video-thumb {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    cursor: pointer;
}

.video-thumb video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-thumb .video-overlay {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.video-thumb .video-overlay i {
    font-size: 20px;
    color: #fff;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    padding: 5px;
    cursor: pointer;
    transition: transform 0.2s;
}

.video-thumb .video-overlay i:hover {
    transform: scale(1.1);
}

.video-thumb.enlarged {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 80%;
    padding: 0;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background: #000;
}

.video-thumb.enlarged video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-thumb.enlarged .video-overlay {
    display: none;
}

/* Common close button for enlarge */
.media-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 30px;
    color: #fff;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    padding: 5px 10px;
    cursor: pointer;
    z-index: 10000;
    line-height: 1;
}
