/*
Theme Name: dds_1stclassoverheadgaragedoor.com
Author: Алексей Воронов
Description: Образовательный портал о рабочих профессиях и технических навыках. Индустриально-образовательный стиль: антрацит, сигнальный оранжевый и бетонно-светлые тона.
Version: 1.1
Text Domain: tehprofil
*/

/* ============ Переменные ============ */
:root {
    --bg: #F4F6F8;
    --ink: #1A1D20;
    --text: #2C2F33;
    --orange: #FF6B00;
    --orange-dark: #CC5500;
    --steel: #2C5F8A;
    --steel-dark: #234c6e;
    --card: #ffffff;
    --line: #E2E4E6;
    --anthracite: #1E2328;
    --anthracite-2: #262c32;
}

/* ============ База ============ */
* { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", "Roboto", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    overflow-x: hidden;
}

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

a { color: var(--steel); }
a:hover { color: var(--steel-dark); }

h1, h2, h3, h4 {
    color: var(--ink);
    line-height: 1.25;
    margin: 0 0 0.6em;
    font-weight: 700;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

ul, ol { margin: 0 0 1em; padding-left: 1.4em; }

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

.site-main { padding: 32px 0 56px; }

/* ============ Индустриальный разделитель ============ */
.bolt-rule {
    position: relative;
    height: 4px;
    background: var(--line);
    margin: 38px 0;
    border: none;
}
.bolt-rule::before,
.bolt-rule::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--anthracite);
    border: 3px solid var(--orange);
    transform: translateY(-50%);
}
.bolt-rule::before { left: 0; }
.bolt-rule::after { right: 0; }

/* ============ Кнопки ============ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    line-height: 1.2;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn-primary {
    background: var(--orange);
    color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.btn-primary:hover {
    background: var(--orange-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 7px 16px rgba(0,0,0,.28);
}
.btn-secondary {
    background: transparent;
    color: var(--steel);
    border-color: var(--steel);
}
.btn-secondary:hover {
    background: var(--steel);
    color: #fff;
}
.btn-icon { width: 18px; height: 18px; flex: 0 0 auto; }

/* ============ Шапка ============ */
.site-header {
    background: var(--anthracite);
    border-bottom: 3px solid var(--orange);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 18px 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    min-width: 0;
}
.brand-logo,
.brand-mark {
    width: 56px;
    height: 56px;
    flex: 0 0 auto;
    display: block;
}
.brand-text { min-width: 0; }
.brand-name {
    color: #fff;
    font-weight: 700;
    font-size: 1.02rem;
    line-height: 1.3;
}
.brand-desc {
    color: #9aa3ab;
    font-size: .8rem;
    line-height: 1.4;
    margin-top: 3px;
}

/* ============ Меню ============ */
.main-nav { margin-left: auto; }
.menu-toggle {
    display: none;
    background: var(--anthracite-2);
    border: 2px solid var(--orange);
    color: #fff;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: .95rem;
    cursor: pointer;
}
.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.nav-list a {
    display: block;
    padding: 9px 14px;
    color: #e9ecef;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color .15s ease, color .15s ease;
}
.nav-list a:hover,
.nav-list .current-menu-item > a {
    background: var(--orange);
    color: #fff;
}

/* ============ Хлебные крошки — заводская маркировка ============ */
.breadcrumbs {
    font-size: .85rem;
    margin: 0 0 22px;
    color: var(--text);
    font-family: "Consolas", "Roboto Mono", monospace;
    letter-spacing: .02em;
}
.breadcrumbs a,
.breadcrumbs span {
    display: inline-block;
    padding: 2px 8px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 3px;
}
.breadcrumbs a {
    color: var(--steel);
    text-decoration: none;
}
.breadcrumbs a:hover { color: var(--orange-dark); }
.breadcrumbs span { color: var(--ink); font-weight: 600; }
.breadcrumbs .sep {
    background: none;
    border: none;
    color: var(--orange);
    font-weight: 700;
    padding: 0 2px;
}

/* ============ Раскладки ============ */
.layout-single .content-area {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 6%;
    align-items: start;
}

/* ============ Сайдбар с «рваным» краем ============ */
.sidebar {
    background: #fff;
    border: 1px solid var(--line);
    border-left: 5px solid var(--orange);
    padding: 22px 22px 8px;
}
.widget {
    margin-bottom: 26px;
    padding-bottom: 18px;
    border-bottom: 1px dashed var(--line);
}
.widget:last-child { border-bottom: none; }
.widget-title {
    font-size: 1.05rem;
    margin: 0 0 12px;
    color: var(--ink);
    text-transform: uppercase;
    letter-spacing: .03em;
}
.widget-title::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 4px;
    background: var(--orange);
    margin-right: 8px;
    vertical-align: middle;
}
/* контраст: светлый сайдбар — тёмный текст */
.sidebar .widget,
.sidebar .widget li,
.sidebar .widget p { color: var(--text); }
.sidebar .widget a { color: var(--steel); text-decoration: none; }
.sidebar .widget a:hover { color: var(--orange-dark); }
.sidebar .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sidebar .widget li {
    padding: 7px 0;
    border-bottom: 1px solid var(--line);
}
.sidebar .widget li:last-child { border-bottom: none; }
.sidebar .post-date,
.sidebar .widget .rss-date {
    display: block;
    font-size: .78rem;
    color: #6b7178;
    margin-top: 2px;
}

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

.card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    border-bottom: 4px solid var(--orange);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    min-width: 0;
}
.card-thumb-wrap {
    overflow: hidden;
    background: var(--line);
}
.card-thumb-wrap a { display: block; }
.card-thumb-wrap img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform .25s ease;
}
.card:hover .card-thumb-wrap img { transform: scale(1.04); }
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px 20px 20px;
    min-width: 0;
}
.card-title {
    font-size: 1.15rem;
    margin: 0 0 8px;
}
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--orange-dark); }
.card-meta {
    font-size: .8rem;
    color: #6b7178;
    margin-bottom: 10px;
    font-family: "Consolas", "Roboto Mono", monospace;
}
.card-excerpt {
    margin-bottom: 14px;
    min-width: 0;
}
.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}
.card-more { margin-top: auto; }
.card-more a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: var(--steel);
    text-decoration: none;
}
.card-more a:hover { color: var(--orange-dark); }

/* Горизонтальная карточка (лента блога) */
.cards-list { gap: 22px; }
.card-row { flex-direction: row; }
.card-row .card-thumb-wrap {
    flex: 0 0 280px;
    position: relative;
}
.card-row .card-thumb-wrap a {
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}
.card-row .card-thumb-wrap img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    display: block;
}

/* ============ Пагинация ============ */
.pager { margin: 36px 0 8px; }
.pager-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0;
}
.pager-list a,
.pager-list span {
    display: block;
    min-width: 42px;
    text-align: center;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    text-decoration: none;
    color: var(--steel);
    font-weight: 700;
}
.pager-list a:hover { border-color: var(--orange); color: var(--orange-dark); }
.pager-list .current {
    background: var(--orange);
    border-color: var(--orange);
    color: #fff;
}

/* ============ Контент записи / страницы ============ */
.entry {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 30px 34px;
}
.entry-header { margin-bottom: 18px; }
.entry-meta {
    font-size: .82rem;
    color: #6b7178;
    font-family: "Consolas", "Roboto Mono", monospace;
}
.entry-thumb {
    margin: 0 0 22px;
    border-radius: 6px;
    overflow: hidden;
}
.entry-thumb img { display: block; width: 100%; height: auto; }
.entry-content { min-width: 0; }
.entry-content img { border-radius: 6px; }
.entry-content h2 { margin-top: 1.3em; }
.entry-content blockquote {
    margin: 1.2em 0;
    padding: 14px 20px;
    border-left: 5px solid var(--orange);
    background: var(--bg);
    color: var(--ink);
}

/* Таблицы */
.entry-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.2em 0;
}
.entry-content table,
.entry-content th,
.entry-content td {
    border: 1px solid var(--line);
}
.entry-content th,
.entry-content td { padding: 10px 12px; text-align: left; }
.entry-content th { background: var(--bg); color: var(--ink); }

/* ============ Главная ============ */
.front .site-main { padding-top: 0; }
.section { margin: 0 0 14px; }
.section-head { margin-bottom: 22px; }
.section-head h2 {
    display: inline-block;
    border-bottom: 4px solid var(--orange);
    padding-bottom: 6px;
}
.section-lead { max-width: 720px; }

/* Hero */
.hero {
    position: relative;
    background:
        linear-gradient(rgba(20,23,26,.62), rgba(20,23,26,.62)),
        repeating-linear-gradient(45deg, #2a3036 0 28px, #232930 28px 56px);
    color: #fff;
    padding: 86px 0;
    overflow: hidden;
}
.hero-inner { width: 85%; margin-left: auto; margin-right: auto; }
.hero h1 {
    color: #fff;
    font-size: 2.4rem;
    max-width: 760px;
}
.hero h1 .accent { color: var(--orange); }
.hero p {
    max-width: 620px;
    font-size: 1.08rem;
    color: #d9dde0;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }

/* Карточки профессий */
.front-block { width: 85%; margin-left: auto; margin-right: auto; padding: 48px 0; }
.front-block:nth-child(even) { background: #fff; border-block: 1px solid var(--line); }
.prof-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
}
.prof-card {
    background: #fff;
    border: 1px solid var(--line);
    border-bottom: 5px solid var(--orange);
    border-radius: 6px;
    padding: 24px 22px;
    min-width: 0;
}
.front-block:nth-child(even) .prof-card { background: var(--bg); }
.prof-icon {
    width: 46px;
    height: 46px;
    color: var(--orange);
    margin-bottom: 12px;
}
.prof-card h3 { margin-bottom: 6px; }

/* Шкала: практика → теория */
.track {
    position: relative;
    margin: 30px 0 10px;
    padding: 0 4px;
}
.track-line {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--steel), var(--orange));
}
.track-marks {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 18px;
}
.track-step { min-width: 0; }
.track-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--anthracite);
    color: var(--orange);
    font-weight: 700;
    margin-bottom: 8px;
}
.track-step h3 { font-size: 1.05rem; }

/* Шаги «с чего начать» */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
    counter-reset: step;
}
.step {
    background: #fff;
    border: 1px solid var(--line);
    border-left: 5px solid var(--steel);
    border-radius: 6px;
    padding: 22px;
    min-width: 0;
}
.front-block:nth-child(even) .step { background: var(--bg); }
.step h3::before {
    counter-increment: step;
    content: "0" counter(step);
    color: var(--orange);
    font-family: "Consolas", monospace;
    margin-right: 8px;
}

/* Статичные контакты */
.contacts-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 28px;
    margin-top: 8px;
}
.contacts-strip a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--steel);
    font-weight: 600;
}
.contacts-strip a:hover { color: var(--orange-dark); }

/* ============ Слайдер отзывов ============ */
.reviews { margin-top: 8px; }
.review-track { position: relative; }
.review-slide[hidden] { display: none !important; }
.review-slide {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 26px 30px;
}
.front-block:nth-child(even) .review-slide { background: var(--bg); }
.review-quote {
    font-size: 1.08rem;
    color: var(--ink);
    position: relative;
    padding-left: 30px;
}
.review-quote::before {
    content: "«";
    position: absolute;
    left: 0;
    top: -6px;
    font-size: 2.4rem;
    color: var(--orange);
    line-height: 1;
}
.review-author {
    margin-top: 12px;
    font-weight: 700;
    color: var(--steel);
}
.review-rank {
    font-size: .82rem;
    color: #6b7178;
    font-family: "Consolas", monospace;
}
.review-nav {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
.review-btn {
    background: var(--anthracite);
    color: #fff;
    border: 2px solid var(--orange);
    border-radius: 6px;
    width: 42px;
    height: 42px;
    cursor: pointer;
    font-size: 1.1rem;
}
.review-btn:hover { background: var(--orange); }

/* ============ Подвал ============ */
.site-footer {
    background: var(--anthracite);
    color: #c4cacf;
    border-top: 3px solid var(--orange);
    margin-top: 40px;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 34px;
    padding: 44px 0 30px;
}
.footer-col { min-width: 0; }
/* контраст: тёмный футер — светлый текст */
.footer-col,
.footer-col p,
.footer-col li { color: #c4cacf; }
.footer-col .widget-title { color: #fff; }
.footer-col a { color: #e7b78f; text-decoration: none; }
.footer-col a:hover { color: var(--orange); }
.footer-col .widget {
    border-bottom: 1px solid #353c43;
}
.footer-col .widget:last-child { border-bottom: none; }
.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer-col li {
    padding: 6px 0;
    border-bottom: 1px solid #2c333a;
}
.footer-col li:last-child { border-bottom: none; }
.footer-col .post-date { color: #8b939b; font-size: .78rem; display: block; }
.footer-bottom {
    border-top: 1px solid #353c43;
    padding: 18px 0;
    font-size: .85rem;
    color: #8b939b;
}

/* ============ Форма поиска ============ */
.search-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.search-form .search-field {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    font-size: 1rem;
}
.search-form .search-submit {
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    background: var(--orange);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.search-form .search-submit:hover { background: var(--orange-dark); }
.footer-col .search-form .search-field { background: #2c333a; color: #fff; border-color: #3c444c; }

/* ============ Комментарии ============ */
.comments-area {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 26px 30px;
    margin-top: 26px;
}
.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.comment-list li { margin-bottom: 18px; }
.comment-body {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 14px 18px;
    background: var(--bg);
}
.comment-list .children {
    list-style: none;
    margin: 14px 0 0 26px;
    padding: 0;
}
.comment-meta {
    font-size: .82rem;
    color: #6b7178;
    margin-bottom: 6px;
}
.comment-author { font-weight: 700; color: var(--ink); }
.comment-respond {
    margin-top: 24px;
    border-top: 1px dashed var(--line);
    padding-top: 20px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}
.comment-form p { margin-bottom: 12px; }
.comment-form .submit {
    background: var(--orange);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 11px 22px;
    font-weight: 700;
    cursor: pointer;
}
.comment-form .submit:hover { background: var(--orange-dark); }

/* ============ 404 ============ */
.error-404 {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 40px 34px;
    text-align: center;
}
.error-404 .code {
    font-size: 4rem;
    color: var(--orange);
    font-weight: 800;
    font-family: "Consolas", monospace;
    margin: 0;
}
.error-404 .search-form { max-width: 420px; margin: 22px auto 0; }

/* ============ Cookie-баннер ============ */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: var(--anthracite);
    color: #d9dde0;
    border-top: 3px solid var(--orange);
    padding: 16px 0;
}
.cookie-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}
.cookie-inner p { margin: 0; flex: 1; min-width: 220px; font-size: .9rem; }
.cookie-inner a { color: var(--orange); }
.cookie-accept {
    background: var(--orange);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 11px 24px;
    font-weight: 700;
    cursor: pointer;
}
.cookie-accept:hover { background: var(--orange-dark); }

/* ============ Адаптив ============ */
@media (max-width: 960px) {
    .layout-with-sidebar {
        grid-template-columns: minmax(0, 1fr);
        gap: 30px;
    }
    .hero h1 { font-size: 2rem; }
    .footer-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .track-marks { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 1.7rem; }
    .layout-single .content-area,
    .front-block,
    .hero-inner { width: 100%; }
    .menu-toggle { display: block; }
    .main-nav { width: 100%; }
    .nav-list {
        display: none;
        flex-direction: column;
        margin-top: 10px;
    }
    .nav-list.is-open { display: flex; }
    .nav-list a { background: var(--anthracite-2); }
    .entry { padding: 22px 18px; }
    .footer-cols { grid-template-columns: minmax(0, 1fr); }

    /* Горизонтальные карточки -> вертикальные */
    .card-row { flex-direction: column; }
    .card-row .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
    }
    .card-row .card-thumb-wrap a { position: static; }
    .card-row .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}
