/* ========================================
   GALERI PAGE STYLES
   ======================================== */

.glr-gallery-section {
    padding: 80px 0 80px 0;
    margin-top: 10px;
}

.glr-section-heading {
    text-align: center;
    margin-bottom: 50px;
}

.glr-section-heading h2 {
    font-size: 42px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.glr-section-heading h2 em {
    color: var(--secondary-color);
    font-style: normal;
}

.glr-section-heading h2 span {
    color: var(--accent-orange);
    font-style: normal;
}

.glr-filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 50px;
    transition: all 0.3s ease;
}

.glr-filter-btn {
    padding: 12px 30px;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    outline: none;
}

.glr-filter-btn.active,
.glr-filter-btn:hover {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(1, 78, 154, 0.25);
    transform: translateY(-1px);
}

.glr-filter-btn:active {
    transform: translateY(0);
}

.glr-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.glr-gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.5s ease;
    cursor: pointer;
    /* Ensure zoom icon is not clipped */
    isolation: isolate;
}

.glr-gallery-item.hide {
    display: none;
}

.glr-gallery-item:hover {
    transform: translateY(-10px);
}

.glr-gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.glr-gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(1, 78, 154, 0.95) 0%, rgba(1, 112, 191, 0.95) 100%);
    opacity: 0;
    transition: all 0.4s ease;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.glr-gallery-item:hover .glr-gallery-overlay {
    opacity: 1;
}

.glr-gallery-category {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 10px;
}

.glr-gallery-title {
    color: white;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
}

.glr-gallery-description {
    color: rgba(255, 255, 255, 0.95);
    font-size: 14px;
    line-height: 1.6;
}

.glr-zoom-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 10;
}

.glr-gallery-item:hover .glr-zoom-icon {
    opacity: 1;
}

/* Mobile: Always show zoom icon */
@media (max-width: 768px) {
    .glr-zoom-icon {
        opacity: 1;
        width: 40px;
        height: 40px;
        top: auto;
        bottom: 15px;
        right: 15px;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    
    .glr-zoom-icon i {
        color: var(--primary-color);
        font-size: 16px;
    }
    
    /* Show overlay on tap/click instead of hover */
    .glr-gallery-overlay {
        opacity: 0;
        pointer-events: none;
    }
    
    .glr-gallery-item.show-overlay .glr-gallery-overlay {
        opacity: 1;
    }
}


/* Responsive Design */
@media (max-width: 992px) {
    .glr-gallery-section {
        padding: 80px 0 60px 0;
    }
    
    .glr-section-heading h2 {
        font-size: 36px;
    }
    
    .glr-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .glr-gallery-section {
        padding: 15px 0 50px 0;
    }
    
    .glr-section-heading {
        margin-top: 0;
        margin-bottom: 10px;
    }
    
    .glr-section-heading h2 {
        font-size: 28px;
        line-height: 1.3;
    }
    
    .glr-section-heading p {
        font-size: 14px;
        padding: 0 20px;
        line-height: 1.6;
    }
    
    /* Sticky filter buttons - clean design */
    .glr-filter-buttons {
        position: sticky;
        top: 70px;
        z-index: 100;
        background: #fff;
        padding: 12px 20px;
        margin-bottom: 20px;
        margin-left: 0;
        margin-right: 0;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
        border-radius: 0 0 15px 15px;
        transition: all 0.3s ease;
    }
    
    .glr-filter-buttons::-webkit-scrollbar {
        display: none;
    }
    
    .glr-filter-btn {
        padding: 8px 18px;
        font-size: 13px;
        white-space: nowrap;
        flex-shrink: 0;
        border: 2px solid var(--primary-color);
        background: white;
        color: var(--primary-color);
        font-weight: 600;
        border-radius: 25px;
        min-height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
    }
    
    .glr-filter-btn.active {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
        box-shadow: 0 3px 10px rgba(1, 78, 154, 0.25);
    }
    
    .glr-filter-btn:hover {
        background: var(--primary-color);
        color: white;
    }
    
    .glr-filter-btn i {
        font-size: 12px;
        margin-right: 6px;
    }
    
    .glr-gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }
    
    .glr-gallery-item img {
        height: 250px;
    }
    
    .glr-gallery-title {
        font-size: 18px;
    }
    
    .glr-gallery-description {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .glr-section-heading h2 {
        font-size: 22px;
        line-height: 1.3;
    }
    
    .glr-section-heading p {
        font-size: 13px;
    }
    
    .glr-filter-buttons {
        padding: 10px 15px;
        top: 65px;
    }
    
    .glr-filter-btn {
        padding: 7px 15px;
        font-size: 12px;
        min-height: 34px;
        border-width: 1.5px;
    }
    
    .glr-filter-btn i {
        font-size: 11px;
        margin-right: 5px;
    }
    
    .glr-gallery-grid {
        padding: 0 12px;
        gap: 15px;
    }
    
    .glr-gallery-item img {
        height: 200px;
    }
    
    .glr-zoom-icon {
        width: 36px;
        height: 36px;
        bottom: 10px;
        right: 10px;
    }
    
    .glr-zoom-icon i {
        font-size: 14px;
    }
}
