﻿
:root {
    --smg-gallery-primary: #0b3d91; 
    --smg-gallery-secondary: #fca311; 
    --smg-gallery-text: #333;
    --smg-gallery-bg: #f9fbfd;
    --smg-gallery-white: #ffffff;
    --smg-gallery-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.gallery-page-section {
    padding: 60px 0;
    background-color: var(--smg-gallery-bg);
}
.gallery-controls-wrapper {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    background: var(--smg-gallery-white);
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-bottom: 40px;
    border-top: 4px solid var(--smg-gallery-primary);
}

.gallery-filter-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .gallery-filter-box label {
        font-weight: 600;
        color: var(--smg-gallery-primary);
        font-size: 15px;
    }

.smg-gallery-select {
    appearance: none;
    background-color: #f4f7fc;
    border: 2px solid rgba(11, 61, 145, 0.1);
    border-radius: 8px;
    padding: 10px 35px 10px 15px;
    font-size: 14px;
    font-weight: 500;
    color: var(--smg-gallery-primary);
    cursor: pointer;
    transition: var(--smg-gallery-transition);
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%230b3d91%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px top 50%;
    background-size: 10px auto;
}

    .smg-gallery-select:focus, .smg-gallery-select:hover {
        border-color: var(--smg-gallery-secondary);
        outline: none;
    }
.advanced-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-item-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    background: #000;
    border: 3px solid var(--smg-gallery-white);
    animation: fadeInGalleryItem 0.5s ease-in-out;
    transition: var(--smg-gallery-transition);
}

    .gallery-item-card img {
        width: 100%;
        height: 250px; 
        object-fit: cover; 
        display: block;
        transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    }

    .gallery-item-card:hover img {
        transform: scale(1.1);
    }

.gallery-item-info-box {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(11, 61, 145, 0.95));
    padding: 20px 15px 10px;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item-card:hover .gallery-item-info-box {
    opacity: 1;
}

.gallery-item-info-box h4 {
    margin: 0 0 3px;
    font-size: 16px;
    color: white;
}

.gallery-item-info-box span {
    font-size: 12px;
    color: var(--smg-gallery-secondary);
}

#noImageMessage {
    display: none;
    text-align: center;
    padding: 60px 0;
    color: var(--smg-gallery-text);
}

    #noImageMessage i {
        font-size: 50px;
        color: var(--smg-gallery-secondary);
        margin-bottom: 20px;
    }

@keyframes fadeInGalleryItem {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.smg-lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999999999; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95); 
    backdrop-filter: blur(15px); 
    opacity: 0;
    transition: opacity 0.4s ease;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
    .smg-lightbox-modal.lightbox-visible {
        display: flex; 
        opacity: 1;
    }

.lightbox-content-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 90%;
    height: 80vh;
}

.smg-lightbox-image {
    max-width: 90%;
    max-height: 100%;
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 0 4px rgba(255,255,255,0.1);
    object-fit: contain; 
    transform: scale(0.33);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.4s ease;
}

.smg-lightbox-modal.lightbox-visible .smg-lightbox-image {
    transform: scale(1); 
    opacity: 1;
}

.lightbox-control-nav {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.3s ease;
    border-radius: 50%;
    user-select: none;
    background: rgba(255,255,255,0.1);
    z-index: 10;
    border: none;
    line-height: 1;
}

    .lightbox-control-nav:hover {
        background-color: var(--smg-gallery-secondary);
        color: black;
        box-shadow: 0 0 20px rgba(252, 163, 17, 0.5);
    }

.smg-lightbox-prev {
    left: 30px;
}

.smg-lightbox-next {
    right: 30px;
}

.smg-lightbox-close {
    position: absolute;
    top: 25px;
    right: 45px;
    color: white;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    z-index: 20;
    transition: transform 0.3s ease, color 0.3s ease;
}

    .smg-lightbox-close:hover {
        color: var(--smg-gallery-secondary);
        transform: scale(1.2) rotate(90deg); 
    }

.smg-lightbox-caption {
    color: var(--smg-gallery-secondary);
    font-size: 18px;
    margin-top: 15px;
    font-weight: 500;
    text-align: center;
    font-family: 'Poppins', sans-serif;
}

@media (max-width: 768px) {
    .gallery-controls-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .gallery-filter-box {
        flex-direction: column;
        align-items: start;
        gap: 5px;
    }

    .smg-gallery-select {
        width: 100%;
    }

    .smg-lightbox-prev {
        left: 10px;
    }

    .smg-lightbox-next {
        right: 10px;
    }

    .smg-lightbox-image {
        max-width: 95%;
    }
}
