/*
Theme Name: dds_globalresinart.com
Author: Дарья Воронцова
Description: Образовательный блог о творческом обучении и современных хобби — тема в природной палитре эпоксидной смолы.
Version: 1.1
Text Domain: gra
*/

/* ============================================================
   Цветовая палитра и базовые переменные
   ============================================================ */
:root {
    --bg: #FDF8F0;
    --amber: #E6A157;
    --amber-dark: #d28d3c;
    --aqua: #2A9D8F;
    --ink: #2C3E50;
    --terracotta: #CD5C5C;
    --rose: #D4A5A5;
    --card: #ffffff;
    --muted: #6b7785;
    --line: #ece3d4;
    --footer-bg: #26323F;
    --footer-text: #e9eef3;
    --footer-muted: #aab6c2;
}

/* ============================================================
   Сброс и база
   ============================================================ */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background-color: var(--bg);
    color: var(--ink);
    font-family: 'Spectral', Georgia, 'Times New Roman', serif;
    font-size: 18px;
    line-height: 1.7;
    overflow-x: hidden;
}

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

a { color: var(--aqua); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', 'Segoe UI', Tahoma, sans-serif;
    color: var(--ink);
    line-height: 1.25;
    margin: 0 0 0.6em;
    letter-spacing: -0.01em;
}

p { margin: 0 0 1.1em; }

/* Декоративная «смоляная» линия у заголовков H1 и H2 */
.content-area h1,
.content-area h2,
.section-title {
    position: relative;
    padding-bottom: 0.4em;
}
.content-area h1::after,
.content-area h2::after,
.section-title::after {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    bottom: 0;
    width: 96px;
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(90deg, rgba(230,161,87,0) 0%, var(--amber) 35%, var(--aqua) 65%, rgba(42,157,143,0) 100%);
}
.section-title.center { text-align: center; }
.section-title.center::after { left: 50%; transform: translateX(-50%); }

/* ============================================================
   Контейнер ширины — единственный источник истины
   ============================================================ */
.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

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

/* ============================================================
   Кнопки в стиле «капля смолы»
   ============================================================ */
.btn,
button.btn,
.wp-block-button__link {
    display: inline-block;
    background: var(--amber);
    color: #ffffff;
    border: none;
    padding: 0.72em 1.7em;
    font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    border-radius: 40% 20% 50% 30% / 30% 45% 25% 55%;
    box-shadow: 0 8px 18px rgba(230, 161, 87, 0.28);
    transition: box-shadow 0.3s ease, transform 0.3s ease, background 0.4s ease;
}
.btn:hover,
button.btn:hover {
    text-decoration: none;
    color: #fff;
    background: linear-gradient(120deg, var(--amber) 0%, var(--aqua) 120%);
    box-shadow: 0 14px 26px rgba(42, 157, 143, 0.3);
    transform: translateY(-2px);
}
.btn::after {
    content: "";
    position: absolute;
    top: -60%;
    left: -30%;
    width: 50%;
    height: 220%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(20deg) translateX(-120%);
    transition: transform 0.6s ease;
    pointer-events: none;
}
.btn:hover::after { transform: rotate(20deg) translateX(320%); }

/* ============================================================
   Шапка
   ============================================================ */
.site-header {
    background: var(--card);
    border-bottom: 1px solid var(--line);
    padding: 18px 0;
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.brand-logo,
.brand-fallback {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    display: block;
}
.brand-text { min-width: 0; }
.site-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.18rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}
.site-title a { color: var(--ink); }
.site-title a:hover { text-decoration: none; color: var(--amber-dark); }
.site-desc {
    margin: 4px 0 0;
    font-size: 0.86rem;
    color: var(--muted);
    line-height: 1.4;
    max-width: 640px;
}

/* Навигация (не липкая) */
.main-nav {
    margin-left: auto;
    min-width: 0;
}
.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    margin: 0;
    padding: 0;
}
.main-nav a {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--ink);
    font-weight: 500;
    font-size: 0.98rem;
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
}
.main-nav a:hover {
    text-decoration: none;
    color: var(--amber-dark);
    border-bottom-color: var(--amber);
}
.main-nav .current-menu-item > a {
    color: var(--aqua);
    border-bottom-color: var(--aqua);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    background: none;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--ink);
}

/* ============================================================
   Основная раскладка
   ============================================================ */
.site-main { padding: 36px 0 52px; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67%) minmax(0, 27%);
    gap: 6%;
    align-items: start;
}
.layout-single { display: block; }
.layout-single .content-area {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .layout-single .content-area { width: 100%; }
}

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

/* ============================================================
   Хлебные крошки
   ============================================================ */
.breadcrumbs {
    font-size: 0.86rem;
    color: var(--muted);
    margin: 0 0 22px;
    font-family: 'Space Grotesk', sans-serif;
}
.breadcrumbs a { color: var(--aqua); }
.breadcrumbs .sep { margin: 0 6px; color: var(--amber); }

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

.card {
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--card);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 14px 30px rgba(44, 62, 80, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 40px rgba(44, 62, 80, 0.16);
}

/* Индикатор-«капля» категории в левом верхнем углу */
.card-drop {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    width: 18px;
    height: 18px;
    background: var(--amber);
    border-radius: 60% 40% 55% 45% / 55% 50% 50% 45%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

.card-thumb-wrap { display: block; overflow: hidden; }
.card-thumb-wrap img,
.card-thumb-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}
.card-thumb-placeholder {
    background: linear-gradient(135deg, rgba(230,161,87,0.25), rgba(42,157,143,0.22));
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 22px 24px;
}
.card-title {
    font-size: 1.18rem;
    margin: 0 0 8px;
}
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--amber-dark); text-decoration: none; }

.card-meta {
    font-size: 0.8rem;
    color: var(--muted);
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 10px;
}
.card-meta .cat-dot {
    display: inline-block;
    width: 9px; height: 9px;
    border-radius: 60% 40% 55% 45% / 55% 50% 50% 45%;
    background: var(--aqua);
    margin-right: 5px;
    vertical-align: baseline;
}

.card-excerpt { font-size: 0.95rem; color: #44515f; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }

.card-more {
    margin-top: auto;
    padding-top: 14px;
}

/* ============================================================
   Главная
   ============================================================ */
.hero {
    position: relative;
    background:
        radial-gradient(120% 140% at 80% -10%, rgba(42,157,143,0.16), transparent 55%),
        radial-gradient(120% 120% at 0% 110%, rgba(230,161,87,0.2), transparent 55%),
        var(--card);
    border-radius: 26px;
    padding: 54px 44px;
    margin-bottom: 40px;
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'%3E%3Cg fill='none' stroke='%23E6A157' stroke-opacity='0.12' stroke-width='1.4'%3E%3Cpolygon points='28,2 54,17 54,49 28,64 2,49 2,17'/%3E%3Cpolygon points='28,52 54,67 54,99 28,114 2,99 2,67'/%3E%3C/g%3E%3Ccircle cx='14' cy='30' r='3' fill='%232A9D8F' fill-opacity='0.1'/%3E%3Ccircle cx='44' cy='78' r='4' fill='%232A9D8F' fill-opacity='0.08'/%3E%3C/svg%3E");
    opacity: 0.9;
    pointer-events: none;
}
.hero > * { position: relative; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); margin-bottom: 0.4em; }
.hero p { font-size: 1.1rem; max-width: 720px; color: #3c4a59; }
.hero .btn { margin-top: 10px; }

.home-section { margin: 0 0 46px; }
.home-section .section-lead {
    max-width: 760px;
    color: #44515f;
    margin-bottom: 26px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 24px;
}
.feature {
    background: var(--card);
    border-radius: 18px;
    padding: 26px 24px;
    box-shadow: 0 10px 26px rgba(44,62,80,0.08);
    position: relative;
    border-top: 4px solid var(--amber);
}
.feature.aqua { border-top-color: var(--aqua); }
.feature.terracotta { border-top-color: var(--terracotta); }
.feature.rose { border-top-color: var(--rose); }
.feature h3 { margin-top: 0; }
.feature p { margin-bottom: 0; color: #44515f; font-size: 0.97rem; }

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 22px;
    counter-reset: step;
}
.step {
    background: var(--card);
    border-radius: 16px;
    padding: 24px 22px;
    box-shadow: 0 10px 24px rgba(44,62,80,0.07);
}
.step::before {
    counter-increment: step;
    content: counter(step);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    margin-bottom: 12px;
    background: var(--aqua);
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    border-radius: 60% 40% 55% 45% / 55% 50% 50% 45%;
}
.step h3 { font-size: 1.05rem; margin: 0 0 6px; }
.step p { margin: 0; font-size: 0.93rem; color: #44515f; }

.latest-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

/* ============================================================
   Сайдбар и виджеты
   ============================================================ */
.sidebar { min-width: 0; }
.widget {
    background: var(--card);
    border-radius: 16px;
    padding: 22px 22px;
    margin-bottom: 26px;
    box-shadow: 0 10px 24px rgba(44,62,80,0.07);
    color: var(--ink);
}
.widget a { color: var(--aqua); }
.widget a:hover { color: var(--amber-dark); }
.widget-title {
    font-size: 1.05rem;
    margin: 0 0 14px;
    padding-bottom: 0.5em;
    border-bottom: 2px solid var(--line);
    color: var(--ink);
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { margin-bottom: 10px; line-height: 1.4; }
.widget .post-date,
.widget .rss-date { color: var(--muted); font-size: 0.82rem; }

/* ============================================================
   Контент записи / страницы
   ============================================================ */
.entry {
    background: var(--card);
    border-radius: 20px;
    padding: 34px 38px;
    box-shadow: 0 14px 32px rgba(44,62,80,0.08);
}
.entry-header { margin-bottom: 20px; }
.entry-title { font-size: clamp(1.5rem, 3.2vw, 2.2rem); }
.entry-meta {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.86rem;
    color: var(--muted);
    margin-top: 6px;
}
.entry-thumb { margin: 0 0 24px; border-radius: 16px; overflow: hidden; }
.entry-thumb img { width: 100%; display: block; }
.entry-content { min-width: 0; }
.entry-content img { border-radius: 12px; height: auto; }
.entry-content h2, .entry-content h3 { margin-top: 1.4em; }
.entry-content a { text-decoration: underline; }

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    border: 1px solid var(--ink);
}
.entry-content th,
.entry-content td {
    border: 1px solid var(--ink);
    padding: 10px 12px;
    text-align: left;
}
.entry-content th { background: rgba(230,161,87,0.16); }

.entry-content blockquote {
    margin: 1.4em 0;
    padding: 12px 22px;
    border-left: 4px solid var(--aqua);
    background: rgba(42,157,143,0.07);
    border-radius: 0 12px 12px 0;
    font-style: italic;
}

.cat-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 26px 0 0;
}
.cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.82rem;
    background: rgba(42,157,143,0.1);
    color: var(--ink);
    padding: 6px 14px;
    border-radius: 999px;
}
.cat-pill::before {
    content: "";
    width: 10px; height: 10px;
    background: var(--terracotta);
    border-radius: 60% 40% 55% 45% / 55% 50% 50% 45%;
}

/* ============================================================
   Пагинация
   ============================================================ */
.pagination {
    margin: 36px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    background: var(--card);
    color: var(--ink);
    border-radius: 12px;
    font-family: 'Space Grotesk', sans-serif;
    box-shadow: 0 6px 16px rgba(44,62,80,0.08);
}
.pagination a.page-numbers:hover {
    text-decoration: none;
    background: var(--amber);
    color: #fff;
}
.pagination .page-numbers.current {
    background: var(--aqua);
    color: #fff;
}
.pagination .page-numbers.dots { box-shadow: none; background: transparent; }

/* ============================================================
   Комментарии
   ============================================================ */
.comments-area {
    margin-top: 30px;
    background: var(--card);
    border-radius: 20px;
    padding: 30px 38px;
    box-shadow: 0 14px 32px rgba(44,62,80,0.08);
}
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list li { margin: 0 0 18px; }
.comment-body {
    background: var(--bg);
    border-radius: 14px;
    padding: 16px 20px;
}
.comment-author { font-family: 'Space Grotesk', sans-serif; font-weight: 600; }
.comment-meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 8px; }
.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    margin-bottom: 12px;
    background: #fff;
    color: var(--ink);
}
.comment-respond .form-submit input { /* стилизуется как .btn через JS не нужен */ }

/* Форма поиска */
.search-form {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.search-form .search-field {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    background: #fff;
    color: var(--ink);
}
.search-form .search-submit {
    background: var(--amber);
    color: #fff;
    border: none;
    padding: 0 18px;
    border-radius: 12px;
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
}
.search-form .search-submit:hover { background: var(--amber-dark); }

/* ============================================================
   404
   ============================================================ */
.error-404 {
    text-align: center;
    background: var(--card);
    border-radius: 20px;
    padding: 50px 38px;
    box-shadow: 0 14px 32px rgba(44,62,80,0.08);
}
.error-404 .big { font-size: clamp(3rem, 10vw, 6rem); color: var(--amber); margin: 0; }
.error-404 .search-form { max-width: 460px; margin: 24px auto 0; }

/* ============================================================
   Подвал
   ============================================================ */
.site-footer {
    position: relative;
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 48px 0 24px;
    overflow: hidden;
}
.site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'%3E%3Cg fill='none' stroke='%23E6A157' stroke-opacity='0.1' stroke-width='1.4'%3E%3Cpolygon points='28,2 54,17 54,49 28,64 2,49 2,17'/%3E%3Cpolygon points='28,52 54,67 54,99 28,114 2,99 2,67'/%3E%3C/g%3E%3Ccircle cx='14' cy='30' r='3' fill='%232A9D8F' fill-opacity='0.16'/%3E%3C/svg%3E");
    opacity: 0.6;
    pointer-events: none;
}
.site-footer > * { position: relative; }
.footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 32px;
}
.footer-col .widget {
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin-bottom: 0;
    color: var(--footer-text);
}
.footer-col .widget-title {
    color: #ffffff;
    border-bottom-color: rgba(255,255,255,0.18);
}
.footer-col .widget a { color: var(--footer-text); }
.footer-col .widget a:hover { color: var(--amber); }
.footer-col .widget .post-date,
.footer-col .widget .rss-date { color: var(--footer-muted); }
.footer-col .widget li { border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 8px; }
.footer-contact a { color: var(--amber); }
.footer-contact .mail-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
}

.site-info {
    margin-top: 34px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,0.12);
    font-size: 0.85rem;
    color: var(--footer-muted);
    text-align: center;
}

/* ============================================================
   Cookie-баннер (правило A11 — до основного блока стилей)
   ============================================================ */
.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 9999;
    background: var(--ink);
    color: #f3f6f9;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    box-shadow: 0 -8px 24px rgba(0,0,0,0.18);
}
.cookie-banner p { margin: 0; font-size: 0.9rem; max-width: 760px; }
.cookie-banner a { color: var(--amber); }
.cookie-banner .btn { padding: 0.5em 1.4em; box-shadow: none; }

/* ============================================================
   Адаптив
   ============================================================ */
@media (max-width: 960px) {
    .hero { padding: 40px 28px; }
    .entry, .comments-area { padding: 26px 24px; }
}
@media (max-width: 600px) {
    body { font-size: 17px; }
    .header-inner { gap: 14px; }
    .nav-toggle { display: inline-block; }
    .main-nav {
        flex-basis: 100%;
        margin-left: 0;
    }
    .main-nav[data-collapsed="true"] ul { display: none; }
    .main-nav ul {
        flex-direction: column;
        gap: 4px;
        padding-top: 10px;
    }
    .main-nav a { display: block; padding: 8px 0; }
    .site-desc { display: none; }
    .hero { padding: 30px 20px; }
    .entry, .comments-area { padding: 20px 18px; }
}
