/*
Theme Name: latenierdescassheures.com
Theme URI: https://latelierdescassheures.com/
Author: Илья Мартынов
Author URI: https://latelierdescassheures.com/
Description: Редакционная тема о гаджетах и девайсах с акцентом на дизайн, удобство использования и тактильность повседневных вещей.
Version: 1.1
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lndch
*/

/* ===== Шрифты ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Spectral:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* ===== Сброс и базовая типографика ===== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 17px;
    line-height: 1.65;
    color: #1E1E1E;
    background-color: #F8F6F2;
    -webkit-font-smoothing: antialiased;
}

body.high-contrast {
    background-color: #FFFFFF;
    color: #000000;
}

body.high-contrast a {
    color: #8a3c1c;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Spectral', Georgia, serif;
    font-weight: 600;
    color: #1E1E1E;
    line-height: 1.25;
    margin: 1.4em 0 0.6em;
}

h1 { font-size: 2.1rem; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.12rem; }

p {
    margin: 0 0 1em;
}

a {
    color: #C87A5A;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #8a4f33;
    text-decoration: underline;
}

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

blockquote {
    margin: 1.5em 0;
    padding: 0.6em 1.2em;
    border-left: 3px solid #9BB6C4;
    color: #3A3A3A;
    font-family: 'Spectral', Georgia, serif;
    font-style: italic;
}

code, pre {
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.92em;
    background: #ECE7DF;
    color: #3A3A3A;
}

code { padding: 0.1em 0.35em; border-radius: 3px; }
pre { padding: 1em; border-radius: 6px; overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    border: 1px solid #d8d2c6;
}

th, td {
    border: 1px solid #d8d2c6;
    padding: 0.55em 0.85em;
    text-align: left;
}

th {
    background: #ECE7DF;
    font-weight: 600;
}

hr {
    border: 0;
    border-top: 1px solid #d8d2c6;
    margin: 2em 0;
}

/* ===== Контейнер ===== */
.wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Шапка ===== */
.site-header {
    background: #F8F6F2;
    border-bottom: 1px solid #e3ddd0;
    padding: 18px 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    flex: 1;
    min-width: 0;
}

.brand:hover { text-decoration: none; }

.brand-logo {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.brand-text {
    min-width: 0;
}

.brand-name {
    font-family: 'Spectral', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: #1E1E1E;
    line-height: 1.25;
    display: block;
    margin: 0;
}

.brand-tagline {
    font-size: 0.78rem;
    color: #6a6a6a;
    margin: 2px 0 0;
    line-height: 1.35;
    max-width: 540px;
}

/* Главное меню */
.nav-toggle {
    display: none;
    background: none;
    border: 1px solid #d8d2c6;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #1E1E1E;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.main-nav a {
    display: inline-block;
    padding: 8px 14px;
    color: #1E1E1E;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
}

.main-nav a:hover,
.main-nav .current-menu-item > a {
    background: #ECE7DF;
    color: #C87A5A;
    text-decoration: none;
}

/* ===== Хлебные крошки ===== */
.crumbs {
    padding: 14px 0;
    font-size: 0.85rem;
    color: #6a6a6a;
}

.crumbs a {
    color: #6a6a6a;
}

.crumbs a:hover {
    color: #C87A5A;
}

.crumbs .sep {
    margin: 0 7px;
    color: #b5ad9d;
}

/* ===== Layout: контент + сайдбар ===== */
.layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 18px 0 60px;
}

.layout.has-aside {
    grid-template-columns: 67% 27%;
    gap: 6%;
}

.layout.full-width .content {
    max-width: 85%;
    margin: 0 auto;
    width: 100%;
}

.content {
    min-width: 0;
}

@media (max-width: 960px) {
    .layout.has-aside { grid-template-columns: 1fr; }
    .layout.full-width .content { max-width: 100%; }
}

/* ===== Карточки записей ===== */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 26px;
    margin: 0 0 36px;
}

.card {
    display: flex;
    flex-direction: column;
    background: #FFFDF9;
    border: 1px solid #e3ddd0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(40,30,20,0.04), 0 8px 24px rgba(40,30,20,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40,30,20,0.07), 0 14px 28px rgba(40,30,20,0.07);
}

.card-thumb-wrap {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #ECE7DF;
}

.card-thumb-wrap a {
    display: block;
    width: 100%;
    height: 100%;
}

.card-thumb-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card:hover .card-thumb-wrap img {
    transform: scale(1.04);
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px 20px 22px;
}

.card-cat {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #3A3A3A;
    font-variant: small-caps;
    margin-bottom: 6px;
}

.card-title {
    font-family: 'Spectral', Georgia, serif;
    font-size: 1.18rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 10px;
}

.card-title a {
    color: #1E1E1E;
}

.card-title a:hover {
    color: #C87A5A;
    text-decoration: none;
}

.card-excerpt {
    color: #3A3A3A;
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 14px;
}

.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}

.card-meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e3ddd0;
    font-size: 0.78rem;
    color: #6a6a6a;
}

/* ===== Кнопки ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid #C87A5A;
    background: transparent;
    color: #C87A5A;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    text-decoration: none;
}

.btn:hover {
    background: #C87A5A;
    color: #FFFFFF;
    border-color: #C87A5A;
    text-decoration: none;
}

.btn--ghost {
    border-color: rgba(58,58,58,0.25);
    color: #3A3A3A;
}

.btn--ghost:hover {
    background: rgba(200,122,90,0.08);
    color: #C87A5A;
    border-color: #C87A5A;
}

.btn .arrow {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.btn:hover .arrow { transform: translateX(3px); }

/* ===== Боковая панель (органайзер) ===== */
.aside {
    font-size: 0.95rem;
}

.aside .widget {
    background: #FFFDF9;
    border: 1px solid #e3ddd0;
    border-radius: 12px;
    padding: 20px 22px;
    margin-bottom: 22px;
}

.aside .widget-title {
    font-family: 'Spectral', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e3ddd0;
}

.aside ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.aside li {
    padding: 7px 0;
    border-bottom: 1px dashed #ece7df;
    line-height: 1.4;
}

.aside li:last-child { border-bottom: 0; }

.aside a { color: #1E1E1E; }
.aside a:hover { color: #C87A5A; }

/* ===== Главная — тематические блоки ===== */
.section {
    padding: 50px 0;
    border-bottom: 1px solid #e3ddd0;
}

.section:last-of-type { border-bottom: 0; }

.section-eyebrow {
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #B87B4F;
    font-weight: 500;
    margin-bottom: 6px;
}

.section-title {
    font-family: 'Spectral', Georgia, serif;
    font-size: 2rem;
    font-weight: 600;
    margin: 0 0 14px;
}

.section-lead {
    font-size: 1.05rem;
    color: #3A3A3A;
    max-width: 720px;
    margin: 0 0 30px;
}

/* Hero (первый блок) */
.hero {
    padding: 60px 0 40px;
    background: linear-gradient(180deg, #F8F6F2 0%, #f0ebde 100%);
    border-bottom: 1px solid #e3ddd0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero h1 {
    font-size: 2.6rem;
    line-height: 1.2;
    margin: 0 0 18px;
}

.hero .lead {
    font-size: 1.1rem;
    color: #3A3A3A;
    margin: 0 0 22px;
}

.hero-illustration {
    aspect-ratio: 4 / 3;
    background: #FFFDF9;
    border: 1px solid #e3ddd0;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 32px rgba(40,30,20,0.06);
}

.hero-illustration svg { width: 80%; height: auto; }

@media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; gap: 28px; }
    .hero h1 { font-size: 2rem; }
}

/* Категории-иконки */
.cats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.cat-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 22px 20px;
    background: #FFFDF9;
    border: 1px solid #e3ddd0;
    border-radius: 12px;
    color: #1E1E1E;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.cat-tile:hover {
    transform: translateY(-2px);
    border-color: #C87A5A;
    box-shadow: 0 8px 24px rgba(40,30,20,0.06);
    text-decoration: none;
    color: #1E1E1E;
}

.cat-tile svg {
    width: 30px;
    height: 30px;
    color: #C87A5A;
}

.cat-tile-name {
    font-family: 'Spectral', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 600;
}

.cat-tile-desc {
    font-size: 0.85rem;
    color: #6a6a6a;
    line-height: 1.45;
}

/* Шаги «как мы тестируем» */
.steps {
    counter-reset: step;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.step {
    background: #FFFDF9;
    border: 1px solid #e3ddd0;
    border-radius: 12px;
    padding: 22px;
    position: relative;
}

.step::before {
    counter-increment: step;
    content: counter(step, decimal-leading-zero);
    font-family: 'Spectral', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: #B87B4F;
    display: block;
    margin-bottom: 8px;
}

.step h3 { margin: 0 0 8px; font-size: 1.05rem; }
.step p { font-size: 0.92rem; color: #3A3A3A; margin: 0; }

/* Модуль «Как это в руке?» */
.feel-module {
    background: #FFFDF9;
    border: 1px solid #e3ddd0;
    border-radius: 14px;
    padding: 30px;
}

.feel-bar {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, #9BB6C4 0%, #C87A5A 60%, #B87B4F 100%);
    margin: 22px 0 8px;
    position: relative;
}

.feel-bar-marker {
    position: absolute;
    top: -5px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1E1E1E;
    border: 3px solid #FFFDF9;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transform: translateX(-50%);
}

.feel-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: #6a6a6a;
}

/* ===== Single — статья ===== */
.entry-header {
    margin-bottom: 28px;
}

.entry-eyebrow {
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #3A3A3A;
    font-variant: small-caps;
    margin-bottom: 8px;
}

.entry-title {
    font-family: 'Spectral', Georgia, serif;
    font-size: 2.2rem;
    line-height: 1.2;
    margin: 0 0 14px;
}

.entry-meta {
    font-size: 0.85rem;
    color: #6a6a6a;
}

.entry-meta span + span::before {
    content: '·';
    margin: 0 8px;
    color: #b5ad9d;
}

.entry-thumb {
    margin: 0 0 28px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e3ddd0;
}

.entry-thumb img {
    display: block;
    width: 100%;
    height: auto;
}

.entry-content p,
.entry-content ul,
.entry-content ol {
    font-size: 1.02rem;
    line-height: 1.75;
}

.entry-content img {
    border-radius: 8px;
    margin: 1em 0;
}

.entry-content h2 { margin-top: 1.6em; }

/* ===== Пагинация ===== */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin: 30px 0;
}

.pagination a,
.pagination span {
    min-width: 38px;
    padding: 8px 12px;
    text-align: center;
    border-radius: 8px;
    border: 1px solid #e3ddd0;
    background: #FFFDF9;
    color: #1E1E1E;
    font-size: 0.92rem;
    transition: all 0.2s ease;
}

.pagination a:hover {
    border-color: #C87A5A;
    color: #C87A5A;
    text-decoration: none;
}

.pagination .current {
    background: #C87A5A;
    border-color: #C87A5A;
    color: #FFFFFF;
}

.pagination .dots {
    border: 0;
    background: transparent;
    color: #6a6a6a;
}

/* ===== Поиск ===== */
.search-form {
    display: flex;
    gap: 8px;
    margin: 1em 0;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e3ddd0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #FFFDF9;
    color: #1E1E1E;
}

.search-form input[type="search"]:focus {
    outline: none;
    border-color: #C87A5A;
}

.search-form button {
    padding: 10px 18px;
    background: #C87A5A;
    color: #FFFFFF;
    border: 1px solid #C87A5A;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.92rem;
    font-family: inherit;
    transition: background 0.2s ease;
}

.search-form button:hover { background: #b06c4d; }

/* ===== Комментарии ===== */
.comments-area {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #e3ddd0;
}

.comments-title {
    font-family: 'Spectral', Georgia, serif;
    font-size: 1.4rem;
    margin: 0 0 22px;
}

.comment-list {
    list-style: none;
    margin: 0 0 30px;
    padding: 0;
}

.comment-list li {
    margin: 0 0 18px;
    padding: 16px 18px;
    background: #FFFDF9;
    border: 1px solid #e3ddd0;
    border-radius: 10px;
}

.comment-list .children {
    list-style: none;
    margin: 14px 0 0 22px;
    padding: 0;
}

.comment-meta {
    font-size: 0.82rem;
    color: #6a6a6a;
    margin-bottom: 8px;
}

.comment-author { font-weight: 600; color: #1E1E1E; margin-right: 6px; }

.comment-form label {
    display: block;
    font-size: 0.88rem;
    margin-bottom: 4px;
    color: #3A3A3A;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #e3ddd0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    background: #FFFDF9;
    color: #1E1E1E;
    margin-bottom: 12px;
}

.comment-form input:focus,
.comment-form textarea:focus { outline: none; border-color: #C87A5A; }

.comment-form .submit {
    padding: 10px 20px;
    background: #C87A5A;
    color: #FFFFFF;
    border: 1px solid #C87A5A;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
}

.comment-form .submit:hover { background: #b06c4d; }

/* ===== Подвал ===== */
.site-footer {
    background: #1E1E1E;
    color: #d8d2c6;
    padding: 50px 0 20px;
    margin-top: 50px;
}

.site-footer a { color: #f0ebde; }
.site-footer a:hover { color: #C87A5A; }

.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
    margin-bottom: 40px;
}

@media (max-width: 760px) {
    .footer-cols { grid-template-columns: 1fr; gap: 28px; }
}

.footer-cols .widget-title {
    font-family: 'Spectral', Georgia, serif;
    font-size: 1.05rem;
    color: #FFFDF9;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #3A3A3A;
}

.footer-cols ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-cols li {
    padding: 4px 0;
    line-height: 1.5;
}

.footer-cols p {
    color: #b5ad9d;
    font-size: 0.92rem;
    line-height: 1.6;
}

.site-info {
    text-align: center;
    padding-top: 22px;
    border-top: 1px solid #3A3A3A;
    font-size: 0.85rem;
    color: #b5ad9d;
}

/* ===== Cookie-баннер ===== */
.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    bottom: 18px;
    left: 18px;
    right: 18px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding: 16px 22px;
    background: #1E1E1E;
    color: #f0ebde;
    border-radius: 12px;
    box-shadow: 0 14px 38px rgba(0,0,0,0.18);
    max-width: 920px;
    margin: 0 auto;
    font-size: 0.92rem;
}

.cookie-banner p { margin: 0; flex: 1; min-width: 240px; }

.cookie-banner button {
    padding: 9px 18px;
    background: #C87A5A;
    color: #FFFFFF;
    border: 1px solid #C87A5A;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.cookie-banner button:hover { background: #b06c4d; }

/* ===== Переключатель режима чтения ===== */
.reading-toggle {
    position: fixed;
    right: 18px;
    bottom: 80px;
    z-index: 999;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #FFFDF9;
    border: 1px solid #e3ddd0;
    color: #1E1E1E;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(40,30,20,0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.reading-toggle:hover {
    background: #C87A5A;
    color: #FFFFFF;
    border-color: #C87A5A;
}

.reading-toggle svg { width: 20px; height: 20px; }

/* ===== 404 ===== */
.error-404 {
    text-align: center;
    padding: 60px 20px;
}

.error-404 .big {
    font-family: 'Spectral', Georgia, serif;
    font-size: 6rem;
    font-weight: 600;
    color: #C87A5A;
    margin: 0;
    line-height: 1;
}

.error-404 .search-form {
    max-width: 460px;
    margin: 24px auto;
}

/* ===== Адаптив ===== */
@media (max-width: 960px) {
    .nav-toggle { display: inline-flex; align-items: center; gap: 6px; }

    .main-nav {
        flex-basis: 100%;
        display: none;
    }

    .main-nav.is-open { display: block; }

    .main-nav ul { flex-direction: column; gap: 0; }

    .main-nav a {
        display: block;
        padding: 12px 6px;
        border-bottom: 1px solid #e3ddd0;
        border-radius: 0;
    }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 1.7rem; }
    .entry-title { font-size: 1.55rem; }
    .section-title { font-size: 1.5rem; }
    .section { padding: 36px 0; }
    .hero { padding: 36px 0 24px; }
    .hero h1 { font-size: 1.7rem; }
    .wrap { padding: 0 16px; }
    .brand-tagline { display: none; }

    .cookie-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .reading-toggle { bottom: 18px; right: 18px; }
}
