/*
Theme Name: dds_dmmbarts.com
Author: Анна Захарова
Description: Тема для образовательной онлайн-платформы, где культура и творческие практики служат инструментами развития прикладных и гибких навыков.
Version: 1.1
Text Domain: artlake
*/

/* =========================================================================
   Переменные и базовый сброс
   ========================================================================= */
:root {
    --ink: #1a2a2e;
    --petrol: #225b63;
    --petrol-2: #2f7882;
    --clay: #c2693a;
    --clay-soft: #e0a06f;
    --cream: #f6f0e6;
    --paper: #fffdf8;
    --paper-2: #fbf6ec;
    --line: #e4dccc;
    --text: #2b2823;
    --muted: #6f685d;
    --light: #f3ece0;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(26, 42, 46, 0.08);
    --shell: min(92%, 1180px);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Georgia", "Iowan Old Style", "Times New Roman", serif;
    color: var(--text);
    background: var(--cream);
    line-height: 1.7;
    font-size: 18px;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.2;
    color: var(--ink);
    margin: 0 0 0.5em;
    font-weight: 700;
}

h1 { font-size: 2.1rem; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.25rem; }

p {
    margin: 0 0 1.1em;
}

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

a:hover {
    color: var(--clay);
}

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

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

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.btn {
    display: inline-block;
    background: var(--clay);
    color: #fff;
    padding: 0.7em 1.5em;
    border-radius: 999px;
    font-family: "Segoe UI", Arial, sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn:hover {
    background: #a9572c;
    color: #fff;
    transform: translateY(-1px);
}

/* =========================================================================
   Шапка
   ========================================================================= */
.site-header {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.1rem 0;
    flex-wrap: wrap;
}

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

.brand-logo {
    flex: 0 0 auto;
    display: block;
}

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

.brand-name {
    display: block;
    font-family: "Segoe UI", Arial, sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--ink);
    line-height: 1.25;
    max-width: 32ch;
}

.brand-desc {
    display: block;
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.4;
    max-width: 46ch;
    margin-top: 0.2rem;
}

/* Навигация */
.main-nav {
    font-family: "Segoe UI", Arial, sans-serif;
}

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

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.nav-menu a {
    display: block;
    padding: 0.5rem 0.9rem;
    color: var(--ink);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a {
    background: var(--light);
    color: var(--petrol);
}

/* =========================================================================
   Раскладки
   ========================================================================= */
.page-wrap {
    padding: 2.5rem 0 3rem;
}

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

.layout-single {
    display: block;
}

.layout-single .content-area {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

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

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

.widget {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.3rem 1.4rem;
    margin-bottom: 1.5rem;
}

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

.sidebar .widget,
.sidebar .widget a {
    color: var(--text);
}

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

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

.widget ul li {
    padding: 0.45rem 0;
    border-bottom: 1px dashed var(--line);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 0.95rem;
}

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

.widget .post-date {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
}

/* =========================================================================
   Карточки записей (см. A8, A10)
   ========================================================================= */
.card-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.6rem;
}

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

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(26, 42, 46, 0.12);
}

/* Горизонтальная карточка с position:absolute на ссылке (см. A10) */
.card-row {
    flex-direction: row;
}

.card-thumb-wrap {
    flex: 0 0 280px;
    position: relative;
    overflow: hidden;
    background: var(--light);
}

.card-thumb-wrap a {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-no-thumb .card-thumb-wrap {
    background: linear-gradient(135deg, var(--petrol), var(--petrol-2));
}

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

.card-meta {
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 0.8rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.card-title {
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
}

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

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

.card-excerpt {
    color: var(--text);
    margin-bottom: 1rem;
}

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

.card-more {
    margin-top: auto;
    align-self: flex-start;
}

/* =========================================================================
   Контент записи / страницы
   ========================================================================= */
.entry {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem 2.2rem;
    box-shadow: var(--shadow);
}

.entry-thumb {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

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

.entry-title {
    margin-bottom: 0.4rem;
}

.entry-meta {
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 1.4rem;
}

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

.entry-content h2,
.entry-content h3 {
    margin-top: 1.6rem;
}

.entry-content img {
    border-radius: 10px;
    display: block;
}

.entry-content ul,
.entry-content ol {
    padding-left: 1.4rem;
}

.entry-content blockquote {
    margin: 1.4rem 0;
    padding: 0.6rem 1.4rem;
    border-left: 4px solid var(--clay);
    background: var(--paper-2);
    color: var(--muted);
    font-style: italic;
}

/* Таблицы */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4rem 0;
}

.entry-content table,
.entry-content th,
.entry-content td {
    border: 1px solid var(--line);
}

.entry-content th,
.entry-content td {
    padding: 0.6rem 0.8rem;
    text-align: left;
}

.entry-content th {
    background: var(--light);
}

.page-title {
    margin-bottom: 1.5rem;
}

/* =========================================================================
   Хлебные крошки
   ========================================================================= */
.trail {
    width: var(--shell);
    margin-inline: auto;
    padding: 1rem 0 0;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 0.85rem;
    color: var(--muted);
}

.trail a {
    color: var(--petrol);
}

.trail .sep {
    margin: 0 0.4rem;
    color: var(--clay-soft);
}

/* =========================================================================
   Пагинация (type => plain, см. D5)
   ========================================================================= */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    margin-top: 2.4rem;
    font-family: "Segoe UI", Arial, sans-serif;
}

.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.7rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    color: var(--ink);
    font-weight: 600;
    font-size: 0.95rem;
}

.pager a.page-numbers:hover {
    background: var(--light);
    border-color: var(--clay-soft);
    color: var(--petrol);
}

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

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

/* =========================================================================
   Главная — секции
   ========================================================================= */
.front {
    padding: 0 0 3rem;
}

.front-shell {
    width: 85%;
    margin-inline: auto;
}

.hero {
    background: var(--ink);
    color: #f3ece0;
}

.section {
    padding: 3rem 0;
}

.section-alt {
    background: var(--paper-2);
}

.section-head {
    text-align: center;
    max-width: 60ch;
    margin: 0 auto 2rem;
}

.section-head h2 {
    margin-bottom: 0.6rem;
}

.section-head p {
    color: var(--muted);
}

/* Слайдер */
.slider {
    position: relative;
    overflow: hidden;
}

.slides {
    position: relative;
}

.slide {
    display: none;
    position: relative;
}

.slide.is-active {
    display: block;
}

.slide img {
    width: 100%;
    height: 460px;
    object-fit: cover;
    display: block;
}

.slide-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2rem;
    background: linear-gradient(to top, rgba(20, 32, 35, 0.85), rgba(20, 32, 35, 0));
    color: #fff;
}

.slide-caption h2 {
    color: #fff;
    margin-bottom: 0.3rem;
}

.slide-caption p {
    margin: 0;
    color: #f0e6d6;
    max-width: 60ch;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.85);
    border: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--ink);
    z-index: 2;
}

.slider-prev { left: 1rem; }
.slider-next { right: 1rem; }

.slider-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 2;
}

.slider-dots button {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0;
}

.slider-dots button.is-active {
    background: var(--clay-soft);
}

/* Сетка тематических карточек на главной */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
}

.feature {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.6rem;
    box-shadow: var(--shadow);
}

.feature img,
.feature svg {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    margin-bottom: 1rem;
}

.feature h3 {
    margin-bottom: 0.4rem;
}

.feature p {
    color: var(--muted);
    font-size: 0.95rem;
    margin: 0;
}

/* Блок «как мы работаем» — шаги */
.steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
    counter-reset: step;
}

.step {
    background: var(--paper);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    padding: 1.6rem;
    position: relative;
}

.step::before {
    counter-increment: step;
    content: counter(step);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--clay);
    color: #fff;
    font-family: "Segoe UI", Arial, sans-serif;
    font-weight: 700;
    margin-bottom: 0.9rem;
}

.step h3 {
    margin-bottom: 0.4rem;
}

.step p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

/* Лента последних записей на главной */
.front-posts .card-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.front-cta {
    text-align: center;
    margin-top: 2rem;
}

/* Галерея вдохновения */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.gallery-grid figure {
    margin: 0;
    border-radius: 10px;
    overflow: hidden;
}

.gallery-grid img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

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

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

.comment-list .children {
    list-style: none;
    margin-left: 1.5rem;
    padding-left: 0;
}

.comment-item {
    margin-bottom: 1.2rem;
}

.comment-inner {
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1rem 1.2rem;
}

.comment-head {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 0.85rem;
}

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

.comment-date {
    color: var(--muted);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    background: var(--paper);
    margin-bottom: 0.9rem;
}

.comment-form .submit,
.comment-form input[type="submit"] {
    background: var(--clay);
    color: #fff;
    border: 0;
    padding: 0.7em 1.6em;
    border-radius: 999px;
    font-family: "Segoe UI", Arial, sans-serif;
    font-weight: 600;
    cursor: pointer;
}

/* =========================================================================
   Форма поиска
   ========================================================================= */
.search-form {
    display: flex;
    gap: 0.5rem;
    max-width: 460px;
}

.search-form .search-field {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    background: var(--paper);
}

.search-form .search-submit {
    background: var(--petrol);
    color: #fff;
    border: 0;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-family: "Segoe UI", Arial, sans-serif;
    font-weight: 600;
    cursor: pointer;
}

/* =========================================================================
   404
   ========================================================================= */
.notfound {
    text-align: center;
    padding: 3rem 0;
}

.notfound .code {
    font-size: 5rem;
    font-family: "Segoe UI", Arial, sans-serif;
    font-weight: 800;
    color: var(--clay-soft);
    line-height: 1;
}

.notfound .search-form {
    margin: 1.6rem auto 0;
}

/* =========================================================================
   Подвал
   ========================================================================= */
.site-footer {
    background: var(--ink);
    color: #d8d0c2;
    padding: 3rem 0 1.4rem;
    margin-top: 2rem;
}

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

.site-footer .widget {
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
}

.site-footer .widget-title {
    color: #fff;
    border-bottom-color: rgba(224, 160, 111, 0.5);
}

/* Явный контраст текста виджетов в футере (см. F) */
.site-footer .widget,
.site-footer .widget p,
.site-footer .widget li,
.site-footer .widget .post-date {
    color: #cfc7b8;
}

.site-footer .widget a {
    color: #ead9c2;
}

.site-footer .widget a:hover {
    color: var(--clay-soft);
}

.site-footer .widget ul li {
    border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}

.footer-bottom {
    margin-top: 2.4rem;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
    font-size: 0.85rem;
    color: #a59d8f;
}

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

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    background: var(--ink);
    color: #ede5d6;
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.18);
}

.cookie-banner p {
    margin: 0;
    font-size: 0.9rem;
    max-width: 70ch;
}

.cookie-banner .btn {
    flex: 0 0 auto;
}

/* =========================================================================
   Адаптив
   ========================================================================= */
@media (max-width: 960px) {
    .layout-with-sidebar {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .feature-grid,
    .steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .front-posts .card-list {
        grid-template-columns: 1fr;
    }
    .footer-cols {
        grid-template-columns: 1fr;
        gap: 1.6rem;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 17px;
    }
    h1 { font-size: 1.7rem; }
    h2 { font-size: 1.4rem; }

    .nav-toggle {
        display: inline-block;
    }
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 0.8rem;
    }
    .nav-menu.is-open {
        display: flex;
    }
    .main-nav {
        width: 100%;
    }
    .header-inner {
        align-items: flex-start;
    }

    .layout-single .content-area {
        width: 100%;
    }
    .entry,
    .comments-area {
        padding: 1.4rem 1.2rem;
    }

    .feature-grid,
    .steps,
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    /* Горизонтальная карточка → вертикальная (сброс absolute, см. A10) */
    .card-row {
        flex-direction: column;
    }
    .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
    }
    .card-thumb-wrap a {
        position: static;
    }
    .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .slide img {
        height: 280px;
    }
    .slide-caption {
        padding: 1.2rem;
    }
}
