.ev-gallery-page .ev-main-shell,
.ev-gallery-page main,
.ev-gallery-page .site-main {
    background:
        radial-gradient(circle at 100% 0%, rgba(217, 4, 41, 0.18), transparent 22%),
        linear-gradient(180deg, #040508 0%, #030407 100%);
}

.ev-gallery-front {
    position: relative;
    padding: 28px 0 44px;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(2, 3, 5, 0.94) 0%, rgba(3, 4, 7, 0.98) 100%);
}

.ev-gallery-front::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 0% 0%, rgba(217, 4, 41, 0.08), transparent 20%),
        radial-gradient(circle at 100% 8%, rgba(217, 4, 41, 0.1), transparent 24%),
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: auto, auto, 100% 4px, 4px 100%;
    opacity: 0.35;
    pointer-events: none;
}

.ev-gallery-front__shell {
    position: relative;
    z-index: 1;
    width: min(1540px, calc(100vw - 48px));
    margin: 0 auto;
}

.ev-gallery-front__hero {
    padding: 26px 0 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.ev-gallery-front__hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(460px, 0.9fr);
    gap: 28px;
    align-items: center;
}

.ev-gallery-front__hero-copy {
    display: grid;
    align-content: start;
    gap: 12px;
    max-width: 760px;
}

.ev-gallery-front__eyebrow,
.ev-gallery-front__detail-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 18px;
    color: #ff233f;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.ev-gallery-front__hero h1 {
    margin: 0;
    font-size: clamp(46px, 5vw, 66px);
    font-weight: 900;
    line-height: 0.92;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.ev-gallery-front__hero p {
    max-width: 620px;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 24px;
    line-height: 1.48;
}

.ev-gallery-front__hero-line {
    width: 38px;
    height: 2px;
    margin-top: 8px;
    background: linear-gradient(90deg, #e10613 0%, rgba(225, 6, 19, 0.18) 100%);
}

.ev-gallery-front__hero-side {
    position: relative;
    min-height: 200px;
    display: grid;
    align-items: center;
    justify-items: start;
}

.ev-gallery-front__hero-mark {
    position: absolute;
    right: -8px;
    top: 2px;
    color: transparent;
    font-size: 208px;
    font-weight: 900;
    line-height: 0.8;
    letter-spacing: -0.08em;
    -webkit-text-stroke: 2px rgba(225, 6, 19, 0.18);
    text-shadow: 0 0 48px rgba(225, 6, 19, 0.18);
    pointer-events: none;
}

.ev-gallery-front__stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.ev-gallery-front__stats article {
    display: grid;
    justify-items: center;
    gap: 10px;
    min-height: 128px;
    padding: 24px 12px 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(12, 15, 21, 0.98) 0%, rgba(7, 9, 14, 0.99) 100%);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.22);
}

.ev-gallery-front__stats i {
    color: #ff102f;
    font-size: 24px;
}

.ev-gallery-front__stats strong {
    color: #ff102f;
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
}

.ev-gallery-front__stats span {
    color: rgba(255, 255, 255, 0.84);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ev-gallery-front__breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0 18px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 13px;
}

.ev-gallery-front__breadcrumbs a {
    color: #fff;
    text-decoration: none;
}

.ev-gallery-front__section {
    position: relative;
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

.ev-gallery-front__section--home {
    margin-top: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.ev-gallery-front__section-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.ev-gallery-front__section-title {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.ev-gallery-front__section-title span {
    width: 2px;
    height: 18px;
    background: linear-gradient(180deg, #e10613 0%, #8f1118 100%);
}

.ev-gallery-front__section-title h2 {
    margin: 0;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ev-gallery-front__toolbar {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ev-gallery-front__tool,
.ev-gallery-front__sort select,
.ev-gallery-front__cta-button,
.ev-gallery-front__button {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(8, 10, 14, 0.96);
    color: #fff;
    text-decoration: none;
}

.ev-gallery-front__tool {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 0 14px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ev-gallery-front__tool i {
    color: #ff102f;
}

.ev-gallery-front__tool.is-active {
    border-color: rgba(225, 6, 19, 0.34);
    color: #ff102f;
    box-shadow: inset 0 0 0 1px rgba(225, 6, 19, 0.06);
}

.ev-gallery-front__sort select {
    min-width: 132px;
    min-height: 40px;
    padding: 0 38px 0 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}

.ev-gallery-front__albums-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.ev-gallery-front__album-card {
    min-width: 0;
}

.ev-gallery-front__album-card a {
    position: relative;
    display: block;
    min-height: 364px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(11, 13, 18, 0.98) 0%, rgba(5, 7, 10, 0.98) 100%);
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.24);
    text-decoration: none;
}

.ev-gallery-front__album-cover,
.ev-gallery-front__album-overlay {
    position: absolute;
    inset: 0;
}

.ev-gallery-front__album-cover {
    background-position: center;
    background-size: cover;
    transform: scale(1.01);
}

.ev-gallery-front__album-overlay {
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.16) 36%, rgba(3, 4, 8, 0.54) 62%, rgba(3, 4, 8, 0.98) 100%),
        linear-gradient(140deg, rgba(225, 6, 19, 0.22) 0%, rgba(225, 6, 19, 0) 36%);
}

.ev-gallery-front__album-menu {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.52);
    color: #fff;
    font-size: 13px;
}

.ev-gallery-front__album-copy,
.ev-gallery-front__album-meta {
    position: absolute;
    left: 14px;
    right: 14px;
    z-index: 2;
}

.ev-gallery-front__album-copy {
    bottom: 50px;
    display: grid;
    gap: 5px;
}

.ev-gallery-front__album-copy strong,
.ev-gallery-front__copy strong {
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    line-height: 0.98;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.ev-gallery-front__album-copy em {
    color: #ff102f;
    font-size: 13px;
    font-style: normal;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ev-gallery-front__album-meta {
    bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 11px;
}

.ev-gallery-front__album-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.ev-gallery-front__album-meta i {
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
}

.ev-gallery-front__cta {
    display: flex;
    justify-content: center;
    padding-top: 4px;
}

.ev-gallery-front__cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    min-width: 248px;
    padding: 0 24px;
    border-color: rgba(225, 6, 19, 0.28);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ev-gallery-front__cta-button i {
    color: #ff102f;
}

.ev-gallery-front__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.ev-gallery-front__content {
    position: relative;
    isolation: isolate;
    min-height: var(--ev-gallery-content-min-height, clamp(760px, 82vh, 1120px));
    overflow: hidden;
    border-radius: 18px;
    transition: min-height 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.ev-gallery-front__content.is-viewer-open {
    z-index: 5;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.ev-gallery-front__section--album {
    isolation: isolate;
}

.ev-gallery-front__content.is-viewer-open .ev-gallery-front__grid {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(0.985);
}

.ev-gallery-front__grid {
    transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
}

.ev-gallery-front__card a,
.ev-gallery-front__detail-media,
.ev-gallery-front__detail-copy,
.ev-gallery-front__empty {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(12, 15, 21, 0.98) 0%, rgba(7, 9, 14, 0.99) 100%);
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.24);
}

.ev-gallery-front__card a {
    display: block;
    overflow: hidden;
    color: #fff;
    text-decoration: none;
}

.ev-gallery-front__media {
    display: block;
    aspect-ratio: 1 / 1;
    background-position: center;
    background-size: cover;
}

.ev-gallery-front__copy {
    display: grid;
    gap: 6px;
    padding: 15px 16px 16px;
}

.ev-gallery-front__copy small,
.ev-gallery-front__empty span,
.ev-gallery-front__detail-copy p {
    color: rgba(255, 255, 255, 0.68);
}

.ev-gallery-front__detail {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.82fr);
    gap: 18px;
}

.ev-gallery-front__detail-media {
    overflow: hidden;
}

.ev-gallery-front__detail-media img {
    display: block;
    width: 100%;
    height: auto;
}

.ev-gallery-front__detail-copy {
    display: grid;
    align-content: start;
    gap: 16px;
    padding: 28px 30px;
}

.ev-gallery-front__detail-copy h2 {
    margin: 0;
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1;
    text-transform: uppercase;
}

.ev-gallery-front__meta-list {
    display: grid;
    gap: 12px;
}

.ev-gallery-front__meta-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 15px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
}

.ev-gallery-front__meta-list strong {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ev-gallery-front__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ev-gallery-front__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ev-gallery-front__button--primary {
    border-color: rgba(225, 6, 19, 0.3);
    background: linear-gradient(135deg, #e10613 0%, #8f1118 100%);
}

.ev-gallery-front__button--ghost {
    background: rgba(255, 255, 255, 0.03);
}

.ev-gallery-viewer {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: grid;
    overflow: hidden;
    border-radius: 18px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.ev-gallery-viewer.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.ev-gallery-viewer__backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 100% 0%, rgba(225, 6, 19, 0.18), transparent 24%),
        linear-gradient(180deg, rgba(2, 4, 8, 0.92) 0%, rgba(3, 5, 9, 0.96) 100%);
    backdrop-filter: blur(10px);
}

.ev-gallery-viewer__dialog {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    padding: 0;
    overflow: hidden;
    border-radius: 18px;
    background: transparent;
    box-shadow: none;
}

.ev-gallery-viewer__stage {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    padding: 34px 34px 132px;
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    background:
        radial-gradient(circle at 100% 0%, rgba(225, 6, 19, 0.16), transparent 28%),
        linear-gradient(180deg, rgba(7, 10, 16, 0.96) 0%, rgba(2, 4, 8, 0.98) 100%);
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.45);
}

.ev-gallery-viewer__image {
    display: block;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    max-width: calc(100% - 12px);
    max-height: calc(100% - 148px);
    object-fit: contain;
    object-position: center center;
}

.ev-gallery-viewer__caption {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 20px;
    display: grid;
    gap: 10px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(8, 11, 16, 0.84) 0%, rgba(6, 8, 12, 0.92) 100%);
    backdrop-filter: blur(12px);
}

.ev-gallery-viewer__caption-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ev-gallery-viewer__title {
    font-size: 22px;
    font-weight: 900;
    line-height: 0.98;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.ev-gallery-viewer__counter {
    color: #ff233f;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.ev-gallery-viewer__description {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    line-height: 1.55;
}

.ev-gallery-viewer__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ev-gallery-viewer__meta span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.86);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ev-gallery-viewer__close,
.ev-gallery-viewer__nav {
    position: absolute;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(6, 8, 12, 0.8);
    color: #fff;
    cursor: pointer;
}

.ev-gallery-viewer__close {
    top: 18px;
    right: 18px;
}

.ev-gallery-viewer__nav {
    top: 50%;
    transform: translateY(-50%);
}

.ev-gallery-viewer__nav--prev {
    left: 18px;
}

.ev-gallery-viewer__nav--next {
    right: 18px;
}

.ev-gallery-front__empty {
    display: grid;
    gap: 8px;
    padding: 24px;
}

.ev-gallery-shortcode,
.ev-gallery-widget {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.ev-gallery-shortcode__item,
.ev-gallery-widget__item {
    display: block;
    overflow: hidden;
    border-radius: 14px;
    text-decoration: none;
}

.ev-gallery-shortcode__thumb,
.ev-gallery-widget__item span {
    display: block;
    aspect-ratio: 1 / 1;
    background-position: center;
    background-size: cover;
    border-radius: 14px;
}

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

@media (max-width: 1180px) {
    .ev-gallery-front__shell {
        width: min(1540px, calc(100vw - 32px));
    }

    .ev-gallery-front__hero-grid,
    .ev-gallery-front__detail {
        grid-template-columns: 1fr;
    }

    .ev-gallery-front__hero-side {
        min-height: 0;
    }

    .ev-gallery-front__hero-mark {
        right: 0;
        font-size: 144px;
    }

    .ev-gallery-front__stats,
    .ev-gallery-front__grid,
    .ev-gallery-shortcode,
    .ev-gallery-widget {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ev-gallery-front__content {
        min-height: var(--ev-gallery-content-min-height, clamp(680px, 78vh, 980px));
    }

    .ev-gallery-viewer__stage {
        padding: 20px;
    }

    .ev-gallery-viewer__image {
        max-width: 100%;
        max-height: calc(100% - 112px);
    }

    .ev-gallery-viewer__caption {
        left: 20px;
        right: 20px;
        bottom: 20px;
    }

    .ev-gallery-viewer__nav--next {
        right: 18px;
    }
}

@media (max-width: 820px) {
    .ev-gallery-front__section-row,
    .ev-gallery-front__toolbar,
    .ev-gallery-front__album-meta,
    .ev-gallery-front__breadcrumbs {
        align-items: flex-start;
        flex-direction: column;
    }

    .ev-gallery-front__albums-grid,
    .ev-gallery-front__stats,
    .ev-gallery-front__grid,
    .ev-gallery-shortcode,
    .ev-gallery-widget {
        grid-template-columns: 1fr;
    }

    .ev-gallery-front__content {
        min-height: var(--ev-gallery-content-min-height, clamp(560px, 74vh, 820px));
    }

    .ev-gallery-viewer__dialog {
        padding: 0;
    }

    .ev-gallery-viewer__stage {
        padding: 16px 16px 134px;
    }

    .ev-gallery-viewer__close,
    .ev-gallery-viewer__nav {
        width: 42px;
        height: 42px;
    }

    .ev-gallery-viewer__caption {
        left: 14px;
        right: 14px;
        bottom: 14px;
        padding: 14px;
    }

    .ev-gallery-viewer__caption-head {
        flex-direction: column;
    }

    .ev-gallery-viewer__image {
        max-width: 100%;
        max-height: calc(100% - 120px);
    }

    .ev-gallery-viewer__nav--prev {
        left: 10px;
    }

    .ev-gallery-viewer__nav--next {
        right: 10px;
    }
}
