/*
Theme Name: Elite Wiki
Description: A clean, modern wiki-style WordPress theme with sidebar navigation and responsive design.
Author: Webmaster.group
Version: 1.0
License: GPL v2 or later
Text Domain: elite-wiki
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    line-height: 1.6;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar trái - màu cam */
.sidebar {
    width: 300px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.logo {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.logo h1 {
    color: #ff6b35;
    font-size: 24px;
    font-weight: bold;
}

.logo h1 a {
    color: #ff6b35;
    text-decoration: none;
    transition: color 0.3s;
}

.logo h1 a:hover {
    color: #e55a2b;
}

.logo a {
    text-decoration: none;
    color: inherit;
}

.search-box {
    margin-bottom: 25px;
}

.search-box input {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-box input:focus {
    outline: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Thư mục dropdown */
.folder-section {
    margin-bottom: 25px;
}

.folder-title {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.folder-title:hover {
    background: rgba(255,255,255,0.3);
}

.folder-content {
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 10px;
    display: none;
}

.folder-content.active {
    display: block;
}

.article-item {
    color: white;
    text-decoration: none;
    display: block;
    padding: 6px 10px;
    border-radius: 4px;
    margin-bottom: 3px;
    font-size: 14px;
    transition: background 0.3s ease;
}

.article-item:hover {
    background: rgba(255,255,255,0.2);
    color: white;
    text-decoration: none;
}

.article-item.hot {
    position: relative;
}

.article-item.hot::before {
    content: "🔥";
    margin-right: 5px;
}

.view-more {
    color: #fff;
    font-size: 12px;
    font-style: italic;
    text-align: center;
    padding: 5px;
    cursor: pointer;
    opacity: 0.8;
}

/* Tags section */
.tags-section {
    margin-bottom: 25px;
}

.section-title {
    color: white;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 16px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.3s ease;
}

.tag:hover {
    background: rgba(255,255,255,0.3);
    color: white;
    text-decoration: none;
}

/* Stats section */
.stats-section {
    color: white;
}

.stat-item {
    background: rgba(255,255,255,0.1);
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

/* Main content - màu vàng nhạt */
.main-content {
    flex: 1;
    margin-left: 320px;
    padding: 30px;
    background: linear-gradient(135deg, #fff9e6, #ffeaa7);
}

.content-header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.content-header h1,
.content-header h2 {
    color: #2d3436;
    font-size: 28px;
    margin-bottom: 10px;
}

.breadcrumb {
    color: #636e72;
    font-size: 14px;
}

.breadcrumb a {
    color: #636e72;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #ff6b35;
}

/* Articles grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.article-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.article-card.hot {
    border-left: 4px solid #e17055;
}

.article-card h3 {
    color: #2d3436;
    font-size: 18px;
    margin-bottom: 8px;
}

.article-card h3 a {
    color: inherit;
    text-decoration: none;
}

.article-card h3 a:hover {
    color: #ff6b35;
}

.article-card p {
    color: #636e72;
    font-size: 14px;
    line-height: 1.5;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 12px;
    color: #95a5a6;
}

/* Single post styles */
.single-post {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    line-height: 1.8;
}

.single-post h1 {
    color: #2d3436;
    font-size: 32px;
    margin-bottom: 15px;
}

.single-post .post-meta {
    color: #636e72;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.single-post .post-content h2 {
    color: #2d3436;
    font-size: 24px;
    margin-top: 30px;
    margin-bottom: 15px;
}

.single-post .post-content h3 {
    color: #2d3436;
    font-size: 20px;
    margin-top: 25px;
    margin-bottom: 10px;
}

.single-post .post-content p {
    margin-bottom: 15px;
}

.single-post .post-content ul,
.single-post .post-content ol {
    margin-bottom: 15px;
    padding-left: 30px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.page-numbers {
    padding: 8px 16px;
    background: white;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    color: #2d3436;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.page-numbers:hover,
.page-numbers.current {
    background: #ff6b35;
    color: white;
    text-decoration: none;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background: #ff6b35;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

/* Footer */
.site-footer {
    background: #2d3436;
    color: white;
    padding: 20px 0;
    text-align: center;
    margin-top: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.site-footer a {
    color: #74b9ff;
    text-decoration: none;
    margin: 0 10px;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* WordPress specific */
.wp-block-image {
    margin-bottom: 20px;
}

.wp-block-quote {
    background: #f8f9fa;
    padding: 20px;
    border-left: 4px solid #ff6b35;
    margin: 20px 0;
    border-radius: 4px;
}

/* Comments */
.comments-area {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 30px;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 280px;
    }
    
    .main-content {
        margin-left: 300px;
        padding: 25px;
    }
}

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

    .sidebar {
        width: 300px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .mobile-overlay.active {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
        padding: 60px 15px 20px 15px;
    }

    .content-header h1,
    .content-header h2 {
        font-size: 24px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .article-card {
        padding: 15px;
    }

    .article-card h3 {
        font-size: 16px;
    }

    .logo h1 {
        font-size: 20px;
    }

    .folder-title {
        padding: 8px 12px;
        font-size: 14px;
    }

    .section-title {
        font-size: 14px;
    }

    .tags {
        gap: 3px;
    }

    .tag {
        font-size: 11px;
        padding: 3px 6px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 60px 10px 15px 10px;
    }

    .content-header {
        padding: 15px;
        margin-bottom: 20px;
    }

    .content-header h1,
    .content-header h2 {
        font-size: 20px;
    }

    .breadcrumb {
        font-size: 12px;
    }

    .article-card {
        padding: 12px;
    }

    .article-card h3 {
        font-size: 15px;
        margin-bottom: 6px;
    }

    .article-card p {
        font-size: 13px;
    }

    .article-meta {
        font-size: 11px;
    }

    .pagination {
        gap: 5px;
        flex-wrap: wrap;
    }

    .page-numbers {
        padding: 6px 12px;
        font-size: 14px;
    }

    .sidebar {
        width: 280px;
        padding: 15px;
    }

    .logo {
        padding: 12px;
        margin-bottom: 15px;
    }

    .search-box input {
        padding: 10px;
        font-size: 14px;
    }

    .footer-content {
        padding: 0 15px;
        font-size: 14px;
    }

    .site-footer a {
        margin: 0 5px;
        display: inline-block;
        margin-bottom: 5px;
    }

    .single-post {
        padding: 20px 15px;
    }

    .single-post h1 {
        font-size: 24px;
        line-height: 1.3;
    }

    .single-post .post-content h2 {
        font-size: 20px;
        margin-top: 25px;
        margin-bottom: 10px;
    }

    .single-post .post-content h3 {
        font-size: 18px;
    }

    .single-post .post-meta {
        font-size: 12px;
        flex-wrap: wrap;
    }

    .single-post .post-content ul,
    .single-post .post-content ol {
        padding-left: 20px;
    }
}

@media (max-width: 360px) {
    .sidebar {
        width: 260px;
    }

    .main-content {
        padding: 55px 8px 12px 8px;
    }

    .content-header {
        padding: 12px;
    }

    .article-card {
        padding: 10px;
    }

    .tags {
        justify-content: center;
    }

    .stats-section {
        font-size: 13px;
    }

    .stat-item {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Wiki Styles */
.wiki-navigation .category-item {
    margin-bottom: 10px;
}

.wiki-navigation .subcategories {
    margin-left: 20px;
    margin-top: 5px;
}

.wiki-navigation .subcat-item {
    display: block;
    padding: 3px 10px;
    color: #666;
    font-size: 14px;
}

.wiki-navigation .subcat-item:hover {
    color: #ff6b35;
}

.wiki-quick-links {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.wiki-quick-links h3 {
    margin-bottom: 10px;
    color: #333;
}

.quick-link {
    display: block;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.quick-link:hover {
    background: #ff6b35;
    color: white;
}

.quick-link .icon {
    margin-right: 8px;
}

.wiki-stats {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.wiki-stats h3 {
    margin-bottom: 10px;
    color: #333;
}

.wiki-stats ul {
    list-style: none;
}

.wiki-stats li {
    padding: 5px 0;
    color: #666;
}

/* Wiki Archive Styles */
.wiki-archive-header {
    margin-bottom: 30px;
}

.wiki-archive-header h1 {
    font-size: 32px;
    margin-bottom: 15px;
}

.term-description {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
}

.wiki-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.wiki-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.wiki-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.wiki-card h2,
.wiki-card h3 {
    margin-bottom: 10px;
}

.wiki-card h2 a,
.wiki-card h3 a {
    color: #333;
    text-decoration: none;
}

.wiki-card h2 a:hover,
.wiki-card h3 a:hover {
    color: #ff6b35;
}

.wiki-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.wiki-meta a {
    color: #ff6b35;
    text-decoration: none;
}

.wiki-meta a:hover {
    text-decoration: underline;
}

.wiki-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.read-more {
    color: #ff6b35;
    text-decoration: none;
    font-weight: 500;
}

.read-more:hover {
    text-decoration: underline;
}

.no-wikis {
    text-align: center;
    padding: 60px 20px;
}

.create-wiki-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 24px;
    background: #ff6b35;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.create-wiki-btn:hover {
    background: #e55a2b;
}

/* Wiki Single Styles */
.single-wiki {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.wiki-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.wiki-header h1 {
    font-size: 36px;
    margin-bottom: 15px;
}

.wiki-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.wiki-content h2 {
    font-size: 28px;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #333;
}

.wiki-content h3 {
    font-size: 22px;
    margin-top: 25px;
    margin-bottom: 12px;
    color: #444;
}

.wiki-content p {
    margin-bottom: 20px;
}

.wiki-content ul,
.wiki-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

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

.wiki-nav {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.wiki-nav-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.wiki-nav-prev,
.wiki-nav-next {
    display: block;
    padding: 10px 20px;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
}

.wiki-nav-prev:hover,
.wiki-nav-next:hover {
    background: #ff6b35;
    color: white;
}

/* Table of Contents */
.toc-list {
    list-style: none;
    padding: 0;
}

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

.toc-list li.h3-item {
    margin-left: 20px;
}

.toc-list a {
    color: #666;
    text-decoration: none;
    display: block;
    padding: 5px 10px;
    border-radius: 3px;
    transition: all 0.3s;
}

.toc-list a:hover {
    background: #f8f9fa;
    color: #ff6b35;
}

.no-toc,
.no-related {
    color: #999;
    font-style: italic;
    padding: 10px;
}

/* Wiki Info */
.wiki-info {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.wiki-info h3 {
    margin-bottom: 10px;
    color: #333;
}

.wiki-info p {
    margin-bottom: 8px;
    color: #666;
    font-size: 14px;
}

.edit-wiki-link {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 15px;
    background: #ff6b35;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    transition: background 0.3s;
}

.edit-wiki-link:hover {
    background: #e55a2b;
}

/* Wiki Home Styles */
.wiki-home-header {
    margin-bottom: 40px;
}

.wiki-home-header h1 {
    font-size: 36px;
    margin-bottom: 20px;
}

.wiki-home-intro {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
}

.featured-wikis,
.recent-wikis,
.popular-tags {
    margin-bottom: 50px;
}

.featured-wikis h2,
.recent-wikis h2,
.popular-tags h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.wiki-grid.featured {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.featured-card {
    background: linear-gradient(135deg, #fff5f3, #fff);
    border: 2px solid #ff6b35;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-cloud .tag {
    display: inline-block;
    padding: 3px 10px;
    background: #ff6b35;
    color: white;
    text-decoration: none;
    border-radius: 15px;
    transition: all 0.3s;
    font-size: 13px !important;
    margin: 3px;
}

.tag-cloud .tag:hover {
    background: #e55a2b;
    color: white;
    transform: scale(1.05);
}

/* Wiki Comments */
.wiki-comments {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

/* Pagination */
.wiki-pagination {
    text-align: center;
    margin-top: 40px;
}

.wiki-pagination a,
.wiki-pagination span {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 5px;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
}

.wiki-pagination a:hover {
    background: #ff6b35;
    color: white;
}

.wiki-pagination .current {
    background: #ff6b35;
    color: white;
}