/* Блок «Что входит в стоимость» — перенос 1-в-1 с эталона «Вологодское зодчество», цвета под палитру sk-dinastiya */

.cost-section {
    width: 100%;
    /* Правка по фидбеку: заголовок прилипал к превью-картинкам карточки — по макету сверху 50px. */
    padding: 50px 0 33px;
    background: #F5F5F5;
}

.cost-container {
    /* width 100% обязателен: секция — flex c align-items:center, без него контейнер сжимается по контенту. */
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.cost-title {
    font-weight: 500;
    font-size: 40px;
    line-height: 44px;
    color: #000000;
    margin: 0 0 40px;
}

.cost-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    background: #F5F5F5;
    border-radius: 16px 16px 0 0;
    overflow: visible;
}

.cost-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 22px 10px 16px;
    width: 187px;
    min-height: 175px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 16px 16px 0 0;
    transition: background 0.2s;
    flex-shrink: 0;
    position: relative;
    flex: 1 0 0;
}

.cost-tab.active {
    background: #FFFFFF;
}

.cost-tab:not(.active):hover {
    background: rgba(255,255,255,0.5);
}

.cost-tab-icon {
    width: 120px;
    height: 92px;
    object-fit: contain;
    flex-shrink: 0;
    transition: opacity 0.2s;
    display: block;
}

.cost-tab:not(.active) .cost-tab-icon {
    opacity: 0.5;
}

.cost-tab-label {
    font-weight: 400;
    font-size: 14px;
    line-height: 16px;
    text-align: center;
    text-transform: uppercase;
    color: #000000;
}

.cost-panels {
    background: #FFFFFF;
    border-radius: 0 0 0 0;
    overflow: hidden;
}

.cost-panel {
    display: none;
    gap: 36px;
    padding: 36px 30px;
    height: 611px;
}

.cost-panel.active {
    display: flex;
    align-items: stretch;
}

.cost-panel-img {
    flex: 0 0 594px;
    max-width: 594px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    align-self: stretch;
    min-height: 100%;
}

.cost-panel-img picture {
    object-fit: cover;
    display: block;
    width: 100%;
    height: 100%;
}

.cost-panel-img picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
    min-height: 541px;
}

.cost-panel-img > img {
    width: 100%;
    height: 100%;
    min-height: 541px;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

.cost-panel-badge {
    position: absolute;
    /* Правка по фидбеку: плашка с галочкой — по центру картинки, а не у левого края.
       left/right 0 + margin auto, а не left:50%+transform: иначе fit-content
       считается от половины ширины картинки и текст ломается на лишние строки. */
    left: 0;
    right: 0;
    margin-inline: auto;
    bottom: 20px;
    z-index: 5;

    display: flex;
    /* Галочка по центру вертикали; gap = левому паддингу, чтобы она была по центру и по горизонтали. */
    align-items: center;
    gap: 20px;

    width: fit-content;
    max-width: 380px;
    padding: 16px 20px;
    box-sizing: border-box;

    background: rgba(69, 68, 82, 0.72);
    border: 1px solid #D5A944;
    border-radius: 12px;

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.cost-panel-badge img {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: block;
    object-fit: contain;
}

.cost-panel-badge span {
    display: block;
    margin: 0;
    font-weight: 500;
    font-size: 20px;
    line-height: 1.25;
    color: #FFFFFF;
    text-align: left;
}

.cost-panel-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cost-panel-heading {
    font-weight: 500;
    font-size: 20px;
    line-height: 24px;
    color: #000000;
    margin: 0 0 20px;
}

.cost-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cost-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.cost-list li span {
    flex: 1;
    min-width: 0;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.25; /* правка по фидбеку: было 1.6, затем 1.4 — просили ещё плотнее */
    color: #000000;
}

.cost-list li.is-truncated span {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: var(--truncate-lines, 1);
    line-clamp: var(--truncate-lines, 1);
}

.cost-check-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    display: block;
}

.cost-list li span strong {
    font-weight: 700;
}

.cost-more {
    font-weight: 700;
    font-size: 20px;
    line-height: 22px;
    color: #000000;
    margin: 0 0 20px;
    flex-shrink: 0;
}

.cost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    min-height: 52px;
    padding: 0 30px;
    border-radius: 6px;
    border: none;
    background: #D5A944;
    box-shadow: 0px -4px 11px 0px rgba(0,0,0,0.3) inset,
    0px 6px 8px 0px rgba(255,255,255,0.35) inset;
    font-weight: 700;
    font-size: 20px;
    line-height: 20px;
    color: #FFFFFF;
    cursor: pointer;
    transition: background 0.25s;
    align-self: flex-start;
    margin-top: auto;
    flex-shrink: 0;
}

.cost-btn:hover {
    background: #B89A54;
}

.cost-accordion-btn-outer {
    display: none;
}

@media (max-width: 768px) {
    .cost-accordion-btn-outer {
        display: flex;
        width: 100%;
        align-items: center;
        justify-content: center;
        height: 52px;
        border-radius: 6px;
        border: none;
        background: #D5A944;
        box-shadow: 0px -4px 11px 0px rgba(0,0,0,0.3) inset,
        0px 6px 8px 0px rgba(255,255,255,0.35) inset;
            font-weight: 700;
        font-size: 20px;
        line-height: 20px;
        color: #FFFFFF;
        cursor: pointer;
        transition: background 0.25s;
        margin-top: 16px;
    }

    .cost-accordion-btn-outer:hover {
        background: #B89A54;
    }

    .cost-acc-body .cost-btn {
        display: none;
    }
}

.cost-accordion {
    display: none;
    flex-direction: column;
    gap: 12px;
}

.cost-acc-item {
    background: #FFFFFF;
    border-radius: 8px;
    overflow: hidden;
}

.cost-acc-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.cost-acc-icon {
    width: 60px;
    height: 46px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

.cost-acc-label {
    font-weight: 400;
    font-size: 14px;
    line-height: 16px;
    text-transform: uppercase;
    color: #000000;
    flex: 1;
}

.cost-acc-arrow {
    flex-shrink: 0;
    transition: transform 0.3s;
}

.cost-acc-item.active .cost-acc-arrow {
    transform: rotate(180deg);
}

.cost-acc-body {
    display: none;
    padding: 0 20px 20px;
}

.cost-acc-item.active .cost-acc-body {
    display: block;
}

.cost-acc-body .cost-btn {
    width: 100%;
    margin-top: 16px;
    font-size: 18px;
}

@media (max-width: 1200px) {
    .cost-tab {
        width: calc(100% / 6);
        min-height: 155px;
        padding: 18px 6px 14px;
    }

    .cost-tab-icon {
        width: 90px;
        height: 70px;
    }

    .cost-panel-img {
        flex: 0 0 460px;
        max-width: 460px;
    }

    .cost-panel-img picture img {
        min-height: 440px;
    }

    .cost-panel-img > img {
        min-height: 440px;
    }

    .cost-panel-badge {
        max-width: 320px;
        padding: 14px 16px;
        gap: 16px;
    }

    .cost-panel-badge span {
        font-size: 17px;
    }
}

@media (max-width: 1000px) {
    .cost-title {
        font-size: 32px;
        line-height: 38px;
    }

    .cost-tab {
        min-height: 140px;
        padding: 14px 4px 12px;
    }

    .cost-tab-icon {
        width: 70px;
        height: 54px;
    }

    .cost-tab-label {
        font-size: 12px;
    }

    .cost-panel {
        padding: 24px 20px;
        gap: 24px;
    }

    .cost-panel-img {
        flex: 0 0 360px;
        max-width: 360px;
    }

    .cost-panel-img picture img {
        min-height: 360px;
    }

    .cost-panel-img > img {
        min-height: 360px;
    }

    .cost-panel-badge {
        bottom: 14px;
        max-width: 250px;
        padding: 12px 14px;
        gap: 14px;
    }

    .cost-panel-badge img {
        width: 20px;
        height: 20px;
    }

    .cost-panel-badge span {
        font-size: 14px;
        line-height: 1.2;
    }

    .cost-panel-heading {
        font-size: 18px;
    }

    .cost-list li span {
        font-size: 14px;
        line-height: 18px;
    }

    .cost-more {
        font-size: 17px;
    }

    .cost-btn {
        font-size: 17px;
        height: 46px;
    }
}

@media (max-width: 768px) {
    .cost-section {
        padding: 40px 0 0;
    }

    .cost-title {
        font-size: 26px;
        line-height: 32px;
        margin-bottom: 24px;
        text-align: center;
    }

    .cost-tabs,
    .cost-panels {
        display: none;
    }

    .cost-accordion {
        display: flex;
    }

    .cost-acc-body .cost-panel-img {
        width: 100%;
        max-width: 100%;
        flex: none;
        margin-bottom: 20px;
        border-radius: 8px;
        overflow: hidden;
        position: relative;
    }

    .cost-acc-body .cost-panel-img picture img {
        width: 100%;
        height: auto;
        min-height: 0;
        max-height: 420px;
        aspect-ratio: 1 / 0.9;
        object-fit: cover;
        display: block;
    }

    .cost-acc-body .cost-panel-img > img {
        width: 100%;
        height: auto;
        min-height: 0;
        max-height: 420px;
        aspect-ratio: 1 / 0.9;
        object-fit: cover;
        display: block;
        border-radius: 8px;
    }

    .cost-acc-body .cost-panel-badge {
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
        max-width: none;
        padding: 12px 14px;
        gap: 10px;
        border-radius: 10px;
    }

    .cost-acc-body .cost-panel-badge img {
        width: 18px;
        height: 18px;
    }

    .cost-acc-body .cost-panel-badge span {
        font-size: 14px;
        line-height: 1.2;
    }
}

@media (max-width: 480px) {
    .cost-title {
        font-size: 22px;
        line-height: 28px;
    }

    .cost-acc-btn {
        padding: 14px 16px;
        gap: 12px;
    }

    .cost-acc-icon {
        width: 50px;
        height: 38px;
    }

    .cost-acc-label {
        font-size: 18px;
    }

    .cost-list li span {
        font-size: 14px;
    }

    .cost-acc-body .cost-panel-img picture img {
        max-height: 320px;
    }

    .cost-acc-body .cost-panel-img > img {
        max-height: 360px;
    }

    .cost-acc-body .cost-panel-badge {
        left: 10px;
        right: 10px;
        bottom: 10px;
        padding: 10px 12px;
    }

    .cost-acc-body .cost-panel-badge span {
        font-size: 13px;
    }
}

@media (max-width: 380px) {
    .cost-title {
        font-size: 20px;
        line-height: 26px;
    }

    .cost-acc-icon {
        width: 44px;
        height: 34px;
    }
}

.cost-acc-body .cost-panel-img {
    max-width: 100%;
    flex: none;
    margin-bottom: 20px;
}

.cost-acc-body .cost-panel-img picture img {
    height: auto;
    max-height: 350px;
    width: 100%;
}

.cost-acc-body .cost-panel-img > img {
    height: auto;
    max-height: 350px;
    width: 100%;
}

.cost-acc-body .cost-panel-badge {
    bottom: 12px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    padding: 12px 16px;
    border-radius: 8px;
    gap: 0;
}

.cost-acc-body .cost-panel-badge span {
    font-size: 14px;
    line-height: 1.3;
}

