/*
Theme Name: PressHub News Theme
Theme URI:  https://presshub.ua
Description: Тема для сайтів-отримувачів прес-релізів. Вкажіть RSS-стрічку в Налаштування → PressHub і новини з'являться автоматично.
Version:     1.0.0
Author:      PressHub
License:     GPL2
Text Domain: presshub-news
*/

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --text:      #1c1c1a;
    --muted:     #6b6a65;
    --light:     #9ca3af;
    --border:    #e5e7eb;
    --bg:        #f9f8f5;
    --bg2:       #ffffff;
    --accent:    #185FA5;
    --accent-dk: #0C447C;
    --green:     #0F6E56;
    --green-lt:  #e1f5ee;
    --max:       1140px;
    --r:         10px;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ── Header ── */
.site-header {
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.header-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 2rem;
}
.site-branding { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.site-logo-mark {
    width: 34px; height: 34px;
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    display: grid; place-items: center;
    font-size: 14px; font-weight: 700;
}
.site-title-link {
    font-size: 17px; font-weight: 700;
    color: var(--text); text-decoration: none;
    letter-spacing: -.3px;
}
.site-title-link:hover { text-decoration: none; color: var(--accent); }
.site-description { font-size: 12px; color: var(--muted); }

/* ── Navigation ── */
.main-navigation { flex: 1; }
.main-navigation ul {
    display: flex; gap: .25rem; list-style: none; flex-wrap: wrap;
}
.main-navigation a {
    display: block; padding: 6px 13px;
    border-radius: 7px; color: var(--muted);
    font-size: 14px; text-decoration: none;
    transition: background .12s, color .12s;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
    background: var(--bg); color: var(--text); text-decoration: none;
}
.nav-partner > a {
    background: var(--green-lt) !important;
    color: var(--green) !important;
    font-weight: 600;
}

/* ── Layout ── */
.site-content {
    max-width: var(--max);
    margin: 2rem auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}
.site-content.full { grid-template-columns: 1fr; }

/* ── Page header ── */
.page-heading {
    font-size: 24px; font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: .75rem;
    border-bottom: 2px solid var(--border);
    display: flex; align-items: baseline; gap: .75rem;
}
.page-heading-count {
    font-size: 14px; font-weight: 400; color: var(--muted);
}

/* ── Press release card ── */
.ph-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: border-color .15s, box-shadow .15s;
}
.ph-card:hover {
    border-color: #b5cce8;
    box-shadow: 0 2px 8px rgba(24,95,165,.08);
}
.ph-card-meta {
    display: flex; align-items: center; gap: .6rem;
    margin-bottom: .6rem; flex-wrap: wrap;
}
.ph-badge {
    display: inline-block; padding: 2px 10px;
    border-radius: 20px; font-size: 11px; font-weight: 600;
    background: var(--green-lt); color: var(--green);
}
.ph-date { font-size: 12px; color: var(--light); }
.ph-card-title {
    font-size: 18px; font-weight: 600;
    line-height: 1.35; margin-bottom: .5rem;
}
.ph-card-title a { color: var(--text); }
.ph-card-title a:hover { color: var(--accent); text-decoration: none; }
.ph-card-excerpt {
    font-size: 14px; color: var(--muted);
    line-height: 1.6; margin-bottom: .75rem;
}
.ph-read-more {
    font-size: 13px; font-weight: 600;
    color: var(--accent);
}
.ph-read-more:hover { text-decoration: underline; }

/* ── No posts ── */
.ph-empty {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--r); padding: 3rem;
    text-align: center; color: var(--muted);
}
.ph-empty-icon { font-size: 40px; margin-bottom: 1rem; }
.ph-empty h2 { font-size: 18px; color: var(--text); margin-bottom: .5rem; }

/* ── Single post ── */
.entry-wrap {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--r); padding: 2rem;
}
.entry-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--green-lt); color: var(--green);
    border: 1px solid #9fe1cb;
    padding: 4px 12px; border-radius: 20px;
    font-size: 12px; font-weight: 600;
    margin-bottom: 1rem;
}
.entry-title {
    font-size: 26px; font-weight: 700;
    line-height: 1.3; margin-bottom: .75rem;
}
.entry-meta {
    display: flex; align-items: center; gap: 1rem;
    font-size: 13px; color: var(--muted);
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem; flex-wrap: wrap;
}
.entry-content { font-size: 16px; line-height: 1.8; }
.entry-content p  { margin-bottom: 1rem; }
.entry-content h2 { font-size: 20px; font-weight: 600; margin: 1.5rem 0 .75rem; }
.entry-content h3 { font-size: 17px; font-weight: 600; margin: 1.25rem 0 .5rem; }
.entry-content ul, .entry-content ol { margin: .75rem 0 1rem 1.5rem; }
.entry-content li { margin-bottom: .3rem; }
.entry-content blockquote {
    border-left: 3px solid var(--accent);
    padding: .75rem 1.25rem; margin: 1rem 0;
    background: #f0f6fc;
    border-radius: 0 var(--r) var(--r) 0;
    font-style: italic; color: var(--muted);
}
.entry-source {
    margin-top: 1.5rem; padding: .75rem 1rem;
    background: var(--bg); border-radius: var(--r);
    font-size: 13px; color: var(--muted);
}
.entry-back { margin-top: 1.5rem; }
.entry-back a {
    font-size: 14px; color: var(--accent); font-weight: 500;
}

/* ── Sidebar ── */
.sidebar-widget {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--r); padding: 1.25rem;
    margin-bottom: 1rem;
}
.sidebar-title {
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .07em;
    color: var(--muted); margin-bottom: .875rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--border);
}
.sidebar-widget ul { list-style: none; }
.sidebar-widget li {
    padding: 6px 0; border-bottom: 1px solid var(--border);
    font-size: 14px; line-height: 1.4;
}
.sidebar-widget li:last-child { border-bottom: none; }
.sidebar-widget li a { color: var(--text); }
.sidebar-widget li a:hover { color: var(--accent); text-decoration: none; }
.sidebar-widget .item-date { font-size: 11px; color: var(--light); display: block; margin-top: 2px; }
.sidebar-all-link {
    display: block; margin-top: .75rem;
    font-size: 13px; font-weight: 500;
    color: var(--accent);
}

/* ── RSS status bar ── */
.rss-status {
    background: #f0f6fc; border: 1px solid #c5d9ef;
    border-radius: 8px; padding: .625rem 1rem;
    font-size: 12px; color: var(--accent);
    margin-bottom: 1.25rem;
    display: flex; align-items: center; gap: .5rem;
}
.rss-status.error { background: #fef2f2; border-color: #fca5a5; color: #dc2626; }

/* ── Footer ── */
.site-footer {
    background: var(--bg2); border-top: 1px solid var(--border);
    padding: 1.5rem; margin-top: 3rem;
    text-align: center; font-size: 13px; color: var(--muted);
}

/* ── Pagination ── */
.pagination { display: flex; gap: .5rem; margin-top: 1.5rem; flex-wrap: wrap; }
.pagination a, .pagination span {
    padding: 6px 13px; border-radius: 7px;
    border: 1px solid var(--border);
    font-size: 13px; background: var(--bg2); color: var(--text);
    text-decoration: none;
}
.pagination a:hover { background: var(--bg); }
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Customizer notice ── */
.setup-notice {
    background: #fffbeb; border: 1px solid #fcd34d;
    border-radius: var(--r); padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}
.setup-notice h3 { font-size: 15px; font-weight: 600; margin-bottom: .4rem; }
.setup-notice p  { font-size: 13px; color: var(--muted); }
.setup-notice a  { font-weight: 600; }

@media (max-width: 768px) {
    .site-content { grid-template-columns: 1fr; }
    .header-inner { gap: 1rem; }
    .entry-title  { font-size: 20px; }
}
