/* ==========================================================================
   POSTS INDEX PAGE STYLING
   Primary Palette:
   - Green (Chủ đạo): var(--color-3, #0e6938), #094826 (darker hover), #eaf5ee (light tint)
   - Yellow (Điểm nhấn): #fcbb01, #fff9e6
   - Red (Điểm nhấn): var(--color-5, #e50308), #fee2e2
   ========================================================================== */

.news-page-wrapper {
    background: #f8faf9;
    padding: 30px 0 50px;
    color: #333333;
}

/* 1. Header & Filters */
.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.news-main-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.news-main-title span {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--color-3, #0e6938);
    background: #eaf5ee;
    padding: 3px 12px;
    border-radius: 20px;
    border: 1px solid rgba(14, 105, 56, 0.15);
}

.news-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.news-sort-select {
    padding: 8px 30px 8px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    background: #ffffff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%230e6938" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9l6 6 6-6"/></svg>') no-repeat right 10px center;
    appearance: none;
    outline: none;
    min-width: 130px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.news-sort-select:hover,
.news-sort-select:focus {
    border-color: var(--color-3, #0e6938);
    box-shadow: 0 0 0 3px rgba(14, 105, 56, 0.1);
}

.news-search-box {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.news-search-box:focus-within {
    border-color: var(--color-3, #0e6938);
    box-shadow: 0 0 0 3px rgba(14, 105, 56, 0.1);
}

.news-search-box input {
    flex: 1;
    border: none;
    padding: 8px 14px;
    font-size: 14px;
    outline: none;
    color: #1f2937;
    background: transparent;
}

.news-search-box input::placeholder {
    color: #9ca3af;
}

.news-search-box button {
    background: var(--color-3, #0e6938);
    border: none;
    padding: 9px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.news-search-box button:hover {
    background: #094826;
}

.news-search-box button svg {
    width: 16px;
    height: 16px;
    color: #ffffff;
}

/* 2. Layout Structure */
.news-content-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.news-main-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.news-sidebar-col {
    width: 330px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 3. News Card */
.news-card {
    display: flex;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    padding: 14px;
    gap: 20px;
    align-items: stretch;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.news-card:hover {
    box-shadow: 0 8px 24px rgba(14, 105, 56, 0.09);
    border-color: rgba(14, 105, 56, 0.35);
    transform: translateY(-2px);
}

.news-card-img {
    width: 320px;
    flex-shrink: 0;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.news-card-img a {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 12px;
}

.news-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1.5 / 1;
    display: block;
    border-radius: 12px;
    transition: transform 0.4s ease;
}

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

.news-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    background: var(--color-3, #0e6938);
    /* border-left: 3px solid #fcbb01; */
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.2;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.news-card-content {
    padding: 4px 8px 4px 0;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.news-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    text-decoration: none;
    line-height: 1.4;
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.news-desc {
    font-size: 15px;
    color: #4b5563;
    line-height: 1.6;
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    border-top: 1px solid #f3f4f6;
    padding-top: 12px;
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.news-meta-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    color: #6b7280;
}

.news-date,
.news-views {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 500;
    color: #6b7280;
}

.news-date svg {
    width: 15px;
    height: 15px;
    color: var(--color-3, #0e6938);
    flex-shrink: 0;
}

.news-views svg {
    width: 15px;
    height: 15px;
    color: var(--color-5, #e50308);
    flex-shrink: 0;
}

.news-meta-sep {
    color: #d1d5db;
    font-size: 13px;
    user-select: none;
}

.news-card-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #eaf5ee;
    color: var(--color-3, #0e6938);
    border: 1px solid rgba(14, 105, 56, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.25s ease;
    flex-shrink: 0;
    margin-left: auto;
}

.news-card-arrow svg {
    width: 17px;
    height: 17px;
    transition: transform 0.25s ease;
}

.news-card:hover .news-card-arrow {
    background: var(--color-3, #0e6938);
    color: #ffffff;
    border-color: var(--color-3, #0e6938);
    box-shadow: 0 3px 10px rgba(14, 105, 56, 0.3);
}

.news-card:hover .news-card-arrow svg {
    transform: translateX(3px);
}

/* 4. Sidebar Styles */
.sidebar-block {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    padding: 22px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.sidebar-title {
    font-size: 18px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 18px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 12px;
}

.sidebar-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-3, #0e6938) 0%, #fcbb01 100%);
    border-radius: 3px;
}

.sidebar-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-cat-list li {
    border: none;
    margin: 0;
    padding: 0;
}

.sidebar-cat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 12px 7px 7px;
    border-radius: 12px;
    text-decoration: none !important;
    transition: all 0.25s ease;
    width: 100%;
    box-sizing: border-box;
    background: transparent;
    border: 1px solid transparent;
}

.sidebar-cat-item:hover {
    background: #f0f8f4;
    border-color: rgba(14, 105, 56, 0.12);
}

.sidebar-cat-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #eaf5ee;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--color-3, #0e6938);
    transition: all 0.25s ease;
}

.sidebar-cat-icon svg {
    width: 18px;
    height: 18px;
}

.sidebar-cat-name {
    font-size: 14.5px;
    font-weight: 500;
    color: #374151;
    flex: 1;
    min-width: 0;
    transition: color 0.2s ease;
}

.sidebar-cat-arrow {
    width: 16px;
    height: 16px;
    color: #9ca3af;
    flex-shrink: 0;
    margin-left: auto;
    transition: transform 0.25s ease, color 0.25s ease;
}

.sidebar-cat-item:hover .sidebar-cat-name {
    color: var(--color-3, #0e6938);
}

.sidebar-cat-item:hover .sidebar-cat-icon {
    background: var(--color-3, #0e6938);
    color: #ffffff;
}

.sidebar-cat-item:hover .sidebar-cat-arrow {
    transform: translateX(3px);
    color: var(--color-3, #0e6938);
}

.sidebar-cat-list li.active .sidebar-cat-item,
.sidebar-cat-item.active {
    background: #eaf5ee;
    border-color: rgba(14, 105, 56, 0.25);
}

.sidebar-cat-list li.active .sidebar-cat-icon,
.sidebar-cat-item.active .sidebar-cat-icon {
    background: var(--color-3, #0e6938);
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(14, 105, 56, 0.25);
}

.sidebar-cat-list li.active .sidebar-cat-name,
.sidebar-cat-item.active .sidebar-cat-name {
    font-weight: 600;
    color: var(--color-3, #0e6938);
}

.sidebar-cat-list li.active .sidebar-cat-arrow,
.sidebar-cat-item.active .sidebar-cat-arrow {
    color: var(--color-3, #0e6938);
}

/* Featured / Hot News Sidebar */
.sidebar-post-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sidebar-post-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding-bottom: 14px;
    border-bottom: 1px solid #f3f4f6;
}

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

.sidebar-post-item img {
    width: 76px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

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

.sidebar-post-info {
    flex: 1;
    min-width: 0;
}

.sidebar-post-info a {
    font-size: 13.5px;
    font-weight: 600;
    color: #1f2937;
    text-decoration: none;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
    transition: color 0.2s ease;
}

.sidebar-post-info a:hover {
    color: var(--color-3, #0e6938);
}

.sidebar-post-date {
    font-size: 12px;
    color: #9ca3af;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.sidebar-post-date svg {
    flex-shrink: 0;
    color: var(--color-3, #0e6938);
}

/* 5. Pagination Styling */
.pagination-wrap {
    margin-top: 25px;
}

.pagination-wrap .pagination {
    display: flex;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination-wrap .page-item .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #374151;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination-wrap .page-item:not(.active):not(.disabled) .page-link:hover {
    background: #eaf5ee;
    border-color: var(--color-3, #0e6938);
    color: var(--color-3, #0e6938);
}

.pagination-wrap .page-item.active .page-link {
    background: var(--color-3, #0e6938);
    border-color: var(--color-3, #0e6938);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(14, 105, 56, 0.25);
}

.pagination-wrap .page-item.disabled .page-link {
    color: #9ca3af;
    background: #f9fafb;
    border-color: #e5e7eb;
    cursor: not-allowed;
}

/* 6. Breadcrumb color override for this page */
.breadcrumb-default__current {
    color: var(--color-3, #0e6938) !important;
    font-weight: 600 !important;
}

.breadcrumb-default__link:hover {
    color: var(--color-3, #0e6938) !important;
}

/* Responsive */
@media (max-width: 991px) {
    .news-content-layout {
        flex-direction: column;
    }

    .news-sidebar-col {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .news-card {
        flex-direction: column;
        padding: 12px;
        gap: 14px;
        border-radius: 14px;
    }

    .news-card-img {
        width: 100%;
        border-radius: 10px;
    }

    .news-card-img img {
        aspect-ratio: 16 / 9;
        border-radius: 10px;
    }

    .news-card-content {
        padding: 4px;
    }

    .news-title {
        font-size: 17px;
        margin-bottom: 8px;
    }

    .news-desc {
        font-size: 13.5px;
        margin-bottom: 12px;
    }

    .news-meta {
        padding-top: 12px;
    }

    .news-meta-left {
        font-size: 12px;
        gap: 8px;
    }

    .news-date,
    .news-views {
        font-size: 12px;
    }

    .news-card-arrow {
        width: 32px;
        height: 32px;
    }

    .news-card-arrow svg {
        width: 15px;
        height: 15px;
    }

    .news-header-right {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .news-search-box {
        width: 100%;
    }

    .news-sort-select {
        width: 100%;
    }
}