/*
Theme Name: dds_info-trip.ru
Author: Дмитрий Вересков
Description: Информационная тема для info-trip.ru — ресурса полного цикла подготовки к путешествию.
Version: 1.1
Text Domain: itr
*/

/* ===== Базовые переменные ===== */
:root {
    --ink: #16323a;
    --ink-soft: #41575e;
    --sea: #0d6e7a;
    --sea-deep: #094e57;
    --sand: #e8a24a;
    --sand-deep: #c97f24;
    --paper: #f6f3ec;
    --paper-warm: #efe8da;
    --line: #d9d2c4;
    --white: #ffffff;
    --shell: min(92%, 1180px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Segoe UI", "PT Sans", Tahoma, sans-serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.65;
    font-size: 17px;
    overflow-x: hidden;
}

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

a { color: var(--sea); text-decoration: none; }
a:hover { color: var(--sand-deep); }

h1, h2, h3, h4 {
    line-height: 1.25;
    color: var(--ink);
    margin: 0 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.1em; }

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

/* ===== Шапка ===== */
.site-head {
    background: var(--white);
    border-bottom: 1px solid var(--line);
}
.head-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}
.brand-logo { display: block; width: 52px; height: 52px; flex: 0 0 auto; }
.brand-text { min-width: 0; }
.brand-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
    display: block;
    line-height: 1.3;
}
.brand-name a { color: inherit; }
.brand-desc {
    font-size: 0.82rem;
    color: var(--ink-soft);
    display: block;
    margin-top: 2px;
}

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

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.main-nav a {
    display: block;
    padding: 9px 15px;
    border-radius: 8px;
    color: var(--ink);
    font-weight: 600;
    font-size: 0.96rem;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
    background: var(--paper-warm);
    color: var(--sea-deep);
}

/* ===== Хлебные крошки ===== */
.breadcrumbs {
    width: var(--shell);
    margin: 18px auto 0;
    font-size: 0.86rem;
    color: var(--ink-soft);
}
.breadcrumbs a { color: var(--sea); }
.breadcrumbs .sep { margin: 0 6px; color: var(--line); }

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

.layout-with-sidebar {
    width: var(--shell);
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 6%;
    align-items: start;
}
.layout-single {
    width: var(--shell);
    margin-inline: auto;
}
.front-wrap { width: 85%; margin-inline: auto; }

@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; gap: 36px; }
    .front-wrap { width: 92%; }
}

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

/* ===== Сайдбар / виджеты ===== */
.sidebar {
    min-width: 0;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 22px;
}
.widget { margin-bottom: 26px; }
.widget:last-child { margin-bottom: 0; }
.widget-title {
    font-size: 1.05rem;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--sand);
    color: var(--ink);
}
.sidebar .widget,
.sidebar .widget a,
.sidebar .widget li { color: var(--ink); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li {
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
}
.sidebar li:last-child { border-bottom: 0; }
.sidebar .post-date { display: block; font-size: 0.78rem; color: var(--ink-soft); }

/* ===== Карточки записей ===== */
.cards { display: grid; gap: 26px; }
.card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
}
.card-thumb-wrap { display: block; overflow: hidden; }
.card-thumb-wrap img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.card:hover .card-thumb-wrap img { transform: scale(1.04); }
.card-body {
    flex: 1;
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
}
.card-title { font-size: 1.2rem; margin: 0 0 8px; }
.card-meta { font-size: 0.8rem; color: var(--ink-soft); margin-bottom: 10px; }
.card-excerpt { color: var(--ink-soft); }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    align-self: flex-start;
    font-weight: 700;
    color: var(--sea);
    padding-top: 8px;
}

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

/* ===== Запись / страница ===== */
.entry {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 32px;
}
.entry-title { font-size: 1.9rem; }
.entry-meta { color: var(--ink-soft); font-size: 0.85rem; margin-bottom: 18px; }
.entry-content img { border-radius: 10px; }
.entry-thumb { border-radius: 12px; margin-bottom: 22px; width: 100%; object-fit: cover; display: block; }

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

/* ===== Пагинация ===== */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 34px;
    justify-content: center;
}
.pagination .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(--white);
    color: var(--ink);
    font-weight: 600;
}
.pagination a.page-numbers:hover {
    border-color: var(--sea);
    color: var(--sea);
}
.pagination .page-numbers.current {
    background: var(--sea);
    border-color: var(--sea);
    color: #fff;
}
.pagination .page-numbers.dots {
    border: 0;
    background: none;
}

/* ===== Главная: секции ===== */
.section { padding: 46px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-alt { background: var(--paper-warm); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 30px; }
.section-head p { color: var(--ink-soft); }

/* Слайдер */
.hero-slider {
    position: relative;
    width: 100%;
    border-radius: 0 0 18px 18px;
    overflow: hidden;
}
.slides { position: relative; }
.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
}
.slide.is-active { position: relative; opacity: 1; }
.slide img {
    width: 100%;
    height: 460px;
    object-fit: cover;
    display: block;
}
.slide-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 40px 7% 34px;
    background: linear-gradient(transparent, rgba(9, 41, 47, 0.82));
    color: #fff;
}
.slide-caption h2 { color: #fff; margin: 0 0 6px; font-size: 1.7rem; }
.slide-caption p { color: #f0ece2; margin: 0; max-width: 560px; }
.slider-dots {
    position: absolute;
    bottom: 16px; right: 7%;
    display: flex;
    gap: 9px;
}
.slider-dots button {
    width: 11px; height: 11px;
    border-radius: 50%;
    border: 0;
    background: rgba(255,255,255,0.55);
    cursor: pointer;
    padding: 0;
}
.slider-dots button.is-active { background: var(--sand); }
@media (max-width: 600px) {
    .slide img { height: 300px; }
    .slide-caption h2 { font-size: 1.3rem; }
}

/* Текст + иллюстрация */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 44px;
    align-items: center;
}
.split.reverse .split-media { order: -1; }
.split-media img { width: 100%; border-radius: 14px; display: block; object-fit: cover; }
@media (max-width: 760px) {
    .split { grid-template-columns: 1fr; gap: 26px; }
    .split.reverse .split-media { order: 0; }
}

/* Сетка преимуществ */
.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
}
.tile {
    min-width: 0;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 26px 24px;
}
.tile-ico { width: 46px; height: 46px; margin-bottom: 12px; }
.tile h3 { margin: 0 0 8px; }
.tile p { margin: 0; color: var(--ink-soft); }

/* Шаги */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    counter-reset: step;
}
.step {
    min-width: 0;
    position: relative;
    padding: 28px 24px 24px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
}
.step::before {
    counter-increment: step;
    content: counter(step);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--sea);
    color: #fff;
    font-weight: 700;
    margin-bottom: 12px;
}
.step h3 { margin: 0 0 6px; }
.step p { margin: 0; color: var(--ink-soft); }

/* Галерея */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}
.gallery figure { margin: 0; }
.gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}
.gallery figcaption {
    font-size: 0.82rem;
    color: var(--ink-soft);
    margin-top: 6px;
}

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 4px 20px;
    margin-bottom: 12px;
}
.faq summary {
    cursor: pointer;
    font-weight: 700;
    padding: 14px 0;
    list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--sand-deep); font-size: 1.3rem; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 14px; color: var(--ink-soft); }

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

/* CTA */
.cta {
    text-align: center;
    background: var(--sea-deep);
    color: #fff;
    border-radius: 18px;
    padding: 48px 30px;
}
.cta h2 { color: #fff; }
.cta p { color: #e3eef0; max-width: 600px; margin: 0 auto 22px; }
.btn {
    display: inline-block;
    background: var(--sand);
    color: #2a1c05;
    font-weight: 700;
    padding: 13px 28px;
    border-radius: 10px;
}
.btn:hover { background: var(--sand-deep); color: #fff; }

.screen-reader-text {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* ===== Форма поиска ===== */
.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(--sea);
    color: #fff;
    border: 0;
    padding: 0 20px;
    border-radius: 9px;
    cursor: pointer;
    font-weight: 600;
}

/* ===== Комментарии ===== */
.comments-area { margin-top: 36px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list li { margin-bottom: 18px; }
.comment-body {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px 18px;
}
.comment-author { font-weight: 700; }
.comment-meta { font-size: 0.8rem; color: var(--ink-soft); margin-bottom: 8px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 9px;
    font-family: inherit;
    margin-bottom: 12px;
}
.comment-form input[type="submit"] {
    background: var(--sea);
    color: #fff;
    border: 0;
    padding: 12px 26px;
    border-radius: 9px;
    cursor: pointer;
    font-weight: 700;
}

/* ===== Подвал ===== */
.site-foot {
    background: var(--ink);
    color: #d4ddde;
    margin-top: 40px;
}
.foot-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 36px;
    padding: 46px 0 32px;
}
.foot-col { min-width: 0; }
.foot-col .widget-title { color: #fff; border-bottom-color: var(--sand); }
.site-foot .widget,
.site-foot .widget p,
.site-foot .widget li,
.site-foot .widget a { color: #d4ddde; }
.site-foot .widget a:hover { color: var(--sand); }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.site-foot li:last-child { border-bottom: 0; }
.site-foot .post-date { display: block; font-size: 0.76rem; color: #9fb0b1; }
.foot-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 18px 0;
    font-size: 0.82rem;
    color: #9fb0b1;
    text-align: center;
}

/* ===== Cookie-баннер ===== */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 999;
    background: var(--ink);
    color: #eef3f3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 16px 22px;
    box-shadow: 0 -4px 18px rgba(0,0,0,0.18);
}
.cookie-banner p { margin: 0; font-size: 0.9rem; max-width: 760px; }
.cookie-banner button {
    background: var(--sand);
    color: #2a1c05;
    border: 0;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

/* ===== 404 ===== */
.notfound { text-align: center; padding: 40px 0; }
.notfound .err-code { font-size: 5rem; color: var(--sand); font-weight: 800; line-height: 1; }

/* ===== Адаптив навигации ===== */
@media (max-width: 760px) {
    .nav-toggle { display: block; }
    .main-nav {
        flex-basis: 100%;
        display: none;
    }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; gap: 2px; }
}
