/* ==========================================================
   news.css - homepage news section, latest-news.php, news-details.php
   (buttons use .hero-btn from hero.css, label from about.css)
   ========================================================== */
.news { padding: 56px 0; background: var(--white); }

.news-head { text-align: center; max-width: 620px; margin: 0 auto 32px; }
.news-head h2 {
    margin: 0 0 8px;
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 4vw, 2.1rem);
    line-height: 1.2;
    color: var(--primary-color);
}
.news-head p { margin: 0; color: var(--muted-color); }
.news-head .eyebrow { margin-bottom: 8px; color: var(--secondary-dark); }
.news-empty { text-align: center; color: var(--muted-color); padding: 24px 0; }

.news-grid { display: grid; gap: 22px; grid-template-columns: 1fr; }

.news-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: transform var(--transition), box-shadow var(--transition);
}
.news-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0, 0, 0, .1); }

.news-thumb { display: block; overflow: hidden; background: var(--primary-light); }
.news-thumb img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .5s ease; }
.news-thumb img.news-thumb-fallback { object-fit: contain; padding: 24px; background: var(--white); }
.news-card:hover .news-thumb img { transform: scale(1.05); }

.news-body { display: flex; flex-direction: column; flex: 1; padding: 20px; }
.news-body time { margin-bottom: 8px; font-size: .82rem; font-weight: 600; color: var(--secondary-dark); }
.news-body h3 { margin: 0 0 8px; font-family: var(--font-heading); font-size: 1.15rem; line-height: 1.3; }
.news-body h3 a { color: var(--text-color); text-decoration: none; transition: color var(--transition); }
.news-body h3 a:hover { color: var(--primary-color); }
.news-body p { margin: 0 0 14px; color: var(--muted-color); }
.news-more { margin-top: auto; font-weight: 600; text-decoration: none; }
.news-more:hover { text-decoration: underline; }
.news-more:focus-visible, .news-body h3 a:focus-visible { outline: 3px solid var(--secondary-color); outline-offset: 2px; border-radius: 4px; }
.news-cta { text-align: center; margin-top: 32px; }

/* ---------- latest-news.php / news-details.php ---------- */
.page-title { padding: 40px 0; background: var(--primary-light); border-bottom: 4px solid var(--secondary-color); }
.page-title h1 { margin: 0; font-family: var(--font-heading); font-size: clamp(1.6rem, 4vw, 2.4rem); color: var(--primary-color); }
.page-title p { margin: 6px 0 0; color: var(--muted-color); }

.news-list { padding: 40px 0 56px; }
.news-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 32px; }
.news-pagination a {
    min-width: 40px; padding: 8px 12px; text-align: center;
    border: 1px solid var(--border-color); border-radius: 8px;
    color: var(--text-color); text-decoration: none;
}
.news-pagination a.current, .news-pagination a:hover { background: var(--primary-color); border-color: var(--primary-color); color: var(--white); }

.article { max-width: 780px; margin-inline: auto; padding: 40px 16px 56px; }
.article time { font-size: .9rem; font-weight: 600; color: var(--secondary-dark); }
.article h1 { margin: 8px 0 20px; font-family: var(--font-heading); font-size: clamp(1.7rem, 4.5vw, 2.5rem); line-height: 1.2; color: var(--primary-color); }
.article-img { display: block; width: 100%; max-height: 460px; object-fit: cover; margin-bottom: 24px; border-radius: var(--radius); }
.article-body { font-size: 1.05rem; line-height: 1.8; overflow-wrap: anywhere; }
.article-back { display: inline-block; margin-top: 28px; font-weight: 600; text-decoration: none; }

@media (min-width: 640px)  { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px)  { .news { padding: 80px 0; } .news-grid { grid-template-columns: repeat(3, 1fr); } }

/* Rich text written in the admin editor (Quill) */
.article-body > *:first-child { margin-top: 0; }
.article-body p { margin: 0 0 1.1em; }
.article-body h2, .article-body h3, .article-body h4 { margin: 1.6em 0 .5em; font-family: var(--font-heading); line-height: 1.25; color: var(--primary-color); }
.article-body h2 { font-size: 1.6rem; }
.article-body h3 { font-size: 1.3rem; }
.article-body ul, .article-body ol { margin: 0 0 1.1em; padding-left: 1.5em; }
.article-body li { margin-bottom: .35em; }
.article-body blockquote { margin: 1.4em 0; padding: 8px 20px; border-left: 4px solid var(--secondary-color); background: var(--light-bg); color: var(--muted-color); font-style: italic; }
.article-body img { display: block; max-width: 100%; height: auto; margin: 1.4em auto; border-radius: var(--radius); }
.article-body a { color: var(--primary-color); font-weight: 600; }
.article-body .ql-align-center  { text-align: center; }
.article-body .ql-align-right   { text-align: right; }
.article-body .ql-align-justify { text-align: justify; }
.article-body .ql-indent-1 { padding-left: 3em; }
.article-body .ql-indent-2 { padding-left: 6em; }

/* ---------- news.php search bar ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.news-toolbar { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.news-search { position: relative; display: flex; flex: 1; gap: 8px; max-width: 460px; }
.news-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #98a2b3; pointer-events: none; }
.news-search input { flex: 1; min-width: 0; min-height: 46px; padding: 10px 14px 10px 42px; border: 1.5px solid #d0d5dd; border-radius: 10px; font: inherit; color: var(--text-color); transition: border-color var(--transition), box-shadow var(--transition); }
.news-search input:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 4px rgba(0, 102, 51, .14); }
.news-search button { min-height: 46px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--primary-color); color: var(--white); font-family: var(--font-heading); font-weight: 600; cursor: pointer; transition: background var(--transition); }
.news-search button:hover { background: var(--primary-dark); }
.news-search button:focus-visible { outline: 3px solid var(--secondary-color); outline-offset: 2px; }
.news-count { margin: 0; color: var(--muted-color); font-size: .92rem; }
.news-count a { color: var(--primary-color); font-weight: 600; }
