/* ==========================================================================
   AskTraders Single News Article — FXStreet-inspired editorial layout
   Scoped under .at-single-news to avoid conflicts with Sage.
   File: article-style.css (renamed to bypass caching)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,400;0,700;0,900;1,400&family=Inter:wght@400;500;600;700&display=swap');

.at-single-news {
    --sn-font-serif: 'Merriweather', Georgia, 'Times New Roman', serif;
    --sn-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --sn-color-heading: #191A1E;
    --sn-color-text: #3E3E3E;
    --sn-color-meta: #8E8E8E;
    --sn-color-accent: #1B5AAF;
    --sn-color-accent-hover: #0B1E3D;
    --sn-color-border: #E2E2E2;
    --sn-color-bg: #FFFFFF;
    --sn-color-bg-alt: #F7F7F7;
    --sn-color-category: #1B5AAF;
    --sn-content-width: 768px;
    --sn-wide-width: 1000px;
    --sn-outer-width: 1200px;

    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    font-family: var(--sn-font-serif) !important;
    color: var(--sn-color-text);
    line-height: 1.9;
    font-size: 17px;
    background: var(--sn-color-bg);
    box-sizing: border-box;
}

.at-single-news > article {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    display: block !important;
}

.at-single-news *,
.at-single-news *::before,
.at-single-news *::after {
    box-sizing: border-box;
}

/* --- Breadcrumb (simple: Home / News) --- */
.at-single-news .at-sn-breadcrumb {
    max-width: var(--sn-outer-width);
    margin: 0 auto;
    padding: 20px 24px 0;
    font-family: var(--sn-font-sans) !important;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--sn-color-meta);
}

.at-single-news .at-sn-breadcrumb a {
    color: var(--sn-color-meta);
    text-decoration: none;
}

.at-single-news .at-sn-breadcrumb a:hover {
    color: var(--sn-color-heading);
}

.at-single-news .at-sn-breadcrumb .separator {
    margin: 0 6px;
}

/* --- Full-height two-column layout --- */
.at-single-news .at-sn-layout {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 24px !important;
}

@media (min-width: 1024px) {
    .at-single-news .at-sn-layout {
        display: flex !important;
        gap: 40px !important;
    }

    .at-single-news .at-sn-article-col {
        flex: 1 1 0% !important;
        min-width: 0 !important;
    }

    .at-single-news .at-sn-sidebar {
        flex: 0 0 300px !important;
        width: 300px !important;
    }
}

.at-single-news .at-sn-article-col {
    min-width: 0;
}

/* --- Article header zone --- */
.at-single-news .at-sn-header {
    padding: 0;
}

/* --- Topline: Category | Date --- */
.at-single-news .at-sn-topline {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 28px 0 12px;
    font-family: var(--sn-font-sans) !important;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.at-single-news .at-sn-category {
    display: inline-block;
    color: var(--sn-color-category);
}

.at-single-news .at-sn-category a {
    color: inherit;
    text-decoration: none;
}

.at-single-news .at-sn-category a:hover {
    color: var(--sn-color-accent-hover);
}

.at-single-news .at-sn-topline-link {
    color: var(--sn-color-meta);
    text-decoration: none;
}

.at-single-news .at-sn-topline-link:hover {
    color: var(--sn-color-heading);
}

.at-single-news .at-sn-topline-sep {
    margin: 0 6px;
    color: var(--sn-color-border);
    font-weight: 400;
}

.at-single-news .at-sn-topline-pipe {
    margin: 0 10px;
    color: var(--sn-color-border);
    font-weight: 400;
}

.at-single-news .at-sn-date {
    color: var(--sn-color-meta);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

.at-single-news .at-sn-title {
    font-family: var(--sn-font-serif) !important;
    font-size: clamp(28px, 4vw, 40px) !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    color: var(--sn-color-heading) !important;
    margin: 0 0 20px !important;
    padding: 0 !important;
    letter-spacing: -0.3px;
    text-transform: none !important;
}

/* --- Intro / excerpt (between title and image) --- */
.at-single-news .at-sn-intro {
    font-family: var(--sn-font-sans) !important;
    font-size: 18px !important;
    line-height: 1.65 !important;
    color: var(--sn-color-text);
    margin: 0 0 28px !important;
    font-weight: 400;
}

.at-single-news .at-sn-intro p {
    font-family: var(--sn-font-sans) !important;
    font-size: 18px !important;
    line-height: 1.65 !important;
    margin: 0 0 1em !important;
}

/* --- Featured image --- */
.at-single-news .at-sn-featured-image {
    padding: 0;
    margin: 0 0 0;
}

.at-single-news .at-sn-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
}

.at-single-news .at-sn-featured-image figcaption {
    font-family: var(--sn-font-sans) !important;
    font-size: 12px;
    color: var(--sn-color-meta);
    margin-top: 8px;
}

/* --- Meta bar (author + share — below featured image) --- */
.at-single-news .at-sn-meta {
    margin: 0 0 10px;
    padding: 20px 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-family: var(--sn-font-sans) !important;
    font-size: 13px;
    color: var(--sn-color-meta);
    border-bottom: 1px solid var(--sn-color-border);
}

.at-single-news .at-sn-meta-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.at-single-news .at-sn-meta-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.at-single-news .at-sn-meta-author-name {
    font-weight: 600;
    color: var(--sn-color-heading);
}

.at-single-news .at-sn-meta-author-name a {
    color: inherit;
    text-decoration: none;
}

.at-single-news .at-sn-meta-author-name a:hover {
    color: var(--sn-color-accent);
}

.at-single-news .at-sn-meta-sep {
    color: var(--sn-color-border);
}

.at-single-news .at-sn-meta-date {
    font-size: 13px;
    color: var(--sn-color-meta);
}

/* --- Social sharing --- */
.at-single-news .at-sn-share {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.at-single-news .at-sn-share a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--sn-color-bg-alt);
    color: var(--sn-color-meta);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.at-single-news .at-sn-share a:hover {
    background: var(--sn-color-accent);
    color: #fff;
}

.at-single-news .at-sn-share svg {
    width: 16px;
    height: 16px;
}

.at-single-news .at-sn-content {
    max-width: 640px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 !important;
    padding-top: 0 !important;
    font-family: var(--sn-font-sans) !important;
    font-size: 17px !important;
    line-height: 1.8 !important;
    color: var(--sn-color-text);
}

.at-single-news .at-sn-content > *:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.at-single-news .at-sn-content p {
    margin: 0 0 1.5em;
}

.at-single-news .at-sn-content h2 {
    font-family: var(--sn-font-sans) !important;
    font-size: clamp(22px, 3vw, 28px) !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    color: var(--sn-color-heading);
    margin: 2em 0 0.75em !important;
}

.at-single-news .at-sn-content h3 {
    font-family: var(--sn-font-sans) !important;
    font-size: clamp(18px, 2.5vw, 22px) !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    color: var(--sn-color-heading);
    margin: 1.5em 0 0.5em !important;
}

.at-single-news .at-sn-content a {
    color: var(--sn-color-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.at-single-news .at-sn-content a:hover {
    color: var(--sn-color-accent-hover);
}

.at-single-news .at-sn-content ul,
.at-single-news .at-sn-content ol {
    margin: 0 0 1.5em 1.5em;
    padding: 0;
}

.at-single-news .at-sn-content li {
    margin-bottom: 0.5em;
}

.at-single-news .at-sn-content blockquote {
    border-left: 3px solid var(--sn-color-accent);
    margin: 2em 0;
    padding: 0.5em 0 0.5em 1.5em;
    font-style: italic;
    color: var(--sn-color-heading);
}

.at-single-news .at-sn-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.at-single-news .at-sn-content figure {
    margin: 2em 0;
}

/* Content images break out wider */
.at-single-news .at-sn-content .wp-block-image,
.at-single-news .at-sn-content figure.wp-block-image {
    max-width: var(--sn-wide-width);
    margin-left: calc((var(--sn-content-width) - var(--sn-wide-width)) / 2);
    width: var(--sn-wide-width);
}

@media (max-width: 1023px) {
    .at-single-news .at-sn-content .wp-block-image,
    .at-single-news .at-sn-content figure.wp-block-image {
        max-width: 100%;
        margin-left: 0;
        width: 100%;
    }
}

/* --- Sidebar (desktop only) --- */
.at-single-news .at-sn-sidebar {
    display: none !important;
    font-family: var(--sn-font-sans) !important;
    font-size: 14px;
    line-height: 1.6;
}

@media (min-width: 1024px) {
    .at-single-news .at-sn-sidebar {
        display: block !important;
    }
}

.at-single-news .at-sn-sidebar-fallback {
    /* Only visible when no [data-sidebar] blocks have been moved in */
}

.at-single-news .at-sn-sidebar.has-sidebar-blocks .at-sn-sidebar-fallback {
    display: none;
}

/* Hide [data-sidebar] blocks inline on desktop when they've been moved */
@media (min-width: 1024px) {
    .at-single-news .at-sn-content [data-sidebar].at-sn-moved {
        display: none !important;
    }
}

/* Sidebar hidden by default, shown only at 1024px+ via the rule above */

/* --- Key Points block --- */
.at-single-news .key-points {
    background: transparent !important;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    margin: 0 0 1.5em;
}

.at-single-news .key-points h3 {
    font-family: var(--sn-font-serif) !important;
    font-size: 1.15rem !important;
    font-weight: 600 !important;
    color: #1a1a1a;
    margin: 0 0 1.1rem !important;
    padding-bottom: 0.7rem;
    border-bottom: 2px solid #22a652;
    display: inline-block;
}

.at-single-news .key-points ul {
    list-style: none !important;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0 !important;
    padding: 0 !important;
}

.at-single-news .key-points li {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    font-family: var(--sn-font-sans) !important;
    font-size: 0.93rem;
    color: #374151;
    line-height: 1.5;
    margin: 0 !important;
}

.at-single-news .key-points li svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 0.15em;
}

/* --- Author bio card --- */
.at-single-news .at-sn-author-card {
    margin: 48px 0 32px;
    padding: 28px;
    background: var(--sn-color-bg-alt);
    border-radius: 8px;
    border: 1px solid var(--sn-color-border);
    display: flex;
    gap: 20px;
}

.at-single-news .at-sn-author-card-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.at-single-news .at-sn-author-card-info {
    flex: 1;
    min-width: 0;
}

.at-single-news .at-sn-author-card-name {
    font-family: var(--sn-font-sans) !important;
    font-size: 16px;
    font-weight: 700;
    color: var(--sn-color-heading);
    margin: 0 0 2px;
}

.at-single-news .at-sn-author-card-name a {
    color: inherit;
    text-decoration: none;
}

.at-single-news .at-sn-author-card-role {
    font-family: var(--sn-font-sans) !important;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--sn-color-meta);
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.at-single-news .at-sn-author-card-bio {
    font-family: var(--sn-font-sans) !important;
    font-size: 14px;
    line-height: 1.6;
    color: var(--sn-color-text);
    margin: 0;
}

/* --- Post navigation (prev/next) --- */
.at-single-news .at-sn-post-nav {
    margin: 32px 0;
    padding: 28px 0;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    border-top: 1px solid var(--sn-color-border);
    border-bottom: 1px solid var(--sn-color-border);
}

.at-single-news .at-sn-post-nav a {
    font-family: var(--sn-font-sans) !important;
    font-size: 14px;
    font-weight: 600;
    color: var(--sn-color-heading);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 45%;
}

.at-single-news .at-sn-post-nav a:hover {
    color: var(--sn-color-accent);
}

.at-single-news .at-sn-post-nav-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--sn-color-meta);
}

.at-single-news .at-sn-post-nav-next {
    text-align: right;
    margin-left: auto;
}

/* --- Responsive --- */
@media (max-width: 767px) {
    .at-single-news .at-sn-layout {
        padding-left: 16px;
        padding-right: 16px;
    }

    .at-single-news .at-sn-meta {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
    }

    .at-single-news .at-sn-meta-author {
        flex: 1;
        min-width: 0;
    }

    .at-single-news .at-sn-meta-author-name {
        line-height: 1.3 !important;
    }

    .at-single-news .at-sn-share {
        margin-left: auto;
        flex-shrink: 0;
    }

    .at-single-news .at-sn-author-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
    }

    .at-single-news .at-sn-post-nav {
        flex-direction: column;
    }

    .at-single-news .at-sn-post-nav a {
        max-width: 100%;
    }

    .at-single-news .at-sn-post-nav-next {
        text-align: left;
    }
}
