/* Css For CRUD News */

.news-list-card {
    border: 1px solid #e9ecf4;
    border-radius: 14px;
    box-shadow: 0 8px 22px rgba(17, 24, 39, 0.05);
}

.news-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: #1f2937;
    font-family: inherit;
}

.news-top-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-left: auto;
}

.news-list-header .dataTables_length {
    float: none !important;
    margin: 0 !important;
}

.news-list-header .dataTables_length label {
    margin: 0;
    font-size: 0.82rem;
    color: #6b7280;
    white-space: nowrap;
}

.news-list-header .dataTables_length select {
    margin: 0 0.35rem;
}

.news-add-btn {
    height: 42px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #6d7bf5 0%, #4f46e5 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0 0.95rem;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.25);
    font-family: inherit;
}

.news-list-card table,
.news-list-card .dataTables_length label,
.news-list-card .dataTables_filter input,
.news-list-card .dataTables_info,
.news-list-card .dataTables_paginate .paginate_button {
    font-family: inherit;
}

.news-add-btn:hover {
    color: #fff;
    transform: translateY(-1px);
}

.form-save-btn {
    height: 42px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #6d7bf5 0%, #4f46e5 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.2);
    font-family: inherit;
}

.form-save-btn:hover {
    color: #fff;
    transform: translateY(-1px);
}

.form-cancel-btn {
    height: 42px;
    border: 1px solid #cfd8ea;
    border-radius: 10px;
    background: #fff;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
}

.form-cancel-btn:hover {
    background: #f8faff;
    color: #334155;
    border-color: #bcc8e3;
}

.news-list-card.table-responsive {
    border: 0 !important;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: none;
}

.news-list-card .dataTables_wrapper {
    padding: 0.65rem 0.75rem 0.5rem;
    background: #fff;
}

.news-list-card .table {
    margin-bottom: 0;
}

.news-list-card table.dataTable.no-footer {
    border-bottom: 0 !important;
}

.news-list-card table.dataTable tbody tr:last-child td {
    border-bottom: 0 !important;
}

.news-list-card .table thead th {
    background: #f2f4fb;
    color: #4b5563;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-bottom: 1px solid #eceff6;
}

.news-list-card .table td {
    border-color: #eef1f7;
    vertical-align: middle;
    color: #111827;
    font-size: 0.875rem;
}

.news-list-card .table td:first-child,
.news-list-card .table th:first-child {
    width: 60px;
    text-align: center;
}

.news-list-card .table td:last-child,
.news-list-card .table th:last-child {
    width: 70px;
    text-align: center;
}

.dataTables_wrapper .dataTable thead th {
    position: relative;
    padding-right: 2rem;
}

.dataTables_wrapper .dataTable thead th.sorting,
.dataTables_wrapper .dataTable thead th.sorting_asc,
.dataTables_wrapper .dataTable thead th.sorting_desc {
    cursor: pointer;
}

.dataTables_wrapper .dataTable thead th.sorting:before,
.dataTables_wrapper .dataTable thead th.sorting_asc:before,
.dataTables_wrapper .dataTable thead th.sorting_desc:before,
.dataTables_wrapper .dataTable thead th.sorting:after,
.dataTables_wrapper .dataTable thead th.sorting_asc:after,
.dataTables_wrapper .dataTable thead th.sorting_desc:after {
    position: absolute;
    right: 0.5rem;
    font-family: FontAwesome;
    font-size: 0.7rem;
    color: #b0b6bc;
    display: block;
    line-height: 1;
    width: 1em;
    text-align: center;
}

.dataTables_wrapper .dataTable thead th.sorting:before {
    content: "\f0de";
    top: 0.45rem;
}

.dataTables_wrapper .dataTable thead th.sorting:after {
    content: "\f0dd";
    top: 1.3rem;
}

.dataTables_wrapper .dataTable thead th.sorting_asc:before {
    color: #343a40;
    content: "\f0de";
}

.dataTables_wrapper .dataTable thead th.sorting_asc:after {
    color: #b0b6bc;
    content: "\f0dd";
}

.dataTables_wrapper .dataTable thead th.sorting_desc:before {
    color: #b0b6bc;
    content: "\f0de";
}

.dataTables_wrapper .dataTable thead th.sorting_desc:after {
    color: #343a40;
    content: "\f0dd";
}

.news-list-card .dataTables_wrapper .dataTables_length {
    float: left;
    margin-top: 0.9rem;
    margin-bottom: 0.7rem;
    color: #6b7280;
    font-size: 0.85rem;
}

.news-list-card .dataTables_wrapper .dataTables_length label {
    margin-bottom: 0;
    font-size: 0.82rem;
    color: #6b7280;
}

.news-list-card .dataTables_wrapper .dataTables_length select {
    border: 1px solid #dbe2f0;
    border-radius: 8px;
    min-width: 70px;
    padding: 0.3rem 0.75rem;
    color: #1f2937;
    background-color: #fff;
}

.news-list-card .dataTables_wrapper .dataTables_filter {
    margin: 0;
    float: none;
    position: relative;
}

.news-list-card .dataTables_wrapper .dataTables_filter label {
    margin: 0;
    font-size: 0;
}

.news-list-card .dataTables_wrapper .dataTables_filter input {
    border: 1px solid #dbe2f0;
    border-radius: 10px;
    min-width: 240px;
    height: 42px;
    margin: 0;
    padding: 0.35rem 0.85rem 0.35rem 2.2rem;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 12px center;
    font-size: 0.86rem;
}

#newsTopActions .dataTables_filter {
    margin: 0;
    float: none;
    position: relative;
}

#newsTopActions .dataTables_filter input {
    border: 1px solid #dbe2f0 !important;
    border-radius: 10px !important;
    min-width: 230px;
    height: 42px;
    margin: 0 !important;
    padding: 0.35rem 0.85rem 0.35rem 2.2rem !important;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 12px center !important;
    font-size: 0.86rem !important;
    color: #111827;
}

.news-list-card .dataTables_wrapper .dataTables_filter input:focus {
    outline: none;
    border-color: #b7c1f3;
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.12);
}

.news-list-card .dataTables_wrapper .dataTables_paginate {
    margin-top: 0;
    padding-top: 0.55rem;
}

.news-list-card .dataTables_wrapper .dataTables_info {
    padding-top: 0.6rem;
    color: #4b5563;
    border-top: 0 !important;
}

.news-list-card .dataTables_wrapper .dataTables_paginate {
    border-top: 0 !important;
}

.news-list-card .dataTables_wrapper .dataTables_paginate .paginate_button {
    border: 1px solid #e3e7f1 !important;
    background: #fff !important;
    color: #4b5563 !important;
    border-radius: 8px !important;
    min-width: 34px;
    height: 34px;
    line-height: 32px;
    padding: 0 !important;
    margin: 0 3px;
}

.news-list-card .dataTables_wrapper .dataTables_paginate .paginate_button.current,
.news-list-card .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: #4f46e5 !important;
    border-color: #4f46e5 !important;
    color: #fff !important;
    box-shadow: 0 6px 14px rgba(79, 70, 229, 0.25);
}

.news-list-card .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #f8f9ff !important;
    border-color: #d5dbed !important;
    color: #111827 !important;
}

.news-list-card .dataTables_wrapper .dataTables_paginate .paginate_button.previous,
.news-list-card .dataTables_wrapper .dataTables_paginate .paginate_button.next {
    font-size: 0 !important;
    position: relative;
}

.news-list-card .dataTables_wrapper .dataTables_paginate .paginate_button.previous:before,
.news-list-card .dataTables_wrapper .dataTables_paginate .paginate_button.next:before {
    font-size: 0.95rem;
    line-height: 32px;
    color: #4b5563;
}

.news-list-card .dataTables_wrapper .dataTables_paginate .paginate_button.previous:before {
    content: "\2039";
}

.news-list-card .dataTables_wrapper .dataTables_paginate .paginate_button.next:before {
    content: "\203A";
}

.action-dropdown-toggle {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #dfe4f1;
    background: #fff;
    color: #4b5563;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-dropdown-toggle::after {
    display: none;
}

.action-dropdown-toggle:hover {
    background: #f7f8fc;
    color: #111827;
}

.action-menu {
    min-width: 92px;
    border: 1px solid #e5e9f3;
    border-radius: 10px;
    box-shadow: 0 10px 26px rgba(17, 24, 39, 0.1);
    padding: 0.4rem;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.action-menu.show {
    display: flex;
}

.action-menu .dropdown-item,
.action-menu .dropdown-item-btn {
    border-radius: 8px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.action-menu .dropdown-item-btn {
    border: 0;
    background: transparent;
    color: #dc3545;
}

.action-menu li {
    list-style: none;
}

@media (max-width: 576px) {
    .news-top-actions {
        width: 100%;
        justify-content: space-between;
    }

    .news-list-card .dataTables_wrapper .dataTables_filter input {
        min-width: 190px;
    }

    #newsTopActions .dataTables_filter input {
        min-width: 190px;
    }
}


/* Css For Public News */

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    background: #f3f5fb;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-main {
    flex: 1;
}


/* LIST MODE */
.news-page {
    padding: 24px 0 60px;
}

.news-wrapper {
    width: 92%;
    max-width: 1220px;
    margin: 0 auto;
}

.news-hero-content {
    padding: 28px 30px;
    color: #fff;
}

.news-hero-content h1 {
    margin: 0 0 8px;
    font-size: 44px;
    line-height: 1.1;
    font-weight: 800;
}

.news-hero-content p {
    margin: 0;
    max-width: 640px;
    opacity: .92;
}

.news-breadcrumb {
    margin-top: 16px;
    font-size: 13px;
}

.news-breadcrumb a {
    color: #dbeafe;
    text-decoration: none;
}

.news-breadcrumb span {
    color: #fff;
    font-weight: 700;
}

.news-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.news-title {
    margin: 0;
    font-size: 46px;
    font-weight: 700;
    color: #0f172a;
}

.news-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-search-input {
    width: 300px;
    max-width: 75vw;
    border: 1px solid #d8deea;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    background: #fff;
}

.news-search-btn {
    border: none;
    border-radius: 10px;
    background: #2563eb;
    color: #fff;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.year-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.news-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.news-filter-pill {
    border: 1px solid #d8e0f0;
    background: #fff;
    color: #334155;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.news-filter-pill.active {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    border-color: #1d4ed8;
    color: #fff;
}

.year-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid #e3e8f2;
    color: #1e293b;
    background: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 0 12px;
}

.year-pill.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.news-card {
    background: #fff;
    border: 1px solid #e6ebf4;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
    display: flex;
    flex-direction: column;
}

.news-card-image-wrap {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #e5e7eb;
}

.news-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 11px;
    font-weight: 700;
    color: #1d4ed8;
    background: rgba(255, 255, 255, 0.88);
    border-radius: 999px;
    padding: 6px 10px;
}

.news-card-body {
    padding: 14px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card-title {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
    color: #0f172a;
}

.news-card-summary {
    margin: 10px 0 0;
    color: #475569;
    line-height: 1.65;
    font-size: 14px;
}

.news-card-date {
    margin-top: 8px;
    font-size: 16px;
    color: #64748b;
    font-weight: 600;
}

.news-read-more {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
    padding-top: 14px;
}

.news-empty {
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    color: #64748b;
}

.news-pagination {
    margin-top: 26px;
    display: flex;
    justify-content: center;
}

.news-pagination .pagination {
    margin: 0;
}

.news-pagination .page-link {
    border: none;
    color: #1e293b;
    background: #eef2ff;
    border-radius: 8px;
    min-width: 36px;
    text-align: center;
    margin: 0 2px;
    font-weight: 700;
}

.news-pagination .page-item.active .page-link {
    background: #2563eb;
    color: #fff;
}

/* DETAIL MODE */
.news-detail-wrap {
    padding: 42px 0 60px;
}

.news-detail-card {
    max-width: 860px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e7ecf5;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(14, 23, 41, .06);
    padding: 26px;
}

.news-detail-title {
    font-size: 44px;
    line-height: 1.12;
    margin: 0 0 8px;
    color: #0f172a;
    font-weight: 700;
}

.news-detail-date {
    color: #64748b;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 18px;
}

.news-detail-image {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.news-detail-content {
    color: #1e293b;
    font-size: 18px;
    line-height: 1.75;
}

.news-detail-content p {
    margin-bottom: 16px;
}

.share-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
}

.share-label {
    font-weight: 700;
    color: #1f2937;
    margin-right: 6px;
}

.share-link {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 16px;
}

.share-fb {
    background: #1877f2
}

.share-in {
    background: #0a66c2
}

.share-x {
    background: #111827
}

.share-mail {
    background: #1f2937
}

.back-row {
    margin-top: 30px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #1d4ed8;
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    padding: 12px 22px;
    font-weight: 700;
}

.related-wrap {
    max-width: 860px;
    margin: 22px auto 0;
}

.related-wrap h4 {
    margin: 0 0 12px;
    color: #0f172a;
}

.related-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.related-item {
    background: #fff;
    border: 1px solid #e7ecf5;
    border-radius: 10px;
    padding: 12px;
}

.related-item a {
    text-decoration: none;
    color: #1e3a8a;
    font-weight: 700;
    font-size: 14px;
}


@media (max-width: 1100px) {
    .news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .related-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar-custom {
        padding: 0 16px;
    }

    .news-hero-content h1 {
        font-size: 34px;
    }

    .news-title {
        font-size: 34px;
    }

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

    .news-search-input {
        width: 220px;
    }

    .news-detail-card {
        padding: 18px;
    }

    .news-detail-title {
        font-size: 34px;
    }
}