/*
Theme Name: dds_alisakayfer.ru
Theme URI: https://alisakayfer.ru
Author: Селезнева Мила
Author URI: https://alisakayfer.ru
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: dds_alisakayfer
*/

/* === Цветовая палитра и переменные === */
:root {
    --bg-base: #FDF8F5;
    --bg-card: #FFFFFF;
    --accent-terra: #D48C7A;
    --accent-terra-soft: #E8B4A6;
    --accent-sea: #7A9E9E;
    --text-main: #2E2A28;
    --text-sub: #5A524E;
    --line-soft: #EBDED5;
    --shadow-soft: 0 4px 18px rgba(180, 140, 120, 0.08);
}

/* === Базовый сброс === */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Georgia', 'PT Serif', serif;
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-main);
    background-color: var(--bg-base);
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 40 Q20 30 40 40 T80 40' stroke='%23EBDED5' stroke-width='0.5' fill='none' opacity='0.4'/%3E%3C/svg%3E");
}

p {
    margin: 0 0 1em;
}

a { color: var(--accent-terra); text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--accent-sea); }

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

h1, h2, h3, h4, h5, h6 {
    font-family: 'Helvetica Neue', 'Arial', sans-serif;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-main);
    margin: 1.4em 0 0.6em;
    line-height: 1.3;
}
h1 { font-size: 2.1em; }
h2 { font-size: 1.65em; }
h3 { font-size: 1.35em; }
h4 { font-size: 1.15em; }

/* Таблицы */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    background: var(--bg-card);
    border: 1px solid var(--line-soft);
}
th, td {
    border: 1px solid var(--line-soft);
    padding: 10px 14px;
    text-align: left;
}
th { background: var(--bg-base); color: var(--text-sub); font-weight: 600; }

/* Цитаты — имитация капли воды на белом */
blockquote {
    margin: 1.5em 0;
    padding: 1.2em 1.6em;
    background: var(--bg-card);
    border-left: 3px solid var(--accent-sea);
    border-radius: 4px 22px 22px 4px;
    color: var(--text-sub);
    font-style: italic;
    box-shadow: var(--shadow-soft);
    position: relative;
}
blockquote::before {
    content: '”';
    position: absolute;
    top: -10px; left: 18px;
    font-size: 3em;
    color: var(--accent-sea);
    opacity: 0.3;
    font-family: serif;
}

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

/* === Шапка === */
.site-head {
    background: var(--bg-card);
    border-bottom: 1px solid var(--line-soft);
    padding: 18px 0;
}
.site-head .wrap {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
    justify-content: space-between;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--text-main);
}
.brand-logo {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}
.brand-text { line-height: 1.2; }
.brand-name {
    display: block;
    font-family: 'Helvetica Neue', sans-serif;
    font-size: 1.15em;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--text-main);
}
.brand-desc {
    display: block;
    font-size: 0.82em;
    color: var(--text-sub);
    margin-top: 3px;
    max-width: 360px;
}

/* Главное меню */
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 26px;
    flex-wrap: wrap;
}
.main-nav a {
    color: var(--text-main);
    font-family: 'Helvetica Neue', sans-serif;
    font-size: 0.96em;
    letter-spacing: 0.03em;
    padding: 6px 2px;
    position: relative;
    transition: color .2s ease;
}
.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a {
    color: var(--accent-terra);
}
.main-nav .current-menu-item > a::after,
.main-nav .current_page_item > a::after,
.main-nav a:hover::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -4px;
    height: 6px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 6'%3E%3Cpath d='M0 3 Q10 0 20 3 T40 3 T60 3 T80 3' stroke='%23D48C7A' stroke-width='1.3' fill='none'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-size: 40px 6px;
}

/* Кнопка-гамбургер */
.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--line-soft);
    border-radius: 30px;
    padding: 8px 16px;
    color: var(--text-sub);
    cursor: pointer;
    font-family: inherit;
}

/* Поиск-иконка в шапке */
.head-search { position: relative; }
.head-search-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--accent-terra);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .25s ease;
    color: var(--accent-terra);
}
.head-search-toggle:hover {
    background: var(--accent-terra);
    color: #fff;
}
.head-search-form {
    position: absolute;
    right: 0;
    top: 50px;
    background: var(--bg-card);
    border: 1px solid var(--line-soft);
    border-radius: 30px;
    padding: 6px;
    display: none;
    box-shadow: var(--shadow-soft);
    z-index: 20;
}
.head-search-form[data-open="1"] { display: flex; }
.head-search-form input[type="search"] {
    border: none;
    outline: none;
    padding: 8px 14px;
    width: 220px;
    background: transparent;
    font-family: inherit;
    color: var(--text-main);
}
.head-search-form button {
    border: none;
    background: var(--accent-terra);
    color: #fff;
    border-radius: 30px;
    padding: 6px 14px;
    cursor: pointer;
    font-family: inherit;
}

/* === Кнопки === */
.btn {
    display: inline-block;
    padding: 10px 26px;
    border-radius: 30px;
    border: 1.5px solid var(--accent-terra);
    background: transparent;
    color: var(--accent-terra);
    font-family: 'Helvetica Neue', sans-serif;
    font-size: 0.94em;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all .25s ease;
    text-decoration: none;
}
.btn:hover {
    background: var(--accent-terra);
    color: #fff;
}
.btn-sm {
    padding: 5px 14px;
    font-size: 0.82em;
    border-radius: 20px;
    border-style: dashed;
    border-width: 1px;
}

/* === Layout: контент + сайдбар === */
.layout {
    display: flex;
    gap: 32px;
    padding: 36px 0;
    align-items: flex-start;
}
.content-area { flex: 1; min-width: 0; }
.has-sidebar .content-area { flex: 0 0 67%; }
.has-sidebar .sidebar { flex: 0 0 27%; }
.no-sidebar .content-area { flex: 0 0 85%; margin: 0 auto; }
.full-width .content-area { width: 100%; }

/* === Хлебные крошки === */
.breadcrumbs {
    font-size: 0.86em;
    color: var(--text-sub);
    margin-bottom: 18px;
    padding: 8px 0;
}
.breadcrumbs a { color: var(--accent-sea); }
.breadcrumbs .sep { margin: 0 8px; color: var(--accent-terra-soft); }

/* === Карточки записей === */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 26px;
    align-items: start;
}
.cards-stagger > .card:nth-child(odd)  { margin-top: 0;   }
.cards-stagger > .card:nth-child(even) { margin-top: 28px; }

.card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(180, 140, 120, 0.14);
}
.card-thumb {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: #f0e6df;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 100'%3E%3Cpath d='M0 50 Q25 30 50 50 T100 50 T150 50 T200 50' stroke='%23a47c63' stroke-width='1.5' fill='none' opacity='0.5'/%3E%3Cpath d='M0 65 Q25 45 50 65 T100 65 T150 65 T200 65' stroke='%23a47c63' stroke-width='1.5' fill='none' opacity='0.35'/%3E%3Cpath d='M0 35 Q25 15 50 35 T100 35 T150 35 T200 35' stroke='%23a47c63' stroke-width='1.5' fill='none' opacity='0.35'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}
.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: 16 / 10;
}
.card-body {
    flex: 1;
    padding: 18px 20px 22px;
    display: flex;
    flex-direction: column;
}
.card-cats {
    font-size: 0.76em;
    color: var(--text-sub);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.card-cats a { color: var(--accent-sea); }
.card-title {
    margin: 4px 0 10px;
    font-size: 1.18em;
    line-height: 1.3;
}
.card-title a { color: var(--text-main); }
.card-title a:hover { color: var(--accent-terra); }
.card-icon {
    display: inline-block;
    margin-right: 6px;
    color: var(--accent-terra);
    vertical-align: middle;
}
.card-meta {
    font-size: 0.82em;
    color: var(--text-sub);
    margin-bottom: 10px;
}
.card-excerpt {
    color: var(--text-sub);
    font-size: 0.95em;
    margin-bottom: 14px;
    flex: 1;
}
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-foot { margin-top: auto; }

/* === Сайдбар === */
.sidebar {
    background: var(--bg-card);
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    padding: 22px 22px;
    box-shadow: var(--shadow-soft);
    position: relative;
}
.sidebar::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 6px;
    border-radius: 14px 0 0 14px;
    background: linear-gradient(to bottom, #E89A6E, #E8C66E, #B6CC78, #7AB97A);
}
.widget {
    margin-bottom: 26px;
    padding-left: 8px;
}
.widget:last-child { margin-bottom: 0; }
.widget-title {
    font-size: 1.05em;
    color: var(--text-main);
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--line-soft);
    font-family: 'Helvetica Neue', sans-serif;
    letter-spacing: 0.04em;
}
.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.widget ul li {
    padding: 6px 0;
    border-bottom: 1px solid var(--line-soft);
    font-size: 0.94em;
}
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--text-sub); }
.widget ul li a:hover { color: var(--accent-terra); }

/* === Главная страница === */
.front-section {
    background: var(--bg-card);
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    padding: 36px 36px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-soft);
}
.front-section h2 {
    margin-top: 0;
    color: var(--accent-terra);
    border-bottom: 1px solid var(--line-soft);
    padding-bottom: 12px;
}
.front-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-top: 18px;
}
.front-col {
    padding: 18px;
    background: var(--bg-base);
    border-radius: 12px;
    border: 1px solid var(--line-soft);
}
.front-col h3 {
    margin-top: 0;
    font-size: 1.1em;
    color: var(--accent-sea);
}
.front-steps {
    counter-reset: step;
    margin-top: 18px;
    padding: 0;
    list-style: none;
}
.front-steps li {
    counter-increment: step;
    padding: 14px 14px 14px 60px;
    position: relative;
    background: var(--bg-base);
    margin-bottom: 12px;
    border-radius: 10px;
    border: 1px solid var(--line-soft);
}
.front-steps li::before {
    content: counter(step);
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--accent-terra);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Helvetica Neue', sans-serif;
    font-weight: 600;
}
.front-latest h2 {
    border: none;
    text-align: center;
    margin-bottom: 20px;
}

/* === Запись и страница === */
.entry-content {
    background: var(--bg-card);
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    padding: 30px 34px;
    box-shadow: var(--shadow-soft);
}
.entry-title { margin-top: 0; }
.entry-meta {
    font-size: 0.86em;
    color: var(--text-sub);
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--line-soft);
}
.entry-meta a { color: var(--accent-sea); }
.entry-thumbnail {
    margin: 0 -34px 24px;
    overflow: hidden;
}
.entry-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}
.entry-content p { line-height: 1.7; }

/* === Пагинация === */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin: 36px 0 14px;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--line-soft);
    border-radius: 30px;
    background: var(--bg-card);
    color: var(--text-sub);
    font-family: 'Helvetica Neue', sans-serif;
    font-size: 0.92em;
    text-decoration: none;
    transition: all .2s ease;
}
.pagination .page-numbers:hover {
    border-color: var(--accent-terra);
    color: var(--accent-terra);
}
.pagination .page-numbers.current {
    background: var(--accent-terra);
    border-color: var(--accent-terra);
    color: #fff;
}
.pagination .dots { border: none; background: transparent; }

/* === Комментарии === */
.comments-area {
    margin-top: 32px;
    background: var(--bg-card);
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    padding: 26px 30px;
}
.comments-title {
    margin-top: 0;
    font-size: 1.3em;
    color: var(--text-main);
}
.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.comment-list .comment {
    padding: 16px 0;
    border-bottom: 1px dashed var(--line-soft);
}
.comment-list .comment:last-child { border-bottom: none; }
.comment-list .children {
    list-style: none;
    margin: 14px 0 0 26px;
    padding: 0 0 0 18px;
    border-left: 2px solid var(--line-soft);
}
.comment-meta {
    font-size: 0.85em;
    color: var(--text-sub);
    margin-bottom: 6px;
}
.comment-author { font-weight: 600; color: var(--text-main); }
.comment-form label {
    display: block;
    font-size: 0.9em;
    color: var(--text-sub);
    margin-bottom: 4px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95em;
    background: var(--bg-base);
    color: var(--text-main);
    margin-bottom: 14px;
}
.comment-form textarea { min-height: 120px; resize: vertical; }
.comment-form .submit { /* пользует .btn-style ниже */ }

/* === Форма поиска === */
.search-form {
    display: flex;
    gap: 8px;
    margin: 16px 0;
}
.search-form input[type="search"] {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--line-soft);
    border-radius: 30px;
    background: var(--bg-card);
    font-family: inherit;
    font-size: 0.95em;
    color: var(--text-main);
}
.search-form button {
    padding: 10px 20px;
    border: 1.5px solid var(--accent-terra);
    border-radius: 30px;
    background: transparent;
    color: var(--accent-terra);
    cursor: pointer;
    font-family: 'Helvetica Neue', sans-serif;
    transition: all .2s ease;
}
.search-form button:hover {
    background: var(--accent-terra);
    color: #fff;
}

/* === 404 === */
.error-404 {
    background: var(--bg-card);
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    padding: 40px 36px;
    text-align: center;
    box-shadow: var(--shadow-soft);
}
.error-404 h1 {
    font-size: 4em;
    margin: 0 0 10px;
    color: var(--accent-terra);
}

/* === Подвал === */
.site-foot {
    background: var(--bg-card);
    border-top: 1px solid var(--line-soft);
    margin-top: 48px;
    padding: 36px 0 18px;
    color: var(--text-sub);
}
.foot-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 26px;
    position: relative;
}
.foot-col {
    padding: 0 14px;
    position: relative;
}
.foot-col + .foot-col::before {
    content: '';
    position: absolute;
    left: -16px; top: 10%; bottom: 10%;
    width: 1px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 40'%3E%3Cpath d='M0 0 L1 5 L0 10 L1 15 L0 20 L1 25 L0 30 L1 35 L0 40' stroke='%23D48C7A' stroke-width='0.7' fill='none' opacity='0.5'/%3E%3C/svg%3E");
    background-size: 1px 12px;
    background-repeat: repeat-y;
}
.foot-col h4 {
    margin: 0 0 12px;
    font-size: 1em;
    color: var(--text-main);
    letter-spacing: 0.05em;
}
.foot-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.foot-col ul li { padding: 5px 0; font-size: 0.92em; }
.foot-col ul li a { color: var(--text-sub); }
.foot-col ul li a:hover { color: var(--accent-terra); }
.foot-author {
    text-align: center;
    font-style: italic;
    color: var(--text-sub);
    line-height: 1.6;
}
.foot-author strong {
    display: block;
    color: var(--text-main);
    font-style: normal;
    margin-bottom: 4px;
}
.foot-copy {
    border-top: 1px dashed var(--line-soft);
    padding-top: 14px;
    text-align: center;
    font-size: 0.85em;
    color: var(--text-sub);
}

/* === Кнопка «Вверх» (капля) === */
.to-top[hidden] { display: none !important; }
.to-top {
    position: fixed;
    right: 22px;
    bottom: 88px;
    width: 46px;
    height: 46px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: none;
    background: var(--accent-terra);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(180, 140, 120, 0.3);
    transition: all .3s ease;
    z-index: 30;
}
.to-top:hover {
    background: var(--accent-sea);
    transform: rotate(-45deg) translate(4px, -4px);
}
.to-top svg { transform: rotate(45deg); }

/* === Cookie-баннер (правило A11) === */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    background: var(--bg-card);
    border: 1px solid var(--accent-terra);
    border-radius: 14px;
    padding: 16px 22px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    box-shadow: 0 6px 24px rgba(180, 140, 120, 0.18);
    z-index: 40;
    color: var(--text-sub);
    font-size: 0.92em;
}
.cookie-banner p { margin: 0; flex: 1 1 280px; }
.cookie-banner .btn { flex: 0 0 auto; }

/* === Адаптив === */
@media (max-width: 960px) {
    .front-cols { grid-template-columns: 1fr 1fr; }
    .has-sidebar .content-area,
    .has-sidebar .sidebar { flex: 0 0 100%; }
    .layout { flex-direction: column; }
    .foot-cols { grid-template-columns: 1fr; gap: 22px; }
    .foot-col + .foot-col::before { display: none; }
    .foot-col { padding: 0; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 1.7em; }
    h2 { font-size: 1.4em; }
    .wrap { padding: 0 14px; }
    .site-head .wrap { gap: 12px; }
    .menu-toggle { display: inline-block; }
    .main-nav {
        flex: 1 1 100%;
        order: 5;
        display: none;
    }
    .main-nav[data-open="1"] { display: block; }
    .main-nav ul {
        flex-direction: column;
        gap: 0;
        background: var(--bg-base);
        border-radius: 10px;
        padding: 8px 14px;
    }
    .main-nav ul li {
        border-bottom: 1px dashed var(--line-soft);
    }
    .main-nav ul li:last-child { border-bottom: none; }
    .cards-grid { grid-template-columns: 1fr; gap: 18px; }
    .cards-stagger > .card:nth-child(even) { margin-top: 0; }
    .front-section { padding: 22px 20px; }
    .front-cols { grid-template-columns: 1fr; }
    .entry-content { padding: 22px 20px; }
    .entry-thumbnail { margin: 0 -20px 18px; }
    .head-search-form input[type="search"] { width: 160px; }
    .cookie-banner {
        left: 8px; right: 8px; bottom: 8px;
        padding: 14px 16px;
    }
}
