/* =============================================================
   News – Archive & Single Post Styles
   Package: FlatsomeChild
   ============================================================= */

/* ── Variables ──────────────────────────────────────────────── */
:root {
    --news-green:       #4a7c2f;
    --news-green-dark:  #3a6024;
    --news-green-light: #e8f2e0;
    --news-text:        #222222;
    --news-muted:       #666666;
    --news-border:      #e0e0e0;
    --news-radius:      8px;
    --news-gap:         20px;
    --container-max:    1200px;
}

/* =============================================================
   ARCHIVE – Wrapper
   ============================================================= */
.news-archive {
    padding: 32px 0 60px;
}

.news-archive__wrap {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Toolbar: title + sort ──────────────────────────────────── */
.news-archive__toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}

.news-archive__title {
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--news-green);
    margin: 0;
    line-height: 1.2;
}

/* Sort button */
.news-sort-form {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-bottom: 0;
}

.news-sort-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid var(--news-border);
    border-radius: 6px;
    font-size: .875rem;
    color: var(--news-text);
    cursor: pointer;
    background: #fff;
    white-space: nowrap;
    user-select: none;
}

.news-sort-label:hover {
    border-color: var(--news-green);
    color: var(--news-green);
}

.news-sort-select {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    font-size: .875rem;
    width: 100%;
}

/* =============================================================
   ARCHIVE – Grid
   ============================================================= */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--news-gap);
}

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

@media (max-width: 600px) {
    .news-grid { grid-template-columns: 1fr; }
}

/* =============================================================
   CARD
   ============================================================= */
.news-card {
    display: flex;
    flex-direction: column;
    margin: 0 !important;
}

.news-card:hover {
    transform: translateY(-3px);
}

/* Thumbnail wrapper – date badge bên trong */
.news-card__thumb {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    position: relative;
    text-decoration: none;
}

.news-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
    display: block;
}

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

.news-card__thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8f2e0 0%, #c8dece 100%);
}

/* Date badge overlay */
.news-card__date-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(156, 92, 11, 0.5);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    pointer-events: none;
    backdrop-filter: blur(2px);
}

/* Card body */
.news-card__body {
    padding: 22px 0 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Title */
.news-card__title {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 500;
    line-height: 1.3;
}

.news-card__title a {
    color: #000000;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card__title a:hover { color: var(--news-green); }

/* Excerpt */
.news-card__excerpt {
    font-size: .85rem;
    color: var(--news-muted);
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =============================================================
   ARCHIVE – View all / Pagination
   ============================================================= */
.news-archive__viewall {
    margin-top: 40px;
    text-align: center;
}

.news-viewall-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 60px;
    border-radius: 12px;
    background: #69A219;
    color: #fff;
    font-size: 18px;
    font-weight: 500;
    text-decoration: none;
    transition: background .2s;
}

.news-viewall-btn:hover {
    background: var(--news-green-dark);
    color: #fff;
}

.news-archive__pagination {
    margin-top: 40px;
    text-align: center;
}

.news-archive__pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    margin: 0 3px;
    border-radius: 4px;
    border: 1px solid var(--news-border);
    color: var(--news-text);
    text-decoration: none;
    font-size: .875rem;
    transition: background .2s, color .2s;
}

.news-archive__pagination .page-numbers:hover,
.news-archive__pagination .page-numbers.current {
    background: var(--news-green);
    border-color: var(--news-green);
    color: #fff;
}

.news-archive__empty {
    text-align: center;
    color: var(--news-muted);
    padding: 48px 0;
}

/* =============================================================
   SINGLE – Article
   ============================================================= */
.news-single {
    padding: 40px 0 0;
}

/* Breadcrumb */
.news-article__breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: .85rem;
    color: var(--news-muted);
    margin-bottom: 24px;
}

.news-article__breadcrumb a {
    color: var(--news-green);
    text-decoration: none;
}

.news-article__breadcrumb a:hover { text-decoration: underline; }

.news-article__breadcrumb .current {
    color: var(--news-muted);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 280px;
}

/* Article header */
.news-article__header {
    margin-bottom: 28px;
}

.news-article__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.news-article__cats a {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 14px;
    background: var(--news-green);
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
    margin-right: 4px;
}

.news-article__date {
    font-size: .85rem;
    color: var(--news-muted);
}

.news-article__title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 800;
    line-height: 1.3;
    color: var(--news-text);
    margin: 0 0 18px;
}

/* Share bar */
.news-article__share {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
    color: var(--news-muted);
}

.news-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--news-border);
    color: var(--news-text);
    background: transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s, color .2s, border-color .2s;
}

.news-share-btn--fb:hover   { background: #1877f2; border-color: #1877f2; color: #fff; }
.news-share-btn--tw:hover   { background: #000;    border-color: #000;    color: #fff; }
.news-share-btn--copy:hover { background: var(--news-green); border-color: var(--news-green); color: #fff; }

/* Featured image */
.news-article__featured-img {
    margin-bottom: 32px;
    border-radius: var(--news-radius);
    overflow: hidden;
    max-height: 500px;
}

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

/* Content */
.news-article__content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--news-text);
    margin-bottom: 36px;
}

.news-article__content h2,
.news-article__content h3,
.news-article__content h4 {
    font-weight: 700;
    margin-top: 1.6em;
    margin-bottom: .5em;
    color: var(--news-text);
}

.news-article__content p { margin-bottom: 1.2em; }

.news-article__content a { color: var(--news-green); }
.news-article__content a:hover { text-decoration: underline; }

.news-article__content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 16px 0;
}

.news-article__content ul,
.news-article__content ol {
    padding-left: 1.6em;
    margin-bottom: 1.2em;
}

.news-article__content li { margin-bottom: .4em; }

.news-article__content blockquote {
    border-left: 4px solid var(--news-green);
    margin: 24px 0;
    padding: 12px 20px;
    background: var(--news-green-light);
    border-radius: 0 var(--news-radius) var(--news-radius) 0;
    font-style: italic;
    color: var(--news-green-dark);
}

/* Tags */
.news-article__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
    align-items: center;
    font-size: .875rem;
    color: var(--news-muted);
}

.news-article__tags a {
    display: inline-block;
    padding: 3px 12px;
    border: 1px solid var(--news-border);
    border-radius: 14px;
    color: var(--news-muted);
    text-decoration: none;
    transition: background .2s, color .2s;
}

.news-article__tags a:hover {
    background: var(--news-green);
    border-color: var(--news-green);
    color: #fff;
}

/* Post navigation */
.news-article__nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--news-border);
}

.news-article__nav .nav-previous,
.news-article__nav .nav-next {
    display: flex;
    flex-direction: column;
}

.news-article__nav .nav-next { text-align: right; }

.news-article__nav a {
    text-decoration: none;
    color: var(--news-text);
}

.news-article__nav .nav-label {
    display: block;
    font-size: .78rem;
    color: var(--news-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.news-article__nav .nav-title {
    font-size: .925rem;
    font-weight: 600;
    color: var(--news-green);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 600px) {
    .news-article__nav { grid-template-columns: 1fr; }
    .news-article__nav .nav-next { text-align: left; }
}

/* =============================================================
   RELATED POSTS
   ============================================================= */
.news-related {
    padding-top: 48px;
    border-top: 1px solid var(--news-border);
}

.news-related__heading {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--news-text);
    margin: 0 0 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--news-green);
    display: inline-block;
}

.news-related__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--news-gap);
}

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

@media (max-width: 600px) {
    .news-related__grid { grid-template-columns: 1fr; }
}

/* Related card variants */
.news-card--related .news-card__title {
    font-size: .9rem;
}

.news-card--related .news-card__thumb {
    aspect-ratio: 16 / 9;
}

/* =============================================================
   SINGLE – New layout (ns-*)
   ============================================================= */

/* Container */
.ns-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* Back button */
.ns-back-wrap {
    padding: 16px 0 12px;
}

.ns-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: none;
    border: none;
    padding: 0;
    font-size: 24px;
    line-height: 1.5;
    font-weight: 400;
    color: var(--news-muted);
    cursor: pointer;
    transition: color .15s;
    text-transform: none;
    margin: 0;
}

.ns-back-btn:hover { color: var(--news-green); }

/* Hero image */
.ns-article__hero {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    max-height: 480px;
}

.ns-article__hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Meta bar: date + share */
.ns-article__meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.ns-body {
    max-width: 1036px;
    margin-left: auto;
    margin-right: auto;
}

.ns-article__date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    font-size: 20px;
    color: #5E5E5E;
}

.ns-article__share {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ns-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--news-border);
    color: var(--news-text);
    background: transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s, color .2s, border-color .2s;
}

.ns-share-btn--fb:hover   { background: #1877f2; border-color: #1877f2; color: #fff; }
.ns-share-btn--copy:hover { background: var(--news-green); border-color: var(--news-green); color: #fff; }

/* Article title */
.ns-article__title {
    font-size: 32px;
    font-weight: 600;
    line-height: 1.35;
    color: #000000;
    margin: 0 0 24px;
}

/* Article content */
.ns-article__content {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.5;
    color: #5E5E5E;
    margin-bottom: 48px;
}

.ns-article__content img {
    width: 100%;
}

.ns-article__content h2,
.ns-article__content h3,
.ns-article__content h4 {
    font-weight: 700;
    margin-top: 1.6em;
    margin-bottom: .5em;
}

.ns-article__content p { margin-bottom: 1.2em; }

.ns-article__content a { color: var(--news-green); }
.ns-article__content a:hover { text-decoration: underline; }

.ns-article__content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
    display: block;
}

.ns-article__content ul,
.ns-article__content ol {
    padding-left: 1.6em;
    margin-bottom: 1.2em;
}

.ns-article__content li { margin-bottom: .4em; }

/* =============================================================
   RELATED – New layout (ns-related)
   ============================================================= */

.ns-related {
    padding: 40px 0 60px;
    background-color: #FFF8DE;
}

.ns-related .icon-sec-top {
    display: block;
    margin: 0 auto 30px;
}

.ns-related__heading {
    font-size: 36px;
    line-height: 1.4;
    font-weight: 600;
    color: #5E5E5E;
    margin: 0 0 50px;
    text-align: center;
}

/* Swiper wrapper */
.ns-related__swiper {
    position: relative;
    overflow: hidden;
}

/* Related card */
.ns-related__card {
    display: flex;
    flex-direction: column;
}

.ns-related__thumb {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 8px;
    text-decoration: none;
    position: relative;
}

.ns-related__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}

.ns-related__card:hover .ns-related__thumb img {
    transform: scale(1.04);
}

.ns-related__thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8f2e0 0%, #c8dece 100%);
}

/* Date badge overlay on thumbnail */
.ns-related__date-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(156, 92, 11, 0.5);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    pointer-events: none;
    backdrop-filter: blur(2px);
}

.ns-related__body {
    padding: 14px 0 0;
}

.ns-related__title {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 500;
    line-height: 1.3;
}

.ns-related__title a {
    color: #000000;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ns-related__excerpt {
    font-size: 16px;
    color: #5E5E5E;
    line-height: 1.4;
    margin: 0;
    font-weight: 400;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Slider nav buttons */
.ns-related__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    padding: 0;
    margin: 0;
    width: 36px;
    height: 36px;
    min-height: unset;
    border-radius: 50%;
    border: 1px solid #3A6B00;
    background: #3A6B00;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}
.ns-related__nav:hover { background: var(--news-green); border-color: var(--news-green); color: #fff; }
.ns-related__prev { left: 0; }
.ns-related__next { right: 0; }
.ns-related__nav.swiper-button-disabled { opacity: .35; pointer-events: none; }

@media (max-width: 768px) {
    .ns-article__hero { max-height: 300px; border-radius: 8px; }
    .ns-article__title { font-size: 1.375rem; }
    .ns-related__swiper { padding: 0 30px; }
}


:root {
    --news-green:       #4a7c2f;
    --news-green-dark:  #3a6024;
    --news-green-light: #e8f2e0;
    --news-text:        #222222;
    --news-muted:       #666666;
    --news-border:      #e0e0e0;
    --news-radius:      8px;
    --news-gap:         24px;
    --container-max:    1200px;
}

/* ── Shared container ───────────────────────────────────────── */
.news-archive .container,
.news-single .container {
    max-width: var(--container-max);
    margin-left:  auto;
    margin-right: auto;
    padding-left:  20px;
    padding-right: 20px;
}

/* =============================================================
   ARCHIVE – Header
   ============================================================= */
.news-archive__header {
    background-color: var(--news-green);
    padding: 36px 0 32px;
    margin-bottom: 48px;
}

.news-archive__header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.news-archive__title {
    font-size: 36px;
    font-weight: 600;
    color: #3A6B00;
    margin: 0;
    line-height: 1.2;
}

/* ── Filter buttons ─────────────────────────────────────────── */
.news-archive__filter-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.news-filter-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,.5);
    color: #ffffff;
    font-size: .875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background .2s, border-color .2s;
}

.news-filter-btn:hover,
.news-filter-btn.is-active {
    background-color: #ffffff;
    border-color: #ffffff;
    color: var(--news-green);
}

/* =============================================================
   ARCHIVE – Grid
   ============================================================= */
.news-archive__content {
    padding-bottom: 60px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--news-gap);
}

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

@media (max-width: 600px) {
    .news-grid { grid-template-columns: 1fr; }
    .news-archive__header-inner { flex-direction: column; align-items: flex-start; }
}

/* =============================================================
   CARD – dùng chung archive & related
   ============================================================= */
.news-card {
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-3px);
}

/* Thumbnail */
.news-card__thumb {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 8px;
}

.news-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

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

/* Body */
.news-card__body {
    padding: 22px 0 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Categories */
.news-card__cats {
    margin-bottom: 8px;
}

.news-card__cats a {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    background: var(--news-green-light);
    color: var(--news-green);
    font-size: .75rem;
    font-weight: 600;
    text-decoration: none;
    margin-right: 4px;
}

/* Title */
.news-card__title {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 500;
    line-height: 1.3;
}

.news-card__title a {
    color: #000000;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card__title a:hover { color: var(--news-green); }

/* Excerpt */
.news-card__excerpt {
    font-size: 16px;
    color: #5E5E5E;
    line-height: 400;
    line-height: 1.2;
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* Meta */
.news-card__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
}

.news-card__date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .8rem;
    color: var(--news-muted);
}

.news-card__date svg { flex-shrink: 0; }

/* =============================================================
   ARCHIVE – Pagination
   ============================================================= */
.news-archive__pagination {
    margin-top: 48px;
    text-align: center;
}

.news-archive__pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    margin: 0 3px;
    border-radius: 4px;
    border: 1px solid var(--news-border);
    color: var(--news-text);
    text-decoration: none;
    font-size: .875rem;
    transition: background .2s, color .2s;
}

.news-archive__pagination .page-numbers:hover,
.news-archive__pagination .page-numbers.current {
    background: var(--news-green);
    border-color: var(--news-green);
    color: #fff;
}

.news-archive__empty {
    text-align: center;
    color: var(--news-muted);
    padding: 48px 0;
}