/*
Theme Name: dds_mm-radio.com
Author: Максим Лебедев
Description: Информационная тема для экспертного сайта-гида по игровым саундтрекам с ежегодным флагманским рейтингом.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: mmradio
*/

/* ============================================================
   ТОКЕНЫ
   ============================================================ */
:root {
    --bg: #0c0d12;
    --surface: #14161d;
    --surface-2: #1c1f29;
    --surface-3: #232733;
    --border: #2a2e3a;
    --text: #eceef4;
    --muted: #9aa1b2;
    --muted-2: #767d8f;
    --gold: #f4b740;
    --gold-soft: #ffd277;
    --pink: #ff5c7a;
    --pink-soft: #ff8aa1;
    --radius: 14px;
    --radius-sm: 9px;
    --shell: min(92%, 1180px);
    --head: "Bricolage Grotesque", Georgia, serif;
    --body: "Manrope", system-ui, sans-serif;
    --shadow: 0 18px 48px -20px rgba(0,0,0,.7);
}

/* ============================================================
   БАЗА
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--body);
    font-size: 17px;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    background-image:
        radial-gradient(circle at 12% -5%, rgba(244,183,64,.07), transparent 42%),
        radial-gradient(circle at 92% 4%, rgba(255,92,122,.08), transparent 40%);
    background-attachment: fixed;
}

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

a { color: var(--gold); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--gold-soft); }

h1, h2, h3, h4 {
    font-family: var(--head);
    line-height: 1.12;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 .5em;
    letter-spacing: -.01em;
}
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

p { margin: 0 0 1.1em; }

.shell { width: var(--shell); margin-inline: auto; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: .5em;
    background: var(--gold);
    color: #1a1306;
    font-weight: 700;
    font-family: var(--head);
    padding: .7em 1.4em;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}
.btn:hover { color: #1a1306; transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgba(244,183,64,.7); }
.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--gold); }

.eyebrow {
    display: inline-block;
    font-family: var(--head);
    font-size: .76rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--pink);
    margin-bottom: .8em;
}

/* ============================================================
   ШАПКА
   ============================================================ */
.site-header {
    border-bottom: 1px solid var(--border);
    background: rgba(12,13,18,.86);
    backdrop-filter: blur(8px);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
    flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-logo { display: block; height: 52px; width: auto; }
.brand-mark {
    flex: 0 0 auto;
    width: 52px; height: 52px;
    display: grid; place-items: center;
}
.brand-text { min-width: 0; }
.brand-name {
    font-family: var(--head);
    font-weight: 800;
    font-size: 1.18rem;
    color: var(--text);
    line-height: 1.1;
    display: block;
    max-width: 30ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.brand-name:hover { color: var(--gold); }
.brand-desc {
    font-size: .82rem;
    color: var(--muted);
    line-height: 1.35;
    max-width: 44ch;
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nav-toggle {
    display: none;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 8px;
    margin: 0; padding: 0;
    flex-wrap: wrap;
}
.main-nav a {
    display: block;
    color: var(--text);
    font-weight: 600;
    font-size: .95rem;
    padding: 9px 14px;
    border-radius: 999px;
    transition: background .18s ease, color .18s ease;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
    background: var(--surface-2);
    color: var(--gold);
}

/* ============================================================
   КОНТЕЙНЕР СТРАНИЦЫ
   ============================================================ */
.site-main { padding: 40px 0 64px; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: clamp(28px, 4vw, 52px);
    align-items: start;
}
.layout-single .content-area {
    width: 85%;
    margin-inline: auto;
}
@media (max-width: 960px) {
    .layout-single .content-area { width: 100%; }
}
.content-area { min-width: 0; }

/* ============================================================
   ХЛЕБНЫЕ КРОШКИ
   ============================================================ */
.breadcrumbs {
    font-size: .85rem;
    color: var(--muted);
    margin: 0 0 26px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--gold); }
.breadcrumbs .sep { color: var(--muted-2); }
.breadcrumbs span:last-child { color: var(--text); }

/* ============================================================
   КАРТОЧКИ ЗАПИСЕЙ
   ============================================================ */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 26px;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .2s ease, border-color .2s ease;
    min-width: 0;
}
.card:hover { transform: translateY(-4px); border-color: var(--gold); }
.card-thumb-link { display: block; }
.card-thumb {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--surface-3);
}
.card-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.card:hover .card-thumb img { transform: scale(1.05); }
.card-thumb.placeholder { display: grid; place-items: center; }
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 22px 22px 24px;
    min-width: 0;
}
.card-meta {
    font-size: .76rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--pink);
    margin-bottom: 9px;
}
.card-title {
    font-size: 1.22rem;
    margin: 0 0 .55em;
    line-height: 1.22;
}
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--gold); }
.card-excerpt { color: var(--muted); font-size: .96rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    padding-top: 16px;
    font-family: var(--head);
    font-weight: 700;
    font-size: .92rem;
    color: var(--gold);
}
.card-more::after { content: " →"; }

/* ============================================================
   ОДИНОЧНАЯ ЗАПИСЬ / СТРАНИЦА
   ============================================================ */
.entry {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(24px, 4vw, 46px);
}
.entry-header { margin-bottom: 26px; }
.entry-meta { color: var(--muted); font-size: .88rem; margin-bottom: 10px; }
.entry-thumb {
    border-radius: var(--radius);
    overflow: hidden;
    margin: 0 0 30px;
}
.entry-thumb img { display: block; width: 100%; height: auto; }
.entry-content { font-size: 1.05rem; }
.entry-content img { border-radius: var(--radius-sm); display: block; }
.entry-content h2 { margin-top: 1.5em; }
.entry-content h3 { margin-top: 1.3em; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.entry-content blockquote {
    margin: 1.6em 0;
    padding: 4px 0 4px 22px;
    border-left: 3px solid var(--pink);
    color: var(--muted);
    font-style: italic;
}
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: .5em; }
.entry-content pre {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    overflow-x: auto;
    min-width: 0;
}

/* таблицы */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    border: 1px solid var(--border);
}
.entry-content th, .entry-content td {
    border: 1px solid var(--border);
    padding: 10px 13px;
    text-align: left;
}
.entry-content th { background: var(--surface-2); font-family: var(--head); }

.tags-line { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 9px; }
.tags-line a {
    font-size: .8rem;
    background: var(--surface-2);
    color: var(--muted);
    padding: 5px 12px;
    border-radius: 999px;
}
.tags-line a:hover { color: var(--gold); }

/* ============================================================
   ФРОНТ-СТРАНИЦА
   ============================================================ */
.hero {
    position: relative;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    padding: clamp(34px, 6vw, 72px);
    margin-bottom: 40px;
    background:
        linear-gradient(135deg, rgba(244,183,64,.12), transparent 55%),
        linear-gradient(300deg, rgba(255,92,122,.14), transparent 50%),
        var(--surface);
}
.hero h1 { max-width: 18ch; }
.hero p { max-width: 56ch; color: var(--muted); font-size: 1.1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }

.section { margin-bottom: 56px; }
.section-head { margin-bottom: 28px; max-width: 64ch; }
.section-head p { color: var(--muted); }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 22px;
}
.feature {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 26px;
    min-width: 0;
}
.feature-num {
    font-family: var(--head);
    font-weight: 800;
    font-size: 2.2rem;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 12px;
}
.feature h3 { margin-bottom: .4em; }
.feature p { color: var(--muted); margin: 0; font-size: .96rem; }

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 20px;
    counter-reset: step;
}
.step {
    border: 1px solid var(--border);
    border-left: 3px solid var(--pink);
    border-radius: var(--radius-sm);
    padding: 22px 22px 22px 24px;
    background: var(--surface);
    min-width: 0;
}
.step h3 { font-size: 1.1rem; }
.step p { color: var(--muted); margin: 0; font-size: .94rem; }

.spotlight {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(28px, 5vw, 56px);
    background:
        radial-gradient(circle at 85% 15%, rgba(255,92,122,.12), transparent 45%),
        var(--surface);
}
.spotlight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 28px;
    align-items: start;
}
.spotlight-grid .feature { background: var(--surface-2); }

/* ============================================================
   САЙДБАР + ВИДЖЕТЫ
   ============================================================ */
.sidebar { min-width: 0; }
.widget {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 22px 24px;
    margin-bottom: 24px;
    color: var(--text);
}
.widget-title,
.widget h2, .widget h3 {
    font-family: var(--head);
    font-size: 1.05rem;
    color: var(--text);
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.widget a { color: var(--gold); }
.widget a:hover { color: var(--gold-soft); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { margin-bottom: 11px; font-size: .95rem; color: var(--text); }
.widget li:last-child { margin-bottom: 0; }
.widget .post-date,
.widget .rss-date,
.widget time { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; }

/* ============================================================
   ПАГИНАЦИЯ
   ============================================================ */
.pagination {
    margin-top: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-weight: 600;
    background: var(--surface);
}
.pagination .page-numbers:hover { border-color: var(--gold); color: var(--gold); }
.pagination .page-numbers.current {
    background: var(--gold);
    color: #1a1306;
    border-color: var(--gold);
}
.pagination .page-numbers.dots { border-color: transparent; background: transparent; }

/* ============================================================
   ФОРМА ПОИСКА
   ============================================================ */
.search-form {
    display: flex;
    gap: 8px;
    min-width: 0;
}
.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 11px 14px;
    font-family: inherit;
    font-size: .95rem;
}
.search-form input[type="search"]:focus { outline: none; border-color: var(--gold); }
.search-form button {
    background: var(--gold);
    color: #1a1306;
    border: 0;
    border-radius: var(--radius-sm);
    padding: 0 18px;
    font-weight: 700;
    font-family: var(--head);
    cursor: pointer;
}

/* ============================================================
   КОММЕНТАРИИ
   ============================================================ */
.comments-area {
    margin-top: 38px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(22px, 4vw, 40px);
}
.comments-title, .comment-reply-title { margin-top: 0; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list li { margin-bottom: 20px; }
.comment-body {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 18px 20px;
}
.comment-list .children { list-style: none; margin: 18px 0 0; padding-left: 26px; border-left: 1px solid var(--border); }
.comment-meta { font-size: .82rem; color: var(--muted); margin-bottom: 8px; }
.comment-author .fn { color: var(--text); font-weight: 700; font-style: normal; }
.comment-form { display: grid; gap: 16px; margin-top: 22px; }
.comment-form p { margin: 0; }
.comment-form label { display: block; font-size: .85rem; 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%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 11px 14px;
    font-family: inherit;
    font-size: .96rem;
}
.comment-form textarea:focus,
.comment-form input:focus { outline: none; border-color: var(--gold); }
.comment-form .submit { width: auto; }

/* ============================================================
   404
   ============================================================ */
.error-404 {
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(34px, 7vw, 80px) clamp(20px, 5vw, 60px);
}
.error-404 .code {
    font-family: var(--head);
    font-weight: 800;
    font-size: clamp(4rem, 16vw, 9rem);
    line-height: 1;
    color: var(--gold);
    margin-bottom: 10px;
}
.error-404 .search-form { max-width: 440px; margin: 28px auto 0; }
.error-404 .home-link { display: inline-block; margin-top: 22px; }

/* ============================================================
   ПОДВАЛ
   ============================================================ */
.site-footer {
    border-top: 1px solid var(--border);
    background: #090a0e;
    padding: 56px 0 0;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 36px;
}
.footer-col { min-width: 0; }
/* контраст в тёмном футере: текст светлый */
.footer-col .widget {
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    color: var(--text);
}
.footer-col .widget-title,
.footer-col .widget h2,
.footer-col .widget h3 {
    color: var(--text);
    border-bottom-color: var(--border);
}
.footer-col .widget a { color: var(--gold); }
.footer-col .widget a:hover { color: var(--gold-soft); }
.footer-col .widget li { color: var(--muted); }
.footer-col .widget time,
.footer-col .widget .post-date { color: var(--muted-2); }
.footer-contact a { color: var(--gold); }
.footer-social { display: flex; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.footer-social a {
    display: inline-grid; place-items: center;
    width: 40px; height: 40px;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text);
}
.footer-social a:hover { border-color: var(--gold); color: var(--gold); }
.footer-bottom {
    border-top: 1px solid var(--border);
    margin-top: 48px;
    padding: 22px 0;
    text-align: center;
    color: var(--muted-2);
    font-size: .85rem;
}

/* ============================================================
   COOKIE-БАННЕР  (правило A11 — до основного блока стилей)
   ============================================================ */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 16px; right: 16px; bottom: 16px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 22px;
    max-width: 760px;
    margin-inline: auto;
}
.cookie-banner p { margin: 0; flex: 1; min-width: 220px; font-size: .92rem; color: var(--muted); }
.cookie-banner p a { color: var(--gold); }
.cookie-banner .btn { flex: 0 0 auto; }

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    body { font-size: 16px; }
    .nav-toggle { display: inline-block; }
    .main-nav {
        flex-basis: 100%;
        display: none;
    }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; gap: 4px; }
    .main-nav a { padding: 11px 14px; }
    .header-inner { gap: 14px; }
    .brand-name { white-space: normal; max-width: none; }
}
