:root {
    --ts-bg-section: #1a1a1a;
    --ts-card-bg-light: #E4E4E4;
    --ts-card-bg-dark: #2E2E2E;
    --ts-text-light: #ffffff;
    --ts-text-dark: #1a1a1a;
    --ts-text-muted: #666666;
    --ts-card-image-bg: url('../../images/tech-spece-card-bg.webp');
}

.tech-specs {
    background-color: var(--ts-bg-section);
    padding: max(24px, 6.25vw) 0 max(40px, 6.25vw);
    width: 100%;
    color: var(--ts-text-light);
}

.tech-specs__header {
    display: flex;
    justify-content: center;
    margin-bottom: max(24px, 3vw);
}

.tech-specs__layout {
    display: flex;
    flex-direction: column;
    gap: max(10px, 0.781vw);
}

.tech-specs__cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: max(10px, 0.781vw);
}

.tech-specs__card-body {
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.tech-specs__card {
    border-radius: max(6px, 0.313vw);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: max(15px, 1.719vw);
    min-height: max(140px, 11.979vw);
}

.tech-specs__card--light {
    background-color: var(--ts-card-bg-light);
    color: var(--ts-text-dark);
}

.tech-specs__card--dark {
    background-color: var(--ts-card-bg-dark);
    color: var(--ts-text-light);
}

.tech-specs__card--image-bg {
    background-image: var(--ts-card-image-bg);
    background-size: cover;
    background-position: center;
    color: var(--ts-text-dark);
    position: relative;
}

.tech-specs__card--c1 { grid-column: span 1; order: 1;}
.tech-specs__card--c2 { grid-column: span 1; order: 2;}
.tech-specs__card--c3 { grid-column: span 2; order: 4;}
.tech-specs__card--c4 {
    grid-column: span 2;
    position: relative;
    overflow: hidden;
    order: 3;
}
.tech-specs__card--c5 { grid-column: span 2;
    order: 5; }

.tech-specs__card--c4::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(270deg, rgba(185, 177, 166, 0.00) 0.21%, rgba(185, 177, 166, 0.90) 39.93%, #959089 99.75%);
    pointer-events: none;
    z-index: 1;
    width: 55%;
}

.tech-specs__card-header-row {
    position: relative;
}

.tech-specs__card-title {
    font-size: max(12px, 1.042vw);
    line-height: 1;
    text-transform: uppercase;
    font-weight: 700;
}

.tech-specs__card-badge {
    background-color: var(--ts-card-bg-dark);
    color: var(--ts-text-light);
    padding: max(4px, 0.3vw) max(9px, 0.729vw);
    font-size: max(9px, 0.729vw);
    white-space: nowrap;
    border-radius: max(2px, 0.1vw);
    font-weight: 400;
    position: absolute;
    right: 0;
    top: 0;
    left: auto;
    transform: translateY(100%);
}

.tech-specs__card-text {
    font-size: max(11px, 0.729vw);
    line-height: 1.2;
    margin: 0;
}

.tech-specs__card--wood {
    flex-direction: row;
    align-items: stretch;
    gap: max(25px, 1.302vw);
}

.tech-specs__card--wood .tech-specs__card-body {
    flex-grow: 1;
}

.tech-specs__card-wood-sample {
    flex-shrink: 0;
    padding-right: max(15px, 0.781vw);
    max-width: max(79px, 5vw);
    width: auto;
    margin-bottom: min(-24px, -2.5vw);
    height: auto;
    margin-top: auto;

    overflow: visible;
    z-index: 5;
}

.tech-specs__card-wood-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tech-specs__card-wood-img {
    transition: transform 0.4s ease-out;
}

.tech-specs__card--c3:hover .tech-specs__card-wood-img {
    transform: rotate(-5deg);
}

.tech-specs__card-text-blocks {
    display: flex;
    flex-direction: column;
    gap: max(6px, 0.469vw);
}

.tech-specs__aside {
    display: none;
}

@media (min-width: 48.01rem) {

    .tech-specs__layout {
        display: flex;
        flex-direction: column;
    }

    .tech-specs__card-wood-sample {
        padding-right: 0;
    }

    .tech-specs__card--c1 { grid-column: span 1; }
    .tech-specs__card--c2 { grid-column: span 1; }
    .tech-specs__card--c3 { grid-column: span 1; }
    .tech-specs__card--c4 { grid-column: span 1; }
    .tech-specs__card--c5 { grid-column: span 2; }

    .tech-specs__card--c1,
    .tech-specs__card--c2,
    .tech-specs__card--c3,
    .tech-specs__card--c4,
    .tech-specs__card--c5 {
        order: inherit;
    }
}

@media (min-width: 64.01rem) {
    .tech-specs__layout {
        display: grid;
        grid-template-columns: 3.1fr 1.3fr;
    }

    .tech-specs__cards-grid {
        grid-template-columns: repeat(7, 1fr)
    }

    .tech-specs__card--c1 { grid-column: 1 / 3; }
    .tech-specs__card--c2 { grid-column: 3/5; }
    .tech-specs__card--c3 { grid-column: 5/-1; position: relative;}
    .tech-specs__card--c4 { grid-column: 1/5; }
    .tech-specs__card--c5 { grid-column: 5/-1; }

    .tech-specs__card--c3 .tech-specs__card-text {
        max-width: 30ch;
    }

    .tech-specs__card--c3 .tech-specs__card-title {
        max-width: 25ch;
    }

    .tech-specs__card--c5 .tech-specs__card-text-blocks {
        max-width: 35ch;
    }

    .tech-specs__aside {
        display: block;
        overflow: hidden;
        height: 100%;
        border-radius: max(8px, 0.521vw);
        aspect-ratio: 206 / 239;
        max-width: max(412px, 21.458vw);
    }

    .tech-specs__aside-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;

        transition: transform 0.5s ease-out;
    }

    .tech-specs__aside:hover .tech-specs__aside-img {
        transform: scale(1.05);
    }

    .tech-specs__card-wood-sample {
        padding-right: 0;
        position: absolute;
        right: max(20px, 1.042vw);
        bottom: 0;
        margin-bottom: min(-10px, -0.521vw);
    }
}