/* ============================================================================
   TEAM PAGE STYLES
   ============================================================================ */

.team-section {
    padding: 120px 0;
    background-color: #F5F7FA; /* Светлый фон */
    min-height: 100vh;
}

.team-section .container {
    max-width: var(--max-width, 1400px);
}

/* Сетка команды */
.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-top: 60px;
}

/* Карточка команды */
.team-card {
    background: var(--willow-white);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.team-card:hover {
    transform: translateY(-5px);
}

.team-card-inner {
    display: block;
}

/* Фото сотрудника */
.team-photo {
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    background-color: var(--willow-light-gray);
    margin-bottom: 20px;
    pointer-events: none; /* Чтобы клики по фото тоже переходили на карточку */
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.team-card:hover .team-photo img {
    filter: grayscale(0%);
}

/* Информация о сотруднике */
.team-info {
    text-align: center;
    padding: 0 10px 20px;
}

.team-info h2 {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--willow-purple);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.team-position {
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--willow-astronomist);
    line-height: 1.6;
    margin-bottom: 12px;
}

/* Контакты в карточке */
.team-contacts {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.team-contacts a {
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--willow-astronomist);
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
}

.team-contacts a:hover {
    color: var(--willow-coffee);
    text-decoration: underline;
}

.team-contact-email::before {
    content: "✉ ";
}

.team-contact-phone::before {
    content: "☎ ";
}

/* ============================================================================
   TEAM PROFILE PAGE STYLES
   ============================================================================ */

.team-profile {
    padding: 120px 0;
    background-color: var(--willow-white);
    min-height: 100vh;
}

.profile-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 60px;
    align-items: start;
}

/* Фото профиля */
.team-profile .profile-photo {
    position: sticky;
    top: 130px;
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    background-color: var(--willow-light-gray);
    border-radius: 4px;
}

.team-profile .profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.team-profile .profile-photo:hover img {
    filter: grayscale(0%);
}

/* Контент профиля */
.team-profile .profile-content {
    padding-top: 20px;
}

.team-profile .profile-content h1 {
    font-size: 3rem;
    font-weight: 400;
    color: var(--willow-coffee); /* Light Coffee из гайдбука */
    margin-bottom: 16px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.team-profile .profile-position {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--willow-purple); /* Abstract Purple */
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.team-profile .profile-specialization {
    font-size: 1rem;
    font-weight: 300;
    color: var(--willow-astronomist);
    margin-bottom: 32px;
    line-height: 1.7;
    font-style: italic;
}

/* Биография */
.team-profile .profile-bio {
    font-size: 1rem;
    font-weight: 300;
    color: var(--willow-astronomist);
    line-height: 1.8;
    margin-bottom: 48px;
}

.team-profile .profile-bio p {
    margin-bottom: 16px;
}

.team-profile .profile-bio p:last-child {
    margin-bottom: 0;
}

/* Заголовки секций */
.team-profile .profile-content h2 {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--willow-purple);
    margin: 40px 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--willow-lavender);
    letter-spacing: 0.02em;
}

/* Контакты */
.team-profile .contact-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.team-profile .contact-list li {
    font-size: 1rem;
    font-weight: 300;
}

.team-profile .contact-list a {
    color: var(--willow-astronomist);
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.team-profile .contact-list a:hover {
    color: var(--willow-coffee);
}

.team-profile .contact-email::before {
    content: "✉";
    color: var(--willow-lavender);
}

.team-profile .contact-phone::before {
    content: "☎";
    color: var(--willow-lavender);
}

.team-profile .contact-linkedin::before {
    content: "in";
    color: var(--willow-lavender);
    font-weight: 600;
    font-size: 0.9em;
}

/* Награды */
.team-profile .awards-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.team-profile .award-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--willow-light-gray);
}

.team-profile .award-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.team-profile .award-year {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--willow-coffee);
    letter-spacing: 0.05em;
}

.team-profile .award-name {
    font-size: 1rem;
    font-weight: 400;
    color: var(--willow-purple);
}

.team-profile .award-description {
    grid-column: 2;
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--willow-astronomist);
    line-height: 1.6;
    margin-top: 4px;
}

/* Языки */
.team-profile .profile-languages p {
    font-size: 1rem;
    font-weight: 300;
    color: var(--willow-astronomist);
    line-height: 1.7;
}

.team-profile .profile-publications {
    margin-top: 48px;
    padding-top: 40px;
    border-top: 2px solid var(--willow-lavender);
}

.team-profile .profile-publications h2 {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--willow-purple);
    margin: 0 0 32px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--willow-lavender);
    letter-spacing: 0.02em;
}

/* Сетка публикаций - динамическое отображение */
/*.team-profile .content-posts-grid {*/
/*    display: grid;*/
/*    grid-template-columns: 1fr;*/
/*    gap: 24px;*/
/*}*/

/* Планшеты (≥768px): 2 колонки */
/*@media (min-width: 768px) {*/
/*    .team-profile .content-posts-grid {*/
/*        grid-template-columns: repeat(2, 1fr);*/
/*        gap: 28px;*/
/*    }*/
/*}*/

/* Десктопы (≥1024px): 3 колонки */
/*@media (min-width: 1024px) {*/
/*    .team-profile .content-posts-grid {*/
/*        grid-template-columns: repeat(3, 1fr);*/
/*        gap: 32px;*/
/*    }*/
/*}*/

.profile-publications .content-item {
    display: none;
}

.profile-publications .content-item:nth-child(-n+2) {
    display: block;
}

@media (min-width: 1024px) {
    .profile-publications .content-item:nth-child(-n+3) {
        display: block;
    }
}

.profile-publications .content-posts-grid.expanded .content-item {
    display: block;
}

.profile-publications .content-posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .profile-publications .content-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }
}

@media (min-width: 1024px) {
    .profile-publications .content-posts-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
    }
}

/* Блок кнопки */
.team-profile .publications-show-more {
    margin-top: 32px;
    text-align: center;
    border-top: 1px solid var(--willow-light-gray);
    padding-top: 24px;
}

/* Кнопка "Show more" */
.team-profile .btn-show-more {
    background-color: transparent;
    color: var(--willow-purple);
    border: 1px solid var(--willow-lavender);
    padding: 12px 32px;
    font-size: 0.9rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0;
    font-family: 'Montserrat', sans-serif;
}

.team-profile .btn-show-more:hover {
    background-color: var(--willow-coffee);
    border-color: var(--willow-coffee);
    color: var(--willow-white);
}

/* Анимация плавного появления (опционально, делает эффект "спойлера" мягче) */
.team-profile .content-item.hidden-publication.show {
    display: block;
    animation: fadeInPublication 0.5s ease-in-out;
}

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