/* ==========================================================================
   Amnesty Freedom — Publications
   Shared stylesheet for the listing page and every article page.
   Colors/typography are copied from the main site (page-amnesty-home.php)
   so this section matches the rest of amnestyfreedom.org exactly.
   ========================================================================== */

:root {
    --black:        #0d1117;
    --white:        #ffffff;
    --accent:       #4a7fa5;
    --accent-light: #dde8f0;
    --accent-dark:  #2c5f80;
    --gray:         #f2f4f6;
    --text:         #1a1f24;
    --muted:        #5a6472;
    --border:       #d8dfe6;
    --font:         'Source Sans 3', Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.pub {
    font-family: var(--font);
    color: var(--text);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}
.pub a { color: inherit; }
.pub img { max-width: 100%; display: block; }

/* ---------- NAV (matches the homepage's .af-nav) ---------- */
.pub-nav {
    background: var(--black);
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}
.pub-nav-brand {
    color: var(--white);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
}
.pub-nav-links { display: flex; gap: 32px; list-style: none; align-items: center; margin: 0; padding: 0; }
.pub-nav-links a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: color 0.2s;
}
.pub-nav-links a:hover,
.pub-nav-links a.is-active { color: var(--accent-light); }
.pub-nav-links a.is-active { color: #7fb8d8; font-weight: 600; }
.pub-nav-donate {
    background: var(--accent);
    color: var(--white) !important;
    padding: 8px 20px;
    font-weight: 700 !important;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 12px !important;
    transition: background 0.2s !important;
}
.pub-nav-donate:hover { background: var(--accent-dark); }
.pub-nav-member {
    border: 1px solid rgba(255,255,255,0.28);
    padding: 7px 15px;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.72) !important;
    transition: border-color 0.2s, color 0.2s;
}
.pub-nav-member:hover { border-color: rgba(255,255,255,0.6); color: var(--white) !important; }
@media (max-width: 900px) {
    .pub-nav-links { display: none; }
}

/* ---------- SHARED LAYOUT ---------- */
.pub-wrap { max-width: 1160px; margin: 0 auto; padding: 0 40px; }
.pub-section { padding: 64px 40px; }
.pub-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}
.pub-rule { border: none; border-top: 1px solid var(--border); margin: 0; }

/* ---------- MOTIF BANNERS (see inc/motifs.php) ---------- */
.pub-motif { width: 100%; line-height: 0; background: var(--black); }
.pub-motif svg { width: 100%; height: auto; display: block; }
.pub-motif--index { max-height: 260px; overflow: hidden; }
.pub-motif--card { max-height: 130px; overflow: hidden; }
.pub-motif--article { max-height: 300px; overflow: hidden; }

/* ---------- LISTING HERO ---------- */
.pub-hero {
    background: linear-gradient(135deg, #1c2d3d 0%, #2c4a62 50%, #1c2d3d 100%);
    padding: 76px 40px 64px;
}
.pub-hero-inner { max-width: 760px; }
.pub-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 20px;
}
.pub-hero p {
    font-size: 1.1rem;
    font-weight: 300;
    color: rgba(255,255,255,0.75);
    line-height: 1.65;
    margin: 0;
}

/* ---------- ARTICLE GRID / CARDS ---------- */
.pub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
    margin-top: 8px;
}
.pub-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: var(--white);
    border: 1px solid var(--border);
    transition: box-shadow 0.2s, transform 0.2s;
}
.pub-card:hover { box-shadow: 0 10px 30px rgba(13,17,23,0.12); transform: translateY(-2px); }
.pub-card-body { padding: 26px 26px 30px; }
.pub-card-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-dark);
    background: var(--accent-light);
    padding: 3px 8px;
    margin-bottom: 12px;
}
.pub-card h2 {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin: 0 0 10px;
    color: var(--text);
}
.pub-card p {
    font-size: 0.94rem;
    font-weight: 300;
    line-height: 1.65;
    color: var(--muted);
    margin: 0 0 16px;
}
.pub-card-meta {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.02em;
    border-top: 1px solid var(--border);
    padding-top: 14px;
    margin-top: auto;
    display: flex;
    justify-content: space-between;
}
.pub-empty {
    padding: 60px 0;
    text-align: center;
    color: var(--muted);
    font-size: 1.05rem;
}

/* ---------- ARTICLE PAGE ---------- */
.pub-article-head { max-width: 760px; margin: 0 auto; padding: 56px 40px 8px; text-align: left; }
.pub-article-head .pub-label { color: var(--accent); }
.pub-article-head h1 {
    font-size: clamp(2rem, 4.4vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text);
    margin: 0 0 18px;
}
.pub-dek {
    font-size: 1.2rem;
    font-weight: 300;
    color: var(--muted);
    line-height: 1.6;
    margin: 0 0 22px;
}
.pub-article-meta {
    font-size: 13px;
    color: var(--muted);
    letter-spacing: 0.03em;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
}
.pub-article-meta span + span::before { content: '\00b7'; margin: 0 8px; }

.pub-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 40px 24px;
    font-size: 1.08rem;
    line-height: 1.8;
    color: #2a323a;
}
.pub-content h2 {
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
    margin: 48px 0 18px;
}
.pub-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin: 34px 0 12px;
}
.pub-content p { margin: 0 0 22px; }
.pub-content ul, .pub-content ol { margin: 0 0 22px; padding-left: 1.3em; }
.pub-content li { margin-bottom: 10px; }
.pub-content strong { color: var(--text); font-weight: 700; }
.pub-content a { color: var(--accent-dark); text-decoration: underline; text-decoration-color: var(--border); }
.pub-content a:hover { text-decoration-color: var(--accent-dark); }

.pub-pull {
    font-size: 1.35rem;
    font-weight: 300;
    line-height: 1.55;
    color: var(--text);
    border-left: 4px solid var(--accent);
    padding: 4px 0 4px 26px;
    margin: 40px 0;
    letter-spacing: -0.01em;
}
.pub-pull cite { display: block; font-size: 0.8rem; font-weight: 600; color: var(--muted); margin-top: 10px; font-style: normal; text-transform: uppercase; letter-spacing: 0.06em; }

.pub-divider { display: flex; align-items: center; gap: 16px; margin: 46px 0; color: var(--accent); }
.pub-divider::before, .pub-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.pub-divider svg { width: 22px; height: 22px; flex-shrink: 0; }

.pub-callout {
    background: var(--gray);
    border-left: 4px solid var(--accent);
    padding: 20px 24px;
    margin: 32px 0;
    font-size: 0.98rem;
    color: var(--muted);
    line-height: 1.7;
}
.pub-callout strong { color: var(--text); }

.pub-sources {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 40px 64px;
    border-top: 1px solid var(--border);
}
.pub-sources h3 {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 24px 0 14px;
}
.pub-sources ol {
    font-size: 0.86rem;
    color: var(--muted);
    line-height: 1.8;
    padding-left: 1.2em;
    margin: 0;
}
.pub-sources li { margin-bottom: 6px; }

.pub-article-foot {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 40px 72px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.pub-back {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-dark);
    text-decoration: none;
}
.pub-back:hover { color: var(--accent); }
.pub-cta-btn {
    display: inline-block;
    background: var(--accent);
    color: var(--white);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 12px 26px;
    transition: background 0.2s;
}
.pub-cta-btn:hover { background: var(--accent-dark); }

/* ---------- FOOTER (matches the homepage's .af-footer) ---------- */
.pub-footer {
    background: var(--black);
    padding: 24px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.pub-footer-copy, .pub-footer-tags { font-size: 12px; color: rgba(255,255,255,0.4); letter-spacing: 0.05em; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 600px) {
    .pub-nav, .pub-hero, .pub-section, .pub-footer { padding-left: 20px; padding-right: 20px; }
    .pub-article-head, .pub-content, .pub-sources, .pub-article-foot { padding-left: 20px; padding-right: 20px; }
    .pub-footer { flex-direction: column; text-align: center; }
}
