/*
Theme Name: dds_okpublik
Theme URI: https://okpublik.ru/
Author: Илья Корнеев
Author URI: https://okpublik.ru/
Description: Экспертный контентный проект о социальных платформах, рекламных инструментах и прикладном интернет-маркетинге. Тема сочетает визуальную строгость делового издания с акцентами SMM- и рекламной среды.
Version: 1.1
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: okp
*/

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

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

body {
    margin: 0;
    font-family: 'Literata', 'PT Serif', Georgia, serif;
    font-size: 17px;
    line-height: 1.7;
    color: #2C2C32;
    background-color: #F9F9F7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    color: #1F1F24;
    line-height: 1.25;
    margin: 1.4em 0 0.5em;
    font-weight: 600;
    letter-spacing: -0.01em;
}

h1 { font-size: 2.15rem; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

p {
    margin: 0 0 1.1em;
}

a {
    color: #E25A3A;
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover { color: #C54A2E; text-decoration: underline; }

img, svg { max-width: 100%; height: auto; }

code, pre, kbd {
    font-family: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.92em;
}
code {
    background: #F1F0EB;
    border: 1px solid #E2E0D8;
    border-radius: 4px;
    padding: 2px 6px;
}
pre {
    background: #F1F0EB;
    border: 1px solid #E2E0D8;
    border-radius: 6px;
    padding: 14px 18px;
    overflow-x: auto;
    line-height: 1.55;
}
pre code { background: none; border: none; padding: 0; }

blockquote {
    margin: 1.5em 0;
    padding: 16px 22px;
    background: #F1F0EB;
    border: 1px solid #E2E0D8;
    border-left: 3px solid #2A5C6E;
    border-radius: 4px;
    font-style: italic;
    color: #2C2C32;
}
blockquote p:last-child { margin-bottom: 0; }

hr {
    border: 0;
    border-top: 1px solid #E0DDD4;
    margin: 2em 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    border: 1px solid #E0DDD4;
}
th, td {
    padding: 10px 14px;
    border: 1px solid #E0DDD4;
    text-align: left;
}
th {
    background: #F1F0EB;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 600;
    color: #1F1F24;
}

ul, ol { padding-left: 1.4em; }
li { margin: 0.3em 0; }

/* ============== LAYOUT ============== */
.shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.site-main {
    padding: 36px 0 60px;
}

.layout {
    display: grid;
    grid-template-columns: 67% 27%;
    gap: 6%;
    align-items: start;
}
.layout--wide { grid-template-columns: 85%; justify-content: center; }
.layout--no-sidebar { grid-template-columns: 85%; margin: 0 auto; }

/* ============== HEADER ============== */
.page-header {
    background: #FFFFFF;
    border-bottom: 1px solid #E0DDD4;
    padding: 18px 0;
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
}
.brand:hover { text-decoration: none; }
.brand-logo {
    width: 48px;
    height: 48px;
    display: block;
    border-radius: 8px;
    flex-shrink: 0;
}
.brand-logo-fallback {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}
.brand-text { min-width: 0; }
.brand-title {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1F1F24;
    margin: 0;
    line-height: 1.2;
}
.brand-desc {
    font-size: 0.82rem;
    color: #6B6B72;
    margin: 3px 0 0;
    line-height: 1.35;
    max-width: 480px;
}

.primary-nav {
    margin-left: auto;
}
.primary-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.primary-nav a {
    display: block;
    padding: 8px 14px;
    color: #2C2C32;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 4px;
    transition: background 0.2s ease, color 0.2s ease;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a {
    background: rgba(42, 92, 110, 0.08);
    color: #2A5C6E;
    text-decoration: none;
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid #E0DDD4;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    margin-left: auto;
}

/* ============== BREADCRUMBS ============== */
.crumbs {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.85rem;
    color: #6B6B72;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}
.crumbs li { display: flex; align-items: center; margin: 0; }
.crumbs a { color: #2A5C6E; }
.crumbs a:hover { color: #E25A3A; }
.crumbs .sep {
    color: #B5B2A8;
    margin: 0 8px;
}
.crumbs .current { color: #6B6B72; }

/* ============== CARDS ============== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

.card {
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border: 1px solid #E0DDD4;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.card-thumb-wrap {
    width: 100%;
    overflow: hidden;
    background: #F1F0EB;
}
.card-thumb-wrap a {
    display: block;
}
.card-thumb-wrap img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.card:hover .card-thumb-wrap img {
    transform: scale(1.03);
}

.card-body {
    padding: 18px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.card-meta {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.78rem;
    color: #2A5C6E;
    margin-bottom: 10px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.card-meta .dot { color: #B5B2A8; }
.card-title {
    margin: 0 0 10px;
    font-size: 1.15rem;
    line-height: 1.3;
}
.card-title a { color: #1F1F24; }
.card-title a:hover { color: #E25A3A; text-decoration: none; }
.card-excerpt {
    color: #4A4A50;
    font-size: 0.95rem;
    line-height: 1.55;
    flex: 1;
}
.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}
.card-more {
    margin-top: 14px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.88rem;
    color: #2A5C6E;
    border-bottom: 1px solid rgba(42, 92, 110, 0.3);
    align-self: flex-start;
    padding-bottom: 2px;
}
.card-more:hover {
    color: #E25A3A;
    border-bottom-color: #E25A3A;
    text-decoration: none;
}

.card-badge {
    display: inline-block;
    margin-bottom: 10px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 3px;
    background: #E25A3A;
    color: #FFF;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.card-badge--case { background: #2A5C6E; }
.card-badge--theory { background: #6B6B72; }
.card-badge--news { background: #3E8E5A; }

/* ============== SINGLE / PAGE ============== */
.entry-header { margin-bottom: 22px; }
.entry-title {
    margin: 0 0 12px;
    font-size: 2.1rem;
}
.entry-meta {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.85rem;
    color: #2A5C6E;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.entry-meta .dot { color: #B5B2A8; }

.entry-thumb {
    margin: 0 0 24px;
    border-radius: 8px;
    overflow: hidden;
}
.entry-thumb img {
    width: 100%;
    height: auto;
    display: block;
}

.entry-content { font-size: 1.02rem; }
.entry-content img {
    border-radius: 6px;
    margin: 1em 0;
    display: block;
}

.entry-tags {
    margin: 30px 0 10px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.85rem;
}
.entry-tags a {
    display: inline-block;
    padding: 4px 10px;
    margin: 2px 4px 2px 0;
    background: #F1F0EB;
    border: 1px solid #E2E0D8;
    border-radius: 3px;
    color: #2A5C6E;
}
.entry-tags a:hover {
    background: #E25A3A;
    border-color: #E25A3A;
    color: #FFF;
    text-decoration: none;
}

/* ============== SIDEBAR / WIDGETS ============== */
.sidebar {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.95rem;
}
.widget {
    background: #FFFFFF;
    border: 1px solid #E0DDD4;
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 22px;
}
.widget-title {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #1F1F24;
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #E0DDD4;
}
.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.widget li {
    padding: 6px 0;
    border-bottom: 1px dashed #E0DDD4;
}
.widget li:last-child { border-bottom: none; }
.widget li a {
    color: #2A5C6E;
}
.widget li a:hover {
    color: #E25A3A;
}

/* ============== FOOTER ============== */
.page-footer {
    background: #1F1F24;
    color: #C5C5CC;
    margin-top: 40px;
    padding: 40px 0 20px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.9rem;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 28px;
}
.footer-col .widget {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 0;
}
.footer-col .widget-title {
    color: #FFFFFF;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 10px;
}
.footer-col .widget li {
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}
.footer-col .widget a {
    color: #C5C5CC;
}
.footer-col .widget a:hover {
    color: #E25A3A;
}
.footer-col .widget p {
    color: #9B9BA3;
    line-height: 1.55;
}
.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 18px;
    text-align: center;
    font-size: 0.82rem;
    color: #9B9BA3;
}

/* ============== BUTTONS ============== */
.btn {
    display: inline-block;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.92rem;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    text-decoration: none;
}
.btn-primary {
    background: #E25A3A;
    color: #FFFFFF;
}
.btn-primary:hover {
    background: #C54A2E;
    color: #FFFFFF;
    text-decoration: none;
}
.btn-secondary {
    background: transparent;
    color: #2A5C6E;
    border-bottom: 1px solid rgba(42, 92, 110, 0.4);
    border-radius: 0;
    padding: 6px 2px;
}
.btn-secondary:hover {
    background: rgba(42, 92, 110, 0.08);
    text-decoration: underline;
}

/* ============== FORMS ============== */
input[type="text"],
input[type="email"],
input[type="search"],
input[type="url"],
input[type="tel"],
textarea,
select {
    font-family: inherit;
    font-size: 0.95rem;
    padding: 9px 12px;
    border: 1px solid #E0DDD4;
    border-radius: 4px;
    background: #FFFFFF;
    color: #2C2C32;
    width: 100%;
    max-width: 100%;
    transition: border-color 0.2s ease;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #2A5C6E;
}
textarea { min-height: 110px; resize: vertical; }
label {
    display: block;
    margin-bottom: 5px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.88rem;
    color: #4A4A50;
}

/* Search form */
.search-form {
    display: flex;
    gap: 8px;
}
.search-form input[type="search"] {
    flex: 1;
}
.search-form button {
    background: #E25A3A;
    color: #FFFFFF;
    border: none;
    padding: 0 18px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
}
.search-form button:hover { background: #C54A2E; }

/* ============== PAGINATION ============== */
.pagination {
    margin: 34px 0 10px;
    text-align: center;
    font-family: 'Inter', system-ui, sans-serif;
}
.pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px 6px;
    border: 1px solid #E0DDD4;
    background: #FFFFFF;
    border-radius: 4px;
    color: #2A5C6E;
    font-size: 0.92rem;
    transition: background 0.2s ease, color 0.2s ease;
    text-decoration: none;
}
.pagination .page-numbers:hover {
    background: rgba(42, 92, 110, 0.08);
    color: #E25A3A;
    text-decoration: none;
}
.pagination .page-numbers.current {
    background: #E25A3A;
    color: #FFFFFF;
    border-color: #E25A3A;
}
.pagination .dots {
    background: transparent;
    border: none;
}

/* ============== COMMENTS ============== */
.comments-area {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #E0DDD4;
}
.comments-title {
    font-size: 1.35rem;
    margin: 0 0 20px;
}
.commentlist {
    list-style: none;
    padding: 0;
    margin: 0 0 30px;
}
.commentlist .comment,
.commentlist .pingback {
    padding: 16px 18px;
    margin: 0 0 14px;
    background: #FFFFFF;
    border: 1px solid #E0DDD4;
    border-radius: 6px;
}
.commentlist .children {
    list-style: none;
    padding-left: 24px;
    margin-top: 14px;
}
.comment-author {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 600;
    color: #1F1F24;
    margin-right: 8px;
}
.comment-date {
    font-size: 0.82rem;
    color: #6B6B72;
    font-family: 'Inter', system-ui, sans-serif;
}
.comment-body {
    margin: 10px 0;
    line-height: 1.6;
}
.comment-reply-link {
    font-size: 0.85rem;
    font-family: 'Inter', system-ui, sans-serif;
}
.comment-respond {
    margin-top: 24px;
    padding: 20px;
    background: #F1F0EB;
    border: 1px solid #E2E0D8;
    border-radius: 6px;
}
.comment-respond h3 { margin-top: 0; }
.comment-form p { margin-bottom: 12px; }
.form-submit .submit {
    background: #E25A3A;
    color: #FFFFFF;
    border: none;
    padding: 10px 22px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
}
.form-submit .submit:hover { background: #C54A2E; }

/* ============== COOKIE BANNER ============== */
.cookie-bar {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 1000;
    background: #1F1F24;
    color: #FFFFFF;
    padding: 14px 18px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.18);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.88rem;
    line-height: 1.45;
}
.cookie-bar p { margin: 0; flex: 1 1 300px; color: #E0E0E5; }
.cookie-bar a { color: #E25A3A; }
.cookie-bar-accept {
    background: #E25A3A;
    color: #FFFFFF;
    border: none;
    padding: 9px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 500;
}
.cookie-bar-accept:hover { background: #C54A2E; }
.cookie-bar.is-hidden { display: none; }

/* ============== HOMEPAGE SECTIONS ============== */
.hero {
    padding: 44px 0 30px;
    border-bottom: 1px solid #E0DDD4;
    margin-bottom: 34px;
}
.hero h1 {
    font-size: 2.4rem;
    margin: 0 0 14px;
    max-width: 820px;
}
.hero p {
    font-size: 1.08rem;
    color: #4A4A50;
    max-width: 720px;
}
.hero .hero-actions { margin-top: 20px; }

.section {
    padding: 34px 0;
    border-bottom: 1px solid #E0DDD4;
}
.section:last-child { border-bottom: none; }
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.section-head h2 { margin: 0; }
.section-head .section-sub {
    color: #6B6B72;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.92rem;
    margin: 6px 0 0;
    max-width: 560px;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
.feature {
    background: #FFFFFF;
    border: 1px solid #E0DDD4;
    border-radius: 8px;
    padding: 22px 22px 24px;
}
.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(226, 90, 58, 0.12);
    color: #E25A3A;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 14px;
}
.feature h3 { margin: 0 0 8px; font-size: 1.08rem; }
.feature p { margin: 0; color: #4A4A50; font-size: 0.95rem; }

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    counter-reset: step;
}
.step {
    background: #F1F0EB;
    border: 1px solid #E2E0D8;
    border-radius: 8px;
    padding: 22px 22px 24px;
    position: relative;
    counter-increment: step;
}
.step::before {
    content: counter(step, decimal-leading-zero);
    font-family: 'JetBrains Mono', 'SF Mono', monospace;
    font-size: 0.88rem;
    color: #E25A3A;
    font-weight: 600;
    letter-spacing: 0.04em;
}
.step h3 { margin: 10px 0 8px; font-size: 1.05rem; }
.step p { margin: 0; color: #4A4A50; font-size: 0.93rem; }

.callout {
    background: #F1F0EB;
    border: 1px solid #E2E0D8;
    border-left: 3px solid #E25A3A;
    border-radius: 4px;
    padding: 20px 24px;
    margin: 28px 0;
}
.callout-label {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: #E25A3A;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}
.callout p { margin: 0; }

/* ============== 404 ============== */
.error-404 {
    text-align: center;
    padding: 60px 0 40px;
}
.error-404 h1 {
    font-size: 4rem;
    margin: 0 0 10px;
    color: #E25A3A;
}
.error-404 p { color: #4A4A50; margin-bottom: 24px; }
.error-404 .search-form { max-width: 440px; margin: 0 auto 22px; }

/* ============== UTILITIES ============== */
.screen-reader-text {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.alignleft  { float: left;  margin: 0 1.2em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.2em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption {
    max-width: 100%;
    margin: 1em 0;
}
.wp-caption-text {
    font-size: 0.85rem;
    color: #6B6B72;
    text-align: center;
    margin-top: 6px;
    font-family: 'Inter', sans-serif;
}

/* ============== RESPONSIVE ============== */
@media (max-width: 960px) {
    .layout { grid-template-columns: 1fr; gap: 28px; }
    .layout--wide, .layout--no-sidebar { grid-template-columns: 1fr; }
    .footer-cols { grid-template-columns: 1fr 1fr; }
    .features, .steps { grid-template-columns: 1fr 1fr; }
    .hero h1 { font-size: 2rem; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.4rem; }

    .nav-toggle { display: inline-block; }
    .primary-nav {
        width: 100%;
        display: none;
        margin-left: 0;
    }
    .primary-nav.is-open { display: block; }
    .primary-nav ul { flex-direction: column; gap: 2px; }
    .primary-nav a { width: 100%; padding: 10px 14px; }

    .brand-desc { display: none; }

    .footer-cols { grid-template-columns: 1fr; gap: 26px; }
    .features, .steps { grid-template-columns: 1fr; }

    .cards-grid { grid-template-columns: 1fr; gap: 18px; }

    .btn { display: block; width: 100%; text-align: center; }
    .hero { padding: 30px 0 22px; }
    .hero h1 { font-size: 1.7rem; }

    .cookie-bar { flex-direction: column; align-items: stretch; }
    .cookie-bar-accept { width: 100%; }

    .section-head { flex-direction: column; align-items: flex-start; }
}
