/*
 * BBars Redesign 2026 — modern UI layer
 * Loads AFTER style.css. Additive: refines typography, spacing, components.
 * Brand palette kept: red #d72323 / dark #2a2626 / light #f1f1f1.
 */

:root {
  --bb-red: #d72323;
  --bb-red-dark: #ae2424;
  --bb-ink: #1c1a1a;
  --bb-ink-soft: #3e3636;
  --bb-muted: #6b6666;
  --bb-line: #e7e7e7;
  --bb-bg-soft: #f5f6f7;
  --bb-radius: 14px;
  --bb-shadow: 0 10px 30px rgba(20, 16, 16, .08);
  --bb-shadow-lg: 0 18px 50px rgba(20, 16, 16, .14);
  --bb-font-head: 'Montserrat', 'Fira Sans Condensed', sans-serif;
  --bb-font-body: 'Inter', 'Open Sans', sans-serif;
}

/* ---------- Typography ---------- */
body {
  font-family: var(--bb-font-body);
  color: var(--bb-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6,
.header, .footer,
.main_title, .index__title, .page__title,
.page__form_title, .sec_name {
  font-family: var(--bb-font-head);
}

/* ---------- Header (single row) ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  padding: 0;
  border-bottom: 1px solid var(--bb-line);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .05);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  min-height: 72px;
}
.logo {
  flex: 0 0 auto;
  float: none;
  width: auto;
  margin: 0;
  display: inline-flex;
  align-items: center;
  transition: transform .3s ease;
}
.logo img { width: 54px; height: 54px; display: block; }
.logo:hover { transform: rotate(-6deg) scale(1.04); }

.nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: .1rem;
}
.nav__item { position: relative; list-style: none; }
.nav__item > a {
  display: block;
  padding: .55rem .8rem;
  font-family: var(--bb-font-head);
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--bb-ink);
  text-decoration: none;
  white-space: nowrap;
  border-radius: 8px;
  transition: color .2s ease, background .2s ease;
}
.nav__item > a:hover { color: var(--bb-red); background: rgba(215, 35, 35, .06); }
.nav__item > a.active { color: var(--bb-red); }

.header__actions {
  flex: 0 0 auto;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: .8rem;
}
.header__phone {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--bb-font-head);
  font-weight: 700;
  font-size: 1rem;
  color: var(--bb-ink);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s ease;
}
.header__phone:hover { color: var(--bb-red); }
.header__phone-ico { display: inline-flex; }
.header__phone-ico svg { width: 20px; height: 20px; fill: var(--bb-red); }
.header__vk {
  width: 38px; height: 38px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0077ff;
  transition: background .2s ease, transform .15s ease;
}
.header__vk svg { width: 20px; height: 20px; fill: #fff; }
.header__vk:hover { background: #005fcc; transform: translateY(-1px); }

/* Burger */
.burger {
  display: none;
  width: 44px; height: 44px;
  padding: 11px 10px;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  z-index: 101;
}
.burger span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--bb-ink);
  border-radius: 2px;
  transition: transform .3s ease, opacity .2s ease;
}
.burger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile slide-in menu */
.mnav {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(82vw, 340px);
  background: #fff;
  z-index: 90;
  box-shadow: -12px 0 40px rgba(0, 0, 0, .18);
  transform: translateX(100%);
  transition: transform .32s cubic-bezier(.5, .2, .2, 1);
  padding: 5.5rem 1.6rem 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.mnav.open { transform: translateX(0); }
.mnav__item > a {
  display: block;
  padding: .95rem .3rem;
  font-family: var(--bb-font-head);
  font-weight: 600;
  font-size: 1.05rem;
  text-transform: uppercase;
  color: var(--bb-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--bb-line);
}
.mnav__item > a:hover, .mnav__item > a.active { color: var(--bb-red); }
.mnav__contacts { margin-top: auto; padding-top: 1.5rem; }
.mnav__contacts a { display: block; padding: .35rem 0; color: var(--bb-red); font-weight: 700; text-decoration: none; }
.mnav__backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 12, 12, .5);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.mnav__backdrop.show { opacity: 1; visibility: visible; }
body.no-scroll { overflow: hidden; }

/* Header responsive: collapse the inline nav into the burger */
@media (max-width: 1080px) {
  .nav { display: none; }
  .burger { display: flex; }
}
@media (max-width: 560px) {
  .header__phone-num { display: none; }
  .header__vk { display: none; }
  .logo img { width: 46px; height: 46px; }
  .header__inner { min-height: 60px; gap: .7rem; }
}

/* ---------- Home hero title ---------- */
.main_title {
  text-shadow: 0 6px 24px rgba(215, 35, 35, .25);
}
.index__title { font-weight: 800; text-transform: uppercase; }

/* ---------- Buttons & form ---------- */
.page__form_title { font-weight: 800; text-transform: uppercase; letter-spacing: .05rem; }
input[type="text"], input[type="email"], input[type="tel"],
input[type="url"], textarea, .wpcf7 input, .wpcf7 textarea {
  font-family: var(--bb-font-body);
  border: 1px solid var(--bb-line) !important;
  border-radius: 10px !important;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.wpcf7 input:focus, .wpcf7 textarea:focus,
input:focus, textarea:focus {
  border-color: var(--bb-red) !important;
  box-shadow: 0 0 0 3px rgba(215, 35, 35, .12) !important;
  outline: none;
}
.wpcf7 input[type="submit"],
button, .btn, input[type="submit"] {
  font-family: var(--bb-font-head);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05rem;
  background: var(--bb-red) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 999px !important;
  padding: .8rem 2.2rem !important;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  box-shadow: 0 8px 20px rgba(215, 35, 35, .28);
}
.wpcf7 input[type="submit"]:hover,
button:hover, .btn:hover, input[type="submit"]:hover {
  background: var(--bb-red-dark) !important;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(215, 35, 35, .34);
}

/* ---------- Footer ---------- */
.footer { background: #221f1f; color: #cbc6c6; }
.footer__address { line-height: 1.5; }
.footer__contacts { font-weight: 600; }
.footer a:hover { color: #fff; }

/* ============================================================
 * WOW intro animation (front page)
 * ============================================================ */
.bbars-intro { display: none; }
.bbars-intro-play { overflow: hidden; }
.bbars-intro-play body { overflow: hidden; }
.bbars-intro-play .bbars-intro {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 99999;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(215, 35, 35, .10), rgba(215, 35, 35, 0) 42%),
    radial-gradient(circle at 50% 45%, #ffffff 0%, #f4f5f6 58%, #e9ebee 100%);
}
.bbars-intro.is-hidden {
  opacity: 0;
  transition: opacity .5s ease;
  pointer-events: none;
}
.bbars-intro__stage {
  width: min(44vmin, 330px);
  height: min(44vmin, 330px);
  transform:
    perspective(900px)
    rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg))
    translate3d(var(--tx, 0px), var(--ty, 0px), 0);
  transition: transform .18s ease-out;
  will-change: transform;
}
.bbars-intro__logo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 14px 34px rgba(215, 35, 35, .28));
  animation: bbars-spin 9s linear infinite;
  user-select: none;
}
@keyframes bbars-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.bbars-intro__skip {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--bb-font-body);
  font-size: .85rem;
  letter-spacing: .05rem;
  color: var(--bb-muted);
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--bb-line);
  border-radius: 999px;
  padding: .5rem 1.4rem;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}
.bbars-intro__skip:hover { color: var(--bb-red); border-color: var(--bb-red); }
@media (prefers-reduced-motion: reduce) {
  .bbars-intro-play .bbars-intro { display: none; }
}

/* ============================================================
 * Contacts page
 * ============================================================ */
.contacts { padding: 1rem 0 4rem; }
.contacts__grid {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 2rem;
  align-items: stretch;
}
.contacts__card {
  background: #fff;
  border: 1px solid var(--bb-line);
  border-radius: var(--bb-radius);
  box-shadow: var(--bb-shadow);
  padding: 2rem;
}
.contacts__heading {
  font-size: 1.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04rem;
  margin: 0 0 1.4rem;
}
.contacts__row {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--bb-line);
  font-size: 1.05rem;
  color: var(--bb-ink);
}
.contacts__row:last-of-type { border-bottom: none; }
.contacts__row svg { flex: 0 0 22px; width: 22px; height: 22px; fill: var(--bb-red); }
a.contacts__row { text-decoration: none; transition: color .2s ease; }
a.contacts__row:hover { color: var(--bb-red); }
.contacts__phone { font-weight: 700; font-size: 1.25rem; font-family: var(--bb-font-head); }

.contacts__social { display: flex; gap: .7rem; margin-top: 1.2rem; }
.contacts__social a {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--bb-red);
  background-size: 55%;
  background-position: center;
  background-repeat: no-repeat;
  display: inline-block;
  transition: transform .15s ease, background-color .2s ease;
}
.contacts__social a:hover { transform: translateY(-2px); background-color: var(--bb-red-dark); }
.contacts__social .vk { background-image: url(img/vk.png); background-color: #0077ff; }
.contacts__social .vk:hover { background-color: #005fcc; }

/* Schedule */
.schedule {
  margin-top: 1.6rem;
  background: var(--bb-bg-soft);
  border-radius: var(--bb-radius);
  padding: 1.4rem 1.5rem;
}
.schedule__title {
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04rem;
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.schedule__title::before {
  content: '';
  width: 10px; height: 22px;
  background: var(--bb-red);
  border-radius: 3px;
}
.schedule__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: .55rem 0;
  border-bottom: 1px dashed #d9dadb;
}
.schedule__row:last-child { border-bottom: none; }
.schedule__row span { color: var(--bb-muted); }
.schedule__row b { font-family: var(--bb-font-head); font-size: 1.1rem; color: var(--bb-ink); white-space: nowrap; }

/* Map */
.contacts__map {
  border-radius: var(--bb-radius);
  overflow: hidden;
  box-shadow: var(--bb-shadow);
  border: 1px solid var(--bb-line);
  min-height: 420px;
}
.contacts__map iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
}

@media (max-width: 860px) {
  .contacts__grid { grid-template-columns: 1fr; }
  .contacts__map { min-height: 320px; }
  .contacts__map iframe { min-height: 320px; }
}

/* ---------- Small screens polish ---------- */
@media (max-width: 767px) {
  .main_title { font-size: 2.6rem; letter-spacing: .4rem; }
  .index__text { padding: 0 1.2rem 2.5rem; }
  .bbars-intro__stage { width: min(60vmin, 260px); height: min(60vmin, 260px); }
}

/* ============================================================
 * HOME PAGE (front page redesign)
 * ============================================================ */

/* Shared section headings */
.section__eyebrow {
  display: inline-block;
  font-family: var(--bb-font-head);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--bb-red);
  margin-bottom: .8rem;
}
.section__eyebrow::before {
  content: '';
  display: inline-block;
  width: 26px; height: 2px;
  background: var(--bb-red);
  vertical-align: middle;
  margin-right: .6rem;
}
.section__eyebrow--center { display: block; text-align: center; }
.section__eyebrow--center::before { display: none; }
.section__title {
  font-family: var(--bb-font-head);
  font-weight: 800;
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
  line-height: 1.1;
  text-transform: none;
  margin: 0 0 1.4rem;
  color: var(--bb-ink);
}
.section__title--center { text-align: center; margin-bottom: 2.6rem; }

/* Buttons (variants on top of base .btn) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  text-decoration: none;
  font-family: var(--bb-font-head);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-radius: 999px;
  padding: .95rem 2.2rem;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn--primary {
  background: var(--bb-red);
  color: #fff;
  box-shadow: 0 10px 26px rgba(215, 35, 35, .35);
}
.btn--primary:hover { background: var(--bb-red-dark); color: #fff; transform: translateY(-2px); }
.btn--ghost {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, .55);
}
.btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .12); color: #fff; transform: translateY(-2px); }

/* ---- HERO ---- */
.hero {
  position: relative;
  min-height: min(88vh, 780px);
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  filter: grayscale(100%) contrast(1.05);
  transform: scale(1.08);
  animation: bb-kenburns 18s ease-out forwards;
}
@keyframes bb-kenburns { to { transform: scale(1); } }
.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 12, 12, .92) 0%, rgba(15, 12, 12, .6) 45%, rgba(15, 12, 12, .25) 100%),
    linear-gradient(0deg, rgba(215, 35, 35, .18), rgba(15, 12, 12, 0) 55%);
}
.hero__inner { position: relative; z-index: 2; padding: 4rem .8333rem; }
.hero__eyebrow {
  display: inline-block;
  font-family: var(--bb-font-head);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #ff5a5a;
}
.hero__title {
  font-family: var(--bb-font-head);
  font-weight: 900;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: .98;
  margin: 1rem 0 .4rem;
  letter-spacing: -.01em;
  text-shadow: 0 12px 40px rgba(0, 0, 0, .45);
}
.hero__title::after {
  content: '';
  display: block;
  width: 96px; height: 5px;
  background: var(--bb-red);
  border-radius: 4px;
  margin-top: 1.3rem;
}
.hero__subtitle {
  max-width: 560px;
  font-size: 1.2rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, .86);
  margin: 1.4rem 0 2rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero__schedule { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.4rem; }
.hero__chip {
  display: flex;
  flex-direction: column;
  padding: .7rem 1.3rem;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 12px;
  background: rgba(255, 255, 255, .06);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.hero__chip b { font-family: var(--bb-font-head); font-size: 1.05rem; }
.hero__chip span { font-size: .9rem; color: rgba(255, 255, 255, .7); }
.hero__scroll {
  position: absolute;
  left: 50%; bottom: 26px;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid rgba(255, 255, 255, .5);
  border-radius: 14px;
  z-index: 2;
}
.hero__scroll span {
  position: absolute;
  left: 50%; top: 8px;
  width: 4px; height: 8px;
  margin-left: -2px;
  background: #fff;
  border-radius: 2px;
  animation: bb-scroll 1.6s infinite;
}
@keyframes bb-scroll { 0% { opacity: 0; top: 8px; } 40% { opacity: 1; } 80% { opacity: 0; top: 22px; } 100% { opacity: 0; } }

/* ---- ABOUT ---- */
.about { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.6rem, 4vw, 3.4rem);
  align-items: center;
}
.about__media img {
  width: 100%;
  height: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: var(--bb-shadow-lg);
}
.about__body { font-size: 1.08rem; line-height: 1.7; color: #4a4545; }
.about__body p { margin: 0 0 1rem; }

/* Detailed "О нас" block on the home page — editorial layout */
.about-full { padding: 0 0 clamp(3.5rem, 7vw, 6rem); }
.about-full__rich {
  max-width: 940px;
  margin: 0 auto;
  font-family: var(--bb-font-body);
  font-size: 1.075rem;
  line-height: 1.8;
  color: #3a3535;
}
.about-full__rich::after { content: ''; display: block; clear: both; }
.about-full__rich p { margin: 0 0 1.15rem; text-align: left; }
.about-full__rich strong { color: var(--bb-ink); font-weight: 700; }
.about-full__rich h1, .about-full__rich h2, .about-full__rich h3 {
  font-family: var(--bb-font-head);
  font-weight: 800;
  color: var(--bb-ink);
  text-align: left;
  line-height: 1.2;
  margin: 2.2rem 0 1rem;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
}
/* neutralise the block editor's forced centering inside this section */
.about-full__rich .has-text-align-center { text-align: left !important; }
.about-full__rich .wp-block-columns { display: block; }
.about-full__rich .wp-block-column { flex-basis: auto !important; }
/* images float to the right so the text wraps around them; captioned photos
   become tidy "photo cards" with a styled caption */
.about-full__rich .wp-block-image {
  float: right;
  clear: right;
  width: 340px;
  max-width: 42%;
  margin: .3rem 0 1.4rem 2.2rem;
  background: #fff;
  padding: 10px;
  border: 1px solid var(--bb-line);
  border-radius: 16px;
  box-shadow: var(--bb-shadow);
}
/* neutralise the block editor's table/caption layout so the caption is full width */
.about-full__rich .wp-block-image figure,
.about-full__rich .wp-block-image figure.aligncenter,
.about-full__rich .wp-block-image a,
.about-full__rich .wp-block-image img,
.about-full__rich .wp-block-image figcaption {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  float: none !important;
  box-sizing: border-box;
}
.about-full__rich .wp-block-image a { cursor: zoom-in; overflow: hidden; border-radius: 10px; }
.about-full__rich .wp-block-image img {
  height: auto !important;
  border-radius: 10px;
  transition: transform .35s ease;
}
.about-full__rich .wp-block-image a:hover img { transform: scale(1.05); }
.about-full__rich .wp-block-image figcaption {
  font-size: .85rem !important;
  line-height: 1.4 !important;
  color: var(--bb-muted);
  margin-top: .8rem !important;
  padding-left: .7rem;
  border-left: 3px solid var(--bb-red);
  text-align: left;
}
/* headings break to full width so they never get squeezed beside a float */
.about-full__rich h1, .about-full__rich h2 { clear: right; }
@media (max-width: 640px) {
  .about-full__rich .wp-block-image { float: none; width: 100%; max-width: 100%; margin: 1.4rem 0; }
}

/* Sign-up form (CF7) inside the card — stack fields full width, fix button */
.signup__form .page__form__block {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  width: 100%;
}
.signup__form .wpcf7-form-control-wrap { display: block; width: 100%; }
.signup__form .form__input {
  width: 100%;
  box-sizing: border-box;
  height: auto;
}
.signup__form .form__btn {
  width: 100%;
  box-sizing: border-box;
  letter-spacing: .03em;
  white-space: nowrap;
  font-family: var(--bb-font-head) !important;
}

/* ---- VALUES ---- */
.values { padding: clamp(3.5rem, 7vw, 6rem) 0; background: var(--bb-bg-soft); }
.values__head { margin-bottom: 2.6rem; }
.values__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
}
.value {
  background: #fff;
  border: 1px solid var(--bb-line);
  border-radius: 16px;
  padding: 2rem 1.6rem;
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.value:hover { transform: translateY(-6px); box-shadow: var(--bb-shadow-lg); border-color: transparent; }
.value__icon {
  width: 64px; height: 64px;
  margin: 0 auto 1.2rem;
  border-radius: 16px;
  background: rgba(215, 35, 35, .1);
  display: flex; align-items: center; justify-content: center;
}
.value__icon svg { width: 32px; height: 32px; fill: var(--bb-red); }
.value__title { font-family: var(--bb-font-head); font-weight: 800; font-size: 1.15rem; margin: 0 0 .6rem; }
.value__text { color: var(--bb-muted); font-size: .98rem; line-height: 1.55; margin: 0; }

/* ---- DIRECTIONS ---- */
.directions { padding: clamp(3.5rem, 7vw, 6rem) 0; background: #201d1d; color: #fff; }
.directions .section__title { color: #fff; }
.directions__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}
.dir-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding: 1.8rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 16px;
  text-decoration: none;
  color: #fff;
  min-height: 160px;
  overflow: hidden;
  transition: background .25s ease, transform .2s ease, border-color .25s ease;
}
.dir-card, .dir-card:hover { color: #fff; }
.dir-card:hover { background: var(--bb-red); border-color: var(--bb-red); transform: translateY(-6px); }
.dir-card__num { font-family: var(--bb-font-head); font-weight: 800; font-size: 1rem; color: var(--bb-red); transition: color .25s ease; }
.dir-card:hover .dir-card__num,
.dir-card:hover .dir-card__title,
.dir-card:hover .dir-card__arrow { color: #fff; }
.dir-card__title { font-family: var(--bb-font-head); font-weight: 700; font-size: 1.4rem; color: #fff; }
.dir-card__arrow { font-size: 1.4rem; margin-top: auto; transition: transform .2s ease; }
.dir-card:hover .dir-card__arrow { transform: translateX(6px); }

/* ---- SIGN UP ---- */
.signup { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.signup__grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(1.6rem, 4vw, 3.6rem);
  align-items: center;
}
.signup__lead { font-size: 1.1rem; line-height: 1.6; color: #4a4545; margin: 0 0 1.6rem; }
.signup__list { list-style: none; margin: 0; padding: 0; }
.signup__list li { padding: .55rem 0; border-bottom: 1px solid var(--bb-line); font-size: 1.05rem; color: var(--bb-ink); }
.signup__list li:last-child { border-bottom: none; }
.signup__list a { color: var(--bb-red); font-weight: 700; font-family: var(--bb-font-head); text-decoration: none; }
.signup__form {
  background: #fff;
  border: 1px solid var(--bb-line);
  border-radius: 18px;
  box-shadow: var(--bb-shadow-lg);
  padding: 2.2rem;
}

/* ---- HOME responsive ---- */
@media (max-width: 1000px) {
  .values__grid { grid-template-columns: repeat(2, 1fr); }
  .directions__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 800px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__media { order: -1; }
  .signup__grid { grid-template-columns: 1fr; }
  .hero { min-height: 90vh; }
}
@media (max-width: 560px) {
  .values__grid { grid-template-columns: 1fr; }
  .directions__grid { grid-template-columns: 1fr; }
  .hero__actions .btn { flex: 1 1 100%; }
}

/* ============================================================
 * MENTORS (Наставники)
 * ============================================================ */
.mentors__intro { max-width: 820px; margin: 0 auto 2.6rem; text-align: center; font-size: 1.12rem; line-height: 1.7; color: #4a4545; }
.mentors__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.6rem;
}
.mentor-card {
  background: #fff;
  border: 1px solid var(--bb-line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--bb-shadow);
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.mentor-card:hover { transform: translateY(-6px); box-shadow: var(--bb-shadow-lg); }
.mentor-card__photo {
  aspect-ratio: 3 / 4;
  background: #ece9e9;
  overflow: hidden;
}
.mentor-card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mentor-card__body { padding: 1.3rem 1.4rem 1.6rem; }
.mentor-card__pos {
  display: inline-block;
  font-family: var(--bb-font-head);
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--bb-red);
  padding: .25rem .7rem;
  border-radius: 999px;
  margin-bottom: .7rem;
}
.mentor-card__name { font-family: var(--bb-font-head); font-weight: 800; font-size: 1.25rem; margin: 0 0 .7rem; color: var(--bb-ink); }
.mentor-card__bio { color: var(--bb-muted); font-size: .96rem; line-height: 1.55; }
.mentor-card__bio p { margin: 0 0 .35rem; }
.mentor-card__regalia { list-style: none; margin: .2rem 0 0; padding: 0; }
.mentor-card__regalia li { position: relative; padding-left: 18px; margin-bottom: .35rem; color: var(--bb-muted); font-size: .95rem; line-height: 1.4; }
.mentor-card__regalia li::before { content: ''; position: absolute; left: 0; top: .5em; width: 7px; height: 7px; border-radius: 50%; background: var(--bb-red); }
.mentor-card__extra { margin-top: .8rem; padding-top: .8rem; border-top: 1px solid var(--bb-line); color: var(--bb-ink-soft); font-size: .92rem; line-height: 1.55; }
.mentor-card__socials { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.msoc { width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: #f0efef; transition: background .2s ease, transform .15s ease; }
.msoc svg { width: 19px; height: 19px; fill: #6b6666; transition: fill .2s ease; }
.msoc:hover { background: var(--msoc, var(--bb-red)); transform: translateY(-2px); }
.msoc:hover svg { fill: #fff; }

/* Single mentor profile page */
.mentor-single__role { margin-top: .5rem; font-family: var(--bb-font-head); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--bb-red); font-size: .95rem; }
.mentor-single { display: grid; grid-template-columns: 340px 1fr; gap: 2.6rem; align-items: start; max-width: 900px; }
.mentor-single__photo img { width: 100%; height: auto; border-radius: 18px; box-shadow: var(--bb-shadow-lg); display: block; }
.mentor-single__subtitle { font-family: var(--bb-font-head); font-weight: 800; font-size: 1.2rem; margin: 0 0 .8rem; color: var(--bb-ink); }
.mentor-single .mentor-card__regalia li { font-size: 1.02rem; margin-bottom: .5rem; }
.mentor-single__extra { margin-top: 1.4rem; color: #3a3535; font-size: 1.05rem; line-height: 1.7; }
.mentor-single .mentor-card__socials { margin-top: 1.5rem; }
.mentor-single__back { margin-top: 1.8rem; }
@media (max-width: 720px) {
  .mentor-single { grid-template-columns: 1fr; gap: 1.6rem; }
  .mentor-single__photo { max-width: 340px; }
}

/* ============================================================
 * ARTICLES (Статьи) — listing + single
 * ============================================================ */
.articles__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.8rem;
}
.article-card {
  background: #fff;
  border: 1px solid var(--bb-line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--bb-shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.article-card:hover { transform: translateY(-6px); box-shadow: var(--bb-shadow-lg); }
.article-card__link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.article-card__thumb { aspect-ratio: 16 / 9; background: #ece9e9; overflow: hidden; }
.article-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.article-card:hover .article-card__thumb img { transform: scale(1.05); }
.article-card__body { padding: 1.3rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.article-card__date { font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; color: var(--bb-muted); }
.article-card__title { font-family: var(--bb-font-head); font-weight: 800; font-size: 1.3rem; line-height: 1.25; margin: .5rem 0 .7rem; color: var(--bb-ink); }
.article-card__excerpt { color: var(--bb-muted); font-size: .98rem; line-height: 1.55; margin: 0 0 1rem; }
.article-card__more { margin-top: auto; font-family: var(--bb-font-head); font-weight: 700; color: var(--bb-red); text-transform: uppercase; font-size: .85rem; letter-spacing: .04em; }
.article-card__more::after { content: ' →'; }

.articles__pagination { margin-top: 2.5rem; }
.articles__pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 42px; padding: 0 .6rem;
  margin: 0 .2rem; border-radius: 10px;
  border: 1px solid var(--bb-line);
  font-family: var(--bb-font-head); font-weight: 700; text-decoration: none; color: var(--bb-ink);
}
.articles__pagination .page-numbers.current { background: var(--bb-red); color: #fff; border-color: var(--bb-red); }
.articles__pagination .page-numbers:hover { border-color: var(--bb-red); color: var(--bb-red); }
.articles__pagination .page-numbers.current:hover { color: #fff; }

/* Single article */
.article-single { max-width: 820px; margin: 0 auto; }
.article-single__crumbs { margin-bottom: .6rem; }
.article-single__crumbs a { color: var(--bb-red); text-decoration: none; font-weight: 600; font-size: .9rem; }
.article-single__meta { color: var(--bb-muted); font-size: .9rem; text-transform: uppercase; letter-spacing: .04em; margin-top: .4rem; }
.article-single__cover { border-radius: 16px; overflow: hidden; margin: 0 0 2rem; box-shadow: var(--bb-shadow-lg); }
.article-single__cover img { width: 100%; height: auto; display: block; }
.article-single__body { font-size: 1.1rem; line-height: 1.75; color: #34302f; }
.article-single__body h2 { font-family: var(--bb-font-head); font-weight: 800; font-size: 1.5rem; margin: 2rem 0 .8rem; color: var(--bb-ink); }
.article-single__body p { margin: 0 0 1.2rem; }
.article-single__body a { color: var(--bb-red); }
.article-single__back { margin-top: 2.5rem; }
.article-single__back a { color: var(--bb-red); font-weight: 700; text-decoration: none; }

/* ============================================================
 * GALLERY (Галерея) — native gallery + lightbox
 * ============================================================ */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 1rem 0; }
.gallery-item { margin: 0 !important; width: auto !important; }
.gallery br { display: none; }
.gallery-icon, .gallery-item a { display: block; }
.wp-block-gallery.has-nested-images { gap: 12px; }
.gallery-item img,
.wp-block-gallery .wp-block-image img,
.wp-block-image img {
  border: none !important;
}
.gallery-item a,
.wp-block-gallery .wp-block-image {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  box-shadow: var(--bb-shadow);
  cursor: zoom-in;
}
.gallery-item a img,
.wp-block-gallery .wp-block-image img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .3s ease;
}
.gallery-item a:hover img,
.wp-block-gallery .wp-block-image:hover img { transform: scale(1.06); }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* Lightbox */
.bb-lightbox {
  position: fixed; inset: 0; z-index: 100000;
  display: none; align-items: center; justify-content: center;
  background: rgba(16, 13, 13, .93);
  padding: 3vmin;
}
.bb-lightbox.is-open { display: flex; }
.bb-lightbox__img {
  max-width: 92vw; max-height: 88vh;
  border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5);
  animation: bb-lb-in .2s ease;
}
@keyframes bb-lb-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
.bb-lightbox__close {
  position: absolute; top: 18px; right: 22px;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,.12); color: #fff; border: none;
  font-size: 1.8rem; line-height: 1; cursor: pointer;
}
.bb-lightbox__close:hover { background: var(--bb-red); }
.bb-lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 54px; height: 54px; border-radius: 50%;
  background: rgba(255,255,255,.12); color: #fff; border: none;
  font-size: 2rem; line-height: 1; cursor: pointer;
}
.bb-lightbox__nav:hover { background: var(--bb-red); }
.bb-lightbox__prev { left: 18px; }
.bb-lightbox__next { right: 18px; }
@media (max-width: 560px) { .bb-lightbox__nav { width: 42px; height: 42px; font-size: 1.5rem; } }

/* ============================================================
 * Idle karateka easter egg
 * ============================================================ */
.krt {
  position: fixed;
  top: 0; left: 0;
  width: 66px; height: 74px;
  z-index: 9000;
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
}
.krt.krt--show { opacity: 1; }
.krt svg { width: 100%; height: 100%; display: block; overflow: visible; }
.krt.krt--flip svg { transform: scaleX(-1); }
.krt__body { transform-box: fill-box; transform-origin: 50% 100%; }
.krt.krt--run .krt__body { animation: krt-run .28s steps(2, end) infinite; }
.krt.krt--fight .krt__body { animation: krt-jab .34s ease-in-out infinite; }
.krt.krt--fight .krt__impact { animation: krt-impact .34s ease-in-out infinite; }
.krt__impact { opacity: 0; transform-box: fill-box; transform-origin: center; }
@keyframes krt-run {
  0%   { transform: translateY(0) rotate(-2deg); }
  100% { transform: translateY(-4px) rotate(2deg); }
}
@keyframes krt-jab {
  0%, 100% { transform: translateX(0); }
  45%      { transform: translateX(9px); }
}
@keyframes krt-impact {
  0%, 30% { opacity: 0; transform: scale(.4); }
  50%     { opacity: 1; transform: scale(1.1); }
  70%     { opacity: 0; transform: scale(1.2); }
  100%    { opacity: 0; }
}

/* ---- Footer credit (studio) ---- */
.footer__credit {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: 13px;
  letter-spacing: .02em;
  color: rgba(255,255,255,.55);
  text-align: center;
}
.footer__credit a {
  color: rgba(255,255,255,.8);
  text-decoration: none;
  border-bottom: 1px solid rgba(215,35,35,.6);
  transition: color .2s, border-color .2s;
}
.footer__credit a:hover {
  color: #fff;
  border-color: var(--bb-red);
}
