﻿:root {
    --gallery-primary: #173d35;
    --gallery-accent: #c7a66a;
    --gallery-text: #202b28;
    --gallery-muted: #75817d;
    --gallery-background: #f7f8f6;
    --gallery-card: #ffffff;
    --gallery-radius: 18px;
    --gallery-shadow: 0 8px 28px rgba(20, 45, 36, 0.08);
}
.gallery-page {
    min-height: 100vh;
}

.gallery-header {
    position: relative;
    overflow: hidden;
    padding: 76px 24px 82px;
    color: #fff;
    background: radial-gradient(ellipse at 90% 10%, rgba(199, 166, 106, .23), transparent 38%), linear-gradient(130deg, #102e28, #245b4b);
}

    .gallery-header::after {
        content: "";
        position: absolute;
        width: 300px;
        height: 300px;
        right: -100px;
        bottom: -210px;
        border: 1px solid rgba(255, 255, 255, .16);
        border-radius: 50%;
        box-shadow: 0 0 0 35px rgba(255,255,255,.025), 0 0 0 70px rgba(255,255,255,.025);
        pointer-events: none;
    }

.gallery-header-content {
    position: relative;
    z-index: 1;
    width: min(1180px, 100%);
    margin: auto;
}

.gallery-eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    color: #e3c68f;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
}

.gallery-header h1 {
    margin: 0;
    font-size: clamp(36px, 5vw, 58px);
    font-weight: 700;
    letter-spacing: -1.6px;
}

.gallery-header p {
    margin: 17px 0 0;
    color: rgba(255, 255, 255, .78);
    font-size: 16px;
    line-height: 1.7;
}

.gallery-content {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 52px 0 70px;
}

.gallery-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

    .gallery-toolbar h2 {
        margin: 0;
        font-size: clamp(25px, 3vw, 32px);
        letter-spacing: -.6px;
        overflow-wrap: anywhere;
    }

.section-description {
    margin: 9px 0 0;
    color: var(--gallery-muted);
    font-size: 14px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-height: 42px;
    padding: 0 17px;
    border: 1px solid #dce3de;
    border-radius: 30px;
    background: #fff;
    color: var(--gallery-primary);
    font-size: 14px;
    font-weight: 600;
    transition: background .2s, border-color .2s;
}

    .back-button:hover {
        background: #edf3ef;
        border-color: #b9c9bf;
    }

.album-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
}

.album-card {
    min-width: 0;
    overflow: hidden;
    border-radius: var(--gallery-radius);
    background: var(--gallery-card);
    box-shadow: var(--gallery-shadow);
    transition: transform .25s ease, box-shadow .25s ease;
}

    .album-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 16px 36px rgba(20, 45, 36, .14);
    }

.album-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #e6ebe7;
}

    .album-cover img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .45s ease;
    }

.album-card:hover .album-cover img {
    transform: scale(1.055);
}

.album-count {
    position: absolute;
    right: 13px;
    bottom: 13px;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 30px;
    background: rgba(15, 35, 29, .75);
    color: #fff;
    font-size: 12px;
    backdrop-filter: blur(8px);
}

.album-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 19px 20px;
}

    .album-details h3 {
        margin: 0;
        font-size: 17px;
        font-weight: 650;
        overflow-wrap: anywhere;
    }

.album-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #edf3ef;
    color: var(--gallery-primary);
    font-size: 20px;
    transition: background .2s, color .2s;
}

.album-card:hover .album-arrow {
    background: var(--gallery-primary);
    color: #fff;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.photo-card {
    position: relative;
    display: block;
    min-width: 0;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border-radius: 13px;
    background: #e6ebe7;
    box-shadow: 0 4px 15px rgba(20, 45, 36, .06);
}

    .photo-card img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .4s ease;
    }

    .photo-card:hover img {
        transform: scale(1.06);
    }

.photo-overlay {
    position: absolute;
    inset: auto 0 0;
    padding: 34px 13px 12px;
    overflow: hidden;
    color: #fff;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: linear-gradient(transparent, rgba(0,0,0,.72));
    opacity: 0;
    transition: opacity .25s;
}

.photo-card:hover .photo-overlay,
.photo-card:focus-visible .photo-overlay {
    opacity: 1;
}

.photo-card:focus-visible,
.album-card:focus-visible,
.back-button:focus-visible {
    outline: 3px solid var(--gallery-accent);
    outline-offset: 4px;
}

.empty-message {
    padding: 45px 20px;
    border: 1px dashed #cbd6ce;
    border-radius: 15px;
    background: #fff;
    color: var(--gallery-muted);
    text-align: center;
    line-height: 1.7;
}

.gallery-footer {
    padding: 25px 20px;
    border-top: 1px solid #e6ebe7;
    color: var(--gallery-muted);
    font-size: 12px;
    text-align: center;
}

@media (max-width: 900px) {
    .album-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .photo-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .gallery-header {
        padding: 62px 24px 66px;
    }
}

@media (max-width: 600px) {
    .gallery-header {
        padding: 49px 22px 54px;
    }

        .gallery-header h1 {
            letter-spacing: -.8px;
        }

    .gallery-content {
        width: calc(100% - 32px);
        padding: 34px 0 48px;
    }

    .gallery-toolbar {
        align-items: flex-start;
        flex-wrap: wrap;
        margin-bottom: 22px;
    }

    .album-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 19px;
    }

    .album-cover {
        aspect-ratio: 16 / 10;
    }

    .photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .photo-card {
        border-radius: 9px;
    }

    .photo-overlay {
        padding: 25px 8px 8px;
        font-size: 11px;
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}

