/*
Theme Name: Beige School
Theme URI: https://example.com/themes/beige-school
Author: Beige School Team
Author URI: https://example.com
Description: Классическая универсальная тема для сайта школы или гимназии: новостная лента, слайдер на главной, видео- и фотогалерея-виджеты, несколько областей меню, настройки контактов и цветов в кастомайзере. Тема совместима как с новыми (WordPress 7.x), так и со старыми версиями WordPress (от 4.9), поддерживает классический редактор и Gutenberg, PHP 7.0+.
Version: 1.0.0
Requires at least: 4.9
Tested up to: 7.1
Requires PHP: 7.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: beige-school
Tags: education, news, blog, two-columns, right-sidebar, custom-menu, custom-logo, featured-images, theme-options, translation-ready, threaded-comments, sticky-post
*/

/* =========================================================
   1. Переменные и сброс
   ========================================================= */
:root {
        --bs-bg:        #f6f1e7;   /* фон страницы — светлый крем */
        --bs-paper:     #fffdf8;   /* карточки */
        --bs-sand:      #efe5d3;   /* чередующиеся секции */
        --bs-sand-2:    #e5d7bf;   /* плашки */
        --bs-line:      #ddd0ba;   /* границы */
        --bs-tan:       #c9b28c;   /* основной бежевый */
        --bs-accent:    #a97e3f;   /* акцент (настраивается) */
        --bs-accent-d:  #8a6631;   /* акцент тёмный */
        --bs-brown:     #6d5433;   /* заголовки-акценты */
        --bs-coffee:    #40372b;   /* основной текст */
        --bs-mute:      #857862;   /* второстепенный текст */
        --bs-dark:      #33291c;   /* тёмные полосы (топбар, футер) */
        --bs-white:     #fffdf8;
        --bs-shadow:    0 10px 30px rgba(64, 49, 25, 0.10);
        --bs-radius:    14px;
        --bs-font-head: 'Playfair Display', Georgia, 'Times New Roman', serif;
        --bs-font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
        --bs-container: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
        margin: 0;
        background: var(--bs-bg);
        color: var(--bs-coffee);
        font-family: var(--bs-font-body);
        font-size: 16.5px;
        line-height: 1.7;
        -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, h5, h6 {
        font-family: var(--bs-font-head);
        color: var(--bs-brown);
        line-height: 1.25;
        margin: 0 0 0.6em;
        font-weight: 700;
}
h1 { font-size: 2.1em; }
h2 { font-size: 1.75em; }
h3 { font-size: 1.35em; }

p { margin: 0 0 1.15em; }

a { color: var(--bs-accent); text-decoration: none; transition: color .18s ease, background .18s ease, border-color .18s ease; }
a:hover, a:focus { color: var(--bs-accent-d); }

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

blockquote {
        margin: 1.4em 0;
        padding: 1em 1.4em;
        background: var(--bs-sand);
        border-left: 4px solid var(--bs-tan);
        border-radius: 0 var(--bs-radius) var(--bs-radius) 0;
        font-style: italic;
        color: var(--bs-brown);
}

table { width: 100%; border-collapse: collapse; margin: 1.4em 0; }
th, td { padding: .65em .9em; border: 1px solid var(--bs-line); text-align: left; }
th { background: var(--bs-sand-2); color: var(--bs-brown); font-weight: 700; }
tr:nth-child(even) td { background: rgba(239, 229, 211, .45); }

code, kbd, pre, samp { font-family: 'Sarasa Mono SC', Consolas, Monaco, monospace; font-size: .92em; background: var(--bs-sand); border-radius: 6px; }
code, kbd { padding: .12em .4em; }
pre { padding: 1em 1.2em; overflow: auto; }

hr { border: 0; height: 2px; background: var(--bs-sand-2); margin: 2em 0; }

:focus-visible { outline: 3px solid var(--bs-tan); outline-offset: 2px; border-radius: 4px; }

.screen-reader-text {
        border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
        height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important;
        word-wrap: normal !important;
}
.screen-reader-text:focus {
        background: var(--bs-paper); clip: auto !important; clip-path: none; color: var(--bs-coffee);
        display: block; font-size: 1em; height: auto; left: 8px; line-height: normal; padding: 14px 22px;
        border-radius: 8px; text-decoration: none; top: 8px; width: auto; z-index: 100000; box-shadow: var(--bs-shadow);
}

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; z-index: 100000; }

/* Кнопки */
.bs-btn {
        display: inline-block;
        padding: .72em 1.7em;
        border-radius: 999px;
        background: var(--bs-accent);
        color: #fff !important;
        font-weight: 700;
        font-size: .95em;
        border: 2px solid var(--bs-accent);
        cursor: pointer;
        line-height: 1.4;
        text-align: center;
}
.bs-btn:hover, .bs-btn:focus { background: var(--bs-accent-d); border-color: var(--bs-accent-d); transform: translateY(-1px); }
.bs-btn--ghost { background: transparent; color: var(--bs-accent) !important; }
.bs-btn--ghost:hover { background: var(--bs-accent); color: #fff !important; }
.bs-btn--light { background: var(--bs-paper); border-color: var(--bs-paper); color: var(--bs-brown) !important; }
.bs-btn--light:hover { background: var(--bs-sand-2); border-color: var(--bs-sand-2); }

/* Сетка и контейнер */
.bs-container { max-width: var(--bs-container); margin: 0 auto; padding: 0 22px; }
.bs-section { padding: 58px 0; }
.bs-section--alt { background: var(--bs-sand); }

.bs-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }
.bs-section-head h2 { margin: 0; position: relative; padding-top: 14px; }
.bs-section-head h2::before {
        content: ""; position: absolute; top: 0; left: 2px; width: 54px; height: 5px;
        border-radius: 3px; background: linear-gradient(90deg, var(--bs-accent), var(--bs-tan));
}
.bs-section-head p { margin: 0; color: var(--bs-mute); max-width: 520px; }
.bs-section-link { white-space: nowrap; font-weight: 700; }

/* =========================================================
   2. Топбар и шапка
   ========================================================= */
.bs-topbar { background: var(--bs-dark); color: #d9cdb4; font-size: .84em; }
.bs-topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 40px; flex-wrap: wrap; padding: 4px 0; }
.bs-topbar a { color: #e9ddc4; }
.bs-topbar a:hover { color: #fff; }
.bs-topbar__contacts { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.bs-topbar__contacts span { display: inline-flex; align-items: center; gap: 6px; }
.bs-topbar__contacts svg { width: 14px; height: 14px; fill: var(--bs-tan); }
.bs-topbar__menu ul { list-style: none; display: flex; gap: 18px; margin: 0; padding: 0; }
.bs-topbar__menu li { position: relative; }
.bs-topbar__menu a { text-decoration: none; }

.bs-header { background: var(--bs-paper); border-bottom: 1px solid var(--bs-line); position: relative; z-index: 90; }
.bs-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; }

.bs-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.bs-brand__logo { flex: 0 0 auto; display: flex; align-items: center; }
.bs-brand__logo img { max-height: 64px; width: auto; }
.bs-brand__mark {
        width: 54px; height: 54px; border-radius: 50%;
        background: radial-gradient(circle at 30% 25%, var(--bs-tan), var(--bs-accent));
        color: #fff; display: flex; align-items: center; justify-content: center;
        font-family: var(--bs-font-head); font-size: 1.7em; font-weight: 800;
        box-shadow: inset 0 -3px 8px rgba(0,0,0,.18), 0 4px 10px rgba(64,49,25,.18);
}
.bs-brand__text { min-width: 0; }
.bs-brand__name {
        font-family: var(--bs-font-head); font-size: 1.28em; font-weight: 800; color: var(--bs-brown);
        line-height: 1.2; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bs-brand__name a { color: inherit; }
.bs-brand__tagline { margin: 2px 0 0; font-size: .8em; color: var(--bs-mute); line-height: 1.35; }

.bs-header__actions { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }

/* Поиск в шапке */
.bs-search { position: relative; }
.bs-search__toggle {
        width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--bs-line);
        background: var(--bs-sand); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.bs-search__toggle svg { width: 17px; height: 17px; fill: var(--bs-brown); }
.bs-search__toggle:hover { background: var(--bs-sand-2); }
.bs-search__form {
        position: absolute; right: 0; top: calc(100% + 10px); width: min(340px, 78vw);
        background: var(--bs-paper); border: 1px solid var(--bs-line); border-radius: 12px;
        box-shadow: var(--bs-shadow); padding: 10px; display: none; z-index: 95;
}
.bs-search__form.is-open { display: block; }
.bs-search__form label { display: none; }
.bs-search__form input[type="search"] {
        width: 100%; padding: .6em 1em; border: 1px solid var(--bs-line); border-radius: 999px;
        background: var(--bs-bg); font: inherit; font-size: .92em; color: var(--bs-coffee);
}

/* Главное меню */
.bs-nav { background: linear-gradient(180deg, var(--bs-sand), var(--bs-sand-2)); border-top: 1px solid var(--bs-line); position: relative; }
.bs-nav__toggle {
        display: none; width: 100%; background: none; border: 0; padding: 13px 0; cursor: pointer;
        font: inherit; font-weight: 700; color: var(--bs-brown); align-items: center; gap: 10px; justify-content: center;
}
.bs-nav__toggle .bars { display: inline-block; }
.bs-nav__toggle .bars i { display: block; width: 22px; height: 2.6px; border-radius: 2px; background: var(--bs-brown); margin: 4.5px 0; transition: transform .2s ease, opacity .2s ease; }
.bs-nav__toggle[aria-expanded="true"] .bars i:nth-child(1) { transform: translateY(7.1px) rotate(45deg); }
.bs-nav__toggle[aria-expanded="true"] .bars i:nth-child(2) { opacity: 0; }
.bs-nav__toggle[aria-expanded="true"] .bars i:nth-child(3) { transform: translateY(-7.1px) rotate(-45deg); }

.bs-nav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.bs-nav__list > li { position: relative; }
.bs-nav__list a {
        display: block; padding: 14px 18px; color: var(--bs-brown); font-weight: 700; font-size: .93em;
        text-transform: uppercase; letter-spacing: .035em; text-decoration: none; position: relative;
}
.bs-nav__list > li > a::after {
        content: ""; position: absolute; left: 18px; right: 18px; bottom: 8px; height: 3px; border-radius: 2px;
        background: var(--bs-accent); transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
}
.bs-nav__list > li > a:hover::after, .bs-nav__list > li.current-menu-item > a::after,
.bs-nav__list > li.current_page_item > a::after, .bs-nav__list > li.current-menu-ancestor > a::after { transform: scaleX(1); }
.bs-nav__list > li.current-menu-item > a, .bs-nav__list > li.current_page_item > a { color: var(--bs-accent-d); }

/* Выпадающие подпункты */
.bs-nav__list ul {
        list-style: none; margin: 0; padding: 8px 0; position: absolute; top: 100%; left: 0; min-width: 230px;
        background: var(--bs-paper); border: 1px solid var(--bs-line); border-radius: 0 0 12px 12px;
        box-shadow: var(--bs-shadow); opacity: 0; visibility: hidden; transform: translateY(8px);
        transition: opacity .18s ease, transform .18s ease, visibility .18s; z-index: 80;
}
.bs-nav__list li:hover > ul, .bs-nav__list li:focus-within > ul, .bs-nav__list li.is-open > ul {
        opacity: 1; visibility: visible; transform: translateY(0);
}
.bs-nav__list ul li { position: relative; }
.bs-nav__list ul a { padding: 10px 18px; text-transform: none; letter-spacing: 0; font-weight: 600; font-size: .92em; }
.bs-nav__list ul a:hover, .bs-nav__list ul li.current-menu-item > a { background: var(--bs-sand); color: var(--bs-accent-d); }
.bs-nav__list ul ul { top: -9px; left: 100%; border-radius: 12px; }

/* Стрелка подменю */
.bs-nav__list .menu-item-has-children > a::before { content: ""; }
.bs-nav__list .menu-item-has-children > a { padding-right: 34px; }
.bs-nav__list .menu-item-has-children > a::after {
        display: none;
}
.bs-nav__list .menu-item-has-children > a .bs-caret {
        position: absolute; right: 16px; top: 50%; width: 9px; height: 9px; margin-top: -6px;
        border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
        transform: rotate(45deg); transition: transform .18s ease; pointer-events: none;
}
.bs-nav__list .menu-item-has-children:hover > a .bs-caret { transform: rotate(225deg); margin-top: -3px; }

/* Кнопка подменю для мобильных */
.bs-sub-toggle { display: none; }

/* =========================================================
   3. Слайдер на главной
   ========================================================= */
.bs-slider { position: relative; background: var(--bs-dark); overflow: hidden; }
/* Слайды лежат стопкой в одной ячейке грида: высота блока одинакова у всех
   слайдов (равна самому высокому), поэтому фотографии не «прыгают» по размеру. */
.bs-slider__viewport { position: relative; display: grid; min-height: 300px; }
.bs-slider__slide { grid-area: 1 / 1; position: relative; display: block; visibility: hidden; opacity: 0; z-index: 0; pointer-events: none; transition: opacity .5s ease; }
.bs-slider__slide.is-active { visibility: visible; opacity: 1; z-index: 1; pointer-events: auto; }
.bs-slider__media { position: absolute; inset: 0; }
.bs-slider__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bs-slider__slide::after {
        content: ""; position: absolute; inset: 0;
        background: linear-gradient(100deg, rgba(38,28,15,.82) 8%, rgba(38,28,15,.55) 46%, rgba(38,28,15,.12) 80%);
}
.bs-slider__caption {
        position: relative; z-index: 2; max-width: var(--bs-container); margin: 0 auto; padding: 84px 22px 96px;
        color: #fdf8ee;
}
.bs-slider__chip {
        display: inline-block; padding: .3em 1em; border-radius: 999px; background: rgba(201,178,140,.25);
        border: 1px solid rgba(233,221,196,.5); font-size: .78em; letter-spacing: .08em; text-transform: uppercase; font-weight: 700;
        margin-bottom: 16px; color: #f3e9d5;
}
.bs-slider__title { font-family: var(--bs-font-head); font-size: clamp(1.7em, 4vw, 3em); line-height: 1.18; margin: 0 0 14px; max-width: 780px; color: #fffdf6; }
.bs-slider__title a { color: inherit; text-decoration: none; }
.bs-slider__title a:hover { color: var(--bs-tan); }
.bs-slider__excerpt { max-width: 560px; color: #eee3cd; margin-bottom: 24px; font-size: 1.02em; }
.bs-slider__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.bs-slider__arrow {
        position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
        width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,250,238,.4);
        background: rgba(51,41,28,.35); color: #fdf8ee; cursor: pointer; display: flex; align-items: center; justify-content: center;
        transition: background .18s ease;
}
.bs-slider__arrow:hover { background: var(--bs-accent); border-color: var(--bs-accent); }
.bs-slider__arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.bs-slider__arrow--prev { left: 18px; }
.bs-slider__arrow--next { right: 18px; }

.bs-slider__dots { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; gap: 9px; }
.bs-slider__dot {
        width: 11px; height: 11px; border-radius: 50%; border: 2px solid #f0e5cd; background: transparent; cursor: pointer; padding: 0;
        transition: background .18s ease, transform .18s ease;
}
.bs-slider__dot.is-active { background: var(--bs-tan); border-color: var(--bs-tan); transform: scale(1.15); }

@keyframes bsFadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.bs-slider__slide.is-active .bs-slider__caption > * { animation: bsFadeUp .55s ease both; }
.bs-slider__slide.is-active .bs-slider__caption > *:nth-child(2) { animation-delay: .08s; }
.bs-slider__slide.is-active .bs-slider__caption > *:nth-child(3) { animation-delay: .16s; }
.bs-slider__slide.is-active .bs-slider__caption > *:nth-child(4) { animation-delay: .24s; }

/* =========================================================
   4. Преимущества (карточки на главной)
   ========================================================= */
.bs-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.bs-feature {
        background: var(--bs-paper); border: 1px solid var(--bs-line); border-radius: var(--bs-radius);
        padding: 26px 24px; transition: transform .2s ease, box-shadow .2s ease;
}
.bs-feature:hover { transform: translateY(-4px); box-shadow: var(--bs-shadow); }
.bs-feature__icon {
        width: 56px; height: 56px; border-radius: 16px; background: var(--bs-sand);
        display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.bs-feature__icon svg { width: 28px; height: 28px; fill: none; stroke: var(--bs-accent); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.bs-feature h3 { font-size: 1.08em; margin-bottom: 8px; }
.bs-feature p { margin: 0; color: var(--bs-mute); font-size: .92em; line-height: 1.6; }

/* =========================================================
   5. Новости (сетка карточек)
   ========================================================= */
.bs-news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.bs-card {
        background: var(--bs-paper); border: 1px solid var(--bs-line); border-radius: var(--bs-radius);
        overflow: hidden; display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease;
        height: 100%;
}
.bs-card:hover { transform: translateY(-4px); box-shadow: var(--bs-shadow); }
.bs-card__thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bs-sand-2); }
.bs-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; display: block; }
.bs-card:hover .bs-card__thumb img { transform: scale(1.05); }
.bs-card__body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1 1 auto; }
.bs-card__meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .8em; color: var(--bs-mute); margin-bottom: 10px; }
.bs-card__cat {
        background: var(--bs-sand-2); color: var(--bs-brown); padding: .18em .8em; border-radius: 999px;
        font-weight: 700; text-decoration: none; letter-spacing: .03em; text-transform: uppercase; font-size: .92em;
}
.bs-card__cat:hover { background: var(--bs-tan); color: #fff; }
.bs-card__title { font-size: 1.12em; margin: 0 0 10px; line-height: 1.35; }
.bs-card__title a { color: var(--bs-brown); text-decoration: none; }
.bs-card__title a:hover { color: var(--bs-accent); }
.bs-card__excerpt { color: var(--bs-mute); font-size: .93em; margin-bottom: 16px; }
.bs-card__more { margin-top: auto; font-weight: 700; font-size: .9em; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.bs-card__more::after { content: "→"; transition: transform .18s ease; }
.bs-card:hover .bs-card__more::after { transform: translateX(4px); }

/* Лента новостей (страница блога): горизонтальные карточки */
.bs-post-list { display: grid; gap: 26px; }
.bs-row {
        display: grid; grid-template-columns: 300px 1fr; gap: 0;
        background: var(--bs-paper); border: 1px solid var(--bs-line); border-radius: var(--bs-radius); overflow: hidden;
        transition: transform .2s ease, box-shadow .2s ease;
}
.bs-row:hover { transform: translateY(-3px); box-shadow: var(--bs-shadow); }
.bs-row__thumb { position: relative; min-height: 210px; background: var(--bs-sand-2); }
.bs-row__thumb a { display: block; height: 100%; }
.bs-row__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bs-row__body { padding: 24px 28px; }
.bs-row--nothumb { grid-template-columns: 1fr; }

.bs-announce { background: var(--bs-paper); border: 1px solid var(--bs-line); border-radius: var(--bs-radius); padding: 26px 28px; }
.bs-announce__item { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px dashed var(--bs-line); align-items: baseline; }
.bs-announce__item:last-child { border-bottom: 0; }
.bs-announce__date { flex: 0 0 auto; font-weight: 800; color: var(--bs-accent); font-size: .88em; white-space: nowrap; }
.bs-announce__title a { color: var(--bs-coffee); text-decoration: none; font-weight: 600; }
.bs-announce__title a:hover { color: var(--bs-accent); }

/* =========================================================
   6. Медиацентр: виджеты видео и фото
   ========================================================= */
.bs-media-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px; align-items: stretch; }
.bs-widget-box { background: var(--bs-paper); border: 1px solid var(--bs-line); border-radius: var(--bs-radius); padding: 24px; }
.bs-widget-box > .widget-title, .bs-widget-box h2.widgettitle {
        font-size: 1.15em; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 2px solid var(--bs-sand-2);
}
.bs-video-embed { position: relative; aspect-ratio: 16 / 9; background: #2d2417; border-radius: 10px; overflow: hidden; }
.bs-video-embed iframe, .bs-video-embed video, .bs-video-embed object, .bs-video-embed embed {
        position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block;
}
.bs-video-caption { font-size: .86em; color: var(--bs-mute); margin: 12px 0 0; }
.bs-video-fallback a { display: block; padding: 34px 20px; text-align: center; color: #f0e5cd; }

.bs-gallery-grid { display: grid; gap: 10px; }
.bs-gallery-grid--2 { grid-template-columns: repeat(2, 1fr); }
.bs-gallery-grid--3 { grid-template-columns: repeat(3, 1fr); }
.bs-gallery-grid--4 { grid-template-columns: repeat(4, 1fr); }
.bs-gallery-grid a { display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: var(--bs-sand-2); }
.bs-gallery-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.bs-gallery-grid a:hover img { transform: scale(1.07); }

/* Классическая WordPress-галерея и выравнивание Gutenberg */
.wp-caption { max-width: 100%; }
.wp-caption-text, figcaption { font-size: .85em; color: var(--bs-mute); text-align: center; margin-top: .5em; }
.alignleft { float: left; margin: .35em 1.6em 1em 0; }
.alignright { float: right; margin: .35em 0 1em 1.6em; }
.aligncenter { display: block; margin: .5em auto 1.2em; }
.alignwide { max-width: min(1100px, 92vw); margin-left: auto; margin-right: auto; }
.alignfull { max-width: none; width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.wp-block-gallery ul { list-style: none; padding: 0; }
.gallery { display: grid; gap: 10px; }
.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-columns-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }
.gallery-item img { border-radius: 10px; display: block; width: 100%; }
.bs-sticky-badge {
        display: inline-block; background: var(--bs-tan); color: #fff; border-radius: 999px;
        font-size: .72em; font-weight: 800; padding: .2em .9em; text-transform: uppercase; letter-spacing: .06em;
}

/* =========================================================
   7. CTA-полоса
   ========================================================= */
.bs-cta { background: linear-gradient(115deg, var(--bs-brown), var(--bs-accent) 65%, var(--bs-tan)); color: #fdf6e9; }
.bs-cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 44px 0; flex-wrap: wrap; }
.bs-cta h2 { color: #fffdf6; margin: 0 0 8px; font-size: 1.6em; }
.bs-cta p { margin: 0; color: #f4ead4; }

/* =========================================================
   8. Подвал
   ========================================================= */
.bs-footer { background: var(--bs-dark); color: #cfc2a6; font-size: .93em; }
.bs-footer a { color: #e6d9bd; text-decoration: none; }
.bs-footer a:hover { color: #fff; }
.bs-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; padding: 52px 0 38px; }
.bs-footer__title { color: #f0e5cd; font-family: var(--bs-font-head); font-size: 1.05em; margin: 0 0 16px; }
.bs-footer .bs-brand__name { color: #f0e5cd; }
.bs-footer p { color: #cfc2a6; }
.bs-footer ul { list-style: none; margin: 0; padding: 0; }
.bs-footer li { padding: 5px 0; }
.bs-footer__contacts li { display: flex; gap: 10px; align-items: baseline; }
.bs-footer__contacts svg { width: 14px; height: 14px; fill: var(--bs-tan); flex: 0 0 auto; transform: translateY(1px); }
.bs-footer__bottom {
        border-top: 1px solid rgba(230, 217, 189, .16); padding: 18px 0;
        display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: .88em; color: #a99b7f;
}
.bs-footer__bottom ul { list-style: none; display: flex; gap: 16px; margin: 0; padding: 0; flex-wrap: wrap; }

/* Кнопка наверх */
.bs-to-top {
        position: fixed; right: 22px; bottom: 22px; z-index: 60; width: 46px; height: 46px; border-radius: 50%;
        background: var(--bs-accent); color: #fff; border: 0; cursor: pointer; box-shadow: var(--bs-shadow);
        display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transform: translateY(10px);
        transition: all .22s ease;
}
.bs-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.bs-to-top:hover { background: var(--bs-accent-d); }
.bs-to-top svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.6; }

/* =========================================================
   9. Внутренние страницы: запись, страница, архив
   ========================================================= */
.bs-hero-inner { background: linear-gradient(115deg, var(--bs-sand-2), var(--bs-sand)); border-bottom: 1px solid var(--bs-line); padding: 40px 0; }
.bs-hero-inner h1 { margin: 0 0 6px; }
.bs-hero-inner .bs-hero-sub { margin: 0; color: var(--bs-mute); max-width: 720px; }
.bs-breadcrumbs { font-size: .84em; color: var(--bs-mute); margin-bottom: 12px; }
.bs-breadcrumbs a { color: var(--bs-mute); text-decoration: none; }
.bs-breadcrumbs a:hover { color: var(--bs-accent); }
.bs-breadcrumbs .sep { margin: 0 7px; color: var(--bs-tan); }

.bs-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 34px; padding: 44px 0 60px; align-items: start; }
.bs-layout--narrow { grid-template-columns: minmax(0, 1fr); }
.bs-content { min-width: 0; }

.bs-entry-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: .85em; color: var(--bs-mute); margin-bottom: 18px; }
.bs-entry-meta span { display: inline-flex; align-items: center; gap: 6px; }
.bs-entry-meta svg { width: 14px; height: 14px; fill: none; stroke: var(--bs-tan); stroke-width: 2; }
.bs-entry-meta a { color: var(--bs-mute); }
.bs-entry-meta a:hover { color: var(--bs-accent); }

.bs-entry-thumb { border-radius: var(--bs-radius); overflow: hidden; margin-bottom: 26px; border: 1px solid var(--bs-line); }
.bs-entry-thumb img { width: 100%; display: block; }

.bs-entry-content { font-size: 1.02em; }
.bs-entry-content > * + * { margin-top: 0; }
.bs-entry-content h2, .bs-entry-content h3 { margin-top: 1.5em; }
.bs-entry-content a { text-decoration: underline; text-decoration-color: var(--bs-tan); text-underline-offset: 3px; }
.bs-entry-content img { border-radius: 10px; }
.bs-entry-content ul li, .bs-entry-content ol li { margin-bottom: .45em; }

.bs-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 26px 0 0; }
.bs-tags a {
        background: var(--bs-sand); border: 1px solid var(--bs-line); color: var(--bs-brown);
        border-radius: 999px; padding: .25em 1em; font-size: .82em; text-decoration: none;
}
.bs-tags a:hover { background: var(--bs-tan); border-color: var(--bs-tan); color: #fff; }

.bs-authorbox {
        display: flex; gap: 18px; background: var(--bs-sand); border: 1px solid var(--bs-line);
        border-radius: var(--bs-radius); padding: 20px 24px; margin-top: 34px; align-items: flex-start;
}
.bs-authorbox img, .bs-authorbox .bs-authorbox__ph { border-radius: 50%; flex: 0 0 auto; }
.bs-authorbox__ph { width: 64px; height: 64px; background: var(--bs-tan); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--bs-font-head); font-size: 1.5em; font-weight: 800; }
.bs-authorbox h3 { margin: 0 0 6px; font-size: 1.05em; }
.bs-authorbox p { margin: 0; font-size: .92em; color: var(--bs-mute); }

.bs-postnav { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 34px; }
.bs-postnav a {
        display: block; background: var(--bs-paper); border: 1px solid var(--bs-line); border-radius: var(--bs-radius);
        padding: 16px 20px; text-decoration: none; color: var(--bs-brown); font-weight: 700; font-size: .95em;
}
.bs-postnav a:hover { border-color: var(--bs-tan); box-shadow: var(--bs-shadow); }
.bs-postnav .label { display: block; font-size: .78em; color: var(--bs-mute); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.bs-postnav__next { text-align: right; }

/* Пагинация */
.bs-pagination { margin: 40px 0 10px; }
.nav-links { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.page-numbers {
        display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 14px;
        background: var(--bs-paper); border: 1px solid var(--bs-line); border-radius: 10px; color: var(--bs-brown);
        font-weight: 700; text-decoration: none;
}
.page-numbers:hover { border-color: var(--bs-tan); color: var(--bs-accent); }
.page-numbers.current { background: var(--bs-accent); border-color: var(--bs-accent); color: #fff; }
.page-numbers.dots { border: 0; background: none; }

/* Боковая колонка и виджеты */
.bs-sidebar { min-width: 0; }
.bs-sidebar .widget { background: var(--bs-paper); border: 1px solid var(--bs-line); border-radius: var(--bs-radius); padding: 22px; margin-bottom: 24px; }
.bs-sidebar .widget-title, .bs-sidebar h2.widgettitle {
        font-size: 1.02em; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 2px solid var(--bs-sand-2);
}
.bs-sidebar ul { list-style: none; margin: 0; padding: 0; }
.bs-sidebar li { padding: 7px 0; border-bottom: 1px dashed var(--bs-line); font-size: .94em; }
.bs-sidebar li:last-child { border-bottom: 0; }
.bs-sidebar a { color: var(--bs-coffee); text-decoration: none; }
.bs-sidebar a:hover { color: var(--bs-accent); }
.bs-sidebar .wp-block-search input[type="search"], .bs-sidebar input[type="search"] {
        width: 100%; padding: .6em 1em; border: 1px solid var(--bs-line); border-radius: 999px; background: var(--bs-bg); font: inherit; font-size: .92em;
}
.bs-sidebar .wp-block-search__button, .bs-sidebar button[type="submit"] {
        margin-top: 10px; width: 100%; padding: .6em 1em; border: 0; border-radius: 999px; background: var(--bs-accent);
        color: #fff; font: inherit; font-weight: 700; cursor: pointer;
}
.bs-sidebar .wp-block-tag-cloud, .bs-sidebar .tagcloud { display: flex; flex-wrap: wrap; gap: 8px; }
.bs-sidebar .wp-block-tag-cloud a, .bs-sidebar .tagcloud a {
        background: var(--bs-sand); border-radius: 999px; padding: .22em .9em; font-size: .82em !important; text-decoration: none;
        color: var(--bs-brown); border: 1px solid var(--bs-line);
}
.bs-sidebar .wp-block-tag-cloud a:hover, .bs-sidebar .tagcloud a:hover { background: var(--bs-tan); color: #fff; }

/* Комментарии и формы */
.comments-area { margin-top: 40px; }
.comments-title, .comment-reply-title { font-size: 1.3em; }
.comment-list { list-style: none; margin: 0 0 30px; padding: 0; }
.comment-list .children { list-style: none; margin: 0 0 0 46px; padding: 0; }
.comment-body { background: var(--bs-paper); border: 1px solid var(--bs-line); border-radius: var(--bs-radius); padding: 18px 22px; margin-bottom: 16px; }
.comment-meta { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; font-size: .85em; color: var(--bs-mute); flex-wrap: wrap; }
.comment-author img { border-radius: 50%; }
.comment-author .fn { font-style: normal; font-weight: 700; color: var(--bs-brown); }
.comment-metadata a { color: var(--bs-mute); }
.reply { font-size: .85em; }
.reply a { font-weight: 700; }

.comment-form label { display: block; font-weight: 700; font-size: .9em; margin-bottom: 6px; color: var(--bs-brown); }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"],
.comment-form textarea, .wpcf7 input, .wpcf7 textarea {
        width: 100%; padding: .7em 1em; border: 1px solid var(--bs-line); border-radius: 10px;
        background: var(--bs-paper); font: inherit; font-size: .95em; color: var(--bs-coffee);
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--bs-tan); outline: none; }
.comment-form-author, .comment-form-email { display: inline-block; width: calc(50% - 8px); }
.comment-form-email { margin-left: 16px; }
.comment-form-cookies-consent { display: flex; align-items: baseline; gap: 8px; }
.comment-form-cookies-consent label { font-weight: 400; margin: 0; }
.comment-form .submit, input[type="submit"].bs-btn { background: var(--bs-accent); border: 2px solid var(--bs-accent); color: #fff; border-radius: 999px; padding: .72em 1.8em; font: inherit; font-weight: 700; cursor: pointer; }
.comment-form .submit:hover { background: var(--bs-accent-d); }

/* 404 и поиск */
.bs-404 { text-align: center; padding: 80px 0 90px; }
.bs-404__code { font-family: var(--bs-font-head); font-size: clamp(5em, 14vw, 9em); font-weight: 800; color: var(--bs-sand-2); line-height: 1; text-shadow: 0 2px 0 var(--bs-tan); }
.bs-search-form-wide { display: flex; gap: 10px; max-width: 520px; margin: 26px auto 0; }
.bs-search-form-wide input[type="search"] { flex: 1; padding: .72em 1.2em; border: 1px solid var(--bs-line); border-radius: 999px; background: var(--bs-paper); font: inherit; }

/* Sticky header при скролле */
.bs-header.is-stuck { box-shadow: 0 8px 24px rgba(64,49,25,.12); }

/* =========================================================
   10. Адаптивность
   ========================================================= */
@media (max-width: 1080px) {
        .bs-features { grid-template-columns: repeat(2, 1fr); }
        .bs-news-grid { grid-template-columns: repeat(2, 1fr); }
        .bs-layout { grid-template-columns: minmax(0, 1fr); }
        .bs-sidebar { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
        .bs-media-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
        .bs-topbar__menu { display: none; }
        .bs-row { grid-template-columns: 1fr; }
        .bs-row__thumb { min-height: 200px; height: 220px; }
        .bs-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
        .bs-nav__toggle { display: flex; }
        .bs-nav__list { display: none; padding-bottom: 10px; }
        .bs-nav__list.is-open { display: block; }
        .bs-nav__list > li { border-top: 1px solid var(--bs-line); }
        .bs-nav__list > li > a { padding: 13px 6px; }
        .bs-nav__list > li > a::after { display: none; }
        .bs-nav__list ul {
                position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0;
                background: transparent; padding: 0 0 6px 18px; display: none; min-width: 0;
        }
        .bs-nav__list li.is-open > ul, .bs-nav__list li:focus-within > ul { display: block; }
        .bs-nav__list ul a { padding: 9px 10px; color: var(--bs-mute); }
        .bs-nav__list .menu-item-has-children > a .bs-caret { display: none; }
        .bs-sub-toggle {
                display: inline-flex; position: absolute; right: 4px; top: 4px; width: 40px; height: 40px;
                align-items: center; justify-content: center; background: var(--bs-paper); border: 1px solid var(--bs-line);
                border-radius: 10px; cursor: pointer; color: var(--bs-brown); font-size: .8em; font-weight: 800;
        }
        .bs-sub-toggle.is-open { transform: rotate(180deg); }
        .bs-slider__caption { padding: 62px 22px 78px; }
        .bs-slider__arrow { display: none; }
        .bs-news-grid { grid-template-columns: 1fr; }
        .bs-features { grid-template-columns: 1fr; }
        .bs-footer__grid { grid-template-columns: 1fr; gap: 26px; }
        .bs-sidebar { grid-template-columns: 1fr; }
        .bs-postnav { grid-template-columns: 1fr; }
        .bs-cta__inner { text-align: center; justify-content: center; }
        .comment-form-author, .comment-form-email { width: 100%; margin-left: 0; }
        .bs-entry-meta { gap: 10px; }
}

/* Сниженная анимация */
@media (prefers-reduced-motion: reduce) {
        *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
}

/* =========================================================
   11. Контент страниц: карточки педагогов и утилиты
   ========================================================= */
.bs-teacher-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 1.6em 0; }
.bs-teacher {
        background: var(--bs-paper); border: 1px solid var(--bs-line); border-radius: var(--bs-radius);
        padding: 20px; text-align: center; transition: transform .2s ease, box-shadow .2s ease;
}
.bs-teacher:hover { transform: translateY(-4px); box-shadow: var(--bs-shadow); }
.bs-teacher img {
        width: 150px; height: 150px; object-fit: cover; border-radius: 50%;
        margin: 0 auto 14px; display: block; border: 4px solid var(--bs-sand-2);
}
.bs-teacher h3 { font-size: 1.05em; margin-bottom: 4px; }
.bs-teacher__role { color: var(--bs-accent); font-weight: 700; font-size: .85em; margin-bottom: 10px; }
.bs-teacher p:last-child { font-size: .9em; color: var(--bs-mute); margin: 0; }
@media (max-width: 900px) { .bs-teacher-grid { grid-template-columns: 1fr; max-width: 420px; margin-left: auto; margin-right: auto; } }
