/*
Theme Name: dds_audiozapp.com
Author: Станислав Ершов
Description: Информационная тема о звуковом оборудовании: микрофоны, акустика помещения, подключение и обработка записи.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: azp
*/

/* -------------------------------------------------- Токены */
:root {
    --ink:       #1a2130;
    --ink-soft:  #4b5567;
    --line:      #e2e6ec;
    --bg:        #f5f6f9;
    --surface:   #ffffff;
    --brand:     #c8641c;
    --brand-dk:  #a8500f;
    --deep:      #16202f;
    --deep-2:    #1f2c3f;
    --deep-txt:  #c4ccd8;
    --deep-head: #f4f6f9;
    --radius:    12px;
    --shell:     1180px;
}

/* -------------------------------------------------- База */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    overflow-x: hidden;
}

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

a { color: var(--brand-dk); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
    line-height: 1.25;
    color: var(--ink);
    margin: 0 0 .6em;
    font-weight: 700;
}
h1 { font-size: 2.1rem; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }

.shell {
    width: min(92%, var(--shell));
    margin-inline: auto;
}

.btn {
    display: inline-block;
    background: var(--brand);
    color: #fff;
    padding: .7rem 1.4rem;
    border-radius: 8px;
    font-weight: 600;
    transition: background .18s ease;
}
.btn:hover { background: var(--brand-dk); text-decoration: none; color: #fff; }

.section-title {
    font-size: 1.6rem;
    margin-bottom: 1.1rem;
}

/* -------------------------------------------------- Шапка */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: .85rem;
    min-width: 0;
}
.brand-logo { display: block; }
.brand-mark svg { display: block; height: 44px; width: auto; }
.brand-text { min-width: 0; }
.brand-name {
    display: block;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--ink);
    line-height: 1.25;
}
.brand-name:hover { text-decoration: none; }
.brand-desc {
    display: block;
    font-size: .82rem;
    color: var(--ink-soft);
    line-height: 1.35;
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: .5rem .7rem;
    cursor: pointer;
    color: var(--ink);
    font-size: .95rem;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: .35rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.main-nav a {
    display: block;
    padding: .5rem .9rem;
    color: var(--ink);
    border-radius: 7px;
    font-weight: 500;
}
.main-nav a:hover { background: var(--bg); text-decoration: none; }
.main-nav .current-menu-item > a { color: var(--brand-dk); }

/* -------------------------------------------------- Хлебные крошки */
.crumbs {
    font-size: .88rem;
    color: var(--ink-soft);
    padding: 1rem 0 0;
}
.crumbs a { color: var(--ink-soft); }
.crumbs a:hover { color: var(--brand-dk); }
.crumbs .sep { color: #aab2c0; margin: 0 .15rem; }

/* -------------------------------------------------- Основной контейнер */
.site-main { padding: 1.6rem 0 3rem; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 3%;
    align-items: start;
}
.layout-single { display: block; }
.layout-single .content-area {
    width: 85%;
    margin-inline: auto;
}

/* -------------------------------------------------- Карточки записей */
.card-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}
.layout-with-sidebar .card-list { grid-template-columns: minmax(0, 1fr); }

.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover {
    box-shadow: 0 10px 30px rgba(22, 32, 47, .09);
    transform: translateY(-2px);
}
.card-thumb {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #eef1f5;
}
.card-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-thumb.is-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-thumb.is-placeholder svg { width: 62px; height: 62px; opacity: .5; }

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.15rem 1.25rem 1.3rem;
}
.card-title { font-size: 1.15rem; margin: 0 0 .5rem; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--brand-dk); text-decoration: none; }
.card-meta {
    font-size: .8rem;
    color: var(--ink-soft);
    margin-bottom: .6rem;
}
.card-excerpt { color: var(--ink-soft); font-size: .95rem; }
.card-excerpt p { margin: 0 0 .5em; background: none; }
.card-more {
    margin-top: auto;
    padding-top: .8rem;
    font-weight: 600;
    color: var(--brand-dk);
}

/* -------------------------------------------------- Одиночная запись / страница */
.entry {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem 2.1rem;
}
.entry-header { margin-bottom: 1.2rem; }
.entry-meta { font-size: .85rem; color: var(--ink-soft); margin-top: .3rem; }
.entry-thumb { margin: 0 0 1.4rem; border-radius: 10px; overflow: hidden; }
.entry-thumb img { display: block; width: 100%; }
.entry-content { font-size: 1.02rem; }
.entry-content img { border-radius: 8px; }
.entry-content h2 { margin-top: 1.6rem; }
.entry-content h3 { margin-top: 1.3rem; }
.entry-content ul, .entry-content ol { padding-left: 1.3rem; }
.entry-content blockquote {
    margin: 1.4rem 0;
    padding: 1rem 1.3rem;
    background: #f0f3f7;
    border-left: 4px solid var(--brand);
    border-radius: 8px;
    color: var(--ink);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.3rem 0;
    border: 1px solid var(--line);
}
th, td {
    border: 1px solid var(--line);
    padding: .6rem .8rem;
    text-align: left;
}
th { background: #f0f3f7; }

.entry-tags { margin-top: 1.6rem; font-size: .9rem; }
.entry-tags a {
    display: inline-block;
    background: #eef1f5;
    padding: .25rem .7rem;
    border-radius: 20px;
    margin: 0 .3rem .3rem 0;
    color: var(--ink-soft);
}

/* -------------------------------------------------- Сайдбар */
.sidebar { min-width: 0; }
.sidebar .widget {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.15rem 1.25rem;
    margin-bottom: 1.4rem;
    color: var(--ink);
}
.sidebar .widget-title {
    font-size: 1.05rem;
    margin: 0 0 .8rem;
    padding-bottom: .55rem;
    border-bottom: 2px solid var(--brand);
    color: var(--ink);
}
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li { padding: .45rem 0; border-bottom: 1px solid var(--line); }
.sidebar .widget li:last-child { border-bottom: none; }
.sidebar .widget a { color: var(--ink); }
.sidebar .widget a:hover { color: var(--brand-dk); }
.sidebar .widget .post-date { display: block; font-size: .78rem; color: var(--ink-soft); }

/* -------------------------------------------------- Пагинация */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: 2rem;
    justify-content: center;
}
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 .8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    font-weight: 600;
}
.pager a.page-numbers:hover {
    border-color: var(--brand);
    color: var(--brand-dk);
    text-decoration: none;
}
.pager .page-numbers.current {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.pager .page-numbers.dots {
    border: none;
    background: none;
}

/* -------------------------------------------------- Главная */
.front-hero {
    position: relative;
    background: linear-gradient(120deg, var(--deep) 0%, var(--deep-2) 100%);
    color: var(--deep-head);
    border-radius: 16px;
    overflow: hidden;
    margin: 1.8rem 0 2.6rem;
    padding: 3rem 2.4rem;
}
.front-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: 2rem;
    align-items: center;
}
.front-hero h1 { color: #fff; font-size: 2.35rem; margin-bottom: .8rem; }
.front-hero p { color: var(--deep-txt); font-size: 1.08rem; margin-bottom: 1.4rem; }
.front-hero-art img { display: block; width: 100%; height: auto; }

.front-section { padding: 2.6rem 0; }
.front-section + .front-section { border-top: 1px solid var(--line); }
.front-section .lead { color: var(--ink-soft); max-width: 60ch; }

/* Блок «текст + иллюстрация» */
.split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.2rem;
    align-items: center;
}
.split.reverse .split-media { order: 2; }
.split-media img { display: block; width: 100%; height: auto; border-radius: 12px; }
.split-body p:last-child { margin-bottom: 0; }

/* Сетка рубрик */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.3rem;
}
.topic-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.4rem 1.3rem;
    min-width: 0;
}
.topic-card .ico {
    width: 46px; height: 46px;
    display: flex; align-items: center; justify-content: center;
    background: #f4ede6;
    border-radius: 10px;
    margin-bottom: .8rem;
}
.topic-card .ico svg { width: 26px; height: 26px; }
.topic-card h3 { font-size: 1.08rem; margin-bottom: .4rem; }
.topic-card p { font-size: .92rem; color: var(--ink-soft); margin: 0; }

/* Пошаговый блок */
.steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.3rem;
    counter-reset: step;
}
.step {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem 1.3rem 1.3rem;
    position: relative;
    min-width: 0;
}
.step .num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: .7rem;
}
.step h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.step p { font-size: .9rem; color: var(--ink-soft); margin: 0; }

/* FAQ */
.faq { max-width: 820px; }
.faq details {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 1.3rem;
    margin-bottom: .8rem;
}
.faq summary {
    cursor: pointer;
    font-weight: 600;
    padding: 1rem 0;
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+";
    color: var(--brand);
    font-size: 1.4rem;
    line-height: 1;
    flex: none;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 1rem; color: var(--ink-soft); }

/* Последние записи на главной */
.front-latest .card-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* -------------------------------------------------- Подвал */
.site-footer {
    background: var(--deep);
    color: var(--deep-txt);
    padding: 2.8rem 0 1.4rem;
    margin-top: 2rem;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}
.site-footer .widget { margin-bottom: 1.2rem; color: var(--deep-txt); }
.site-footer .widget-title {
    color: var(--deep-head);
    font-size: 1.05rem;
    margin: 0 0 .8rem;
}
.site-footer .widget p { color: var(--deep-txt); }
.site-footer .widget ul { list-style: none; margin: 0; padding: 0; }
.site-footer .widget li { padding: .35rem 0; }
.site-footer .widget a { color: var(--deep-txt); }
.site-footer .widget a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    margin-top: 1.6rem;
    padding-top: 1.4rem;
    font-size: .85rem;
    color: #8a94a4;
}

/* -------------------------------------------------- Cookie-баннер */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 999;
    background: var(--deep-2);
    color: var(--deep-head);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    padding: 1rem 1.3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    flex-wrap: wrap;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
    max-width: 720px;
    margin-inline: auto;
}
.cookie-banner p { margin: 0; font-size: .9rem; color: var(--deep-txt); flex: 1; min-width: 220px; }
.cookie-banner a { color: #fff; text-decoration: underline; }
.cookie-banner .btn { flex: none; }

/* -------------------------------------------------- Формы: поиск, комментарии */
.search-form {
    display: flex;
    gap: .5rem;
}
.search-form .search-field {
    flex: 1;
    min-width: 0;
    padding: .6rem .8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: .95rem;
}
.search-form .search-submit {
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: .6rem 1.1rem;
    cursor: pointer;
    font-weight: 600;
}
.search-form .search-submit:hover { background: var(--brand-dk); }

.comments-area { margin-top: 2rem; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list ul.children { list-style: none; margin: 0 0 0 1.4rem; padding: 0; }
.comment-body {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1.1rem 1.2rem;
    margin-bottom: 1rem;
}
.comment-head { display: flex; gap: 1rem; align-items: baseline; margin-bottom: .5rem; }
.comment-author { font-weight: 600; }
.comment-date { font-size: .8rem; color: var(--ink-soft); }
.comment-form { display: grid; gap: .9rem; margin-top: 1rem; }
.comment-form p { margin: 0; }
.comment-form label { display: block; font-size: .9rem; margin-bottom: .3rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: .6rem .8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: inherit;
    font-size: .95rem;
}
.comment-form .submit {
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: .65rem 1.4rem;
    cursor: pointer;
    font-weight: 600;
    justify-self: start;
}

/* -------------------------------------------------- 404 */
.notfound { text-align: center; padding: 2.5rem 0; }
.notfound .code { font-size: 4.5rem; font-weight: 800; color: var(--brand); line-height: 1; }
.notfound .search-form { max-width: 420px; margin: 1.6rem auto 0; }

/* -------------------------------------------------- Контакты статичные */
.contact-static { margin-top: 1.2rem; }
.contact-static a { font-weight: 600; }
.social-links { display: flex; gap: .8rem; margin-top: .8rem; flex-wrap: wrap; }
.social-links a {
    display: inline-block;
    padding: .4rem .9rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
}

/* -------------------------------------------------- Адаптив */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); }
    .layout-single .content-area { width: 100%; }
    .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .front-latest .card-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .front-hero h1 { font-size: 1.9rem; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 1.7rem; }
    .front-hero { padding: 2rem 1.4rem; }
    .front-hero-grid { grid-template-columns: minmax(0, 1fr); }
    .front-hero-art { display: none; }
    .nav-toggle { display: block; }
    .main-nav {
        flex-basis: 100%;
        display: none;
    }
    .main-nav.is-open { display: block; }
    .main-nav ul { flex-direction: column; gap: .1rem; }
    .card-list { grid-template-columns: minmax(0, 1fr); }
    .split { grid-template-columns: minmax(0, 1fr); }
    .split.reverse .split-media { order: 0; }
    .topic-grid { grid-template-columns: minmax(0, 1fr); }
    .steps { grid-template-columns: minmax(0, 1fr); }
    .front-latest .card-list { grid-template-columns: minmax(0, 1fr); }
    .footer-cols { grid-template-columns: minmax(0, 1fr); }
    .entry { padding: 1.4rem 1.2rem; }
    .cookie-banner { flex-direction: column; align-items: stretch; }
    .cookie-banner .btn { text-align: center; }
}
