/*
Theme Name: dds_hijosingratos.com
Author: Алексей Круглов
Description: Информационный мультитематический блог о личных финансах, инвестициях и недвижимости.
Version: 1.1
Text Domain: finhome
*/

:root {
    --ink: #1d2731;
    --muted: #5b6b78;
    --navy: #163655;
    --navy-deep: #0f263d;
    --teal: #2c6f6a;
    --gold: #bd8e36;
    --gold-soft: #f0e3c4;
    --paper: #f6f3ec;
    --card: #ffffff;
    --line: #e3ded2;
    --foot-bg: #102234;
    --foot-panel: #16314a;
    --foot-text: #c7d3df;
    --foot-muted: #8ba0b3;
    --radius: 10px;
    --shadow: 0 6px 24px rgba(20, 40, 60, 0.08);
    --shell: min(92%, 1180px);
}

* { 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 {
    font-family: Georgia, "Times New Roman", serif;
    color: var(--navy);
    line-height: 1.22;
    margin: 0 0 0.5em;
    font-weight: 700;
}

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

p { margin: 0 0 1.1em; }

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

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

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

/* ---------- Header ---------- */
.site-head {
    background: var(--card);
    border-bottom: 3px solid var(--gold);
    box-shadow: var(--shadow);
}
.head-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 18px 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1 1 320px;
}
.brand-logo, .brand .logo-mark {
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    display: block;
}
.brand-text { min-width: 0; }
.brand-name {
    font-family: Georgia, serif;
    font-weight: 700;
    color: var(--navy);
    font-size: 1.18rem;
    line-height: 1.25;
    display: block;
    text-decoration: none;
    max-width: 640px;
}
.brand-name:hover { color: var(--gold); text-decoration: none; }
.brand-desc {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
    margin-top: 4px;
    max-width: 640px;
    display: none;
}

.nav-toggle {
    display: none;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--navy);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 1rem;
    cursor: pointer;
}

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

/* ---------- Layout ---------- */
.site-main { padding: 34px 0 48px; }

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

.breadcrumbs {
    font-size: 0.86rem;
    color: var(--muted);
    margin-bottom: 22px;
}
.breadcrumbs a { color: var(--teal); }
.breadcrumbs .sep { margin: 0 6px; color: var(--gold); }

/* ---------- Cards ---------- */
.card-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
.card {
    display: flex;
    flex-direction: row;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.card-thumb-wrap {
    flex: 0 0 270px;
    position: relative;
    overflow: hidden;
    background: var(--gold-soft);
}
.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-ph {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1c4a6e, #2c6f6a);
}
.card-thumb-ph svg { width: 56px; height: 56px; opacity: 0.85; }
.card-body {
    flex: 1;
    min-width: 0;
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
}
.card-title { margin: 0 0 8px; font-size: 1.3rem; }
.card-title a { color: var(--navy); }
.card-title a:hover { color: var(--gold); text-decoration: none; }
.card-meta {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 10px;
}
.card-excerpt { color: #34424d; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    align-self: flex-start;
    font-weight: 600;
    color: var(--teal);
}
.card-more:hover { color: var(--gold); }

/* ---------- Single / page content ---------- */
.entry {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px 34px;
    box-shadow: var(--shadow);
}
.entry-title { margin-bottom: 10px; }
.entry-meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 20px; }
.entry-content { line-height: 1.75; }
.entry-content img { border-radius: 8px; height: auto; }
.entry-content h2 { margin-top: 1.4em; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-thumb { margin-bottom: 22px; border-radius: 8px; overflow: hidden; }
.entry-thumb img { width: 100%; display: block; }

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
    border: 1px solid var(--line);
}
th, td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
th { background: var(--paper); color: var(--navy); }

blockquote {
    border-left: 4px solid var(--gold);
    margin: 1.4em 0;
    padding: 4px 18px;
    color: #3a4753;
    font-style: italic;
}

/* ---------- Sidebar ---------- */
.sidebar {
    min-width: 0;
}
.widget {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    color: var(--ink);
}
.widget-title, .widget h2, .widget h3 {
    font-size: 1.1rem;
    color: var(--navy);
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gold);
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.widget li:last-child { border-bottom: none; }
.widget a { color: var(--teal); }
.widget a:hover { color: var(--gold); }
.widget .post-date { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 3px; }

/* ---------- Front page sections ---------- */
.home-wrap { width: 85%; margin-inline: auto; }

.section { margin: 0 0 56px; }

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}
.split.reverse .split-media { order: 2; }
.split-media img { width: 100%; display: block; border-radius: var(--radius); box-shadow: var(--shadow); }
.split-text h2 { margin-bottom: 0.5em; }
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 8px;
}

.tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}
.tile {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 24px;
    box-shadow: var(--shadow);
}
.tile-ic {
    width: 46px; height: 46px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    background: var(--gold-soft);
    margin-bottom: 14px;
}
.tile-ic svg { width: 26px; height: 26px; }
.tile h3 { margin-bottom: 6px; }
.tile p { margin: 0; color: #44525d; font-size: 0.96rem; }

.steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
    counter-reset: step;
}
.step {
    background: var(--card);
    border: 1px solid var(--line);
    border-top: 4px solid var(--teal);
    border-radius: var(--radius);
    padding: 26px 24px;
    box-shadow: var(--shadow);
    position: relative;
}
.step-num {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font-family: Georgia, serif;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px;
}
.step h3 { margin-bottom: 6px; }
.step p { margin: 0; color: #44525d; font-size: 0.95rem; }

.faq { max-width: 100%; }
.faq-item {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 14px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.faq-item summary {
    cursor: pointer;
    padding: 18px 22px;
    font-weight: 600;
    color: var(--navy);
    font-family: Georgia, serif;
    list-style: none;
    position: relative;
    padding-right: 48px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 22px; top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    color: var(--gold);
}
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-body { padding: 0 22px 18px; color: #44525d; }
.faq-item .faq-body p { margin: 0; }

.home-posts-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
}
.home-posts-head a { font-weight: 600; }

.section-title { margin-bottom: 22px; }

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 34px 0 6px;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card);
    color: var(--navy);
    font-weight: 600;
    text-decoration: none;
}
.pagination a.page-numbers:hover {
    border-color: var(--gold);
    color: var(--gold);
}
.pagination .page-numbers.current {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}
.pagination .page-numbers.dots {
    border: none;
    background: none;
}

/* ---------- Search form ---------- */
.search-form {
    display: flex;
    gap: 8px;
}
.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 0.95rem;
}
.search-form button {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: var(--navy);
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}
.search-form button:hover { background: var(--gold); }

/* ---------- Comments ---------- */
.comments-area { margin-top: 32px; }
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-list li { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; margin-bottom: 14px; }
.comment-meta { font-size: 0.82rem; color: var(--muted); margin-bottom: 6px; }
.comment-respond { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-top: 22px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-top: 4px;
    font-family: inherit;
    font-size: 0.95rem;
}
.comment-form p { margin-bottom: 12px; }
.comment-form input[type="submit"] {
    padding: 11px 22px;
    border: none;
    border-radius: 8px;
    background: var(--navy);
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}
.comment-form input[type="submit"]:hover { background: var(--gold); }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 30px 0; }
.notfound .code { font-family: Georgia, serif; font-size: 5rem; color: var(--gold); line-height: 1; }
.notfound .search-form { max-width: 420px; margin: 22px auto 0; }

/* ---------- Footer ---------- */
.site-foot {
    background: var(--foot-bg);
    color: var(--foot-text);
    margin-top: 30px;
}
.foot-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 34px;
    padding: 46px 0 34px;
}
.foot-col { min-width: 0; }
.foot-col, .foot-col p, .foot-col li { color: var(--foot-text); }
.foot-col h2, .foot-col h3, .foot-col .widget-title {
    color: #fff;
    font-size: 1.05rem;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gold);
}
.foot-col .widget { background: none; border: none; box-shadow: none; padding: 0; margin: 0; color: var(--foot-text); }
.foot-col ul { list-style: none; margin: 0; padding: 0; }
.foot-col li { padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.foot-col li:last-child { border-bottom: none; }
.foot-col a { color: var(--foot-text); }
.foot-col a:hover { color: var(--gold); }
.foot-col .post-date { display: block; font-size: 0.78rem; color: var(--foot-muted); margin-top: 3px; }
.foot-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 18px 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--foot-muted);
}

/* ---------- Cookie banner ---------- */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 999;
    background: var(--navy-deep);
    color: #eef2f6;
    padding: 16px 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
}
.cookie-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: space-between;
}
.cookie-inner p { margin: 0; font-size: 0.9rem; flex: 1 1 320px; min-width: 0; }
.cookie-inner a { color: var(--gold-soft); }
.cookie-accept {
    flex: 0 0 auto;
    padding: 11px 26px;
    border: none;
    border-radius: 8px;
    background: var(--gold);
    color: #20140a;
    font-weight: 700;
    cursor: pointer;
}
.cookie-accept:hover { background: #d3a44c; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; gap: 30px; }
    .tiles, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .foot-cols { grid-template-columns: 1fr 1fr; }
    .split { grid-template-columns: 1fr; gap: 24px; }
    .split.reverse .split-media { order: 0; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 1.7rem; }
    h2 { font-size: 1.4rem; }
    .nav-toggle { display: block; }
    .main-nav {
        flex-basis: 100%;
        display: none;
    }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; gap: 2px; }
    .home-wrap, .layout-single .content-area { width: 100%; }

    .card { flex-direction: column; }
    .card-thumb-wrap {
        flex: none;
        width: 100%;
        height: 200px;
        position: static;
    }
    .card-thumb-wrap a { position: static; }
    .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
    .card-thumb-ph { position: static; height: 180px; }

    .tiles, .steps, .foot-cols { grid-template-columns: 1fr; }
    .entry, .comment-respond { padding: 22px 18px; }
}
