/* Оформление вводных блоков главной. Карточки мемориалов используют собственные стили. */
.home-memorial-intro, .home-traditions, .home-history {
    --home-title: var(--arc-heading);
    --home-copy: var(--arc-copy);
    --home-blue: var(--arc-accent);
    --home-line: var(--arc-line);
    --home-surface: var(--arc-tint);
    --home-shadow: 0 4px 18px rgba(36, 65, 87, .055);
}

.home-memorial-intro .card_title,
.home-traditions .card_title,
.home-history .card_title {
    margin: 0;
    color: var(--home-title);
    font-family: inherit;
}
.home-memorial-intro .card_title, .home-traditions .card_title { line-height: 1.375; }
.home-memorial-intro .card_title span,
.home-traditions .card_title span,
.home-history .card_title span { color: var(--home-blue); }

.home-memorial-intro .card_head_text,
.home-history .card_head_text {
    position: relative;
    border-color: var(--home-line);
    border-radius: 20px;
    background: linear-gradient(110deg, #eff6fb, #fff 56%, #f5f9fc);
    box-shadow: var(--home-shadow);
    color: var(--home-copy);
}
.home-memorial-intro .card_head_text::before,
.home-history .card_head_text::before {
    position: absolute;
    inset-inline-start: -1px;
    top: 25%;
    bottom: 25%;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: #84b6d4;
    content: "";
}
.home-memorial-intro .card_head_text p,
.home-history .card_head_text p,
.home-traditions .ser_item_text { margin: 0; }
.home-memorial-intro strong { color: var(--home-blue); font-weight: inherit; }
.home-history .card_head_text strong, .home-traditions strong { color: var(--home-title); font-weight: 600; }

.home-traditions.ser {
    background: #f5f8fb;
    box-shadow: inset 0 1px var(--home-line), inset 0 -1px var(--home-line);
}
.home-traditions .ser_item {
    min-width: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--home-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--home-shadow);
}
.home-traditions .ser_item_text { color: var(--home-copy); }
.home-traditions .ser_iframe {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    margin-block-start: 20px;
    overflow: hidden;
    border-radius: 15px;
    background: linear-gradient(110deg, #123555, #09568d 58%, #173954);
}
.home-traditions .ser_iframe iframe,
.home-traditions .rutube-preview,
.home-traditions .rutube-preview picture,
.home-traditions .rutube-preview img,
.home-traditions .home-film-link {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
.home-traditions .rutube-preview img { object-fit: contain; }
.home-traditions .home-film-link { position: relative; }
.home-traditions .home-film-link[hidden], .home-traditions .home-film-status[hidden] { display: none; }
.home-traditions .home-film-status { margin: 8px 0 0; color: var(--home-copy); font-size: 14px; }
.home-traditions .home-film-status a { color: var(--home-blue); text-decoration: underline; text-underline-offset: .15em; }
.home-traditions .ser_iframe:focus-within { outline: 2px solid var(--home-blue); outline-offset: 3px; }
.home-traditions .home-free-card {
    gap: clamp(14px, 1.4vw, 22px);
}
.home-free-card .ser_click_title {
    margin: 0;
    color: var(--home-title);
    text-align: center;
    text-wrap: balance;
}
.home-free-card .ser_click_title span { color: var(--home-blue); }
.home-free-intro {
    max-width: 46ch;
    margin: 0 auto;
    color: var(--home-copy);
    font-size: clamp(16px, 1.35vw, 20px);
    line-height: 1.4;
    text-align: center;
    text-wrap: pretty;
}
.home-free-guide {
    position: relative;
    display: grid;
    flex: 1 0 auto;
    align-content: center;
    gap: 12px;
    min-width: 0;
    padding: clamp(16px, 1.6vw, 26px);
    overflow: hidden;
    border: 1px solid var(--home-line);
    border-radius: 16px;
    background: linear-gradient(125deg, var(--home-surface), #fff 78%);
}
.home-free-guide::before {
    content: "";
    position: absolute;
    inset: 0 20% auto 0;
    height: 2px;
    background: linear-gradient(90deg, var(--home-blue), #86b7d5 62%, transparent);
    transform: scaleX(.64);
    transform-origin: left;
    pointer-events: none;
}
.home-free-guide::after {
    content: "";
    position: absolute;
    inset: -1px -1px auto auto;
    width: 25px;
    height: 25px;
    border-bottom-left-radius: 6px;
    background: linear-gradient(45deg, #d1e3ef, #ecf4fa 48%, #b8cfdf 50%, #fff 53%);
    pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
    .home-free-guide::before { transition: transform .45s ease-out; }
    .home-free-card:focus-within .home-free-guide::before { transform: scaleX(1); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .home-free-card:hover .home-free-guide::before { transform: scaleX(1); }
}
.home-free-guide h4 {
    margin: 0;
    padding-inline-end: 12px;
    color: var(--home-title);
    font: inherit;
    font-size: clamp(19px, 1.55vw, 23px);
    font-weight: 700;
    line-height: 1.2;
}
.home-free-steps {
    display: grid;
    gap: 12px;
    margin: 0;
    padding-inline-start: 1.65em;
    color: var(--home-copy);
    font-size: clamp(16px, 1.18vw, 18px);
    line-height: 1.4;
}
.home-free-steps > li { list-style-type: decimal !important; padding-inline-start: .2em; }
.home-free-steps > li::marker { color: var(--home-blue); font-weight: 700; }
.home-free-steps > li > strong { display: block; margin-bottom: 2px; font-weight: 700; }
.home-free-steps p { margin: 0; }
.home-free-card .ser_button {
    display: flex;
    flex-direction: row;
    justify-content: center;
    width: 100%;
    margin: 0;
}
:is(.home-free-card .ser_button, .approved-tree .actions) .am-create-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: fit-content;
    max-width: 100%;
    min-height: 48px;
    height: auto;
    padding: 8px 10px 8px 23px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--arc-accent);
    color: #fff;
    font-family: inherit;
    font-size: clamp(16px, 1.25vw, 18px);
    font-weight: 600;
    line-height: 1.15;
    text-transform: uppercase;
    box-shadow: var(--arc-action-shadow);
    transition: none;
}
@media (hover: hover) and (pointer: fine) {
    :is(.home-free-card .ser_button, .approved-tree .actions) .am-create-action:hover { background: var(--arc-heading); color: #fff; }
}
:is(.home-free-card .ser_button, .approved-tree .actions) .am-create-action:is(:focus-visible, :active) {
    background: var(--arc-heading);
    color: #fff;
}
:is(.home-free-card .ser_button, .approved-tree .actions) .am-create-action:focus-visible {
    outline: 2px solid var(--arc-accent);
    outline-offset: 3px;
}
@media (prefers-reduced-motion: no-preference) {
    :is(.home-free-card .ser_button, .approved-tree .actions) .am-create-action { transition: background-color .18s ease; }
}

.home-history { background: #fafcfd; }
.home-history .card_head_text p { max-width: 100ch; margin-inline: auto; }
.home-history .card_head_text p + p { margin-top: .28em; }
@media (min-width: 900px) {
    .home-history .card_head_text {
        container-type: inline-size;
        padding-inline: min(1.5vw, 30px);
    }
    .home-history .card_head_text p { font-size: clamp(1rem, 1.9cqi, 1em); }
    .home-history .card_head_text p:first-child { max-width: none; }
}
.home-history .history_item {
    border-color: #fff;
    border-radius: 20px;
    box-shadow: 0 0 0 1px var(--home-line), 0 4px 15px rgba(36, 65, 87, .09);
}
.home-history .history-trail {
    --place-thread: #94b4c8;
    --place-gap: clamp(22px, 3vw, 48px);
    --place-rise: clamp(22px, 2.4vw, 38px);
    margin-block-start: clamp(20px, 2.4vw, 38px);
}
.home-history .history-photo-strip { position: relative; isolation: isolate; }
.home-history .history_slayd { margin-top: 0; }
.home-history .history-photo-strip::before,
.home-history .history_button_blog::before {
    content: "";
    position: absolute;
    background: var(--place-thread);
    pointer-events: none;
}
.home-history .history-photo-strip::before {
    inset: 50% 7% auto;
    height: 1.5px;
}
.home-history .history_button_blog {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: start;
    margin: 0;
    padding-inline: calc(16.6667% - var(--place-gap) / 3);
}
.home-history .history_button_blog::before {
    top: 0;
    left: 50%;
    width: 1.5px;
    height: var(--place-rise);
    transform: translateX(-50%);
}
.home-history .history_button_blog .am-example-action {
    margin-block-start: var(--place-rise);
    justify-self: center;
}
.home-history .history-button-thread {
    display: block;
    width: 100%;
    height: calc(var(--place-rise) + 22px);
    overflow: visible;
    fill: none;
    stroke: var(--place-thread);
    stroke-width: 1.5;
    pointer-events: none;
}
.home-history .history-button-thread:last-child { transform: scaleX(-1); }
@media (min-width: 1280px) {
    /* На этой ширине Swiper отключает прокрутку и все три фотографии видны одновременно. */
    .home-history .history_list {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: var(--place-gap);
        align-items: center;
        transform: none !important;
    }
    .home-history .history_item { width: auto; max-width: none; margin-inline: 0 !important; }
}
@media (max-width: 1279px) {
    .home-history .history-photo-strip { clip-path: inset(-12px -1px); }
    .home-history .history_list { justify-content: flex-start; }
}
@media (min-width: 768px) and (max-width: 1279px) {
    .home-history .history_button_blog { padding-inline: calc(25% - 7.5px); }
    .home-history .history_button_blog::before { display: none; }
}
@media (max-width: 767px) {
    .home-history .history-photo-strip::before { display: none; }
    .home-history .history_button_blog { padding-inline: 0; }
    .home-history .history-button-thread {
        width: min(24px, 85%);
        height: 7px;
        margin-top: calc(var(--place-rise) + 15px);
        justify-self: end;
    }
    .home-history .history-button-thread:last-child { justify-self: start; }
}
@media (forced-colors: active) {
    .home-history .history-button-thread, .home-history .history-photo-strip::before,
    .home-history .history_button_blog::before { visibility: hidden; }
}
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
    .home-traditions .ser_flex {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        gap: clamp(18px, 2vw, 32px);
        margin-top: 28px;
    }
    .home-traditions .ser_item { width: 100%; max-width: none; padding: clamp(24px, 2.25vw, 38px); }
    .home-traditions .ser_item_text { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.4; }
    .home-traditions .ser_click_title { font-size: clamp(25px, 2.25vw, 34px); line-height: 1.18; }
}
@media (max-width: 575px) {
    .home-memorial-intro .card_head_text, .home-history .card_head_text { border-radius: 16px; }
    .home-traditions .ser_item, .home-history .history_item { border-radius: 16px; }
    .home-traditions .ser_iframe { margin-top: 14px; border-radius: 11px; }
}

/* Общая поверхность, состояния и блик второстепенных кнопок главной. */
:is(.approved-tree .actions, .home-history .history_button_blog) .am-example-action {
    --am-card-reflection: rgba(46, 132, 194, .04);
    display: inline-flex;
    position: relative;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 44px;
    height: auto;
    max-width: 100%;
    padding: 10px 22px;
    transition: none;
    border: 1px solid #b9cddc;
    border-radius: 50px;
    background: #fff;
    color: var(--arc-heading);
    font: 500 16px/1.15 "Roboto Condensed", sans-serif;
    text-align: center;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 1px 3px -1px rgba(36,65,87,.10), 0 6px 14px -8px rgba(36,65,87,.13), inset 0 0 0 1px #fff;
}
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
    :is(.approved-tree .actions, .home-history .history_button_blog) .am-example-action { padding: 11px 24px; font-size: 18px; }
}
@media (max-width: 700px) {
    :is(.approved-tree .actions, .home-history .history_button_blog) .am-example-action { padding: 10px 12px; font-size: 14px; }
}
@media (hover: hover) and (pointer: fine) {
    :is(.approved-tree .actions, .home-history .history_button_blog) .am-example-action:hover {
        border-color: #7aa7c2; background: #eff6fb; color: #1e648f;
    }
}
:is(.approved-tree .actions, .home-history .history_button_blog) .am-example-action:focus-visible {
    outline: 2px solid var(--arc-accent); outline-offset: 3px; border-color: #7aa7c2; background: #eff6fb; color: #1e648f;
}
@media (prefers-reduced-motion: no-preference) {
    :is(.approved-tree .actions, .home-history .history_button_blog) .am-example-action { transition: background-color .18s ease, color .18s ease, border-color .18s ease; }
}

.header .header_title, .header .header_text strong { color: var(--arc-heading); }
.header .header_title span, .header .header_text span { color: var(--arc-accent); }
.header .header_text { color: var(--arc-copy); }

.header .header_button .blue_btn {
    background: transparent;
    color: var(--arc-accent);
    border-color: currentColor;
}
.header .header_button .blue_btn .btn_arrow { background-color: currentColor; }

@media (hover: hover) and (pointer: fine) {
    .header .header_button .blue_btn:hover { color: var(--arc-heading); }
}
.header .header_button .blue_btn:is(:focus-visible, :active) { color: var(--arc-heading); }
.header .header_button .blue_btn:focus-visible { outline: 2px solid var(--arc-accent); outline-offset: 3px; }
#memory-traditions, #free-memorial-card, #family-tree, #historical-places { scroll-margin-block-start: 110px; }
@media (max-width: 991px) { #memory-traditions, #free-memorial-card, #family-tree, #historical-places { scroll-margin-block-start: 78px; } }
