/*
Theme Name: dds_forno-rosso.ru
Author: Алексей Громов
Description: Издание о кухне на стыке кулинарии и технологий — обзоры умной техники, рецепты с применением ИИ и истории пользователей.
Version: 1.1
Text Domain: frosso
*/

/* ===== Базовая типографика и сброс ===== */
:root {
    --col-bg: #fbf6ee;
    --col-ink: #2f2620;
    --col-muted: #80756a;
    --col-line: #e7ddcf;
    --col-card: #ffffff;
    --col-red: #c8472e;
    --col-red-dk: #a93720;
    --col-teal: #1f8a70;
    --col-dark: #2a2018;
    --rad: 14px;
    --shadow: 0 6px 22px rgba(60, 40, 25, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--col-bg);
    color: var(--col-ink);
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    overflow-x: hidden;
}

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

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

h1, h2, h3, h4 {
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.25;
    color: var(--col-dark);
    margin: 0 0 0.5em;
}
h1 { font-size: 2.1rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

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

/* ===== Шапка ===== */
.site-head {
    background: var(--col-card);
    border-bottom: 3px solid var(--col-red);
}
.site-head .shell {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    text-decoration: none;
}
.brand-logo, .brand-mark { flex: 0 0 auto; display: block; }
.brand-mark { width: 52px; height: 52px; }
.brand-text { min-width: 0; }
.brand-name {
    font-family: Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--col-dark);
    line-height: 1.2;
    display: block;
}
.brand-desc {
    font-size: 0.82rem;
    color: var(--col-muted);
    line-height: 1.35;
    display: block;
    margin-top: 2px;
}
.head-nav { margin-left: auto; min-width: 0; }
.head-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
}
.head-nav a {
    color: var(--col-dark);
    font-weight: 600;
    padding: 6px 4px;
    border-bottom: 2px solid transparent;
}
.head-nav a:hover { color: var(--col-red); border-bottom-color: var(--col-red); text-decoration: none; }
.head-nav .current-menu-item > a { color: var(--col-red); border-bottom-color: var(--col-red); }

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

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67%) minmax(0, 27%);
    gap: 6%;
    align-items: start;
}
.layout-single .content-area,
.layout-wide .content-area { width: 85%; margin-left: auto; margin-right: auto; }
.layout-single, .layout-wide { display: block; }
.content-area { min-width: 0; }

.sidebar { min-width: 0; }

/* ===== Хлебные крошки ===== */
.breadcrumbs {
    font-size: 0.88rem;
    color: var(--col-muted);
    margin: 0 0 22px;
}
.breadcrumbs a { color: var(--col-muted); }
.breadcrumbs a:hover { color: var(--col-red); }
.breadcrumbs .sep { margin: 0 6px; color: var(--col-line); }
.breadcrumbs span:last-child { color: var(--col-ink); }

/* ===== Карточки записей ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--col-card);
    border: 1px solid var(--col-line);
    border-radius: var(--rad);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.card-thumb { display: block; overflow: hidden; }
.card-thumb img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.card-thumb:hover img { transform: scale(1.04); }
.card-body {
    flex: 1;
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
}
.card-title { font-size: 1.25rem; margin: 0 0 8px; }
.card-title a { color: var(--col-dark); }
.card-title a:hover { color: var(--col-red); text-decoration: none; }
.card-meta { font-size: 0.8rem; color: var(--col-muted); margin-bottom: 10px; }
.card-excerpt { color: var(--col-ink); }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    align-self: flex-start;
    color: var(--col-red);
    font-weight: 600;
    padding-top: 10px;
}

/* ===== Одиночная запись / страница ===== */
.entry {
    background: var(--col-card);
    border: 1px solid var(--col-line);
    border-radius: var(--rad);
    padding: 30px 34px;
    box-shadow: var(--shadow);
}
.entry-title { margin-top: 0; }
.entry-meta { font-size: 0.85rem; color: var(--col-muted); margin-bottom: 18px; }
.entry-thumb { border-radius: 10px; overflow: hidden; margin-bottom: 22px; }
.entry-thumb img { width: 100%; display: block; object-fit: cover; }
.entry-content img { border-radius: 10px; display: block; }
.entry-content h2, .entry-content h3 { margin-top: 1.4em; }

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

/* ===== Сайдбар / виджеты ===== */
.sidebar .widget {
    background: var(--col-card);
    border: 1px solid var(--col-line);
    border-radius: var(--rad);
    padding: 20px 22px;
    margin-bottom: 24px;
    color: var(--col-ink);
}
.sidebar .widget-title {
    font-size: 1.1rem;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--col-red);
    color: var(--col-dark);
}
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li { padding: 7px 0; border-bottom: 1px solid var(--col-line); }
.sidebar .widget li:last-child { border-bottom: none; }
.sidebar .widget a { color: var(--col-ink); }
.sidebar .widget a:hover { color: var(--col-red); }
.sidebar .widget .post-date { color: var(--col-muted); }

/* ===== Подвал ===== */
.site-foot {
    background: var(--col-dark);
    color: #e9e0d4;
    padding: 44px 0 26px;
    margin-top: 40px;
}
.foot-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
}
.site-foot .widget-title {
    color: #ffffff;
    font-size: 1.05rem;
    margin: 0 0 14px;
}
.site-foot .widget { color: #d8cdbd; }
.site-foot .widget ul { list-style: none; margin: 0; padding: 0; }
.site-foot .widget li { padding: 5px 0; }
.site-foot .widget a { color: #f0c9bd; }
.site-foot .widget a:hover { color: #ffffff; }
.site-foot p { color: #d8cdbd; }
.foot-copy {
    border-top: 1px solid rgba(255,255,255,0.15);
    margin-top: 34px;
    padding-top: 18px;
    font-size: 0.85rem;
    color: #b4a795;
    text-align: center;
}

/* ===== Главная — секции ===== */
.section { padding: 46px 0; }
.section + .section { border-top: 1px solid var(--col-line); }
.section-head { max-width: 760px; margin-bottom: 28px; }
.section-head .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--col-red);
    display: block;
    margin-bottom: 8px;
}

/* блок текст + иллюстрация */
.split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 44px;
    align-items: center;
}
.split.reverse .split-media { order: -1; }
.split-media img { width: 100%; display: block; border-radius: var(--rad); box-shadow: var(--shadow); }

/* сетка рубрик */
.rubrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}
.rubric {
    background: var(--col-card);
    border: 1px solid var(--col-line);
    border-radius: var(--rad);
    padding: 24px 24px 26px;
    box-shadow: var(--shadow);
}
.rubric .ico { width: 46px; height: 46px; display: block; margin-bottom: 14px; }
.rubric h3 { margin: 0 0 8px; }
.rubric p { margin: 0; color: var(--col-muted); font-size: 0.95rem; }

/* пошаговый блок */
.steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    counter-reset: step;
}
.step {
    background: var(--col-card);
    border: 1px solid var(--col-line);
    border-radius: var(--rad);
    padding: 26px 24px;
    position: relative;
}
.step::before {
    counter-increment: step;
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--col-red);
    color: #fff;
    font-weight: 700;
    font-family: Georgia, serif;
    margin-bottom: 14px;
}
.step h3 { margin: 0 0 8px; font-size: 1.15rem; }
.step p { margin: 0; color: var(--col-muted); font-size: 0.95rem; }

/* FAQ-аккордеон */
.faq { max-width: 820px; }
.faq details {
    background: var(--col-card);
    border: 1px solid var(--col-line);
    border-radius: 12px;
    margin-bottom: 14px;
    padding: 4px 22px;
}
.faq summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 1.08rem;
    color: var(--col-dark);
    padding: 16px 0;
    list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--col-red); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details > p { margin: 0 0 18px; color: var(--col-ink); }

/* последние записи на главной */
.front-latest { background: #f4ece0; }

/* ===== Пагинация (type => plain, стили на .page-numbers) ===== */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 34px 0 4px;
    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(--col-line);
    border-radius: 9px;
    background: var(--col-card);
    color: var(--col-dark);
    font-weight: 600;
    text-decoration: none;
}
.pagination a.page-numbers:hover { border-color: var(--col-red); color: var(--col-red); }
.pagination .page-numbers.current {
    background: var(--col-red);
    border-color: var(--col-red);
    color: #fff;
}
.pagination .page-numbers.dots { border: none; background: none; }

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

/* ===== Контакты (статичные) ===== */
.contact-static { margin: 18px 0; }
.contact-static a { font-weight: 600; }
.social-links { display: flex; gap: 14px; margin-top: 10px; list-style: none; padding: 0; }

/* ===== 404 ===== */
.notfound { text-align: center; padding: 30px 0; }
.notfound .big { font-size: 5rem; font-family: Georgia, serif; color: var(--col-red); margin: 0; }
.notfound .search-form { max-width: 420px; margin: 24px auto; }

/* ===== Cookie-баннер ===== */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 9999;
    background: var(--col-dark);
    color: #ece3d6;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: center;
    box-shadow: 0 -4px 18px rgba(0,0,0,0.2);
}
.cookie-banner p { margin: 0; font-size: 0.9rem; max-width: 760px; }
.cookie-banner a { color: #f0c9bd; }
.cookie-banner button {
    border: none;
    background: var(--col-red);
    color: #fff;
    padding: 10px 22px;
    border-radius: 9px;
    font-weight: 600;
    cursor: pointer;
    flex: 0 0 auto;
}
.cookie-banner button:hover { background: var(--col-red-dk); }

/* ===== CTA ===== */
.cta {
    background: var(--col-red);
    color: #fff;
    border-radius: var(--rad);
    padding: 40px 36px;
    text-align: center;
}
.cta h2 { color: #fff; }
.cta p { color: #ffe9e2; max-width: 620px; margin-left: auto; margin-right: auto; }
.cta .btn {
    display: inline-block;
    margin-top: 12px;
    background: #fff;
    color: var(--col-red);
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 9px;
}
.cta .btn:hover { background: var(--col-dark); color: #fff; text-decoration: none; }

/* ===== Комментарии ===== */
.comments-area { margin-top: 32px; }
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-list li { background: var(--col-card); border: 1px solid var(--col-line); border-radius: 12px; padding: 16px 20px; margin-bottom: 14px; }
.comment-meta { font-size: 0.82rem; color: var(--col-muted); margin-bottom: 6px; }
.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--col-line);
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 1rem;
    background: var(--col-card);
}
.comment-respond .submit {
    background: var(--col-red);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 9px;
    font-weight: 600;
    cursor: pointer;
}

/* ===== Адаптив ===== */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; gap: 36px; }
    .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 1.7rem; }
    h2 { font-size: 1.4rem; }
    .site-head .shell { flex-direction: column; align-items: flex-start; }
    .head-nav { margin-left: 0; }
    .brand-desc { display: none; }
    .layout-single .content-area,
    .layout-wide .content-area { width: 100%; }
    .cards-grid,
    .rubrics,
    .split,
    .steps,
    .foot-cols { grid-template-columns: 1fr; gap: 22px; }
    .split.reverse .split-media { order: 0; }
    .entry { padding: 22px 18px; }
    .section { padding: 34px 0; }
}
