/* Contacts page. Reference layouts: 1920, 960 and 375 px. */
.page-contacts main { overflow: hidden; }
.page-contacts .clinic-container {
    width: min(calc(100% - 72px), 1420px);
    max-width: none;
}
.contacts-page {
    color: #27313d;
    background: #fff;
}
.contacts-page__breadcrumbs {
    display: flex;
    align-items: center;
    gap: 13px;
    height: 61px;
    border-top: 1px solid #7d8288;
    border-bottom: 1px solid #7d8288;
    color: #a7aaad;
    font-size: 18px;
    line-height: 1;
}
.contacts-page__breadcrumbs a { color: #a7aaad; }
.contacts-page__breadcrumbs span:last-child { color: #27313d; }

/* Main contact information. Values interpolate from the 960 layout to the 1920 layout. */
.contacts-page__intro {
    width: min(940px, 100%);
    padding-bottom: clamp(140px, calc(60px + 8.333vw), 220px);
}
.contacts-page__intro h1 {
    margin: clamp(52px, calc(43px + .9375vw), 61px) 0 clamp(49px, calc(30px + 1.979vw), 68px);
    font-size: clamp(40px, calc(37px + .3125vw), 43px);
    font-weight: 400;
    line-height: 1.08;
    text-transform: uppercase;
}
.contacts-page__summary {
    font-size: clamp(20px, 1.25vw, 24px);
    line-height: 1.42;
    text-transform: uppercase;
}
.contacts-page__summary p {
    margin: 0 0 clamp(38px, 3vw, 57px);
}
.contacts-page__summary a { color: inherit; }
.contacts-page__callback {
    appearance: none;
    display: inline-block;
    margin: 0;
    padding: 0;
    border: 0;
    color: #27313d;
    background: transparent;
    font: inherit;
    font-weight: 700;
    line-height: inherit;
    text-transform: uppercase;
    cursor: pointer;
}
.contacts-page__schedule {
    margin-top: clamp(38px, calc(-20px + 6.042vw), 96px);
    padding-top: clamp(40px, calc(-4px + 4.583vw), 84px);
    border-top: 1px solid #8e9499;
}
.contacts-page__schedule h2 {
    margin: 0 0 clamp(45px, calc(24px + 2.188vw), 66px);
    font-size: clamp(20px, 1.25vw, 24px);
    font-weight: 700;
    line-height: 1.3;
    text-transform: uppercase;
}
.contacts-page__table-wrap {
    width: 100%;
    overflow: hidden;
}
.contacts-page__table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    color: #27313d;
    font-size: 15px;
    line-height: 1.35;
}
.contacts-page__table th,
.contacts-page__table td {
    padding: 13px 0 11px;
    border-bottom: 1px solid #8e9499;
    font-weight: 400;
    text-align: left;
    vertical-align: top;
}
.contacts-page__table th { width: 40%; padding-right: 24px; }
.contacts-page__table td { width: 30%; padding-right: 16px; }
.contacts-page__table tr:last-child th,
.contacts-page__table tr:last-child td { border-bottom: 0; }
.contacts-page__legal-links {
    display: grid;
    gap: 31px;
    width: 100%;
    margin-top: clamp(82px, calc(54px + 2.917vw), 110px);
    padding-top: clamp(42px, calc(20px + 2.292vw), 64px);
    border-top: 1px solid #8e9499;
    font-size: 15px;
    line-height: 1.42;
}
.contacts-page__legal-links p {
    width: min(500px, 100%);
    margin: 0;
    color: #59636d;
}
.contacts-page__legal-label {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Reused first-visit component. */
.page-contacts .first-visit {
    padding: 0 0 clamp(70px, calc(23px + 4.896vw), 117px);
}
.page-contacts .first-visit .section-head {
    margin-bottom: clamp(38px, calc(18px + 2.083vw), 58px);
}
.page-contacts .first-visit h2 {
    font-size: clamp(40px, calc(37px + .3125vw), 43px);
    line-height: 1.08;
}
.page-contacts .first-visit .text-link {
    font-size: 13px;
    font-weight: 700;
}
.page-contacts .first-visit-video {
    min-height: clamp(500px, calc(200px + 31.25vw), 800px);
    height: clamp(500px, calc(200px + 31.25vw), 800px);
}

/* Existing Bitrix appointment form. */
.contacts-appointment {
    padding: 0 0 clamp(65px, calc(2px + 6.563vw), 128px);
}
.contacts-appointment .appointment-heading {
    width: 50%;
    max-width: 700px;
    margin-bottom: clamp(33px, calc(8px + 2.604vw), 58px);
}
.contacts-appointment h2 {
    margin-bottom: 28px;
    font-size: clamp(40px, calc(37px + .3125vw), 43px);
    line-height: 1.08;
}
.contacts-appointment .appointment-lead {
    max-width: 705px;
    font-size: 14px;
    line-height: 1.55;
}
.contacts-appointment .appointment-collage {
    height: 700px;
    min-height: 700px;
    background-image: url('/local/templates/clinic/assets/images/contacts-form-collage.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.contacts-appointment .clinic-webform .form-question--consent + .col-12 {
    margin-top: clamp(88px, calc(68px + 2.083vw), 108px);
}

/* Interactive map and footer transition. */
.contacts-map-section {
    padding: clamp(65px, calc(52px + 1.354vw), 78px) 0 clamp(36px, calc(-56px + 9.583vw), 128px);
}
.contacts-map-section .contacts-head {
    margin-bottom: clamp(43px, calc(35px + .833vw), 51px);
}
.contacts-map-section .map-frame {
    height: clamp(433px, calc(173px + 27.083vw), 693px);
    aspect-ratio: auto;
}

/* Adaptive range: 375–959.98 px. */
@media (min-width: 375px) and (max-width: 959.98px) {
    .page-contacts .clinic-container { width: calc(100% - 48px); }
    .contacts-page__breadcrumbs {
        gap: 9px;
        height: 61px;
        font-size: 14px;
        white-space: nowrap;
    }
    .contacts-page__intro {
        width: 100%;
        padding-bottom: clamp(88px, calc(54px + 9.067vw), 140px);
    }
    .contacts-page__intro h1 {
        margin: clamp(42px, calc(35.6px + 1.707vw), 52px) 0 clamp(36px, calc(27.65px + 2.227vw), 49px);
        font-size: clamp(20px, calc(7.16px + 3.423vw), 40px);
        line-height: 1.2;
    }
    .contacts-page__summary {
        font-size: clamp(16px, calc(13.43px + .685vw), 20px);
        line-height: 1.4;
    }
    .contacts-page__summary p {
        margin-bottom: clamp(30px, calc(24.86px + 1.37vw), 38px);
    }
    .contacts-page__schedule {
        margin-top: clamp(8px, calc(-11.27px + 5.137vw), 38px);
        padding-top: 40px;
    }
    .contacts-page__schedule h2 {
        margin-bottom: clamp(31px, calc(22px + 2.398vw), 45px);
        font-size: clamp(18px, calc(16.72px + .342vw), 20px);
    }
    .contacts-page__table-wrap {
        width: calc(100% + 24px);
        overflow: hidden;
    }
    .contacts-page__table {
        width: 100%;
        font-size: 15px;
        line-height: 1.4;
    }
    .contacts-page__table th,
    .contacts-page__table td {
        padding: 13px 0 12px;
    }
    .contacts-page__table th { width: 64%; padding-right: 16px; }
    .contacts-page__table td { width: 36%; padding-right: 0; }
    .contacts-page__table td:nth-child(3) { display: none; }
    .contacts-page__legal-links {
        gap: 28px;
        width: 100%;
        margin-top: clamp(40px, calc(36.15px + 1.027vw), 46px);
        padding-top: 0;
        border-top: 0;
        font-size: 15px;
        line-height: 1.48;
    }

    .page-contacts .first-visit {
        padding: 0 0 clamp(48px, calc(33.86px + 3.768vw), 70px);
    }
    .page-contacts .first-visit .section-head {
        display: block;
        margin-bottom: clamp(24px, calc(15px + 2.398vw), 38px);
    }
    .page-contacts .first-visit h2 {
        margin-bottom: clamp(16px, calc(.58px + 4.11vw), 40px);
        font-size: clamp(22px, calc(10.44px + 3.082vw), 40px);
        line-height: 1.25;
    }
    .page-contacts .first-visit .text-link {
        font-size: clamp(16px, calc(17.93px - .514vw), 13px);
        line-height: 1.4;
    }
    .page-contacts .first-visit-video {
        min-height: clamp(327px, calc(215.86px + 29.623vw), 500px);
        height: clamp(327px, calc(215.86px + 29.623vw), 500px);
    }

    .contacts-appointment {
        padding: 0 0 clamp(48px, calc(37.08px + 2.911vw), 65px);
    }
    .contacts-appointment .appointment-heading {
        width: 100%;
        max-width: none;
        margin-bottom: clamp(24px, calc(18.22px + 1.541vw), 33px);
    }
    .contacts-appointment h2 {
        margin-bottom: clamp(16px, calc(8.29px + 2.055vw), 28px);
        font-size: clamp(24px, calc(13.72px + 2.74vw), 40px);
        line-height: 1.25;
    }
    .contacts-appointment .appointment-lead {
        font-size: clamp(16px, calc(14.72px + .342vw), 18px);
        line-height: 1.45;
    }
    .contacts-desktop-break { display: none; }
    .contacts-appointment .appointment-layout {
        display: flex;
        flex-direction: column-reverse;
        gap: 20px;
    }
    .contacts-appointment .appointment-collage {
        min-height: 0;
        height: auto;
        aspect-ratio: 327 / 328;
    }
    /* Override the generic tablet form sizing so the 375 layout matches the supplied form. */
    .contacts-appointment .clinic-webform .form-question:not(.form-question--consent) {
        height: 74px;
    }
    .contacts-appointment .clinic-webform .form-question:not(.form-question--consent) + .form-question:not(.form-question--consent) {
        margin-top: 16px;
    }
    .contacts-appointment .clinic-webform .form-label {
        position: static;
        top: auto;
        margin: 0 0 2px;
        font-size: 15px;
        line-height: 20px;
    }
    .contacts-appointment .clinic-webform input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
    .contacts-appointment .clinic-webform textarea,
    .contacts-appointment .clinic-webform select {
        height: 52px;
        min-height: 52px;
        padding: 8px 0 7px;
        font-size: 20px;
        line-height: 31px;
    }
    .contacts-appointment .clinic-consent {
        font-size: 14px;
        line-height: 20px;
    }
    .contacts-appointment .clinic-webform .form-question--consent {
        margin-top: 18px;
    }
    .contacts-appointment .clinic-webform .form-question--consent + .col-12 {
        margin-top: 38px;
    }
    .contacts-appointment .clinic-webform .clinic-btn--wide {
        height: 73px;
        min-height: 73px;
        font-size: 18px;
    }

    .contacts-map-section {
        padding: clamp(28px, calc(4.87px + 6.164vw), 64px) 0 24px;
    }
    .contacts-map-section .contacts-head {
        display: block;
        margin-bottom: 25px;
    }
    .contacts-map-section .contacts-head h2 {
        margin-bottom: 16px;
        font-size: 18px;
        line-height: 1.39;
    }
    .contacts-map-section .contacts-head > a { font-size: 18px; }
    .contacts-map-section .map-frame {
        height: clamp(327px, calc(258.92px + 18.151vw), 433px);
        aspect-ratio: auto;
    }
}

/* Compact mobile: below 375 px. */
@media (max-width: 374.98px) {
    .page-contacts .clinic-container { width: calc(100% - 32px); }
    .contacts-page__table { font-size: 14px; }
    .contacts-page__table-wrap { width: calc(100% + 16px); }
}
