/* Gallery Page Layout */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px; /* Increased gap */
    padding: 40px 0;
}

/* Gallery Card Styling */
.gallery-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.media-wrapper {
    width: 100%;
    height: 250px; /* Fixed height for consistent card size */
    overflow: hidden;
}

.media-wrapper img, .media-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-card:hover .media-wrapper img,
.gallery-card:hover .media-wrapper video {
    transform: scale(1.05); /* Slight zoom on hover */
}

/* Card Info and Actions */
.card-info {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.media-title {
    font-weight: bold;
    color: #333;
    font-size: 1.1em;
}

.media-actions {
    display: flex;
    align-items: center;
}

.like-btn {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 1.2em;
    padding: 5px;
    transition: color 0.2s ease;
}

.like-btn.liked i,
.like-btn:hover i {
    color: #ff6347; /* OrangeRed to match theme */
}

.like-count {
    margin-left: 5px;
    font-size: 1em;
    color: #777;
}

/* Title Popup on Hover */
.title-popup {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 1em;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-card:hover .title-popup {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .gallery-container {
        grid-template-columns: 1fr; /* Single column on small mobile */
        gap: 20px;
    }
}