/* ═══════════════════════════════════════════════════════════════ */
/* 📸 GALLERY PAGE - DEDICATED FIX STYLES                           */
/* Created: Oct 24, 2025                                            */
/* Purpose: Fix image display, grid layout, and filter positioning  */
/*                                                                   */
/* INSTRUCTIONS:                                                     */
/* Add this at the END of ebonyrvgypsyclan2.css                    */
/* OR include as separate stylesheet: <link href="/gallery-fixes.css"> */
/* ═══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────── */
/* GALLERY HERO & FILTER SECTION                                    */
/* ─────────────────────────────────────────────────────────────── */
.gallery-hero {
    padding: 80px 20px;
    background: linear-gradient(135deg, #F8F9FA 0%, #E8ECED 100%);
    text-align: center;
}

.gallery-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.gallery-filter-section {
    background: #f8f9fa;
    padding: 40px 20px;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.gallery-filter-section .blog-filter {
    justify-content: center;
    padding: 0;
    margin-bottom: 20px;
}

.gallery-filter-section .blog-filter button {
    margin: 5px;
    font-size: 0.95rem;
}

.gallery-info-bar {
    text-align: center;
    padding: 15px 20px;
    margin: 0;
}

.gallery-info-bar p {
    margin: 0;
    color: #666;
    font-size: 1rem;
}

/* ─────────────────────────────────────────────────────────────── */
/* GALLERY GRID - THE MAIN FIX!                                     */
/* This fixes the images stacking vertically and being too large    */
/* ─────────────────────────────────────────────────────────────── */
#gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
    gap: 30px !important;
    padding: 60px 20px !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    background: white;
}

/* Override when blog-grid class is used */
#gallery-grid.blog-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
}

/* ─────────────────────────────────────────────────────────────── */
/* GALLERY CARDS - Individual image containers                      */
/* ─────────────────────────────────────────────────────────────── */
.gallery-card {
    background: white !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* ─────────────────────────────────────────────────────────────── */
/* CRITICAL FIX: Image Sizing                                       */
/* This prevents images from being huge and makes them uniform      */
/* ─────────────────────────────────────────────────────────────── */
.gallery-card .post-image,
.gallery-card img {
    width: 100% !important;
    height: 280px !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

/* ─────────────────────────────────────────────────────────────── */
/* GALLERY CARD CONTENT                                             */
/* ─────────────────────────────────────────────────────────────── */
.gallery-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.gallery-card .post-title,
.gallery-card h3 {
    font-size: 1.1rem !important;
    margin: 0 0 10px 0 !important;
    color: #2c3e50 !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    font-family: 'Playfair Display', serif !important;
}

.gallery-card .post-excerpt,
.gallery-card p {
    font-size: 0.9rem !important;
    color: #34495e !important;
    margin: 0 0 12px 0 !important;
    flex-grow: 1 !important;
    line-height: 1.5 !important;
}

.gallery-category-tag {
    display: inline-block;
    background: #4ecdc4;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: auto;
}

/* ─────────────────────────────────────────────────────────────── */
/* LOAD MORE BUTTON                                                 */
/* ─────────────────────────────────────────────────────────────── */
#loadMoreBtn {
    display: block;
    margin: 40px auto 60px;
    padding: 16px 48px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

#loadMoreBtn:hover:not(:disabled) {
    background: #2c3e50;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(44, 62, 80, 0.4);
}

#loadMoreBtn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ─────────────────────────────────────────────────────────────── */
/* LIGHTBOX - Full-screen image viewer                              */
/* ─────────────────────────────────────────────────────────────── */
#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

#lightbox.active {
    display: flex !important;
}

.lightbox-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#lightbox-img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lightbox-info {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 30px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
    max-width: 600px;
}

#lightbox-caption {
    font-size: 1.3rem;
    color: #2c3e50;
    margin: 0 0 8px 0;
    font-weight: 600;
    font-family: 'Playfair Display', serif;
}

#lightbox-category {
    font-size: 0.95rem;
    color: #34495e;
    margin: 0;
}

#closeLightbox {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 50px;
    height: 50px;
    background: white;
    border: none;
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    color: #34495e;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-weight: 300;
}

#closeLightbox:hover {
    background: #ff6b6b;
    color: white;
    transform: rotate(90deg);
}

/* ─────────────────────────────────────────────────────────────── */
/* EMPTY STATE                                                      */
/* ─────────────────────────────────────────────────────────────── */
.gallery-empty-state {
    text-align: center;
    padding: 80px 20px;
    background: white;
}

.gallery-empty-state h3 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.gallery-empty-state p {
    font-size: 1.1rem;
    color: #34495e;
    margin-bottom: 20px;
}

.gallery-empty-state a {
    color: #ff6b6b;
    font-weight: 600;
    text-decoration: none;
}

.gallery-empty-state a:hover {
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════ */
/* RESPONSIVE DESIGN                                                 */
/* ═══════════════════════════════════════════════════════════════ */

/* Tablets & Medium Screens */
@media (max-width: 1024px) {
    #gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
        gap: 25px !important;
    }
}

/* Mobile & Small Tablets */
@media (max-width: 768px) {
    #gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
        gap: 20px !important;
        padding: 40px 20px !important;
    }
    
    .gallery-card .post-image,
    .gallery-card img {
        height: 220px !important;
    }
    
    #closeLightbox {
        top: 10px;
        right: 10px;
    }
    
    .lightbox-info {
        padding: 15px 20px;
    }
    
    .gallery-filter-section {
        padding: 30px 15px;
    }
}

/* Small Mobile Phones */
@media (max-width: 480px) {
    #gallery-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        padding: 30px 15px !important;
    }
    
    .gallery-card .post-image,
    .gallery-card img {
        height: 250px !important;
    }
    
    #lightbox-img {
        max-height: 70vh;
    }
    
    .gallery-filter-section .blog-filter button {
        font-size: 0.85rem;
        padding: 8px 14px;
    }
    
    #loadMoreBtn {
        font-size: 1rem;
        padding: 14px 36px;
    }
}

/* ═══════════════════════════════════════════════════════════════ */
/* END OF GALLERY FIXES                                              */
/* ═══════════════════════════════════════════════════════════════ */
