/**
 * Gallery Page Styles
 */

.gallery-breadcrumb-header {
    margin-bottom: 0 !important;
}

.gallery-page-main {
    background:
        linear-gradient(180deg, #f4f7fa 0%, #ffffff 42%, #f6f8fb 100%);
    padding-bottom: 72px;
}

.gallery-page-intro {
    padding: 34px 0 18px;
}

.gallery-page-intro-grid {
    max-width: 820px;
    margin-bottom: 22px;
}

.gallery-page-kicker {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--tema-topheader-bg, var(--tema-anarenk, #0073aa));
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.gallery-page-copy h2 {
    max-width: 760px;
    margin: 0 0 10px;
    color: #17364a;
    font-size: 2rem;
    font-weight: 850;
    line-height: 1.16;
}

.gallery-page-copy p {
    max-width: 760px;
    margin: 0;
    color: #536575;
    font-size: 1rem;
    line-height: 1.65;
}

.gallery-filter-area {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(12, 105, 200, 0.1);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 14px 34px rgba(23, 54, 74, 0.06);
    backdrop-filter: blur(12px);
}

.gallery-filter-btn {
    min-height: 38px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: #17364a;
    padding: 7px 13px;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    transition: color 0.24s ease, background-color 0.24s ease, border-color 0.24s ease, transform 0.24s ease, box-shadow 0.24s ease;
    text-transform: uppercase;
}

.gallery-filter-btn span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 21px;
    height: 21px;
    margin-left: 8px;
    border-radius: 999px;
    background: rgba(12, 105, 200, 0.08);
    color: rgba(23, 54, 74, 0.68);
    font-size: 0.72rem;
    transition: background-color 0.24s ease, color 0.24s ease;
}

.gallery-filter-btn:hover {
    background: rgba(12, 105, 200, 0.08);
    color: var(--tema-topheader-bg, var(--tema-anarenk, #0073aa));
    transform: translateY(-1px);
}

.gallery-filter-btn.active {
    border-color: rgba(12, 105, 200, 0.16);
    background: #fff;
    color: var(--tema-topheader-bg, var(--tema-anarenk, #0073aa));
    box-shadow: 0 10px 24px rgba(12, 105, 200, 0.12);
}

.gallery-filter-btn:hover span,
.gallery-filter-btn.active span {
    background: rgba(12, 105, 200, 0.12);
    color: var(--tema-topheader-bg, var(--tema-anarenk, #0073aa));
}

.gallery-page-content {
    padding-top: 12px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    transition: opacity 0.24s ease;
}

.gallery-item {
    min-width: 0;
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.gallery-grid.is-filtering .gallery-item {
    pointer-events: none;
}

.gallery-item.is-leaving {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
}

.gallery-item.is-hidden {
    display: none;
}

.gallery-item:not(.is-hidden) {
    animation: galleryItemReveal 0.34s ease both;
}

@keyframes galleryItemReveal {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

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

.gallery-card {
    height: 100%;
    border: 1px solid #dfe7ec;
    background: #fff;
    box-shadow: 0 14px 28px rgba(23, 54, 74, 0.06);
    display: grid;
    grid-template-rows: auto 1fr;
}

.gallery-card-media {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #edf2f6;
}

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

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

.gallery-card-media-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #91a0ad;
    font-size: 2rem;
}

.gallery-card-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(23, 54, 74, 0.02) 0%, rgba(23, 54, 74, 0.4) 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.gallery-card-zoom {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--tema-topheader-bg, var(--tema-anarenk, #0073aa));
    opacity: 0;
    transform: translateY(8px);
    transition: 0.25s ease;
}

.gallery-card:hover .gallery-card-shade,
.gallery-card:hover .gallery-card-zoom {
    opacity: 1;
    transform: translateY(0);
}

.gallery-card-body {
    padding: 12px;
    display: grid;
    gap: 8px;
}

.gallery-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #71818e;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.gallery-card-title {
    margin: 0;
    color: #17364a;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.35;
}

.gallery-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 4px;
}

.gallery-source-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef3f7;
    color: var(--tema-topheader-bg, var(--tema-anarenk, #0073aa));
}

.gallery-source-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #17364a;
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
}

.gallery-source-link:hover {
    color: var(--tema-topheader-bg, var(--tema-anarenk, #0073aa));
    text-decoration: none;
}

.gallery-source-link.is-muted {
    color: #71818e;
}

.no-gallery-items {
    border: 1px dashed #cfdbe3;
    background: #fff;
    padding: 28px;
    color: #536575;
    text-align: center;
}

.no-gallery-items strong {
    display: block;
    margin-bottom: 6px;
    color: #17364a;
    font-size: 1.1rem;
}

.no-gallery-items p {
    margin: 0;
}

@media (max-width: 1199px) {
    .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .gallery-page-intro-grid {
        max-width: 100%;
    }

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

@media (max-width: 640px) {
    .gallery-page-main {
        padding-bottom: 48px;
    }

    .gallery-page-intro {
        padding-top: 24px;
    }

    .gallery-page-copy h2 {
        font-size: 1.55rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-filter-area {
        align-items: stretch;
        border-radius: 22px;
    }

    .gallery-filter-btn {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
}
