/*
Theme Name: dds_losubattrang.com
Theme URI: https://losubattrang.com/
Author: Елена Воронцова
Description: Тема каталога-гида по керамике и отделке жилья. Японский минимализм, холодная сине-серая палитра, медный акцент.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: lsbt
*/

:root {
    --page-bg: #F4F6F8;
    --alt-bg: #E8ECF0;
    --head-bg: #FFFFFF;
    --foot-bg: #2C3540;
    --aside-bg: #FFFFFF;
    --ink: #1E2A36;
    --copper: #B87333;
    --steel: #5B7C99;
    --muted: #7A8A9A;
    --hair: #D0D8E0;
    --hair-strong: #C8D0D8;
    --grid-line: #E0E6EC;
    --shell: min(92%, 1180px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    overflow-x: hidden;
    background-color: var(--page-bg);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='520' viewBox='0 0 420 520'%3E%3Cpath d='M210 20c-34 46-58 92-58 138 0 34 14 60 14 92 0 44-46 70-46 132 0 76 58 122 132 122s132-46 132-122c0-62-46-88-46-132 0-32 14-58 14-92 0-46-24-92-58-138-14-18-28-18-42 0z' fill='%235B7C99' fill-opacity='0.04'/%3E%3C/svg%3E"),
        repeating-linear-gradient(45deg, var(--grid-line) 0, var(--grid-line) 1px, transparent 1px, transparent 24px);
    background-repeat: no-repeat, repeat;
    background-position: right -120px bottom -140px, 0 0;
    background-size: 640px auto, auto;
    background-attachment: fixed, scroll;
    color: var(--ink);
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    font-size: 17px;
    line-height: 1.72;
    -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: 'Noto Sans JP', 'Inter', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 500;
    letter-spacing: 0.04em;
    line-height: 1.28;
    color: var(--ink);
    margin: 0 0 0.7em;
}

h1 { font-size: 3.2rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }

p { margin: 0 0 1.1em; }

a {
    color: var(--steel);
    text-decoration: none;
    position: relative;
}

a:not(.btn):not(.brand):not(.tag-chip):not(.page-numbers)::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background: var(--copper);
    transition: width 0.25s ease;
}

a:not(.btn):not(.brand):not(.tag-chip):not(.page-numbers):hover::after { width: 100%; }

.shell {
    width: var(--shell);
    margin-inline: auto;
    position: relative;
    z-index: 1;
}

.btn {
    display: inline-block;
    padding: 0.72em 1.6em;
    border-radius: 2px;
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    border: 1px solid var(--copper);
    background: var(--copper);
    color: #fff;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.btn:hover { transform: translateX(2px); background: #9c601f; border-color: #9c601f; color: #fff; }

.btn-ghost { background: transparent; color: var(--copper); }
.btn-ghost:hover { background: var(--copper); color: #fff; transform: translateX(2px); }

/* ---------- Шапка ---------- */

.site-head {
    background: var(--head-bg);
    border-bottom: 1px solid var(--hair-strong);
    position: relative;
    z-index: 3;
}

.head-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.6rem;
    padding: 1.4rem 0;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    flex: 1 1 340px;
}

.brand-logo { width: 54px; height: 54px; display: block; flex: none; }

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

.brand-name {
    display: block;
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
    font-size: 1.02rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--ink);
    line-height: 1.35;
}

.brand-tagline {
    display: block;
    font-size: 0.79rem;
    color: var(--muted);
    line-height: 1.5;
    margin-top: 0.25rem;
    max-width: 52ch;
}

.brand::after { display: none; }

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--hair-strong);
    border-radius: 2px;
    padding: 0.5rem 0.8rem;
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--ink);
    cursor: pointer;
}

.main-nav[hidden] { display: none !important; }

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

.main-nav a {
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
    font-size: 0.93rem;
    letter-spacing: 0.06em;
    color: var(--ink);
}

.main-nav .current-menu-item > a { color: var(--copper); }

/* ---------- Каркас страницы ---------- */

.site-main { padding: 2.6rem 0 4rem; position: relative; z-index: 1; }

.layout-single {
    display: block;
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 3%;
    align-items: start;
}

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

.sidebar {
    min-width: 0;
    background: var(--aside-bg);
    border-left: 1px solid var(--hair);
    padding: 1.6rem 1.5rem;
    color: var(--ink);
}

.sidebar .widget-title {
    font-size: 1.05rem;
    color: var(--ink);
    padding-left: 0.9rem;
    border-left: 2px solid var(--copper);
    margin-bottom: 0.9rem;
}

.sidebar .widget { margin-bottom: 2rem; }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 0.45rem 0; border-bottom: 1px solid var(--grid-line); }
.sidebar li:last-child { border-bottom: none; }
.sidebar a { color: var(--steel); }
.sidebar a:hover { color: var(--copper); }
.sidebar p, .sidebar .post-date { color: var(--ink); }
.sidebar .post-date { color: var(--muted); font-size: 0.85rem; display: block; }

/* ---------- Заголовки секций ---------- */

.sec-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.85rem;
    margin-bottom: 1.6rem;
}

.sec-title::before {
    content: '';
    flex: none;
    width: 40px;
    height: 2px;
    background: var(--copper);
}

/* ---------- Хлебные крошки ---------- */

.trail {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 1.6rem;
    letter-spacing: 0.02em;
}

.trail a { color: var(--steel); }
.trail-sep { color: var(--hair-strong); margin: 0 0.25rem; }

/* ---------- Карточки записей ---------- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 1.8rem;
}

.card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--hair);
    border-radius: 2px;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
    min-width: 0;
}

.card:hover { border-color: var(--copper); transform: translateY(-2px); }

.card-thumb {
    width: 80%;
    margin: 0;
    display: block;
}

.card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.card-thumb a::after { display: none; }

.card-thumb-blank {
    width: 80%;
    aspect-ratio: 4 / 3;
    background:
        repeating-linear-gradient(45deg, rgba(91, 124, 153, 0.1) 0, rgba(91, 124, 153, 0.1) 1px, transparent 1px, transparent 14px),
        var(--alt-bg);
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.2rem 1.3rem 1.4rem;
    min-width: 0;
}

.card-title {
    font-size: 1.15rem;
    margin: 0 0 0.5rem;
}

.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--copper); }

.card-excerpt { color: #40505e; font-size: 0.94rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }

.card-foot { margin-top: auto; padding-top: 1rem; }

.entry-meta {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 0.7rem;
}

.tag-chip {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    border-left: 3px solid var(--steel);
    color: var(--steel);
    background: none;
}

.tag-chip.tone-1 { border-left-color: #5B7C99; color: #5B7C99; }
.tag-chip.tone-2 { border-left-color: #6E7F8C; color: #6E7F8C; }
.tag-chip.tone-3 { border-left-color: #8296A8; color: #748899; }
.tag-chip.tone-4 { border-left-color: #8A8FA8; color: #7C82A0; }
.tag-chip.tone-5 { border-left-color: var(--copper); color: var(--copper); }

.card-more {
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
    font-size: 0.88rem;
    letter-spacing: 0.06em;
    color: var(--copper);
}

/* ---------- Главная ---------- */

.front-wrap { width: 85%; margin-left: auto; margin-right: auto; }

.front-section { padding: 80px 0; }

.front-section.tinted {
    background-color: var(--alt-bg);
    background-image: repeating-linear-gradient(45deg, rgba(120, 140, 160, 0.09) 0, rgba(120, 140, 160, 0.09) 1px, transparent 1px, transparent 24px);
    padding: 80px 2.2rem;
    border-radius: 2px;
}

/* Hero */

.hero {
    position: relative;
    overflow: hidden;
    border-radius: 2px;
    margin-top: 1rem;
}

.hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-veil {
    position: relative;
    background: rgba(30, 42, 54, 0.6);
    padding: 5.5rem 3rem;
    min-width: 0;
}

.hero h1 {
    color: #fff;
    max-width: 18ch;
    margin-bottom: 1.2rem;
}

.hero-rule { width: 60px; height: 1px; background: var(--copper); margin-bottom: 1.2rem; }

.hero p {
    color: rgba(255, 255, 255, 0.82);
    max-width: 62ch;
    margin-bottom: 1.6rem;
}

.hero-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
    letter-spacing: 0.06em;
    font-size: 0.95rem;
}

.hero-link::after { background: var(--copper); }
.hero-link span { color: var(--copper); }

/* Таймлайн */

.stages { position: relative; padding-left: 0; }

.stage {
    display: grid;
    grid-template-columns: 96px 1px minmax(0, 1fr);
    gap: 0 2rem;
    padding-bottom: 3.2rem;
}

.stage:last-child { padding-bottom: 0; }

.stage-num {
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
    font-size: 2.6rem;
    line-height: 1;
    color: var(--steel);
    opacity: 0.55;
    text-align: right;
    letter-spacing: 0.02em;
}

.stage-line { background: var(--copper); position: relative; }

.stage:last-child .stage-line { background: linear-gradient(to bottom, var(--copper) 0, var(--copper) 40%, transparent 100%); }

.stage-line::before {
    content: '';
    position: absolute;
    top: 0.55rem;
    left: -3px;
    width: 7px;
    height: 7px;
    background: var(--copper);
    border-radius: 50%;
}

.stage-body { min-width: 0; padding-top: 0.1rem; }
.stage-body h3 { margin-bottom: 0.4rem; }
.stage-body p { margin: 0; color: #40505e; }

/* Цитата */

.claim {
    background: var(--foot-bg);
    padding: 4.6rem 2.6rem;
    border-radius: 2px;
    text-align: center;
}

.claim-text {
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
    font-size: 2.4rem;
    line-height: 1.4;
    letter-spacing: 0.03em;
    color: var(--copper);
    margin: 0 auto 1.8rem;
    max-width: 24ch;
}

.claim-rule {
    width: 60px;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 auto;
}

/* Рубрикатор-карточки */

.topic-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.6rem;
}

.topic {
    background: #fff;
    border: 1px solid var(--hair);
    border-radius: 2px;
    padding: 1.7rem 1.5rem;
    min-width: 0;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.topic:hover { border-color: var(--copper); transform: translateY(-2px); }
.topic svg { display: block; margin-bottom: 1.1rem; }
.topic h3 { font-size: 1.12rem; margin-bottom: 0.4rem; }
.topic p { margin: 0; font-size: 0.92rem; color: #40505e; }

/* Последние записи на главной */

.latest-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* ---------- Запись и страница ---------- */

.entry {
    background: #fff;
    border: 1px solid var(--hair);
    border-radius: 2px;
    padding: 2.4rem 2.4rem 2.6rem;
}

.entry-title { font-size: 2.3rem; margin-bottom: 0.8rem; }

.entry-thumb { margin: 0 0 1.8rem; }
.entry-thumb img { display: block; width: 100%; aspect-ratio: 16 / 7; object-fit: cover; border-radius: 2px; }

.entry-content h2 { font-size: 1.6rem; margin-top: 1.8rem; }
.entry-content h3 { font-size: 1.28rem; margin-top: 1.5rem; }
.entry-content img { display: block; border-radius: 2px; }
.entry-content ul, .entry-content ol { padding-left: 1.3rem; }
.entry-content li { margin-bottom: 0.4rem; }

.entry-content blockquote {
    margin: 1.6rem 0;
    padding: 1.2rem 1.5rem;
    background: var(--alt-bg);
    border-left: 3px solid var(--copper);
    border-radius: 2px;
}

.entry-content blockquote p:last-child { margin-bottom: 0; }

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6rem 0;
    border: 1px solid var(--hair);
}

.entry-content th, .entry-content td {
    border: 1px solid var(--hair);
    padding: 0.6rem 0.8rem;
    text-align: left;
}

.entry-content th { background: var(--alt-bg); font-weight: 600; }

.entry-tags { margin-top: 2rem; display: flex; gap: 0.6rem; flex-wrap: wrap; }

.page-head { margin-bottom: 1.8rem; }

/* ---------- Пагинация ---------- */

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2.6rem;
}

.pager .page-numbers {
    display: inline-block;
    min-width: 42px;
    text-align: center;
    padding: 0.5rem 0.8rem;
    border: 1px solid var(--hair);
    border-radius: 2px;
    background: #fff;
    color: var(--steel);
    font-size: 0.92rem;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.pager .page-numbers:hover { border-color: var(--copper); color: var(--copper); }

.pager .page-numbers.current {
    background: var(--copper);
    border-color: var(--copper);
    color: #fff;
}

.pager .page-numbers.dots { border-color: transparent; background: none; }

/* ---------- Поиск ---------- */

.search-box { display: flex; gap: 0.5rem; max-width: 460px; }

.search-box input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 0.62rem 0.8rem;
    border: 1px solid var(--hair);
    border-radius: 2px;
    background: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--ink);
}

.search-box input[type="search"]:focus { outline: none; border-color: var(--copper); }

.search-box button {
    padding: 0.62rem 1.2rem;
    border: 1px solid var(--copper);
    border-radius: 2px;
    background: var(--copper);
    color: #fff;
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
    font-size: 0.92rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.search-box button:hover { transform: translateX(2px); background: #9c601f; }

/* ---------- Комментарии ---------- */

.talk {
    margin-top: 2.6rem;
    background: #fff;
    border: 1px solid var(--hair);
    border-radius: 2px;
    padding: 2rem 2.2rem 2.2rem;
}

.talk-list { list-style: none; margin: 0 0 1.8rem; padding: 0; }
.talk-list .children { list-style: none; margin: 1rem 0 0 1.6rem; padding: 0; }

.talk-item { border-top: 1px solid var(--grid-line); padding-top: 1.1rem; margin-top: 1.1rem; }
.talk-list > .talk-item:first-child { border-top: none; padding-top: 0; margin-top: 0; }

.talk-head { display: flex; gap: 1rem; align-items: baseline; flex-wrap: wrap; margin-bottom: 0.4rem; }
.talk-author { font-family: 'Noto Sans JP', 'Inter', sans-serif; letter-spacing: 0.04em; }
.talk-head time { font-size: 0.82rem; color: var(--muted); }
.talk-text p { margin: 0 0 0.7em; }
.talk-hold { color: var(--copper); font-size: 0.88rem; }
.talk-tools { font-size: 0.88rem; }

.comment-form label { display: block; font-size: 0.88rem; color: var(--muted); margin-bottom: 0.3rem; }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 0.62rem 0.8rem;
    border: 1px solid var(--hair);
    border-radius: 2px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--ink);
    background: #fff;
}

.comment-form textarea { min-height: 150px; resize: vertical; }
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--copper); }
.comment-form p { margin-bottom: 1rem; }

.comment-form .submit {
    padding: 0.7em 1.6em;
    border: 1px solid var(--copper);
    border-radius: 2px;
    background: var(--copper);
    color: #fff;
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.comment-form .submit:hover { transform: translateX(2px); background: #9c601f; }

/* ---------- 404 ---------- */

.notfound { text-align: left; padding: 2rem 0 3rem; }
.notfound h1 { font-size: 2.6rem; }
.notfound .search-box { margin: 1.6rem 0; }

/* ---------- Подвал ---------- */

.site-foot {
    background: var(--foot-bg);
    color: #C6D0DA;
    padding: 3.4rem 0 2rem;
    position: relative;
    z-index: 1;
}

.foot-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.4rem;
}

.foot-cols .widget { min-width: 0; color: #C6D0DA; }
.foot-cols .widget p { color: #C6D0DA; }
.foot-cols .widget-title {
    color: #FFFFFF;
    font-size: 1.05rem;
    padding-left: 0.9rem;
    border-left: 2px solid var(--copper);
    margin-bottom: 0.9rem;
}
.foot-cols ul { list-style: none; margin: 0; padding: 0; }
.foot-cols li { padding: 0.32rem 0; }
.foot-cols a { color: #C6D0DA; }
.foot-cols a:hover { color: #FFFFFF; }
.foot-cols .post-date { color: #93A3B3; font-size: 0.85rem; display: block; }

.foot-bottom {
    margin-top: 2.6rem;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.85rem;
    color: #93A3B3;
}

/* ---------- Cookie-баннер ---------- */

.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.4rem;
    flex-wrap: wrap;
    background: #FFFFFF;
    border-top: 1px solid var(--hair-strong);
    padding: 1.1rem 1.6rem;
    font-size: 0.9rem;
    color: var(--ink);
}

.cookie-banner p { margin: 0; max-width: 78ch; min-width: 0; }

/* ---------- Адаптив ---------- */

@media (max-width: 960px) {
    h1 { font-size: 2.4rem; }
    .hero h1 { font-size: 2.2rem; }
    .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); gap: 2.4rem; }
    .sidebar { border-left: none; border-top: 1px solid var(--hair); }
    .layout-single, .front-wrap { width: 100%; }
    .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
    .sec-title { font-size: 1.45rem; }

    .nav-toggle { display: block; }
    .main-nav { flex-basis: 100%; }
    .main-nav[hidden] { display: none !important; }
    .main-nav ul { flex-direction: column; gap: 0.2rem; }
    .main-nav li { border-bottom: 1px solid var(--grid-line); padding: 0.55rem 0; }

    .front-section { padding: 48px 0; }
    .front-section.tinted { padding: 44px 1.4rem; }

    .hero-veil { padding: 2.6rem 1.4rem; }
    .hero h1 { font-size: 1.8rem; }

    .claim { padding: 2.8rem 1.4rem; }
    .claim-text { font-size: 1.5rem; }

    .stage { grid-template-columns: 52px 1px minmax(0, 1fr); gap: 0 1rem; padding-bottom: 2.2rem; }
    .stage-num { font-size: 1.8rem; }

    .topic-grid { grid-template-columns: minmax(0, 1fr); }
    .card-grid { grid-template-columns: minmax(0, 1fr); }
    .card-thumb, .card-thumb-blank { width: 100%; }

    .entry { padding: 1.5rem 1.3rem 1.8rem; }
    .entry-title { font-size: 1.7rem; }
    .talk { padding: 1.4rem 1.2rem 1.6rem; }

    .foot-cols { grid-template-columns: minmax(0, 1fr); }
    .cookie-banner { padding: 1rem 1.2rem; }
}
