/* ===========================================
   Блок: Герой "Клиники-партнеры"
   BEM: clinics-hero
   =========================================== */

.clinics-hero {
    padding-top: 180px;
    position: relative;
    margin-bottom: 70px;
}

.clinics-hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 786px;
    background: linear-gradient(180deg, #c4e2ff 0%, rgba(255, 255, 255, 0) 100%);
    z-index: -1;
}

.clinics-hero__inner {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* --- Шапка секции --- */

.clinics-hero__header {
    display: flex;
    flex-direction: column;
    gap: 26px;
    position: relative;
    z-index: 10;
}

/* --- Заголовки --- */

.clinics-hero__heading {
    text-align: center;
}

.clinics-hero__title {
    margin: 0;
    font-family:
        "Montserrat",
        system-ui,
        -apple-system,
        sans-serif;
    font-weight: 700;
    font-size: 26px;
    line-height: 1.7;
    text-transform: uppercase;
    color: #28314d;
    text-align: center;
}

.clinics-hero__subtitle {
    margin: 0;
    font-family:
        "Montserrat",
        system-ui,
        -apple-system,
        sans-serif;
    font-weight: 700;
    font-size: 26px;
    line-height: 1.7;
    text-transform: uppercase;
    color: #28314d;
    text-align: center;
}

/* --- Поиск по городу --- */

.clinics-hero__search-wrapper {
    display: flex;
    justify-content: flex-end;
    position: relative;
    z-index: 3;
}

.clinics-hero__search {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 414px;
    height: 50px;
    padding: 6px 6px 6px 25px;
    border: 1.5px solid #5d72b7;
    border-radius: 30px;
    position: relative;
    background: transparent;
    z-index: 3;
}

.clinics-hero__search-pin {
    flex-shrink: 0;
    width: 21px;
    height: 26px;
    display: block;
}

/* --- Поле выбора города --- */

.clinics-hero__city-input {
    flex: 1;
    min-width: 0;
    background: none;
    border: none;
    padding: 0;
    outline: none;
    font-family:
        "Montserrat",
        system-ui,
        -apple-system,
        sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.5;
    color: #5d72b7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    appearance: none;
    -webkit-appearance: none;
}

.clinics-hero__city-input::placeholder {
    color: #8ea0d6;
}

.clinics-hero__city-input::-webkit-search-cancel-button,
.clinics-hero__city-input::-webkit-search-decoration {
    -webkit-appearance: none;
}

.clinics-hero__city-input[aria-expanded="true"] {
    cursor: text;
}

/* --- Выпадающий список городов --- */

.clinics-hero__city-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: #fff;
    border-radius: 16px;
    padding: 8px 0;
    margin: 0;
    list-style: none;
    z-index: 10;
    box-shadow: 0 8px 24px rgba(93, 114, 183, 0.15);
    max-height: 260px;
    overflow-y: auto;
}

.clinics-hero__city-dropdown--open {
    display: block;
}

.clinics-hero__city-option[hidden] {
    display: none;
}

.clinics-hero__city-option {
    padding: 10px 20px;
    font-family:
        "Montserrat",
        system-ui,
        -apple-system,
        sans-serif;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.4;
    color: #28314d;
    cursor: pointer;
    transition:
        background 0.15s ease,
        color 0.15s ease;
}

.clinics-hero__city-option:hover {
    background: #eef2ff;
    color: #5d72b7;
}

.clinics-hero__city-option--active {
    color: #5d72b7;
    font-weight: 600;
}

.clinics-hero__search-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    height: 38px;
    padding: 0 20px;
    background: #5d72b7;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.clinics-hero__search-btn:hover {
    background: #4a5fa6;
}

.clinics-hero__search-btn:focus {
    outline: none;
}

.clinics-hero__search-icon {
    flex-shrink: 0;
    display: block;
}

.clinics-hero__search-btn-text {
    font-family:
        "Montserrat",
        system-ui,
        -apple-system,
        sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    color: #fdffff;
    white-space: nowrap;
}

/* --- Карта --- */

.clinics-hero__map {
    position: relative;
    z-index: 1;
    border-radius: 40px;
    overflow: hidden;
}

.clinics-hero__map-container {
    width: 100%;
    height: 360px;
    background: #dbe9f5;
    position: relative;
    z-index: 1;
}

.clinics-hero__map-container .leaflet-tile-pane {
    filter: brightness(1.1) contrast(1) saturate(0.85);
}

/* --- Поиск услуг на странице клиник --- */

.clinics-services-search {
    margin-bottom: 26px;
}

.clinics-services-search__title {
    margin: 0 0 16px;
    font-family:
        "Montserrat",
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-weight: 700;
    font-size: 26px;
    line-height: 1.7;
    text-transform: uppercase;
    color: #28314d;
}

.clinics-services-search__form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.clinics-services-search__field {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 50px;
    padding: 0 7px 0 32px;
    border: 2px solid #d0d4e5;
    border-radius: 999px;
    box-sizing: border-box;
    background-color: #fff;
}

.clinics-services-search__input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
    border: none;
    border-radius: 0 !important;
    outline: none !important;
    font-size: 16px;
    font-weight: 500;
    line-height: 150%;
    color: #28314d;
}

.clinics-services-search__button {
    display: inline-flex;
    flex: 1 1 30%;
    align-items: center;
    gap: 8px;
    padding: 12px 38px !important;
    border: none;
    border-radius: 999px;
    background-color: #28314d !important;
    color: #ffffff;
    font-size: 22px !important;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.clinics-services-search__button--inside {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    height: 38px;
    padding: 0 20px !important;
    background-color: #28314d !important;
    font-size: 18px;
}

.clinics-services-search__button:hover,
.clinics-services-search__button--inside:hover {
    background-color: #5d72b7 !important;
}

.clinics-services-search__icon {
    display: block;
}

.clinics-services-search__autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    margin: 0;
    padding: 0;
    list-style: none;
    max-height: 400px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.clinics-services-search__autocomplete-item {
    padding: 12px 20px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.clinics-services-search__autocomplete-item:last-child {
    border-bottom: none;
}

.clinics-services-search__autocomplete-item:hover {
    background-color: #f8f8f8;
}

.clinics-services-search__autocomplete-item--loading,
.clinics-services-search__autocomplete-item--empty,
.clinics-services-search__autocomplete-item--error {
    cursor: default;
    color: #666;
    font-style: italic;
}

.clinics-services-search__autocomplete-item--loading:hover,
.clinics-services-search__autocomplete-item--empty:hover,
.clinics-services-search__autocomplete-item--error:hover {
    background-color: #fff;
}

.clinics-services-search__autocomplete-item--error {
    color: #d32f2f;
}

.clinics-services-search__services {
    margin-bottom: 20px;
}

.clinics-services-search__services-list {
    display: flex;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.clinics-services-search__button-text {
    font-size: 16px;
}

.clinics-services-search__services-item {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: 150%;
}

.clinics-services-search__services-link {
    display: inline-flex;
    align-items: center;
    padding: 4px 4px 4px 24px;
    border-radius: 50px;
    background: #dbe1e8;
    color: #3c3d42;
    text-decoration: none;
    transition:
        background-color 0.3s ease,
        color 0.3s ease;
}

.clinics-services-search__services-link:hover {
    background-color: #28314d;
    color: #fdffff;
}

.clinics-services-search__services-text {
    display: inline-flex;
    padding-right: 16px;
    transform: translateY(1px);
    font-size: 15px;
}

.clinics-services-search__services-icon {
    width: 28px;
    height: 28px;
}

/* ===========================================
   Адаптивность
   =========================================== */

@media (max-width: 768px) {
    .clinics-hero {
        padding-top: 120px;
        margin-bottom: 40px;
    }

    .clinics-services-search__services {
        margin-bottom: 34px;
    }

    .clinics-hero__inner {
        gap: 22px;
    }

    .clinics-hero__header {
        gap: 40px;
    }

    .clinics-hero__heading {
        display: flex;
        flex-direction: column;
        gap: 15px;
        text-align: left;
    }

    .clinics-hero__title {
        font-size: 26px;
        line-height: 1.3;
        text-align: left;
    }

    .clinics-hero__subtitle {
        font-size: 18px;
        font-weight: 500;
        line-height: 1.4;
        text-transform: none;
        text-align: left;
    }

    .clinics-hero__search-wrapper {
        justify-content: flex-start;
    }

    .clinics-hero__search {
        width: 100%;
        max-width: 100%;
    }

    .clinics-hero__search-btn {
        position: absolute;
        right: 4px;
        top: 50%;
        transform: translateY(-50%);
        width: 40px;
        height: 40px;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
    }

    .clinics-hero__search-btn-text {
        display: none;
    }

    .clinics-hero__map {
        border-radius: 20px;
    }

    .clinics-hero__map-container {
        height: 200px;
    }

    .clinics-services-search {
        margin-bottom: 15px;
    }

    .clinics-services-search__title {
        margin-bottom: 30px;
        font-size: 20px;
        line-height: 120%;
    }

    .clinics-services-search__button-text {
        display: none;
    }

    .clinics-services-search__button--inside {
        width: 40px;
        height: 40px;
        padding: 10px !important;
        border-radius: 100%;
    }

    .clinics-services-search__field {
        height: 52px;
        padding: 6px;
    }

    .clinics-services-search__input {
        padding-left: 14px;
        font-size: 16px;
    }

    .clinics-services-search__services-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 11px;
    }

    .clinics-services-search__services-item {
        font-size: 14px;
    }

    .clinics-services-search__services-link {
        padding-left: 10px;
        padding-top: 2px;
    }

    .clinics-services-search__services-icon {
        width: 27px;
        height: 27px;
    }

    .clinics-services-search__services-text {
        padding: 0 13px 0 10px;
        font-size: 12px;
    }
}
