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

:root {
    --teal: #1f6f6b;
    --teal-dark: #14504d;
    --ink: #1f2a2a;
    --muted: #5a6b6a;
    --gold: #e8b04b;
    --paper: #ffffff;
    --soft: #f3f6f5;
    --line: #d8e2e0;
    --shadow: 0 6px 22px rgba(20, 60, 58, 0.08);
    --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    color: var(--ink);
    background: var(--soft);
    line-height: 1.65;
    overflow-x: hidden;
}

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

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

h1, h2, h3, h4 {
    font-family: Georgia, "Times New Roman", serif;
    color: var(--ink);
    line-height: 1.25;
    margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

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

.wide { width: 85%; max-width: 1180px; margin-inline: auto; }

/* -------------------- Шапка -------------------- */
.site-header {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}
.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; }
.brand-text { min-width: 0; }
.brand-name {
    font-family: Georgia, serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--ink);
    display: block;
}
.brand-desc {
    font-size: 0.82rem;
    color: var(--muted);
    display: block;
    max-width: 520px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 22px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.main-nav a {
    color: var(--ink);
    font-weight: 600;
    font-size: 0.95rem;
}
.main-nav a:hover { color: var(--teal); text-decoration: none; }

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

/* -------------------- Раскладки -------------------- */
.site-main { padding: 36px 0 48px; }

.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%; max-width: 1100px; margin-inline: auto; }

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

/* -------------------- Крошки -------------------- */
.crumbs {
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0 0 22px;
}
.crumbs a { color: var(--teal); }
.crumbs .sep { margin: 0 6px; color: var(--line); }

/* -------------------- Hero / текст+иллюстрация -------------------- */
.feature {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
    background: var(--paper);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 36px;
}
.feature.reverse .feature-media { order: -1; }
.feature h2 { font-size: 1.8rem; }
.feature-media img { border-radius: 12px; display: block; width: 100%; }
.btn {
    display: inline-block;
    background: var(--teal);
    color: #fff;
    padding: 12px 24px;
    border-radius: 9px;
    font-weight: 600;
    margin-top: 8px;
}
.btn:hover { background: var(--teal-dark); text-decoration: none; color: #fff; }

@media (max-width: 600px) {
    .feature { grid-template-columns: 1fr; padding: 26px; gap: 24px; }
    .feature.reverse .feature-media { order: 0; }
}

/* -------------------- Сетка карточек-преимуществ -------------------- */
.tiles {
    background: var(--teal-dark);
    border-radius: var(--radius);
    padding: 44px 40px;
    margin-bottom: 36px;
    color: #eaf4f3;
}
.tiles h2 { color: #fff; font-size: 1.7rem; }
.tiles-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-top: 24px;
}
.tile {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 24px;
}
.tile h3 { color: #fff; font-size: 1.12rem; }
.tile p { color: #cfe3e1; margin: 0; }
@media (max-width: 960px) { .tiles-grid { grid-template-columns: 1fr; } }

/* -------------------- Пошаговый блок -------------------- */
.steps {
    background: var(--paper);
    border-radius: var(--radius);
    padding: 44px 40px;
    box-shadow: var(--shadow);
    margin-bottom: 36px;
}
.steps h2 { font-size: 1.7rem; }
.steps-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    margin-top: 24px;
    counter-reset: step;
    list-style: none;
    padding: 0;
}
.steps-list li {
    position: relative;
    padding: 22px 18px 18px;
    background: var(--soft);
    border-radius: 12px;
    min-width: 0;
}
.steps-list li::before {
    counter-increment: step;
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    background: var(--gold);
    color: var(--ink);
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 12px;
    font-family: Georgia, serif;
}
.steps-list h3 { font-size: 1.05rem; }
.steps-list p { margin: 0; font-size: 0.92rem; color: var(--muted); }
@media (max-width: 960px) { .steps-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .steps-list { grid-template-columns: 1fr; } }

/* -------------------- FAQ -------------------- */
.faq {
    background: var(--paper);
    border-radius: var(--radius);
    padding: 44px 40px;
    box-shadow: var(--shadow);
    margin-bottom: 36px;
}
.faq h2 { font-size: 1.7rem; }
.faq details {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px 18px;
    margin-top: 14px;
    background: var(--soft);
}
.faq summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--ink);
    list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; color: var(--teal); font-weight: 700; }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 12px 0 0; color: var(--muted); }

/* -------------------- Последние записи на главной -------------------- */
.latest { margin-bottom: 36px; }
.latest h2 { font-size: 1.7rem; margin-bottom: 22px; }
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
}
@media (max-width: 960px) { .posts-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .posts-grid { grid-template-columns: 1fr; } }

/* -------------------- Карточка записи -------------------- */
.card {
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.card-thumb {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}
.card-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 22px 22px;
    min-width: 0;
}
.card-title { font-size: 1.18rem; margin: 0 0 8px; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--teal); text-decoration: none; }
.card-meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 10px; }
.card-excerpt { color: var(--muted); font-size: 0.94rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    padding-top: 12px;
    font-weight: 600;
    color: var(--teal);
}

/* -------------------- Запись / страница -------------------- */
.entry {
    background: var(--paper);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow);
}
.entry-title { font-size: 2rem; margin-bottom: 10px; }
.entry-meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 20px; }
.entry-content { font-size: 1.02rem; }
.entry-content img { border-radius: 10px; }
.entry-thumb { margin: 0 0 22px; }
.entry-thumb img { border-radius: 12px; width: 100%; display: block; }

.entry-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
}
.entry-content table,
.entry-content th,
.entry-content td {
    border: 1px solid var(--line);
}
.entry-content th, .entry-content td { padding: 10px 12px; text-align: left; }
.entry-content th { background: var(--soft); }

/* -------------------- Сайдбар -------------------- */
.sidebar { min-width: 0; }
.sidebar .widget {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 24px;
    color: var(--ink);
}
.sidebar .widget-title { font-size: 1.1rem; color: var(--ink); margin-bottom: 14px; }
.sidebar .widget a { color: var(--teal); }
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 0.94rem; }
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget .post-date { color: var(--muted); font-size: 0.8rem; display: block; }

/* -------------------- Пагинация -------------------- */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 36px 0 0;
}
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--paper);
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
}
.pager a.page-numbers:hover { border-color: var(--teal); color: var(--teal); }
.pager .page-numbers.current {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
}
.pager .page-numbers.dots { border: 0; background: none; }

/* -------------------- Форма поиска / комментарии -------------------- */
.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 9px;
    font-size: 0.95rem;
}
.search-form button {
    background: var(--teal);
    color: #fff;
    border: 0;
    border-radius: 9px;
    padding: 0 18px;
    cursor: pointer;
    font-weight: 600;
}

.comments-area { margin-top: 30px; background: var(--paper); border-radius: var(--radius); padding: 30px 36px; box-shadow: var(--shadow); }
.comments-area .comment-list { list-style: none; margin: 0; padding: 0; }
.comment-item { border-bottom: 1px solid var(--line); padding: 16px 0; }
.comment-meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; }
.comment-author { font-weight: 700; color: var(--ink); margin-right: 10px; }
.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: 9px;
    font-family: inherit;
    margin-bottom: 12px;
}
.comment-form input[type="submit"] {
    background: var(--teal);
    color: #fff;
    border: 0;
    border-radius: 9px;
    padding: 12px 24px;
    font-weight: 600;
    cursor: pointer;
}

/* -------------------- 404 -------------------- */
.notfound { text-align: center; background: var(--paper); border-radius: var(--radius); padding: 60px 36px; box-shadow: var(--shadow); }
.notfound h1 { font-size: 4rem; color: var(--teal); margin-bottom: 6px; }

/* -------------------- Подвал -------------------- */
.site-footer {
    background: var(--teal-dark);
    color: #d7e7e5;
    padding: 48px 0 0;
    margin-top: 40px;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
}
@media (max-width: 960px) { .footer-cols { grid-template-columns: 1fr; gap: 28px; } }
.site-footer .widget { margin-bottom: 0; color: #d7e7e5; }
.site-footer .widget-title { color: #fff; font-size: 1.08rem; margin-bottom: 14px; }
.site-footer .widget p { color: #c2dad8; }
.site-footer .widget a { color: #ffffff; }
.site-footer .widget ul { list-style: none; margin: 0; padding: 0; }
.site-footer .widget li { padding: 6px 0; }
.site-footer .widget .post-date { color: #9fc0bd; font-size: 0.8rem; display: block; }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    margin-top: 40px;
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
    color: #b7d2d0;
}

/* -------------------- Cookie-баннер -------------------- */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 999;
    background: var(--ink);
    color: #f1f5f4;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 0.9rem;
}
.cookie-banner a { color: var(--gold); }
.cookie-banner button {
    background: var(--gold);
    color: var(--ink);
    border: 0;
    border-radius: 8px;
    padding: 10px 22px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

/* -------------------- Адаптивное меню -------------------- */
@media (max-width: 960px) {
    .nav-toggle { display: inline-block; }
    .main-nav {
        flex-basis: 100%;
        width: 100%;
    }
    .main-nav[hidden] { display: none; }
    .main-nav ul { flex-direction: column; gap: 0; }
    .main-nav li { border-bottom: 1px solid var(--line); }
    .main-nav a { display: block; padding: 12px 0; }
}
.main-nav[hidden] { display: none; }

@media (min-width: 961px) {
    .main-nav[hidden] { display: block; }
}
