/*
Theme Name: dds_checkfloridahomes.com
Author: Светлана Громова
Description: Информационная тема о поиске, оценке и покупке жилья: как оценивать цену, проверять документы, сравнивать объявления и готовиться к сделке. Адаптивная вёрстка, боковая колонка и подвал с виджетами.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: cfh
*/

/* ============ Переменные ============ */
:root {
    --ink: #1c2b39;
    --ink-soft: #56697a;
    --navy: #153453;
    --navy-deep: #0e2537;
    --amber: #d5823c;
    --amber-dark: #b96b27;
    --teal: #2f7d8a;
    --paper: #f4f6f9;
    --card: #ffffff;
    --line: #e1e8ee;
    --footer-bg: #0e2537;
    --footer-ink: #c9d5df;
    --footer-ink-soft: #8ea1b1;
    --shadow: 0 6px 22px rgba(20, 45, 74, 0.08);
    --radius: 12px;
    --shell: min(92%, 1180px);
}

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

html { scroll-behavior: smooth; }

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

h1, h2, h3, h4 {
    line-height: 1.25;
    color: var(--navy);
    margin: 0 0 0.6em;
    font-weight: 700;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--amber-dark); text-decoration: underline; }

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

/* Глобальный p без background-color (F) */

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

.skip-link {
    position: absolute;
    left: -9999px;
}
.skip-link:focus {
    left: 12px;
    top: 12px;
    background: #fff;
    padding: 8px 14px;
    z-index: 100;
    border-radius: 6px;
}

/* ============ Шапка ============ */
.site-header {
    background: var(--card);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.4rem;
    padding: 1rem 0;
    flex-wrap: wrap;
}
.branding {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}
.branding .brand-logo,
.branding .brand-mark {
    flex: 0 0 auto;
    display: block;
}
.brand-mark { width: 48px; height: 48px; }
.brand-text { min-width: 0; }
.site-title {
    font-size: 1.12rem;
    margin: 0;
    line-height: 1.2;
}
.site-title a { color: var(--navy); }
.site-title a:hover { text-decoration: none; color: var(--amber-dark); }
.site-desc {
    margin: 0.25rem 0 0;
    font-size: 0.82rem;
    color: var(--ink-soft);
    max-width: 46ch;
}

/* ============ Навигация ============ */
.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.2rem;
    margin: 0;
    padding: 0;
}
.main-nav a {
    color: var(--navy);
    font-weight: 600;
    font-size: 0.98rem;
    padding: 0.35rem 0.1rem;
    display: inline-block;
}
.main-nav a:hover { color: var(--amber-dark); text-decoration: none; }
.main-nav .current-menu-item > a { color: var(--amber-dark); }

.nav-toggle {
    display: none;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.55rem 0.9rem;
    font-size: 0.95rem;
    cursor: pointer;
}

/* ============ Общий макет страниц ============ */
.site-main { padding: 2rem 0 3rem; }

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

@media (max-width: 960px) {
    .layout-with-sidebar {
        grid-template-columns: 1fr;
        gap: 2.4rem;
    }
    .layout-single { width: 100%; }
}

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

/* ============ Хлебные крошки ============ */
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin: 0 0 1.4rem;
    padding: 0.7rem 0;
}
.breadcrumbs a { color: var(--teal); }
.breadcrumbs .sep { margin: 0 0.35rem; color: #9fb0bd; }

/* ============ Карточки записей (A8, A10) ============ */
.card-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.4rem;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
@media (min-width: 601px) {
    .card {
        flex-direction: row;
    }
    .card-thumb-wrap {
        flex: 0 0 260px;
        position: relative;
        overflow: hidden;
    }
    .card-thumb-wrap a {
        display: block;
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
    }
    .card-thumb-wrap img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
}
.card-thumb-wrap img { display: block; }
.card-body {
    flex: 1;
    min-width: 0;
    padding: 1.3rem 1.5rem;
}
.card-title { font-size: 1.22rem; margin: 0 0 0.5rem; }
.card-title a { color: var(--navy); }
.card-title a:hover { color: var(--amber-dark); text-decoration: none; }
.card-meta {
    font-size: 0.8rem;
    color: var(--ink-soft);
    margin: 0 0 0.7rem;
}
.card-excerpt { color: #37485a; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    display: inline-block;
    margin-top: 0.3rem;
    font-weight: 600;
    color: var(--amber-dark);
}

/* Миниатюра для вертикальной раскладки (мобильные) */
@media (max-width: 600px) {
    .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
    }
    .card-thumb-wrap a { position: static; display: block; }
    .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        object-fit: cover;
        display: block;
    }
}

/* ============ Пагинация (D5) ============ */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 2.2rem 0 0;
}
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 0.5rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card);
    color: var(--navy);
    font-weight: 600;
    line-height: 1;
}
.pager a.page-numbers:hover {
    border-color: var(--amber);
    color: var(--amber-dark);
    text-decoration: none;
}
.pager .page-numbers.current {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}
.pager .page-numbers.dots {
    border: none;
    background: none;
}

/* ============ Контент записи / страницы ============ */
.entry {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem 2.2rem;
    box-shadow: var(--shadow);
}
.entry-header { margin-bottom: 1.2rem; }
.entry-title { font-size: 1.9rem; margin: 0 0 0.5rem; }
.entry-meta { font-size: 0.85rem; color: var(--ink-soft); }
.entry-thumb {
    margin: 0 0 1.4rem;
    border-radius: 10px;
    overflow: hidden;
}
.entry-thumb img { width: 100%; height: auto; display: block; }
.entry-content { min-width: 0; }
.entry-content img { border-radius: 8px; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content blockquote {
    margin: 1.5em 0;
    padding: 1.2rem 1.5rem;
    background: #eef4f6;
    border-left: 4px solid var(--teal);
    border-radius: 8px;
    color: #23414a;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }

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

.tags-line {
    margin-top: 1.6rem;
    font-size: 0.85rem;
    color: var(--ink-soft);
}
.tags-line a {
    display: inline-block;
    margin: 0 0.3rem 0.3rem 0;
    padding: 0.2rem 0.6rem;
    background: #eef3f7;
    border-radius: 6px;
}

.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.6rem;
    flex-wrap: wrap;
}
.post-nav a { font-weight: 600; }

/* ============ Сайдбар / виджеты ============ */
.sidebar { min-width: 0; }
.sidebar .widget {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.3rem 1.4rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    color: var(--ink);
}
.sidebar .widget-title {
    font-size: 1.05rem;
    margin: 0 0 0.9rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--amber);
    color: var(--navy);
}
.sidebar .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sidebar .widget li {
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--line);
}
.sidebar .widget li:last-child { border-bottom: none; }
.sidebar .widget a { color: var(--navy); }
.sidebar .widget a:hover { color: var(--amber-dark); }
.sidebar .widget .post-date {
    display: block;
    font-size: 0.78rem;
    color: var(--ink-soft);
}

/* ============ Подвал ============ */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-ink);
    padding: 2.6rem 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: 0; color: var(--footer-ink); }
.site-footer .widget-title {
    color: #fff;
    font-size: 1.05rem;
    margin: 0 0 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--amber);
}
.site-footer .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-footer .widget li {
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.site-footer .widget li:last-child { border-bottom: none; }
.site-footer .widget a { color: var(--footer-ink); }
.site-footer .widget a:hover { color: #fff; }
.site-footer .widget .post-date {
    display: block;
    font-size: 0.78rem;
    color: var(--footer-ink-soft);
}
.footer-bottom {
    text-align: center;
    margin-top: 2.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: var(--footer-ink-soft);
}

/* ============ Форма поиска ============ */
.search-form {
    display: flex;
    gap: 0.5rem;
}
.search-form .search-field {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 0.8rem;
    border: 1px solid #c2d0da;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #fff;
    color: var(--ink);
}
.search-form .search-submit {
    padding: 0.6rem 1.1rem;
    border: none;
    border-radius: 8px;
    background: var(--navy);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}
.search-form .search-submit:hover { background: var(--amber-dark); }

/* ============ Кнопки ============ */
.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background: var(--amber);
    color: #fff;
    border-radius: 8px;
    font-weight: 700;
    transition: background 0.15s ease;
}
.btn:hover { background: var(--amber-dark); color: #fff; text-decoration: none; }
.btn-ghost {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }

/* ============ Cookie-баннер (D6, A11) ============ */
.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    background: var(--navy-deep);
    color: #e8eef3;
    padding: 1rem 0;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.2);
}
.cookie-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    flex-wrap: wrap;
}
.cookie-inner p { margin: 0; font-size: 0.9rem; min-width: 0; }
.cookie-inner a { color: #f0c79a; }
.cookie-accept {
    flex: 0 0 auto;
    padding: 0.55rem 1.4rem;
    border: none;
    border-radius: 8px;
    background: var(--amber);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.cookie-accept:hover { background: var(--amber-dark); }

/* ============ Главная ============ */
.front { padding: 2rem 0 3rem; }
.front-shell {
    width: min(85%, 1180px);
    margin-inline: auto;
}
@media (max-width: 600px) {
    .front-shell { width: 92%; }
}
.front-section { padding: 2.6rem 0; }
.section-head {
    text-align: center;
    max-width: 62ch;
    margin: 0 auto 1.8rem;
}
.section-head h2 { margin-bottom: 0.5rem; }
.section-head p { color: var(--ink-soft); margin: 0; }

/* Блок: текст + иллюстрация */
.fs-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.4rem;
    align-items: center;
}
.fs-split.reverse .fs-split-media { order: -1; }
.fs-split-text h2 { margin-top: 0; }
.fs-split-media img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Блок: сетка карточек-рубрик */
.fs-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.3rem;
}
.fs-tile {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem 1.3rem;
    box-shadow: var(--shadow);
    min-width: 0;
}
.fs-tile .tile-ico {
    width: 46px;
    height: 46px;
    display: block;
    margin-bottom: 0.8rem;
    color: var(--teal);
}
.fs-tile h3 { font-size: 1.08rem; margin: 0 0 0.4rem; }
.fs-tile p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }

/* Блок: последние записи */
.fs-latest .latest-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}
.latest-card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.latest-card .lc-thumb { display: block; }
.latest-card .lc-thumb img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
}
.latest-card .lc-body {
    flex: 1;
    min-width: 0;
    padding: 1.2rem 1.3rem;
}
.latest-card h3 { font-size: 1.12rem; margin: 0 0 0.5rem; }
.latest-card h3 a { color: var(--navy); }
.latest-card h3 a:hover { color: var(--amber-dark); text-decoration: none; }
.latest-card .lc-meta { font-size: 0.78rem; color: var(--ink-soft); margin: 0 0 0.6rem; }
.latest-card .lc-excerpt { font-size: 0.92rem; color: #3a4b5c; }
.latest-card .lc-excerpt p { margin: 0 0 0.5em; background: none; }
.fs-latest .latest-more { text-align: center; margin-top: 1.8rem; }

/* Блок: шаги */
.fs-steps { background: #eef3f7; padding: 2.6rem 2.2rem; border-radius: 16px; }
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.4rem;
    counter-reset: step;
}
.step {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.4rem 1.3rem;
    min-width: 0;
    position: relative;
}
.step .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--amber);
    color: #fff;
    font-weight: 700;
    margin-bottom: 0.7rem;
}
.step h3 { font-size: 1.05rem; margin: 0 0 0.4rem; }
.step p { margin: 0; font-size: 0.9rem; color: var(--ink-soft); }

/* Блок: FAQ / аккордеон */
.fs-faq { max-width: 820px; margin-inline: auto; }
.faq-item {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 0.9rem;
    overflow: hidden;
}
.faq-q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    padding: 1.1rem 1.4rem;
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--navy);
    font-family: inherit;
}
.faq-q .faq-mark { flex: 0 0 auto; font-size: 1.4rem; color: var(--amber); transition: transform 0.2s ease; }
.faq-q[aria-expanded="true"] .faq-mark { transform: rotate(45deg); }
.faq-a[hidden] { display: none !important; }
.faq-a {
    padding: 0 1.4rem 1.2rem;
    color: #3a4b5c;
}
.faq-a p { margin: 0; }

/* Блок: CTA (A14 — свой padding со всех сторон) */
.fs-cta {
    background: var(--navy);
    color: #fff;
    padding: 2.8rem 2.4rem;
    border-radius: 16px;
    text-align: center;
}
.fs-cta h2 { color: #fff; margin-top: 0; }
.fs-cta p { color: #d4e0ea; max-width: 60ch; margin: 0 auto 1.4rem; }

/* ============ Комментарии ============ */
.comments-area {
    margin-top: 2rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.8rem 2rem;
    box-shadow: var(--shadow);
}
.comment-list {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
}
.comment-list .children {
    list-style: none;
    margin: 0.8rem 0 0 1.6rem;
    padding: 0;
}
.comment-item { margin-bottom: 1.1rem; }
.comment-inner {
    background: #f6f9fb;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1rem 1.2rem;
}
.comment-head {
    display: flex;
    gap: 0.8rem;
    align-items: baseline;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
}
.comment-author { font-weight: 700; color: var(--navy); }
.comment-date { font-size: 0.78rem; color: var(--ink-soft); }
.comment-text { min-width: 0; }
.comment-await { font-size: 0.82rem; color: var(--amber-dark); }
.comment-reply a {
    font-size: 0.85rem;
    font-weight: 600;
}
.comment-respond {
    margin-top: 1.5rem;
}
.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
    width: 100%;
    min-width: 0;
    padding: 0.6rem 0.8rem;
    border: 1px solid #c2d0da;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
    background: #fff;
    color: var(--ink);
}
.comment-respond .form-submit input {
    padding: 0.65rem 1.4rem;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}
.comment-respond .form-submit input:hover { background: var(--amber-dark); }

/* ============ 404 ============ */
.error-404 {
    text-align: center;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    box-shadow: var(--shadow);
}
.error-404 .code {
    font-size: 4rem;
    font-weight: 800;
    color: var(--amber);
    line-height: 1;
    margin-bottom: 0.4rem;
}
.error-404 .search-form {
    max-width: 420px;
    margin: 1.5rem auto 0;
}

/* ============ Адаптив ============ */
@media (max-width: 960px) {
    .fs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fs-latest .latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.35rem; }

    .header-inner { justify-content: space-between; }
    .main-nav {
        flex-basis: 100%;
        display: none;
    }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; gap: 0; }
    .main-nav li { border-bottom: 1px solid var(--line); }
    .nav-toggle { display: inline-block; }

    .fs-split { grid-template-columns: 1fr; gap: 1.4rem; }
    .fs-split.reverse .fs-split-media { order: 0; }
    .fs-grid { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr; }
    .fs-latest .latest-grid { grid-template-columns: 1fr; }
    .footer-cols { grid-template-columns: 1fr; gap: 1.6rem; }

    .entry { padding: 1.4rem 1.3rem; }
    .fs-steps { padding: 1.8rem 1.4rem; }
    .fs-cta { padding: 2rem 1.4rem; }
    .comments-area { padding: 1.3rem 1.2rem; }
    .cookie-inner { justify-content: center; text-align: center; }
}
