/*
Theme Name: dds_nik-star.com
Author: Алексей Кравцов
Description: Информационно-аналитический портал о недвижимости Нью-Йорка, объединяющий обзоры рынка, практические гиды и визуальные истории городской среды. Тёмная архитектурная тема с бирюзовыми и охристыми акцентами.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: nikstar
*/

/* =========================================================================
   Переменные
   ========================================================================= */
:root {
    --bg: #1A1D20;
    --surface: #24282E;
    --surface-2: #2C313A;
    --text: #F0F2F5;
    --muted: #99A2AC;
    --accent: #00E5C3;
    --accent-2: #E6B250;
    --blue: #2B6C9E;
    --terra: #B15533;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --shell: min(92%, 1180px);
    --radius: 8px;
}

/* =========================================================================
   Сброс и база
   ========================================================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    font-size: 17px;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Manrope', 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.25;
    margin: 0 0 0.6em;
    color: var(--text);
    letter-spacing: -0.01em;
}

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

p {
    margin: 0 0 1.1em;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

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

ul, ol {
    padding-left: 1.3em;
}

blockquote {
    margin: 1.4em 0;
    padding: 0.6em 1.2em;
    border-left: 3px solid var(--accent);
    background: var(--surface);
    color: var(--muted);
}

code, pre {
    font-family: 'SFMono-Regular', Consolas, monospace;
    background: var(--surface-2);
    border-radius: 4px;
}

code { padding: 0.1em 0.4em; font-size: 0.9em; }

pre {
    padding: 1em;
    overflow-x: auto;
    border: 1px solid var(--border);
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* =========================================================================
   Контейнеры и раскладки
   ========================================================================= */
.shell {
    width: var(--shell);
    margin-inline: auto;
}

.front-shell {
    width: min(85%, 1180px);
    margin-inline: auto;
}

.page-shell {
    padding: 2.4rem 0 3.5rem;
}

.site-main {
    min-height: 50vh;
}

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

.layout-single {
    display: block;
}

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

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

/* =========================================================================
   Кнопки
   ========================================================================= */
.btn {
    display: inline-block;
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    padding: 0.7em 1.4em;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.btn-primary {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    box-shadow: 0 0 14px rgba(0, 229, 195, 0.18);
}

.btn-primary:hover {
    background: var(--accent);
    color: #0C0E10;
    border-color: transparent;
}

.btn-primary:active {
    transform: translateY(3px);
}

.btn-secondary {
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.btn-secondary:hover {
    color: var(--accent);
}

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

.header-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 1.1rem 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    flex: 1;
}

.brand-logo-link {
    display: flex;
    flex: 0 0 auto;
}

.brand-logo {
    display: block;
    width: 56px;
    height: 56px;
}

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

.brand-name {
    display: block;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
    line-height: 1.3;
}

.brand-desc {
    display: block;
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.5;
    margin-top: 0.2rem;
    max-width: 60ch;
}

/* Навигация */
.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    color: var(--text);
    font-family: 'Manrope', sans-serif;
    font-size: 0.9rem;
    padding: 0.5em 0.9em;
    cursor: pointer;
}

.main-navigation .nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.4rem;
}

.main-navigation a {
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* =========================================================================
   Хлебные крошки
   ========================================================================= */
.breadcrumbs {
    font-family: 'Manrope', sans-serif;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 1.6rem;
}

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

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

.breadcrumbs .sep {
    color: var(--border-strong);
    margin: 0 0.35em;
}

.breadcrumbs span:last-child {
    color: var(--text);
}

/* =========================================================================
   Карточки записей
   ========================================================================= */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 1.6rem;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-3px);
    border-color: var(--border-strong);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
}

.card-thumb-wrap {
    display: block;
    overflow: hidden;
}

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

.card:hover .card-thumb-wrap img {
    filter: grayscale(0%);
    transform: scale(1.04);
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1.3rem 1.4rem;
    min-width: 0;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    font-family: 'Manrope', sans-serif;
    font-size: 0.78rem;
    margin-bottom: 0.5rem;
}

.card-date {
    color: var(--accent-2);
    font-weight: 600;
}

.card-cat {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.card-title {
    font-size: 1.18rem;
    margin: 0 0 0.5rem;
}

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

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

.card-excerpt {
    color: var(--muted);
    font-size: 0.96rem;
    margin-bottom: 1rem;
}

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

.card-more {
    align-self: flex-start;
    margin-top: auto;
}

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

.widget {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.3rem 1.4rem;
    margin-bottom: 1.6rem;
}

/* Контраст в сайдбаре (светлый текст на тёмной поверхности) */
.sidebar .widget {
    color: var(--text);
}

.widget-title {
    font-size: 1.05rem;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

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

.widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

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

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

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

.widget .post-date,
.widget_recent_entries .post-date {
    display: block;
    font-family: 'Manrope', sans-serif;
    font-size: 0.78rem;
    color: var(--accent-2);
    margin-top: 0.15rem;
}

/* =========================================================================
   Записи и страницы — типографика контента
   ========================================================================= */
.entry-header {
    margin-bottom: 1.4rem;
}

.entry-title {
    font-size: 2rem;
}

.entry-meta {
    font-family: 'Manrope', sans-serif;
    font-size: 0.85rem;
    color: var(--muted);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.entry-meta .meta-accent {
    color: var(--accent-2);
    font-weight: 600;
}

.entry-thumb {
    margin: 0 0 1.6rem;
    border-radius: var(--radius);
    overflow: hidden;
}

.entry-thumb img {
    display: block;
    width: 100%;
}

.entry-content {
    margin-bottom: 2rem;
}

.entry-content img {
    border-radius: var(--radius);
}

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

.entry-footer {
    font-family: 'Manrope', sans-serif;
    font-size: 0.85rem;
    color: var(--muted);
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.entry-footer a {
    color: var(--accent);
}

/* Таблицы в контенте */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4rem 0;
}

table, th, td {
    border: 1px solid var(--border-strong);
}

th, td {
    padding: 0.6rem 0.8rem;
    text-align: left;
}

th {
    background: var(--surface-2);
    font-family: 'Manrope', sans-serif;
}

/* Постраничная навигация внутри записи */
.page-links {
    font-family: 'Manrope', sans-serif;
    margin: 1.4rem 0;
}

/* =========================================================================
   Пагинация
   ========================================================================= */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2.4rem;
    justify-content: center;
}

.pagination .page-numbers {
    display: inline-block;
    font-family: 'Manrope', sans-serif;
    font-size: 0.9rem;
    padding: 0.5em 0.9em;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    color: var(--text);
}

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

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

.pagination .page-numbers.dots {
    border-color: transparent;
}

/* =========================================================================
   Главная страница
   ========================================================================= */
.front-section {
    padding: 3.2rem 0;
}

.front-section + .front-section {
    border-top: 1px solid var(--border);
}

.section-head {
    margin-bottom: 1.8rem;
}

.section-eyebrow {
    font-family: 'Manrope', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    display: block;
    margin-bottom: 0.4rem;
}

.section-title {
    font-size: 1.8rem;
}

/* Hero */
.hero {
    padding: 4rem 0 3.6rem;
    background:
        radial-gradient(900px 360px at 78% 0%, rgba(0, 229, 195, 0.10), transparent),
        radial-gradient(700px 320px at 10% 100%, rgba(43, 108, 158, 0.16), transparent);
}

.hero-title {
    font-size: clamp(2rem, 4.4vw, 3.1rem);
    max-width: 20ch;
}

.hero-lead {
    color: var(--muted);
    font-size: 1.1rem;
    max-width: 58ch;
}

.hero-actions {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-top: 1.4rem;
}

/* Слайдер */
.nikstar-slider {
    margin-top: 2.4rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.6rem 1.8rem;
    position: relative;
    min-height: 7.5rem;
}

.nikstar-slide {
    display: none;
}

.nikstar-slide.is-active {
    display: block;
}

.nikstar-slide .slide-figure {
    font-family: 'Manrope', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-2);
}

.nikstar-slide .slide-text {
    color: var(--muted);
    margin: 0.3rem 0 0;
}

.slider-dots {
    display: flex;
    gap: 0.4rem;
    margin-top: 1rem;
}

.slider-dots button {
    width: 28px;
    height: 4px;
    border: none;
    border-radius: 2px;
    background: var(--border-strong);
    cursor: pointer;
    padding: 0;
}

.slider-dots button.is-active {
    background: var(--accent);
}

/* Сетка направлений */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    gap: 1.4rem;
}

.topic-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: border-color 0.25s ease, background 0.25s ease;
}

.topic-card:hover {
    border-color: var(--accent);
    background: var(--surface-2);
}

.topic-card h3 {
    margin-bottom: 0.4rem;
}

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

.topic-index {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    color: var(--accent);
    font-size: 0.95rem;
}

/* Блок «Подход» — шаги */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 1.4rem;
}

.step {
    border-left: 2px solid var(--accent);
    padding-left: 1.2rem;
    min-width: 0;
}

.step-num {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--accent-2);
}

.step h3 {
    margin: 0.2rem 0 0.4rem;
}

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

/* Блок контактов */
.contact-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}

.contact-list {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1.6rem;
}

.contact-list li {
    font-family: 'Manrope', sans-serif;
}

.contact-list .contact-label {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.contact-list a {
    font-size: 1.05rem;
    font-weight: 600;
}

.social-row {
    display: flex;
    gap: 0.7rem;
    margin-top: 1.4rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    color: var(--text);
    font-family: 'Manrope', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.social-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.front-posts-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

/* =========================================================================
   Комментарии
   ========================================================================= */
.comments-area {
    margin-top: 2.4rem;
    border-top: 1px solid var(--border);
    padding-top: 1.6rem;
}

.comments-title,
.comment-reply-title {
    font-size: 1.3rem;
}

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

.comment-list .children {
    list-style: none;
    margin: 0;
    padding-left: 1.5rem;
}

.comment-body {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.3rem;
    margin-bottom: 1rem;
}

.comment-head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.6rem;
}

.comment-avatar {
    border-radius: 50%;
}

.comment-author {
    display: block;
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
}

.comment-author a {
    color: var(--text);
}

.comment-date {
    font-size: 0.8rem;
    color: var(--muted);
}

.comment-awaiting {
    color: var(--accent-2);
    font-size: 0.85rem;
}

.comment-reply a {
    font-family: 'Manrope', sans-serif;
    font-size: 0.85rem;
}

.comment-respond {
    margin-top: 1.6rem;
}

.comment-form label {
    display: block;
    font-family: 'Manrope', sans-serif;
    font-size: 0.88rem;
    margin-bottom: 0.3rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    color: var(--text);
    padding: 0.6rem 0.8rem;
    font-family: inherit;
    margin-bottom: 1rem;
}

.comment-form textarea {
    min-height: 120px;
}

/* =========================================================================
   Форма поиска
   ========================================================================= */
.search-form {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.search-field {
    flex: 1;
    min-width: 0;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    color: var(--text);
    padding: 0.6rem 0.9rem;
    font-family: inherit;
}

.search-field::placeholder {
    color: var(--muted);
}

.widget .search-form {
    margin: 0;
}

/* =========================================================================
   Подвал
   ========================================================================= */
.site-footer {
    background: #15171A;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    padding: 2.8rem 0 1.6rem;
}

/* Контраст в подвале — тёмный фон, светлый текст виджетов */
.site-footer .widget {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    color: #C8CFD6;
}

.site-footer .widget-title {
    color: var(--text);
    border-bottom-color: var(--border);
}

.site-footer .widget a {
    color: #C8CFD6;
}

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

.site-footer .widget li {
    border-bottom-color: var(--border);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 1.3rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.4rem;
    justify-content: space-between;
    align-items: center;
}

.footer-copy {
    font-family: 'Manrope', sans-serif;
    font-size: 0.85rem;
    color: var(--muted);
}

.footer-caption {
    font-size: 0.8rem;
    color: var(--muted);
    font-style: italic;
}

/* =========================================================================
   Cookie-баннер — правило [hidden] размещено ДО основного блока
   ========================================================================= */
.cookie-banner[hidden] {
    display: none !important;
}

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    background: var(--surface);
    border-top: 1px solid var(--accent);
    padding: 1rem 1.4rem;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.45);
}

.cookie-text {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted);
    max-width: 70ch;
}

/* =========================================================================
   Общие заголовки страниц
   ========================================================================= */
.page-title,
.archive-title {
    margin-bottom: 1.4rem;
}

.archive-description {
    color: var(--muted);
    margin-bottom: 1.6rem;
}

.no-results {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.6rem;
}

.error-404 .page-title {
    font-size: 2.4rem;
}

/* =========================================================================
   Адаптив
   ========================================================================= */
@media (max-width: 960px) {
    .layout-with-sidebar {
        grid-template-columns: 1fr;
    }

    .footer-cols {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 16px;
    }

    h1 { font-size: 1.7rem; }

    .menu-toggle {
        display: block;
    }

    .header-inner {
        position: relative;
    }

    .main-navigation {
        flex-basis: 100%;
        display: none;
    }

    .main-navigation.is-open {
        display: block;
    }

    .main-navigation .nav-list {
        flex-direction: column;
        gap: 0.2rem;
        padding-top: 0.8rem;
    }

    .main-navigation a {
        display: block;
        padding: 0.6rem 0;
        border-bottom: 1px solid var(--border);
    }

    .layout-single .content-area {
        width: 100%;
    }

    .front-shell {
        width: 92%;
    }

    .footer-cols {
        grid-template-columns: 1fr;
        gap: 1.6rem;
    }

    .footer-bottom {
        justify-content: flex-start;
    }
}
