/*
Theme Name: Prime Standard News
Theme URI: https://primestandardnews.com
Author: Prime Standard News
Description: A fast, clean affiliate news theme for men's health content. Built for push traffic conversion with strategic affiliate placement zones, sidebar widgets, and editorial credibility.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: Private
Text Domain: prime-standard-news
Tags: news, affiliate, health, magazine, custom-menu, custom-logo, featured-images, sidebar, two-columns
*/

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
    --color-nav:         #6e6e6e;
    --color-nav-sub:     #7a7a7a;
    --color-gold:        #c8a45a;
    --color-gold-light:  #fdf8f0;
    --color-gold-border: #e8d8b0;
    --color-green:       #1a5a2a;
    --color-green-light: #e8f5eb;
    --color-banner-from: #1e3a2f;
    --color-banner-to:   #2d5a3d;
    --color-body-bg:     #f5f2ed;
    --color-white:       #ffffff;
    --color-text:        #2a2a2a;
    --color-text-light:  #555555;
    --color-text-muted:  #888888;
    --color-border:      #e0dbd4;
    --color-border-light:#f0ece6;
    --font-display:      'Playfair Display', Georgia, serif;
    --font-body:         'Source Serif 4', Georgia, serif;
    --font-ui:           'DM Sans', system-ui, sans-serif;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 17px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-ui);
    background-color: var(--color-body-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

/* ============================================================
   SITE WRAPPER
   ============================================================ */
.site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-content-wrap {
    flex: 1;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
#masthead {
    background: var(--color-nav);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.nav-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.site-branding {
    display: flex;
    flex-direction: column;
}

.site-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.site-title a {
    color: inherit;
}

.site-title .highlight {
    color: var(--color-gold);
}

.site-tagline {
    font-family: var(--font-ui);
    font-size: 11px;
    color: #ddd;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 3px;
}

.nav-date {
    font-family: var(--font-ui);
    font-size: 13px;
    color: #ddd;
    text-align: right;
}

/* Primary navigation */
.nav-categories {
    background: var(--color-nav-sub);
    border-top: 1px solid rgba(255,255,255,0.08);
}

.nav-categories .nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

#primary-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

#primary-menu li a {
    display: block;
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 500;
    color: #eee;
    padding: 10px 14px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: color 0.2s, background 0.2s;
    border-bottom: 2px solid transparent;
}

#primary-menu li a:hover,
#primary-menu li.current-menu-item a,
#primary-menu li.current-cat a {
    color: var(--color-gold);
    border-bottom-color: var(--color-gold);
}

/* ============================================================
   HEADER AFFILIATE BANNER (Zone 1)
   ============================================================ */
.header-affiliate-banner {
    background: linear-gradient(135deg, var(--color-banner-from) 0%, var(--color-banner-to) 100%);
    border-bottom: 3px solid var(--color-gold);
    padding: 14px 24px;
}

.header-affiliate-banner .banner-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.banner-label {
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 600;
    color: #7db88a;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.banner-text {
    font-family: var(--font-ui);
    font-size: 15px;
    color: #e8f5eb;
    font-weight: 500;
    line-height: 1.4;
}

.banner-text strong {
    color: #fff;
}

.banner-cta {
    display: inline-block;
    background: var(--color-gold);
    color: #1a1a1a;
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 3px;
    white-space: nowrap;
    transition: opacity 0.2s;
    letter-spacing: 0.03em;
}

.banner-cta:hover {
    opacity: 0.88;
    color: #1a1a1a;
}

/* ============================================================
   LAYOUT: CONTENT + SIDEBAR
   ============================================================ */
.content-sidebar-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 0;
    align-items: start;
}

#primary {
    background: var(--color-white);
    padding: 28px 32px;
    border-right: 1px solid var(--color-border);
    min-width: 0;
}

#secondary {
    padding: 20px 18px;
    background: var(--color-body-bg);
    min-width: 0;
}

/* ============================================================
   ARTICLE STYLES
   ============================================================ */

/* Article meta bar */
.entry-meta-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    font-family: var(--font-ui);
}

.entry-category {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-gold);
}

.entry-meta-divider {
    color: #ccc;
    font-size: 12px;
}

.entry-byline {
    font-size: 13px;
    color: var(--color-text-muted);
}

.entry-read-time {
    font-size: 13px;
    color: var(--color-text-muted);
}

/* Article title */
.entry-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    color: #0f0f0f;
    margin-bottom: 14px;
    letter-spacing: -0.3px;
}

.entry-title a {
    color: inherit;
}

.entry-title a:hover {
    color: var(--color-green);
}

/* Article deck / standfirst */
.entry-deck {
    font-family: var(--font-body);
    font-size: 17px;
    color: var(--color-text-light);
    line-height: 1.7;
    margin-bottom: 18px;
    border-left: 3px solid var(--color-gold);
    padding-left: 16px;
}

/* Featured image */
.post-thumbnail {
    margin-bottom: 20px;
    border-radius: 4px;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Article body */
.entry-content {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.85;
    color: var(--color-text);
}

.entry-content p {
    margin-bottom: 18px;
}

.entry-content h2 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: #0f0f0f;
    margin: 28px 0 14px;
    line-height: 1.3;
}

.entry-content h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: #0f0f0f;
    margin: 24px 0 12px;
    line-height: 1.3;
}

.entry-content ul,
.entry-content ol {
    margin: 0 0 18px 24px;
    list-style: disc;
}

.entry-content ol {
    list-style: decimal;
}

.entry-content li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.entry-content a {
    color: var(--color-green);
    text-decoration: underline;
    text-decoration-color: rgba(200, 164, 90, 0.4);
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.entry-content a:hover {
    color: var(--color-gold);
}

.entry-content blockquote {
    border-left: 4px solid var(--color-gold);
    padding: 12px 20px;
    margin: 20px 0;
    background: var(--color-gold-light);
    border-radius: 0 4px 4px 0;
    font-style: italic;
    color: var(--color-text-light);
}

.entry-content strong {
    font-weight: 600;
    color: #1a1a1a;
}

/* ============================================================
   NATIVE AFFILIATE CTA (Zone 4 — Mid Article)
   ============================================================ */
.native-affiliate-cta {
    background: var(--color-gold-light);
    border: 1px solid var(--color-gold-border);
    border-left: 4px solid var(--color-gold);
    border-radius: 0 4px 4px 0;
    padding: 18px 20px;
    margin: 24px 0;
    font-family: var(--font-ui);
}

.native-cta-label {
    font-size: 11px;
    font-weight: 700;
    color: #8a7040;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.native-cta-headline {
    font-family: var(--font-display);
    font-size: 18px;
    color: #1a1a1a;
    margin-bottom: 8px;
    line-height: 1.35;
    font-weight: 700;
}

.native-cta-body {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 14px;
}

.native-cta-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-green);
    text-decoration: none;
    transition: color 0.2s;
}

.native-cta-link::after {
    content: '→';
    color: var(--color-gold);
    transition: transform 0.2s;
}

.native-cta-link:hover {
    color: #0f3d1a;
}

.native-cta-link:hover::after {
    transform: translateX(3px);
}

/* ============================================================
   RELATED ARTICLES (Zone 9)
   ============================================================ */
.related-articles {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 2px solid var(--color-border);
}

.related-articles-title {
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 700;
    color: var(--color-text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.related-articles-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.related-article-item {
    display: flex;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border-light);
    text-decoration: none;
    transition: opacity 0.2s;
}

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

.related-article-item:hover {
    opacity: 0.8;
}

.related-article-thumb {
    width: 70px;
    height: 54px;
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--color-border);
}

.related-article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-article-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.related-article-cat {
    font-family: var(--font-ui);
    font-size: 11px;
    color: var(--color-gold);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.related-article-title {
    font-family: var(--font-ui);
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    font-weight: 500;
}

/* ============================================================
   SIDEBAR WIDGETS
   ============================================================ */
.widget {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 16px;
}

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

/* Affiliate offer widget */
.widget-affiliate .widget-offer-image {
    width: 100%;
    height: 90px;
    object-fit: cover;
    display: block;
}

.widget-affiliate .widget-offer-image-placeholder {
    width: 100%;
    height: 90px;
    background: linear-gradient(135deg, #1e3a2f, #2d5a3d);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    font-family: var(--font-ui);
}

.widget-body {
    padding: 14px 16px;
}

.widget-sponsored-label {
    font-family: var(--font-ui);
    font-size: 10px;
    font-weight: 700;
    color: #8a6520;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.widget-headline {
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.35;
    margin-bottom: 8px;
}

.widget-subtext {
    font-family: var(--font-ui);
    font-size: 12px;
    color: #777;
    margin-bottom: 12px;
    line-height: 1.5;
}

.widget-cta-btn {
    display: block;
    text-align: center;
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 700;
    padding: 10px;
    border-radius: 3px;
    cursor: pointer;
    transition: opacity 0.2s;
    letter-spacing: 0.03em;
}

.widget-cta-btn:hover {
    opacity: 0.88;
}

.widget-cta-btn.btn-gold {
    background: var(--color-gold);
    color: #1a1a1a;
}

.widget-cta-btn.btn-green {
    background: var(--color-green);
    color: #fff;
}

.widget-cta-btn.btn-dark {
    background: #6e6e6e;
    color: #fff;
}

/* Popular posts widget */
.widget-popular-posts .widget-body {
    padding: 14px 16px;
}

.widget-title {
    font-family: var(--font-ui);
    font-size: 10px;
    font-weight: 700;
    color: var(--color-text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.popular-post-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border-light);
    text-decoration: none;
    transition: opacity 0.2s;
}

.popular-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.popular-post-item:hover {
    opacity: 0.75;
}

.popular-post-num {
    font-family: var(--font-ui);
    font-size: 18px;
    font-weight: 800;
    color: var(--color-border);
    line-height: 1;
    flex-shrink: 0;
    width: 20px;
    margin-top: 1px;
}

.popular-post-title {
    font-family: var(--font-ui);
    font-size: 13px;
    line-height: 1.4;
    color: #444;
    font-weight: 500;
}

/* ============================================================
   FOOTER
   ============================================================ */
#colophon {
    background: #2a2a2a;
    color: #aaa;
    padding: 32px 24px;
    margin-top: 0;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
}

.footer-brand .footer-logo {
    font-family: var(--font-display);
    font-size: 20px;
    color: #fff;
    margin-bottom: 8px;
}

.footer-brand .footer-logo span {
    color: var(--color-gold);
}

.footer-brand p {
    font-family: var(--font-ui);
    font-size: 13px;
    line-height: 1.6;
    color: #888;
}

.footer-nav-title {
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 700;
    color: #ccc;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.footer-nav-list li {
    margin-bottom: 6px;
}

.footer-nav-list li a {
    font-family: var(--font-ui);
    font-size: 13px;
    color: #888;
    transition: color 0.2s;
}

.footer-nav-list li a:hover {
    color: var(--color-gold);
}

.footer-bottom {
    max-width: 1100px;
    margin: 24px auto 0;
    padding-top: 20px;
    border-top: 1px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-bottom p {
    font-family: var(--font-ui);
    font-size: 12px;
    color: #666;
}

.footer-disclaimer {
    font-family: var(--font-ui);
    font-size: 11px;
    color: #555;
    line-height: 1.5;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #3a3a3a;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================
   ARCHIVE / HOMEPAGE LOOP
   ============================================================ */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.post-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.post-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.post-card-thumb {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.post-card-body {
    padding: 16px 18px;
}

.post-card-cat {
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 700;
    color: var(--color-gold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.post-card-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: #0f0f0f;
    margin-bottom: 8px;
}

.post-card-title a {
    color: inherit;
    transition: color 0.2s;
}

.post-card-title a:hover {
    color: var(--color-green);
}

.post-card-excerpt {
    font-family: var(--font-ui);
    font-size: 14px;
    color: var(--color-text-light);
    line-height: 1.6;
    margin-bottom: 12px;
}

.post-card-meta {
    font-family: var(--font-ui);
    font-size: 12px;
    color: var(--color-text-muted);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
    .content-sidebar-wrap {
        grid-template-columns: 1fr;
    }

    #secondary {
        border-top: 1px solid var(--color-border);
        padding: 20px 16px;
    }

    .nav-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 10px 16px;
    }

    .nav-date {
        display: none;
    }

    #primary {
        padding: 20px 18px;
    }

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

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .header-affiliate-banner .banner-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 16px;
    }

    .entry-title {
        font-size: 26px;
    }

    .site-title {
        font-size: 20px;
    }

    #primary-menu li a {
        font-size: 11px;
        padding: 8px 10px;
    }
}

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

.aligncenter {
    display: block;
    margin: 0 auto;
}

.alignleft {
    float: left;
    margin: 0 20px 16px 0;
}

.alignright {
    float: right;
    margin: 0 0 16px 20px;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-family: var(--font-ui);
    font-size: 13px;
    color: var(--color-text-muted);
    text-align: center;
    margin-top: 6px;
}
