/* Magzine Photo Gallery — filters + cards + LightGallery polish */
.photo-gallery-page {
    padding-bottom: 4rem;
}

.photo-gallery-page__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    margin-bottom: 1.75rem;
}

.photo-gallery-page__title {
    margin: 0;
    font-size: clamp(1.45rem, 2.2vw, 1.85rem);
    font-weight: 750;
    letter-spacing: -0.02em;
    color: var(--tc-neutral-900);
    position: relative;
    padding-bottom: 0.55rem;
}

.photo-gallery-page__title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 2.75rem;
    height: 0.18rem;
    border-radius: 999px;
    background: var(--tc-neutral-900);
}

.photo-gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
}

.photo-gallery-filters__btn {
    border: 1px solid var(--tc-border-1, rgba(14, 14, 15, 0.14));
    background: var(--tc-bg-1, #f2f2e9);
    color: var(--tc-neutral-900);
    border-radius: 999px;
    padding: 0.42rem 0.95rem;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease, transform 0.18s ease;
}

.photo-gallery-filters__btn:hover:not(.is-active) {
    border-color: var(--tc-neutral-900);
    color: var(--tc-neutral-900);
    transform: translateY(-1px);
}

.photo-gallery-filters__btn.is-active {
    background: var(--tc-neutral-900);
    border-color: var(--tc-neutral-900);
    color: var(--tc-system-white);
}

.photo-gallery-grid {
    display: flex;
    flex-wrap: wrap;
    row-gap: 1.5rem;
    min-height: 7.5rem;
}

.photo-gallery-item {
    margin-bottom: 0;
    transition: opacity 0.3s ease;
}

.photo-gallery-item.is-filter-hidden {
    display: none !important;
}

.photo-gallery-card {
    height: 100%;
    background: var(--tc-system-white, #fff);
    border: 1px solid var(--tc-border-1, rgba(14, 14, 15, 0.1));
    border-radius: 0.9rem;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(14, 14, 15, 0.04);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.photo-gallery-card:hover {
    box-shadow: 0 14px 32px rgba(14, 14, 15, 0.1);
    transform: translateY(-4px);
}

.photo-gallery-card__media {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--tc-bg-1, #f2f2e9);
    color: inherit;
    text-decoration: none;
}

.photo-gallery-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.photo-gallery-card:hover .photo-gallery-card__media img {
    transform: scale(1.06);
}

.photo-gallery-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 38%, rgba(0, 0, 0, 0.55) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.photo-gallery-card:hover .photo-gallery-card__overlay {
    opacity: 1;
}

.photo-gallery-card__zoom {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--tc-neutral-900);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transform: scale(0.88);
    transition: transform 0.28s ease;
}

.photo-gallery-card:hover .photo-gallery-card__zoom {
    transform: scale(1);
}

.photo-gallery-card__badge {
    position: absolute;
    top: 0.85rem;
    left: 0.85rem;
    z-index: 2;
    font-size: 0.68rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    background: var(--tc-neutral-900);
    color: var(--tc-system-white);
    pointer-events: none;
    max-width: calc(100% - 1.7rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photo-gallery-card__body {
    padding: 1.05rem 1.15rem 1.2rem;
}

.photo-gallery-card__title {
    margin: 0 0 0.45rem;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--tc-neutral-900);
}

.photo-gallery-card__title button {
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    font: inherit;
    font-weight: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.photo-gallery-card__title button:hover {
    color: var(--tc-neutral-600);
}

.photo-gallery-card__meta {
    margin: 0;
    font-size: 0.84rem;
    color: var(--tc-neutral-600);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.photo-gallery-empty {
    width: 100%;
    text-align: center;
    padding: 3.5rem 1rem;
    border: 1px dashed var(--tc-border-1, rgba(14, 14, 15, 0.16));
    border-radius: 1rem;
    background: rgba(14, 14, 15, 0.02);
}

.photo-gallery-empty__icon {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 0.85rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--tc-bg-1, #f2f2e9);
    color: var(--tc-neutral-600);
    font-size: 1.45rem;
}

.photo-gallery-empty p {
    margin: 0;
    font-size: 1rem;
    font-weight: 650;
    color: var(--tc-neutral-600);
}

/* Captions kept for LightGallery subHtml; never visible in page flow */
.photo-gallery-caption {
    display: none !important;
}

/* LightGallery overlays */
.lg-backdrop.in {
    opacity: 0.92 !important;
}

.lg-sub-html {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    padding-bottom: 1.75rem !important;
}

.lg-sub-html .photo-gallery-caption__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: #fff;
}

.lg-sub-html .photo-gallery-caption__meta {
    opacity: 0.85;
    margin: 0;
    font-size: 0.88rem;
    color: #fff;
}

/* Dark / blue Magzine surfaces */
html[data-bs-theme="dark"] .photo-gallery-page__title,
html.dark .photo-gallery-page__title,
html.blue-theme .photo-gallery-page__title,
html[data-bs-theme="dark"] .photo-gallery-card__title,
html.dark .photo-gallery-card__title,
html.blue-theme .photo-gallery-card__title,
html[data-bs-theme="dark"] .photo-gallery-filters__btn,
html.dark .photo-gallery-filters__btn,
html.blue-theme .photo-gallery-filters__btn {
    color: var(--tc-neutral-900);
}

html[data-bs-theme="dark"] .photo-gallery-card,
html.dark .photo-gallery-card,
html.blue-theme .photo-gallery-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

html[data-bs-theme="dark"] .photo-gallery-filters__btn.is-active,
html.dark .photo-gallery-filters__btn.is-active,
html.blue-theme .photo-gallery-filters__btn.is-active {
    background: var(--tc-neutral-900);
    color: var(--tc-system-white);
}

html[data-bs-theme="dark"] .photo-gallery-card__zoom,
html.dark .photo-gallery-card__zoom,
html.blue-theme .photo-gallery-card__zoom {
    background: rgba(18, 18, 22, 0.92);
    color: #fff;
}

@media (max-width: 767.98px) {
    .photo-gallery-page__head {
        align-items: stretch;
    }

    .photo-gallery-filters {
        justify-content: flex-start;
    }

    .photo-gallery-filters__btn {
        font-size: 0.72rem;
        padding: 0.38rem 0.8rem;
    }
}
