/**
 * Стили страниц врачей
 */

.single-doctor .page-header-image img {
    height: 580px;
}

/* Фильтры и поиск */
.doctors-filters-section {
    margin: 50px 0 0;
}

.doctors-filters-wrapper {
    max-width: 1029px;
    margin: 0 auto;
}

.doctors-search {
    position: relative;
    margin-bottom: 30px;
}

.doctors-search-input {
    width: 100%;
    padding: 35px 100px 35px 30px;
    border: 1px solid #E0E0E0;
    border-radius: 50px;
    font-size: 16px;
    color: #383E4B;
    outline: none;
    transition: border-color 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.page-template-page-prices-php .doctors-search-input {
    padding: 30px 40px;
}

.doctors-search-input:focus {
    border-color: #999999;
}

.doctors-search-input::placeholder {
    color: #999999;
}

.search-clear,
.search-submit {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.search-clear:hover,
.search-submit:hover {
    opacity: 0.7;
}

.search-clear {
    right: 60px;
}

.search-submit {
    right: 20px;
}

.doctors-filter-tabs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

/* Стили фильтров используют общие классы .filter-tab из basic.css */

/* Специфично для страницы врачей - кнопки растягиваются */
.doctors-filter-tabs .filter-tab {
    flex-grow: 1;
}

.filter-dropdown {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.filter-dropdown svg {
    width: 12px;
    height: 7px;
}

/* Выпадающий список направлений */
.filter-dropdown-wrapper {
    position: relative;
    flex-grow: 1;
}

.filter-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: #FFFFFF;
    border: 1px solid #E0E0E0;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 12px 20px;
    border: none;
    background: none;
    color: #383E4B;
    font-family: var(--font-family);
    font-size: 16px;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #F5F5F5;
}

.dropdown-item:first-child {
    font-weight: 500;
    border-bottom: 1px solid #E0E0E0;
}

/* Архив врачей */
.doctors-archive {
    padding: 50px 0;
}

.doctors-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.doctor-card {
    background: #FFFFFF;
    border: 1px solid #E0E0E0;
    border-radius: 5px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.doctor-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.doctor-thumbnail {
    overflow: hidden;
}

.doctor-thumbnail img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.doctor-content {
    padding: 25px;
}

.doctor-name {
    font-size: 1.4em;
    font-weight: 400;
    margin-bottom: 15px;
}

.doctor-name a {
    color: #383E4B;
    text-decoration: none;
    transition: color 0.3s ease;
}

.doctor-name a:hover {
    color: #E01F26;
}

.doctor-excerpt {
    color: #666666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.doctor-content .btn {
    padding: 12px 24px;
}

.no-doctors {
    text-align: center;
    font-size: 1.2em;
    color: #666666;
    padding: 50px 0;
}

/* Обертка контента использует универсальные классы .content-wrapper из basic.css */
/* Оставляем алиасы для обратной совместимости */
.post-type-archive-doctor .callback-wrapper {
    margin-bottom: 270px;
    margin-top: 215px;
}

.doctors-grid-wrapper {
    margin: 95px 0;
}
.doctors-grid-wrapper .section-title {
    text-align: left;
    margin-bottom: 40px;
}

.doctors-grid-wrapper-white {
    background-color: white;
}

.doctors-grid-wrapper-transparent {
    background-color: transparent;
}

.doctors-grid-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

/* Блок "Занимается лечением" */
.doctor-treatments {
    margin: 60px 0;
    margin-top: 5px;
}
.single-doctor .page-header-section {
    margin-bottom: 0;
}
.single-doctor .section-doctor-reviews .review-card {
    width: 522px;
}
.single-doctor .section-title {
    text-align: left;
}

.treatments-wrapper {
    background: #E01F26;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    padding: 60px 100px;
    border-radius: 5px;
}

.treatments-left {
    display: flex;
    flex-direction: column;
    gap: 30px;
    height: 100%;
}

.treatments-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-grow: 1;
}

.treatments-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.treatments-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.treatments-icon svg {
    width: 100%;
    height: 100%;
}

.treatments-title {
    color: #FFFFFF;
    font-size: 30px;
    font-weight: 400;
    line-height: 1.2;
    margin: 0;
}

.treatments-description {
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
}

.treatments-prices {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.treatment-price-item {
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 400;
    display: flex;
    align-items: center;
}

.treatment-price-item::before {
    content: '•';
    margin-right: 10px;
}

.treatments-right {
    display: flex;
    flex-direction: column;
}

.treatments-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.treatment-item {
    color: #FFFFFF;
    font-size: 17px;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 9px;
}

.treatment-item svg {
    flex-shrink: 0;
}

/* Биография врача */
.doctor-biography {
    margin: 135px 0 60px;
}

/* Секция похожих врачей */
.section-related-doctors {
    margin: 215px 0;
}

.section-related-doctors .section-title {
    margin-bottom: 60px;
}

.related-doctors-action {
    display: flex;
    justify-content: center;
    margin-top: 60px;
}

.related-doctors-action .btn {
    padding: 18px 45px;
}

/* Секция записи к врачу */
.section-doctor-appointment {
    margin: 60px 0;
}

.section-doctor-appointment .callback-title {
    margin-bottom: 100px;
}

.section-doctor-appointment .callback-image-circle img {
    max-width: 257px;
}

/* Иконка телефона - белый фон, красная иконка */
.section-doctor-appointment .callback-phone-icon {
    background-color: white;
    border-color: #E01F26;
}

.doctor-appointment-book-btn {
    background-color: #fff;
    color: #E63946;
    border: 1px solid #E63946;
    align-self: flex-start;
}

/* Секция сертификатов врача */
.section-doctor-certificates {
    margin: 60px 0;
}

.section-doctor-certificates .section-title {
    margin-bottom: 60px;
}

.certificates-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 19px;
}

.certificate-item {
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.certificate-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.certificate-item img {
    width: 100%;
    height: auto;
    display: block;
}

.biography-content {
    color: #383E4B;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.6;
    max-width: 900px;
}

.biography-content p {
    margin-bottom: 20px;
}

.biography-content p:last-child {
    margin-bottom: 0;
}

/* Секция отзывов врача */
.section-doctor-reviews {
    margin: 60px 0;
}

.section-doctor-reviews .section-title {
    margin-bottom: 60px;
}

.section-doctor-reviews .doctor-reviews-splide {
    margin-left: auto;
    margin-right: 0;
    max-width: calc(50vw + var(--container-width) / 2);
    padding-left: var(--container-padding);
    padding-right: 20px;
    margin-bottom: 40px;
}

.section-doctor-reviews .review-card {
    width: 400px;
}

/* Кнопки действий */
.doctor-reviews-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 60px;
}

.doctor-reviews-actions .btn {
    padding: 18px 45px;
}

/* Переопределение стилей кнопки "Оставить отзыв" для светлого фона */
.doctor-reviews-actions .btn-outline {
    border-color: #383E4B;
    color: #383E4B;
}

.doctor-reviews-actions .btn-outline:hover {
    background-color: rgba(56, 62, 75, 0.05);
}

/* Индикатор загрузки фильтра */
.filter-tab.loading {
    position: relative;
    color: transparent;
}

.filter-tab.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #E01F26;
    border-top-color: transparent;
    border-radius: 50%;
    animation: filter-loading-spin 0.6s linear infinite;
}

@keyframes filter-loading-spin {
    to { transform: rotate(360deg); }
}

/* Сообщение "Нет результатов" */
.doctors-no-results {
    display: none;
    padding: 40px 20px;
    text-align: center;
    background-color: #f5f5f5;
    margin: 20px 0;
}

.doctors-no-results p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

@media (max-width: 1300px) {
    .doctors-filters-section {
        margin-top: clamp(30px, calc(6.667vw - 36.667px), 50px);
    }
    .doctors-grid-wrapper {
        margin: clamp(55px, calc(13.333vw - 78.333px), 95px) 0;
    }
    .doctors-grid-cards {
        gap: clamp(0px, calc(-5vw + 65px), 15px);
    }
    .treatments-wrapper {
        padding: clamp(40px, calc(6.667vw - 26.667px), 60px) clamp(60px, calc(13.333vw - 73.333px), 100px);
    }
    .treatments-icon svg {
        max-width: clamp(35px, calc(10vw - 65px), 65px);
    }
    .treatments-left {
        gap: clamp(15px, calc(5vw - 35px), 30px);
    }
    .treatments-list {
        gap: clamp(15px, calc(2.333vw - 8.333px), 22px);
    }
    .treatments-info {
        gap: clamp(15px, calc(1.667vw - 1.667px), 20px);
    }
    .page-header-content {
        padding: clamp(30px, calc(1.667vw + 13.333px), 35px) clamp(50px, calc(10vw - 50px), 80px);
    }
    .treatments-title {
        font-size: clamp(27px, calc(1vw + 17px), 30px);
    }
    .doctor-biography {
        margin: clamp(85px, calc(16.667vw - 81.667px), 135px) 0 clamp(40px, calc(6.667vw - 26.667px), 60px);
    }
    .section-doctor-reviews .section-title {
        margin-bottom: clamp(40px, calc(6.667vw - 26.667px), 60px);
    }
    .doctor-reviews-actions {
        margin-top: clamp(40px, calc(6.667vw - 26.667px), 60px);
    }
    .section-doctor-certificates .section-title {
        margin-bottom: clamp(40px, calc(6.667vw - 26.667px), 60px);
    }
}

@media (max-width: 1000px) {
    .section-doctor-appointment {
        margin: 30px 0;
    }

    .doctors-filters-section {
        margin: 30px 0;
    }

    .doctors-search-input {
        padding: 15px 80px 15px 20px;
        font-size: 14px;
    }

    .search-clear {
        right: 50px;
    }

    .search-submit {
        right: 15px;
    }

    .doctors-filter-tabs {
        gap: 10px;
    }

    .filter-tab {
        padding: 10px 20px;
        font-size: 14px;
    }

    .doctors-archive {
        padding: 30px 0;
    }

    .doctors-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .doctors-grid-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .doctors-grid-wrapper {
        margin: 40px 0;
    }

    .doctors-grid-wrapper .section-title {
        font-size: 22px;
        margin-bottom: 25px;
    }

    .post-type-archive-doctor .callback-wrapper {
        margin-top: 60px;
        margin-bottom: 60px;
    }

    .doctor-treatments {
        margin: 40px 0;
    }

    .treatments-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 40px 30px;
    }

    .treatments-header {
        gap: 12px;
    }

    .treatments-icon {
        width: 40px;
        height: 40px;
    }

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

    .treatments-description,
    .treatment-price-item,
    .treatment-item {
        font-size: 14px;
    }

    .treatments-list {
        gap: 12px;
    }

    .doctor-biography {
        margin: 30px 0;
    }

    .biography-content {
        font-size: 15px;
    }

    .biography-content p {
        margin-bottom: 15px;
    }

    .section-doctor-reviews {
        margin: 30px 0;
    }

    .section-doctor-reviews .section-title {
        margin-bottom: 30px;
    }

    .section-doctor-reviews .doctor-reviews-splide {
        max-width: 100%;
        padding-left: var(--container-padding);
        padding-right: var(--container-padding);
    }

    .section-doctor-reviews .review-card {
        width: 100%;
        max-width: 100%;
    }

    .doctor-reviews-actions {
        flex-direction: column;
        gap: 15px;
        margin-top: 40px;
    }

    .doctor-reviews-actions .btn {
        width: 100%;
    }

    .certificates-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .related-doctors-action {
        margin-top: 40px;
    }

    .related-doctors-action .btn {
        width: 100%;
    }

    .section-doctor-certificates {
        margin: 30px 0;
    }

    .section-doctor-certificates .section-title {
        margin-bottom: 30px;
    }

    .section-doctor-appointment .callback-title {
        margin-bottom: 50px;
    }

    .section-doctor-appointment .doctor-appointment-book-btn {
        margin-top: 30px;
    }
}

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

    .doctor-thumbnail img {
        height: 250px;
    }

    .certificates-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}