.gallery.section {
    padding-top: 32px;
}

.gallery__header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 28px;
}

.gallery__switcher {
    display: inline-flex;
    gap: 10px;
    padding: 6px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(13, 103, 199, 0.1);
}

.gallery__tab {
    min-width: 92px;
    height: 42px;
    padding: 0 18px;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--color-text-soft-alt);
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.gallery__tab--active {
    background: var(--gradient-main-subscription);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(13, 103, 199, 0.18);
}

.gallery__panes {
    position: relative;
}

.gallery__pane {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity var(--transition-panel), visibility var(--transition-panel), transform var(--transition-panel);
}

.gallery__pane--active {
    position: relative;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.gallery__slider {
    overflow: hidden;
    padding-bottom: 4px;
}

.gallery__grid {
    display: grid;
}

.gallery__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-top: 24px;
}

.gallery-card {
    height: 100%;
}

.gallery-card__frame {
    position: relative;
    display: flex;
    align-items: end;
    min-height: 420px;
    padding: 24px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0)),
        linear-gradient(135deg, #dce9f7 0%, #f8fbff 100%);
    overflow: hidden;
    cursor: pointer;
}

.gallery-card__frame img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.gallery-card__label {
    position: relative;
    z-index: 2;
    color: var(--color-accent-strong);
    font-size: 20px;
    font-weight: 500;
    text-shadow: 0 2px 18px rgba(255, 255, 255, 0.65);
}

.gallery-card__frame--video {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0)),
        linear-gradient(135deg, #cfe1f6 0%, #e8f3ff 100%);
}

.gallery-card__frame::after,
.gallery-card__frame--video::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(6, 22, 41, 0.06) 0%, rgba(6, 22, 41, 0.32) 100%);
}

.gallery-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 52px;
    height: 52px;
    border-radius: var(--radius-round);
    background: var(--gradient-main-subscription);
    box-shadow: 0 16px 28px rgba(13, 103, 199, 0.2);
    transform: translate(-50%, -50%);
    z-index: 2;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-card__play::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 14px solid #ffffff;
    transform: translate(-35%, -50%);
}

.gallery-card--video .gallery-card__frame:hover .gallery-card__play {
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 20px 34px rgba(13, 103, 199, 0.26);
}

.gallery__pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gallery__pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    margin: 0;
    opacity: 1;
    background: rgba(13, 103, 199, 0.2);
}

.gallery__pagination .swiper-pagination-bullet-active {
    background: var(--color-accent-strong);
}

.gallery__navigation {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gallery__arrow {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(13, 103, 199, 0.14);
    border-radius: var(--radius-round);
    background: rgba(255, 255, 255, 0.9);
    color: var(--color-accent-strong);
    transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.gallery__arrow svg {
    width: 20px;
    height: 20px;
    display: block;
}

.gallery__arrow:hover {
    transform: translateY(-2px);
    background: #ffffff;
    border-color: rgba(13, 103, 199, 0.26);
}

.gallery__arrow.swiper-button-disabled {
    opacity: 0.45;
    cursor: default;
    transform: none;
}

@media (max-width: 1180px) {
    .gallery__header {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 540px) {
    .gallery__bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .gallery-card__frame {
        min-height: 320px;
        padding: 18px;
    }

    .gallery__switcher {
        width: 100%;
    }

    .gallery__tab {
        flex: 1 1 auto;
        min-width: 0;
    }
}
