/*
Theme Name: dds_image-stilist.ru
Author: Мария Ветрова
Description: Тема для мультиформатного информационного портала об игровой эстетике, моде и визуальном искусстве. Редакционная вёрстка, слайдер, адаптивный дизайн.
Version: 1.1
Text Domain: imst
Requires at least: 6.0
Requires PHP: 8.0
*/

/* =========================================================
   Переменные и базовое
   ========================================================= */
:root {
    --ink: #141320;
    --ink-2: #1d1b2e;
    --ink-3: #272441;
    --paper: #f6f4ef;
    --paper-2: #ffffff;
    --text: #1b1925;
    --muted: #6c6678;
    --line: #e3ded4;
    --pink: #ff2e6e;
    --cyan: #16d6c9;
    --violet: #7b5cff;
    --radius: 14px;
    --shell: min(92%, 1180px);
    --wide: min(85%, 1180px);
    --shadow: 0 18px 40px -28px rgba(20, 19, 32, 0.55);
    --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.7;
    color: var(--text);
    background: var(--paper);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 {
    font-weight: 800;
    line-height: 1.18;
    color: var(--ink);
    letter-spacing: -0.01em;
    margin: 0 0 0.5em;
}
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; }

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

.kicker {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.74rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--pink);
    margin-bottom: 0.7em;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}
.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--ink);
    color: #fff;
    padding: 10px 16px;
    z-index: 1000;
}
.skip-link:focus { left: 8px; top: 8px; }

/* =========================================================
   Кнопки
   ========================================================= */
.btn {
    display: inline-block;
    font-weight: 700;
    font-size: 0.96rem;
    padding: 12px 26px;
    border-radius: 999px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn--solid { background: var(--pink); color: #fff; }
.btn--solid:hover { background: #e51f5b; color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }

/* =========================================================
   Шапка
   ========================================================= */
.site-header {
    background: var(--paper-2);
    border-bottom: 1px solid var(--line);
}
.site-header__inner {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 18px 0;
    flex-wrap: wrap;
}
.site-branding {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    flex: 1;
}
.brand-link { display: inline-flex; flex: 0 0 auto; }
.brand-logo { display: block; height: 52px; width: auto; }
.site-text { display: flex; flex-direction: column; min-width: 0; }
.site-name {
    font-weight: 800;
    font-size: 0.98rem;
    color: var(--ink);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.site-desc {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.primary-nav { flex: 0 0 auto; }
.menu.primary-menu {
    list-style: none;
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.menu.primary-menu a {
    display: block;
    padding: 9px 14px;
    color: var(--ink);
    font-weight: 600;
    border-radius: 8px;
}
.menu.primary-menu a:hover {
    background: var(--ink);
    color: #fff;
    text-decoration: none;
}
.menu.primary-menu .current-menu-item > a {
    color: var(--pink);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 44px; height: 40px;
    justify-content: center;
    align-items: center;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    width: 22px; height: 2px;
    background: var(--ink);
}

/* =========================================================
   Главная
   ========================================================= */
.home-wrap {
    width: var(--wide);
    margin-inline: auto;
    padding: 44px 0 60px;
}
.home-section { margin-bottom: 64px; }
.home-section:last-child { margin-bottom: 0; }

.section-head { margin-bottom: 28px; }

/* Слайдер */
.hero-slider-section { margin-bottom: 70px; }
.slider {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--ink);
}
.slider__track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.slide {
    flex: 0 0 100%;
    min-width: 0;
    position: relative;
}
.slide img {
    display: block;
    width: 100%;
    height: clamp(280px, 46vw, 540px);
    object-fit: cover;
}
.slide__caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 36px clamp(20px, 5vw, 56px);
    color: #fff;
    background: linear-gradient(to top, rgba(20,19,32,0.92), rgba(20,19,32,0.05));
}
.slide__caption .kicker { color: var(--cyan); }
.slide__caption h2 { color: #fff; margin-bottom: 0.3em; }
.slide__caption p { color: rgba(255,255,255,0.88); margin: 0; max-width: 640px; }

.slider__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px; height: 46px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.85);
    color: var(--ink);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.slider__btn:hover { background: #fff; }
.slider__btn--prev { left: 16px; }
.slider__btn--next { right: 16px; }

.slider__dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}
.slider__dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.45);
    cursor: pointer;
    padding: 0;
}
.slider__dot.is-active { background: var(--pink); width: 24px; border-radius: 6px; }

/* Текст + иллюстрация */
.feature-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 44px;
    align-items: center;
}
.feature-media img {
    display: block;
    width: 100%;
    border-radius: var(--radius);
    aspect-ratio: 5 / 6;
    object-fit: cover;
    box-shadow: var(--shadow);
}
.feature-text { min-width: 0; }

/* Сетка рубрик */
.rubrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}
.rubric-card {
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 22px;
    min-width: 0;
}
.rubric-ico { color: var(--violet); display: block; margin-bottom: 14px; }
.rubric-card h3 { margin-bottom: 0.4em; }
.rubric-card p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* CTA */
.cta-section .cta-inner {
    background: var(--ink);
    background-image: radial-gradient(circle at 18% 20%, rgba(123,92,255,0.5), transparent 42%),
                      radial-gradient(circle at 85% 80%, rgba(255,46,110,0.45), transparent 45%);
    color: #fff;
    border-radius: var(--radius);
    padding: clamp(34px, 6vw, 64px);
    text-align: center;
}
.cta-inner h2 { color: #fff; }
.cta-inner p { color: rgba(255,255,255,0.85); margin-bottom: 1.6em; }

.section-cta { margin-top: 30px; text-align: center; }
.empty-note { color: var(--muted); }

/* =========================================================
   Карточки записей
   ========================================================= */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
}
.cards-grid--blog { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
    display: flex;
    flex-direction: column;
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    min-width: 0;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.card-thumb-wrap {
    overflow: hidden;
    background: var(--ink-2);
}
.card-thumb-wrap img,
.card-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}
.card-thumb--svg { width: 100%; height: auto; aspect-ratio: 16 / 10; }

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 22px;
    min-width: 0;
}
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    font-family: var(--mono);
    font-size: 0.74rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px;
}
.card-cat a { color: var(--pink); font-weight: 700; }
.card-title { font-size: 1.18rem; margin-bottom: 0.5em; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--pink); text-decoration: none; }
.card-excerpt { color: var(--muted); font-size: 0.96rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    padding-top: 12px;
    font-weight: 700;
    color: var(--violet);
}

/* =========================================================
   Раскладки контентных страниц
   ========================================================= */
.page-shell { padding: 30px 0 64px; }

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

.page-title-block { margin-bottom: 26px; }
.archive-desc { color: var(--muted); }

/* Запись */
.single-thumb {
    margin: 0 0 26px;
    border-radius: var(--radius);
    overflow: hidden;
}
.single-thumb img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.single-title { margin-bottom: 0.4em; }

.entry-content { font-size: 1.05rem; }
.entry-content img { border-radius: 10px; display: block; height: auto; margin: 1.2em 0; }
.entry-content h2, .entry-content h3 { margin-top: 1.4em; }
.entry-content a { text-decoration: underline; }
.entry-content blockquote {
    margin: 1.4em 0;
    padding: 6px 22px;
    border-left: 4px solid var(--pink);
    color: var(--ink);
    font-style: italic;
}
.entry-content ul, .entry-content ol { padding-left: 1.4em; }

.single-tags { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip {
    font-family: var(--mono);
    font-size: 0.8rem;
    padding: 5px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
}
.tag-chip:hover { background: var(--ink); color: #fff; text-decoration: none; }

.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 36px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    font-weight: 600;
}
.post-nav a { color: var(--ink); }
.post-nav a:hover { color: var(--pink); text-decoration: none; }

/* Таблицы */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    border: 1px solid var(--ink-3);
}
.entry-content th, .entry-content td {
    border: 1px solid var(--line);
    padding: 10px 12px;
    text-align: left;
}
.entry-content th { background: var(--ink); color: #fff; }

/* =========================================================
   Сайдбар (светлый фон — тёмный текст)
   ========================================================= */
.sidebar { min-width: 0; }
.sidebar .widget {
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 22px;
    color: var(--text);
}
.sidebar .widget-title {
    font-size: 1.05rem;
    margin-bottom: 14px;
    color: var(--ink);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--pink);
}
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.sidebar .widget li:last-child { border-bottom: none; }
.sidebar .widget a { color: var(--ink); font-weight: 600; }
.sidebar .widget a:hover { color: var(--pink); }
.sidebar .widget .post-date { color: var(--muted); font-size: 0.8rem; display: block; }

/* =========================================================
   Пагинация (type=plain → .page-numbers)
   ========================================================= */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 44px;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    font-weight: 700;
    background: var(--paper-2);
}
.pagination a.page-numbers:hover {
    background: var(--ink);
    color: #fff;
    text-decoration: none;
}
.pagination .page-numbers.current {
    background: var(--pink);
    border-color: var(--pink);
    color: #fff;
}
.pagination .page-numbers.dots {
    border: none;
    background: transparent;
}

/* Пагинация комментариев */
.comments-area .nav-links {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}
.comments-area .nav-links a {
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

/* =========================================================
   Поиск
   ========================================================= */
.search-form {
    display: flex;
    gap: 8px;
    margin: 18px 0;
    max-width: 480px;
}
.search-form__field {
    flex: 1;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 1rem;
}
.search-form__submit {
    padding: 11px 20px;
    border: none;
    border-radius: 10px;
    background: var(--ink);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.search-form__submit:hover { background: var(--pink); }

/* =========================================================
   Комментарии
   ========================================================= */
.comments-area { margin-top: 44px; }
.comments-title { margin-bottom: 20px; }
.comment-list { list-style: none; margin: 0 0 30px; padding: 0; }
.comment-list ol { list-style: none; padding-left: 26px; }
.comment-body {
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 16px;
}
.comment-author { font-weight: 700; }
.comment-author img { border-radius: 50%; vertical-align: middle; margin-right: 8px; }
.comment-metadata { font-size: 0.8rem; color: var(--muted); }
.comment-respond {
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
}
.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: 10px;
    font-size: 1rem;
    font-family: inherit;
    margin-top: 5px;
}
.comment-form label { font-weight: 600; font-size: 0.9rem; }
.comment-form p { margin-bottom: 14px; }

/* =========================================================
   Хлебные крошки
   ========================================================= */
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 22px;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--pink); }
.breadcrumbs .crumb-sep { margin: 0 6px; color: var(--line); }

/* =========================================================
   404
   ========================================================= */
.error-404 { text-align: center; padding: 30px 0; }
.error-404__code {
    font-family: var(--mono);
    font-size: clamp(4rem, 14vw, 8rem);
    font-weight: 800;
    color: var(--pink);
    line-height: 1;
}
.error-404__text { color: var(--muted); max-width: 520px; margin: 0 auto 20px; }
.error-404 .search-form { margin-inline: auto; }
.error-404__home { margin-top: 26px; }

/* =========================================================
   Подвал (тёмный фон — светлый текст)
   ========================================================= */
.site-footer {
    background: var(--ink);
    color: rgba(255,255,255,0.78);
    margin-top: 60px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
    padding: 54px 0 36px;
}
.footer-col { min-width: 0; }
.site-footer .widget { margin-bottom: 0; color: rgba(255,255,255,0.78); }
.site-footer .widget-title {
    color: #fff;
    font-size: 1.02rem;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--pink);
}
.site-footer .widget p { color: rgba(255,255,255,0.74); }
.site-footer .widget ul { list-style: none; margin: 0; padding: 0; }
.site-footer .widget li { padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
.site-footer .widget li:last-child { border-bottom: none; }
.site-footer .widget a { color: rgba(255,255,255,0.85); }
.site-footer .widget a:hover { color: var(--cyan); }
.site-footer .widget .post-date { color: rgba(255,255,255,0.55); font-size: 0.8rem; display: block; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding: 22px 0;
}
.copyright { margin: 0; font-size: 0.86rem; color: rgba(255,255,255,0.6); }

/* =========================================================
   Cookie-баннер
   ========================================================= */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 900;
    background: var(--ink-2);
    color: rgba(255,255,255,0.9);
    border-top: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 -10px 30px -18px rgba(0,0,0,0.7);
}
.cookie-banner__inner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 0;
    flex-wrap: wrap;
}
.cookie-banner__text { margin: 0; flex: 1; min-width: 220px; font-size: 0.9rem; }
.cookie-banner__accept {
    flex: 0 0 auto;
    padding: 11px 26px;
    border: none;
    border-radius: 999px;
    background: var(--pink);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.cookie-banner__accept:hover { background: #e51f5b; }

/* =========================================================
   Адаптив
   ========================================================= */
@media (max-width: 960px) {
    .rubrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .feature-grid { gap: 30px; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .home-wrap, .layout-single .content-area { width: 100%; }
    .site-header__inner { gap: 14px; }
    .nav-toggle { display: flex; order: 3; margin-left: auto; }
    .primary-nav {
        flex-basis: 100%;
        display: none;
    }
    .primary-nav.is-open { display: block; }
    .menu.primary-menu { flex-direction: column; gap: 2px; }
    .menu.primary-menu a { padding: 12px 14px; border-radius: 8px; }
    .feature-grid { grid-template-columns: minmax(0, 1fr); }
    .feature-media { order: -1; }
    .feature-media img { aspect-ratio: 16 / 10; }
    .rubrics-grid,
    .cards-grid,
    .cards-grid--blog,
    .footer-grid { grid-template-columns: minmax(0, 1fr); }
    .slider__btn { width: 38px; height: 38px; font-size: 1.3rem; }
    .post-nav { flex-direction: column; }
}
