.memory-body {
    background:
        radial-gradient(circle at 50% 16%, rgba(76, 93, 118, 0.12), transparent 30%),
        radial-gradient(circle at 50% 78%, rgba(27, 34, 45, 0.32), transparent 38%),
        linear-gradient(180deg, #070a0f 0%, #0c131d 44%, #080d14 100%);
    overflow-x: hidden;
}

.memory-search-hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    padding-top: 70px;
    padding-bottom: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    z-index: 5;
}

#memory-heroes {
    scroll-margin-top: 120px;
}

.memory-search-hero__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.memory-search-hero__bg::before {
    content: "";
    position: absolute;
    inset: 0;
}

.memory-search-hero .site-container,
.memory-workers-list .site-container {
    position: relative;
    z-index: 2;
}

.memory-search-hero__inner {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    text-align: center;
}

.memory-search-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 34px;
    color: #d8c08a;
    font-family: "Noto Serif", serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.memory-search-hero__eyebrow::before,
.memory-search-hero__eyebrow::after {
    content: "";
    width: 72px;
    height: 1px;
    background: rgba(198, 171, 118, 0.28);
}

.memory-search-hero__title {
    margin: 0;
    color: #e3c985;
    font-family: "Noto Serif", serif;
    font-size: clamp(35px, 6vw, 70px);
    line-height: 0.95;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-shadow: 0 8px 30px rgba(5, 8, 13, 0.3);
}

.memory-search-hero__divider {
    width: 100%;
    max-width: 540px;
    margin: 34px auto 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
}

.memory-search-hero__divider-line {
    flex: 1;
    height: 1px;
    background: rgba(198, 171, 118, 0.22);
}

.memory-search-hero__divider-emblem {
    width: 16px;
    height: auto;
    opacity: 0.88;
    object-fit: contain;
}

.memory-search-form {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    text-align: left;
    position: relative;
    z-index: 20;
}

.memory-worker-card__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.memory-search-form__main-wrap {
    position: relative;
    z-index: 25;
}

.memory-search-form__main {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid rgba(198, 171, 118, 0.72);
    background: rgba(9, 14, 22, 0.7);
    min-height: 85px;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.02),
        0 10px 22px rgba(3, 7, 12, 0.14);
    transition: border-color 0.2s ease, background 0.2s ease;
    backdrop-filter: blur(4px);
}

.memory-search-form__main:focus-within {
    border-color: #d7bb7d;
    background: rgba(11, 17, 27, 0.82);
}

.memory-search-form__input {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: #f1ece2;
    font-size: 28px;
    padding: 10px 92px 10px 38px;
    font-family: "Noto Serif", serif;
}

.memory-search-form__input::placeholder {
    color: rgba(197, 189, 171, 0.55);
}

.memory-search-form__submit {
    position: absolute;
    top: 50%;
    right: 28px;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: none;
    background: transparent;
    color: #ddb96e;
    cursor: pointer;
    transition: color 0.2s ease;
}

.memory-search-form__submit:hover {
    color: #f0cf8a;
}

.memory-search-form__submit svg {
    width: 100%;
    height: 100%;
}

/* Контейнер */
.memory-search-form__advanced-panel {
    display: none;
    position: relative;
    z-index: 10;
}

.memory-search-form__advanced-panel.is-open {
    display: block;
}

/* ВНУТРЕННИЙ БЛОК */
.memory-search-form__advanced-panel-inner {
    margin-top: 16px;
    padding: 24px;


    border: 1px solid rgba(198, 171, 118, 0.2);

    background: linear-gradient(
        180deg,
        rgba(12, 18, 28, 0.96) 0%,
        rgba(9, 14, 22, 0.96) 100%
    );

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.25),
        0 2px 10px rgba(0, 0, 0, 0.15);

    /* � АНИМАЦИЯ (лёгкая) */
    opacity: 0;
    transform: translateY(-14px) scale(0.98);
    transform-origin: top center;

    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

/* АКТИВНОЕ СОСТОЯНИЕ */
.memory-search-form__advanced-panel.is-open .memory-search-form__advanced-panel-inner {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ХОВЕР ДЛЯ ПОЛЕЙ (чтобы выглядело дороже) */
.memory-search-form__advanced-panel-inner input,
.memory-search-form__advanced-panel-inner select {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.memory-search-form__advanced-panel-inner input:focus,
.memory-search-form__advanced-panel-inner select:focus {
    border-color: rgba(198, 171, 118, 0.6);
    box-shadow: 0 0 0 2px rgba(198, 171, 118, 0.15);
}

/* КНОПКА ЗАКРЫТИЯ (если есть) */
.memory-search-form__advanced-close {
    position: absolute;
    top: 12px;
    right: 12px;

    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;


    cursor: pointer;

    background: rgba(255, 255, 255, 0.04);
    transition: background 0.2s ease;
}

.memory-search-form__advanced-close:hover {
    background: rgba(255, 255, 255, 0.08);
}

.memory-search-form__date-wrap {
    position: relative;
}

.memory-search-form__date-input {
    width: 100%;
    height: 56px;
    padding: 0 48px 0 16px;
    border: 1px solid rgba(198, 171, 118, 0.22);
    background: rgba(10, 16, 25, 0.92);
    color: #f5f1e8;
    font-size: 15px;
    line-height: 1.2;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.memory-search-form__date-input::placeholder {
    color: rgba(245, 241, 232, 0.42);
}

.memory-search-form__date-input:focus {
    outline: none;
    border-color: rgba(198, 171, 118, 0.55);
    box-shadow: 0 0 0 3px rgba(198, 171, 118, 0.12);
    background: rgba(12, 18, 28, 0.98);
}

.memory-search-form__date-icon {
    position: absolute;
    top: 50%;
    right: 16px;
    width: 18px;
    height: 18px;
    color: rgba(198, 171, 118, 0.74);
    transform: translateY(-50%);
    pointer-events: none;
}

.memory-search-form__date-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.memory-search-form__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.memory-search-form__field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.memory-search-form__field label {
    color: #d9c39a;
    font-size: 14px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.memory-search-form__field input,
.memory-search-form__field select {
    min-height: 64px;
    padding: 16px 18px;
    border: 1px solid rgba(198, 171, 118, 0.24);
    background: rgba(8, 12, 18, 0.7);
    color: #f2ede2;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
    font-size: 16px;
}

.memory-search-form__field input:focus,
.memory-search-form__field select:focus {
    border-color: rgba(215, 187, 125, 0.75);
    background: rgba(10, 15, 23, 0.9);
}

.memory-search-form__field input::placeholder {
    color: rgba(197, 189, 171, 0.48);
}

.memory-search-form__field select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    background-image:
        linear-gradient(45deg, transparent 50%, #d8bb79 50%),
        linear-gradient(135deg, #d8bb79 50%, transparent 50%);
    background-position:
        calc(100% - 22px) calc(50% - 3px),
        calc(100% - 15px) calc(50% - 3px);
    background-size: 7px 7px, 7px 7px;
    background-repeat: no-repeat;
    padding-right: 44px;
}

.memory-search-form__alphabet {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid rgba(198, 171, 118, 0.14);
}

.memory-search-form__alphabet-label {
    margin-bottom: 14px;
    color: #d9c39a;
    font-size: 15px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.memory-search-form__alphabet-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.memory-search-form__alphabet-item {
    min-width: 46px;
    height: 46px;
    padding: 0 14px;
    border: 1px solid rgba(198, 171, 118, 0.26);
    background: rgba(8, 12, 18, 0.78);
    color: #eadfca;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-family: "Noto Serif", serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.memory-search-form__alphabet-item:hover {
    border-color: rgba(229, 201, 133, 0.7);
    background: rgba(216, 187, 121, 0.08);
    color: #f0d79d;
    transform: translateY(-2px);
}

.memory-search-form__alphabet-item.is-active {
    border-color: #d8bb79;
    background: rgba(216, 187, 121, 0.14);
    color: #f3dfb0;
    box-shadow: 0 0 0 1px rgba(216, 187, 121, 0.18);
}

.memory-search-form__actions {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
}

.memory-search-form__reset,
.memory-search-form__search-btn {
    min-width: 180px;
    min-height: 60px;
    padding: 14px 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: "Noto Serif", serif;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.memory-search-form__reset {
    border: 1px solid rgba(198, 171, 118, 0.72);
    background: transparent;
    color: #d8bb79;
}

.memory-search-form__reset:hover {
    background: rgba(216, 187, 121, 0.08);
    color: #ecd091;
}

.memory-search-form__search-btn {
    border: 1px solid #d8bb79;
    background: #d8bb79;
    color: #111317;
}

.memory-search-form__search-btn:hover {
    background: #e5c987;
    border-color: #e5c987;
}

.memory-search-form__footer {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: relative;
    z-index: 10;
}

.memory-search-form__filter-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #d8bb79;
    font-family: "Noto Serif", serif;
    font-size: 20px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid rgba(216, 187, 121, 0.45);
    background: rgba(223, 191, 118, 0.08);
    padding: 10px 15px;
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.memory-search-form__filter-toggle:hover {
    color: #ecd091;
    border-color: rgba(236, 208, 145, 0.64);
}

.memory-search-form__count {
    color: rgba(226, 220, 209, 0.74);
    font-size: 18px;
    font-weight: 600;
    text-align: right;
}

.memory-workers-list {
    position: relative;
    padding: 8px 0 100px;
    z-index: 1;
}

.memory-workers-list__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 70px 70px;
}

.memory-worker-card {
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 0 1 320px;
    transition: transform 0.28s ease;
}

.memory-worker-card:hover {
    transform: translateY(-8px);
}

.memory-worker-card__frame {
    position: relative;
    padding: 14px;
    background: linear-gradient(180deg, rgba(121, 99, 61, 0.38) 0%, rgba(74, 57, 34, 0.28) 100%);
    border: 1px solid rgba(198, 171, 118, 0.24);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.03),
        0 14px 30px rgba(0, 0, 0, 0.22);
    transition:
        border-color 0.28s ease,
        box-shadow 0.28s ease,
        background 0.28s ease;
}

.memory-worker-card:hover .memory-worker-card__frame {
    border-color: rgba(229, 201, 133, 0.72);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.05),
        0 0 0 1px rgba(229, 201, 133, 0.18),
        0 0 26px rgba(216, 187, 121, 0.18),
        0 18px 34px rgba(0, 0, 0, 0.28);
    background: linear-gradient(180deg, rgba(138, 112, 68, 0.44) 0%, rgba(82, 62, 37, 0.34) 100%);
}

.memory-worker-card__media {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(16, 22, 32, 0.98) 0%, rgba(8, 12, 18, 1) 100%);
}

.memory-worker-card__image,
.memory-worker-card__placeholder {
    width: 100%;
    height: 100%;
    display: block;
}

.memory-worker-card__image {
    object-fit: cover;
    filter: saturate(0.9) contrast(1.02);
    transition: transform 0.5s ease, filter 0.35s ease;
}

.memory-worker-card:hover .memory-worker-card__image {

    filter: saturate(0.82) contrast(1.04);
}

.memory-worker-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(18, 24, 34, 0.98) 0%, rgba(10, 14, 20, 1) 100%);
    color: rgba(227, 201, 133, 0.72);
    font-family: "Noto Serif", serif;
    font-size: 24px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.memory-worker-card__mourning-ribbon {
    position: absolute;
    right: -38px;
    bottom: 22px;
    width: 150px;
    height: 26px;
    background: linear-gradient(180deg, #050505 0%, #161616 100%);
    transform: rotate(-45deg);
    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.35),
        inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    z-index: 0;
    pointer-events: none;
}

.memory-worker-card__mourning-ribbon::before {
    content: "";
    position: absolute;
    inset: 5px 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.memory-worker-card__overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 46px 20px 18px;
    background: linear-gradient(180deg, rgba(5, 7, 10, 0) 0%, rgba(5, 7, 10, 0.18) 20%, rgba(5, 7, 10, 0.88) 100%);
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.32s ease, transform 0.32s ease;
    z-index: 2;
    pointer-events: none;
}

.memory-worker-card:hover .memory-worker-card__overlay {
    opacity: 1;
    transform: translateY(0);
}

.memory-worker-card__life-dates {
    color: #f2e6c8;
    font-family: "Noto Serif", serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    letter-spacing: 0.04em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.32);
}

.memory-worker-card__body {
    padding: 20px 8px 0;
    text-align: center;
}

.memory-worker-card__name {
    margin: 0;
    color: #e3c985;
    font-family: "Noto Serif", serif;
    font-size: clamp(23px, 1vw, 30px);
    line-height: 1.2;
    font-weight: 700;
}

.memory-worker-card__divider {
    width: 100%;
    max-width: 290px;
    margin: 16px auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.memory-worker-card__divider-line {
    flex: 1;
    height: 1px;
    background: rgba(198, 171, 118, 0.24);
}

.memory-worker-card__divider-emblem {
    width: 16px;
    height: auto;
    object-fit: contain;
    opacity: 0.86;
    flex-shrink: 0;
}

.memory-worker-card__position {
    color: rgba(229, 221, 206, 0.82);
    font-size: 16px;
    line-height: 1.5;
    max-width: 92%;
    margin: 0 auto;
}

.memory-workers-list__empty {
    width: 100%;
    max-width: 900px;
    padding: 40px;
    text-align: center;
    border: 1px solid rgba(198, 171, 118, 0.16);
    background: rgba(10, 15, 24, 0.18);
    color: rgba(233, 227, 216, 0.82);
    font-size: 18px;
    margin: 0 auto;
}

.memory-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 32px;
}

.memory-pagination__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    text-decoration: none;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: 0.25s ease;
}

.memory-pagination__link:hover {
    background: rgba(255, 255, 255, 0.14);
}

.memory-pagination__link--active {
    border: 1px solid rgba(223, 191, 118, 0.45);
    background: rgba(223, 191, 118, 0.08);
    pointer-events: none;
    font-weight: 700;
}

.memory-pagination__dots {
    color: rgba(255, 255, 255, 0.7);
    padding: 0 4px;
}

.memory-pagination__current {
    color: rgba(233, 227, 216, 0.82);
}

.reveal-fade {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal-fade.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1199px) {
    .memory-search-form {
        max-width: 100%;
    }

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

    .memory-workers-list__grid {
        gap: 60px 60px;
    }

    .memory-worker-card {
        max-width: 320px;
        flex-basis: 320px;
    }
}

@media (max-width: 991px) {
    .memory-search-hero {
        padding-top: 108px;
        padding-bottom: 56px;
        min-height: auto;
    }

    .memory-search-hero__eyebrow {
        margin-bottom: 26px;
    }



    .memory-search-hero__divider {
        margin: 28px auto 38px;
        max-width: 420px;
    }

    .memory-search-form__main {
        min-height: 90px;
    }

    .memory-search-form__input {
        font-size: 23px;
        padding: 24px 84px 24px 24px;
    }

    .memory-search-form__footer {
        flex-direction: column;

    }

    .memory-search-form__count {
        text-align: center;
    }

    .memory-search-form__grid {
        grid-template-columns: 1fr;
    }

    .memory-search-form__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .memory-search-form__reset,
    .memory-search-form__search-btn {
        width: 100%;
        min-width: 100%;
    }

    .memory-workers-list__grid {
        gap: 60px 60px;
    }

    .memory-worker-card {
        max-width: 300px;
        flex-basis: 300px;
    }
}

@media (max-width: 767px) {
    .memory-search-form__alphabet-list {
        gap: 8px;
    }

    .memory-search-form__alphabet-item {
        min-width: 42px;
        height: 42px;
        font-size: 14px;
        padding: 0 12px;
    }

    .memory-workers-list {
        padding-bottom: 76px;
    }

    .memory-workers-list__grid {
        gap: 30px;
    }

    .memory-worker-card {
        max-width: 300px;
        flex-basis: 300px;
        margin: 0 auto;
    }

    .memory-worker-card__frame {
        padding: 10px;
    }

    .memory-worker-card__media {
        aspect-ratio: 4 / 5;
    }

    .memory-worker-card__mourning-ribbon {
        right: -42px;
        bottom: 18px;
        width: 145px;
        height: 24px;
    }

    .memory-worker-card__body {
        padding-top: 18px;
    }

    .memory-worker-card__name {
        font-size: 24px;
    }

    .memory-worker-card__position {
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .memory-search-hero {
        padding-top: 92px;
        padding-bottom: 42px;
    }

    .memory-search-hero__eyebrow {
        gap: 12px;
        font-size: 14px;
        margin-bottom: 20px;
    }

    .memory-search-hero__eyebrow::before,
    .memory-search-hero__eyebrow::after {
        width: 36px;
    }

    .memory-search-form__field input, .memory-search-form__field select {
        min-height: 50px;
        padding: 10px 18px;
        border: 1px solid rgba(198, 171, 118, 0.24);
        background: rgba(8, 12, 18, 0.68);
        color: #f2ede2;
        outline: none;
        transition: border-color 0.2s ease, background 0.2s ease;
        font-size: 16px;
    }

    .memory-search-hero__divider {
        margin: 22px auto 28px;
        max-width: 260px;
        gap: 12px;
    }

    .memory-search-form__main {
        min-height: 50px;
    }

    .memory-search-form__input {
        font-size: 16px;
        padding: 10px 70px 10px 18px;
    }

    .memory-search-form__submit {
        right: 18px;
        width: 36px;
        height: 36px;
    }

    .memory-search-form__advanced-panel {
        top: calc(100% + 10px);
    }

    .memory-search-form__advanced-panel-inner {
        padding: 18px;
    }

    .memory-search-form__filter-toggle,
    .memory-search-form__count {
        font-size: 14px;
    }

    .memory-search-form__alphabet {
        margin-top: 20px;
        padding-top: 18px;
    }

    .memory-search-form__alphabet-label {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .memory-search-form__alphabet-list {
        gap: 7px;
    }

    .memory-search-form__alphabet-item {
        min-width: 40px;
        height: 40px;
        font-size: 13px;
        padding: 0 10px;
    }

    .memory-search-form__actions {
        margin-top: 18px;
        gap: 12px;
    }

    .memory-search-form__reset,
    .memory-search-form__search-btn {
        min-height: 50px;
        font-size: 14px;
    }

    .memory-workers-list {
        padding-bottom: 70px;
    }

    .memory-workers-list__grid {
        gap: 20px;
    }

    .memory-worker-card {
        max-width: 300px;
        flex-basis: 100%;
    }

    .memory-worker-card__body {
        padding: 20px 18px 22px;
    }

    .memory-worker-card__name {
        font-size: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal-fade,
    .memory-search-form__advanced-panel,
    .memory-pagination__link,
    .memory-worker-card,
    .memory-worker-card__frame,
    .memory-search-form__main,
    .memory-search-form__submit,
    .memory-search-form__reset,
    .memory-search-form__search-btn,
    .memory-worker-card__image,
    .memory-worker-card__overlay,
    .memory-search-form__alphabet-item {
        transition: none;
        animation: none;
    }

    .reveal-fade {
        opacity: 1;
        transform: none;
    }

    .memory-search-form__advanced-panel {
        transform: none;
    }
}
