/**
 * Willow - Author & TOC Sidebar
 * Guidebook: Montserrat, Abstract Purple #322242
 */

.press-single-content {
    overflow-x: visible !important;
    overflow-y: visible !important;
}

/* ============================================
   Grid Layout for Press Single
   ============================================ */

.press-single-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 64px;
    align-items: stretch;
    position: relative;
    overflow: visible;
}

.press-single-main {
    min-width: 0;
    position: relative;
}

.willow-single-sidebar {
    position: relative;
    height: 100%;
}

/* ============================================
   Sidebar Container (Sticky)
   ============================================ */

.willow-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 135px; /* Отступ от верха экрана */
    
    /* Стилизация по гайдбуку */
    background: #FFFFFF;
    border: 1px solid #E0BA95; /* Light Coffee */
    border-radius: 8px;
    padding: 32px 28px;
    box-shadow: 0 4px 12px rgba(50, 34, 66, 0.08); /* Abstract Purple 8% */
    font-family: 'Montserrat', sans-serif;
    z-index: 10;
    
    /* Убираем внутренние ограничения */
    max-height: none;
    overflow: visible;
}

/* ============================================
   Author Block
   ============================================ */
.willow-authors-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    font-family: 'Montserrat', sans-serif;
}

.willow-author-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.willow-author-avatar {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: #F8F8F8;
    border: 2px solid #C7B6D8; /* Lavender */
}

.willow-author-avatar img {
    width: 100%;
    height: auto;
}

.willow-author-avatar.is-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F8F8F8;
    border: 2px solid #C7B6D8;
}

.willow-author-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 8px;
}

.willow-author-name {
    color: #322242; /* Abstract Purple */
    font-weight: 600; /* Regular */
    font-size: 16px;
    text-decoration: none;
    line-height: 1.3;
}

.willow-author-position {
    color: #52366E;
    font-weight: 300; /* Light */
    font-size: 14px;
    line-height: 1.4;
}

/* ============================================
   TOC Block
   ============================================ */

.willow-toc-block {
    margin-top: 32px;
    padding-top: 28px;
    border-top: 2px solid #322242; /* Abstract Purple */
}

.willow-toc-header {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(224, 186, 149, 0.4); /* Light Coffee */
}

.willow-toc-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #322242; /* Abstract Purple */
}

.willow-toc-content {
    /* TOC list styles */
}

.willow-toc-content ul,
.willow-toc-content ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

.willow-toc-content li {
    margin-bottom: 8px;
}

.willow-toc-content a {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: rgba(50, 34, 66, 0.85);
    text-decoration: none;
    line-height: 1.5;
    padding: 6px 0;
    border-bottom: 1px solid rgba(224, 186, 149, 0.15);
    transition: all 0.2s ease;
    cursor: pointer;
}

.willow-toc-content a:hover {
    color: #52366E; /* Astronomist */
    padding-left: 8px;
    border-bottom-color: #52366E;
}

/* Hierarchy levels */
.willow-toc-content li li {
    padding-left: 16px;
    margin-top: 4px;
}

.willow-toc-content li li a {
    font-size: 12px;
    color: rgba(50, 34, 66, 0.7);
}

.willow-toc-content li li li {
    padding-left: 32px;
}

/* Active link */
.willow-toc-content a.is-active {
    color: #52366E;
    font-weight: 500;
    border-bottom-color: #52366E;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1100px) {
    .press-single-grid {
        grid-template-columns: 1fr;
        gap: 48px;
        align-items: start; /* На мобильных возвращаем start, чтобы не было пустоты */
    }
    
    .willow-single-sidebar {
        position: static;
        height: auto;
        order: 2;
    }
    
    .willow-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .press-single-grid {
        gap: 32px;
    }
    
    .willow-sidebar {
        padding: 24px 20px;
    }
    
    .willow-author-block {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .willow-author-avatar {
        width: 96px;
        height: 96px;
    }
}

/* Print styles */
@media print {
    .willow-sidebar {
        display: none;
    }
}