/* VC.ru Style Layout */

/* Top Navigation Bar */
.top-nav-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: var(--space-3) 0;
    position: sticky;
    top: 80px;
    z-index: 999;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.top-nav-links {
    display: flex;
    gap: var(--space-4);
    align-items: center;
    flex-wrap: wrap;
}

.top-nav-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.top-nav-link:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.top-nav-link.active {
    background: var(--accent);
    color: var(--text-inverse);
}

.nav-icon {
    font-size: var(--text-base);
}

/* VC Container Layout */
.vc-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-6) var(--space-4);
}

.vc-layout {
    display: grid;
    grid-template-columns: 220px 1fr 280px;
    gap: var(--space-6);
    align-items: start;
}

/* Left Sidebar */
.vc-sidebar-left {
    position: sticky;
    top: 140px;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    padding-right: var(--space-2);
}

.vc-sidebar-left::-webkit-scrollbar {
    width: 6px;
}

.vc-sidebar-left::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: var(--radius-full);
}

.vc-sidebar-right::-webkit-scrollbar {
    width: 6px;
}

.vc-sidebar-right::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: var(--radius-full);
}

.sidebar-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-bottom: var(--space-4);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sidebar-title {
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--border);
}

.themes-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.theme-link-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    position: relative;
    min-width: 0;
    width: 100%;
}

.theme-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: var(--space-2) var(--space-3);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--text-sm);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-weight: var(--font-normal);
    flex: 1;
    min-width: 0;
    position: relative;
}

.theme-link span:last-child {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-left: 0;
    padding-left: 30px;
    display: block;
}

.theme-subscribe-btn {
    width: 24px;
    height: 24px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    padding: 0;
}

.theme-subscribe-btn:hover {
    background: var(--accent);
    color: var(--text-inverse);
    border-color: var(--accent);
}

.theme-subscribe-btn.subscribed {
    background: var(--accent);
    color: var(--text-inverse);
    border-color: var(--accent);
}

.theme-link:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.theme-link.active {
    background: var(--accent);
    color: var(--text-inverse);
}

.theme-icon {
    font-size: 1.25rem;
    width: 24px;
    min-width: 24px;
    max-width: 24px;
    height: 24px;
    text-align: center;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin: 0;
    padding: 0;
    overflow: visible;
    box-sizing: border-box;
    vertical-align: middle;
}

.hashtags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    max-height: 300px;
    overflow-y: auto;
}

.hashtags-cloud::-webkit-scrollbar {
    width: 4px;
}

.hashtags-cloud::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: var(--radius-full);
}

.hashtag-wrapper {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    margin-bottom: var(--space-1);
}

.hashtag-link {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--text-xs);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    line-height: 1.8;
}

.hashtag-subscribe-btn {
    width: 20px;
    height: 20px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 10px;
    font-weight: var(--font-bold);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    padding: 0;
}

.hashtag-subscribe-btn:hover {
    background: var(--accent);
    color: var(--text-inverse);
    border-color: var(--accent);
}

.hashtag-subscribe-btn.subscribed {
    background: var(--accent);
    color: var(--text-inverse);
    border-color: var(--accent);
}

.hashtag-link:hover {
    background: var(--accent);
    color: var(--text-inverse);
}

.hashtag-link.active {
    background: var(--accent);
    color: var(--text-inverse);
}

/* Center Feed */
.vc-center {
    min-width: 0;
}

.articles-feed {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.feed-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    transition: all var(--transition-base);
    margin-bottom: var(--space-4);
}

.feed-item:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

/* Editorial articles (with #ОтРедакции tag) */
.feed-item.editorial-article {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, rgba(255, 165, 0, 0.05) 100%);
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.15);
}

.feed-item.editorial-article:hover {
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.25);
}

/* Author medal for top authors */
.author-medal {
    display: inline-block;
    font-size: 0.9em;
    margin-left: var(--space-1);
    vertical-align: middle;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
    animation: medal-glow 2s ease-in-out infinite;
}

@keyframes medal-glow {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.4));
    }
}

.feed-item-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    font-size: var(--text-sm);
    flex-wrap: wrap;
}

.feed-author {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
    color: var(--text-primary);
    font-weight: var(--font-semibold);
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.author-name {
    font-weight: var(--font-semibold);
}

.feed-category {
    color: var(--accent);
    text-decoration: none;
    font-size: var(--text-xs);
    white-space: nowrap;
}

.feed-time {
    color: var(--text-muted);
    font-size: var(--text-xs);
    margin-left: auto;
    white-space: nowrap;
}

.feed-title {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-3);
    line-height: var(--leading-tight);
}

.feed-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.feed-title a:hover {
    color: var(--accent);
}

.feed-excerpt {
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-4);
}

.feed-image {
    margin: var(--space-4) 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--bg-secondary);
}

.feed-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.feed-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.3) 30%, rgba(255, 255, 255, 0.7) 70%, rgba(255, 255, 255, 0.95) 100%);
    pointer-events: none;
    z-index: 2;
}

.feed-image.cropped {
    overflow: hidden;
}

.feed-image.cropped img {
    object-position: top;
}

.feed-image.expanded {
    aspect-ratio: auto;
}

.feed-image.expanded img {
    height: auto;
    object-fit: contain;
}

.feed-image.expanded::after {
    display: none;
}

.feed-image-expand-btn {
    position: absolute;
    bottom: var(--space-2);
    right: var(--space-2);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: var(--text-sm);
    transition: all var(--transition-fast);
    z-index: 10;
    display: none;
}

.feed-image.cropped .feed-image-expand-btn {
    display: block;
}

.feed-image-expand-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

.feed-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
}

.feed-stats {
    display: flex;
    gap: var(--space-4);
}

.feed-stat {
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.feed-read-more {
    color: var(--accent);
    text-decoration: none;
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
    transition: color var(--transition-fast);
}

.feed-read-more:hover {
    color: var(--accent-hover);
}

/* Right Sidebar */
.vc-sidebar-right {
    position: sticky;
    top: 140px;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
}

.top-authors-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.top-author-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2);
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.top-author-item:hover {
    background: var(--bg-secondary);
}

.author-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--accent-gradient);
    color: var(--text-inverse);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.author-link {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
    flex: 1;
    min-width: 0;
}

.top-author-link {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
    flex: 1;
    min-width: 0;
}

.top-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--border);
}

.top-author-info {
    flex: 1;
    min-width: 0;
}

.top-author-name {
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-author-stats {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-xs);
    color: var(--text-muted);
    white-space: nowrap;
}

.author-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--border);
}

.author-info {
    flex: 1;
    min-width: 0;
}

.author-name-small {
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.author-stats-small {
    font-size: var(--text-xs);
    color: var(--text-muted);
    white-space: nowrap;
}

.widget-placeholder {
    min-height: 100px;
    background: transparent;
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    color: var(--text-muted);
    text-align: center;
    font-size: var(--text-xs);
    display: none; /* Скрываем placeholder пока не добавим виджеты */
}

.no-articles {
    text-align: center;
    padding: var(--space-12);
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1200px) {
    .vc-layout {
        grid-template-columns: 200px 1fr 240px;
        gap: var(--space-4);
    }
}

@media (max-width: 968px) {
    .vc-layout {
        grid-template-columns: 1fr;
    }
    
    .vc-sidebar-left,
    .vc-sidebar-right {
        position: static;
        max-height: none;
    }
    
    .vc-sidebar-left {
        order: 2;
    }
    
    .vc-center {
        order: 1;
    }
    
    .vc-sidebar-right {
        order: 3;
    }
}

