
/* Header */
.gallery-header {
    margin-bottom: 3rem;
    animation: slideDown 0.5s ease-out;
    margin-top:3rem;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: #FAA61A;
    padding: 0.6rem 0;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    font-size: 19px;
}

.back-button:hover {
    color: #000;
    transform: translateX(-3px);
}



.gallery-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #00698F;
    margin: 0;
    animation: fadeIn 0.6s ease-out 0.1s both;
}

.gallery-subtitle {
    display: none;
}

/* Gallery Grid */
.gallery-wrap {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    animation: fadeIn 0.7s ease-out 0.2s both;
}

.gallery-box {
    position: relative;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    animation: slideUp 0.6s ease-out both;
    animation-delay: calc(var(--item-index, 0) * 0.05s);
}

.gallery-box:nth-child(1) { --item-index: 1; }
.gallery-box:nth-child(2) { --item-index: 2; }
.gallery-box:nth-child(3) { --item-index: 3; }
.gallery-box:nth-child(4) { --item-index: 4; }
.gallery-box:nth-child(5) { --item-index: 5; }
.gallery-box:nth-child(6) { --item-index: 6; }
.gallery-box:nth-child(7) { --item-index: 7; }
.gallery-box:nth-child(8) { --item-index: 8; }
.gallery-box:nth-child(9) { --item-index: 9; }
.gallery-box:nth-child(n+10) { --item-index: 10; }

.gallery-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.gallery-box a {
    display: block;
    position: relative;
    overflow: hidden;
}

.gallery-box img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-box:hover img {
    transform: scale(1.06);
}

/* Overlay */
.gallery-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.gallery-box:hover::before {
    opacity: 1;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* PhotoSwipe Styles */
.pswp__caption__center {
    max-width: 100% !important;
    text-align: center !important;
    background: #002349 !important;
    padding: 1rem !important;
    font-size: 0.95rem !important;
    border-radius: 8px !important;
    margin: 10px !important;
}

.pswp__button {
    background-color: rgba(0, 35, 73, 0.8) !important;
    transition: all 0.3s ease !important;
}

.pswp__button:hover {
    background-color: rgba(0, 35, 73, 1) !important;
}

/* Responsive */
@media (max-width: 1200px) {
    .gallery-wrap {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .gallery-title {
        font-size: 3rem;
    }
}

@media (max-width: 900px) {
    .gallery-wrap {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .container {
        padding: 0 30px;
    }

    .gallery-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 600px) {
    .gallery-wrap {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .container {
        padding: 0 25px;
    }

    .gallery-title {
        font-size: 2.2rem;
    }

    main {
        padding: 1.5rem 0 2.5rem;
    }

    .gallery-header {
        margin-bottom: 2rem;
        margin-top:1rem;
    }

    .back-button {
        padding: 0.5rem 0;
        font-size: 17px;
        margin-bottom: 1.2rem;
    }

}

@media (max-width: 400px) {
    .gallery-wrap {
        gap: 12px;
    }

    .container {
        padding: 0 20px;
    }

    .gallery-title {
        font-size: 1.9rem;
    }

    main {
        padding: 1.2rem 0 2rem;
    }
}

/* Focus for accessibility */
.gallery-box:focus-within {
    outline: 2px solid #333;
    outline-offset: 3px;
}

.back-button:focus {
    outline: 2px solid #333;
    outline-offset: 2px;
}
