/* ============================================================
   gallery.css — Styles for gallery pages (images & videos)
   Extracted from inline <style> blocks in gallery PHP files
   ============================================================ */

/* ==== Masonry Grid Layout ==== */
.masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    grid-gap: 0.75rem;
    grid-auto-rows: 10px;
    padding: 1rem;
}

@media (min-width: 480px) {
    .masonry-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        grid-gap: 1rem;
    }
}

@media (min-width: 640px) {
    .masonry-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        grid-gap: 1.25rem;
    }
}

@media (min-width: 768px) {
    .masonry-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        grid-gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .masonry-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        grid-gap: 1.5rem;
    }
}

/* ==== Masonry Item ==== */
.masonry-item {
    cursor: pointer;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
    min-height: 44px; /* Minimum touch target size */
}

/* Better mobile touch targets */
@media (max-width: 767px) {
    .masonry-item {
        min-height: 120px;
    }
}

/* ==== Gallery Item (legacy page) ==== */
.gallery-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* ==== Lightbox ==== */
.lightbox {
    backdrop-filter: blur(5px);
}

/* ==== Image Fade-In Animation ==== */
.image-fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==== Video Item ==== */
.video-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-item:hover {
    transform: none;
    box-shadow: none;
}

/* ==== Video Grid Override ====
   The masonry-grid uses grid-auto-rows:10px for image masonry layout.
   For videos (uniform aspect-ratio), we reset to auto rows. */
.video-gallery-grid {
    grid-auto-rows: auto;
}

/* ==== Play Button ==== */
.play-button {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.play-button:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.play-button::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 20px solid #3b82f6;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 4px;
}

/* ==== Video Thumbnail Placeholder ==== */
.video-thumb-placeholder {
    background: linear-gradient(135deg, #1e3a8a 0%, #312e81 100%);
}

/* ==== Video Frame Background (replaces inline style on video frames) ==== */
.video-frame-bg {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #1e3a8a 0%, #312e81 100%);
}

/* ==== Video Overlay Content (replaces inline absolute positioning) ==== */
.video-overlay-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
}

/* ==== Video Name Text ==== */
.video-name-text {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.9;
}

/* ==== Video Watermark Badge ==== */
.video-watermark-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 6px;
    border-radius: 4px;
}
