
/* ========== УНИКАЛЬНЫЕ СТИЛИ ДЛЯ СТРАНИЦЫ СТРУКТУРЫ ========== */

* {
    transition: none !important;
    animation: none !important;
    box-shadow: none !important;
}

/* ===== ТУМБЛЕР ДЛЯ ПЕРЕКЛЮЧЕНИЯ МЕЖДУ СОТРУДНИКАМИ И ИНФОРМАЦИЕЙ ===== */
.info-tabs-container {
    margin-bottom: 30px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.info-tabs-container::-webkit-scrollbar {
    display: none;
}

.info-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    background: rgba(217, 22, 86, 0.05);
    padding: 8px;
    border-radius: 50px;
    width: fit-content;
    min-width: 100%;
}

.info-tab {
    flex: 1;
    min-width: 200px;
    text-align: center;
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 600;
    color: var(--secondary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.info-tab:hover {
    background: rgba(217, 22, 86, 0.1);
    color: var(--primary-color);
}

.info-tab.active {
    background: var(--primary-color);
    color: white;
}

/* Контейнеры для контента */
.info-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.info-content.active {
    display: block;
}

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

/* ===== СЕТКА КАРТОЧЕК СОТРУДНИКОВ ===== */
.staff-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
    margin: 30px 0 !important;
    justify-content: flex-start !important;
    width: 100% !important;
}

/* КАРТОЧКА СОТРУДНИКА - 2 колонки на планшетах и десктопе */
.staff-card {
    flex: 0 0 calc(50% - 10px) !important;
    width: calc(50% - 10px) !important;
    max-width: calc(50% - 10px) !important;
    min-width: 280px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    gap: 0 !important;
    background: var(--card-color) !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 8px !important;
    height: auto !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    margin: 0 !important;
    cursor: pointer !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.staff-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

.staff-card:active {
    transform: translateY(0);
}

/* Информация о сотруднике - 55% */
.staff-info {
    flex: 0 0 55% !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    padding: 15px 0 15px 15px !important;
    padding-right: 15px !important;
    overflow-y: auto !important;
    height: 100% !important;
    box-sizing: border-box !important;
    order: 1 !important;
}

/* Фото сотрудника - 45% */
.staff-photo {
    flex: 0 0 45% !important;
    min-width: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 6px !important;
    order: 2 !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    padding: 15px 15px 15px 0 !important;
    padding-left: 0 !important;
    height: 100% !important;
    box-sizing: border-box !important;
}

.staff-photo-inner {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 5 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #f5f5f5 !important;
    border-radius: 6px !important;
    overflow: hidden !important;
}

.staff-photo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center top !important;
    display: block !important;
    background:white;
    border-radius: 6px !important;
}

/* Компактная информация в карточке */
.staff-name-compact {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--secondary-color) !important;
    margin-bottom: 8px !important;
    line-height: 1.3 !important;
    text-align: left !important;
}

.staff-name-compact .family {
    display: block !important;
}

.staff-name-compact .name {
    display: block !important;
}

.staff-post-compact {
    font-size: 14px !important;
    color: var(--text-light) !important;
    font-weight: 500 !important;
    margin-bottom: 12px !important;
    line-height: 1.4 !important;
    text-align: left !important;
}

.staff-phone-compact {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 15px !important;
    color: var(--primary-color) !important;
    font-weight: 600 !important;
    margin-top: 5px !important;
    text-align: left !important;
}

/* Специальность/категория в карточке */
.staff-specialty-compact {
    font-size: 12px !important;
    color: #666 !important;
    margin-top: 5px !important;
    text-align: left !important;
    line-height: 1.4 !important;
}

/* ===== ЗАГОЛОВКИ ГРУПП СОТРУДНИКОВ ===== */
.staff-group-header {
    flex: 0 0 100%;
    margin: 30px 0 15px 0;
}

.staff-group-header:first-of-type {
    margin-top: 0;
}

.staff-group-title {
    font-size: 22px;
    font-weight: 600;
    padding-bottom: 5px;
    display: inline-block;
}

/* Цвета для разных групп */
.staff-group-title.chiefs { color: var(--primary-color); border-color: var(--primary-color); }
.staff-group-title.doctors { color: var(--primary-color); border-color: var(--primary-color); }
.staff-group-title.nurses { color: var(--primary-color); border-color: var(--primary-color); }
.staff-group-title.other-staff { color: var(--primary-color); border-color: var(--primary-color); }

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.staff-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    overflow-y: auto;
    padding: 40px 20px;
    box-sizing: border-box;
}

.staff-modal.active {
    display: block;
}

.staff-modal-content {
    position: relative;
    background-color: white;
    max-width: 900px;
    margin: 0 auto;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s ease;
}

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

.staff-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card-color);
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--secondary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.staff-modal-close:hover {
    background: var(--primary-color);
    color: white;
}

.staff-modal-layout {
    display: flex;
    gap: 30px;
}

.staff-modal-photo {
    flex: 0 0 250px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    height: auto;
    min-height: 250px;
}

.staff-modal-photo img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    display: block;
    align-self: flex-start;
}

.staff-modal-info {
    flex: 1;
}

.staff-modal-name {
    font-size: 32px;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 10px;
    line-height: 1.2;
    text-align: left;
}

.staff-modal-name .family {
    display: block;
}

.staff-modal-name .name {
    display: block;
}

.staff-modal-post {
    font-size: 20px;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.staff-modal-detail-item {
    margin-bottom: 20px;
}

.staff-modal-detail-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    text-align: left;
}

.staff-modal-detail-value {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.5;
    text-align: left;
}

.staff-modal-detail-value p {
    margin: 0 0 10px 0;
    text-align: left;
}

.staff-modal-detail-value ul,
.staff-modal-detail-value ol {
    margin: 10px 0 10px 20px;
    padding: 0;
    text-align: left;
}

.staff-modal-detail-value a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    padding: 5px 0;
    transition: all 0.2s ease;
    text-align: left;
}

.staff-modal-detail-value a:hover {
    color: var(--primary-dark);
    transform: translateX(3px);
}

.staff-modal-contact {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.staff-modal-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
    text-align: left;
}
.staff-group-title.pharmacists { 
    color: var(--primary-color); 
    border-color: var(--primary-color); 
}
/* Скрываем скроллбар */
.staff-info::-webkit-scrollbar {
    width: 2px !important;
}

.staff-info::-webkit-scrollbar-thumb {
    background: var(--primary-color) !important;
    border-radius: 2px !important;
}

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

/* Телефоны до 767px - 1 колонка */
@media (max-width: 767px) {
    .staff-card {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 280px !important;
    }
    
    .staff-name-compact { font-size: 16px !important; }
    .staff-post-compact { font-size: 13px !important; }
    .staff-phone-compact { font-size: 13px !important; }
    
    .info-tab {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .info-tabs {
        flex-wrap: wrap;
        border-radius: 20px;
    }
    .info-tab {
        flex: 1 1 auto;
        min-width: auto;
        padding: 10px 20px;
        font-size: 15px;
    }
}

/* Десктоп и планшеты - 2 колонки */
@media (min-width: 768px) {
    .staff-card {
        flex: 0 0 calc(50% - 10px) !important;
        width: calc(50% - 10px) !important;
        max-width: calc(50% - 10px) !important;
    }
}

/* Очень маленькие телефоны до 375px */
@media (max-width: 375px) {
    .staff-name-compact { font-size: 15px !important; }
    .staff-post-compact { font-size: 12px !important; }
    .staff-phone-compact { font-size: 12px !important; }
    .staff-card { min-width: 280px !important; }
}

/* Мобильные стили для модального окна */
@media (max-width: 768px) {
    .staff-modal-content { padding: 30px 20px; }
    .staff-modal-layout { flex-direction: column; }
    .staff-modal-photo {
        flex: 0 0 auto;
        max-width: 200px;
        margin: 0 auto;
    }
    .staff-modal-name { font-size: 28px; }
    .staff-modal-post { font-size: 18px; }
}

@media (max-width: 480px) {
    .staff-modal-content { padding: 20px 15px; }
    .staff-modal-name { font-size: 24px; }
    .staff-modal-post { font-size: 16px; }
    .staff-modal-detail-value { font-size: 14px; }
}
