/* ============================================================================
   DAVOLIN News — listing page + single article template
   Scope: .davo-news-* (loaded only on page-davo-news.php and single post)
   Accent: green (--davo-green) + orange (--davo-orange) mixed
   ========================================================================== */

.davo-news-page,
body.single-post.astra-child-mannlee {
    background: var(--davo-bg);
}

body.single-post.astra-child-mannlee .davo-page {
    overflow: visible;
}

/* News listing uses the full container width (no max-width cap) */
.davo-news-page .davo-news-section .davo-container {
    max-width: none;
}

/* Single article keeps a readable measure */
.davo-article-container {
    max-width: 1280px;
    margin: 0 auto;
}

.davo-article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 52px;
    align-items: start;
}

/* ============================================================================
    Shared UI bits
   ========================================================================== */

/* ============================================================================
   Sidebar (shared by listing; article page no longer uses it)
   ========================================================================== */

.davo-news-sidebar {
    position: sticky;
    top: 24px;
    background: #fff;
    border: 1px solid var(--davo-border);
    border-top: 3px solid var(--davo-green);
    border-radius: 10px;
    padding: 20px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.davo-news-sidebar-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--davo-text-light);
    margin: 0 20px 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--davo-border);
}

.davo-news-cat-list { list-style: none; margin: 0; padding: 0; }

.davo-news-cat-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    color: var(--davo-text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.davo-news-cat-list a:hover {
    background: var(--davo-bg-alt);
    color: var(--davo-orange-dark);
}

.davo-news-cat-list li.is-active a {
    background: linear-gradient(90deg, rgba(159, 193, 12, 0.14) 0%, transparent 100%);
    border-left-color: var(--davo-green);
    color: var(--davo-green-dark);
    font-weight: 600;
}

.davo-news-cat-count {
    font-size: 12px;
    background: var(--davo-bg-grey);
    color: var(--davo-text-light);
    padding: 2px 9px;
    border-radius: 10px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.davo-news-cat-list li.is-active .davo-news-cat-count {
    background: var(--davo-green);
    color: #fff;
}

/* Mobile collapsible sidebar */
.davo-news-sidebar-toggle {
    display: none;
    width: 100%;
    background: #fff;
    border: 1px solid var(--davo-border);
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 600;
    color: var(--davo-dark);
    cursor: pointer;
    text-align: left;
    margin-bottom: 18px;
    align-items: center;
    justify-content: space-between;
}
.davo-news-sidebar-toggle::after {
    content: "▾";
    color: var(--davo-text-light);
    transition: transform 0.2s;
}
.davo-news-sidebar-toggle.is-open::after { transform: rotate(180deg); }

/* ============================================================================
   Listing page layout
   ========================================================================== */

.davo-news-section { padding: 56px 0 80px; }

.davo-news-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 48px;
    align-items: start;
}

.davo-news-listing-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 2px solid var(--davo-green);
    flex-wrap: wrap;
}

.davo-news-listing-head h2 {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 700;
    color: var(--davo-dark);
    margin: 0;
    position: relative;
    padding-left: 14px;
}

.davo-news-listing-head h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: var(--davo-orange);
    border-radius: 2px;
}

.davo-news-listing-meta {
    font-size: 13px;
    color: var(--davo-text-light);
}
.davo-news-listing-meta strong { color: var(--davo-green-dark); }

/* ============================================================================
   Vertical article list (image left + content right, one per row)
   Modeled on davochina.com /article/company-news_c0001
   ========================================================================== */

.davo-news-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.davo-news-row {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    padding: 28px 0;
    border-bottom: 1px solid var(--davo-border);
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.davo-news-row:first-child { padding-top: 0; }
.davo-news-row:last-child { border-bottom: none; }
.davo-news-row:hover { background: linear-gradient(90deg, rgba(159, 193, 12, 0.05) 0%, transparent 60%); }

.davo-news-row-media {
    display: block;
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--davo-bg-grey);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.davo-news-row-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s;
}

.davo-news-row:hover .davo-news-row-media img { transform: scale(1.05); }

.davo-news-row-media--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, var(--davo-bg-grey) 0%, #e3e8dd 100%);
    color: var(--davo-orange-dark);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.davo-news-row-cat {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(246, 177, 48, 0.95);
    color: #fff;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.davo-news-row-body {
    display: flex;
    flex-direction: column;
    padding: 4px 0;
}

.davo-news-row-date {
    font-size: 12px;
    color: var(--davo-text-light);
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.davo-news-row-date::before {
    content: "";
    width: 8px;
    height: 8px;
    background: var(--davo-green);
    border-radius: 50%;
    display: inline-block;
}

.davo-news-row-title {
    font-size: 19px;
    line-height: 1.4;
    color: var(--davo-dark);
    margin: 0 0 10px;
    font-weight: 700;
    transition: color 0.15s;
}

.davo-news-row-title a {
    color: inherit;
    text-decoration: none;
}

.davo-news-row:hover .davo-news-row-title {
    color: var(--davo-green-dark);
}

.davo-news-row-excerpt {
    font-size: 14px;
    color: var(--davo-text);
    line-height: 1.65;
    margin: 0 0 14px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.davo-news-row-link {
    font-size: 13px;
    font-weight: 700;
    color: var(--davo-orange-dark);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    align-self: flex-start;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    transition: border-color 0.15s, color 0.15s;
}

.davo-news-row-link:hover {
    border-bottom-color: var(--davo-orange);
    color: var(--davo-orange-dark);
}

/* Empty state */
.davo-news-empty {
    background: var(--davo-bg-alt);
    border: 1px dashed var(--davo-border);
    border-radius: 10px;
    padding: 60px 24px;
    text-align: center;
    color: var(--davo-text-light);
}
.davo-news-empty h3 { color: var(--davo-dark); margin: 0 0 8px; }

/* ============================================================================
   Pagination
   ========================================================================== */

.davo-news-pagination {
    margin-top: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.davo-news-pagination a,
.davo-news-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--davo-border);
    border-radius: 6px;
    color: var(--davo-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    background: #fff;
    transition: all 0.15s;
}

.davo-news-pagination a:hover {
    border-color: var(--davo-orange);
    color: var(--davo-orange-dark);
    background: rgba(246, 177, 48, 0.06);
}

.davo-news-pagination .is-current {
    background: var(--davo-green);
    color: #fff;
    border-color: var(--davo-green);
}

.davo-news-pagination .is-disabled {
    color: var(--davo-text-light);
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.davo-news-pagination-ellipsis {
    border: none !important;
    background: transparent !important;
    pointer-events: none;
}

/* ============================================================================
   Single article
   Layout: full-width single column (sidebar removed per user request)
   ========================================================================== */

.davo-article-section { padding: 48px 0 80px; }

.davo-article {
    background: #fff;
    min-width: 0;
}

.davo-article-sidebar {
    position: sticky;
    top: 110px;
    display: grid;
    gap: 22px;
    align-self: start;
}

.davo-article-side-card {
    border: 1px solid var(--davo-border);
    border-radius: 12px;
    background: #fff;
    padding: 18px;
    box-shadow: 0 10px 28px rgba(24, 33, 39, .08);
}

.davo-article-side-kicker {
    margin: 0 0 8px;
    color: var(--davo-green-dark);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.davo-article-side-card h2 {
    margin: 0 0 14px;
    color: var(--davo-dark);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.35;
}

.davo-article-factory-card img {
    display: block;
    width: 100%;
    height: 145px;
    object-fit: cover;
    border-radius: 8px;
    margin: 0 0 14px;
}

.davo-article-factory-card a {
    color: var(--davo-green-dark);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.davo-article-side-copy {
    margin: 0 0 16px;
    color: var(--davo-text-light);
    font-size: 13px;
    line-height: 1.65;
}

.davo-article-side-status {
    margin: 0 0 12px;
    padding: 9px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.davo-article-side-status.is-success {
    background: rgba(159, 193, 12, .14);
    color: var(--davo-green-dark);
}

.davo-article-side-status.is-error {
    background: rgba(198, 54, 42, .1);
    color: #b42318;
}

.davo-article-mini-form {
    display: grid;
    gap: 10px;
}

.davo-article-mini-form label {
    display: grid;
    gap: 5px;
    margin: 0;
}

.davo-article-mini-form span {
    color: var(--davo-dark);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1;
    text-transform: uppercase;
}

.davo-article-mini-form input,
.davo-article-mini-form textarea {
    width: 100%;
    border: 1px solid var(--davo-border);
    border-radius: 5px;
    background: #fff;
    color: var(--davo-dark);
    font: inherit;
    font-size: 13px;
    line-height: 1.4;
    outline: 0;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.davo-article-mini-form input {
    height: 38px;
    padding: 0 11px;
}

.davo-article-mini-form textarea {
    min-height: 82px;
    padding: 9px 11px;
    resize: vertical;
}

.davo-article-mini-form input:focus,
.davo-article-mini-form textarea:focus {
    border-color: var(--davo-green);
    box-shadow: 0 0 0 3px rgba(159, 193, 12, .14);
}

.davo-article-mini-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    border: 0;
    border-radius: 5px;
    background: var(--davo-green);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: background .18s ease, transform .18s ease;
}

.davo-article-mini-form button:hover {
    background: var(--davo-green-dark);
    transform: translateY(-1px);
}

.davo-article-side-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    border-radius: 5px;
    background: var(--davo-green);
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background .18s ease, transform .18s ease;
}

.davo-article-side-button:hover {
    background: var(--davo-green-dark);
    transform: translateY(-1px);
}

.davo-article-sidebar-form .ff-el-group {
    margin-bottom: 10px;
}

.davo-article-sidebar-form .ff-el-input--label label {
    margin-bottom: 4px;
    color: var(--davo-dark);
    font-size: 11px;
    font-weight: 700;
}

.davo-article-sidebar-form .ff-el-form-control {
    min-height: 38px;
    border: 1px solid var(--davo-border) !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    font-size: 13px;
}

.davo-article-sidebar-form textarea.ff-el-form-control {
    min-height: 78px;
}

.davo-article-sidebar-form .ff-btn-submit {
    width: 100%;
    border: 0 !important;
    border-radius: 4px !important;
    background: var(--davo-green) !important;
    color: #fff !important;
    font-weight: 700;
}

.davo-article-head {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--davo-green);
}

.davo-article-cat-badge {
    display: inline-block;
    background: var(--davo-orange);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 4px 12px;
    border-radius: 4px;
    margin-bottom: 16px;
    text-decoration: none;
    transition: background 0.15s;
}
.davo-article-cat-badge:hover { background: var(--davo-orange-dark); }

.davo-article-title {
    font-size: clamp(26px, 3.6vw, 40px);
    font-weight: 800;
    color: var(--davo-dark);
    line-height: 1.25;
    margin: 0 0 18px;
    letter-spacing: -0.01em;
}

.davo-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 13px;
    color: var(--davo-text-light);
}

.davo-article-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.davo-article-meta-item strong {
    color: var(--davo-dark);
    font-weight: 600;
}

/* ---------- Article body — Heiti font, centered images ---------- */

.davo-article-body {
    /* 黑体 / sans-serif strong weight */
    font-family: "Helvetica Neue", "Heiti SC", "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 16px;
    line-height: 1.85;
    letter-spacing: 0.01em;
    text-align: center;
}

.davo-article-body p { margin: 0 0 20px; }
.davo-article-body h2 {
    font-size: 26px;
    margin: 36px 0 16px;
    color: var(--davo-dark);
    font-weight: 800;
    padding-left: 12px;
    border-left: 4px solid var(--davo-green);
}
.davo-article-body h3 {
    font-size: 21px;
    margin: 30px 0 14px;
    color: var(--davo-dark);
    font-weight: 700;
}
.davo-article-body h4 {
    font-size: 18px;
    margin: 24px 0 12px;
    color: var(--davo-green-dark);
    font-weight: 700;
}

/* Content images centered */
.davo-article-body img,
.davo-article-body p > img,
.davo-article-body p img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.davo-article-body ul,
.davo-article-body ol {
    margin: 0 auto 20px;
    padding-left: 24px;
    max-width: 760px;
    text-align: left;
}
.davo-article-body li { margin-bottom: 8px; }

.davo-article-body a {
    color: var(--davo-orange-dark);
    text-decoration: underline;
    font-weight: 600;
}
.davo-article-body a:hover { color: var(--davo-orange); }

.davo-article-end-cta {
    margin-top: 48px;
    border: 1px solid var(--davo-border);
    background: #f4f6f1;
    text-align: center;
}

.davo-article-end-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--davo-border);
    flex-wrap: wrap;
}

.davo-article-end-social span {
    color: var(--davo-text-light);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.davo-article-share-links {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.davo-article-share-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    text-decoration: none;
    transition: opacity .18s ease, transform .18s ease;
}

.davo-article-share-link:hover {
    opacity: .82;
    transform: translateY(-2px);
}

.davo-article-share-icon,
.davo-article-share-link svg {
    display: block;
    width: 30px;
    height: 30px;
}

.davo-article-end-box {
    padding: 30px 24px 34px;
}

.davo-article-end-box h2 {
    margin: 0 0 10px;
    color: var(--davo-dark);
    font-size: clamp(22px, 2.6vw, 30px);
}

.davo-article-end-box p {
    margin: 0 0 18px;
    color: var(--davo-text-light);
}

.davo-article-end-box .davo-products-button {
    display: inline-flex;
    background: var(--davo-green);
    color: #fff !important;
    padding: 12px 28px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
}
.davo-article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px auto;
    background: #fff;
    border: 1px solid var(--davo-border);
    border-radius: 6px;
    overflow: hidden;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
}
.davo-article-body th,
.davo-article-body td {
    border: 1px solid var(--davo-border);
    padding: 10px 14px;
    text-align: left;
    vertical-align: top;
}
.davo-article-body th {
    background: var(--davo-bg-grey);
    font-weight: 700;
    color: var(--davo-dark);
}

.davo-article-body blockquote {
    border-left: 4px solid var(--davo-green);
    background: var(--davo-bg-alt);
    padding: 16px 20px;
    margin: 24px auto;
    max-width: 760px;
    color: var(--davo-text);
    border-radius: 0 6px 6px 0;
    font-style: italic;
    text-align: left;
}

.davo-article-body pre {
    background: #1a1a1a;
    color: #f1f1f1;
    padding: 18px 22px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 13px;
    margin: 22px auto;
    max-width: 760px;
    font-weight: 500;
    font-family: "SF Mono", Menlo, Monaco, Consolas, monospace;
    text-align: left;
}

/* ---------- Article prev/next ---------- */

.davo-article-prevnext {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-top: 48px;
    padding-top: 28px;
    border-top: 1px solid var(--davo-border);
    flex-wrap: wrap;
}

.davo-article-prevnext-item {
    flex: 1;
    min-width: 240px;
    background: #fff;
    border: 1px solid var(--davo-border);
    border-radius: 8px;
    padding: 16px 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s;
}

.davo-article-prevnext-item:hover {
    border-color: var(--davo-green);
    background: rgba(159, 193, 12, 0.05);
}

.davo-article-prevnext-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--davo-green-dark);
    margin-bottom: 4px;
    font-weight: 700;
}

.davo-article-prevnext-title {
    font-size: 14px;
    color: var(--davo-dark);
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.davo-article-prevnext-item.is-next { text-align: right; }

/* ---------- Related News ---------- */

.davo-article-related {
    margin-top: 60px;
    padding-top: 36px;
    border-top: 2px solid var(--davo-green);
}

.davo-article-related-head { margin-bottom: 24px; }

.davo-article-related-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--davo-orange-dark);
    font-size: 12px;
    font-weight: 700;
    margin: 0 0 6px;
}

.davo-article-related-head h2 {
    font-size: clamp(22px, 2.6vw, 28px);
    color: var(--davo-dark);
    margin: 0;
    font-weight: 700;
}

/* Related list — slightly more compact than main listing */
.davo-news-list--related .davo-news-row {
    grid-template-columns: 200px 1fr;
    gap: 20px;
    padding: 20px 0;
}

.davo-news-row--related .davo-news-row-title { font-size: 16px; }
.davo-news-row--related .davo-news-row-excerpt { font-size: 13px; -webkit-line-clamp: 2; }

/* ============================================================================
   Responsive
   ========================================================================== */

@media (max-width: 992px) {
    .davo-news-layout { grid-template-columns: 1fr; gap: 24px; }
    .davo-news-sidebar { position: static; }
    .davo-article-layout { grid-template-columns: 1fr; }
    .davo-article-sidebar { position: static; }
    .davo-news-sidebar-toggle { display: flex; }
    .davo-news-sidebar.is-collapsed { display: none; }
    .davo-news-row { grid-template-columns: 220px 1fr; gap: 20px; }
}

@media (max-width: 768px) {
    .davo-news-section { padding: 32px 0 56px; }
    .davo-news-row,
    .davo-news-list--related .davo-news-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .davo-news-row-media { aspect-ratio: 16 / 9; max-width: 100%; }
    .davo-article-section { padding: 32px 0 60px; }
    .davo-article-body { font-size: 15px; line-height: 1.8; }
    .davo-article-prevnext { flex-direction: column; }
    .davo-article-prevnext-item.is-next { text-align: left; }
}

@media (max-width: 576px) {
    .davo-news-listing-head { flex-direction: column; align-items: flex-start; }
}
