/*
Theme Name: dds_ained-digital.ru
Author: Дмитрий Ковалёв
Description: Тема для информационного сайта онлайн-школы веб-разработки и IT-образования.
Version: 1.1
Text Domain: ained
*/

:root {
    --ink: #121826;
    --navy: #182240;
    --blue: #3d6ef5;
    --blue-dark: #2f57c9;
    --cyan: #2ec4e0;
    --viol: #7c5cf6;
    --mint: #26c89e;
    --paper: #f4f6fc;
    --slate: #606e8a;
    --line: #e2e7f2;
    --card-bg: #ffffff;
    --maxw: 1180px;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(24, 34, 64, 0.08);
}

* { box-sizing: border-box; }

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.65;
    overflow-x: hidden;
}

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

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

h1, h2, h3, h4 { line-height: 1.25; color: var(--navy); margin: 0 0 0.6em; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; }

/* A12.7 — единый контейнер ширины */
.shell {
    width: min(92%, var(--maxw));
    margin-inline: auto;
}

/* ---------- Header ---------- */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 18px 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1 1 320px;
}
.brand-logo { display: block; height: 48px; width: auto; }
.brand-text { min-width: 0; }
.brand-name {
    display: block;
    font-weight: 700;
    color: var(--navy);
    font-size: 1.02rem;
    line-height: 1.3;
}
.brand-name:hover { text-decoration: none; }
.brand-desc {
    display: block;
    color: var(--slate);
    font-size: 0.82rem;
    line-height: 1.4;
    margin-top: 4px;
}

.main-nav { margin-left: auto; }
.menu-toggle {
    display: none;
    background: var(--blue);
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.95rem;
    cursor: pointer;
}
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.main-nav a {
    display: block;
    padding: 8px 14px;
    border-radius: 10px;
    color: var(--navy);
    font-weight: 600;
    font-size: 0.95rem;
}
.main-nav a:hover { background: var(--paper); text-decoration: none; }
.main-nav .current-menu-item > a { background: var(--blue); color: #fff; }

/* ---------- Layout ---------- */
.site-main { padding: 32px 0 48px; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 36px;
    align-items: start;
}
.layout-single {
    display: block;
}
.layout-single .content-area {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}
.content-area { min-width: 0; }

@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; }
    .layout-single .content-area { width: 100%; }
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
    font-size: 0.86rem;
    color: var(--slate);
    margin-bottom: 22px;
}
.breadcrumbs a { color: var(--slate); }
.breadcrumbs a:hover { color: var(--blue); }
.breadcrumbs .sep { margin: 0 6px; color: #b8c0d4; }

/* ---------- Cards ---------- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 26px;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.card-thumb-wrap {
    display: block;
    overflow: hidden;
}
.card-thumb-wrap img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}
.card-thumb-wrap:hover img { transform: scale(1.04); }
.card-body {
    flex: 1;
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
}
.card-title { font-size: 1.18rem; margin: 0 0 10px; }
.card-title a { color: var(--navy); }
.card-meta {
    font-size: 0.8rem;
    color: var(--slate);
    margin-bottom: 12px;
}
.card-excerpt { color: #3a4358; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    padding-top: 14px;
    font-weight: 600;
    color: var(--blue);
}

/* ---------- Posts list (single column variant) ---------- */
.post-list .card { margin-bottom: 26px; }

/* ---------- Article ---------- */
.entry {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px 34px;
    box-shadow: var(--shadow);
}
.entry-title { font-size: 2rem; }
.entry-meta { color: var(--slate); font-size: 0.86rem; margin-bottom: 20px; }
.entry-thumb { border-radius: 12px; overflow: hidden; margin: 0 0 24px; }
.entry-thumb img { width: 100%; display: block; }
.entry-content img { border-radius: 10px; display: block; }
.entry-content h2, .entry-content h3 { margin-top: 1.4em; }
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    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(--paper); }
.entry-content pre {
    background: var(--ink);
    color: #e7ecf7;
    padding: 16px;
    border-radius: 10px;
    overflow-x: auto;
}

/* ---------- Sidebar / widgets ---------- */
.sidebar { min-width: 0; }
.widget {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 22px;
    margin-bottom: 24px;
    color: var(--ink);
}
.widget-title {
    font-size: 1.05rem;
    margin: 0 0 14px;
    color: var(--navy);
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.widget li:last-child { border-bottom: 0; }
.widget a { color: var(--blue); }
.widget .post-date { display: block; color: var(--slate); font-size: 0.78rem; }

/* ---------- Front page ---------- */
.front-section { padding: 30px 0; }
.front-section.alt { background: #fff; border-block: 1px solid var(--line); }

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 38px;
    align-items: center;
}
.split.reverse .split-media { order: -1; }
.split-media img { width: 100%; border-radius: var(--radius); display: block; box-shadow: var(--shadow); }
.split-text h2 { margin-top: 0; }
@media (max-width: 760px) {
    .split { grid-template-columns: 1fr; }
    .split.reverse .split-media { order: 0; }
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: 22px;
}
.feature {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    min-width: 0;
}
.feature .ic {
    width: 46px; height: 46px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 1.2rem;
    margin-bottom: 14px;
}
.feature h3 { margin: 0 0 8px; }
.feature p { margin: 0; color: #3a4358; }

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 22px;
    counter-reset: step;
}
.step {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    position: relative;
    min-width: 0;
}
.step::before {
    counter-increment: step;
    content: counter(step);
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff; font-weight: 700;
    margin-bottom: 12px;
}
.step h3 { margin: 0 0 8px; }
.step p { margin: 0; color: #3a4358; }

.gallery-mosaic {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 16px;
}
.gallery-mosaic figure { margin: 0; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.gallery-mosaic img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

.section-head { text-align: center; max-width: 720px; margin: 0 auto 30px; }
.section-head p { color: var(--slate); margin: 0; }

.section-latest { padding: 36px 0; }

/* ---------- CTA ---------- */
.cta-band {
    background: linear-gradient(120deg, var(--navy), var(--blue-dark));
    color: #fff;
    border-radius: var(--radius);
    padding: 40px 36px;
    text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #d6deef; max-width: 640px; margin: 0 auto 22px; }
.btn {
    display: inline-block;
    background: var(--blue);
    color: #fff;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
}
.btn:hover { background: var(--blue-dark); text-decoration: none; color: #fff; }
.btn.light { background: #fff; color: var(--navy); }
.btn.light:hover { background: #eef2fb; color: var(--navy); }

/* ---------- Pagination ---------- */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 36px 0 8px;
}
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--navy);
    font-weight: 600;
}
.pager a.page-numbers:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }
.pager .page-numbers.current { background: var(--blue); color: #fff; border-color: var(--blue); }
.pager .page-numbers.dots { border: 0; background: transparent; }

/* ---------- Search form ---------- */
.search-form {
    display: flex;
    gap: 8px;
}
.search-form .search-field {
    flex: 1;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 0.95rem;
}
.search-form .search-submit {
    border: 0;
    background: var(--blue);
    color: #fff;
    border-radius: 10px;
    padding: 0 18px;
    font-weight: 600;
    cursor: pointer;
}
.search-form .search-submit:hover { background: var(--blue-dark); }

/* ---------- Comments ---------- */
.comments-area { margin-top: 32px; }
.comment-list { list-style: none; margin: 0 0 24px; padding: 0; }
.comment-list .children { list-style: none; margin: 0 0 0 28px; padding: 0; }
.comment-inner {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 16px;
}
.comment-head { display: flex; gap: 12px; align-items: baseline; margin-bottom: 8px; }
.comment-author { font-weight: 700; color: var(--navy); }
.comment-date { font-size: 0.78rem; color: var(--slate); }
.comment-pending { display: block; color: var(--slate); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    margin-bottom: 12px;
}
.comment-form .submit {
    background: var(--blue);
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 11px 22px;
    font-weight: 600;
    cursor: pointer;
}

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 40px 0; }
.notfound .code { font-size: 5rem; font-weight: 800; color: var(--blue); line-height: 1; }
.notfound .search-form { max-width: 460px; margin: 24px auto 0; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--ink);
    color: #c4ccdd;
    padding: 44px 0 24px;
    margin-top: 40px;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 30px;
}
.site-footer .widget {
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    color: #c4ccdd;
}
.site-footer .widget-title { color: #fff; }
.site-footer .widget a { color: #8fd0ff; }
.site-footer .widget a:hover { color: #b9e2ff; }
.site-footer .widget li { border-bottom-color: rgba(255,255,255,0.08); }
.site-footer .widget .post-date { color: #8b93a7; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 32px;
    padding-top: 18px;
    font-size: 0.84rem;
    color: #8b93a7;
}

/* ---------- Cookie banner ---------- */
/* A11 — правило [hidden] до основного блока стилей баннера */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 999;
    background: var(--navy);
    color: #e7ecf7;
    padding: 16px 0;
    box-shadow: 0 -8px 24px rgba(0,0,0,0.18);
}
.cookie-inner {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}
.cookie-inner p { margin: 0; font-size: 0.9rem; min-width: 0; }
.cookie-inner a { color: #8fd0ff; }
.cookie-accept {
    border: 0;
    background: var(--blue);
    color: #fff;
    border-radius: 10px;
    padding: 10px 22px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.cookie-accept:hover { background: var(--blue-dark); }

/* ---------- Responsive nav ---------- */
@media (max-width: 760px) {
    .menu-toggle { display: inline-block; margin-left: auto; }
    .main-nav { width: 100%; margin-left: 0; }
    .main-nav ul { display: none; flex-direction: column; width: 100%; }
    .main-nav.open ul { display: flex; }
    .main-nav a { padding: 12px 14px; }
    h1 { font-size: 1.7rem; }
    h2 { font-size: 1.4rem; }
    .entry { padding: 24px 20px; }
}
