/* =========================================
   1. GALLERY LAYOUT (3 COLUMNS)
   ========================================= */
.gallery-grid {
    display: grid;
    /* Force exactly 3 columns on desktop */
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .gallery-grid { grid-template-columns: 1fr; }
}

.gallery-item {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    background-color: #f0f0f0;
    /* Keeps all items the same height regardless of photo size */
    aspect-ratio: 4 / 3; 
    opacity: 0; /* Necessary for the staggered fade-in */
    cursor: pointer;
    text-decoration: none;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* =========================================
   2. SOFT GLOW TEXT & OVERLAY
   ========================================= */
.item-overlay {
    position: absolute;
    inset: 0;
    /* A darker gradient at the bottom for text legibility */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    color: #ffffff;
    z-index: 2;
}

.item-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    /* Layered Glow Technique for maximum clarity */
    text-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.8), 
        0 2px 10px rgba(0, 0, 0, 0.3),
        0 5px 20px rgba(0, 0, 0, 0.2);
}

/* =========================================
   3. MODERN PILL FILTER BUTTONS
   ========================================= */
.filter-controls {
    text-align: center;
    margin: 40px 0;
}

.filter-btn {
    background: #ffffff;
    color: #444;
    border: 2px solid #e0e0e0;
    padding: 12px 30px;
    margin: 5px 8px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: #544747; /* Gold */
    color: #544747;
}

.filter-btn.active-filter {
    background-color: #544747;
    border-color: #544747;
    color: #fff;
    box-shadow: 0 4px 15px rgb(0 0 0 / 36%);
}

/* =========================================
   4. ANIMATIONS & UTILITIES
   ========================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.fade-in {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hidden {
    display: none !important;
}

/* =========================================
   5. LIGHTGALLERY CUSTOMIZATION (Optional)
   ========================================= */
/* Ensure the lightbox close button is easy to see */
.lg-toolbar .lg-icon {
    color: #fff !important;
    font-size: 24px;
}

/* Customize the lightbox backdrop if needed */
.lg-backdrop {
    background-color: rgba(0, 0, 0, 0.95) !important;
}
       
       .item-title {
           font-size: 17px !important;
       }
       
       .item-overlay h3{
           display: none;
       }