/*
Theme Name: dds_gildin.ru
Theme URI: https://gildin.ru/
Author: Роман Звягинцев
Description: Тема «Тёмный контур» для информационного портала о профессиях, образовании и карьере в ИТ-интеграции: графитовые фоны, медные акценты и графика печатных плат.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gildin
*/

/* ---------- Служебные правила для [hidden] (до основных блоков) ---------- */
.gl-cookie[hidden] { display: none !important; }

/* ---------- Токены ---------- */
:root {
    --bg: #14181F;
    --bg-alt: #1B212B;
    --bg-head: #0F1319;
    --bg-foot: #0C1015;
    --bg-side: #181E26;
    --text: #E8EDF2;
    --muted: #8892A0;
    --copper: #C47A3A;
    --copper-hi: #D98C4A;
    --teal: #4A9E8F;
    --line: #2A3340;
    --f-head: "Manrope", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --f-body: "Fira Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    overflow-x: hidden;
    border-top: 3px solid var(--copper);
    background-color: var(--bg);
    background-image: repeating-linear-gradient(45deg, #1A2029 0, #1A2029 1px, transparent 1px, transparent 24px);
    color: var(--text);
    font-family: var(--f-body);
    font-size: 1.0625rem;
    line-height: 1.7;
    position: relative;
}

body::after {
    content: "";
    position: fixed;
    right: -40px;
    bottom: -40px;
    width: 360px;
    height: 360px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23C47A3A' stroke-width='3'%3E%3Crect x='30' y='30' width='60' height='60' rx='5'/%3E%3Crect x='44' y='44' width='32' height='32' rx='2' fill='%23C47A3A'/%3E%3Cpath d='M42 30V8M54 30V8M66 30V8M78 30V8M42 90v22M54 90v22M66 90v22M78 90v22M30 42H8M30 54H8M30 66H8M30 78H8M90 42h22M90 54h22M90 66h22M90 78h22'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain;
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
}

.gl-top, .gl-main, .gl-foot { position: relative; z-index: 1; }

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

p, li, dd, td, th, blockquote, figcaption,
h1, h2, h3, h4, h5, h6,
.card-title, .card-excerpt, .gl-brand__text {
    overflow-wrap: break-word;
    hyphens: auto;
}

p { margin: 0 0 1.1em; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--f-head);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.25;
    color: var(--text);
    margin: 1.6em 0 0.6em;
}
h1 { font-size: clamp(2rem, 1.2rem + 3vw, 3.2rem); line-height: 1.15; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.12rem; }

a { color: var(--teal); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--copper-hi); }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }

/* Анимированное подчёркивание текстовых ссылок */
.entry-content a, .gl-widget a, .gl-crumbs a, .gl-foot a, .card-link, .gl-form-note a, .gl-comment__text a {
    background-image: linear-gradient(var(--copper), var(--copper));
    background-repeat: no-repeat;
    background-position: left bottom;
    background-size: 0 1px;
    transition: background-size .28s ease, color .2s ease;
    padding-bottom: 1px;
}
.entry-content a:hover, .gl-widget a:hover, .gl-crumbs a:hover, .gl-foot a:hover, .card-link:hover, .gl-form-note a:hover, .gl-comment__text a:hover {
    background-size: 100% 1px;
}

.gl-sr, .gl-skip:not(:focus) {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
.gl-skip:focus {
    position: fixed; top: 10px; left: 10px; z-index: 100;
    background: var(--copper); color: var(--bg); padding: .6em 1em; border-radius: 4px;
}

/* ---------- Контейнер (единственное ограничение ширины) ---------- */
.shell {
    width: min(92%, 1320px);
    margin-inline: auto;
}
@media (min-width: 961px) {
    .shell { width: min(85%, 1320px); }
}

/* ---------- Кнопки ---------- */
.gl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    padding: .78em 1.5em;
    font-family: var(--f-head);
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: .02em;
    line-height: 1.25;
    text-align: center;
    color: var(--bg);
    background: var(--copper);
    border: 1.5px solid var(--copper);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.gl-btn:hover {
    background: var(--copper-hi);
    border-color: var(--copper-hi);
    color: var(--bg);
    transform: translateY(-1px);
}
.gl-btn--ghost {
    background: transparent;
    color: var(--copper);
}
.gl-btn--ghost:hover {
    background: transparent;
    color: var(--copper-hi);
    border-color: var(--copper-hi);
}

/* ---------- Шапка ---------- */
.gl-top {
    background: var(--bg-head);
    border-bottom: 1px solid var(--copper);
}
.gl-top__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    padding: 1.1rem 0;
}
.gl-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1 1 420px;
    min-width: 0;
    color: var(--text);
}
.gl-brand:hover { color: var(--text); }
.gl-brand__mark { flex: 0 0 auto; display: block; line-height: 0; }
.gl-brand__chip, .gl-brand__logo { display: block; width: 48px; height: 48px; object-fit: contain; }
.gl-brand__text { display: flex; flex-direction: column; gap: .25rem; min-width: 0; max-width: 62ch; }
.gl-brand__name {
    font-family: var(--f-head);
    font-weight: 700;
    font-size: .92rem;
    line-height: 1.35;
    letter-spacing: .01em;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.gl-brand__desc {
    font-size: .8rem;
    line-height: 1.45;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gl-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .2rem 1.6rem;
}
.gl-nav__list a {
    display: block;
    position: relative;
    padding: .45em 0;
    font-family: var(--f-head);
    font-weight: 600;
    font-size: .95rem;
    letter-spacing: .02em;
    color: var(--text);
}
.gl-nav__list a::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    height: 2px;
    width: 0;
    background: var(--copper);
    transition: width .25s ease;
}
.gl-nav__list a:hover { color: var(--copper-hi); }
.gl-nav__list a:hover::after,
.gl-nav__list .current-menu-item > a::after { width: 100%; }
.gl-nav__list .current-menu-item > a { color: var(--copper); }

.gl-burger {
    display: none;
    align-items: center;
    gap: .6rem;
    padding: .55em .9em;
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--line);
    border-radius: 4px;
    font-family: var(--f-head);
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
}
.gl-burger__lines,
.gl-burger__lines::before,
.gl-burger__lines::after {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--copper);
    position: relative;
}
.gl-burger__lines::before, .gl-burger__lines::after { content: ""; position: absolute; left: 0; }
.gl-burger__lines::before { top: -6px; }
.gl-burger__lines::after { top: 6px; }

@media (max-width: 960px) {
    .gl-burger { display: inline-flex; }
    .gl-nav { display: none; flex: 1 1 100%; }
    .gl-nav.is-open { display: block; }
    .gl-nav__list { flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
    .gl-nav__list a { padding: .8em 0; border-bottom: 1px solid var(--line); }
    .gl-nav__list a::after { display: none; }
}

/* ---------- Хлебные крошки ---------- */
.gl-crumbs {
    padding: 1.6rem 0 .2rem;
    font-size: .88rem;
    color: var(--muted);
}
.gl-crumbs__sep { color: var(--copper); margin: 0 .35em; }
.gl-crumbs span:last-child { color: var(--text); }

/* ---------- Раскладки ---------- */
.layout-single { display: block; }
.layout-with-sidebar { display: block; }
@media (min-width: 961px) {
    .layout-with-sidebar {
        display: grid;
        grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
        column-gap: 6%;
        align-items: start;
    }
}
.content-area { min-width: 0; padding-bottom: 4.5rem; }

/* ---------- Заголовки с медной чертой ---------- */
.gl-sec-title,
.gl-page-title,
.gl-hero__title {
    border-left: 3px solid var(--copper);
    padding-left: .75em;
    margin-top: 0;
}
.gl-sec-title { margin-bottom: 2.4rem; }
.gl-page-title { margin: 1.4rem 0 1.2rem; }
.gl-page-head { margin-bottom: 2rem; }
.gl-page-intro { color: var(--muted); }

/* Второстепенные заголовки — бирюзовая точка */
.gl-widget__title::before,
.gl-tile__title::before,
.gl-comments__title::before,
.comment-reply-title::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: .6em;
    border-radius: 50%;
    background: var(--teal);
    vertical-align: .2em;
}

/* Медный ромб перед H2/H3 в тексте */
.entry-content h2::before,
.entry-content h3::before {
    content: "";
    display: inline-block;
    width: .42em;
    height: .42em;
    margin-right: .65em;
    background: var(--copper);
    transform: rotate(45deg);
    vertical-align: .14em;
}

/* ---------- Секции главной ---------- */
.fs { padding: 5rem 0; }
.fs--hero { padding: 2.5rem 0 4rem; }
.fs--alt { background-color: var(--bg-alt); }
.fs--dots {
    background-image: radial-gradient(circle, var(--line) 1px, transparent 1.4px);
    background-size: 16px 16px;
}
.fs--quote { padding: 4rem 0 5.5rem; }

/* Разделитель: линия с медным ромбом */
.gl-divider {
    position: relative;
    height: 1px;
    background: var(--line);
}
.gl-divider span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    background: var(--copper);
    transform: rotate(45deg);
    box-shadow: 0 0 0 7px var(--bg);
}

/* Печатная дорожка */
.gl-trace {
    position: relative;
    height: 1px;
    background: var(--copper);
    opacity: .7;
}
.gl-trace::before, .gl-trace::after {
    content: "";
    position: absolute;
    top: -3px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--copper);
}
.gl-trace::before { left: -3px; }
.gl-trace::after { right: -3px; }

/* Hero */
.gl-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 540px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--bg-head);
}
.gl-hero__bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.gl-hero::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, rgba(15, 19, 25, .94) 0%, rgba(15, 19, 25, .78) 50%, rgba(15, 19, 25, .2) 100%);
}
.gl-hero__body {
    position: relative;
    z-index: 1;
    max-width: 760px;
    padding: 4rem 3.5rem;
    min-width: 0;
}
.gl-hero__title { font-size: clamp(2rem, 1.2rem + 3vw, 3.2rem); margin-bottom: 1.2rem; }
.gl-hero__lead { font-size: 1.15rem; color: #C9D2DC; max-width: 60ch; margin-bottom: 2rem; }
.gl-hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; }

/* Статистика */
.gl-stats {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.gl-stats__item {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    padding: .4rem 2rem;
    border-left: 1px solid var(--line);
    min-width: 0;
}
.gl-stats__item:first-child { border-left: 0; padding-left: 0; }
.gl-stats__num {
    font-family: var(--f-head);
    font-weight: 800;
    font-size: clamp(2.6rem, 2rem + 2vw, 3.6rem);
    line-height: 1;
    color: var(--copper);
    letter-spacing: .01em;
}
.gl-stats__label { color: var(--muted); font-size: .98rem; line-height: 1.55; }

/* Карточки с иконками */
.gl-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.8rem;
}
.gl-tile {
    padding: 2.2rem 2rem 1.8rem;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    min-width: 0;
}
.gl-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 9px 20px rgba(0, 0, 0, .5);
    border-color: var(--copper);
}
.gl-tile__icon { display: block; width: 48px; height: 48px; margin-bottom: 1.4rem; }
.gl-tile__title { margin: 0 0 .8rem; font-size: 1.25rem; }
.gl-tile p { margin: 0; color: #BCC5D0; }

/* Цитата */
.gl-quote {
    margin: 0;
    padding: 3rem 3.2rem;
    background-color: var(--bg-alt);
    background-image: radial-gradient(circle, var(--line) 1px, transparent 1.4px);
    background-size: 16px 16px;
    border-left: 4px solid var(--copper);
    border-radius: 0 6px 6px 0;
}
.gl-quote blockquote { margin: 0; }
.gl-quote blockquote p {
    font-family: var(--f-head);
    font-weight: 600;
    font-size: clamp(1.3rem, 1rem + 1.2vw, 1.85rem);
    line-height: 1.75;
    letter-spacing: .01em;
    color: var(--text);
    margin: 0 0 1.4rem;
    max-width: 52ch;
}
.gl-quote figcaption { color: var(--muted); font-size: .98rem; }

.gl-more { margin-top: 2.4rem; }
.gl-empty { color: var(--muted); }

/* ---------- Карточки записей ---------- */
.gl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 1.8rem;
}
.gl-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 9px 20px rgba(0, 0, 0, .5);
    border-color: var(--copper);
}
.card-thumb { position: relative; }
.card-thumb a { display: block; }
.card-thumb img,
.card-thumb__stub {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}
.card-thumb__stub {
    background-color: #161B23;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23C47A3A' stroke-width='3' opacity='.5'%3E%3Crect x='38' y='38' width='44' height='44' rx='4'/%3E%3Cpath d='M50 38V22M60 38V22M70 38V22M50 82v16M60 82v16M70 82v16M38 50H22M38 60H22M38 70H22M82 50h16M82 60h16M82 70h16'/%3E%3C/g%3E%3C/svg%3E"),
        repeating-linear-gradient(45deg, #1F2630 0, #1F2630 1px, transparent 1px, transparent 14px);
    background-repeat: no-repeat, repeat;
    background-position: center, 0 0;
    background-size: 90px 90px, auto;
}
.card-thumb::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 45%;
    background: linear-gradient(180deg, rgba(27, 33, 43, 0) 0%, rgba(27, 33, 43, .95) 100%);
    pointer-events: none;
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.2rem 1.5rem 1.5rem;
}
.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem 1.1rem;
    font-size: .84rem;
    color: var(--muted);
    margin-bottom: .7rem;
}
.card-title { font-size: 1.18rem; margin: 0 0 .7rem; line-height: 1.35; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--copper-hi); }
.card-excerpt { color: #BCC5D0; font-size: .98rem; flex: 1; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-link {
    align-self: flex-start;
    margin-top: .8rem;
    font-family: var(--f-head);
    font-weight: 700;
    font-size: .9rem;
    color: var(--copper);
}
.card.sticky { border-color: rgba(196, 122, 58, .55); }

/* Теги рубрик */
.gl-cat {
    display: inline-flex;
    align-items: center;
    gap: .45em;
    color: var(--cat, var(--teal));
    font-size: .84rem;
    font-weight: 500;
}
.gl-cat::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cat, var(--teal));
    flex: 0 0 auto;
}
.gl-cat:hover { color: var(--copper-hi); }

/* ---------- Пагинация (type => plain) ---------- */
.gl-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem;
    margin-top: 2.8rem;
}
.gl-pager .page-numbers {
    display: inline-block;
    min-width: 2.6em;
    padding: .5em .85em;
    text-align: center;
    font-family: var(--f-head);
    font-weight: 600;
    font-size: .92rem;
    line-height: 1.3;
    color: var(--text);
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 4px;
    transition: border-color .2s ease, color .2s ease, transform .2s ease;
}
.gl-pager a.page-numbers:hover { border-color: var(--copper); color: var(--copper-hi); transform: translateY(-1px); }
.gl-pager .page-numbers.current { background: var(--copper); border-color: var(--copper); color: var(--bg); }
.gl-pager .page-numbers.dots { background: none; border: 0; min-width: 0; padding-inline: .2em; color: var(--muted); }

/* ---------- Запись и страница ---------- */
.gl-entry__head { margin-bottom: 1.2rem; }
.gl-entry__head .card-meta { margin-top: 1.4rem; }
.gl-entry__thumb { margin: 0 0 2rem; }
.gl-entry__thumb img { display: block; width: 100%; border-radius: 6px; border: 1px solid var(--line); }
.gl-entry__tags { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }

.entry-content { max-width: 74ch; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content img { display: block; border-radius: 4px; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.entry-content li { margin-bottom: .35em; }
.entry-content ul li::marker { color: var(--copper); }
.entry-content blockquote {
    margin: 1.8em 0;
    padding: 1.4rem 1.8rem;
    background: var(--bg-alt);
    border-left: 4px solid var(--copper);
    border-radius: 0 6px 6px 0;
    color: #D3DAE2;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: .96rem; border: 1px solid var(--line); }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: .6em .8em; text-align: left; }
.entry-content th { background: var(--bg-alt); font-family: var(--f-head); font-weight: 700; }
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content code { font-size: .92em; background: var(--bg-alt); padding: .1em .35em; border-radius: 3px; color: var(--copper-hi); }
.entry-content pre { overflow-x: auto; padding: 1.2rem 1.4rem; background: var(--bg-head); border: 1px solid var(--line); border-radius: 6px; }
.entry-content pre code { background: none; padding: 0; color: var(--text); }
.entry-content hr { border: 0; height: 1px; background: var(--line); margin: 2.4em 0; }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption { font-size: .88rem; color: var(--muted); margin-top: .5em; }

/* ---------- Сайдбар ---------- */
.sidebar {
    min-width: 0;
    margin: 2rem 0 4.5rem;
    padding: 1.8rem 1.6rem;
    background: var(--bg-side);
    border-left: 2px solid var(--copper);
    border-radius: 0 6px 6px 0;
    color: var(--text);
}
@media (min-width: 961px) {
    .sidebar { margin-top: 1.4rem; }
}
.sidebar .gl-widget { margin-bottom: 2rem; color: var(--text); }
.sidebar .gl-widget:last-child { margin-bottom: 0; }
.sidebar .gl-widget__title { color: var(--text); }
.sidebar .gl-widget a { color: var(--teal); }
.sidebar .gl-widget a:hover { color: var(--copper-hi); }
.sidebar .post-date { color: var(--muted); }

.gl-widget__title { font-size: 1.05rem; margin: 0 0 1rem; }
.gl-widget ul { list-style: none; margin: 0; padding: 0; }
.gl-widget li { padding: .55em 0; border-bottom: 1px solid var(--line); line-height: 1.45; }
.gl-widget li:last-child { border-bottom: 0; }

/* ---------- Подвал ---------- */
.gl-foot {
    background: var(--bg-foot);
    color: #B9C2CD;
    padding-top: 0;
}
.gl-foot__cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem 3rem;
    padding: 3.6rem 0 2.6rem;
}
.gl-foot__col { min-width: 0; }
.gl-foot__col + .gl-foot__col { border-left: 1px solid rgba(196, 122, 58, .35); padding-left: 3rem; }
.gl-foot .gl-widget { color: #B9C2CD; font-size: .96rem; }
.gl-foot .gl-widget__title { color: var(--text); }
.gl-foot .gl-widget a { color: var(--teal); }
.gl-foot .gl-widget a:hover { color: var(--copper-hi); }
.gl-foot .gl-widget li { border-bottom-color: #1C232D; }
.gl-foot__base {
    padding: 1.4rem 0 2rem;
    border-top: 1px solid rgba(196, 122, 58, .4);
    color: var(--muted);
    font-size: .88rem;
}
.gl-foot__base p { margin: 0; }

/* ---------- Поиск ---------- */
.gl-search { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.4rem 0; max-width: 560px; }
.gl-search__field {
    flex: 1 1 220px;
    min-width: 0;
    padding: .75em 1em;
    font: inherit;
    color: var(--text);
    background: var(--bg-head);
    border: 1px solid var(--line);
    border-radius: 4px;
}
.gl-search__field:focus { border-color: var(--copper); outline: none; }
.gl-search__field::placeholder { color: var(--muted); }

/* ---------- 404 ---------- */
.gl-404 { padding: 2rem 0 5rem; max-width: 720px; }
.gl-404__code {
    font-family: var(--f-head);
    font-weight: 800;
    font-size: clamp(5rem, 3rem + 8vw, 9rem);
    line-height: 1;
    margin: 1rem 0 0;
    color: transparent;
    -webkit-text-stroke: 2px var(--copper);
}

/* ---------- Комментарии ---------- */
.gl-comments { margin-top: 3.4rem; padding-top: 2.4rem; border-top: 1px solid var(--line); }
.gl-comments__title { font-size: 1.4rem; margin-top: 0; }
.gl-comments__list, .gl-comments__list .children { list-style: none; margin: 0; padding: 0; }
.gl-comments__list .children { padding-left: 1.6rem; border-left: 1px solid var(--line); margin-left: .6rem; }
.gl-comment__body { padding: 1.3rem 1.4rem; margin-bottom: 1rem; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 6px; }
.gl-comment__head { display: flex; align-items: center; gap: .9rem; margin-bottom: .7rem; }
.gl-comment__head img { display: block; border-radius: 50%; }
.gl-comment__who { display: flex; flex-direction: column; line-height: 1.35; }
.gl-comment__who time { font-size: .82rem; color: var(--muted); }
.gl-comment__wait { color: var(--copper); font-size: .9rem; }
.gl-comment__reply a { font-size: .88rem; font-weight: 600; }

.comment-respond { margin-top: 2rem; }
.comment-reply-title { font-size: 1.3rem; }
.comment-form label { display: block; font-size: .9rem; margin-bottom: .35em; color: var(--text); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: .7em .9em;
    font: inherit;
    color: var(--text);
    background: var(--bg-head);
    border: 1px solid var(--line);
    border-radius: 4px;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--copper); outline: none; }
.comment-form-cookies-consent { display: flex; gap: .6rem; align-items: flex-start; }
.comment-form-cookies-consent label { display: inline; margin: 0; }
.comment-form .submit {
    padding: .78em 1.5em;
    font-family: var(--f-head);
    font-weight: 700;
    font-size: .95rem;
    color: var(--bg);
    background: var(--copper);
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color .2s ease, transform .2s ease;
}
.comment-form .submit:hover { background: var(--copper-hi); transform: translateY(-1px); }
.gl-form-note { color: var(--muted); font-size: .9rem; }
.gl-req { color: var(--copper); }

/* ---------- Cookie-баннер ---------- */
.gl-cookie {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 60;
    max-width: 820px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    gap: 1.2rem 1.6rem;
    padding: 1.2rem 1.5rem;
    background: var(--bg-head);
    border: 1px solid var(--copper);
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .55);
    color: var(--text);
}
.gl-cookie__text { margin: 0; font-size: .93rem; line-height: 1.55; flex: 1; min-width: 0; }
.gl-cookie__ok { flex: 0 0 auto; }

/* ---------- WordPress ---------- */
.alignleft { float: left; margin: .3em 1.4em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.4em; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption-text, .gallery-caption { font-size: .88rem; color: var(--muted); }
.bypostauthor > .gl-comment__body { border-color: rgba(74, 158, 143, .6); }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    .gl-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gl-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gl-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.2rem; }
    .gl-stats__item:nth-child(3) { border-left: 0; padding-left: 0; }
    .gl-foot__cols { grid-template-columns: minmax(0, 1fr); }
    .gl-foot__col + .gl-foot__col { border-left: 0; padding-left: 0; border-top: 1px solid rgba(196, 122, 58, .35); padding-top: 2rem; }
    .gl-hero { min-height: 460px; }
}

@media (max-width: 600px) {
    body { font-size: 1rem; }
    .fs { padding: 3.4rem 0; }
    .fs--hero { padding: 1.6rem 0 3rem; }
    .gl-brand__desc { display: none; }
    .gl-brand__name { -webkit-line-clamp: 2; font-size: .85rem; }
    .gl-hero { min-height: 0; }
    .gl-hero::after { background: linear-gradient(180deg, rgba(15, 19, 25, .82) 0%, rgba(15, 19, 25, .94) 100%); }
    .gl-hero__body { padding: 2.6rem 1.4rem; }
    .gl-hero__lead { font-size: 1.02rem; }
    .gl-grid--3, .gl-tiles { grid-template-columns: minmax(0, 1fr); }
    .gl-stats { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
    .gl-stats__item { border-left: 0; padding: 1.3rem 0; border-top: 1px solid var(--line); }
    .gl-stats__item:first-child { border-top: 0; padding-top: 0; }
    .gl-tile { padding: 1.8rem 1.4rem 1.5rem; }
    .gl-quote { padding: 2rem 1.4rem; }
    .gl-cookie { flex-direction: column; align-items: stretch; padding: 1.1rem 1.2rem; }
    .sidebar { padding: 1.5rem 1.2rem; }
    .gl-comment__body { padding: 1.1rem 1rem; }
    .alignleft, .alignright { float: none; margin: 1em 0; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
