/*
====================================
SINGLE NEWS PAGE
====================================
*/

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--charcoal);
    margin: 0 0 20px;
}

.meta-dot {
    margin: 0 6px;
    opacity: .5;
}

.single-news-content {
    padding: 30px 0 60px;
}

.single-news-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 40px;
    align-items: start;
}

/* ---------- Article ---------- */
.single-news-meta-taxonomies {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 10px;
    margin-bottom: 10px;
}

.single-news-badge {
    display: inline-block;
    padding: 8px 18px !important;
    border-radius: 20px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.25s ease;

    /* Uses --pill-color if inline style set it, otherwise falls back to green */
    --item-color: var(--pill-color, var(--green));

    background-color: color-mix(in srgb, var(--item-color) 12%, var(--white)) !important;
    color: var(--item-color) !important;
}

.single-news-badge:hover {
    background-color: color-mix(in srgb, var(--item-color) 22%, var(--white)) !important;
    transform: translateY(-1px);
}

/*============================
SINGLE NEWS - TAGS LIST
Each tag gets its own colour via --tag-color
(set inline per-tag in single-news_item.php)
=============================*/

.single-news-tags {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 10px;
}

.single-news-tags .tag {
    display: inline-block;
    margin: 0;
}

.single-news-tags .tag a {
    display: inline-block;
    padding: 8px 18px !important;
    border-radius: 20px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.25s ease;

    --item-color: var(--tag-color, var(--muted));

    background-color: color-mix(in srgb, var(--item-color) 12%, var(--white)) !important;
    color: var(--item-color) !important;
}

.single-news-tags .tag a:hover {
    background-color: color-mix(in srgb, var(--item-color) 22%, var(--white)) !important;
    transform: translateY(-1px);
}

.single-news-title {
    font-size: 30px;
    line-height: 1.3;
    color: var(--charcoal);
    font-family: var(--font-en-display);
    margin: 0 0 14px;
}

.single-news-subheading {
    font-size: 16px;
    color: var(--muted);
    line-height: 1.6;
    margin: 0 0 20px;
}

.single-news-byline {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.single-news-byline img {
    border-radius: 50%;
    border: 1px solid var(--border);
}

.byline-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.byline-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--charcoal);
}

.byline-meta {
    font-size: 12px;
    color: var(--muted);
}

.byline-share {
    display: flex;
    gap: 8px;
}

.byline-share a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface);
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.byline-share a:hover {
    background: var(--teal);
    color: var(--white);
}

.single-news-featured-img {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 24px;
}

.single-news-featured-img img {
    width: 100%;
    height: auto;
    display: block;
}

.single-news-body {
    font-size: 16px;
    line-height: 1.8;
    color: var(--charcoal);
}

.single-news-body h2,
.single-news-body h3 {
    color: var(--teal);
    margin: 28px 0 12px;
}

.single-news-body ul,
.single-news-body ol {
    margin: 0 0 18px 22px;
}

.single-news-body p {
    margin: 0 0 18px;
}

/* ---------- Testimonials ---------- */

.single-news-testimonials {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.testimonials-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.testimonial-reply-btn,
.write-comment-btn {
    background: transparent;
    color: var(--green);
    border: 1.5px solid var(--green);
    font-weight: 600;
    font-size: 13px;
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.testimonial-reply-btn:hover,
.write-comment-btn:hover {
    background: var(--green);
    color: var(--white);
}

/* Comment List Layout */
.testimonial-list {
    display: flex;
    flex-direction: column;
}

.testimonial-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.testimonial-item:last-child {
    border-bottom: none;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.testimonial-author img {
    border-radius: 50%;
    border: 1px solid var(--border);
}

.testimonial-author-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.testimonial-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--charcoal);
}

.testimonial-date {
    font-size: 12px;
    color: var(--muted);
}

.testimonial-content {
    margin-left: 46px;
}

.testimonial-text {
    font-size: 14px;
    color: var(--charcoal);
    line-height: 1.5;
    margin: 0 0 6px;
}

.testimonial-reply-btn:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Nested Replies & Indentation */
.testimonial-toggle-replies {
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin: 8px 0 0 46px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: var(--green);
    border: 1.5px solid var(--green);
    font-weight: 600;
    font-size: 13px;
    padding: 6px 16px;

}

.testimonial-toggle-replies:hover,
.testimonial-toggle-replies:active {
    background: var(--green);
    color: var(--white);
}

.testimonial-toggle-replies input[type="submit"] {
    background: var(--green) !important;
    border-color: var(--green) !important;
    color: #ffffff !important;
}

.testimonial-toggle-replies:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 3px;
    border-radius: 4px;
    background: var(--green);
    color: var(--white);
}

.testimonial-replies {
    display: none;
    margin-left: 46px;
    padding-left: 16px;
    border-left: 2px solid color-mix(in srgb, var(--green) 30%, transparent);
}

.testimonial-replies.is-open {
    display: block;
}

.testimonial-item.is-reply {
    border-bottom: none;
    padding: 12px 0 0;
}

/* Slot for Nested Input */
.testimonial-reply-slot {
    margin-left: 46px;
}

/* Minimal Input Box */
.comment-popup {
    display: none;
    margin: 14px 0;
    padding: 14px 16px;
    background: #fafafa;
    border: 1px solid var(--border);
    border-left: 3px solid var(--green);
    border-radius: 8px;
}

.comment-popup.is-open {
    display: block;
}

.comment-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 10px;
}

.comment-popup-close {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--muted);
    cursor: pointer;
    padding: 0 4px;
}

.comment-popup-close:hover {
    color: var(--charcoal);
}

.comment-popup-close:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
    border-radius: 4px;
}

.single-news-comment-form textarea#comment {
    width: 100%;
    height: 70px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    background: #ffffff;
    resize: vertical;
    box-sizing: border-box;
}

.single-news-comment-form textarea#comment:focus {
    outline: none;
    border-color: var(--green);
}

.single-news-comment-form input[type="submit"] {
    margin-top: 8px;
    background: var(--green);
    color: #ffffff;
    border: none;
    font-weight: 600;
    font-size: 12px;
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.single-news-comment-form input[type="submit"]:hover {
    background: color-mix(in srgb, var(--green) 80%, black);
}

.single-news-comment-form .comment-form-url,
.single-news-comment-form .logged-in-as {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}

/* ---------- Sidebar ----------
   Card, tabs, and list-row styling now lives in the shared sidebar.css
   (loaded on every page) so this template, the front-page hero panel,
   and Pages all render the same sidebar boxes. See assets/css/sidebar.css. */

/* ---------- Responsive ---------- */

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

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