/* 
 * Стили для страниц директорского корпуса
 * Добавлено: 2025-05-28
 */

/* Общие стили для страниц директорского корпуса */
.directors-archive {
    padding: 30px 0;
}

.directors-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
    padding-top: 30px;
}

/* Стили для карточки директора в сетке */
.director-item {
    flex: 0 0 25%;
    max-width: 25%;
    padding: 0 15px;
    margin-bottom: 50px;
}

.director-link {
    display: block;
    text-decoration: none;
    color: #001228;
    transition: all 0.3s ease;
}

.director-link:hover {
    transform: translateY(-5px);
}

.director-portrait {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 125%; /* Соотношение сторон 4:5 */
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
    background-color: #f5f5f5;
}

.director-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.director-no-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.director-info {
    text-align: center;
    padding: 5px 0;
}

.director-name {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 5px;
    color: #0066cc;
}

.director-years {
    font-size: 14px;
    color: #666;
}

/* Стили для страницы отдельного директора */
.director-page {
    padding: 40px 0; /* Соответствует отступам на других страницах */
}

.director-page__row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
    align-items: flex-start; /* Важно для sticky-позиционирования */
}

.director-page__col {
    padding: 0 15px;
}

.director-page__col--content {
    flex: 0 0 66.666%;
    max-width: 66.666%;
}

.director-page__col--portrait {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    position: relative;
    height: 100%;
}

.director-page__years {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

.director-page__content {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.director-page__content p {
    margin-bottom: 20px;
}

/* Стили для навигационных кнопок */
.director-page__navigation {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eaeaea;
}

.director-page__nav-buttons {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

.director-nav-button {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background-color: #f0f0f0;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
}

.director-nav-button:hover {
    background-color: #0066cc;
    color: #fff;
}

.director-nav-button--back {
    justify-content: flex-start;
}

.director-nav-placeholder {
    flex: 1;
    display: block;
}

.director-nav-button--back:before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 10px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    vertical-align: middle;
}

.director-page__portrait-wrapper {
    padding-bottom: 30px;
}

.director-page__portrait-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 125%; /* Соотношение сторон 4:5 */
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.director-page__portrait {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.director-page__no-portrait {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #e0e0e0;
}

.director-page__back {
    margin-top: 40px;
}

.btn--back {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.btn--back:hover {
    background-color: #e0e0e0;
}

.icon-arrow-left {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* Адаптивные стили */
@media (max-width: 1199px) {
    .director-item {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }
}

@media (max-width: 991px) {
    .director-item {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .director-page__col--content,
    .director-page__col--portrait {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .director-page__col--portrait {
        order: -1;
        margin-bottom: 30px;
    }
    
    .director-page__portrait-container {
        padding-bottom: 75%; /* Меняем соотношение сторон для планшетов */
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 767px) {
    .directors-archive {
        padding: 40px 0;
    }
    
    .director-item {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 30px;
    }
    
    .director-portrait {
        padding-bottom: 100%; /* Квадратное соотношение для мобильных */
        max-width: 300px;
        margin: 0 auto 15px;
    }
    
    .director-page {
        padding: 40px 0;
    }
    
    .director-page__portrait-container {
        padding-bottom: 100%; /* Квадратное соотношение для мобильных */
        max-width: 300px;
    }
}
