/*
Theme Name: dds_ritz-carlton-condos.com
Author: Тимофей Седов
Description: Информационная тема о премиальном жилье: качество дома, управление, планировки, эксплуатационные расходы, юридические нюансы и ликвидность объекта. Адаптивная вёрстка, собственные отрывки записей, раздел статей с пагинацией.
Version: 1.1
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
Text Domain: rccondos
*/

/* ============================================================
   Переменные
   ============================================================ */
:root {
    --ink:      #1c2430;
    --ink-2:    #2f3b4c;
    --gold:     #b08d4c;
    --gold-dk:  #8f6f38;
    --cream:    #f7f3ec;
    --paper:    #ffffff;
    --line:     #e3dcd0;
    --muted:    #6b7280;
    --text:     #24303f;
    --radius:   10px;
    --shell:    1180px;
    --serif:    Georgia, 'Times New Roman', serif;
    --sans:     -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ============================================================
   База
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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

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

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

h1, h2, h3, h4 {
    font-family: var(--serif);
    color: var(--ink);
    line-height: 1.25;
    margin: 0 0 0.6em;
    font-weight: 600;
}
h1 { font-size: 2.1rem; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; }

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

.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: -9999px;
    top: 0;
    background: var(--ink);
    color: #fff;
    padding: 10px 16px;
    z-index: 1000;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ============================================================
   Кнопки
   ============================================================ */
.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.98rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.btn-primary { background: var(--gold); color: #fff; }
.btn-primary:hover { background: var(--gold-dk); text-decoration: none; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-ghost:hover { background: rgba(255,255,255,.12); text-decoration: none; }

/* ============================================================
   Шапка
   ============================================================ */
.site-header {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.1rem 0;
    flex-wrap: wrap;
}
.site-branding {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}
.brand-logo { display: block; height: auto; }
.brand-logo--svg { border-radius: 8px; }
.site-titles { min-width: 0; }
.site-title {
    margin: 0;
    font-family: var(--serif);
    font-size: 1.15rem;
    line-height: 1.25;
    color: var(--ink);
    max-width: 34ch;
}
.site-title a { color: inherit; }
.site-title a:hover { text-decoration: none; color: var(--gold-dk); }
.site-description {
    margin: 0.25rem 0 0;
    font-size: 0.86rem;
    color: var(--muted);
    max-width: 52ch;
}

.primary-nav { min-width: 0; }
.primary-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.4rem;
    margin: 0;
    padding: 0;
}
.primary-menu a {
    color: var(--ink);
    font-weight: 600;
    font-size: 0.97rem;
    padding: 0.3rem 0;
    border-bottom: 2px solid transparent;
}
.primary-menu a:hover,
.primary-menu .current-menu-item > a {
    color: var(--gold-dk);
    border-bottom-color: var(--gold);
    text-decoration: none;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 44px; height: 40px;
    padding: 8px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
}
.nav-toggle__bar {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--ink);
}

/* ============================================================
   Основная область
   ============================================================ */
.site-main { display: block; }
.page-shell { padding: 1.6rem 0 3rem; }

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

.page-head { margin-bottom: 1.4rem; }
.page-title { margin: 0; }
.archive-desc { color: var(--muted); }
.empty-note { color: var(--muted); }

/* ============================================================
   Хлебные крошки
   ============================================================ */
.breadcrumbs {
    font-size: 0.86rem;
    color: var(--muted);
    margin-bottom: 1.3rem;
}
.breadcrumbs a { color: var(--gold-dk); }
.breadcrumbs .sep { color: var(--line); margin: 0 0.15rem; }
.breadcrumbs span:last-child { color: var(--text); }

/* ============================================================
   Карточки записей (A8, A10)
   ============================================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.8rem;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    min-width: 0;
}
.card-thumb-wrap {
    display: block;
    overflow: hidden;
}
.card-thumb-wrap a { display: block; }
.card-thumb-wrap img,
.card-thumb {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.2rem 1.3rem 1.4rem;
    min-width: 0;
}
.card-meta {
    font-size: 0.8rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}
.card-title {
    font-size: 1.2rem;
    margin: 0 0 0.6rem;
}
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--gold-dk); text-decoration: none; }
.card-excerpt { color: var(--text); font-size: 0.96rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    padding-top: 0.7rem;
    font-weight: 600;
    color: var(--gold-dk);
}
.card-more:hover { text-decoration: none; color: var(--gold); }

/* ============================================================
   Главная — секции
   ============================================================ */
.fs { padding: 3.4rem 0; }
.fs-rubrics { background: var(--paper); border-block: 1px solid var(--line); }
.fs-gallery { background: var(--paper); border-block: 1px solid var(--line); }
.fs-heading { font-size: 1.8rem; margin-bottom: 0.3rem; }
.fs-lead { color: var(--muted); margin-bottom: 1.8rem; max-width: 60ch; }
.fs-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--gold-dk);
    margin-bottom: 0.6rem;
}

/* Блок 1: текст + иллюстрация */
.fs-intro__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 2.6rem;
    align-items: center;
}
.fs-title { font-size: 2.2rem; margin-bottom: 0.7rem; }
.fs-intro__media img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
    justify-self: center;
}

/* Блок 2: рубрики */
.rubric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}
.rubric {
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.6rem 1.5rem;
    min-width: 0;
}
.rubric__icon {
    display: inline-flex;
    margin-bottom: 0.8rem;
}
.rubric__title { font-size: 1.15rem; margin-bottom: 0.5rem; }
.rubric p { margin: 0; font-size: 0.95rem; color: var(--text); }

/* Блок 3: галерея */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.4rem;
}
.gallery-item {
    margin: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--cream);
    min-width: 0;
}
.gallery-item img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    display: block;
}
.gallery-item figcaption {
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    color: var(--ink);
    font-family: var(--serif);
}

/* Блок 4: CTA */
.fs-cta {
    background: var(--ink);
    color: #f4eee2;
    border-radius: 14px;
    padding: 2.6rem 2.4rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.6rem;
}
.fs-cta__text { min-width: 0; flex: 1 1 320px; }
.fs-cta h2 { color: #fff; margin-bottom: 0.5rem; }
.fs-cta p { margin: 0; color: #d8d2c5; }
.fs-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

/* ============================================================
   Запись / страница
   ============================================================ */
.single-head { margin-bottom: 1rem; }
.single-title { font-size: 2rem; }
.single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    font-size: 0.85rem;
    color: var(--muted);
}
.single-meta a { color: var(--gold-dk); }
.single-thumb {
    margin: 0 0 1.6rem;
    border-radius: var(--radius);
    overflow: hidden;
}
.single-thumb img { width: 100%; display: block; }
.entry-content { min-width: 0; }
.entry-content img { border-radius: 8px; }
.entry-content h2 { margin-top: 1.8rem; }
.entry-content h3 { margin-top: 1.4rem; }
.entry-content blockquote {
    margin: 1.6rem 0;
    padding: 1.2rem 1.5rem;
    background: var(--cream);
    border-left: 4px solid var(--gold);
    border-radius: 0 var(--radius) var(--radius) 0;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-tags {
    margin-top: 1.8rem;
    font-size: 0.88rem;
    color: var(--muted);
}
.entry-tags a { color: var(--gold-dk); }
.page-links { margin-top: 1.2rem; font-weight: 600; }

/* Таблицы */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}
.entry-content table,
.entry-content th,
.entry-content td {
    border: 1px solid var(--line);
}
.entry-content th, .entry-content td {
    padding: 0.6rem 0.8rem;
    text-align: left;
}
.entry-content th { background: var(--cream); }

/* ============================================================
   Сайдбар (светлый фон — тёмный текст)
   ============================================================ */
.sidebar {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.sidebar .widget {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.3rem 1.4rem;
    color: var(--text);
}
.sidebar .widget-title {
    font-size: 1.1rem;
    margin: 0 0 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gold);
    color: var(--ink);
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 0.4rem 0; border-bottom: 1px solid var(--line); }
.sidebar li:last-child { border-bottom: 0; }
.sidebar a { color: var(--ink-2); }
.sidebar a:hover { color: var(--gold-dk); }
.sidebar .post-date { display: block; font-size: 0.78rem; color: var(--muted); }

/* ============================================================
   Подвал (тёмный фон — светлый текст)
   ============================================================ */
.site-footer {
    background: var(--ink);
    color: #cfd6df;
    padding: 3rem 0 1.6rem;
    margin-top: 2rem;
}
.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}
.footer-col { min-width: 0; }
.site-footer .widget-title {
    font-family: var(--serif);
    font-size: 1.1rem;
    color: #fff;
    margin: 0 0 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,.18);
}
.site-footer .widget { color: #cfd6df; }
.site-footer p { color: #cfd6df; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 0.35rem 0; }
.site-footer a { color: #e7ddc7; }
.site-footer a:hover { color: var(--gold); }
.site-footer .post-date { color: #9aa4b1; font-size: 0.8rem; }

.site-copyright {
    margin-top: 2.4rem;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(255,255,255,.15);
    font-size: 0.85rem;
    color: #9aa4b1;
    text-align: center;
}

/* ============================================================
   Пагинация (D5 — type=plain)
   ============================================================ */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2.4rem;
    justify-content: center;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.7rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    color: var(--ink);
    font-weight: 600;
    font-size: 0.95rem;
}
.pagination a.page-numbers:hover {
    border-color: var(--gold);
    color: var(--gold-dk);
    text-decoration: none;
}
.pagination .page-numbers.current {
    background: var(--gold);
    border-color: var(--gold);
    color: #fff;
}
.pagination .page-numbers.dots {
    border: 0;
    background: transparent;
}

/* ============================================================
   Форма поиска
   ============================================================ */
.search-form {
    display: flex;
    gap: 0.5rem;
    margin: 1.2rem 0;
    flex-wrap: wrap;
}
.search-form__label { flex: 1 1 200px; min-width: 0; }
.search-form__field {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--paper);
}
.search-form__submit {
    padding: 0.65rem 1.4rem;
    background: var(--ink);
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}
.search-form__submit:hover { background: var(--ink-2); }

/* ============================================================
   Комментарии
   ============================================================ */
.comments-area {
    margin-top: 2.6rem;
    padding-top: 1.6rem;
    border-top: 1px solid var(--line);
}
.comments-title { font-size: 1.4rem; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list ol { list-style: none; }
.comment-body {
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
}
.comment-author { font-weight: 600; }
.comment-author .says { display: none; }
.comment-metadata { font-size: 0.8rem; color: var(--muted); }
.comment-metadata a { color: var(--muted); }
.comment-respond { margin-top: 1.6rem; }
.comment-form-comment textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    margin-top: 0.3rem;
}
.comment-form p { margin-bottom: 0.9rem; }
.form-submit .submit {
    padding: 0.65rem 1.6rem;
    background: var(--gold);
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}
.form-submit .submit:hover { background: var(--gold-dk); }

/* ============================================================
   404
   ============================================================ */
.error-404 .btn { margin-top: 0.6rem; }

/* ============================================================
   Cookie-баннер (A11 — правило [hidden] до основных стилей)
   ============================================================ */
.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 900;
    background: var(--ink);
    color: #e7e2d7;
    box-shadow: 0 -6px 24px rgba(0,0,0,.18);
}
.cookie-banner__inner {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1rem 0;
    flex-wrap: wrap;
}
.cookie-banner__text {
    margin: 0;
    flex: 1 1 300px;
    min-width: 0;
    font-size: 0.9rem;
    color: #d8d2c5;
}
.cookie-banner__accept {
    padding: 0.6rem 1.6rem;
    background: var(--gold);
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.cookie-banner__accept:hover { background: var(--gold-dk); }

/* ============================================================
   Адаптив
   ============================================================ */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; gap: 2rem; }
    .fs-intro__grid { grid-template-columns: 1fr; gap: 1.8rem; }
    .fs-intro__media { order: -1; }
    h1 { font-size: 1.85rem; }
    .fs-title { font-size: 1.9rem; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .nav-toggle { display: flex; }
    .primary-nav {
        flex-basis: 100%;
        display: none;
    }
    .primary-nav.is-open { display: block; }
    .primary-menu { flex-direction: column; gap: 0; }
    .primary-menu li { border-bottom: 1px solid var(--line); }
    .primary-menu a { display: block; padding: 0.7rem 0; }

    .fs { padding: 2.4rem 0; }
    .fs-cta { padding: 1.8rem 1.4rem; }
    .fs-heading, .fs-title { font-size: 1.6rem; }
    .card-grid { grid-template-columns: 1fr; }
    .layout-single .content-area { width: 100%; }
    .site-header__inner { gap: 1rem; }
}
