/* Страница одного специалиста (single-specialist) */

.specialist-single {
    padding-bottom: 80px;
}

.specialist-header {
    padding: 60px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.specialist-header-content {
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

.specialist-main-photo {
    flex: 0 0 400px;
    position: relative;
}

.specialist-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.featured-label {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #ffd700;
    color: #333;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.specialist-header-info {
    flex: 1;
}

.specialist-category {
    margin-bottom: 15px;
}

.specialist-category a,
.specialist-category-label {
    display: inline-block;
    padding: 6px 15px;
    background: -webkit-gradient(linear, left top, left bottom, from(#008BD0), to(#44C9AD));
    background: linear-gradient(90deg, #06CFE5 0%, #66C924 100%);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.specialist-category a:hover {
    opacity: 0.95;
}

.specialist-name {
    font-size: 42px;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.specialist-position {
    font-size: 24px;
    font-weight: 600;
    color: #008BD0;
    margin-bottom: 20px;
}

.specialist-experience,
.specialist-education {
    font-size: 18px;
    line-height: 1.5;
    color: #495057;
    margin-bottom: 15px;
}

.specialist-experience strong,
.specialist-education strong {
    color: #333;
}

.specialist-contacts {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
}

.contacts-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0 0 15px 0;
}

.contacts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: white;
    border-radius: 8px;
    text-decoration: none;
    color: #495057;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.contact-item:hover {
    border-color: #06CFE5;
    transform: translateX(5px);
    background: #f8f9fa;
}

.contact-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.contact-value {
    font-size: 16px;
    font-weight: 500;
}

.specialist-content {
    padding: 80px 0;
}

.content-wrapper {
    display: flex;
    gap: 60px;
}

.specialist-description {
    flex: 1;
}

.specialist-single .section-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin: 0 0 30px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.description-text {
    font-size: 18px;
    line-height: 1.7;
    color: #495057;
    margin-bottom: 40px;
}

.description-text p {
    margin-bottom: 20px;
}

.section-subtitle {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 40px 0 20px 0;
}

.certificates-text {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
}

.certificates-text p {
    margin-bottom: 15px;
}

.specialist-sidebar {
    flex: 0 0 350px;
}

.sidebar-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0 0 20px 0;
}

.specialist-skills {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.skills-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.skill-item {
    padding: 8px 0;
    font-size: 16px;
    color: #495057;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.skill-bullet {
    color: #008BD0;
    font-weight: bold;
    flex-shrink: 0;
}

.consultation-block {
    background: -webkit-gradient(linear, left top, left bottom, from(#008BD0), to(#44C9AD));
    background: linear-gradient(90deg, #06CFE5 0%, #66C924 100%);
    padding: 30px;
    border-radius: 12px;
    color: white;
    margin-bottom: 30px;
}

.consultation-block p {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 20px;
    opacity: 0.9;
}

.consultation-btn {
    width: 100%;
    padding: 15px;
    background: white;
    color: #008BD0;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.consultation-btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.quick-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quick-link {
    display: block;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #008BD0;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
}

.quick-link:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.related-specialists {
    padding: 80px 0;
    background: #f8f9fa;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(260px, 360px));
    gap: 30px;
    justify-content: start;
}

.related-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.related-photo {
    height: 310px;
    overflow: hidden;
}

.related-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.related-info {
    padding: 25px;
}

.related-name {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px 0;
}

.related-name a {
    color: inherit;
    text-decoration: none;
}

.related-name a:hover {
    color: #008BD0;
}

.related-info .specialist-category {
    margin-bottom: 10px;
}

.related-info .specialist-category-label {
    display: inline-block;
    padding: 6px 15px;
    background: linear-gradient(90deg, #06CFE5 0%, #66C924 100%);
    color: white;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
}

.related-position {
    font-size: 16px;
    font-weight: 600;
    color: #008BD0;
    margin-bottom: 8px;
}

.related-experience {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.related-link {
    display: inline-block;
    color: #008BD0;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.related-link:hover {
    text-decoration: underline;
}

@media (max-width: 1200px) {
    .specialist-main-photo {
        flex: 0 0 350px;
    }

    .specialist-sidebar {
        flex: 0 0 300px;
    }
}

@media (max-width: 992px) {
    .specialist-header-content {
        flex-direction: column;
        gap: 40px;
    }

    .specialist-main-photo {
        flex: 0 0 auto;
        max-width: 400px;
        margin: 0 auto;
    }

    .content-wrapper {
        flex-direction: column;
        gap: 40px;
    }

    .specialist-sidebar {
        flex: 0 0 auto;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .specialist-name {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .specialist-header {
        padding: 40px 0;
    }

    .specialist-content {
        padding: 60px 0;
    }

    .specialist-name {
        font-size: 32px;
    }

    .specialist-position {
        font-size: 20px;
    }

    .specialist-single .section-title {
        font-size: 28px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .related-photo {
        height: 420px;
    }
}

@media (max-width: 576px) {
    .specialist-name {
        font-size: 28px;
    }

    .specialist-single .section-title {
        font-size: 24px;
    }

    .description-text {
        font-size: 16px;
    }

    .specialist-main-photo {
        max-width: 100%;
    }

    .contacts-list {
        flex-direction: column;
    }

    .contact-item {
        padding: 10px 15px;
    }
}

/* Rich text в карточке специалиста */
.specialist-single .specialist-rich-text {
    line-height: 1.6;
}

.specialist-single .specialist-rich-text p {
    margin: 0 0 0.75em 0;
}

.specialist-single .specialist-rich-text ul,
.specialist-single .specialist-rich-text ol {
    margin: 0 0 0.75em 0;
    padding-left: 1.5em;
}

.specialist-single .specialist-education-content {
    margin-top: 0.25em;
}

/* Документы об образовании / Сертификаты и дипломы */
.specialist-documents {
    margin-top: 2rem;
}

.specialist-documents--fullwidth {
    margin-top: 2.5rem;
    width: 100%;
}

.specialist-documents .section-subtitle {
    margin-bottom: 1.25rem;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.document-card {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.document-card-image {
    aspect-ratio: 3/4;
    background: #fff;
    overflow: hidden;
}

.document-card-image .document-card-image-link {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

.document-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s ease;
}

.document-card-image .document-card-image-link:hover img {
    opacity: 0.9;
}

.document-card-content {
    padding: 16px;
}

.document-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: #333;
}

.document-card-type {
    display: inline-block;
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.document-card-date {
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
}

.document-card-description {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

.document-card-description p:last-child {
    margin-bottom: 0;
}

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

/* Лайтбокс документов специалиста */
.specialist-doc-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.specialist-doc-lightbox[hidden] {
    display: none !important;
}

.specialist-doc-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

.specialist-doc-lightbox-inner {
    position: relative;
    z-index: 1;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.specialist-doc-lightbox-close {
    position: absolute;
    top: -44px;
    right: 0;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.specialist-doc-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.35);
}

.specialist-doc-lightbox-content {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.specialist-doc-lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.specialist-doc-lightbox-caption {
    margin: 0;
    padding: 12px 20px;
    font-size: 14px;
    color: #333;
    text-align: center;
}