/*=======================================================================================BASE CSS==============================================================================*/
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: #232323;
    background: #fafafa;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

button, input, select {
    font: inherit;
}

/* ==========================================
   ОБЩИЙ КОМПОНЕНТ: ПАНЕЛЬ ФИЛЬТРОВ
   ========================================== */
.filter-toolbar {
    background: #f4f4f4;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Селект слева, поиск справа */
    flex-wrap: wrap;
    gap: 15px;
}

/* Обертка для селекта */
.filter-select-wrapper {
    position: relative;
    display: inline-block;
    width: 250px;
    flex-shrink: 0;
}

/* Сам селект */
.filter-select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #232323;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    padding-right: 32px;
    outline: none;
}

.filter-select-wrapper::after {
    content: "▼";
    font-size: 10px;
    color: #232323;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Поиск */
.filter-search-box {
    position: relative;
    flex-grow: 1;
    max-width: 400px;
}

.filter-search-box input {
    padding: 10px 15px 10px 40px;
    border: 1px solid #ddd;
    border-radius: 6px;
    width: 100%;
    outline: none;
    font-size: 14px;
    background: #fff;
    color: #232323;
}

.filter-search-box input:focus,
.filter-select:focus {
    border-color: #232323;
    outline: 2px solid rgb(35 35 35 / 12%);
}

.filter-search-box svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    fill: #999;
    pointer-events: none;
}

/* Адаптив для группы селектов */
@media (max-width: 768px) {
    .filter-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .filter-toolbar__group {
        flex-direction: column;
        width: 100%;
    }

    .filter-select-wrapper {
        width: 100%;
    }

    .filter-search-box {
        width: 100%;
        max-width: none;
    }
}

/* ==========================================
   ОБЩИЙ КОМПОНЕНТ: ПАНЕЛЬ ФИЛЬТРОВ
   ========================================== */
   
   /*=======================================================================================CATALOG CSS==============================================================================*/
   
   /* Сюда переносим всё, что касается каталога: сетка, карточки услуг, пагинация, тулбар */
.catalog {
    width: 100%;
    padding: 40px 0;
}

.catalog__container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Категории */
.catalog__categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.category-button {
    display: flex;
    min-width: 100px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: 1px solid #efefef;
    border-radius: 8px;
    color: #232323;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    text-align: center;
    transition: all 0.2s ease;
}

.category-button:hover {
    background: #efefef;
}

.category-button.is-active {
    color: #fafafa;
    background: #232323;
    border-color: #232323;
}

/* Тулбар (тот самый, с плашкой) */
.catalog__toolbar--boxed {
    background: #f4f4f4;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 15px;
}

.catalog__select-wrapper {
    position: relative;
    display: inline-block;
    min-width: 220px;
    flex-shrink: 0;
}

.catalog__select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #efefef;
    border-radius: 6px;
    color: #232323;
    background: #fafafa;
    cursor: pointer;
    font-size: 14px;
    padding-right: 32px;
}

.catalog__select-wrapper::after {
    content: "▼";
    font-size: 10px;
    color: #232323;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Поиск */
.search-box {
    position: relative;
    flex-grow: 1;
    max-width: 400px;
    margin-left: auto;
}

.search-box input {
    padding: 10px 15px 10px 40px;
    border: 1px solid #efefef;
    border-radius: 6px;
    width: 100%;
    outline: none;
    font-size: 14px;
    background: #fafafa;
    color: #232323;
}

.search-box input:focus, .catalog__select:focus {
    border-color: #232323;
    outline: 2px solid rgb(35 35 35 / 12%);
}

.search-box svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    fill: #999;
    pointer-events: none;
}

/* Карточки */
.catalog__counter {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 600;
}

.catalog__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.service-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #efefef;
    border-radius: 12px;
    background: #fafafa;
    box-shadow: 0 2px 10px rgb(0 0 0 / 3%);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

.service-card__image {
    width: 100%;
    height: 160px;
    background: #efefef;
}

.service-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-card__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 15px;
}

.service-card__category {
    margin: 0 0 8px;
    color: #999;
    font-size: 11px;
    text-transform: uppercase;
}

.service-card__title {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.service-card__description {
    flex: 1;
    margin: 0 0 15px;
    color: #666;
    font-size: 13px;
    line-height: 1.4;
}

.service-card__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.service-card__price {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.service-card__link {
    display: flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border: 1px solid #efefef;
    border-radius: 50%;
    background: #efefef;
    transition: all 0.2s ease;
}

.service-card__link svg {
    width: 14px;
    height: 14px;
    fill: #232323;
}

.service-card__link:hover {
    border-color: #232323;
    background: #232323;
}

.service-card__link:hover svg {
    fill: #fafafa;
}

/* Пагинация */
.catalog__pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border: 1px solid #efefef;
    border-radius: 8px;
    background: #fafafa;
    color: #232323;
    cursor: pointer;
}

.pagination-btn.is-active {
    background: #232323;
    color: #fafafa;
    border-color: #232323;
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #efefef;
}

/* Адаптив каталога */
@media (max-width: 992px) {
    .catalog__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .catalog__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .catalog__toolbar--boxed {
        flex-direction: column;
        align-items: stretch;
    }

    .catalog__select, .search-box {
        width: 100%;
        max-width: none;
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .catalog__grid {
        grid-template-columns: 1fr;
    }
}

/*=======================================================================================CATEGORY CSS==============================================================================*/

/* ==========================================
   ХЛЕБНЫЕ КРОШКИ
   ========================================== */
.breadcrumbs {
    margin-bottom: 24px;
    font-size: 14px;
    color: #777;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.breadcrumbs a {
    color: #777;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: #232323;
}

.breadcrumbs__sep {
    margin: 0 8px;
    color: #ccc;
}

.breadcrumbs__current {
    color: #232323;
    /* Текущая страница темнее */
    font-weight: 500;
}

/* ==========================================
   ОСНОВНОЙ КОНТЕНТ
   ========================================== */
.container {
    max-width: 1190px;
    margin: 0px auto;
    padding: 0px 15px;
    background-color: #fafafa;
    border-radius: 12px;
}

.block-title {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 24px 0;
    color: #232323;
}

.services-list {
    list-style: none;
    padding: 0;
    margin: 0 0 50px 0;
    border-top: 1px solid #eee;
}

.service-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    font-size: 16px;
    transition: background-color 0.2s ease;
}

.service-item:nth-child(odd) {
    background-color: #f9f9f9;
}

.service-item:hover {
    background-color: #f0f0f0;
}

.service-name {
    flex: 1;
    padding-right: 20px;
}

.service-price {
    font-weight: 600;
    white-space: nowrap;
}

/* Интересные факты */
.category-facts {
    margin-bottom: 20px;
}

.fact-block {
    margin-bottom: 30px;
}

.fact-block:last-child {
    margin-bottom: 0;
}

.fact-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #232323;
}

.fact-text {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        margin: 20px;
        padding: 24px;
    }

    .block-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .container {
        margin: 10px;
        padding: 16px;
    }

    .service-item {
        padding: 12px 10px;
        font-size: 14px;
    }

    .fact-title {
        font-size: 18px;
    }

    .fact-text {
        font-size: 14px;
    }
}

/*=======================================================================================DOCTORS CSS==============================================================================*/

/* ==========================================
   СТРАНИЦА ВРАЧЕЙ (Карточки и сетка)
   ========================================== */

.specialists-section {
    width: min(100% - 60px, 1440px);
    margin: 0 auto;
    padding: 12px 0 50px;
}

.specialists-container {
    width: 100%;
    max-width: 1190px;
    margin: 0 auto;
    padding: 0 15px;
}

.section-title {
    margin: 0 0 26px;
    font-size: clamp(27px, 3vw, 32px);
    font-weight: 400;
    line-height: 1.2;
}

.filter-toolbar__group {
    display: flex;
    gap: 12px;
}

/* Сетка врачей */
.specialists-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
}

.specialist-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border-radius: 13px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .12);
    transition: .2s ease;
}

.specialist-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 18px rgba(0, 0, 0, .14);
}

/* Фото и инфо */
.specialist-photo {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: #eee;
}

.specialist-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.photo-placeholder {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: #c5c5c5;
    font: 48px Arial, sans-serif;
}

.specialist-role {
    position: absolute;
    left: 13px;
    bottom: 13px;
    padding: 4px 9px;
    border-radius: 3px;
    background: rgba(255, 255, 255, .95);
    font-size: 10px;
    text-transform: uppercase;
}

.specialist-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 27px 16px 17px;
}

.specialist-name {
    margin: 0 0 13px;
    font-size: 16px;
    font-weight: 700;
}

.specialist-specialty {
    margin: 0 0 13px;
    color: #77716f;
    font-size: 13px;
}

.specialist-experience {
    margin: 0 0 15px;
    font-size: 13px;
}

.specialist-description {
    margin: 0 0 20px;
    color: #77716f;
    font-size: 12px;
}

.specialist-button {
    min-height: 40px;
    margin-top: auto;
    padding: 0 24px;
    border: none;
    border-radius: 7px;
    background: #222;
    color: #fff;
    font-family: inherit;
    /* Убрал Georgia для единого стиля */
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}

.specialist-button:hover {
    background: #444;
}

/* Скрываем попап, пока он не нужен */
.booking-modal {
    display: none !important;
}

/* ==========================================
   АДАПТИВ СЕТКИ ВРАЧЕЙ
   ========================================== */
@media (max-width: 1100px) {
    .specialists-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 22px;
    }
}

@media (max-width: 760px) {
    .specialists-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (max-width: 420px) {
    .specialists-grid {
        grid-template-columns: 1fr;
    }
}

/*=======================================================================================HEADER CSS==============================================================================*/

/* ==========================================
   HERO-БЛОК (ШАПКА СТРАНИЦЫ)
   ========================================== */
.services-hero {
    width: 100%;
    background-color: #fafafa;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 400px;
}

/* Контейнер для текста */
.services-hero__container {
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
    z-index: 2;
    max-width: 1190px;
}

/* Текстовая часть */
.services-hero__content {
    width: 55%;
}

/* Хлебные крошки */
.services-hero__breadcrumbs {
    font-size: 13px;
    color: #999;
    margin-bottom: 24px;
}

.services-hero__breadcrumbs a {
    color: #999;
    text-decoration: none;
    transition: color 0.2s;
}

.services-hero__breadcrumbs a:hover {
    color: #232323;
}

.services-hero__breadcrumbs span {
    margin: 0 4px;
}

/* Заголовок */
.services-hero__title {
    font-size: 56px;
    font-weight: 700;
    color: #232323;
    line-height: 1.1;
    margin: 0 0 24px 0;
    letter-spacing: -1px;
}

/* Описание */
.services-hero__desc {
    font-size: 18px;
    color: #555;
    line-height: 1.5;
    max-width: 480px;
    margin: 0;
}

/* Картинка справа */
.services-hero__image-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    width: 45%;
    height: 100%;
    z-index: 1;
}

.services-hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Эффект "плавного перехода" слева от картинки */
.services-hero__image-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0px;
    width: 180px;
    height: 100%;
    background: linear-gradient(90deg, #fafafa 0%, rgba(250, 250, 250, 0) 100%);
    z-index: 1;
    pointer-events: none;
}

/* ==========================================
   АДАПТИВНОСТЬ ШАПКИ
   ========================================== */

/* Планшеты */
@media (max-width: 992px) {
    .services-hero {
        flex-direction: column;
        min-height: auto;
    }

    .services-hero__container {
        padding: 40px 20px;
    }

    .services-hero__content {
        width: 100%;
        padding: 0 0 40px 0;
    }

    .services-hero__title {
        font-size: 42px;
    }

    .services-hero__image-wrapper {
        position: relative;
        width: 100%;
        height: 300px;
    }

    .services-hero__image-wrapper::before {
        display: none;
        /* Убираем градиент на мобилках */
    }
}

/* Телефоны */
@media (max-width: 576px) {
    .services-hero__title {
        font-size: 32px;
    }

    .services-hero__desc {
        font-size: 16px;
    }
}

   /*=======================================================================================RANDOM-DOCTORS CSS==============================================================================*/
   
   .random-doctors {
    max-width: 1190px;
    margin: 0px auto;
    padding: 0px 15px;
}

.random-doctors__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
}

.random-doctors__title {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    color: #232323;
}

.random-doctors__link {
    font-size: 14px;
    color: #777;
    text-decoration: none;
    transition: color 0.2s;
}

.random-doctors__link:hover {
    color: #232323;
}

.random-doctors__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

/* Карточка врача (мини-версия) */
.mini-doctor-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mini-doctor-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.mini-doctor-card__photo {
    position: relative;
    width: 100%;
    height: 200px;
    background: #eee;
}

.mini-doctor-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    display: block;
}

/* Плашка с ролью поверх фото */
.mini-doctor-card__role {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    color: #232323;
}

.mini-doctor-card__content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.mini-doctor-card__name {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: #232323;
}

.mini-doctor-card__specialty {
    font-size: 13px;
    color: #555;
    margin: 0 0 12px 0;
}

.mini-doctor-card__experience {
    font-size: 13px;
    color: #232323;
    margin: 0 0 12px 0;
}

.mini-doctor-card__desc {
    font-size: 13px;
    color: #777;
    line-height: 1.4;
    margin: 0 0 16px 0;
    flex-grow: 1;
}

.mini-doctor-card__btn {
    display: inline-block;
    padding: 10px 16px;
    background: #232323;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    text-align: center;
    transition: background 0.2s;
    cursor: pointer;
    border: none;
    width: fit-content;
}

.mini-doctor-card__btn:hover {
    background: #444;
}

/* Адаптив */
@media (max-width: 992px) {
    .random-doctors__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .random-doctors__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .random-doctors__grid {
        grid-template-columns: 1fr;
    }
}
   
      /*=======================================================================================RANDOM-SERVICES CSS==============================================================================*/
      
      .random-services {
    max-width: 1190px;
    margin: 0px auto;
    padding: 0px 15px;
}

.random-services__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
}

.random-services__title {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    color: #232323;
}

.random-services__link {
    font-size: 14px;
    color: #777;
    text-decoration: none;
    transition: color 0.2s;
}

.random-services__link:hover {
    color: #232323;
}

.random-services__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

/* Мини-карточка */
.mini-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mini-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.mini-card__image {
    width: 100%;
    height: 140px;
    background: #eee;
}

.mini-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mini-card__content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.mini-card__title {
    font-size: 15px;
    font-weight: 500;
    margin: 0 0 12px 0;
    line-height: 1.4;
    flex-grow: 1;
}

.mini-card__price {
    font-size: 15px;
    font-weight: 700;
    color: #232323;
}

/* Адаптив */
@media (max-width: 992px) {
    .random-services__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .random-services__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .random-services__grid {
        grid-template-columns: 1fr;
    }
}
