/*
Theme Name: dds_saintsavin.com
Author: Алексей Невзоров
Description: Информационно-консультационный портал для частных инвесторов по легальному снижению налоговой нагрузки при владении и аренде недвижимости.
Version: 1.1
Text Domain: saintsavin
*/

/* ============ Переменные ============ */
:root{
    --navy:#122c4e;
    --navy-dark:#0d2038;
    --navy-soft:#1c3c63;
    --accent:#c39b45;
    --accent-dark:#a67f2f;
    --bg:#f6f4ee;
    --surface:#ffffff;
    --text:#20293a;
    --muted:#5b6675;
    --line:#e4ded1;
    --line-soft:#eee9dd;
    --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(--text);
    background:var(--bg);
    line-height:1.65;
    overflow-x:hidden;
}
h1,h2,h3,h4{
    font-family:Georgia,"Times New Roman",serif;
    line-height:1.25;
    color:var(--navy);
    margin:0 0 .6em;
    font-weight:600;
}
h1{font-size:2rem;}
h2{font-size:1.6rem;}
h3{font-size:1.25rem;}
p{margin:0 0 1em;}
a{color:var(--navy-soft);text-decoration:none;}
a:hover{color:var(--accent-dark);text-decoration:underline;}
img{max-width:100%;height:auto;}

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

.btn{
    display:inline-block;
    background:var(--accent);
    color:#fff;
    padding:.7rem 1.5rem;
    border-radius:6px;
    font-weight:600;
    letter-spacing:.01em;
    border:1px solid var(--accent-dark);
    transition:background .18s ease;
}
.btn:hover{background:var(--accent-dark);color:#fff;text-decoration:none;}

/* ============ Шапка ============ */
.site-header{
    background:var(--surface);
    border-bottom:1px solid var(--line);
}
.header-inner{
    display:flex;
    align-items:center;
    gap:1.5rem;
    padding:1rem 0;
    flex-wrap:wrap;
}
.brand{
    display:flex;
    align-items:center;
    gap:.9rem;
    min-width:0;
}
.brand-logo{display:block;height:52px;width:auto;}
.brand-svg{flex:0 0 auto;}
.brand-text{min-width:0;}
.brand-name{
    display:block;
    font-family:Georgia,serif;
    font-weight:600;
    color:var(--navy);
    font-size:1.02rem;
    line-height:1.3;
    max-width:44ch;
}
.brand-name:hover{text-decoration:none;color:var(--navy);}
.brand-desc{
    display:block;
    font-size:.78rem;
    color:var(--muted);
    margin-top:.15rem;
    max-width:60ch;
}
.header-nav{margin-left:auto;}
.menu-toggle{
    display:none;
    background:var(--navy);
    color:#fff;
    border:0;
    padding:.55rem .9rem;
    border-radius:6px;
    font-size:.95rem;
    cursor:pointer;
}
.main-menu{
    list-style:none;
    display:flex;
    gap:1.4rem;
    margin:0;
    padding:0;
}
.main-menu a{
    color:var(--text);
    font-weight:500;
    font-size:.98rem;
    padding:.3rem 0;
    border-bottom:2px solid transparent;
}
.main-menu a:hover{color:var(--navy);border-bottom-color:var(--accent);text-decoration:none;}
.main-menu .current-menu-item>a{border-bottom-color:var(--accent);color:var(--navy);}

/* ============ Основная сетка ============ */
.site-main{padding:2.4rem 0 3rem;}
.layout-with-sidebar{
    display:grid;
    grid-template-columns:minmax(0,67%) minmax(0,27%);
    gap:6%;
    align-items:start;
}
.layout-single .content-area{
    width:85%;
    margin-left:auto;
    margin-right:auto;
}
.content-area{min-width:0;}

/* ============ Хлебные крошки ============ */
.breadcrumbs{
    font-size:.85rem;
    color:var(--muted);
    margin:0 0 1.6rem;
    padding-bottom:.9rem;
    border-bottom:1px solid var(--line);
}
.breadcrumbs a{color:var(--navy-soft);}
.breadcrumbs .sep{margin:0 .4rem;color:var(--muted);}

/* ============ Сайдбар ============ */
.sidebar{min-width:0;}
.widget{
    background:var(--surface);
    border:1px solid var(--line);
    border-radius:8px;
    padding:1.4rem 1.4rem;
    margin-bottom:1.6rem;
}
.widget-title{
    font-size:1.05rem;
    color:var(--navy);
    margin:0 0 1rem;
    padding-bottom:.6rem;
    border-bottom:2px solid var(--accent);
}
.sidebar .widget,
.sidebar .widget a,
.sidebar .widget li{color:var(--text);}
.widget ul{list-style:none;margin:0;padding:0;}
.widget ul li{
    padding:.5rem 0;
    border-bottom:1px solid var(--line-soft);
}
.widget ul li:last-child{border-bottom:0;}
.widget ul li a{color:var(--navy-soft);}
.widget ul li a:hover{color:var(--accent-dark);}
.widget .post-date,
.widget .rss-date{
    display:block;
    font-size:.78rem;
    color:var(--muted);
}

/* ============ Карточки записей ============ */
.card{
    display:flex;
    flex-direction:column;
    background:var(--surface);
    border:1px solid var(--line);
    border-radius:8px;
    overflow:hidden;
    margin-bottom:1.6rem;
}
.card-thumb-wrap{
    display:block;
    overflow:hidden;
    background:var(--navy);
}
.card-thumb-wrap img{
    width:100%;
    height:auto;
    aspect-ratio:16/9;
    object-fit:cover;
    display:block;
    transition:transform .3s ease;
}
.card-thumb-wrap:hover img{transform:scale(1.03);}
.card-body{
    flex:1;
    padding:1.3rem 1.4rem 1.5rem;
    min-width:0;
}
.card-title{margin:0 0 .5rem;font-size:1.2rem;}
.card-title a{color:var(--navy);}
.card-title a:hover{color:var(--accent-dark);text-decoration:none;}
.card-meta{
    font-size:.8rem;
    color:var(--muted);
    margin-bottom:.7rem;
}
.card-meta a{color:var(--muted);}
.card-excerpt{color:var(--text);}
.card-excerpt p{margin:0 0 .5em;background:none;}
.card-more{
    display:inline-block;
    margin-top:.4rem;
    font-weight:600;
    color:var(--accent-dark);
}
.card-more:hover{text-decoration:underline;}

/* ============ Одиночная запись / страница ============ */
.entry-header{margin-bottom:1.4rem;}
.entry-title{font-size:2rem;margin-bottom:.4rem;}
.entry-meta{font-size:.85rem;color:var(--muted);}
.entry-thumb{
    margin:0 0 1.6rem;
    border-radius:8px;
    overflow:hidden;
}
.entry-thumb img{width:100%;display:block;}
.entry-content{font-size:1.03rem;}
.entry-content img{border-radius:6px;margin:1rem 0;}
.entry-content h2{margin-top:1.6rem;}
.entry-content h3{margin-top:1.3rem;}
.entry-content ul,.entry-content ol{padding-left:1.4rem;}
.entry-content blockquote{
    margin:1.4rem 0;
    padding:1rem 1.4rem;
    border-left:4px solid var(--accent);
    background:#fbf8f1;
    border-radius:0 6px 6px 0;
    color:var(--navy-dark);
    font-style:italic;
}
.entry-content table{
    width:100%;
    border-collapse:collapse;
    margin:1.4rem 0;
}
.entry-content table,
.entry-content th,
.entry-content td{border:1px solid var(--line);}
.entry-content th,
.entry-content td{padding:.6rem .8rem;text-align:left;}
.entry-content th{background:#f0ece1;color:var(--navy);}

/* ============ Пагинация ============ */
.pagination{
    display:flex;
    flex-wrap:wrap;
    gap:.5rem;
    margin:2rem 0 .5rem;
    align-items:center;
}
.pagination .page-numbers{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:2.4rem;
    height:2.4rem;
    padding:0 .7rem;
    border:1px solid var(--line);
    border-radius:6px;
    background:var(--surface);
    color:var(--navy-soft);
    font-weight:600;
    text-decoration:none;
}
.pagination a.page-numbers:hover{
    border-color:var(--accent);
    color:var(--accent-dark);
}
.pagination .page-numbers.current{
    background:var(--navy);
    border-color:var(--navy);
    color:#fff;
}
.pagination .page-numbers.dots{
    border:0;
    background:none;
}

/* ============ Комментарии ============ */
.comments-area{margin-top:2.4rem;}
.comments-title{margin-bottom:1.2rem;}
.comment-list{list-style:none;margin:0;padding:0;}
.comment-list li{
    background:var(--surface);
    border:1px solid var(--line);
    border-radius:8px;
    padding:1rem 1.2rem;
    margin-bottom:1rem;
}
.comment-list .children{list-style:none;margin:1rem 0 0;padding-left:1.4rem;}
.comment-author{font-weight:600;color:var(--navy);}
.comment-metadata{font-size:.78rem;color:var(--muted);margin-bottom:.5rem;}
.comment-respond{
    background:var(--surface);
    border:1px solid var(--line);
    border-radius:8px;
    padding:1.4rem;
    margin-top:1.4rem;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea{
    width:100%;
    padding:.6rem .8rem;
    border:1px solid var(--line);
    border-radius:6px;
    font-family:inherit;
    font-size:.95rem;
    margin-top:.3rem;
}
.comment-form p{margin-bottom:.9rem;}
.comment-form .submit,
.comment-form input[type="submit"]{
    background:var(--accent);
    color:#fff;
    border:1px solid var(--accent-dark);
    padding:.65rem 1.5rem;
    border-radius:6px;
    font-weight:600;
    cursor:pointer;
}

/* ============ Форма поиска ============ */
.search-form{display:flex;gap:.5rem;}
.search-form .search-field{
    flex:1;
    min-width:0;
    padding:.6rem .8rem;
    border:1px solid var(--line);
    border-radius:6px;
    font-size:.95rem;
}
.search-form .search-submit{
    background:var(--navy);
    color:#fff;
    border:0;
    padding:.6rem 1.2rem;
    border-radius:6px;
    cursor:pointer;
    font-weight:600;
}

/* ============ Главная ============ */
.home-wrap{width:85%;margin-inline:auto;}
.front-section{padding:2.8rem 0;}
.front-section + .front-section{border-top:1px solid var(--line-soft);}
.section-head{margin-bottom:1.6rem;max-width:52rem;}
.section-head .eyebrow{
    display:block;
    text-transform:uppercase;
    letter-spacing:.14em;
    font-size:.75rem;
    color:var(--accent-dark);
    font-weight:700;
    margin-bottom:.5rem;
}
.section-head h2{margin-bottom:.4rem;}
.section-head p{color:var(--muted);margin:0;}

/* Hero */
.hero{
    background:linear-gradient(135deg,var(--navy-dark),var(--navy-soft));
    color:#eef2f8;
    padding:3.4rem 2.4rem;
    border-radius:12px;
    margin-top:2.4rem;
    display:grid;
    grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);
    gap:2.4rem;
    align-items:center;
}
.hero h1{color:#fff;font-size:2.15rem;margin-bottom:.8rem;}
.hero p{color:#cdd7e6;font-size:1.05rem;}
.hero .btn{margin-top:.6rem;}
.hero-figure{justify-self:center;min-width:0;}
.hero-figure img{width:100%;max-width:420px;display:block;}

/* Текст + иллюстрация */
.split{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:2.6rem;
    align-items:center;
}
.split.reverse .split-media{order:-1;}
.split-media{min-width:0;justify-self:center;}
.split-media img{width:100%;max-width:460px;border-radius:10px;display:block;}
.split-body{min-width:0;}
.split-body ul{padding-left:1.2rem;color:var(--text);}
.split-body li{margin-bottom:.5rem;}

/* Сетка направлений */
.feature-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
    gap:1.4rem;
}
.feature-card{
    background:var(--surface);
    border:1px solid var(--line);
    border-radius:10px;
    padding:1.6rem 1.5rem;
    min-width:0;
}
.feature-card .fc-icon{
    width:46px;height:46px;
    display:block;
    margin-bottom:1rem;
}
.feature-card h3{font-size:1.12rem;margin-bottom:.5rem;}
.feature-card p{color:var(--muted);margin:0;font-size:.95rem;}

/* Пошаговый блок */
.steps{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:1.5rem;
    counter-reset:step;
}
.step{
    position:relative;
    background:var(--surface);
    border:1px solid var(--line);
    border-radius:10px;
    padding:1.6rem 1.4rem 1.4rem;
    min-width:0;
}
.step::before{
    counter-increment:step;
    content:counter(step);
    display:flex;
    align-items:center;
    justify-content:center;
    width:2.4rem;height:2.4rem;
    background:var(--navy);
    color:#fff;
    border-radius:50%;
    font-family:Georgia,serif;
    font-weight:700;
    margin-bottom:.9rem;
}
.step h3{font-size:1.08rem;margin-bottom:.4rem;}
.step p{color:var(--muted);margin:0;font-size:.94rem;}

/* Статистика */
.stats{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:1.4rem;
    background:var(--navy-dark);
    color:#eef2f8;
    padding:2.4rem 2.2rem;
    border-radius:12px;
}
.stat{text-align:center;min-width:0;}
.stat .num{
    display:block;
    font-family:Georgia,serif;
    font-size:2.3rem;
    color:var(--accent);
    font-weight:700;
    line-height:1.1;
}
.stat .lbl{display:block;color:#c2cddc;font-size:.92rem;margin-top:.4rem;}

/* FAQ */
.faq{max-width:52rem;}
.faq details{
    background:var(--surface);
    border:1px solid var(--line);
    border-radius:8px;
    padding:0 1.4rem;
    margin-bottom:.9rem;
}
.faq summary{
    cursor:pointer;
    list-style:none;
    padding:1.05rem 0;
    font-weight:600;
    color:var(--navy);
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:1rem;
}
.faq summary::-webkit-details-marker{display:none;}
.faq summary::after{
    content:"+";
    color:var(--accent-dark);
    font-size:1.4rem;
    line-height:1;
    flex:0 0 auto;
}
.faq details[open] summary::after{content:"–";}
.faq details p{
    margin:0 0 1.1rem;
    color:var(--muted);
}

/* Цитата / акцент */
.pull-quote{
    background:linear-gradient(135deg,var(--navy),var(--navy-soft));
    color:#eef2f8;
    padding:2.6rem 2.4rem;
    border-radius:12px;
    text-align:center;
}
.pull-quote blockquote{
    margin:0 auto;
    max-width:46rem;
    font-family:Georgia,serif;
    font-size:1.5rem;
    line-height:1.45;
    color:#fff;
}
.pull-quote .attribution{
    display:block;
    margin-top:1.2rem;
    color:var(--accent);
    font-size:.95rem;
    letter-spacing:.04em;
    font-style:normal;
}

/* CTA */
.cta{
    background:#fbf8f1;
    border:1px solid var(--line);
    border-radius:12px;
    padding:2.6rem 2.4rem;
    text-align:center;
}
.cta h2{margin-bottom:.6rem;}
.cta p{color:var(--muted);max-width:44rem;margin:0 auto 1.4rem;}

/* Последние записи на главной */
.latest-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:1.6rem;
}
.latest-grid .card{margin-bottom:0;}

/* ============ Подвал ============ */
.site-footer{
    background:var(--navy-dark);
    color:#c4cedd;
    padding:2.8rem 0 1.4rem;
    margin-top:2rem;
}
.footer-cols{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
    gap:2rem;
}
.footer-col{min-width:0;}
.site-footer .widget{
    background:transparent;
    border:0;
    padding:0;
    margin:0;
}
.site-footer .widget-title{
    color:#fff;
    border-bottom-color:var(--accent);
}
.site-footer .widget,
.site-footer .widget p,
.site-footer .widget li,
.site-footer .widget .post-date{color:#c4cedd;}
.site-footer .widget a{color:#e4d9bf;}
.site-footer .widget a:hover{color:#fff;}
.site-footer .widget ul li{border-bottom-color:rgba(255,255,255,.1);}
.site-copyright{
    margin-top:2.2rem;
    padding-top:1.3rem;
    border-top:1px solid rgba(255,255,255,.14);
    font-size:.85rem;
    color:#93a1b5;
    text-align:center;
}

/* ============ 404 ============ */
.error-404{text-align:center;padding:2rem 0;}
.error-404 .big{
    font-family:Georgia,serif;
    font-size:5rem;
    color:var(--accent);
    line-height:1;
    margin-bottom:.4rem;
}
.error-404 .search-form{max-width:420px;margin:1.6rem auto;}

/* ============ Cookie-баннер ============ */
.cookie-banner[hidden]{display:none !important;}
.cookie-banner{
    position:fixed;
    left:0;right:0;bottom:0;
    z-index:9999;
    background:var(--navy-dark);
    color:#e6ecf4;
    padding:1rem 0;
    box-shadow:0 -4px 20px rgba(0,0,0,.25);
}
.cookie-inner{
    display:flex;
    align-items:center;
    gap:1.4rem;
    flex-wrap:wrap;
}
.cookie-inner p{margin:0;font-size:.9rem;flex:1;min-width:220px;color:#d3dbe6;}
.cookie-inner a{color:var(--accent);}
.cookie-accept{
    background:var(--accent);
    color:#fff;
    border:1px solid var(--accent-dark);
    padding:.6rem 1.5rem;
    border-radius:6px;
    font-weight:600;
    cursor:pointer;
    white-space:nowrap;
}
.cookie-accept:hover{background:var(--accent-dark);}

/* ============ Адаптив ============ */
@media (max-width:960px){
    .layout-with-sidebar{grid-template-columns:1fr;gap:2.4rem;}
    .hero{grid-template-columns:1fr;padding:2.6rem 1.8rem;}
    .hero-figure{order:-1;}
    .split{grid-template-columns:1fr;gap:1.6rem;}
    .split.reverse .split-media{order:0;}
    .home-wrap{width:92%;}
    .layout-single .content-area{width:100%;}
}
@media (max-width:600px){
    h1{font-size:1.6rem;}
    .hero h1{font-size:1.75rem;}
    .header-nav{margin-left:0;width:100%;}
    .menu-toggle{display:block;margin-left:auto;}
    .main-menu{
        display:none;
        flex-direction:column;
        gap:0;
        width:100%;
        margin-top:.8rem;
        border-top:1px solid var(--line);
    }
    .main-menu.is-open{display:flex;}
    .main-menu li{border-bottom:1px solid var(--line-soft);}
    .main-menu a{display:block;padding:.7rem 0;}
    .hero,.stats,.pull-quote,.cta{padding-left:1.4rem;padding-right:1.4rem;}
    .front-section{padding:2rem 0;}
    .pull-quote blockquote{font-size:1.25rem;}
}
