* {
    box-sizing: border-box;
}

.cats {
    margin-bottom: 45px;
}

.page-title {
    font-weight: bold;
    font-size: 34px;
    color: #878787;
    margin-bottom: 30px;
}

.top {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 70px;
}

.page-text {
    max-width: 701px;
    font-size: 16px;
    line-height: 120%;
    /* text-align: justify; */
    color: #151515;
}

.page-img {
    width: 580px;
    border-right: 15px;
    height: 460px;
    border-radius: 15px;
    object-fit: cover;
}

.img-container {
    width: 100%;
    display: flex;
    /* justify-content: space-between; */
    margin-bottom: 70px;
}

.other-img {
    width: 425px;
    border-radius: 15px;
    height: 294px;
    object-fit: cover;
    margin-right: 32px;
    flex-shrink: 0;
}
.other-img:last-child {
    margin-right: 0;
}

.table-wrap {
    margin-bottom: 70px;
}

.table-wrap table {
    border: 1px solid #878787;
    display: flex;
}

tbody {
    width: 100%;

}

.table-wrap table tr {
    display: flex;
    width: 100%;
}


.table-wrap table td {
    border-right: 1px solid #878787;
    border-bottom: 1px solid #878787;
    min-height: 68px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-weight: 500;
    font-size: 20px;
    line-height: 145%;
    color: #151515;
}
.table-wrap table td:last-of-type {
    border-right: none;
}

.table-wrap table tr:last-of-type td {
    border-bottom: none;
}

.page-text {
    width: 700px;
    flex-shrink: 0;
}

.main .container {
    /* display: flex;
    flex-direction: column; */
    width: 1200px;
}




table {
    border: 1px solid #878787;
    display: flex;
}
tr {
    display: flex;
}
td {
    border-right: 1px solid #878787;
    border-bottom: 1px solid #878787;
    min-height: 68px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-weight: 500;
    font-size: 20px;
    line-height: 145%;
    color: #151515;
}
td:last-of-type {
    border-right: none;
}
tr:last-of-type td {
    border-bottom: none;
}
.template-content {
    margin-bottom: 80px;
}
.image {
    margin: 0 auto;
    text-align: center;
}
.template-content img {
    border-radius: 15px;
}


@media (max-width: 600px) {
    .cats {
        margin-bottom: 22px;
    }
    .page-title {
        font-size: 22px;
        line-height: 110%;
        margin-bottom: 22px;
    }
    .container {
        width: 340px !important;
    }
    .page--nomer .main .container {
        width: calc(100% - 30px) !important;
        max-width: 560px;
    }
    h2 {
        font-size: 18px;
    }
    p {
        font-size: 14px;
    }
    h4 {
        font-size: 15px;
    }
    h3 {
        font-size: 17px;
    }
    td {
        font-size: 14px;
        padding: 10px;
    }

    /* The рейсы table is too wide for phones. On /nomer only, turn every
       data row into a compact card while keeping the desktop table intact. */
    .template-content--nomer figure.table {
        width: 100% !important;
        margin: 24px 0 0;
    }

    .template-content--nomer figure.table table,
    .template-content--nomer figure.table tbody {
        display: block;
        width: 100%;
        border: 0;
    }

    .template-content--nomer figure.table tr {
        display: block;
        width: 100%;
        margin-bottom: 16px;
        overflow: hidden;
        border: 1px solid #d9e8da;
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 3px 12px rgba(21, 21, 21, 0.08);
    }

    .template-content--nomer figure.table tr:first-child {
        display: none;
    }

    .template-content--nomer figure.table td {
        display: grid;
        grid-template-columns: 104px minmax(0, 1fr);
        align-items: start;
        justify-content: initial;
        width: 100%;
        min-height: 0;
        padding: 11px 12px;
        border: 0;
        border-bottom: 1px solid #edf2ed;
        color: #151515;
        font-size: 14px;
        line-height: 1.4;
        text-align: left;
        overflow-wrap: anywhere;
    }

    .template-content--nomer figure.table td:last-child {
        border-bottom: 0;
    }

    .template-content--nomer figure.table td::before {
        padding-right: 10px;
        color: #6f786f;
        font-size: 11px;
        font-weight: 700;
        line-height: 1.35;
        text-transform: uppercase;
    }

    .template-content--nomer figure.table td:nth-child(1)::before {
        content: "Дата";
    }

    .template-content--nomer figure.table td:nth-child(2)::before {
        content: "Название тура";
    }

    .template-content--nomer figure.table td:nth-child(3)::before {
        content: "Автобус";
    }

    .template-content--nomer figure.table td:nth-child(4)::before {
        content: "Отправление";
    }

    .template-content--nomer figure.table td:nth-child(5)::before {
        content: "Сопровождающий";
    }

    .template-content--nomer figure.table td:first-child {
        background: #f2f8f2;
        color: #318c37;
        font-weight: 700;
    }

    .template-content--nomer figure.table td a {
        color: #318c37;
        text-decoration: underline;
        text-decoration-thickness: 1px;
        text-underline-offset: 2px;
    }

    .template-content--nomer figure.table td p {
        margin: 0;
        text-align: left !important;
    }

    .template-content--nomer figure.table td:nth-child(3),
    .template-content--nomer figure.table td:nth-child(5) {
        color: #318c37;
        font-size: 16px;
        font-weight: 800;
        line-height: 1.3;
    }

    .template-content--nomer figure.table td:nth-child(3) p {
        font-size: inherit;
        font-weight: inherit;
        line-height: inherit;
    }
}

@media (max-width: 360px) {
    .template-content--nomer figure.table td {
        display: block;
    }

    .template-content--nomer figure.table td::before {
        display: block;
        margin-bottom: 4px;
        padding-right: 0;
    }
}
