/*
Theme Name: dds_wordorion.com
Author: Елена Вяземская
Description: Тема для информационного блога о создании, упаковке и продвижении коммерческого контента для микро- и малого бизнеса.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: wordorion
*/

/* ==========================================================================
   Базовые переменные и сброс
   ========================================================================== */
:root {
    --ink: #1c2333;
    --ink-soft: #3a4256;
    --muted: #6b7384;
    --paper: #f7f5f0;
    --paper-card: #ffffff;
    --line: #e3dfd6;
    --accent: #c2603a;
    --accent-deep: #a44d2c;
    --navy: #232a3d;
    --navy-text: #d9dceb;
    --navy-muted: #9aa1b7;
    --shadow: 0 10px 30px rgba(28, 35, 51, 0.08);
    --radius: 14px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Georgia", "Times New Roman", serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.7;
    font-size: 18px;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    line-height: 1.25;
    margin: 0 0 0.6em;
    font-weight: 700;
}

h1 { font-size: 2.1rem; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.25rem; }

p {
    margin: 0 0 1.1em;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-deep);
    text-decoration: underline;
}

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

/* ==========================================================================
   Контейнер ширины — единый источник
   ========================================================================== */
.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

.shell-wide {
    width: 85%;
    max-width: 1180px;
    margin-inline: auto;
}

@media (max-width: 600px) {
    .shell-wide { width: 92%; }
}

/* ==========================================================================
   Шапка
   ========================================================================== */
.site-header {
    background: var(--paper-card);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 18px 0;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1 1 320px;
}

.brand-logo,
.brand-logo-fallback {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    display: block;
}

.brand-text {
    min-width: 0;
}

.brand-title {
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.3;
    display: block;
}

.brand-title a {
    color: inherit;
}

.brand-desc {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.45;
    margin-top: 4px;
}

/* ==========================================================================
   Навигация
   ========================================================================== */
.main-nav {
    flex: 0 1 auto;
}

.nav-toggle {
    display: none;
    background: var(--ink);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.95rem;
    cursor: pointer;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
}

.main-nav a {
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    font-size: 0.98rem;
    color: var(--ink-soft);
    text-decoration: none;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

@media (max-width: 960px) {
    .nav-toggle {
        display: inline-block;
    }
    .main-nav {
        flex-basis: 100%;
    }
    .main-nav ul[hidden] {
        display: none !important;
    }
    .main-nav ul {
        flex-direction: column;
        gap: 4px;
        margin-top: 12px;
    }
    .main-nav a {
        display: block;
        padding: 10px 0;
        border-bottom: 1px solid var(--line);
    }
}

/* ==========================================================================
   Раскладки контента
   ========================================================================== */
.site-main {
    padding: 38px 0 56px;
}

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 44px;
    align-items: start;
}

.layout-single .content-area {
    width: 85%;
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 960px) {
    .layout-with-sidebar {
        grid-template-columns: minmax(0, 1fr);
        gap: 36px;
    }
    .layout-single .content-area {
        width: 100%;
    }
}

.content-area {
    min-width: 0;
}

/* ==========================================================================
   Хлебные крошки
   ========================================================================== */
.breadcrumbs {
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 26px;
    line-height: 1.6;
}

.breadcrumbs a {
    color: var(--ink-soft);
}

.breadcrumbs a:hover {
    color: var(--accent);
}

.breadcrumbs .sep {
    color: var(--line);
    margin: 0 4px;
}

/* ==========================================================================
   Карточки записей
   ========================================================================== */
.card {
    display: flex;
    flex-direction: column;
    background: var(--paper-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 28px;
}

.card-thumb-wrap {
    display: block;
    overflow: hidden;
    background: var(--paper);
}

.card-thumb-wrap img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.card:hover .card-thumb-wrap img {
    transform: scale(1.03);
}

.card-body {
    flex: 1;
    padding: 24px 26px 26px;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.3rem;
    margin: 0 0 10px;
}

.card-title a {
    color: var(--ink);
}

.card-title a:hover {
    color: var(--accent);
    text-decoration: none;
}

.card-meta {
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.card-excerpt {
    color: var(--ink-soft);
    font-size: 1rem;
}

.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}

.card-more {
    margin-top: auto;
    padding-top: 14px;
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
}

.card-more a::after {
    content: " →";
}

/* ==========================================================================
   Одиночная запись и страницы
   ========================================================================== */
.entry {
    background: var(--paper-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 38px 42px;
    box-shadow: var(--shadow);
}

.entry-header {
    margin-bottom: 26px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 20px;
}

.entry-title {
    font-size: 2.1rem;
    margin-bottom: 12px;
}

.entry-meta {
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    font-size: 0.85rem;
    color: var(--muted);
}

.entry-content {
    font-size: 1.06rem;
}

.entry-content img {
    border-radius: 10px;
    display: block;
    margin: 1.4em 0;
}

.entry-content h2,
.entry-content h3 {
    margin-top: 1.4em;
}

.entry-thumb {
    border-radius: 10px;
    margin-bottom: 26px;
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 7;
    object-fit: cover;
}

@media (max-width: 600px) {
    .entry {
        padding: 26px 22px;
    }
    .entry-title {
        font-size: 1.6rem;
    }
}

/* ==========================================================================
   Таблицы в контенте
   ========================================================================== */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    border: 1px solid var(--line);
}

.entry-content th,
.entry-content td {
    border: 1px solid var(--line);
    padding: 10px 14px;
    text-align: left;
}

.entry-content th {
    background: var(--paper);
}

/* ==========================================================================
   Сайдбар и виджеты
   ========================================================================== */
.sidebar {
    min-width: 0;
}

.widget {
    background: var(--paper-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 24px;
    margin-bottom: 26px;
    color: var(--ink-soft);
}

.widget-title {
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    font-size: 1.05rem;
    color: var(--ink);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
}

.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget ul li {
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.96rem;
    color: var(--ink-soft);
}

.widget ul li:last-child {
    border-bottom: 0;
}

.widget a {
    color: var(--ink);
}

.widget a:hover {
    color: var(--accent);
}

.widget .post-date {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 3px;
}

/* ==========================================================================
   Главная — секции
   ========================================================================== */
.home-section {
    padding: 52px 0;
    border-bottom: 1px solid var(--line);
}

.home-section:last-child {
    border-bottom: 0;
}

.section-eyebrow {
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 10px;
}

.section-lead {
    color: var(--ink-soft);
    font-size: 1.1rem;
    max-width: 62ch;
}

/* Блок 1: текст + иллюстрация */
.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
}

.split-media img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
}

@media (max-width: 960px) {
    .split {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }
    .split-media {
        order: -1;
    }
}

/* Блок 2: сетка рубрик */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    margin-top: 30px;
}

.topic-card {
    background: var(--paper-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 22px;
    min-width: 0;
}

.topic-card .topic-icon {
    width: 44px;
    height: 44px;
    display: block;
    margin-bottom: 14px;
    color: var(--accent);
}

.topic-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.topic-card p {
    color: var(--muted);
    font-size: 0.95rem;
    margin: 0;
}

@media (max-width: 960px) {
    .topic-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .topic-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Блок «последние записи» */
.latest-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
    margin-top: 30px;
}

.latest-grid .card {
    margin-bottom: 0;
}

@media (max-width: 960px) {
    .latest-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .latest-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Блок 3: шаги */
.steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin-top: 32px;
    counter-reset: step;
}

.step {
    min-width: 0;
    padding-top: 14px;
    border-top: 3px solid var(--accent);
}

.step::before {
    counter-increment: step;
    content: "0" counter(step);
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
    margin-bottom: 8px;
}

.step h3 {
    font-size: 1.08rem;
    margin-bottom: 8px;
}

.step p {
    color: var(--muted);
    font-size: 0.95rem;
    margin: 0;
}

@media (max-width: 960px) {
    .steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .steps {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Блок 4: FAQ */
.faq {
    margin-top: 28px;
    max-width: 820px;
}

.faq details {
    background: var(--paper-card);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 4px 22px;
    margin-bottom: 14px;
}

.faq summary {
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--ink);
    cursor: pointer;
    padding: 16px 0;
    list-style: none;
    position: relative;
    padding-right: 32px;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--accent);
    line-height: 1;
}

.faq details[open] summary::after {
    content: "–";
}

.faq details p {
    color: var(--ink-soft);
    margin: 0 0 16px;
    font-size: 1rem;
}

/* ==========================================================================
   Пагинация (type => plain, .page-numbers)
   ========================================================================== */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 38px;
    justify-content: center;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper-card);
    color: var(--ink-soft);
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    font-size: 0.95rem;
    text-decoration: none;
}

.pagination a.page-numbers:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.pagination .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.pagination .page-numbers.dots {
    border: 0;
    background: none;
}

/* ==========================================================================
   Подвал
   ========================================================================== */
.site-footer {
    background: var(--navy);
    color: var(--navy-text);
    padding: 52px 0 0;
}

.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
}

@media (max-width: 960px) {
    .footer-cols {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }
}

.footer-cols .widget {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    color: var(--navy-text);
}

.footer-cols .widget-title {
    color: #fff;
    border-bottom-color: var(--accent);
}

.footer-cols .widget ul li {
    border-bottom-color: rgba(255, 255, 255, 0.1);
    color: var(--navy-text);
}

.footer-cols .widget a {
    color: var(--navy-text);
}

.footer-cols .widget a:hover {
    color: #fff;
}

.footer-cols .widget .post-date {
    color: var(--navy-muted);
}

.footer-bottom {
    margin-top: 44px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 22px 0;
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    font-size: 0.85rem;
    color: var(--navy-muted);
    text-align: center;
}

/* ==========================================================================
   Поиск
   ========================================================================== */
.search-form {
    display: flex;
    gap: 8px;
}

.search-form .search-field {
    flex: 1;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--paper-card);
    color: var(--ink);
}

.search-form .search-submit {
    border: 0;
    background: var(--accent);
    color: #fff;
    padding: 0 20px;
    border-radius: 8px;
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    font-size: 0.95rem;
    cursor: pointer;
}

.search-form .search-submit:hover {
    background: var(--accent-deep);
}

/* ==========================================================================
   Комментарии
   ========================================================================== */
.comments-area {
    margin-top: 36px;
    background: var(--paper-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px 36px;
}

.comment-list {
    list-style: none;
    margin: 0 0 26px;
    padding: 0;
}

.comment-list li {
    border-bottom: 1px solid var(--line);
    padding: 16px 0;
}

.comment-list .comment-author {
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
}

.comment-list .comment-metadata {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 6px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.96rem;
    background: var(--paper);
    margin-bottom: 14px;
}

.comment-form .submit {
    border: 0;
    background: var(--accent);
    color: #fff;
    padding: 12px 26px;
    border-radius: 8px;
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    font-size: 0.95rem;
    cursor: pointer;
}

@media (max-width: 600px) {
    .comments-area {
        padding: 24px 22px;
    }
}

/* ==========================================================================
   404
   ========================================================================== */
.error-404 {
    background: var(--paper-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 48px 42px;
    text-align: center;
    box-shadow: var(--shadow);
}

.error-404 .big {
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    font-size: 4.5rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 10px;
}

.error-404 .search-form {
    max-width: 460px;
    margin: 24px auto 0;
}

.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 12px 26px;
    border-radius: 8px;
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    margin-top: 18px;
}

.btn:hover {
    background: var(--accent-deep);
    color: #fff;
    text-decoration: none;
}

/* CTA */
.cta-box {
    background: var(--navy);
    color: var(--navy-text);
    border-radius: var(--radius);
    padding: 40px 44px;
    text-align: center;
}

.cta-box h2 {
    color: #fff;
}

.cta-box p {
    color: var(--navy-text);
    max-width: 56ch;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   Cookie-баннер
   ========================================================================== */
.cookie-banner[hidden] {
    display: none !important;
}

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: var(--ink);
    color: #fff;
    padding: 16px 0;
}

.cookie-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: space-between;
}

.cookie-banner p {
    margin: 0;
    font-size: 0.9rem;
    flex: 1 1 320px;
    min-width: 0;
}

.cookie-banner a {
    color: #f0c9b8;
}

.cookie-accept {
    border: 0;
    background: var(--accent);
    color: #fff;
    padding: 11px 24px;
    border-radius: 8px;
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    font-size: 0.92rem;
    cursor: pointer;
    flex: 0 0 auto;
}

.cookie-accept:hover {
    background: var(--accent-deep);
}

/* ==========================================================================
   Прочее
   ========================================================================== */
.page-title {
    margin-bottom: 26px;
}

.contact-links {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
}

.contact-links li {
    margin-bottom: 8px;
}
