

:root {
    --gallery-primary: #0b5ed7;
    --gallery-primary-dark: #084298;
    --gallery-primary-light: #eef5ff;

    --gallery-heading: #173b57;
    --gallery-text: #172033;
    --gallery-muted: #64748b;

    --gallery-bg: #f7f9fc;
    --gallery-white: #ffffff;
    --gallery-border: #e2e8f0;

    --gallery-radius: 14px;

    --gallery-shadow:
        0 6px 22px rgba(15, 23, 42, 0.07);

    --gallery-shadow-hover:
        0 16px 36px rgba(15, 23, 42, 0.16);
}


/* =========================================================
   BASE
   ========================================================= */

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

#tabsContentWrapper {
    width: 100%;
    padding-bottom: 70px;
}

#tabsContentWrapper > .container {
    width: 100%;
}


/* =========================================================
   PAGE HEADING
   ========================================================= */

.headings-wrapper {
    padding: 28px 0 24px;
}

.headings-wrapper .container {
    max-width: 1200px;
}

.headings-wrapper h2 {
    margin: 0;

    color: var(--gallery-heading);

    font-family: "Montserrat", sans-serif;
    font-size: 30px;
    font-weight: 700;

    line-height: 1.3;
    letter-spacing: 0.2px;
}

.headings-wrapper hr {
    width: 62px;
    height: 4px;

    margin: 12px 0 0;

    border: 0;
    border-radius: 10px;

    background: linear-gradient(
        90deg,
        #008fd5,
        #38bdf8
    );

    opacity: 1;
}


/* =========================================================
   STATE TABS
   ========================================================= */

#tabs {
    display: grid;

    grid-template-columns:
        repeat(8, minmax(0, 1fr));

    gap: 7px;

    width: 100%;

    margin: 0 0 35px;
    padding: 7px;

    list-style: none;

    background: var(--gallery-white);

    border: 1px solid var(--gallery-border);
    border-radius: 16px;

    box-shadow:
        0 5px 22px rgba(15, 23, 42, 0.06);
}

#tabs .nav-item {
    width: 100%;
    margin: 0;
}

#tabs .nav-link {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 46px;

    padding: 9px 12px;

    border: 0 !important;
    border-radius: 10px !important;

    color: #475569;
    background: transparent;

    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    font-weight: 600;

    line-height: 1.25;
    text-align: center;

    white-space: normal;

    cursor: pointer;

    transition:
        color 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.2s ease;
}

#tabs .nav-link:hover {
    color: var(--gallery-primary);

    background:
        var(--gallery-primary-light);

    transform: translateY(-1px);
}

#tabs .nav-link.active {
    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            var(--gallery-primary),
            var(--gallery-primary-dark)
        );

    box-shadow:
        0 6px 15px rgba(11, 94, 215, 0.24);
}


/* =========================================================
   STATE CONTENT
   ========================================================= */

.state-content {
    display: none;

    width: 100%;
}

.state-content.active {
    display: block;

    animation:
        galleryFadeIn 0.3s ease both;
}

@keyframes galleryFadeIn {

    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}

/* =====================================================
   MODERN GALLERY PAGINATION
   ===================================================== */

.gallery-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin: 24px 0 8px;
    padding: 0;
    flex-wrap: wrap;
}


/* -----------------------------------------------------
   ALL PAGINATION BUTTONS
   ----------------------------------------------------- */

.gallery-pagination button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 36px;
    height: 36px;

    padding: 0 10px;

    border: 1px solid #dce3ec;
    border-radius: 8px;

    background: #ffffff;
    color: #475569;

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background .2s ease,
        border-color .2s ease,
        color .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}


/* -----------------------------------------------------
   NUMBER HOVER
   ----------------------------------------------------- */

.gallery-pagination button:hover:not(:disabled) {
    background: #eef5ff;
    border-color: #0b5ed7;
    color: #0b5ed7;
    transform: translateY(-1px);
}


/* -----------------------------------------------------
   ACTIVE PAGE
   ----------------------------------------------------- */

.gallery-pagination button.active {
    background: #0b5ed7;
    border-color: #0b5ed7;
    color: #ffffff;

    box-shadow:
        0 4px 10px rgba(11, 94, 215, .20);
}


/* -----------------------------------------------------
   DISABLED
   ----------------------------------------------------- */

.gallery-pagination button:disabled {
    opacity: .4;
    cursor: not-allowed;
    transform: none;
}


/* -----------------------------------------------------
   PREVIOUS / NEXT
   ----------------------------------------------------- */

.gallery-pagination .pagination-prev,
.gallery-pagination .pagination-next {
    gap: 6px;
    padding: 0 13px;
    font-size: 12px;
}


/* -----------------------------------------------------
   ELLIPSIS
   ----------------------------------------------------- */

.gallery-pagination .pagination-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 30px;
    height: 36px;

    color: #94a3b8;
    font-size: 14px;
    font-weight: 700;

    user-select: none;
}


/* -----------------------------------------------------
   PHOTO COUNT
   ----------------------------------------------------- */

.gallery-pagination .pagination-info {
    margin-left: 12px;

    color: #64748b;

    font-size: 12px;
    font-weight: 500;

    white-space: nowrap;
}


/* -----------------------------------------------------
   MOBILE
   ----------------------------------------------------- */

@media (max-width: 576px) {

    .gallery-pagination {
        gap: 4px;
        margin-top: 18px;
    }

    .gallery-pagination button {
        min-width: 32px;
        height: 32px;

        padding: 0 8px;

        border-radius: 7px;

        font-size: 12px;
    }

    .gallery-pagination .pagination-prev,
    .gallery-pagination .pagination-next {
        min-width: 32px;
        padding: 0 9px;
    }

    .gallery-pagination .pagination-prev span,
    .gallery-pagination .pagination-next span {
        display: none;
    }

    .gallery-pagination .pagination-dots {
        min-width: 24px;
        height: 32px;
    }

    .gallery-pagination .pagination-info {
        width: 100%;
        margin: 7px 0 0;

        text-align: center;
        font-size: 11px;
    }

}
 /* =========================================================
    GALLERY CONTAINER
    ========================================================= */

.gallery-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}



.photo-grid {
    display: grid;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    gap: 14px;

    width: 100%;
}


/* =========================================================
   SMALL PHOTO CARD
   ========================================================= */

.photo-item {
    position: relative;

    display: block;

    width: 100%;
    aspect-ratio: 4 / 3;

    margin: 0;
    padding: 0;

    overflow: hidden;

    border: 1px solid #e2e8f0;
    border-radius: 10px;

    background: #e9eef5;

    cursor: pointer;

    box-shadow:
        0 4px 12px rgba(15, 23, 42, 0.06);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}


.photo-item img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 0.4s ease;
}


/* =========================================================
   HOVER
   ========================================================= */

@media (hover: hover) {

    .photo-item:hover {
        transform: translateY(-3px);

        border-color:
            rgba(11, 94, 215, 0.25);

        box-shadow:
            0 10px 22px rgba(15, 23, 42, 0.13);
    }

    .photo-item:hover img {
        transform: scale(1.06);
    }

    .photo-item:hover::after {
        opacity: 1;
    }

    .photo-item:hover::before {
        opacity: 1;

        transform:
            translate(-50%, -50%)
            scale(1);
    }

}


/* =========================================================
   OVERLAY
   ========================================================= */

.photo-item::after {
    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            to top,
            rgba(15, 23, 42, 0.45),
            transparent 70%
        );

    opacity: 0;

    pointer-events: none;

    transition:
        opacity 0.25s ease;
}


/* =========================================================
   ZOOM ICON
   ========================================================= */

.photo-item::before {
    content: "\f00e";

    position: absolute;

    z-index: 3;

    top: 50%;
    left: 50%;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    color: #fff;

    background:
        rgba(11, 94, 215, 0.92);

    border: 2px solid
        rgba(255, 255, 255, 0.85);

    border-radius: 50%;

    font-family:
        "Font Awesome 5 Free";

    font-size: 12px;
    font-weight: 900;

    transform:
        translate(-50%, -50%)
        scale(0.6);

    opacity: 0;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}


/* =========================================================
   STATE / YEAR CONTENT
   ========================================================= */

.state-content {
    width: 100%;
}

.year-section {
    width: 100%;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1199px) {

    .gallery-container {
        max-width: 1050px;
    }

    .photo-grid {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));

        gap: 13px;
    }

}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 991px) {

    .gallery-container {
        padding: 0 16px;
    }

    .photo-grid {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));

        gap: 12px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .gallery-container {
        padding: 0 12px;
    }

    .photo-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 10px;
    }

    .photo-item {
        border-radius: 8px;
    }

    .photo-item::before {
        width: 32px;
        height: 32px;

        font-size: 11px;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .gallery-container {
        padding: 0 10px;
    }

    .photo-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 8px;
    }

    .photo-item {
        border-radius: 7px;
    }

}
/* =========================================================
   STATE TITLE
   ========================================================= */

.gallery-state-title {
    position: relative;

    margin: 0 0 25px;
    padding: 0 0 13px;

    color: var(--gallery-text);

    font-family: "Montserrat", sans-serif;
    font-size: 27px;
    font-weight: 700;

    line-height: 1.3;
}

.gallery-state-title::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: 0;

    width: 60px;
    height: 3px;

    border-radius: 20px;

    background:
        linear-gradient(
            90deg,
            var(--gallery-primary),
            #38bdf8
        );
}


/* =========================================================
   YEAR TABS
   ========================================================= */

.year-tabs-wrapper {
    width: 100%;
    margin: 0 0 28px;
}

.year-tabs {
    display: flex;

    flex-wrap: wrap;
    align-items: center;

    gap: 6px;

    width: 100%;

    padding: 6px;

    background: #f1f5f9;

    border: 1px solid var(--gallery-border);
    border-radius: 12px;
}

.year-tab {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-width: 78px;
    min-height: 38px;

    padding: 8px 18px;

    border: 0;
    border-radius: 8px;

    color: var(--gallery-muted);
    background: transparent;

    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    font-weight: 600;

    line-height: 1;

    cursor: pointer;

    transition:
        color 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.2s ease;
}

.year-tab:hover {
    color: var(--gallery-primary);
    background: #ffffff;

    box-shadow:
        0 3px 10px rgba(15, 23, 42, 0.07);
}

.year-tab.active {
    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            var(--gallery-primary),
            var(--gallery-primary-dark)
        );

    box-shadow:
        0 4px 12px rgba(11, 94, 215, 0.22);
}


/* =========================================================
   YEAR CONTENT
   ========================================================= */

.year-section {
    display: none;

    width: 100%;
}

.year-section.active {
    display: block;

    animation:
        galleryYearFade 0.3s ease both;
}

@keyframes galleryYearFade {

    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* Hide internal year heading */

.gallery-year-title {
    display: none !important;
}


/* =========================================================
   PHOTO GRID
   ========================================================= */

.photo-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 20px;

    width: 100%;
}


/* =========================================================
   PHOTO CARD
   ========================================================= */

.photo-item {
    position: relative;

    display: block;

    width: 100%;
    aspect-ratio: 4 / 3;

    margin: 0;
    padding: 0;

    overflow: hidden;

    border: 1px solid var(--gallery-border);
    border-radius: var(--gallery-radius);

    background: #e9eef5;

    cursor: pointer;

    box-shadow: var(--gallery-shadow);

    transform: translateY(0);

    isolation: isolate;

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}


/* Image */

.photo-item img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transform: scale(1);

    transition:
        transform 0.55s cubic-bezier(.2, .7, .2, 1);
}


/* Dark overlay */

.photo-item::after {
    content: "";

    position: absolute;

    inset: 0;

    z-index: 1;

    background:
        linear-gradient(
            to top,
            rgba(15, 23, 42, 0.58),
            rgba(15, 23, 42, 0.08) 55%,
            transparent 75%
        );

    opacity: 0;

    pointer-events: none;

    transition:
        opacity 0.3s ease;
}


/* Zoom icon */

.photo-item::before {
    content: "\f00e";

    position: absolute;

    top: 50%;
    left: 50%;

    z-index: 2;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;

    color: #ffffff;

    background:
        rgba(11, 94, 215, 0.94);

    border: 2px solid
        rgba(255, 255, 255, 0.85);

    border-radius: 50%;

    font-family:
        "Font Awesome 5 Free";

    font-size: 15px;
    font-weight: 900;

    transform:
        translate(-50%, -50%)
        scale(0.65);

    opacity: 0;

    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.20);

    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}


/* Desktop hover */

@media (hover: hover) {

    .photo-item:hover {
        transform: translateY(-5px);

        border-color:
            rgba(11, 94, 215, 0.25);

        box-shadow:
            var(--gallery-shadow-hover);
    }

    .photo-item:hover img {
        transform: scale(1.07);
    }

    .photo-item:hover::after {
        opacity: 1;
    }

    .photo-item:hover::before {
        opacity: 1;

        transform:
            translate(-50%, -50%)
            scale(1);
    }

}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.no-photos {
    display: flex;

    align-items: center;
    justify-content: center;

    min-height: 180px;

    padding: 30px;

    color: var(--gallery-muted);

    background: #f8fafc;

    border: 1px dashed var(--gallery-border);
    border-radius: 12px;

    font-size: 14px;
    font-weight: 500;

    text-align: center;
}


/* =========================================================
   MODAL
   ========================================================= */

body.modal-open {
    overflow: hidden;
}


/* Main modal */

#photoModal {
    position: fixed;

    inset: 0;

    z-index: 99999;

    display: none;

    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    padding: 30px;

    background:
        rgba(2, 6, 23, 0.92);

    backdrop-filter:
        blur(5px);
}


/* Modal content */

#photoModal .photo-modal-content {
    position: relative;

    display: flex;

    align-items: center;
    justify-content: center;

    width: min(1100px, 92vw);
    height: min(85vh, 850px);
}


/* Modal image */

#modalImage {
    display: block;

    max-width: 100%;
    max-height: 85vh;

    width: auto;
    height: auto;

    object-fit: contain;

    border-radius: 8px;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.40);
}


/* Close */

#closeModal {
    position: absolute;

    top: -18px;
    right: -18px;

    z-index: 10;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;

    padding: 0;

    color: #ffffff;

    background:
        rgba(15, 23, 42, 0.85);

    border: 1px solid
        rgba(255, 255, 255, 0.25);

    border-radius: 50%;

    font-size: 18px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

#closeModal:hover {
    background: #dc3545;
    transform: scale(1.05);
}


/* Previous / next */

#prevPhoto,
#nextPhoto {
    position: absolute;

    top: 50%;

    z-index: 10;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;

    padding: 0;

    color: #ffffff;

    background:
        rgba(15, 23, 42, 0.75);

    border: 1px solid
        rgba(255, 255, 255, 0.25);

    border-radius: 50%;

    font-size: 18px;

    cursor: pointer;

    transform: translateY(-50%);

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

#prevPhoto {
    left: -70px;
}

#nextPhoto {
    right: -70px;
}

#prevPhoto:hover,
#nextPhoto:hover {
    background: var(--gallery-primary);
    transform: translateY(-50%) scale(1.05);
}


/* Counter */

#photoCounter {
    position: absolute;

    left: 50%;
    bottom: -45px;

    transform: translateX(-50%);

    color: #ffffff;

    font-size: 14px;
    font-weight: 600;

    white-space: nowrap;
}


/* =========================================================
   FOCUS
   ========================================================= */

.photo-item:focus-visible,
.year-tab:focus-visible,
#tabs .nav-link:focus-visible,
#closeModal:focus-visible,
#prevPhoto:focus-visible,
#nextPhoto:focus-visible {
    outline: 3px solid
        rgba(56, 189, 248, 0.85);

    outline-offset: 3px;
}


/* =========================================================
   LARGE TABLET
   ========================================================= */

@media (max-width: 1199px) {

    #tabs {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }

    .photo-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 18px;
    }

}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 991px) {

    #tabsContentWrapper {
        padding-bottom: 60px;
    }

    #tabs {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        margin-bottom: 30px;
    }

    #tabs .nav-link {
        min-height: 44px;
        font-size: 13px;
    }

    .gallery-state-title {
        font-size: 25px;
    }

    .photo-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 15px;
    }


    /* Modal */

    #photoModal {
        padding: 20px;
    }

    #photoModal .photo-modal-content {
        width: 90vw;
    }

    #prevPhoto {
        left: 10px;
    }

    #nextPhoto {
        right: 10px;
    }

    #prevPhoto,
    #nextPhoto {
        width: 44px;
        height: 44px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    #tabsContentWrapper {
        padding-bottom: 50px;
    }


    /* Heading */

    .headings-wrapper {
        padding: 24px 0 18px;
    }

    .headings-wrapper h2 {
        font-size: 25px;
    }


    /* State tabs */

    #tabs {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 6px;

        padding: 6px;

        margin-bottom: 25px;

        border-radius: 13px;
    }

    #tabs .nav-link {
        min-height: 43px;

        padding: 8px 7px;

        border-radius: 9px !important;

        font-size: 12px;
    }


    /* State heading */

    .gallery-state-title {
        margin-bottom: 20px;

        font-size: 22px;
    }


    /* Year tabs */

    .year-tabs-wrapper {
        margin-bottom: 22px;
    }

    .year-tabs {
        display: grid;

        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 5px;

        padding: 5px;
    }

    .year-tab {
        width: 100%;
        min-width: 0;
        min-height: 36px;

        padding: 7px 5px;

        font-size: 12px;
    }


    /* Photo grid */

    .photo-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 12px;
    }

    .photo-item {
        border-radius: 11px;

        box-shadow:
            0 5px 15px rgba(15, 23, 42, 0.08);
    }


    /* Mobile zoom */

    .photo-item::before {
        width: 40px;
        height: 40px;

        font-size: 13px;
    }


    /* Modal */

    #photoModal {
        padding: 12px;
    }

    #photoModal .photo-modal-content {
        width: 100%;
        height: auto;
    }

    #modalImage {
        max-width: 100%;
        max-height: 78vh;

        border-radius: 5px;
    }

    #closeModal {
        top: -5px;
        right: -5px;

        width: 40px;
        height: 40px;
    }

    #prevPhoto,
    #nextPhoto {
        top: auto;
        bottom: -58px;

        width: 42px;
        height: 42px;

        transform: none;
    }

    #prevPhoto {
        left: calc(50% - 55px);
    }

    #nextPhoto {
        right: calc(50% - 55px);
    }

    #prevPhoto:hover,
    #nextPhoto:hover {
        transform: scale(1.05);
    }

    #photoCounter {
        bottom: -55px;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .headings-wrapper h2 {
        font-size: 22px;
    }

    #tabs .nav-link {
        min-height: 40px;
        padding: 7px 5px;
        font-size: 11.5px;
    }

    .gallery-state-title {
        font-size: 20px;
        margin-bottom: 18px;
    }

    .gallery-state-title::after {
        width: 52px;
    }

    .year-tabs {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .year-tab {
        min-height: 35px;
        font-size: 11.5px;
    }

    .photo-grid {
        gap: 9px;
    }

    .photo-item {
        border-radius: 9px;
    }

    .photo-item::before {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }

}


/* =========================================================
   EXTRA SMALL
   ========================================================= */

@media (max-width: 360px) {

    #tabs .nav-link {
        font-size: 11px;
    }

    .gallery-state-title {
        font-size: 19px;
    }

    .photo-grid {
        gap: 7px;
    }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

}
