﻿/* ===================================================
   WATER QUALITY â€“ 2-column layout
   =================================================== */

/* ---- Main section ---- */
.wq-main-section {
    background: #f0f4f9;
    padding: 40px 0 80px;
    min-height: 80vh;
}

/* ---- 2-column layout ---- */
.wq-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 28px;
    align-items: start;
}

/* ===================================================
   SIDEBAR
   =================================================== */
.wq-sidebar-inner {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 20px rgba(0,80,160,0.09);
    overflow: hidden;
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #c5d8f0 transparent;
}

.wq-sidebar-inner::-webkit-scrollbar { width: 4px; }
.wq-sidebar-inner::-webkit-scrollbar-thumb { background: #c5d8f0; border-radius: 4px; }

/* Nav group */
.wq-nav-group { border-bottom: 1px solid #e8eef6; }
.wq-nav-group:last-child { border-bottom: none; }

.wq-nav-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 18px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    user-select: none;
    line-height: 1.35;
}

.wq-nav-group[data-color="blue"]   .wq-nav-group-header { background: linear-gradient(90deg, #0d2558, #0089d0); }
.wq-nav-group[data-color="cyan"]   .wq-nav-group-header { background: linear-gradient(90deg, #006699, #00b4d8); }
.wq-nav-group[data-color="green"]  .wq-nav-group-header { background: linear-gradient(90deg, #087c50, #20b886); }
.wq-nav-group[data-color="orange"] .wq-nav-group-header { background: linear-gradient(90deg, #7b3f00, #e07b39); }
.wq-nav-group[data-color="purple"] .wq-nav-group-header { background: linear-gradient(90deg, #4a1a8a, #8e5ff5); }

.wq-nav-group-header i:first-child {
    font-size: 0.9rem;
    opacity: 0.9;
    flex-shrink: 0;
}
.wq-nav-group-header span { flex: 1; }

.wq-nav-chevron {
    font-size: 0.75rem;
    flex-shrink: 0;
    transition: transform 0.25s;
}
.wq-nav-chevron.rotated { transform: rotate(180deg); }

.wq-nav-group-body { padding: 6px 0; }
.wq-nav-group-body.collapsed { display: none; }

/* Direct header (group with no children — acts as nav item) */
.wq-nav-group-header--direct {
    cursor: pointer;
    transition: filter 0.15s;
}
.wq-nav-group-header--direct:hover { filter: brightness(1.15); }
.wq-nav-group-header--direct.active { outline: 3px solid rgba(255,255,255,0.7); outline-offset: -3px; }

/* Direct year nav item (level-2 with no level-3 children) — mirrors .wq-nav-year */
.wq-nav-year-direct {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px 8px 16px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #1a3a6e;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
}
.wq-nav-year-direct i:first-child { color: #0089d0; font-size: 0.75rem; }
.wq-nav-year-direct:hover { background: #f0f6ff; color: #1a3a6e; }
.wq-nav-year-direct.active { background: #dceefb; color: #0055a5; }

/* Year button */
.wq-nav-year {
    width: 100%;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px 8px 16px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #1a3a6e;
    cursor: pointer;
    transition: background 0.15s;
}
.wq-nav-year:hover { background: #f0f6ff; }

.wq-nav-year i:first-child { color: #0089d0; font-size: 0.75rem; }
.wq-nav-year .fa-angle-down {
    font-size: 0.75rem;
    color: #aac0d8;
    transition: transform 0.25s;
}

/* Nav item */
.wq-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 18px 7px 34px;
    font-size: 0.82rem;
    color: #345a8a;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
}
.wq-nav-item i { font-size: 0.45rem; color: #b0c8e8; flex-shrink: 0; }
.wq-nav-item:hover { background: #e8f2fc; color: #0056b3; }
.wq-nav-item:hover i { color: #0089d0; }

.wq-nav-item.active {
    background: #dceefb;
    color: #0055a5;
    font-weight: 700;
}
.wq-nav-item.active i { color: #0089d0; }

/* Items inside group body (no year) */
.wq-nav-group-body > .wq-nav-item { padding-left: 18px; }

/* ===================================================
   CONTENT PANEL
   =================================================== */
.wq-content {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 20px rgba(0,80,160,0.09);
    padding: 28px 30px 30px;
    min-height: 500px;
}

.wq-content-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 2px solid #e6eef8;
}

.wq-content-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #0089d0, #0d2558);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.wq-content-icon i { font-size: 22px; color: #fff; }

.wq-content-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0d2558;
    margin: 0 0 3px;
}
.wq-content-subtitle {
    font-size: 0.82rem;
    color: #7a92aa;
    margin: 0;
}

/* File list */
.wq-file-list {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e8eef6;
}

.wq-file-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid #eef2f8;
    transition: background 0.15s;
}
.wq-file-item:last-child { border-bottom: none; }
.wq-file-item:hover { background: #f4f9ff; }

.wq-file-index {
    width: 30px;
    height: 30px;
    background: #e8f3fd;
    color: #0089d0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

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

.wq-file-title {
    display: block;
    color: #1a3a6e;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    line-height: 1.5;
    margin-bottom: 3px;
}
/* Chỉ link (có tệp đính kèm) mới có hiệu ứng hover */
a.wq-file-title--link:hover { color: #0089d0; text-decoration: underline; cursor: pointer; }

.wq-file-date {
    font-size: 0.78rem;
    color: #8aa0b8;
    display: flex;
    align-items: center;
    gap: 4px;
}

.wq-file-download {
    width: 36px;
    height: 36px;
    background: #e8f3fd;
    color: #0089d0;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-decoration: none;
    transition: all 0.2s;
}
.wq-file-download:hover { background: #0089d0; color: #fff; }

/* Empty */
.wq-empty {
    text-align: center;
    padding: 50px 20px;
    color: #a0b8cc;
}
.wq-empty i { font-size: 2.5rem; margin-bottom: 10px; display: block; }
.wq-empty p { margin: 0; font-size: 0.9rem; }

/* Pagination */
.pagination .page-link {
    border: 2px solid #0089d0;
    color: #0089d0;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 8px;
    transition: all 0.2s;
    margin: 0 3px;
}
.pagination .page-link:hover { background: #0089d0; color: #fff; }
.pagination .page-item.active .page-link { background: #0089d0; border-color: #0089d0; color: #fff; }

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 1100px) {
    .wq-layout { grid-template-columns: 260px 1fr; gap: 20px; }
}

@media (max-width: 991px) {
    .wq-layout {
        grid-template-columns: 1fr;
    }
    .wq-sidebar-inner {
        position: static;
        max-height: none;
        border-radius: 14px;
    }
    .wq-content {
        padding: 22px 18px;
    }
}

@media (max-width: 576px) {
    .wq-main-section { padding: 20px 0 50px; }
    .wq-content-title { font-size: 1rem; }
    .wq-file-item { padding: 12px 14px; gap: 10px; }
    .wq-file-title { font-size: 0.88rem; }
}

