/* ==============================================
   СТИЛИ ДЛЯ СТРАНИЦ ВРАЧЕЙ
   doctors.php и doctor.php
   ============================================== */

/* ==============================================
   СПИСОК ВРАЧЕЙ (doctors.php)
   ============================================== */

/* Фильтры */
.filters-section {
    background-color: var(--light-bg, #f8f9fa);
    padding: 30px 0;
    margin-bottom: 40px;
}

.filters-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.filter-label {
    font-weight: 600;
    color: var(--text-dark, #333);
    white-space: nowrap;
}

.filter-select {
    flex: 1;
    max-width: 300px;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:hover {
    border-color: var(--primary-color, #2563eb);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-actions {
    display: flex;
    gap: 10px;
}

/* Сетка врачей */
.doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Карточка врача */
.doctor-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

.doctor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.doctor-card.hidden {
    display: none !important;
}

.doctor-photo {
    width: 100%;
    height: 280px;
    overflow: hidden;
    background-color: #f0f0f0;
}

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

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

.doctor-info {
    padding: 20px;
    flex: 1;
}

.doctor-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color, #2563eb);
    margin-bottom: 8px;
    line-height: 1.3;
}

.doctor-position {
    font-size: 15px;
    color: var(--text-light, #6b7280);
    margin-bottom: 10px;
}

.doctor-specialty {
    font-size: 14px;
    color: var(--text-dark, #333);
    margin-bottom: 8px;
    font-weight: 500;
}

.doctor-experience {
    font-size: 14px;
    color: var(--text-light, #6b7280);
    margin-bottom: 0;
}

/* Кнопки на карточке */
.doctor-card-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 20px 20px;
}

.doctor-card-actions .btn {
    width: 100%;
    text-align: center;
    padding: 10px 16px;
    font-size: 14px;
}

/* Сообщение "Ничего не найдено" */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.no-results-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-results h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--text-dark, #333);
}

.no-results p {
    color: var(--text-light, #6b7280);
    margin-bottom: 25px;
}

/* ==============================================
   ДЕТАЛЬНАЯ СТРАНИЦА ВРАЧА (doctor.php)
   ============================================== */

/* Хлебные крошки */
.breadcrumbs {
    background-color: var(--light-bg, #f8f9fa);
    padding: 15px 0;
}

.breadcrumb-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 0;
    margin: 0;
}

.breadcrumb-list li {
    display: flex;
    align-items: center;
    color: var(--text-light, #6b7280);
    font-size: 14px;
}

.breadcrumb-list li:not(:last-child)::after {
    content: '›';
    margin-left: 8px;
    color: var(--text-light, #6b7280);
    font-size: 18px;
}

.breadcrumb-list a {
    color: var(--primary-color, #2563eb);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-list a:hover {
    text-decoration: underline;
    color: var(--primary-dark, #1e40af);
}

/* Контейнер детальной страницы */
.doctor-detail {
    max-width: 1000px;
    margin: 0 auto;
}

/* Заголовок врача */
.doctor-detail-header {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.doctor-detail-photo {
    flex-shrink: 0;
}

.doctor-detail-photo img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.doctor-detail-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.doctor-detail-name {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-color, #2563eb);
    line-height: 1.2;
}

.doctor-detail-position {
    font-size: 18px;
    color: var(--text-light, #6b7280);
    margin-bottom: 15px;
}

.doctor-detail-specialty,
.doctor-detail-experience {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--text-dark, #333);
}

/* Рейтинг */
.doctor-detail-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    font-size: 20px;
}

.rating-value {
    font-weight: 600;
    color: var(--text-dark, #333);
    font-size: 18px;
}

.reviews-count {
    color: var(--text-light, #6b7280);
    font-size: 14px;
}

/* Действия в шапке */
.doctor-detail-actions {
    display: flex;
    gap: 15px;
    margin-top: auto;
    padding-top: 20px;
}

.doctor-detail-actions .btn {
    flex: 1;
    text-align: center;
    white-space: nowrap;
}

/* Контент детальной страницы */
.doctor-detail-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Секция информации */
.doctor-detail-section {
    padding: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.doctor-detail-section h2 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--primary-color, #2563eb);
    display: flex;
    align-items: center;
    gap: 10px;
}

.doctor-detail-section p {
    line-height: 1.7;
    margin-bottom: 10px;
    color: var(--text-dark, #333);
}

.doctor-detail-section p:last-child {
    margin-bottom: 0;
}

.doctor-detail-section strong {
    color: var(--text-dark, #333);
    font-weight: 600;
}

.doctor-details-grid {
    margin: 0;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 10px;
    overflow: hidden;
}

.doctor-details-row {
    display: grid;
    grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.4fr);
    border-bottom: 1px solid var(--border, #e2e8f0);
}

.doctor-details-row:last-child {
    border-bottom: 0;
}

.doctor-details-row dt,
.doctor-details-row dd {
    margin: 0;
    padding: 14px 16px;
    line-height: 1.5;
}

.doctor-details-row dt {
    background: var(--bg, #f5f7fa);
    color: var(--text-dark, #333);
    font-weight: 600;
}

.doctor-details-row dd {
    color: var(--text-dark, #333);
    overflow-wrap: anywhere;
}

.doctor-detail-empty {
    color: var(--text-light, #6b7280);
    font-style: italic;
}

/* Список достижений */
.achievements-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.achievements-list li {
    padding-left: 30px;
    position: relative;
    margin-bottom: 12px;
    line-height: 1.6;
    color: var(--text-dark, #333);
}

.achievements-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--success-color, #22c55e);
    font-weight: bold;
    font-size: 18px;
}

.achievements-list li:last-child {
    margin-bottom: 0;
}

/* График приёма */
.doctor-schedule {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark, #333);
    padding: 15px;
    background-color: var(--light-bg, #f8f9fa);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color, #2563eb);
}

/* Контактная информация */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.contact-info a {
    color: var(--primary-color, #2563eb);
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-info a:hover {
    text-decoration: underline;
    color: var(--primary-dark, #1e40af);
}

/* CTA блок */
.doctor-detail-cta {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, var(--light-bg, #f8f9fa) 0%, #e8eef9 100%);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.doctor-detail-cta h3 {
    font-size: 26px;
    margin-bottom: 10px;
    color: var(--primary-color, #2563eb);
}

.doctor-detail-cta p {
    color: var(--text-light, #6b7280);
    margin-bottom: 25px;
    font-size: 16px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.cta-buttons .btn {
    min-width: 200px;
}

/* Кнопка возврата */
.back-to-doctors {
    text-align: center;
    margin-top: 30px;
}

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

@media (max-width: 768px) {
    .doctor-details-row {
        grid-template-columns: 1fr;
    }

    .doctor-details-row dt {
        padding-bottom: 6px;
    }

    .doctor-details-row dd {
        padding-top: 6px;
    }

    /* Фильтры */
    .filters-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

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

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

    .filter-actions {
        width: 100%;
    }

    .filter-actions .btn {
        width: 100%;
    }

    /* Сетка врачей */
    .doctors-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Детальная страница */
    .doctor-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
        gap: 25px;
    }

    .doctor-detail-photo img {
        width: 200px;
        height: 200px;
    }

    .doctor-detail-name {
        font-size: 24px;
    }

    .doctor-detail-position {
        font-size: 16px;
    }

    .doctor-detail-actions {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

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

    .doctor-detail-section {
        padding: 20px;
    }

    .doctor-detail-section h2 {
        font-size: 20px;
    }

    .doctor-detail-cta {
        padding: 30px 20px;
    }

    .doctor-detail-cta h3 {
        font-size: 22px;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cta-buttons .btn {
        width: 100%;
        min-width: unset;
    }
}

@media (max-width: 480px) {
    .doctor-card-actions {
        gap: 8px;
    }

    .doctor-card-actions .btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    .breadcrumb-list {
        font-size: 13px;
    }

    .doctor-detail-photo img {
        width: 180px;
        height: 180px;
    }
}

/* ==============================================
   АНИМАЦИИ
   ============================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.doctor-card {
    animation: fadeIn 0.4s ease-out;
}

.doctor-card:nth-child(1) { animation-delay: 0.05s; }
.doctor-card:nth-child(2) { animation-delay: 0.1s; }
.doctor-card:nth-child(3) { animation-delay: 0.15s; }
.doctor-card:nth-child(4) { animation-delay: 0.2s; }
.doctor-card:nth-child(5) { animation-delay: 0.25s; }
.doctor-card:nth-child(6) { animation-delay: 0.3s; }

/* ==============================================
   ВЕРСИЯ ДЛЯ ПЕЧАТИ
   ============================================== */

@media print {
    .breadcrumbs,
    .filters-section,
    .doctor-card-actions,
    .doctor-detail-actions,
    .doctor-detail-cta,
    .back-to-doctors,
    .cta-section,
    .banners-section {
        display: none !important;
    }

    .doctor-detail-header {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .doctor-detail-section {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}
