/*
Theme Name: dds_englishwithmax.ru
Author: Максим Сальников
Description: Тема для сайта English with Max — изучение английского языка. Яркий «школьный» стиль: персонаж Max, цветные плитки приложений, мягкие скругления и жёлтые акценты.
Version: 2.0
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: ewmax
*/

/* ---------- Правила для [hidden] (до основных стилей) ---------- */
.cookie-banner[hidden] { display: none !important; }

/* ---------- Токены ---------- */
:root {
    --page: #F4F8FE;
    --panel: #E9F2FE;
    --panel-line: #DAE7FA;
    --white: #FFFFFF;
    --navy: #0E1D5E;
    --ink: #1B2447;
    --muted: #5A6582;
    --blue: #1A66E8;
    --blue-dark: #0F4FC7;
    --blue-soft: #E6EFFE;
    --yellow: #FFD23F;
    --yellow-deep: #FFBE12;
    --yellow-edge: #E3A300;
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --shadow: 0 6px 18px rgba(26, 60, 140, 0.08);
    --shadow-hover: 0 12px 26px rgba(26, 60, 140, 0.14);
    --font-head: "Rubik", "Arial Rounded MT Bold", "Segoe UI", Arial, sans-serif;
    --font-body: "Nunito", "Segoe UI", Roboto, Arial, sans-serif;
}

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

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

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

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--navy);
    line-height: 1.15;
    font-weight: 700;
    margin: 1.6em 0 0.6em;
}
h1 { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.12rem; }

p { margin: 0 0 1.1em; }

a { color: var(--blue); text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--yellow-deep);
    outline-offset: 2px;
}

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

table { width: 100%; border-collapse: collapse; margin: 0 0 1.5em; background: var(--white); border-radius: var(--radius-sm); overflow: hidden; }
th, td { border: 1px solid var(--panel-line); padding: 0.6em 0.8em; text-align: left; vertical-align: top; }
th { background: var(--panel); font-family: var(--font-head); font-weight: 600; font-size: 0.95rem; color: var(--navy); }

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.screen-reader-text:focus {
    clip: auto; width: auto; height: auto; margin: 0;
    top: 8px; left: 8px; z-index: 1000;
    padding: 0.6em 1em; background: var(--white); color: var(--navy);
    border-radius: var(--radius-sm); box-shadow: var(--shadow);
}

/* ---------- Контейнер (единственное ограничение ширины) ---------- */
.shell {
    width: calc(100% - 32px);
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
}
@media (min-width: 960px) {
    .shell { width: calc(100% - 64px); }
}

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55em;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    padding: 0.8em 1.4em;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn svg { flex: 0 0 auto; }
.btn:hover { transform: translateY(-1px); }
.btn--lg { font-size: 1rem; padding: 0.95em 1.6em; }
.btn--sm { font-size: 0.9rem; padding: 0.6em 1.15em; }

.btn--yellow {
    background: linear-gradient(180deg, var(--yellow) 0%, var(--yellow-deep) 100%);
    color: var(--navy);
    box-shadow: 0 4px 0 var(--yellow-edge), 0 10px 22px rgba(10, 30, 90, 0.22);
}
.btn--yellow:hover { box-shadow: 0 5px 0 var(--yellow-edge), 0 14px 26px rgba(10, 30, 90, 0.26); }

.btn--white { background: var(--white); color: var(--blue); box-shadow: 0 10px 22px rgba(10, 30, 90, 0.18); }

.btn--blue,
.btn--primary { background: var(--blue); color: var(--white); box-shadow: 0 6px 14px rgba(26, 102, 232, 0.28); }
.btn--blue:hover,
.btn--primary:hover { background: var(--blue-dark); color: var(--white); }

.btn--pill {
    background: var(--white);
    color: var(--blue);
    border: 1.5px solid #CADCFA;
    box-shadow: var(--shadow);
    font-size: 0.92rem;
    padding: 0.65em 1.25em;
    white-space: nowrap;
}
.btn--pill:hover { border-color: var(--blue); }

.round-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--blue);
    color: var(--white);
}
.round-arrow--white { background: var(--white); color: var(--tile, var(--blue)); }

/* ---------- Логотип-надпись ---------- */
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; --wm: 1; }
.brand-logo { display: block; max-height: 56px; width: auto; }

.wordmark {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    font-family: var(--font-head);
    font-weight: 900;
    line-height: 0.86;
    color: var(--white);
    transform: rotate(-5deg);
    text-shadow:
        2px 0 0 var(--navy), -2px 0 0 var(--navy), 0 2px 0 var(--navy), 0 -2px 0 var(--navy),
        1.5px 1.5px 0 var(--navy), -1.5px 1.5px 0 var(--navy), 1.5px -1.5px 0 var(--navy), -1.5px -1.5px 0 var(--navy),
        0 4px 0 var(--navy);
}
.wordmark__top { font-size: calc(21px * var(--wm)); letter-spacing: -0.01em; }
.wordmark__bottom { display: inline-flex; align-items: baseline; gap: 0.12em; margin-left: 0.3em; }
.wordmark__with { font-size: calc(15px * var(--wm)); }
.wordmark__max { font-size: calc(27px * var(--wm)); color: var(--yellow); letter-spacing: -0.01em; }

/* ---------- Шапка ---------- */
.masthead {
    position: relative;
    z-index: 20;
    background: var(--white);
    box-shadow: 0 2px 12px rgba(26, 60, 140, 0.08);
}
.masthead__inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: 68px;
}

.masthead__panel { display: none; }

.primary-nav__list { list-style: none; margin: 0; padding: 0; }
.primary-nav__list a {
    position: relative;
    display: block;
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--ink);
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}
.primary-nav__list a:hover,
.primary-nav__list a:focus-visible { color: var(--blue); }
.primary-nav__list .current-menu-item > a,
.primary-nav__list .current_page_item > a,
.primary-nav__list .current-menu-ancestor > a { color: var(--blue); font-weight: 600; }

.head-search {
    display: flex;
    align-items: center;
    background: #EEF3FB;
    border: 1.5px solid transparent;
    border-radius: 999px;
    padding: 0 0.35rem 0 1rem;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.head-search:focus-within { border-color: var(--blue); background: var(--white); }
.head-search input[type="search"] {
    flex: 1;
    min-width: 0;
    width: 100%;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 0.92rem;
    color: var(--ink);
    padding: 0.55rem 0;
    outline: none;
}
.head-search input[type="search"]::-webkit-search-cancel-button { display: none; }
.head-search__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: var(--blue);
    cursor: pointer;
    border-radius: 50%;
}

.masthead__tools { display: flex; align-items: center; gap: 0.9rem; }

.nav-toggle {
    margin-left: auto;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 46px;
    height: 46px;
    padding: 0 12px;
    border: 0;
    border-radius: var(--radius-sm);
    background: var(--blue-soft);
    cursor: pointer;
}
.nav-toggle__bar { display: block; height: 2.5px; border-radius: 2px; background: var(--navy); }

/* Мобильное меню */
@media (max-width: 1099px) {
    .masthead__panel.is-open {
        display: block;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        background: var(--white);
        box-shadow: 0 14px 24px rgba(26, 60, 140, 0.14);
        padding: 0.5rem 16px 1.2rem;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }
    .masthead__panel .primary-nav__list a {
        padding: 0.75rem 0.8rem;
        border-bottom: 1px solid var(--blue-soft);
        border-radius: var(--radius-sm);
    }
    .masthead__panel .primary-nav__list a:hover,
    .masthead__panel .primary-nav__list a:focus-visible {
        background: var(--blue-soft);
        transform: translateX(4px);
    }
    .masthead__panel .primary-nav__list .current-menu-item > a,
    .masthead__panel .primary-nav__list .current_page_item > a {
        background: var(--blue-soft);
        box-shadow: inset 4px 0 0 var(--blue);
    }
    .masthead__tools { margin-top: 1rem; flex-wrap: wrap; }
    .masthead__tools .head-search { flex: 1 1 220px; }
}

@media (min-width: 1100px) {
    .nav-toggle { display: none; }
    .masthead__panel {
        display: flex;
        flex: 1;
        align-items: center;
        justify-content: space-between;
        gap: 1.5rem;
        min-width: 0;
    }
    .primary-nav__list { display: flex; flex-wrap: wrap; gap: 0.3rem 0.35rem; }
    .primary-nav__list a {
        padding: 0.45rem 0.8rem;
        border-radius: 999px;
        font-size: 0.92rem;
    }
    /* Наведение: мягкая «таблетка» и линия, вырастающая из центра */
    .primary-nav__list a::after {
        content: "";
        position: absolute;
        left: 0.8rem; right: 0.8rem; bottom: -4px;
        height: 2.5px;
        border-radius: 2px;
        background: var(--blue);
        transform: scaleX(0);
        transition: transform 0.25s ease;
    }
    .primary-nav__list a:hover,
    .primary-nav__list a:focus-visible {
        background: var(--blue-soft);
        transform: translateY(-1px);
    }
    .primary-nav__list a:hover::after,
    .primary-nav__list a:focus-visible::after { transform: scaleX(0.5); }
    .primary-nav__list .current-menu-item > a::after,
    .primary-nav__list .current_page_item > a::after,
    .primary-nav__list .current-menu-ancestor > a::after { transform: scaleX(1); }
    .head-search { width: 190px; }

    /* На главной логотип «свисает» на первый экран, как в макете */
    .home .masthead .brand { --wm: 1.4; margin-bottom: -44px; position: relative; z-index: 2; }
}

/* ---------- Основная область ---------- */
.site-main { display: block; padding-bottom: 4rem; }
.site-main--front { padding-bottom: 0; }

.breadcrumbs {
    font-size: 0.92rem;
    color: var(--muted);
    padding: 1.6rem 0 0;
}
.breadcrumbs a { color: var(--blue); }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .sep { margin: 0 0.35rem; color: var(--muted); }
.breadcrumbs span:last-child { color: var(--ink); }

.page-head { margin: 1rem 0 2rem; }
.page-title { margin: 0; overflow-wrap: anywhere; }
.page-title::after,
.entry-title::after {
    content: "";
    display: block;
    width: 64px;
    height: 6px;
    margin-top: 0.8rem;
    border-radius: 3px;
    background: var(--yellow-deep);
}
.page-lead { color: var(--muted); margin: 1rem 0 0; }

/* Раскладки */
.layout-single .content-area { min-width: 0; }
.layout-with-sidebar { display: block; }
.layout-with-sidebar > * { min-width: 0; }
.layout-with-sidebar .sidebar { margin-top: 3rem; }

@media (min-width: 960px) {
    .layout-single .content-area { max-width: 900px; margin-left: auto; margin-right: auto; }
    .layout-with-sidebar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 2.5rem;
        align-items: start;
    }
    .layout-with-sidebar .sidebar { margin-top: 0; }
}

/* ---------- Сайдбар ---------- */
.sidebar {
    background: var(--white);
    color: var(--ink);
    padding: 1.6rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.sidebar .widget { margin: 0 0 2rem; color: var(--ink); }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title { margin: 0 0 0.8rem; font-size: 1.15rem; color: var(--navy); }
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li { padding: 0.65rem 0; border-bottom: 1px solid var(--blue-soft); }
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget a { color: var(--ink); font-weight: 700; }
.sidebar .widget a:hover { color: var(--blue); }
.sidebar .widget .post-date { display: block; font-size: 0.85rem; color: var(--muted); margin-top: 0.15rem; }

/* ---------- Карточки материалов ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
    gap: 1.4rem;
}
.mat-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-top: 1.1rem;
}
.card-grid > *, .mat-grid > * { min-width: 0; }

@media (max-width: 1099px) { .mat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 699px)  { .mat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 359px)  { .mat-grid { grid-template-columns: minmax(0, 1fr); } }

.card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }

.card__thumb { display: block; background: var(--panel); }
.card__thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 180 / 111;
    object-fit: cover;
}

.card-body {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.1rem 1rem 1rem;
    min-width: 0;
}
.card-body > .tag {
    position: absolute;
    top: -14px;
    left: 12px;
}
.card__title {
    font-size: 1.02rem;
    font-weight: 700;
    margin: 0.35rem 0 0.35rem;
    overflow-wrap: anywhere;
}
.card-grid .card__title { font-size: 1.15rem; }
.card__title a { color: var(--navy); }
.card__title a:hover { color: var(--blue); }
.card-excerpt {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.45;
    margin: 0 0 0.4rem;
    padding-right: 34px;
}
.card-grid .card-excerpt { font-size: 0.95rem; }
.card__go {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 28px;
    height: 28px;
    background: var(--blue-soft);
    color: var(--blue);
}
.card__go:hover { background: var(--blue); color: var(--white); }

.card.sticky { box-shadow: inset 0 4px 0 var(--yellow-deep), var(--shadow); }
.card__pin { align-self: flex-start; font-size: 0.78rem; font-weight: 700; color: #9A6A00; background: #FFF3C4; border-radius: 999px; padding: 0.15em 0.7em; margin-bottom: 0.4rem; }

.tag {
    display: inline-block;
    align-self: flex-start;
    background: var(--white);
    color: var(--blue);
    font-family: var(--font-head);
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.55em 0.95em;
    border-radius: 999px;
    box-shadow: 0 3px 10px rgba(26, 60, 140, 0.14);
}
.tag:hover { background: var(--blue); color: var(--white); }

.empty-note {
    background: var(--white);
    padding: 1.4rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
}

/* ---------- Пагинация (type => plain) ---------- */
.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-top: 2.6rem;
}
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    height: 2.75rem;
    padding: 0 0.9rem;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--navy);
    background: var(--white);
    border: 1.5px solid var(--panel-line);
    border-radius: var(--radius-sm);
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.pager a.page-numbers:hover { border-color: var(--blue); color: var(--blue); }
.pager .page-numbers.current { background: var(--blue); border-color: var(--blue); color: var(--white); }
.pager .page-numbers.dots { background: none; border: 0; min-width: auto; padding: 0 0.3rem; }

/* ---------- Запись и страница ---------- */
.entry {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    padding: 1.6rem 1.3rem 2rem;
    margin-top: 1.2rem;
}
@media (min-width: 700px) { .entry { padding: 2.4rem 2.6rem 2.8rem; } }

.entry-header { margin: 0 0 1.8rem; }
.entry-header .tag { box-shadow: none; background: var(--blue-soft); }
.entry-title { margin: 0.8rem 0 0; overflow-wrap: anywhere; }
.entry-meta { color: var(--muted); font-size: 0.95rem; margin-top: 0.9rem; }
.entry-thumb { margin: 0 0 2rem; }
.entry-thumb img { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); }

.entry-content { font-size: 1.1rem; max-width: 72ch; }
.layout-with-sidebar .entry-content { max-width: none; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { margin-top: 1.8em; }
.entry-content a { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.entry-content li { margin-bottom: 0.35em; }
.entry-content li::marker { color: var(--blue); }
.entry-content blockquote {
    margin: 1.8em 0;
    padding: 1.2rem 1.5rem;
    background: #FFF8DB;
    border-left: 5px solid var(--yellow-deep);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-size: 1.12rem;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content pre {
    background: var(--navy);
    color: #DDE6FF;
    padding: 1.1rem 1.3rem;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    font-size: 0.92rem;
}
.entry-content code { font-size: 0.92em; background: var(--blue-soft); padding: 0.1em 0.35em; border-radius: 6px; }
.entry-content pre code { background: none; padding: 0; }
.entry-content figure { margin: 1.8em 0; }
.entry-content img { border-radius: var(--radius-md); }
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content hr { border: 0; border-top: 2px dashed var(--panel-line); margin: 2.5em 0; }

.entry-footer { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.entry-footer .tag { box-shadow: none; background: var(--blue-soft); }

.alignleft { float: left; margin: 0.3em 1.5em 1em 0; }
.alignright { float: right; margin: 0.3em 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption, .wp-block-image figcaption, .gallery-caption { font-size: 0.9rem; color: var(--muted); }
.bypostauthor > .comment-body .fn { color: var(--blue); }

.post-nav { margin-top: 2rem; }
.post-nav .nav-links { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 600px) {
    .post-nav .nav-links { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .post-nav .nav-next { text-align: right; }
}
.post-nav a {
    display: block;
    height: 100%;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    padding: 1rem 1.3rem;
    color: var(--navy);
    font-family: var(--font-head);
    font-weight: 600;
}
.post-nav a:hover { color: var(--blue); }
.post-nav .nav-label { display: block; font-size: 0.82rem; color: var(--muted); font-weight: 500; margin-bottom: 0.2rem; }

/* ---------- Комментарии ---------- */
.comments { margin-top: 3rem; }
.comments__title { margin: 0 0 1.5rem; }
.comment-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.comment-list .children { list-style: none; padding-left: 1.5rem; }
.comment-body {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    padding: 1.2rem 1.4rem;
    margin-bottom: 1rem;
}
.comment-meta { font-size: 0.9rem; color: var(--muted); }
.comment-meta a { color: var(--muted); }
.comment-author .avatar { float: left; margin-right: 0.8rem; border-radius: 50%; }
.comment-author .fn { font-family: var(--font-head); font-weight: 600; color: var(--navy); font-style: normal; }
.comment-content { clear: both; padding-top: 0.6rem; }
.reply a { font-family: var(--font-head); font-weight: 600; font-size: 0.9rem; }

.comment-respond {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.6rem 1.6rem 1.8rem;
}
.comment-reply-title { margin-top: 0; }
.comment-form label { display: block; font-weight: 700; margin-bottom: 0.3rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--panel-line);
    border-radius: var(--radius-sm);
    font: inherit;
    background: var(--page);
    color: var(--ink);
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--blue); outline: none; }
.comment-form .comment-form-cookies-consent label { display: inline; font-weight: 400; }
.comment-form .submit {
    background: var(--blue);
    color: var(--white);
    border: 0;
    border-radius: 999px;
    padding: 0.85em 1.6em;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
}
.comment-form .submit:hover { background: var(--blue-dark); }

/* ---------- Поиск (searchform.php) ---------- */
.search-box { display: flex; gap: 0.5rem; max-width: 560px; }
.search-box input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 0.8rem 1.1rem;
    border: 1.5px solid var(--panel-line);
    border-radius: 999px;
    font: inherit;
    background: var(--white);
    color: var(--ink);
}
.search-box input[type="search"]:focus { border-color: var(--blue); outline: none; }

/* ---------- 404 ---------- */
.notfound { padding: 2rem 0 1rem; }
.notfound__code {
    font-family: var(--font-head);
    font-weight: 900;
    font-size: clamp(5rem, 16vw, 10rem);
    line-height: 1;
    color: var(--yellow);
    margin: 0;
    text-shadow: 4px 0 0 var(--navy), -4px 0 0 var(--navy), 0 4px 0 var(--navy), 0 -4px 0 var(--navy), 3px 3px 0 var(--navy), -3px 3px 0 var(--navy), 3px -3px 0 var(--navy), -3px -3px 0 var(--navy), 0 9px 0 var(--navy);
}
.notfound .search-box { margin: 1.8rem 0; }

/* =====================================================
   Главная
   ===================================================== */

/* ---------- Первый экран ---------- */
.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 18% 110%, rgba(120, 220, 140, 0.35) 0, rgba(120, 220, 140, 0) 45%),
        linear-gradient(100deg, #0A4FC4 0%, #1C7FEB 40%, #4DB3F7 70%, #8FD3FB 100%);
}
.hero__art {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: min(62%, 900px);
    object-fit: cover;
    object-position: 20% 40%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22%);
    mask-image: linear-gradient(90deg, transparent 0, #000 22%);
}
.hero__inner {
    position: relative;
    display: flex;
    align-items: center;
    min-height: clamp(400px, 34vw, 480px);
    padding: 4.2rem 0 3rem;
}
.hero__text { max-width: 540px; }

.hero__title {
    margin: 0 0 1.4rem;
    font-weight: 900;
    font-size: clamp(2.3rem, 4.6vw, 3.7rem);
    line-height: 1.02;
    color: var(--white);
    transform: rotate(-3deg);
    transform-origin: left center;
    text-shadow:
        3px 0 0 var(--navy), -3px 0 0 var(--navy), 0 3px 0 var(--navy), 0 -3px 0 var(--navy),
        2px 2px 0 var(--navy), -2px 2px 0 var(--navy), 2px -2px 0 var(--navy), -2px -2px 0 var(--navy),
        0 7px 0 var(--navy), 0 14px 22px rgba(0, 20, 80, 0.35);
}
.hero__line { display: block; }
.hero__line--yellow { color: var(--yellow); }

.hero__lead {
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.5;
    max-width: 30em;
    margin: 0 0 1.6rem;
    text-shadow: 0 1px 3px rgba(0, 20, 80, 0.55);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

@media (max-width: 859px) {
    .hero {
        background: linear-gradient(180deg, #0A4FC4 0%, #1C7FEB 55%, #4DB3F7 100%);
    }
    .hero__inner { min-height: 0; padding: 2.4rem 0 1.4rem; }
    .hero__art {
        position: static;
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: 568 / 355;
        -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%);
        mask-image: linear-gradient(180deg, transparent 0, #000 22%);
    }
    .hero { display: flex; flex-direction: column-reverse; }
}

/* ---------- Четыре раздела ---------- */
.features { margin-top: 22px; }
.features__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
@media (max-width: 1099px) { .features__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .features__grid { grid-template-columns: minmax(0, 1fr); } }

.feature {
    position: relative;
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: center;
    gap: 0.8rem;
    min-height: 124px;
    padding: 14px 44px 14px 14px;
    border-radius: var(--radius-lg);
    background: var(--f-bg);
    box-shadow: var(--shadow);
    color: var(--ink);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.feature--pink { --f-bg: #FDE9EE; --f-accent: #FF6B81; }
.feature--mint { --f-bg: #E5F7F5; --f-accent: #1DB5C6; }
.feature--sun  { --f-bg: #FEF8E0; --f-accent: #FFBE12; }
.feature--sky  { --f-bg: #E8F2FC; --f-accent: #2D7FF0; }

.feature__img {
    display: block;
    width: 92px;
    height: 92px;
    object-fit: contain;
    -webkit-mask-image: radial-gradient(circle, #000 58%, transparent 72%);
    mask-image: radial-gradient(circle, #000 58%, transparent 72%);
}
.feature__body { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.feature__title { font-family: var(--font-head); font-weight: 700; font-size: 1.08rem; line-height: 1.15; color: var(--navy); }
.feature__text { font-size: 0.86rem; line-height: 1.35; color: var(--muted); }
.feature .round-arrow { position: absolute; right: 12px; bottom: 12px; background: var(--f-accent); }

/* ---------- Панели разделов ---------- */
.block { margin-top: 22px; }

.panel {
    background: linear-gradient(180deg, var(--panel) 0%, #F2F7FF 100%);
    border: 1px solid var(--panel-line);
    border-radius: var(--radius-xl);
    padding: 20px 16px 18px;
}
@media (min-width: 700px) { .panel { padding: 22px 22px 22px; } }

.panel__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem 1.5rem;
}
.panel__title { margin: 0; font-size: clamp(1.6rem, 2.7vw, 2.2rem); font-weight: 800; }
.panel__lead { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.98rem; }

/* ---------- Приложения ---------- */
.apps {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-top: 1.1rem;
}
@media (max-width: 1099px) { .apps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px)  { .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.app {
    display: flex;
    flex-direction: column;
    background: var(--tile);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(26, 60, 140, 0.16);
    color: var(--white);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.app:hover { transform: translateY(-3px); box-shadow: 0 14px 26px rgba(26, 60, 140, 0.22); }
.app__img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 148 / 127;
    object-fit: cover;
    -webkit-mask-image: linear-gradient(180deg, #000 82%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 82%, transparent 100%);
}
.app__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 52px;
    padding: 4px 10px 12px 14px;
}
.app__label { font-weight: 700; font-size: 0.86rem; line-height: 1.2; }

/* ---------- Английский вокруг нас ---------- */
.panel--world {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    padding: 0;
    overflow: hidden;
}
.world__text { padding: 22px 22px 22px; }
.world__art {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    object-position: 60% 30%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14%);
    mask-image: linear-gradient(90deg, transparent 0, #000 14%);
}
@media (max-width: 859px) {
    .panel--world { grid-template-columns: minmax(0, 1fr); }
    .world__text { padding: 20px 16px 8px; }
    .world__art {
        height: auto;
        min-height: 0;
        aspect-ratio: 528 / 180;
        -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 18%);
        mask-image: linear-gradient(180deg, transparent 0, #000 18%);
    }
}

.chips {
    list-style: none;
    margin: 1.1rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    width: 80px;
    padding: 10px 3px 9px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--ink);
    text-align: center;
    overflow-wrap: anywhere;
    transition: transform 0.15s ease;
}
.chip:hover { transform: translateY(-2px); color: var(--blue); }
.chip img { display: block; width: 30px; height: 30px; object-fit: contain; }

/* ---------- Призыв к действию ---------- */
.cta {
    margin-top: 40px;
    background:
        radial-gradient(circle at 80% 30%, rgba(80, 210, 252, 0.75) 0, rgba(80, 210, 252, 0) 32%),
        linear-gradient(100deg, #0A3FB6 0%, #1470E6 45%, #1E8CF3 70%, #0A55DE 100%);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    color: var(--white);
}
.cta__inner {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) auto 320px;
    align-items: center;
    gap: 1.5rem;
}
.cta__deco {
    display: block;
    width: 110px;
    height: auto;
    align-self: center;
    -webkit-mask-image: radial-gradient(ellipse at center, #000 55%, transparent 75%);
    mask-image: radial-gradient(ellipse at center, #000 55%, transparent 75%);
}
.cta__text { padding: 2rem 0; }
.cta__title { margin: 0 0 0.6rem; color: var(--white); font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.4rem); text-shadow: 0 3px 10px rgba(0, 20, 80, 0.3); }
.cta__lead { margin: 0; font-size: 1.05rem; font-weight: 600; opacity: 0.95; max-width: 26em; }
.cta__art {
    display: block;
    align-self: end;
    width: 320px;
    height: auto;
    margin-top: 1.2rem;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16%, #000 88%, transparent 100%), linear-gradient(180deg, transparent 0, #000 14%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(90deg, transparent 0, #000 16%, #000 88%, transparent 100%), linear-gradient(180deg, transparent 0, #000 14%);
    mask-composite: intersect;
}
@media (max-width: 1099px) {
    .cta__inner { grid-template-columns: minmax(0, 1fr) auto; }
    .cta__deco { display: none; }
    .cta__art { grid-column: 1 / -1; justify-self: center; margin-top: 0; width: min(100%, 360px); }
    .cta__text { padding: 2rem 0 0; }
}
@media (max-width: 600px) {
    .cta__inner { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
    .cta__btn { justify-self: start; }
}

/* ---------- Подвал ---------- */
.colophon { background: #EEF4FC; border-top: 1px solid var(--panel-line); padding: 1.6rem 0; }
.site-main--front + .colophon { border-top: 0; }
.colophon__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.2rem 2rem;
}
.colophon__brand { display: flex; align-items: center; gap: 1.2rem; min-width: 0; }
.brand--small { --wm: 0.85; padding: 6px 0; }
.colophon__about { margin: 0; max-width: 250px; font-size: 0.78rem; line-height: 1.45; color: var(--muted); }
.colophon__social { display: flex; gap: 0.6rem; }
.social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #5D6780;
    color: var(--white);
}
.social:hover { background: var(--blue); }
.colophon__nav { flex: 1 1 auto; min-width: 0; }
.colophon__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.6rem; }
.colophon__list a { font-size: 0.85rem; color: var(--ink); }
.colophon__list a:hover { color: var(--blue); }
.colophon__copy {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--muted);
    padding-left: 1.4rem;
    border-left: 1px solid #CAD7EA;
}
@media (max-width: 859px) {
    .colophon__brand { flex: 1 1 100%; }
    .colophon__list { justify-content: flex-start; }
    .colophon__copy { flex: 1 1 100%; padding-left: 0; border-left: 0; }
}

/* ---------- Cookie-баннер ---------- */
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 999;
    background: var(--navy);
    color: #DDE6FF;
    box-shadow: 0 -6px 20px rgba(14, 29, 94, 0.25);
}
.cookie-banner__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    padding: 1.1rem 0;
}
.cookie-banner__text { margin: 0; flex: 1 1 320px; min-width: 0; font-size: 0.95rem; color: #DDE6FF; }
.cookie-banner__text a { color: var(--white); text-decoration: underline; }
