/* ============================================
   GALLERY SECTION STYLES
   Color Scheme: #3a3182 (Purple) & #eaa521 (Gold) & White
   ============================================ */

/* Section Container */
.gallery-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    position: relative;
    overflow: hidden;
}

.gallery-section::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(234, 165, 33, 0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.gallery-section::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(58, 49, 130, 0.06) 0%, transparent 70%);
    border-radius: 50%;
}

/* Header Section */
.gallery-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    z-index: 1;
}

.gallery-subtitle {
    color: #eaa521;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.gallery-title {
    color: #3a3182;
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.gallery-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #3a3182, #eaa521);
    border-radius: 2px;
}

.gallery-description {
    color: #666;
    font-size: 17px;
    line-height: 1.8;
    max-width: 800px;
    margin: 30px auto 0;
}

/* Category Navigation */
.gallery-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 50px;
    position: relative;
    z-index: 1;
}

.gallery-filter-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 50px;
    color: #555;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.gallery-filter-btn svg {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
}

.gallery-filter-btn:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-color: #eaa521;
    color: #3a3182;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(234, 165, 33, 0.2);
}

.gallery-filter-btn.active {
    background: linear-gradient(135deg, #3a3182 0%, #4a4192 100%);
    border-color: #3a3182;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(58, 49, 130, 0.3);
}

.gallery-filter-btn.active:hover {
    background: linear-gradient(135deg, #eaa521 0%, #f5b841 100%);
    border-color: #eaa521;
    box-shadow: 0 8px 20px rgba(234, 165, 33, 0.4);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    position: relative;
    z-index: 1;
}

/* Gallery Item */
.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInScale 0.6s ease-out both;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.gallery-item.hide {
    display: none;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(58, 49, 130, 0.2);
}

.gallery-item a {
    display: block;
    position: relative;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Gallery Overlay */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(58, 49, 130, 0.85) 0%, rgba(234, 165, 33, 0.85) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay svg {
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay svg {
    transform: scale(1);
}

/* Staggered Animation Delays */
.gallery-item:nth-child(1) {
    animation-delay: 0.1s;
}

.gallery-item:nth-child(2) {
    animation-delay: 0.15s;
}

.gallery-item:nth-child(3) {
    animation-delay: 0.2s;
}

.gallery-item:nth-child(4) {
    animation-delay: 0.25s;
}

.gallery-item:nth-child(5) {
    animation-delay: 0.3s;
}

.gallery-item:nth-child(6) {
    animation-delay: 0.35s;
}

.gallery-item:nth-child(7) {
    animation-delay: 0.4s;
}

.gallery-item:nth-child(8) {
    animation-delay: 0.45s;
}

/* Responsive Design */

/* Large Tablets */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }

    .gallery-title {
        font-size: 42px;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .gallery-section {
        padding: 60px 0;
    }

    .gallery-title {
        font-size: 36px;
    }

    .gallery-description {
        font-size: 16px;
        padding: 0 15px;
    }

    .gallery-nav {
        gap: 12px;
        margin-bottom: 40px;
    }

    .gallery-filter-btn {
        padding: 12px 24px;
        font-size: 15px;
    }

    .gallery-filter-btn svg {
        width: 20px;
        height: 20px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 18px;
    }

    .gallery-item img {
        height: 250px;
    }
}

/* Mobile Devices */
@media (max-width: 576px) {
    .gallery-section {
        padding: 50px 0;
    }

    .gallery-subtitle {
        font-size: 14px;
    }

    .gallery-title {
        font-size: 32px;
    }

    .gallery-description {
        font-size: 15px;
    }

    .gallery-nav {
        gap: 10px;
        margin-bottom: 35px;
    }

    .gallery-filter-btn {
        padding: 10px 20px;
        font-size: 14px;
        flex: 1 1 calc(50% - 5px);
        justify-content: center;
        min-width: 140px;
    }

    .gallery-filter-btn span {
        font-size: 14px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .gallery-item {
        border-radius: 12px;
    }

    .gallery-item img {
        height: 200px;
    }
}

/* Extra Small Devices */
@media (max-width: 400px) {
    .gallery-title {
        font-size: 28px;
    }

    .gallery-filter-btn {
        padding: 8px 16px;
        font-size: 13px;
        min-width: 120px;
    }

    .gallery-filter-btn svg {
        width: 18px;
        height: 18px;
    }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .gallery-item img {
        height: 180px;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .gallery-item {
        animation: none;
    }

    .gallery-item:hover {
        transform: none;
    }

    .gallery-item:hover img {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .gallery-section {
        padding: 40px 0;
        background: white;
    }

    .gallery-nav {
        display: none;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .gallery-item {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }

    .gallery-overlay {
        display: none;
    }
}