/* ============================================
   Layout & Header
============================================ */
/* Top Info Bar */
.top-info-bar {
    background: white;
    border-bottom: 1px solid var(--board-gray-300);
    padding: 0.5rem 0;
    font-size: 0.8rem;
}

.top-info-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-info-left {
    display: flex;
    gap: 1rem;
    align-items: center;
    color: var(--board-gray-600);
}

.top-info-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.top-info-item i {
    font-size: 0.9rem;
}

.top-info-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-selector {
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--board-gray-300);
    border-radius: 4px;
    background: white;
    font-size: 0.8rem;
    cursor: pointer;
    color: var(--board-gray-700);
}

/* Header */
.header {
    background: white;
    border-bottom: 1px solid var(--board-gray-300);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.logo i {
    font-size: 1.6rem;
}

.nav-menu {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    align-items: center;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    text-decoration: none;
    color: var(--board-gray-700);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-menu a:hover {
    background: var(--board-gray-100);
    color: var(--primary-color);
}

.nav-menu a i {
    font-size: 1rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-box {
    position: relative;
}

.search-box input {
    padding: 0.6rem 2.8rem 0.6rem 1rem;
    border: 1px solid var(--board-gray-300);
    border-radius: 20px;
    width: 220px;
    font-size: 0.85rem;
    font-family: inherit;
}

.search-box input::placeholder {
    color: var(--board-gray-500);
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    background: var(--primary-color);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Main Container */
.main-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 250px 1fr 300px;
    gap: 2rem;
}

/* ============================================
   Sidebar
============================================ */
.sidebar {
    background: white;
    border: 1px solid var(--board-gray-300);
    border-radius: 8px;
    padding: 0;
    height: 100%;
    position: sticky;
    top: 100px;
    align-self: start;
    overflow-y: auto;
    max-height: calc(100vh - 120px);
}

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

.sidebar::-webkit-scrollbar-track {
    background: var(--board-gray-100);
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--board-gray-400);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--board-gray-500);
}

.sidebar-section {
    margin-bottom: 0;
    border-bottom: 1px solid var(--board-gray-200);
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-color);
    padding: 1rem 1.2rem 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.sidebar-title i {
    font-size: 1rem;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: white;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-menu li a {
    text-decoration: none;
    color: var(--board-gray-700);
    font-size: 0.8rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1.2rem 0.4rem 2.8rem;
    transition: all 0.2s;
    position: relative;
}

.sidebar-menu li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #0066cc;
    opacity: 0;
    transition: opacity 0.2s;
}

.sidebar-menu li a:hover {
    background: var(--board-gray-200);
    color: var(--primary-color);
}

.sidebar-menu li a:hover::before {
    opacity: 1;
}

.sidebar-menu li a.active {
    background: #e7f3ff;
    color: #0066cc;
    font-weight: 600;
}

.sidebar-menu li a.active::before {
    opacity: 1;
    background: #0066cc;
}

/* ============================================
   Main Content
============================================ */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Hero Banner */
.hero-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 1px solid var(--board-gray-300);
    border-radius: 12px;
    padding: 3rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-banner h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hero-banner p {
    font-size: 0.95rem;
    opacity: 0.95;
    margin-bottom: 1.5rem;
}

.hero-decoration {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 8rem;
    opacity: 0.15;
}

/* Section */
.section {
    background: white;
    border: 1px solid var(--board-gray-300);
    border-radius: 8px;
    padding: 1.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--board-gray-300);
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--board-gray-900);
}

/* Post List */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.post-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--board-gray-300);
    transition: background 0.2s;
    cursor: pointer;
}

.post-item:last-child {
    border-bottom: none;
}

.post-item:hover {
    background: var(--board-gray-100);
}

.post-content {
    flex: 1;
}

.post-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--board-gray-900);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-meta {
    font-size: 0.75rem;
    color: var(--board-gray-600);
    display: flex;
    gap: 0.6rem;
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.card {
    background: var(--board-gray-100);
    border: 1px solid var(--board-gray-300);
    border-radius: 10px;
    padding: 1.8rem 1.2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
    background: white;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--board-gray-900);
    margin-bottom: 0.4rem;
}

.card-subtitle {
    font-size: 0.75rem;
    color: var(--board-gray-600);
}

/* ============================================
   Right Sidebar
============================================ */
.right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.widget {
    background: white;
    border: 1px solid var(--board-gray-300);
    border-radius: 8px;
    padding: 1.5rem;
}

.widget-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--board-gray-900);
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--board-gray-300);
}

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

.widget-item {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--board-gray-200);
}

.widget-item:last-child {
    border-bottom: none;
}

.widget-item a {
    text-decoration: none;
    color: var(--board-gray-700);
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s;
}

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

.widget-count {
    color: var(--board-gray-600);
    font-size: 0.75rem;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ============================================
   Slider Section
============================================ */
.slider-wrapper {
    position: relative;
    overflow: hidden;
    padding: 0 0.5rem;
}

.slider-track {
    display: flex;
    gap: 1rem;
    transition: transform 0.4s ease-in-out;
}

.slider-card {
    flex: 0 0 calc(25% - 0.75rem);
    /* 4 items per row with gap */
    background: white;
    border: 1px solid var(--board-gray-300);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.slider-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.slider-thumb {
    width: 100%;
    height: 160px;
    background: #eee;
    position: relative;
    overflow: hidden;
}

.slider-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.slider-card:hover .slider-thumb img {
    transform: scale(1.05);
}

.slider-nav-btn {
    position: absolute;
    top: 40%;
    /* Adjust to center vertically relative to cards */
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: white;
    border: 1px solid var(--board-gray-300);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
    color: var(--board-gray-700);
    font-size: 1.2rem;
    transition: all 0.2s;
}

.slider-nav-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.slider-nav-btn.prev {
    left: 0px;
}

.slider-nav-btn.next {
    right: 0px;
}

.slider-content {
    padding: 1rem;
}

.slider-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--board-gray-900);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.slider-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.75rem;
    color: var(--board-gray-600);
    margin-top: 0.8rem;
}

.slider-meta-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.slider-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.slider-dot {
    width: 8px;
    height: 8px;
    background: var(--board-gray-300);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.slider-dot.active {
    background: var(--primary-color);
    width: 24px;
    border-radius: 4px;
}

/* ============================================
   Footer
============================================ */
.footer {
    background: white;
    border-top: 1px solid var(--board-gray-300);
    padding: 0;
    margin-top: 4rem;
    color: var(--board-gray-700);
    font-size: 0.85rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-menu-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--board-gray-200);
}

.footer-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.footer-links a {
    color: var(--board-gray-800);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

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

.footer-utils {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.footer-util-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--board-gray-800);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.85rem;
}

.footer-util-item i {
    font-size: 1.1rem;
    color: var(--board-gray-600);
}

.footer-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--board-gray-700);
}

.footer-logo i {
    font-size: 1.6rem;
}

.footer-copyright {
    color: var(--board-gray-500);
    font-size: 0.8rem;
}

.footer-version {
    color: var(--board-gray-800);
    font-weight: 600;
    font-size: 0.85rem;
}

/* ============================================
   Responsive
============================================ */
/* Menu Toggle Button */
.menu-toggle-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--board-gray-700);
    padding: 0.5rem;
    margin-right: 0.5rem;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* ============================================
   Responsive
============================================ */
@media (max-width: 1200px) {
    .main-container {
        grid-template-columns: 1fr;
    }

    .menu-toggle-btn {
        display: block;
    }

    .sidebar {
        /* display: none; -> Removed to allow off-canvas */
        position: fixed;
        top: 0;
        left: -280px;
        /* Hide off-screen */
        width: 280px;
        height: 100vh;
        z-index: 1002;
        transition: left 0.3s ease-in-out;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        border-radius: 0;
        border: none;
        max-height: 100vh;
    }

    .sidebar.active {
        left: 0;
    }

    .right-sidebar {
        display: flex;
        /* Changed from none to flex */
        margin-top: 2rem;
    }

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .slider-card {
        flex: 0 0 calc(33.333% - 0.67rem);
    }
}

@media (max-width: 768px) {
    .top-info-container {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .top-info-right {
        width: 100%;
        justify-content: flex-end;
    }

    .nav-menu {
        display: none;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .hero-banner {
        padding: 2rem;
    }

    .hero-banner h1 {
        font-size: 1.4rem;
    }

    .search-box input {
        width: 150px;
    }

    .slider-card {
        flex: 0 0 calc(50% - 0.5rem);
    }
}

@media (max-width: 480px) {
    .slider-card {
        flex: 0 0 100%;
    }
}