:root {
    --primary-gradient: linear-gradient(135deg, #004c98, #41a5f6);
    --primary-dark: #004c98;
    --primary-light: #41a5f6;
    --text-dark: #1a1a1a;
    --text-light: #ffffff;
    --background-light: #f8f9fa;
    --neon-glow: #41a5f6;
}
.post-divider {
    border: 0;
    height: 1px;
    background: rgb(65 165 246 / 66%);
    margin: 0.5rem 0;
}

.sidebar-divider-light {
    border: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, #41a5f6, transparent);
    margin: 1.5rem 0;
    position: relative;
    box-shadow: 0 0 6px rgba(65, 165, 246, 0.5);
    border-radius: 1px;
}


.sidebar-divider {
    border: 0;
    height: 3px;
    background: var(--primary-gradient);
    margin: 2rem 0;
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(65, 165, 246, 0.5);
}

.sidebar-section {
    margin-bottom: 1rem;
}
.sidebar {
    position: sticky;
    top: 2px;
    align-self: flex-start;
    max-height: none; /* hoặc để trống */
    overflow: visible; /* không cần auto */
    flex: 1;
    max-width: 350px;
    min-width: 220px;
    width: 100%;
    height: auto;
    background: linear-gradient(145deg, #ffffff, #f1f4f8);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(65, 165, 246, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}


.sidebar:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.sidebar h3 {
font-weight: 600;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    position: relative;
    text-transform: uppercase;
    display: flex;
    align-items: center;
}
.sidebar h3 i {
    margin-right: 0.5rem;
    color: var(--primary-dark); /* Cùng màu với tiêu đề */
    font-size: 1.2rem;
}
.sidebar h3::after {
    content: '';
    width: 40px;
    height: 3px;
    background: var(--primary-gradient);
    position: absolute;
    bottom: -5px;
    left: 0;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin-bottom: 0.8rem;
}

.sidebar ul li a {
    text-decoration: none;
    color: var(--primary-light);
    font-size: 1rem;
    transition: color 0.3s ease;

    white-space: nowrap;       /* Không xuống dòng */
    overflow: hidden;          /* Ẩn phần vượt quá */
    text-overflow: ellipsis;   /* Thêm dấu "..." */
    display: block;            /* Đảm bảo áp dụng đầy đủ với block-level */
    max-width: 100%;           /* Giới hạn chiều rộng */
}


.sidebar ul li a:hover {
    color: var(--section-bg-articles);
}

.sidebar img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.sidebar img:hover {
    transform: scale(1.05);
}

/* Button Styles */
.back-button, .all-categories-button {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-light);
    background: var(--primary-gradient);
    border-radius: 8px;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.back-button:hover, .all-categories-button:hover {
    background: linear-gradient(135deg, #005bb5, #5cb8ff);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Header Row */
.header-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.header-row .section-title {
    width: 100%;
    text-align: center;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 600px;
    gap: 1rem;
}

.header-controls .all-categories-button {
    flex-shrink: 0;
}

.header-controls .sort-filter {
    flex-shrink: 0;
}

.header-controls .sort-filter select {
    padding: 0.5rem;
    font-size: 0.9rem;
    border-radius: 5px;
    border: 1px solid var(--primary-dark);
    background: var(--text-light);
    color: var(--primary-dark);
    cursor: pointer;
    min-width: 120px;
}

/* Content Wrapper */
.content-wrapper {
    display: flex;
    max-width: 1200px;
    margin: 2rem auto;
    gap: 2rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .content-wrapper {
        flex-direction: column;
        gap: 1rem;
    }

    .sidebar {
        padding: 1.5rem;
    }

    .sidebar h3 {
        font-size: 1.2rem;
    }

}
.sidebar-section ul li {
    display: flex;
    align-items: center;
}
.sidebar-section ul li::before {
    content: "»";
    color: var(--primary-light);
    font-weight: bold;
    margin-right: 5px;
    margin-left: 5px;
}
.sidebar-section h4 {
    font-family: 'Roboto', sans-serif;
    font-size: 1.2rem;
    color: var(--primary-dark);
    margin: 1rem 0 0.5rem;
}
.custom-content {
    font-size: 1rem;
    color: var(--neon-glow);
    
    white-space: nowrap;    
    overflow: hidden;        
    text-overflow: ellipsis;      
}

@media (max-width: 576px) {
    .sidebar {
        max-width: 100%;
    }

    .sidebar h3 {
        font-size: 1.2rem;
    }


    .header-row .section-title {
        font-size: 1.8rem;
    }

    .header-controls {
        max-width: 100%;
        gap: 0.5rem;
    }

    .header-controls .sort-filter select {
        font-size: 0.8rem;
        min-width: 100px;
    }


/* Responsive: Vô hiệu sticky trên mobile nếu cần */
@media (max-width: 768px) {
    .sidebar {
        position: static;
        max-height: none;
    }
}
}
