/*
Theme Name: dds_lifelearningapps.com
Theme URI: https://lifelearningapps.com/
Author: Анна Лаврова
Author URI: https://lifelearningapps.com/
Description: Студийный сайт по дизайну квартир в ЖК бизнес-класса. Портфолио, кейсы, услуги и блог о современной жилой среде.
Version: 1.1
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lifelearn
*/

/* ---------- Базовые токены ---------- */
:root {
    --bg: #F5F3F0;
    --bg-soft: #FFF9F0;
    --ink: #2C2A29;
    --ink-soft: #4a4644;
    --copper: #C26A4A;
    --copper-deep: #8a4530;
    --saffron: #E0A158;
    --line: #d9d3cb;
    --line-soft: #ece6dd;
    --shadow: 0 6px 28px rgba(44, 42, 41, 0.08);
    --radius: 14px;
    --radius-pill: 40px;
    --container: 1180px;
    --shell-w: 92%;
    --font-base: 'Satoshi', 'Inter', 'Helvetica Neue', Arial, sans-serif;
    --font-accent: 'Instrument Serif', Georgia, 'Times New Roman', serif;
}

/* ---------- Базовая нормализация ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-base);
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

a {
    color: var(--copper);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover { color: var(--copper-deep); }

p { margin: 0 0 1em; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-base);
    font-weight: 500;
    color: var(--ink);
    line-height: 1.2;
    margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.55rem); }
h4 { font-size: 1.15rem; }

ul, ol { padding-left: 1.25rem; }

blockquote {
    margin: 1.5em 0;
    padding: 1em 1.4em;
    border-left: 3px solid var(--copper);
    background: var(--bg-soft);
    font-style: italic;
    color: var(--ink-soft);
}

code, pre {
    font-family: 'JetBrains Mono', Menlo, Consolas, monospace;
    background: var(--bg-soft);
    border: 1px solid var(--line-soft);
    border-radius: 6px;
}

code { padding: 0.1em 0.4em; font-size: 0.9em; }
pre { padding: 1em; overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    border: 1px solid var(--line);
}

th, td {
    border: 1px solid var(--line);
    padding: 0.7em 0.9em;
    text-align: left;
}

th {
    background: var(--bg-soft);
    font-weight: 500;
}

hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

/* ---------- Контейнер (см. A12, п.7) ---------- */
.shell {
    width: min(var(--shell-w), var(--container));
    margin-inline: auto;
}

/* ---------- Кнопки ---------- */
.btn,
.button,
input[type="submit"],
button[type="submit"] {
    display: inline-block;
    padding: 0.85em 2em;
    border-radius: var(--radius-pill);
    background: var(--copper);
    color: var(--ink);
    border: none;
    font-family: var(--font-base);
    font-size: 0.98rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
    line-height: 1.2;
}

.btn:hover,
.button:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
    background: var(--copper-deep);
    color: var(--bg-soft);
    box-shadow: 0 4px 18px rgba(194, 106, 74, 0.35);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--ink);
    color: var(--ink);
}

.btn-outline:hover {
    background: var(--ink);
    color: var(--bg-soft);
    box-shadow: none;
}

/* ---------- Шапка ---------- */
.site-head {
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line-soft);
    padding: 1.4em 0;
}

.head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2em;
    flex-wrap: wrap;
}

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

.brand-logo,
.brand svg.brand-logo {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--bg);
}

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

.brand-name {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--ink);
    margin: 0;
    line-height: 1.2;
}

.brand-desc {
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin: 0.2em 0 0;
    line-height: 1.3;
    max-width: 480px;
}

/* ---------- Меню ---------- */
.site-nav { min-width: 0; }

.site-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em 1.6em;
}

.site-nav a {
    color: var(--ink);
    font-weight: 500;
    font-size: 0.97rem;
    padding: 0.3em 0;
    position: relative;
}

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

.site-nav .current-menu-item > a::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -3px;
    height: 2px;
    background: var(--copper);
    border-radius: 2px;
}

/* ---------- Хлебные крошки ---------- */
.breadcrumbs {
    padding: 1.2em 0 0.4em;
    font-size: 0.88rem;
    color: var(--ink-soft);
}

.breadcrumbs a {
    color: var(--ink-soft);
    text-decoration: none;
    border-bottom: 1px dotted var(--ink-soft);
}

.breadcrumbs a:hover {
    color: var(--copper);
    border-color: var(--copper);
}

.breadcrumbs .sep {
    margin: 0 0.4em;
    color: var(--line);
}

/* ---------- Основной layout ---------- */
.site-main { padding: 2.5em 0 4em; }

/* С сайдбаром: 67% + 27% */
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67%) minmax(0, 27%);
    gap: 6%;
    align-items: start;
}

/* Без сайдбара: один блок, 85% ширины (см. A12, п.3) */
.layout-narrow {
    display: block;
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 960px) {
    .layout-with-sidebar {
        grid-template-columns: minmax(0, 1fr);
        gap: 2.5em;
    }
    .layout-narrow { width: 100%; }
}

/* ---------- Карточки записей (см. A8, A10) ---------- */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 1.6em;
    margin: 1em 0 2em;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--bg-soft);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-thumb {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg);
}

.card-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease, filter 0.4s ease;
    filter: grayscale(35%);
}

.card:hover .card-thumb img {
    transform: scale(1.04);
    filter: grayscale(0%);
}

.card-body {
    flex: 1;
    padding: 1.4em 1.5em 1.6em;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.card-title {
    font-size: 1.15rem;
    margin: 0 0 0.5em;
    line-height: 1.3;
}

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

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

.card-meta {
    font-size: 0.82rem;
    color: var(--ink-soft);
    margin-bottom: 0.7em;
}

.card-meta a {
    color: var(--ink-soft);
    border-bottom: 1px dotted var(--ink-soft);
}

.card-meta a:hover { color: var(--copper); border-color: var(--copper); }

.card-excerpt {
    font-size: 0.95rem;
    color: var(--ink-soft);
    line-height: 1.55;
    margin-bottom: 1em;
    flex: 1;
}

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

.card-more {
    align-self: flex-start;
    font-size: 0.9rem;
    color: var(--copper);
    font-weight: 500;
    border-bottom: 1px solid currentColor;
    padding-bottom: 1px;
}

.card-more:hover { color: var(--copper-deep); }

/* ---------- Запись / страница ---------- */
.entry {
    background: var(--bg-soft);
    padding: 2em 2.2em;
    border-radius: var(--radius);
    border: 1px solid var(--line-soft);
}

.entry-title {
    margin-top: 0;
    margin-bottom: 0.3em;
}

.entry-meta {
    font-size: 0.88rem;
    color: var(--ink-soft);
    margin-bottom: 1.5em;
    padding-bottom: 1em;
    border-bottom: 1px solid var(--line-soft);
}

.entry-content {
    font-size: 1.05rem;
    line-height: 1.75;
}

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

.entry-thumb {
    margin: -2em -2.2em 1.8em;
    overflow: hidden;
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
}

.entry-thumb img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
}

@media (max-width: 600px) {
    .entry { padding: 1.4em 1.2em; }
    .entry-thumb { margin: -1.4em -1.2em 1.4em; }
}

/* ---------- Сайдбар и виджеты ---------- */
.sidebar {
    min-width: 0;
}

.widget {
    background: var(--bg-soft);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    padding: 1.4em 1.5em;
    margin-bottom: 1.5em;
    color: var(--ink);
}

.widget-title {
    font-size: 1.05rem;
    margin: 0 0 0.9em;
    padding-bottom: 0.6em;
    border-bottom: 1px solid var(--line-soft);
    color: var(--ink);
    font-weight: 500;
}

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

.widget li {
    margin-bottom: 0.55em;
    line-height: 1.4;
}

.widget a {
    color: var(--ink);
}

.widget a:hover { color: var(--copper); }

.widget .post-date,
.widget time {
    display: block;
    font-size: 0.78rem;
    color: var(--ink-soft);
    margin-top: 0.15em;
}

/* ---------- Подвал ---------- */
.site-foot {
    background: var(--ink);
    color: #d8d4d0;
    padding: 3em 0 1.4em;
    margin-top: 4em;
}

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

@media (max-width: 800px) {
    .foot-cols {
        grid-template-columns: 1fr;
        gap: 1.5em;
    }
}

/* Виджеты в футере — светлый текст на тёмном фоне (контраст, см. F) */
.site-foot .widget {
    background: transparent;
    border: none;
    padding: 0;
    color: #d8d4d0;
}

.site-foot .widget-title {
    color: #fff9f0;
    border-bottom: 1px solid rgba(255, 249, 240, 0.18);
}

.site-foot .widget a {
    color: #e8e3dd;
}

.site-foot .widget a:hover {
    color: var(--saffron);
}

.site-foot .widget .post-date,
.site-foot .widget time {
    color: #b4ada4;
}

.site-foot .widget ul li::before {
    content: '— ';
    color: var(--copper);
}

.foot-bottom {
    margin-top: 2.5em;
    padding-top: 1.4em;
    border-top: 1px solid rgba(255, 249, 240, 0.12);
    text-align: center;
    font-size: 0.85rem;
    color: #b4ada4;
}

/* ---------- Пагинация ---------- */
.pagination {
    margin: 2em 0 1em;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
    justify-content: center;
}

.pagination .page-numbers {
    display: inline-block;
    min-width: 38px;
    padding: 0.55em 0.85em;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    color: var(--ink);
    font-size: 0.92rem;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    line-height: 1;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--copper);
    border-color: var(--copper);
    color: var(--bg-soft);
}

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

.pagination .page-numbers.dots:hover {
    background: transparent;
    color: var(--ink);
}

/* ---------- Главная ---------- */
.hero {
    padding: 3em 0 2em;
    margin-bottom: 2em;
}

.hero-kicker {
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--copper);
    margin-bottom: 1.2em;
}

.hero-title {
    font-size: clamp(2.2rem, 5.5vw, 4.2rem);
    line-height: 1.05;
    letter-spacing: -0.015em;
    margin: 0 0 0.6em;
    font-weight: 500;
}

.hero-title .accent {
    font-family: var(--font-accent);
    font-style: italic;
    color: var(--copper);
}

.hero-lead {
    font-size: 1.15rem;
    color: var(--ink-soft);
    max-width: 640px;
    margin: 0 0 1.8em;
    line-height: 1.55;
}

.hero-actions {
    display: flex;
    gap: 0.9em;
    flex-wrap: wrap;
}

/* Тематические секции главной */
.section {
    padding: 2.5em 0;
}

.section + .section { border-top: 1px solid var(--line-soft); }

.section-head {
    margin-bottom: 1.8em;
    max-width: 720px;
}

.section-num {
    font-family: var(--font-accent);
    font-style: italic;
    font-size: 1.3rem;
    color: var(--copper);
    display: block;
    margin-bottom: 0.4em;
}

.section-title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    margin: 0 0 0.5em;
    line-height: 1.15;
}

.section-lead {
    color: var(--ink-soft);
    font-size: 1.02rem;
}

.tile-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 1.5em;
}

.tile {
    background: var(--bg-soft);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    padding: 1.6em 1.6em 1.8em;
    min-width: 0;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

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

.tile-num {
    font-family: var(--font-accent);
    font-style: italic;
    font-size: 1.8rem;
    color: var(--copper);
    display: block;
    margin-bottom: 0.4em;
    line-height: 1;
}

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

.tile-text {
    color: var(--ink-soft);
    font-size: 0.96rem;
    line-height: 1.55;
    margin: 0;
}

/* ---------- Поиск / 404 ---------- */
.searchform {
    display: flex;
    gap: 0.5em;
    margin: 1em 0;
    max-width: 460px;
}

.searchform input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 0.7em 1em;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--bg-soft);
    color: var(--ink);
    font-family: var(--font-base);
    font-size: 0.95rem;
}

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

.no-results {
    padding: 2em 2.2em;
    background: var(--bg-soft);
    border-radius: var(--radius);
    border: 1px solid var(--line-soft);
}

.error-404 {
    text-align: center;
    padding: 3em 1em;
}

.error-404 .big {
    font-family: var(--font-accent);
    font-style: italic;
    font-size: clamp(5rem, 14vw, 9rem);
    color: var(--copper);
    line-height: 1;
    margin: 0 0 0.2em;
}

/* ---------- Комментарии ---------- */
.comments-area {
    margin-top: 2em;
    padding: 1.8em 2em;
    background: var(--bg-soft);
    border-radius: var(--radius);
    border: 1px solid var(--line-soft);
}

.comments-title {
    margin: 0 0 1.4em;
    font-size: 1.25rem;
}

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

.comment-list li {
    padding: 1em 0;
    border-bottom: 1px solid var(--line-soft);
}

.comment-list li:last-child { border-bottom: none; }

.comment-list .children {
    list-style: none;
    margin-top: 0.8em;
    padding-left: 1.4em;
    border-left: 2px solid var(--line-soft);
}

.comment-author {
    font-weight: 500;
    color: var(--ink);
}

.comment-meta {
    font-size: 0.82rem;
    color: var(--ink-soft);
    margin-bottom: 0.5em;
}

.comment-body p { margin: 0.4em 0; }

.comment-form label {
    display: block;
    font-size: 0.9rem;
    margin-top: 0.8em;
    margin-bottom: 0.25em;
    color: var(--ink-soft);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.7em 0.9em;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg);
    font-family: var(--font-base);
    font-size: 0.95rem;
    color: var(--ink);
}

.comment-form textarea { min-height: 130px; resize: vertical; }

@media (max-width: 600px) {
    .comments-area { padding: 1.3em 1.2em; }
}

/* ---------- Cookie-баннер (см. A11, D6) ---------- */
.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 50%;
    bottom: 1.2em;
    transform: translateX(-50%);
    width: min(92%, 720px);
    background: var(--ink);
    color: #f5f3f0;
    padding: 1em 1.3em;
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 1.2em;
    z-index: 9999;
    font-size: 0.9rem;
    line-height: 1.45;
}

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

.cookie-banner a {
    color: var(--saffron);
    text-decoration: underline;
}

.cookie-banner .btn {
    padding: 0.55em 1.3em;
    font-size: 0.88rem;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .cookie-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        bottom: 0.5em;
    }
}

/* ---------- Адаптив шапки ---------- */
@media (max-width: 800px) {
    .head-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1em;
    }
    .site-nav ul {
        gap: 0.3em 1.2em;
    }
    .brand-desc {
        display: none;
    }
}

/* ---------- WP-обязательное ---------- */
.alignleft { float: left; margin: 0.4em 1.2em 0.8em 0; }
.alignright { float: right; margin: 0.4em 0 0.8em 1.2em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide, .alignfull { margin-left: auto; margin-right: auto; }

.wp-caption {
    max-width: 100%;
    margin-bottom: 1em;
}

.wp-caption-text {
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin-top: 0.4em;
    text-align: center;
}

.sticky { /* плейсхолдер для sticky-постов */ }
.gallery-caption { font-size: 0.85rem; color: var(--ink-soft); }
.bypostauthor { /* плейсхолдер */ }
.screen-reader-text {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    border: 0;
}

/* ---------- Утилитарные ---------- */
.entry-content > *:first-child { margin-top: 0; }
.entry-content > *:last-child { margin-bottom: 0; }
