:root {
    --accent: #1fc602;
    --card: #fff;
    --muted: #777;
    --radius: 16px;
}

:root {
    --h1-size: 42px;
    --h2-size: 28px;
    --h3-size: 18px;
}


h1,
h2,
h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: #111;
    margin: 0;
    line-height: 1.2;
}

.page-title {
    font-size: var(--h1-size);
}

/* Заголовок + счётчик */
.results-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    margin-bottom: 30px;
}

.results-head h1 {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#countInfo {
    font-size: 14px;
    color: var(--muted);
}

/* ====== ПОИСК + ФИЛЬТРЫ ====== */
.controls {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    flex-wrap: nowrap;
}

/* Поиск */
.search-big {
    flex: 1;
    margin: 0;
}

.search-big input {
    width: 100%;
    padding: 12px 18px;
    border-radius: 25px;
    border: 2px solid #ddd;
    font-size: 14px;
    height: 46px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.search-big:hover input {
    border-color: var(--accent);
    background-color: rgba(31, 198, 2, 0.05);
}

.search-big input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(31, 198, 2, 0.1);
    background-color: rgba(31, 198, 2, 0.05);
}

/* Фильтры */
.custom-select {
    position: relative;
    font-family: inherit;
    flex: 0 0 220px;
    height: 46px;
    cursor: pointer;
}

.select-selected {
    background: #fff;
    border: 2px solid var(--accent);
    border-radius: 25px;
    padding: 0 15px;
    font-size: 14px;
    font-weight: 500;
    color: #222;
    user-select: none;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.select-selected:after {
    content: "";
    position: absolute;
    top: 50%;
    right: 15px;
    border: 6px solid transparent;
    border-top-color: var(--accent);
    transform: translateY(-30%);
    pointer-events: none;
    transition: transform 0.3s ease;
}

.custom-select.active .select-selected:after {
    transform: translateY(-70%) rotate(180deg);
}

.select-items {
    position: absolute;
    top: 105%;
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid var(--accent);
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    z-index: 99;
    max-height: 220px;
    overflow-y: auto;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.custom-select.active .select-items {
    opacity: 1;
    transform: translateY(0);
}

.select-items div {
    padding: 10px 15px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.select-items div:hover {
    background: var(--accent);
    color: #fff;
}

.select-hide {
    display: none;
}

/* активный */
.custom-select.active .select-selected {
    border-radius: 25px 25px 0 0;
    border-bottom: none;
}

/* Кнопка сброса */
.controls .reset-btn {
    flex: 0 0 220px;
    height: 46px;
    border: 2px solid var(--accent);
    border-radius: 25px;
    background: transparent;
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.controls .reset-btn:hover {
    background: var(--accent);
    color: #fff;
}

/* ====== СЕТКА КАРТОЧЕК ====== */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 карточки в ряд */
    gap: 25px;
    margin-top: 20px;
}

/* Карточка врача */
.doctor-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    margin-top: 0;
}

.doctor-card.show {
    opacity: 1;
    transform: translateY(0);
}

.doctor-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
    border-color: var(--accent);
}

/* Фото */

.doctor-card .img-wrapper {
    width: 100% !important;
    height: 280px !important;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    /* outline: 1px solid red; */
}

.doctor-card .img-wrapper img {
    /* width: 100%; */
    /* width: auto; */
    /* height: 100%; */
    height: auto;
    object-fit: cover;
    object-position: top;
    border-bottom: 1px solid #eee;
    transition: transform 0.4s ease;
    position: absolute;
    left: 0;
}

.doctor-card .img-wrapper img.aladin {
    top: -50px;
    transform: scale(.8);
}



.doctor-card .img-wrapper img.aladin:hover {
    transform: scale(.85);
}
/* .doctor-card .img-wrapper img.novikovaMA {
    top: -50px;
    
} */

.doctor-card .img-wrapper img.smolin {
    top: -50px;

    transform: scale(.8);
}

.doctor-card .img-wrapper img.smolin:hover {
    transform: scale(.85);
}

.doctor-card .img-wrapper img.titova {
    top: -50px;
    transform: scale(.8);
}

.doctor-card .img-wrapper img.titova:hover {
    transform: scale(.85);
}

.doctor-card .img-wrapper img.smikova {
    top: -50px;
    transform: scale(.8);
}

.doctor-card .img-wrapper img.smikova:hover {
    transform: scale(.85);
}

.doctor-card .img-wrapper img.dominuk {
    top: -50px;
    transform: scale(.8);
}

.doctor-card .img-wrapper img.dominuk:hover {
    transform: scale(.85);
}

.doctor-card .img-wrapper img.kuzmenko {
    top: -50px;
    transform: scale(.8);
}

.doctor-card .img-wrapper img.kuzmenko:hover {
    transform: scale(.85);
}

.doctor-card .img-wrapper img.posukonkin {
    top: -50px;
    transform: scale(1);
}

.doctor-card .img-wrapper img.posukonkin:hover {
    transform: scale(1.05);
}

.doctor-card .img-wrapper img.pudovkina {
    top: -50px;
    transform: scale(.8);
}

.doctor-card .img-wrapper img.pudovkina:hover {
    transform: scale(.85);
}

.doctor-card .img-wrapper img.barkevich {
    top: -36px;
    transform: scale(.8);
}
.doctor-card .img-wrapper img.barkevich:hover {
    /* border-radius: 20px; */
    transform: scale(.85);
}
.doctor-card .img-wrapper img.pashinceva {
    top: 20px;
    transform: scale(1);
}
.doctor-card .img-wrapper img.pashinceva:hover {
    transform: scale(1.05);
}

.doctor-card .img-wrapper img.malihin {
    top: -45px;
    transform: scale(.8);
}

.doctor-card .img-wrapper img.malihin:hover {
    transform: scale(.85);
}

.doctor-card .img-wrapper img.lebedeva {
    top: -45px;
    transform: scale(.8);
}

.doctor-card .img-wrapper img.lebedeva:hover {
    transform: scale(.85);
}

.doctor-card .img-wrapper img.zhurbina {
    top: -45px;
    transform: scale(.8);
}

.doctor-card .img-wrapper img.zhurbina:hover {
    transform: scale(.85);
}

.doctor-card .img-wrapper img.novikovaMA {
    top: -70px;
    transform: scale(.8);
}
novikovaMA
.doctor-card .img-wrapper img.novikovaMA:hover {
    transform: scale(.9);
}

.doctor-card .img-wrapper img.shahov {
    top: -45px;
    transform: scale(.8);
}

.doctor-card .img-wrapper img.shahov:hover {
    transform: scale(.85);
}

/* shahov */
.doctor-card:hover img {
    transform: scale(1.05);
}

/* Имя */
.doctor-card h3 {
    font-size: 15px;
    margin: 10px 12px 4px;
    text-align: left;
}

/* Теги */
.doctor-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin: 0 12px 6px;
}

.doctor-tags span {
    background: #f0f0f0;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    color: #444;
    font-weight: 500;
    transition: background 0.3s ease;
}

/* Доп. инфо */
.doctor-specialty,
.doctor-exp,
.doctor-clinic,
.doctor-price {
    margin: 2px 12px;
    font-size: 13px;
    color: var(--muted);
    text-align: left;
    line-height: 1.3;
}

.doctor-specialty {
    font-weight: 600;
    color: var(--accent);
}

.doctor-price {
    font-weight: 400;
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}

.doctor-price strong {
    color: #595959;
}

/* Кнопка в карточке */
.doctor-card .btn {
    margin: 10px auto 15px;
    display: block;
    width: 120px;
    /* уже */
    text-align: center;
    padding: 9px;
    border: 2px solid var(--accent);
    border-radius: 25px;
    background: transparent;
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12.5px;
    text-decoration: none;
}

.doctor-card .btn:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-2px);
}

/* ====== ПАГИНАЦИЯ ====== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0 20px;
}

.pagination button {
    padding: 10px 16px;
    border: 2px solid var(--accent);
    border-radius: 10px;
    background: transparent;
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 44px;
}

.pagination button:hover,
.pagination button.active {
    background: var(--accent);
    color: #fff;
    transform: translateY(-2px);
}

/* ====== БЛОК ФИЛИАЛОВ ====== */
.footer-branches-card {
    background: var(--card);
    border-radius: var(--radius);
    margin: 20px 100px 20px 100px;
    /* Убираем жесткую ширину, чтобы блок сам вписался в .container */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.branches-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 40px;
    gap: 30px;
}

.branch-logo-box {
    flex-shrink: 0;
    padding-right: 10px;
    border-right: 1px solid #f0f0f0;
}

.branch-img {
    height: 65px;
    display: block;
}

.branch-info-row {
    display: flex;
    flex-grow: 1;
    justify-content: space-around;
}

.branch-col {
    display: flex;
    flex-direction: column;
}

.branch-label {
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.branch-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 16px;
    margin: 2px 0;
}

.branch-addr {
    font-size: 13px;
    color: #666;
}

.branch-phone {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    margin-top: 4px;
}

/* ВАШ СТИЛЬ КНОПКИ (ИСПРАВЛЕННЫЙ) */
.custom-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 8px 30px;
    border-radius: 15px;
    cursor: pointer;
    transition: background 0.3s ease;
    min-width: 100px;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.custom-btn:hover {
    filter: brightness(0.9);
}

/* Адаптив для планшетов/мобилок */
@media (max-width: 1100px) {
    .branches-content {
        flex-direction: column;
        text-align: center;
    }

    .branch-logo-box {
        border-right: none;
        padding-right: 0;
    }

    .branch-info-row {
        flex-direction: column;
        gap: 20px;
    }

    .custom-btn {
        width: 100%;
        /* На мобильных кнопка на всю ширину */
    }
}

/* ====== АДАПТИВ ====== */
@media (max-width: 992px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

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

    .custom-select,
    .controls .reset-btn {
        flex: 1 1 100%;
    }
}