/*
Theme Name: dds_virtualnie-turi.ru
Author: Игорь Рубцов
Description: Информационная тема для сайта о виртуальных турах, панорамной, интерьерной и воздушной съёмке.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: vtur
*/

/* ============ базовые переменные ============ */
:root{
    --ink:#14232e;
    --body:#33454f;
    --muted:#6b7d88;
    --line:#e2e9ee;
    --surface:#f2f6f8;
    --surface-2:#e9f1f3;
    --brand:#0f6e78;
    --brand-2:#1f8a94;
    --brand-dark:#0a4a52;
    --accent:#e08a3c;
    --accent-dark:#c4762a;
    --panel:#16283a;
    --panel-2:#1d3547;
    --white:#ffffff;
    --radius:12px;
    --radius-sm:8px;
    --shadow:0 6px 22px rgba(20,35,46,.10);
    --shadow-sm:0 2px 10px rgba(20,35,46,.08);
    --shell:min(92%, 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{scroll-behavior:smooth;}

body{
    margin:0;
    font-family:var(--sans);
    font-size:17px;
    line-height:1.7;
    color:var(--body);
    background:#fbfcfd;
    overflow-x:hidden;
    -webkit-font-smoothing:antialiased;
}

h1,h2,h3,h4{
    font-family:var(--serif);
    color:var(--ink);
    line-height:1.25;
    margin:0 0 .6em;
    font-weight:700;
}
h1{font-size:2.05rem;}
h2{font-size:1.6rem;}
h3{font-size:1.25rem;}

p{margin:0 0 1.05em;}

a{color:var(--brand);text-decoration:none;}
a:hover{color:var(--brand-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:.72em 1.5em;
    border-radius:var(--radius-sm);
    font-weight:600;
    font-family:var(--sans);
    transition:background .18s ease,transform .18s ease;
    border:none;
    cursor:pointer;
}
.btn:hover{background:var(--accent-dark);color:#fff;text-decoration:none;transform:translateY(-1px);}
.btn-ghost{
    background:transparent;
    color:var(--brand);
    border:2px solid var(--brand);
}
.btn-ghost:hover{background:var(--brand);color:#fff;}

/* ============ шапка ============ */
.site-header{
    background:#fff;
    border-bottom:1px solid var(--line);
    box-shadow:var(--shadow-sm);
}
.header-inner{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:1.5rem;
    padding:1.05rem 0;
    flex-wrap:wrap;
}
.brand{
    display:flex;
    align-items:center;
    gap:.85rem;
    min-width:0;
}
.brand-logo{display:block;width:56px;height:56px;flex:0 0 auto;}
.brand-text{min-width:0;}
.brand-name{
    font-family:var(--serif);
    font-size:1.18rem;
    font-weight:700;
    color:var(--ink);
    line-height:1.2;
    display:block;
}
.brand-name a{color:var(--ink);}
.brand-name a:hover{color:var(--brand);text-decoration:none;}
.brand-desc{
    font-size:.82rem;
    color:var(--muted);
    line-height:1.35;
    margin-top:.2rem;
    max-width:46ch;
}

.main-nav ul{
    list-style:none;
    display:flex;
    gap:1.35rem;
    margin:0;padding:0;
    flex-wrap:wrap;
}
.main-nav a{
    color:var(--ink);
    font-weight:600;
    font-size:.97rem;
    padding:.3rem 0;
    border-bottom:2px solid transparent;
    transition:color .15s,border-color .15s;
}
.main-nav a:hover{color:var(--brand);border-color:var(--brand-2);text-decoration:none;}
.current-menu-item>a{color:var(--brand);border-color:var(--accent);}

.nav-toggle{
    display:none;
    background:var(--panel);
    color:#fff;
    border:none;
    border-radius:var(--radius-sm);
    padding:.5rem .8rem;
    font-size:1rem;
    cursor:pointer;
}

/* ============ хлебные крошки ============ */
.breadcrumbs{
    font-size:.86rem;
    color:var(--muted);
    padding:.9rem 0;
}
.breadcrumbs a{color:var(--brand);}
.breadcrumbs .sep{margin:0 .35rem;color:#aab8c0;}
.breadcrumbs span{color:var(--muted);}

/* ============ раскладки ============ */
.site-main{padding:1.4rem 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:85%;margin-inline:auto;}
@media(max-width:960px){
    .layout-with-sidebar{grid-template-columns:1fr;gap:2rem;}
    .layout-single .content-area{width:100%;}
}
.content-area{min-width:0;}

/* ============ сайдбар ============ */
.sidebar{min-width:0;}
.widget{
    background:#fff;
    border:1px solid var(--line);
    border-radius:var(--radius);
    padding:1.3rem 1.35rem;
    margin-bottom:1.5rem;
    box-shadow:var(--shadow-sm);
}
.widget-title{
    font-family:var(--serif);
    font-size:1.12rem;
    color:var(--ink);
    margin:0 0 .9rem;
    padding-bottom:.55rem;
    border-bottom:2px solid var(--surface-2);
}
.widget ul{list-style:none;margin:0;padding:0;}
.widget li{
    padding:.5rem 0;
    border-bottom:1px solid var(--surface-2);
    line-height:1.45;
}
.widget li:last-child{border-bottom:none;}
.widget a{color:var(--brand);}
.widget a:hover{color:var(--brand-dark);}
.widget .post-date{display:block;font-size:.78rem;color:var(--muted);margin-top:.15rem;}

/* ============ карточки записей ============ */
.card{
    display:flex;
    flex-direction:column;
    background:#fff;
    border:1px solid var(--line);
    border-radius:var(--radius);
    overflow:hidden;
    box-shadow:var(--shadow-sm);
    margin-bottom:1.6rem;
    transition:box-shadow .2s ease,transform .2s ease;
}
.card:hover{box-shadow:var(--shadow);transform:translateY(-2px);}

.card-thumb-wrap{
    display:block;
    overflow:hidden;
    background:var(--surface-2);
}
.card-thumb-wrap img{
    width:100%;
    height:auto;
    aspect-ratio:16/9;
    object-fit:cover;
    display:block;
    transition:transform .4s ease;
}
.card:hover .card-thumb-wrap img{transform:scale(1.04);}

.card-body{
    flex:1;
    padding:1.25rem 1.35rem 1.4rem;
    display:flex;
    flex-direction:column;
}
.card-title{font-size:1.28rem;margin:0 0 .5rem;}
.card-title a{color:var(--ink);}
.card-title a:hover{color:var(--brand);text-decoration:none;}
.card-meta{
    font-size:.8rem;
    color:var(--muted);
    margin-bottom:.7rem;
    display:flex;
    gap:1rem;
    flex-wrap:wrap;
}
.card-meta a{color:var(--muted);}
.card-excerpt{color:var(--body);font-size:.98rem;}
.card-excerpt p{margin:0 0 .5em;background:none;}
.card-more{margin-top:auto;padding-top:.6rem;}
.card-more a{
    font-weight:600;
    color:var(--brand);
    font-size:.92rem;
}
.card-more a::after{content:" →";}

/* горизонтальные карточки в ленте блога */
.post-list .card{flex-direction:row;}
.post-list .card-thumb-wrap{
    flex:0 0 300px;
    position:relative;
    overflow:hidden;
}
.post-list .card-thumb-wrap a{
    display:block;
    position:absolute;
    top:0;left:0;right:0;bottom:0;
}
.post-list .card-thumb-wrap img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
    aspect-ratio:auto;
}
@media(max-width:600px){
    .post-list .card{flex-direction:column;}
    .post-list .card-thumb-wrap{
        flex:none;
        width:100%;
        position:static;
    }
    .post-list .card-thumb-wrap a{position:static;}
    .post-list .card-thumb-wrap img{
        width:100%;
        height:auto;
        aspect-ratio:16/9;
    }
}

/* ============ одиночная запись / страница ============ */
.entry{
    background:#fff;
    border:1px solid var(--line);
    border-radius:var(--radius);
    padding:2rem 2.1rem 2.3rem;
    box-shadow:var(--shadow-sm);
}
.entry-header{margin-bottom:1.3rem;}
.entry-title{font-size:2rem;margin-bottom:.5rem;}
.entry-meta{font-size:.85rem;color:var(--muted);display:flex;gap:1.1rem;flex-wrap:wrap;}
.entry-meta a{color:var(--muted);}
.entry-thumb{margin:0 0 1.5rem;border-radius:var(--radius-sm);overflow:hidden;}
.entry-thumb img{width:100%;display:block;}
.entry-content{font-size:1.03rem;}
.entry-content h2{margin-top:1.8rem;}
.entry-content h3{margin-top:1.4rem;}
.entry-content img{border-radius:var(--radius-sm);margin:1rem 0;}
.entry-content ul,.entry-content ol{padding-left:1.4rem;margin-bottom:1.1em;}
.entry-content li{margin-bottom:.4em;}
.entry-content blockquote{
    margin:1.4rem 0;
    padding:1.1rem 1.4rem;
    background:var(--surface);
    border-left:4px solid var(--brand-2);
    border-radius:0 var(--radius-sm) var(--radius-sm) 0;
    color:var(--ink);
    font-style:italic;
}
.entry-content blockquote p:last-child{margin-bottom:0;}
.entry-tags{margin-top:1.6rem;padding-top:1.1rem;border-top:1px solid var(--line);font-size:.86rem;}
.entry-tags a{
    display:inline-block;
    background:var(--surface);
    color:var(--brand);
    padding:.25rem .7rem;
    border-radius:20px;
    margin:.2rem .3rem .2rem 0;
}
.entry-tags a:hover{background:var(--brand);color:#fff;text-decoration:none;}

/* таблицы в контенте */
.entry-content table{
    width:100%;
    border-collapse:collapse;
    margin:1.3rem 0;
    font-size:.95rem;
}
.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:var(--surface);color:var(--ink);}

/* ============ пагинация ============ */
.pagination{
    display:flex;
    flex-wrap:wrap;
    gap:.4rem;
    margin:2rem 0 .5rem;
    justify-content:center;
}
.pagination .page-numbers{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:42px;
    height:42px;
    padding:0 .7rem;
    border:1px solid var(--line);
    border-radius:var(--radius-sm);
    background:#fff;
    color:var(--ink);
    font-weight:600;
    font-size:.95rem;
    transition:background .15s,color .15s,border-color .15s;
}
.pagination a.page-numbers:hover{
    background:var(--brand);
    color:#fff;
    border-color:var(--brand);
    text-decoration:none;
}
.pagination .page-numbers.current{
    background:var(--panel);
    color:#fff;
    border-color:var(--panel);
}
.pagination .page-numbers.dots{
    border-color:transparent;
    background:transparent;
}

/* ============ комментарии ============ */
.comments-area{
    margin-top:2rem;
    background:#fff;
    border:1px solid var(--line);
    border-radius:var(--radius);
    padding:1.8rem 2.1rem;
    box-shadow:var(--shadow-sm);
}
.comments-title,.comment-reply-title{
    font-family:var(--serif);
    font-size:1.35rem;
    margin-bottom:1.2rem;
}
.comment-list{list-style:none;margin:0 0 1.5rem;padding:0;}
.comment-list li{margin-bottom:1.2rem;}
.comment-body{
    background:var(--surface);
    border-radius:var(--radius-sm);
    padding:1rem 1.2rem;
}
.comment-author{font-weight:600;color:var(--ink);}
.comment-meta{font-size:.78rem;color:var(--muted);margin-bottom:.5rem;}
.comment-list .children{list-style:none;margin:1rem 0 0 1.6rem;padding:0;}
.comment-form label{display:block;font-weight:600;font-size:.9rem;margin:.6rem 0 .3rem;color:var(--ink);}
.comment-form input[type=text],
.comment-form input[type=email],
.comment-form input[type=url],
.comment-form textarea{
    width:100%;
    padding:.65rem .8rem;
    border:1px solid var(--line);
    border-radius:var(--radius-sm);
    font-family:inherit;
    font-size:.97rem;
    background:#fff;
    color:var(--body);
}
.comment-form textarea{min-height:130px;resize:vertical;}
.comment-form .form-submit{margin-top:1rem;}

/* ============ форма поиска ============ */
.search-form{display:flex;gap:.5rem;}
.search-form .search-field{
    flex:1;
    min-width:0;
    padding:.65rem .85rem;
    border:1px solid var(--line);
    border-radius:var(--radius-sm);
    font-size:.97rem;
    font-family:inherit;
    background:#fff;
    color:var(--body);
}
.search-form .search-submit{
    background:var(--brand);
    color:#fff;
    border:none;
    border-radius:var(--radius-sm);
    padding:.65rem 1.1rem;
    font-weight:600;
    cursor:pointer;
}
.search-form .search-submit:hover{background:var(--brand-dark);}
.widget .search-form{margin-top:.2rem;}

/* ============ главная — секции ============ */
.front-section{padding:3rem 0;}
.front-section.alt{background:var(--surface);}
.section-head{max-width:720px;margin-bottom:1.8rem;}
.section-head.center{margin-inline:auto;text-align:center;}
.section-kicker{
    text-transform:uppercase;
    letter-spacing:.14em;
    font-size:.76rem;
    font-weight:700;
    color:var(--brand-2);
    font-family:var(--sans);
    margin-bottom:.5rem;
}
.section-title{font-size:1.85rem;margin-bottom:.5rem;}
.section-sub{color:var(--muted);font-size:1.02rem;margin:0;}

/* hero-слайдер */
.hero{padding:0;background:var(--panel);}
.slider{
    position:relative;
    overflow:hidden;
    min-height:clamp(340px,46vw,560px);
}
.slide{
    position:absolute;
    inset:0;
    opacity:0;
    transition:opacity .8s ease;
    pointer-events:none;
}
.slide.is-active{opacity:1;pointer-events:auto;}
.slide img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}
.slide-caption{
    position:absolute;
    left:0;right:0;bottom:0;
    padding:2.4rem 0 2.6rem;
    background:linear-gradient(to top,rgba(11,20,28,.86),rgba(11,20,28,0));
}
.slide-caption .shell{color:#fff;}
.slide-caption h2{color:#fff;font-size:clamp(1.5rem,3.4vw,2.4rem);margin-bottom:.4rem;max-width:22ch;}
.slide-caption p{color:#dbe6ea;max-width:52ch;margin-bottom:1.1rem;}
.slider-dots{
    position:absolute;
    bottom:1.1rem;
    left:50%;
    transform:translateX(-50%);
    display:flex;
    gap:.5rem;
    z-index:3;
}
.slider-dots button{
    width:11px;height:11px;
    border-radius:50%;
    border:2px solid #fff;
    background:transparent;
    padding:0;cursor:pointer;
    transition:background .2s;
}
.slider-dots button.is-active{background:#fff;}
.slider-arrow{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    z-index:3;
    width:46px;height:46px;
    border-radius:50%;
    border:none;
    background:rgba(11,20,28,.4);
    color:#fff;
    font-size:1.5rem;
    cursor:pointer;
    display:flex;align-items:center;justify-content:center;
    transition:background .2s;
}
.slider-arrow:hover{background:rgba(11,20,28,.7);}
.slider-arrow.prev{left:1rem;}
.slider-arrow.next{right:1rem;}
@media(max-width:600px){
    .slider-arrow{display:none;}
    .slide-caption{padding:1.6rem 0 2.2rem;}
}

/* текст + иллюстрация */
.media-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:2.6rem;
    align-items:center;
}
.media-row.reverse .media-text{order:2;}
.media-row .media-img img{
    width:100%;
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    display:block;
}
.media-text h2{font-size:1.7rem;}
.media-text ul{padding-left:0;list-style:none;margin:1rem 0 0;}
.media-text ul li{
    position:relative;
    padding-left:1.7rem;
    margin-bottom:.6rem;
}
.media-text ul li::before{
    content:"";
    position:absolute;
    left:0;top:.55em;
    width:.7rem;height:.7rem;
    background:var(--accent);
    border-radius:2px;
    transform:rotate(45deg);
}
@media(max-width:768px){
    .media-row{grid-template-columns:1fr;gap:1.6rem;}
    .media-row.reverse .media-text{order:0;}
}

/* сетка последних записей на главной */
.posts-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:1.6rem;
}
.posts-grid .card{margin-bottom:0;flex-direction:column;}
.posts-grid .card-thumb-wrap{position:static;}
.posts-grid .card-thumb-wrap img{aspect-ratio:16/9;height:auto;}
@media(max-width:960px){.posts-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:600px){.posts-grid{grid-template-columns:1fr;}}
.section-cta{text-align:center;margin-top:1.8rem;}

/* шаги */
.steps{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:1.4rem;
    counter-reset:step;
}
.step{
    background:#fff;
    border:1px solid var(--line);
    border-radius:var(--radius);
    padding:1.5rem 1.35rem;
    box-shadow:var(--shadow-sm);
    position:relative;
}
.step-num{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:44px;height:44px;
    border-radius:50%;
    background:var(--brand);
    color:#fff;
    font-family:var(--serif);
    font-weight:700;
    font-size:1.2rem;
    margin-bottom:.9rem;
}
.step h3{font-size:1.1rem;margin-bottom:.4rem;}
.step p{font-size:.94rem;color:var(--body);margin:0;}
@media(max-width:960px){.steps{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:520px){.steps{grid-template-columns:1fr;}}

/* галерея + cta внутри блока */
.gallery-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:1rem;
}
.gallery-grid figure{
    margin:0;
    border-radius:var(--radius-sm);
    overflow:hidden;
    box-shadow:var(--shadow-sm);
    aspect-ratio:4/3;
}
.gallery-grid img{
    width:100%;height:100%;
    object-fit:cover;
    display:block;
    transition:transform .4s ease;
}
.gallery-grid figure:hover img{transform:scale(1.05);}
@media(max-width:768px){.gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:460px){.gallery-grid{grid-template-columns:1fr;}}

.inline-cta{
    margin-top:2rem;
    background:var(--panel);
    color:#fff;
    border-radius:var(--radius);
    padding:2rem 2.2rem;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:1.5rem;
    flex-wrap:wrap;
}
.inline-cta h3{color:#fff;margin:0 0 .3rem;font-size:1.4rem;}
.inline-cta p{color:#c8d6dc;margin:0;max-width:52ch;}
.inline-cta .cta-text{min-width:0;}
@media(max-width:600px){.inline-cta{padding:1.6rem 1.4rem;}}

/* ============ подвал ============ */
.site-footer{
    background:var(--panel);
    color:#c3d1d8;
    margin-top:2rem;
}
.footer-cols{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:2.2rem;
    padding:3rem 0 2.2rem;
}
.footer-cols .widget{
    background:transparent;
    border:none;
    box-shadow:none;
    padding:0;
    margin:0;
    color:#c3d1d8;
}
.footer-cols .widget-title{
    color:#fff;
    border-bottom:1px solid rgba(255,255,255,.16);
}
.footer-cols .widget p,
.footer-cols .widget li{color:#b7c6cd;border-bottom-color:rgba(255,255,255,.1);}
.footer-cols .widget a{color:#8fd0d6;}
.footer-cols .widget a:hover{color:#fff;}
.footer-cols .widget .post-date{color:#8598a0;}
.footer-bottom{
    border-top:1px solid rgba(255,255,255,.12);
    padding:1.2rem 0;
    font-size:.85rem;
    color:#93a5ad;
    text-align:center;
}
@media(max-width:768px){.footer-cols{grid-template-columns:1fr;gap:1.8rem;}}

/* ============ cookie-баннер ============ */
.cookie-banner[hidden]{display:none !important;}
.cookie-banner{
    position:fixed;
    left:0;right:0;bottom:0;
    z-index:1000;
    background:var(--ink);
    color:#e6edf1;
    box-shadow:0 -4px 20px rgba(0,0,0,.25);
}
.cookie-inner{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:1.3rem;
    padding:1rem 0;
    flex-wrap:wrap;
}
.cookie-inner p{margin:0;font-size:.9rem;color:#dbe4e9;flex:1;min-width:240px;}
.cookie-inner a{color:#8fd0d6;}
.cookie-accept{
    background:var(--accent);
    color:#fff;
    border:none;
    border-radius:var(--radius-sm);
    padding:.6rem 1.4rem;
    font-weight:600;
    cursor:pointer;
    flex:0 0 auto;
}
.cookie-accept:hover{background:var(--accent-dark);}

/* ============ 404 ============ */
.error-404{
    text-align:center;
    background:#fff;
    border:1px solid var(--line);
    border-radius:var(--radius);
    padding:3rem 2rem;
    box-shadow:var(--shadow-sm);
}
.error-404 .big{
    font-family:var(--serif);
    font-size:4.5rem;
    color:var(--brand-2);
    line-height:1;
    margin-bottom:.4rem;
}
.error-404 .search-form{max-width:420px;margin:1.6rem auto 0;}

/* ============ прочее ============ */
.page-title{
    font-size:1.9rem;
    margin-bottom:1.4rem;
}
.archive-desc{color:var(--muted);margin-bottom:1.4rem;}
.no-posts{
    background:#fff;
    border:1px solid var(--line);
    border-radius:var(--radius);
    padding:2rem;
    text-align:center;
    color:var(--muted);
}
.screen-reader-text{
    position:absolute !important;
    width:1px;height:1px;
    overflow:hidden;
    clip:rect(1px,1px,1px,1px);
    white-space:nowrap;
}

@media(max-width:768px){
    body{font-size:16px;}
    h1{font-size:1.75rem;}
    .nav-toggle{display:block;}
    .main-nav{flex-basis:100%;}
    .main-nav ul{
        display:none;
        flex-direction:column;
        gap:0;
        margin-top:.8rem;
        border-top:1px solid var(--line);
    }
    .main-nav.is-open ul{display:flex;}
    .main-nav li{border-bottom:1px solid var(--surface-2);}
    .main-nav a{display:block;padding:.7rem 0;}
    .entry{padding:1.5rem 1.3rem;}
    .front-section{padding:2.2rem 0;}
    .section-title{font-size:1.55rem;}
}
