/*
Theme Name: 45minut.biz
Theme URI: https://45minut.biz/
Author: 45minut.biz
Description: Ақ фон, жасыл акценттері бар баспахана және жаңалықтар порталы стиліндегі үш колонкалы, виджеттермен басқарылатын тақырып.
Version: 2.1.5
Requires at least: 5.8
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: 45minut-biz
*/

:root {
    --site-width: 90%;
    --side-width: 200px;
    --layout-gap: 18px;
    --green: #16834a;
    --green-dark: #0d6035;
    --green-soft: #eaf5ee;
    --green-pale: #f4faf6;
    --ink: #202923;
    --muted: #68756d;
    --line: #e3ebe5;
    --page-bg: #ffffff;
    --panel-bg: #ffffff;
    --shadow: 0 3px 14px rgba(20, 70, 42, .055);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--page-bg);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.65;
}

a {
    color: var(--green-dark);
    text-decoration: none;
    transition: color .18s ease;
}
a:hover { color: var(--green); text-decoration: underline; }

img { max-width: 100%; height: auto; }

.site-container {
    width: var(--site-width);
    max-width: 1500px;
    margin: 0 auto;
}

/* Masthead: logo 65%, banner 35% */
.site-header {
    padding: 16px 0;
    border-bottom: 0;
    margin-bottom: 22px;
}

.header-widgets {
    display: grid;
    grid-template-columns: 65fr 35fr;
    gap: var(--layout-gap);
    align-items: stretch;
}

.header-logo,
.header-banner {
    min-width: 0;
    height: 150px;
    min-height: 150px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 5px;
    overflow: hidden;
}

.header-logo { border-left: 5px solid var(--green); }
.header-banner {
    justify-content: center;
    background: var(--green-pale);
    border: 1px dashed #a9cdb6;
}

.header-logo img,
.header-banner img {
    display: block;
    max-width: 100%;
    height: 150px;
    object-fit: contain;
}
.header-logo img { width: auto; max-width: 100%; }
.header-banner img { width: 100%; }
.header-logo > *,
.header-banner > * { max-width: 100%; }
.header-logo .widget,
.header-banner .widget { width: 100%; margin: 0; }
.header-logo .custom-html-widget,
.header-banner .custom-html-widget { display: flex; align-items: center; height: 150px; }

/* Editorial three-column grid */
.main-layout {
    display: grid;
    grid-template-columns: var(--side-width) minmax(0, 1fr) var(--side-width);
    gap: var(--layout-gap);
    align-items: start;
    margin: 0 0 24px;
}

.widget-column {
    min-width: 0;
    padding: 16px;
    background: var(--panel-bg);
    border: 1px solid var(--line);
    border-radius: 5px;
    box-shadow: var(--shadow);
    overflow-wrap: anywhere;
}

.left-sidebar,
.right-sidebar { border-top: 4px solid var(--green); }

.content-column { border-top: 4px solid var(--green-dark); }

.widget-column .widget { margin: 0 0 24px; }
.widget-column .widget:last-child { margin-bottom: 0; }

.widget-title,
.widget h2,
.widget h3 {
    color: var(--ink);
    margin: 0 0 13px;
    padding: 0 0 9px;
    border-bottom: 1px solid var(--line);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
}

.widget-title:before,
.widget h2.widget-title:before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 16px;
    margin: 0 9px -2px 0;
    background: var(--green);
    border-radius: 2px;
}

.widget ul { padding-left: 19px; }
.widget li { margin-bottom: 7px; }
.widget img { border-radius: 3px; }

/* Default post listing when center widget area is empty */
.content-column article {
    padding: 0 0 22px;
    margin: 0 0 22px;
    border-bottom: 1px solid var(--line);
}
.content-column article:last-of-type { border-bottom: 0; }
.content-column article h2 {
    margin: 0 0 10px;
    font-size: clamp(20px, 2vw, 26px);
    line-height: 1.3;
}
.content-column article h2 a { color: var(--ink); }
.content-column article h2 a:hover { color: var(--green); }
.content-column article .wp-post-image {
    display: block;
    width: 100%;
    margin: 12px 0;
    border-radius: 4px;
}
.content-column .post-categories,
.content-column .entry-meta {
    color: var(--muted);
    font-size: 13px;
}

/* Footer: three widget zones */
.site-footer {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--layout-gap);
    margin: 0 0 16px;
    padding: 22px;
    color: #eaf5ee;
    background: #123d29;
    border-top: 5px solid var(--green);
    border-radius: 5px;
}
.site-footer a { color: #bce5ca; }
.site-footer .widget-title,
.site-footer .widget h2,
.site-footer .widget h3 {
    color: #fff;
    border-bottom-color: rgba(255,255,255,.2);
}
.site-footer .widget-title:before,
.site-footer .widget h2.widget-title:before { background: #7ed39a; }
.footer-widget { min-width: 0; overflow-wrap: anywhere; }
.footer-widget .widget { margin-bottom: 18px; }
.footer-widget .widget:last-child { margin-bottom: 0; }

.site-credit {
    width: var(--site-width);
    max-width: 1500px;
    margin: 0 auto 24px;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}
.site-credit a { color: var(--green-dark); }

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Tablet */
@media (max-width: 960px) {
    .site-container, .site-credit { width: 94%; }
    .main-layout { grid-template-columns: 180px minmax(0, 1fr); }
    .right-sidebar { grid-column: 1 / -1; }
    .site-footer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Mobile */
@media (max-width: 640px) {
    .site-container, .site-credit { width: 96%; }
    .site-header { padding-top: 12px; }
    .header-widgets { grid-template-columns: 1fr; }
    .header-logo, .header-banner { height: 150px; min-height: 150px; }
    .main-layout { grid-template-columns: 1fr; }
    .left-sidebar, .content-column, .right-sidebar { grid-column: auto; }
    .site-footer { grid-template-columns: 1fr; }
}


/* Latest news: two columns, 20 newest posts */
.latest-news-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 18px;
    padding: 0 0 12px;
    border-bottom: 2px solid var(--green);
}
.latest-news-heading h1 {
    margin: 0;
    color: var(--green-dark);
    font-size: clamp(21px, 2.2vw, 28px);
    line-height: 1.25;
}
.latest-news-heading span {
    color: var(--muted);
    font-size: 12px;
}
.latest-news-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 18px;
    row-gap: 0;
}
.latest-news-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 0 0 18px;
    margin: 0 0 18px;
    border: 0;
    border-bottom: 1px solid #dce8df;
}
.latest-news-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 0 0 10px;
    overflow: hidden;
    background: var(--green-soft);
    border-radius: 4px;
}
.latest-news-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}
.latest-news-image:hover img { transform: scale(1.035); }
.news-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--green-dark);
    font-weight: 700;
    letter-spacing: .08em;
}
.latest-news-date {
    display: block;
    margin: 0 0 5px;
    color: var(--muted);
    font-size: 12px;
}
.latest-news-info h2 {
    margin: 0 0 7px;
    padding: 0;
    border: 0;
    font-size: 17px;
    line-height: 1.35;
}
.latest-news-info h2:before { display: none; }
.latest-news-info h2 a { color: var(--ink); }
.latest-news-info h2 a:hover { color: var(--green); }
.latest-news-excerpt {
    color: #56635a;
    font-size: 13px;
    line-height: 1.5;
}
.latest-news-excerpt p { margin: 0 0 7px; }
.latest-news-more {
    margin-top: auto;
    color: var(--green-dark);
    font-size: 12px;
    font-weight: 700;
}
.center-top-widgets { margin-bottom: 20px; }

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


/* Full single article page */
.single-article { padding: 22px; }
.article-breadcrumb {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 12px;
}
.article-breadcrumb a { color: var(--green-dark); }
.single-article-header h1 {
    margin: 8px 0 16px;
    padding: 0;
    border: 0;
    color: var(--ink);
    font-size: clamp(25px, 3vw, 36px);
    line-height: 1.25;
}
.single-article-header h1:before { display: none; }
.single-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
}
.article-categories a {
    color: var(--green-dark);
    font-weight: 700;
}
.single-article-thumbnail { margin: 0 0 22px; }
.single-article-thumbnail img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 5px;
}
.single-article-content {
    color: #29342d;
    font-size: 17px;
    line-height: 1.85;
    overflow-wrap: anywhere;
}
.single-article-content p { margin: 0 0 1.2em; }
.single-article-content h2,
.single-article-content h3,
.single-article-content h4 {
    margin: 1.5em 0 .65em;
    color: var(--green-dark);
    border: 0;
}
.single-article-content img {
    max-width: 100%;
    height: auto;
}
.single-article-content blockquote {
    margin: 1.5em 0;
    padding: 12px 18px;
    background: var(--green-pale);
    border-left: 4px solid var(--green);
}
.single-article-content table {
    width: 100%;
    border-collapse: collapse;
}
.single-article-content th,
.single-article-content td {
    padding: 8px;
    border: 1px solid var(--line);
}
.single-article-footer {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}
.article-tags { margin-bottom: 16px; font-size: 13px; }
.article-navigation {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-weight: 700;
}
.page-links { margin: 20px 0; }


/* Distraction-free full-width single article layout */
.single-news-page {
    background: #fff;
}
.single-site-header {
    width: 100%;
    padding: 10px 0;
    background: #fff;
    border-bottom: 3px solid var(--green);
}
.single-site-header-inner {
    width: 90%;
    max-width: 1200px;
    height: 90px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}
.single-home-logo {
    display: inline-flex;
    align-items: center;
    height: 90px;
    max-width: 100%;
}
.single-home-logo img {
    display: block;
    width: auto;
    max-width: 100%;
    height: 90px;
    object-fit: contain;
}
.single-page-container {
    width: 90%;
    max-width: 1000px;
    margin: 28px auto 60px;
}
.full-article {
    margin: 0;
    padding: 0;
    border: 0;
}
.article-breadcrumb {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 13px;
    overflow-wrap: anywhere;
}
.article-breadcrumb a { color: var(--green-dark); }
.single-article-header h1 {
    margin: 10px 0 18px;
    padding: 0;
    border: 0;
    color: var(--ink);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.25;
}
.single-article-header h1:before { display: none; }
.single-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: var(--muted);
    font-size: 13px;
}
.article-categories a {
    color: var(--green-dark);
    font-weight: 700;
}
.single-article-thumbnail {
    margin: 0 0 28px;
}
.single-article-thumbnail img {
    display: block;
    width: 100%;
    max-height: 620px;
    object-fit: contain;
    border-radius: 5px;
}
.single-article-content {
    color: #29342d;
    font-size: 18px;
    line-height: 1.9;
    overflow-wrap: anywhere;
}
.single-article-content p { margin: 0 0 1.25em; }
.single-article-content h2,
.single-article-content h3,
.single-article-content h4 {
    margin: 1.5em 0 .65em;
    color: var(--green-dark);
    border: 0;
}
.single-article-content img {
    max-width: 100%;
    height: auto;
}
.single-article-content blockquote {
    margin: 1.5em 0;
    padding: 14px 20px;
    background: var(--green-pale);
    border-left: 4px solid var(--green);
}
.single-article-content table {
    width: 100%;
    border-collapse: collapse;
}
.single-article-content th,
.single-article-content td {
    padding: 9px;
    border: 1px solid var(--line);
}
.single-article-tags {
    margin: 28px 0 0;
    padding: 16px 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
}
.related-articles {
    margin: 34px 0 0;
    padding: 24px 0 0;
    border-top: 3px solid var(--green);
}
.related-articles > h2 {
    margin: 0 0 18px;
    color: var(--green-dark);
    font-size: 25px;
}
.related-articles-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 22px;
}
.related-article-item {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}
.related-article-thumb {
    flex: 0 0 104px;
    width: 104px;
    height: 76px;
    overflow: hidden;
    border-radius: 4px;
    background: var(--green-soft);
}
.related-article-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.related-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--green-dark);
    font-size: 10px;
    font-weight: 700;
}
.related-article-info { min-width: 0; }
.related-article-info time {
    color: var(--muted);
    font-size: 11px;
}
.related-article-info h3 {
    margin: 4px 0 0;
    font-size: 15px;
    line-height: 1.4;
}
.related-article-info h3 a { color: var(--ink); }
.related-article-info h3 a:hover { color: var(--green); }

@media (max-width: 640px) {
    .single-site-header-inner,
    .single-page-container { width: 94%; }
    .related-articles-list { grid-template-columns: 1fr; }
    .single-article-content { font-size: 16px; }
    .single-article-header h1 { font-size: 27px; }
}


/* Дата мен рубрика бір қатарда */
.latest-news-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 7px;
}
.latest-news-meta .latest-news-date {
    display: inline-block;
    margin: 0;
}
.latest-news-meta .post-category {
    display: inline-block;
    flex-shrink: 0;
    padding: 3px 8px;
    color: #16834a;
    background: #eaf5ee;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
}
.library-news-section {
    margin-top: 34px;
    padding-top: 24px;
    border-top: 3px solid var(--green);
}
.library-news-section .latest-news-heading h2 {
    margin: 0;
    color: var(--green-dark);
    font-size: clamp(21px, 2.2vw, 28px);
    line-height: 1.25;
}


/* Homepage compact news: image and title only */
.latest-news-grid-compact .latest-news-card-compact {
    padding-bottom: 16px;
    margin-bottom: 16px;
}
.latest-news-grid-compact .latest-news-image { margin-bottom: 9px; }
.compact-news-title {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 16px;
    line-height: 1.4;
}
.compact-news-title:before { display: none; }
.compact-news-title a { color: var(--ink); }
.compact-news-title a:hover { color: var(--green); }
.library-title-list {
    margin: 0;
    padding: 0 0 0 22px;
}
.library-title-list-two-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
    row-gap: 0;
    padding-left: 22px;
}
.library-title-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    line-height: 1.5;
}
.library-title-list li:last-child { border-bottom: 0; }
.library-title-list a { color: var(--ink); }
.library-title-list a:hover { color: var(--green); }
.archive-heading {
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--green);
}
.archive-heading h1 { margin: 0; color: var(--green-dark); font-size: 27px; }
.archive-description { color: var(--muted); }
.archive-pagination { margin-top: 24px; }
.archive-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.archive-pagination .page-numbers { padding: 6px 10px; border: 1px solid var(--line); border-radius: 3px; }
.article-comments {
    margin: 38px 0 10px;
    padding: 24px 0;
    border-top: 2px solid var(--green);
}
.comments-title, .comment-reply-title {
    margin: 0 0 18px;
    color: var(--green-dark);
    font-size: 23px;
}
.comment-list { padding-left: 24px; }
.comment-list .comment { margin: 0 0 18px; padding: 14px; background: var(--green-pale); border-radius: 4px; }
.comment-list .children { margin-top: 12px; }
.comment-form-wrap label { display: block; margin-bottom: 5px; font-weight: 700; }
.comment-form-wrap input[type="text"],
.comment-form-wrap input[type="email"],
.comment-form-wrap input[type="url"],
.comment-form-wrap textarea {
    width: 100%; max-width: 100%; padding: 10px 12px;
    border: 1px solid #cbd9cf; border-radius: 4px; font: inherit;
}
.comment-form-wrap textarea { min-height: 140px; }
.comment-form-wrap input[type="submit"] {
    padding: 10px 18px; color: #fff; background: var(--green-dark);
    border: 0; border-radius: 4px; font: inherit; font-weight: 700; cursor: pointer;
}
.comment-form-wrap input[type="submit"]:hover { background: var(--green); }
.comments-closed { color: var(--muted); }


/* Homepage typography: compact, balanced article titles */
.home .content-column .latest-news-card-compact h2.compact-news-title,
.home .content-column .latest-news-card-compact h2.compact-news-title a {
    font-size: 14px !important;
    line-height: 1.4 !important;
    font-weight: 600;
}
.home .content-column .library-title-list,
.home .content-column .library-title-list li,
.home .content-column .library-title-list li a {
    font-size: 14px !important;
    line-height: 1.45 !important;
}
.home .content-column .library-news-section .latest-news-heading h2 {
    font-size: 20px !important;
    line-height: 1.3 !important;
}


/* 2.0.6: refined editorial design */
body { background: #f6f9f7; }
.site-header { background: transparent; }
.header-logo, .header-banner {
    height: 150px; min-height: 150px;
    border: 1px solid #e1ebe4;
    border-radius: 12px;
    box-shadow: 0 5px 22px rgba(22, 75, 44, .07);
    padding: 8px 14px;
}
.header-logo { border-left: 5px solid var(--green); }
.header-banner { background: #fff; border-style: solid; }
.header-logo img, .header-banner img { height: 150px; max-height: 100%; }
.header-banner img { width: 100%; object-fit: contain; }
.widget-column {
    border: 1px solid #e5ece7;
    border-radius: 12px;
    box-shadow: 0 5px 22px rgba(20, 70, 42, .045);
    padding: 18px;
}
.left-sidebar, .right-sidebar, .content-column { border-top: 0; }
.latest-news-grid-compact { column-gap: 20px; }
.latest-news-grid-compact .latest-news-card-compact {
    padding: 12px; margin-bottom: 18px;
    background: #fff; border: 1px solid #e8eee9;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(20, 70, 42, .035);
}
.latest-news-grid-compact .latest-news-image { border-radius: 7px; overflow: hidden; }
.library-news-section {
    margin-top: 28px; padding: 22px;
    background: #fff; border: 1px solid #e5ece7;
    border-top: 0; border-radius: 12px;
    box-shadow: 0 5px 22px rgba(20, 70, 42, .04);
}
.library-news-section .latest-news-heading {
    margin-bottom: 12px; padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}
.library-title-list-two-columns li { padding: 9px 0; }
.library-title-list-two-columns a { font-weight: 500; }
@media (max-width: 640px) {
    .library-title-list-two-columns { grid-template-columns: 1fr; }
    .header-widgets { grid-template-columns: 1fr; }
    .header-logo, .header-banner { height: 150px; min-height: 150px; }
    .library-news-section { padding: 16px; }
}


/* Popular articles and homepage widget sections */
.popular-news-section,
.home-extra-section {
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}
.popular-news-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
}
.popular-news-item { min-width: 0; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.popular-news-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    margin-bottom: 8px;
    border-radius: 6px;
    background: var(--green-soft);
}
.popular-news-thumb img { display:block; width:100%; height:100%; object-fit:cover; }
.popular-news-thumb span { display:flex; width:100%; height:100%; align-items:center; justify-content:center; color:var(--green-dark); font-size:12px; font-weight:700; }
.popular-news-item h3 { margin:0; font-size:14px; line-height:1.45; }
.popular-news-item h3 a { color:var(--ink); }
.home-extra-widgets { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.home-extra-widgets .widget { min-width:0; margin:0 0 18px; }
@media (max-width:640px) {
    .popular-news-grid, .home-extra-widgets { grid-template-columns:1fr; }
}


/* 2.0.8: tighter masthead-to-content spacing and refined homepage rhythm */
.site-container {
    width: min(94%, 1480px);
}
.site-header {
    padding: 8px 0 10px;
    margin: 0 0 8px;
    border-bottom: 0;
}
.header-widgets {
    gap: 14px;
}
.header-logo,
.header-banner {
    height: 150px;
    min-height: 150px;
    padding: 6px 12px;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(20, 70, 42, .06);
}
.header-logo img,
.header-banner img {
    height: 136px;
    max-height: 136px;
    object-fit: contain;
}
.header-banner img { width: 100%; }
.main-layout {
    margin-top: 0;
    margin-bottom: 28px;
    gap: 16px;
}
.widget-column {
    padding: 14px;
}
.content-column {
    padding-top: 12px;
    background: #fff;
}
.center-top-widgets { margin-bottom: 12px; }
.latest-news-grid-compact {
    margin-top: 0;
    row-gap: 12px;
}
.latest-news-grid-compact .latest-news-card-compact {
    padding: 10px;
    margin: 0;
    border: 1px solid #e7eee9;
    border-radius: 11px;
    background: linear-gradient(180deg, #fff 0%, #fbfdfb 100%);
    box-shadow: 0 2px 9px rgba(20, 70, 42, .035);
    transition: box-shadow .2s ease, transform .2s ease;
}
.latest-news-grid-compact .latest-news-card-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 18px rgba(20, 70, 42, .09);
}
.latest-news-grid-compact .latest-news-image {
    margin-bottom: 8px;
    border-radius: 8px;
}
.home .content-column .latest-news-card-compact h2.compact-news-title,
.home .content-column .latest-news-card-compact h2.compact-news-title a {
    font-size: 14px !important;
    line-height: 1.4 !important;
}
.library-news-section { margin-top: 22px; }
.popular-news-section, .home-extra-section { margin-top: 24px; padding-top: 18px; }
@media (max-width: 640px) {
    .site-container { width: 96%; }
    .site-header { padding: 6px 0 8px; margin-bottom: 6px; }
    .header-widgets { gap: 9px; }
    .main-layout { gap: 10px; }
    .content-column { padding: 10px; }
}


/* 2.0.9: restore homepage widget areas and center single-article logo */
.single-site-header-inner {
    justify-content: center;
}
.single-home-logo {
    justify-content: center;
    margin: 0 auto;
}
.home-extra-section {
    clear: both;
    display: block;
}
.home-extra-widgets {
    align-items: start;
}
.home-extra-widgets > .widget {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
}


/* 2.1.0: compact popular list and remove excess space below masthead */
@media (min-width: 641px) {
    .site-header { padding: 4px 0 5px !important; margin: 0 0 4px !important; }
    .header-widgets { gap: 10px !important; }
    .main-layout { margin-top: 0 !important; gap: 12px !important; }
    .content-column { padding: 8px !important; }
    .left-sidebar, .right-sidebar { padding: 10px !important; }
    .latest-news-grid-compact .latest-news-card-compact { padding: 8px !important; }
}
/* 2.1.1: popular articles as a clean, image-free three-column list */
.popular-news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 22px;
    row-gap: 0;
}
.popular-news-thumb { display: none !important; }
.popular-news-item {
    min-width: 0;
    padding: 0;
    margin: 0;
    border: 0;
}
.popular-news-item h3,
.popular-news-item h3 a {
    margin: 0;
    padding: 0;
    font-size: 12px !important;
    line-height: 1.45 !important;
    font-weight: 500;
}
.popular-news-item h3 a {
    color: var(--ink);
    text-decoration: none;
}
.popular-news-item h3 a:hover { color: var(--green); }
.popular-news-section { margin-top: 20px; padding-top: 14px; }
.popular-news-section .latest-news-heading { margin-bottom: 10px; padding-bottom: 8px; }
.popular-news-section .latest-news-heading h2 { font-size: 18px; }
@media (max-width: 960px) {
    .popular-news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
}
@media (max-width: 640px) {
    .site-header { margin-bottom: 4px !important; padding-bottom: 4px !important; }
    .main-layout { margin-top: 0 !important; }
    .content-column { padding: 8px !important; }
    .popular-news-grid { grid-template-columns: 1fr; }
}


/* 2.1.3: remove the unused blank strip above homepage news cards */
@media (min-width: 641px) {
    .home .content-column { padding-top: 0 !important; }
    .home .center-top-widgets {
        margin: 0 !important;
        padding: 0 !important;
    }
    .home .center-top-widgets:empty { display: none !important; }
    .home .center-top-widgets .widget:empty { display: none !important; }
    .home .latest-news-grid-compact { margin-top: 0 !important; }
}
@media (max-width: 640px) {
    .home .content-column { padding-top: 0 !important; }
    .home .center-top-widgets { margin: 0 !important; padding: 0 !important; }
}

/* 2.1.4: larger horizontal logo and contact widget below the masthead */
.site-header {
    padding: 6px 0 8px;
    margin: 0 0 8px;
    border: 0;
}

.header-widgets {
    grid-template-columns: 65fr 35fr;
    gap: 12px;
    align-items: center;
}

.header-logo,
.header-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 180px;
    min-height: 180px;
    padding: 5px 10px;
    overflow: hidden;
    box-sizing: border-box;
}

.header-logo img {
    display: block;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 180px !important;
    object-fit: contain !important;
    object-position: center;
}

.header-banner img {
    display: block;
    width: 100% !important;
    height: 150px !important;
    max-width: 100% !important;
    max-height: 150px !important;
    object-fit: contain !important;
    object-position: center;
}

.header-contact-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin-top: 8px;
    padding: 10px 16px;
    background: var(--green-pale);
    border: 1px solid var(--line);
    border-left: 4px solid var(--green);
    border-radius: 6px;
    color: var(--ink);
}

.header-contact-area .widget {
    width: 100%;
    margin: 0;
}

.header-contact-area .widget-title {
    margin: 0 0 6px;
    font-size: 14px;
}

.header-contact-area .custom-html-widget {
    width: 100%;
}

.header-contact-area a {
    color: var(--green-dark);
    font-weight: 600;
    text-decoration: none;
}

.header-contact-area a:hover {
    text-decoration: underline;
}

.header-contact-items {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 28px;
    width: 100%;
    font-size: 14px;
    line-height: 1.5;
}

.header-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    overflow-wrap: anywhere;
}

@media (max-width: 640px) {
    .header-widgets {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .header-logo,
    .header-banner {
        height: 160px;
        min-height: 160px;
    }

    .header-logo img {
        width: 100% !important;
        height: auto !important;
        max-height: 150px !important;
    }

    .header-banner img {
        height: 140px !important;
        max-height: 140px !important;
    }

    .header-contact-area {
        margin-top: 6px;
        padding: 10px;
    }

    .header-contact-items {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        font-size: 13px;
    }
}

/* =========================================================
   2.1.5 — Google site search + visible WhatsApp icon
   ========================================================= */
.header-search-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    margin-top: 10px;
    padding: 12px 16px;
    background: #f7faf8;
    border: 1px solid #e1ebe4;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(20, 70, 42, .045);
}

.header-search-intro {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    gap: 1px;
    line-height: 1.25;
}

.header-search-google {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -.8px;
}
.header-search-google span:nth-child(1),
.header-search-google span:nth-child(4) { color: #4285f4; }
.header-search-google span:nth-child(2),
.header-search-google span:nth-child(6) { color: #ea4335; }
.header-search-google span:nth-child(3) { color: #fbbc05; }
.header-search-google span:nth-child(5) { color: #34a853; }

.header-search-caption {
    color: #68756d;
    font-size: 11px;
    font-weight: 600;
}

.header-google-search {
    display: flex;
    align-items: stretch;
    flex: 1 1 auto;
    max-width: 760px;
    min-width: 0;
    height: 46px;
    margin: 0;
    background: #fff;
    border: 1px solid #d7e2da;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(20, 50, 30, .05);
}

.header-google-search:focus-within {
    border-color: #16834a;
    box-shadow: 0 0 0 3px rgba(22, 131, 74, .10);
}

.header-google-search input[type="search"] {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0 18px;
    color: #202923;
    background: transparent;
    border: 0;
    outline: 0;
    font: inherit;
    font-size: 14px;
    box-shadow: none;
}

.header-google-search input[type="search"]::placeholder { color: #89958d; }
.header-google-search input[type="search"]:focus { outline: 0; box-shadow: none; }

.header-google-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex: 0 0 auto;
    min-width: 104px;
    margin: 3px;
    padding: 0 17px;
    color: #fff;
    background: #16834a;
    border: 0;
    border-radius: 22px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s ease, transform .18s ease;
}

.header-google-search button:hover { background: #0d6035; }
.header-google-search button:focus-visible { outline: 3px solid rgba(22, 131, 74, .25); outline-offset: 2px; }
.search-button-icon { font-size: 22px; line-height: 1; }

/* Add a recognizable WhatsApp mark before any wa.me link in the contact widget. */
.header-contact-area a[href*="wa.me"]::before,
.header-contact-area a[href*="whatsapp"]::before {
    content: "";
    display: inline-block;
    width: 23px;
    height: 23px;
    margin-right: 7px;
    vertical-align: -6px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%2325D366' d='M16 2.7A13.1 13.1 0 0 0 4.8 22.6L3 29l6.6-1.7A13.1 13.1 0 1 0 16 2.7Z'/%3E%3Cpath fill='white' d='M23.3 19.2c-.4-.2-2.1-1-2.4-1.1-.3-.1-.6-.2-.8.2-.2.4-.9 1.1-1.1 1.3-.2.2-.4.3-.8.1-.4-.2-1.5-.6-2.9-1.8-1.1-1-1.8-2.1-2-2.5-.2-.4 0-.6.2-.8l.5-.6c.2-.2.2-.4.4-.6.1-.2 0-.5 0-.6-.1-.2-.8-1.9-1.1-2.6-.3-.7-.6-.6-.8-.6h-.7c-.2 0-.6.1-.9.4-.3.4-1.2 1.2-1.2 2.9s1.2 3.3 1.4 3.5c.2.2 2.4 3.7 5.8 5.1.8.3 1.4.5 1.9.6.8.2 1.6.2 2.2.1.7-.1 2.1-.9 2.4-1.7.3-.8.3-1.5.2-1.7-.1-.1-.3-.2-.7-.4Z'/%3E%3C/svg%3E");
}

@media (max-width: 640px) {
    .header-search-area {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-top: 8px;
        padding: 11px;
    }
    .header-search-intro {
        flex-direction: row;
        align-items: baseline;
        gap: 9px;
    }
    .header-search-google { font-size: 19px; }
    .header-search-caption { font-size: 11px; }
    .header-google-search { width: 100%; max-width: none; height: 44px; }
    .header-google-search input[type="search"] { padding: 0 13px; font-size: 13px; }
    .header-google-search button { min-width: 84px; padding: 0 12px; font-size: 13px; }
}

