/* Additional Custom Styles for PDA News Theme */

/* RADICALLY fix header width - fixed position */
body,
html {
    padding: 0 !important;
    margin: 0 !important;
}

.site-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 10000 !important;
}

.site-main {
    margin-top: 150px !important;
}

.header-top,
.header-main {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Single Post Layout with Sidebar */
.single .content-area {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

.single .posts-container {
    min-width: 0;
}

.single .single-post {
    margin-bottom: 0;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Share Buttons Styles */
.share-buttons {
    margin: 40px 0;
    padding: 30px;
    background: var(--light-bg);
    border-radius: 12px;
}

.share-buttons h3 {
    margin-bottom: 16px;
    font-size: 1.25rem;
}

.share-icons {
    display: flex;
    gap: 12px;
}

.share-icons a {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-size: 1.25rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.share-icons a:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.share-vk {
    background: #0077ff;
}

.share-telegram {
    background: #0088cc;
}

.share-twitter {
    background: #1da1f2;
}

.share-facebook {
    background: #1877f2;
}

/* Author Bio Styles */
.author-bio {
    display: flex;
    gap: 24px;
    padding: 30px;
    background: var(--light-bg);
    border-radius: 12px;
    margin: 40px 0;
}

.author-avatar img {
    border-radius: 50%;
    width: 80px;
    height: 80px;
}

.author-info {
    flex: 1;
}

.author-name {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.author-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Related Posts */
.related-posts {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid var(--border-color);
}

.related-posts h3 {
    font-size: 1.875rem;
    margin-bottom: 30px;
}

/* Post Tags */
.post-tags {
    margin: 30px 0;
    padding: 20px;
    background: var(--light-bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.post-tags i {
    color: var(--primary-color);
}

.post-tags a {
    padding: 6px 14px;
    background: #fff;
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.post-tags a:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Post Categories in Single */
.post-categories {
    margin-bottom: 16px;
}

.post-categories .post-category {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-right: 8px;
}

.post-categories .post-category:hover {
    background: var(--secondary-color);
}

/* Comments Styles */
.comments-area {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid var(--border-color);
}

.comments-title {
    font-size: 1.875rem;
    margin-bottom: 30px;
}

.comment-list {
    list-style: none;
}

.comment {
    padding: 24px;
    background: var(--light-bg);
    border-radius: 12px;
    margin-bottom: 20px;
}

.comment-author img {
    border-radius: 50%;
}

.comment-metadata {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

/* Tagcloud Styles */
.tagcloud a {
    display: inline-block;
    padding: 6px 14px;
    background: var(--light-bg);
    border-radius: 20px;
    margin: 4px;
    transition: all 0.3s ease;
    color: var(--text-secondary);
}

.tagcloud a:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Sticky Header Behavior */
.site-header {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.site-header.hidden {
    transform: translateY(-100%);
}

/* Social Links */
.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

.footer-widget .social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    font-size: 1.125rem;
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 20px 0;
    font-size: 0.875rem;
    color: var(--text-light);
}

.breadcrumbs a {
    color: var(--text-secondary);
}

.breadcrumbs a:hover {
    color: var(--primary-color);
}

/* No Posts Found */
.no-posts {
    text-align: center;
    padding: 80px 20px;
}

.no-posts h2 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.no-posts p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* Loading Animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(37, 99, 235, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-4px);
}

.scroll-to-top.visible {
    display: flex;
}

/* Category Count Badge */
.widget li .count {
    float: right;
    background: var(--light-bg);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .header-search input[type="search"] {
        width: 200px;
    }

    .header-search input[type="search"]:focus {
        width: 250px;
    }

    /* Single post sidebar на планшетах */
    .single .content-area {
        grid-template-columns: 1fr;
    }

    .single .sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .main-navigation {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: #fff;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
        z-index: 9999;
        padding: 80px 20px 20px;
        overflow-y: auto;
    }

    .main-navigation.active {
        left: 0;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }

    .main-navigation li {
        border-bottom: 1px solid var(--border-color);
    }

    .main-navigation a {
        display: block;
        padding: 16px 0;
    }

    .header-search {
        display: none;
    }

    .author-bio {
        flex-direction: column;
        text-align: center;
    }

    .share-icons {
        justify-content: center;
    }

    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .footer-widgets {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .featured-post {
        height: 400px;
    }

    .featured-post-content {
        padding: 24px;
    }

    .single-post-title {
        font-size: 1.5rem;
    }

    .single-post-content {
        font-size: 1rem;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .sidebar,
    .share-buttons,
    .related-posts,
    .comments-area,
    .scroll-to-top {
        display: none;
    }

    .content-area {
        grid-template-columns: 1fr;
    }

    .single-post {
        box-shadow: none;
    }
}
