/* =========================================
   ФОНОВЫЕ КАРТИНКИ PORSCHE — СЛЕВА / СПРАВА
   ========================================= */
.contacts-bg-layer {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1 !important;
    overflow: hidden;
}

/* левая */
.porsche-left {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: auto;
    object-fit: cover;
}

/* правая */
.porsche-right {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: auto;
    object-fit: cover;
}

/* =========================================
   МЯГКИЕ КРАЯ — ТОЛЬКО ДЕСКТОП (≥1200px)
   ========================================= */
@media (min-width: 1200px) {

    .contacts-bg-layer::before,
    .contacts-bg-layer::after {
        content: "";
        position: fixed;
        top: 0;
        height: 100%;
        width: 40px;
        pointer-events: none;
        filter: blur(4px);
        z-index: 0;
    }

    .contacts-bg-layer::before {
        left: calc(50% - 600px);
        background: linear-gradient(
            to right,
            rgba(0,0,0,0),
            rgba(255,255,255,0.85)
        );
    }

    .contacts-bg-layer::after {
        right: calc(50% - 600px);
        background: linear-gradient(
            to left,
            rgba(0,0,0,0),
            rgba(255,255,255,0.85)
        );
    }
}

/* =========================================
   ЦЕНТРАЛЬНЫЙ ПОЛУПРОЗРАЧНЫЙ БЛОК
   ========================================= */
.contacts-middle-column {
    position: relative;
    z-index: 5;
    max-width: 1200px;
    margin: -15px auto -20px;
    padding: 25px 40px;
    background: rgba(255,255,255,0.83);
    backdrop-filter: blur(12px);
    border-radius: 8px;
}

.contacts-top h1 {
    margin-top: 0;
}

/* =========================================
   NAVBAR / FOOTER — НАД ВСЕМ
   ========================================= */
.navbar,
header,
footer {
    position: relative;
    z-index: 1000 !important;
}



/* =========================================
   CONTACTS — ЭКРАНЫ 1200–1600px
   ПЛАВНАЯ ПОДСТРОЙКА ЦЕНТРА
   968px → 1122px + СИНХРОН ФОНА
   ========================================= */

.koch-dealers {
        width: 100%;
        margin-top: 32px;
        padding: 30px 0 42px;
        border-top: 1px solid rgba(0, 0, 0, 0.10);
        clear: both;
    }

    .koch-dealers__title {
        margin: 0 0 30px;
        color: #1d1d1f;
        font-size: 30px;
        font-weight: 400;
        line-height: 1.15;
        letter-spacing: -0.02em;
    }

    .koch-dealers__grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        column-gap: 36px;
        row-gap: 38px;
        align-items: start;
    }

    .koch-dealer-card {
        position: relative;
        min-width: 0;
        padding: 10px 11px 13px;
        margin: -10px -11px -13px;
        border-radius: 3px;
        color: #1d1d1f;
        transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
    }

    .koch-dealer-card--clickable {
        cursor: pointer;
    }

    .koch-dealer-card--clickable:hover,
    .koch-dealer-card--clickable:focus-within {
        background: rgba(255, 255, 255, 0.94);
        box-shadow: 0 8px 28px rgba(0, 0, 0, 0.09);
        transform: translateY(-2px);
    }

    .koch-dealer-card__cover-link {
        position: absolute;
        inset: 0;
        z-index: 1;
        border-radius: inherit;
    }

    .koch-dealer-card__city,
    .koch-dealer-card__company,
    .koch-dealer-card__muted {
        position: relative;
        z-index: 0;
    }

    .koch-dealer-card__city {
        margin: 0 0 12px;
        color: #1d1d1f;
        font-size: 22px;
        font-weight: 700;
        line-height: 1.15;
    }

    .koch-dealer-card__company {
        margin-bottom: 3px;
        color: #222;
        font-size: 16px;
        font-weight: 400;
        line-height: 1.4;
    }

    .koch-dealer-card__muted {
        color: #929292;
        font-size: 15px;
        font-weight: 400;
        line-height: 1.45;
        overflow-wrap: anywhere;
    }

    .koch-dealer-card__link-row {
        position: relative;
        z-index: 2;
        margin-top: 2px;
        font-size: 15px;
        line-height: 1.45;
        overflow-wrap: anywhere;
    }

    .koch-dealer-card__link-row a {
        color: #009fc8;
        text-decoration: none;
    }

    .koch-dealer-card__link-row a:hover,
    .koch-dealer-card__link-row a:focus {
        color: #007ea0;
        text-decoration: underline;
    }

@media (max-width: 1600px) and (min-width: 1200px) {

    .contacts-middle-column {
        max-width: clamp(
            968px,
            calc(70vw - 96px),
            1122px
        );
    }

    .contacts-bg-layer::before {
        left: calc(
            50% - clamp(
                484px,
                calc(35vw - 48px),
                561px
            )
        );
    }

    .contacts-bg-layer::after {
        right: calc(
            50% - clamp(
                484px,
                calc(35vw - 48px),
                561px
            )
        );
    }
}

.table-scale {
    transform-origin: top left;
    transition: transform 0.25s ease;
}

@media (max-width: 976px) {
    .table-scale-wrap {
        overflow-y: hidden;
    }
}


/* =========================================
   МОБИЛЬНЫЕ + ПЛАНШЕТЫ (≤1199px)
   ========================================= */
@media (max-width: 1199px) {

    /* полностью отключаем фон с боковыми картинками */
    .contacts-bg-layer {
        display: none;
    }

    .porsche-left,
    .porsche-right {
        display: none;
    }

    .contacts-middle-column {
        border-radius: 0;
        margin: 0 auto;
        padding: 20px;
        backdrop-filter: blur(4px);
    }
}




    @media (max-width: 1100px) {
        .koch-dealers__grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
            column-gap: 30px;
        }
    }

    @media (max-width: 680px) {
        .koch-dealers {
            margin-top: 24px;
            padding-top: 24px;
        }

        .koch-dealers__title {
            margin-bottom: 24px;
            font-size: 26px;
        }

        .koch-dealers__grid {
            grid-template-columns: 1fr;
            row-gap: 30px;
        }
    }
