* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f6f8;
    color: #222;
}

header {
    background: #ffffff;
    border-bottom: 1px solid #dddddd;
    padding: 28px 20px;
    text-align: center;
}

header h1 {
    margin: 0 0 8px 0;
    font-size: 34px;
}

header p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

.container {
    width: min(1400px, 94%);
    margin: 30px auto 60px;
}

.filters {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 35px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.filters h2 {
    margin: 0 0 16px;
    padding: 0;
    border: 0;
    font-size: 22px;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-bottom: 18px;
    justify-content: center;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    user-select: none;
    font-size: 16px;
}

.filter-option input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-buttons button {
    border: 1px solid #bbb;
    background: #fff;
    padding: 9px 15px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 14px;
}

.filter-buttons button:hover {
    background: #f0f0f0;
}

.main-folder {
    margin-bottom: 55px;
}

.folder {
    margin-bottom: 42px;
}

h2 {
    font-size: 30px;
    margin: 45px 0 22px;
    padding-bottom: 10px;
    border-bottom: 3px solid #222;
    text-align: center;
}

.main-folder h2 {
    text-align: left;
}

h3 {
    font-size: 22px;
    margin: 34px 0 16px;
    padding-left: 12px;
    border-left: 4px solid #888;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.image-card {
    display: block;
    overflow: hidden;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    text-decoration: none;
    color: #222;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.image-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
    border-color: #2c5aa0;
}

.image-wrap {
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.image-card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.image-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
    border-color: #2c5aa0;
}

.image-caption {
    padding: 10px 12px;
    text-align: center;
    font-size: 14px;
    line-height: 1.35;
    background: #fff;
    border-top: 1px solid #eee;
    overflow-wrap: anywhere;
}

.level-2 {
    margin-left: 18px;
}

.hidden {
    display: none !important;
}

.empty-message {
    text-align: center;
    padding: 40px 15px;
    color: #777;
    display: none;
}

footer {
    text-align: center;
    padding: 25px 20px 40px;
    color: #777;
    font-size: 14px;
}

@media (max-width: 700px) {
    header h1 {
        font-size: 27px;
    }

    .container {
        width: 94%;
        margin-top: 20px;
    }

    h2 {
        font-size: 25px;
    }

    h3 {
        font-size: 19px;
    }

    .gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .level-2 {
        margin-left: 0;
    }

    .filter-options {
        flex-direction: column;
        gap: 10px;
    }
}


/* =========================================================
   LIGHTBOX
   ========================================================= */

.image-card {
    cursor: pointer;
}

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;

    background: rgba(0, 0, 0, 0.94);

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

    padding: 20px;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    max-width: 90vw;
    max-height: 94vh;
}

#lightbox-image {
    display: block;

    max-width: 90vw;
    max-height: 84vh;

    width: auto;
    height: auto;

    object-fit: contain;

    border-radius: 4px;
}

.lightbox-caption {
    margin-top: 10px;

    color: #fff;
    text-align: center;

    font-size: 15px;
    line-height: 1.4;
}

.lightbox-counter {
    margin-top: 4px;

    color: #bbb;
    text-align: center;

    font-size: 13px;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 25px;

    z-index: 10002;

    border: none;
    background: transparent;

    color: #fff;

    font-size: 46px;
    line-height: 1;

    cursor: pointer;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;

    z-index: 10002;

    transform: translateY(-50%);

    border: none;
    border-radius: 6px;

    background: rgba(0, 0, 0, 0.35);
    color: #fff;

    padding: 15px 18px;

    font-size: 42px;
    line-height: 1;

    cursor: pointer;

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

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.18);
}

.lightbox-prev:hover {
    transform: translateY(-50%) translateX(-2px);
}

.lightbox-next:hover {
    transform: translateY(-50%) translateX(2px);
}


@media (max-width: 700px) {

    .lightbox {
        padding: 10px;
    }

    #lightbox-image {
        max-width: 96vw;
        max-height: 80vh;
    }

    .lightbox-prev,
    .lightbox-next {
        padding: 12px 10px;
        font-size: 32px;
    }

    .lightbox-prev {
        left: 4px;
    }

    .lightbox-next {
        right: 4px;
    }

    .lightbox-close {
        top: 10px;
        right: 14px;
        font-size: 40px;
    }

    .lightbox-caption {
        font-size: 14px;
    }
}


.download-all-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.download-all-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 10px 18px;

    background: #e2edf4;
    color: #1a3a52;

    border: 1px solid #b8cddd;
    border-radius: 7px;

    text-decoration: none;
    font-size: 14px;
    font-weight: 500;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.download-all-btn:hover {
    background: #d2e1ec;
    border-color: #2c5aa0;
    transform: translateY(-1px);
}


.lightbox-download {
    position: absolute;
    top: 18px;
    right: 82px;

    z-index: 10002;

    width: 38px;
    height: 38px;

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

    color: #fff;
    background: rgba(255, 255, 255, 0.12);

    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;

    text-decoration: none;
    cursor: pointer;

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

.lightbox-download svg {
    width: 22px;
    height: 22px;
}

.lightbox-download:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.07);
}

@media (max-width: 700px) {

    .lightbox-download {
        top: 12px;
        right: 68px;

        width: 38px;
        height: 38px;
    }

    .lightbox-download svg {
        width: 21px;
        height: 21px;
    }
}