/* РЦ «Вверх» — тёплая детская тема, мотив одуванчика */

:root {
  --font-display: "Nunito", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --cream-top: #f3fbff;
  --cream: #eaf6fc;
  --cream-deep: #dceef8;
  --sunny: #ffe566;
  --sunny-mid: #ffd54a;
  --sunny-deep: #e8b923;
  --brand-light: #b8dff2;
  --brand: #8ecae6;
  --brand-mid: #6eb8d9;
  --brand-deep: #4a9bc4;
  --brand-dark: #3578a8;
  --brand-night: #2a5580;
  --sky: #a8daf0;
  --blossom: #ffb4a2;
  --ink: #2f3d47;
  --ink-muted: #5a6b78;
  --white: #ffffff;
  --header-text: rgba(255, 255, 255, 0.96);
  --header-text-dim: rgba(255, 255, 255, 0.85);
  --header-hover: #fff9c4;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow: 0 12px 40px rgba(74, 155, 196, 0.14);
  --shadow-card: 0 8px 32px rgba(42, 85, 128, 0.08);
  --shell-max: 1120px;
  --nav-break: 768px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background: linear-gradient(180deg, var(--cream-top) 0%, var(--cream) 18%, var(--cream-deep) 100%);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--brand-deep);
  text-underline-offset: 0.18em;
}

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

h1,
h2,
h3,
.home-hero-title,
.home-section-title,
.article-title,
.footer-surface-brand {
  font-family: var(--font-display);
}

.inner.shell,
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: clamp(14px, 4vw, 22px);
}

.skip-link.screen-reader-text {
  position: absolute;
  left: -9999px;
  top: auto;
  z-index: 100000;
  padding: 0.5rem 1rem;
  background: var(--white);
  color: var(--ink);
  border-radius: 8px;
}

.skip-link.screen-reader-text:focus {
  left: 14px;
  top: 12px;
}

.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;
}

.site-watermark {
  position: fixed;
  right: -10vmin;
  bottom: -14vmin;
  width: min(58vmin, 480px);
  pointer-events: none;
  z-index: 0;
  color: var(--sunny-deep);
  opacity: 0.11;
}

.site-watermark-img {
  display: block;
  width: 100%;
  height: auto;
}

/* Фон: семена одуванчика — подъём вверх, слой за контентом, лёгкий параллакс (dandelion-bg.js) */
.site-dandelion-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.site-dandelion-sprout {
  position: absolute;
  width: calc(28px * var(--ds-s, 1));
  height: calc(37px * var(--ds-s, 1));
  margin: calc(-18.5px * var(--ds-s, 1)) 0 0 calc(-14px * var(--ds-s, 1));
  transform-origin: 50% 82%;
  opacity: 0.78;
  background: url("../img/dandelion-seed.svg") center / contain no-repeat;
  filter: drop-shadow(0 1px 2px rgba(42, 85, 128, 0.08));
  animation: site-dandelion-rise var(--ds-rise, 52s) linear infinite;
  animation-delay: var(--ds-rise-delay, 0s);
}

@media (prefers-reduced-motion: reduce) {
  .site-dandelion-sprout {
    animation: none;
    opacity: 0.45;
  }
}

@keyframes site-dandelion-rise {
  from {
    transform: translate3d(var(--ds-drift, 0px), 118vh, 0) rotate(var(--ds-angle, 0deg));
  }

  to {
    transform: translate3d(calc(var(--ds-drift, 0px) * -0.55), -32vh, 0)
      rotate(calc(var(--ds-angle, 0deg) + var(--ds-spin, 10deg)));
  }
}

.outer-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.mobile-nav-cb {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

#site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 48%, var(--brand-dark) 100%);
  box-shadow: 0 4px 24px rgba(42, 85, 128, 0.32);
}

#site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: clamp(76px, 14vw, 96px);
  padding-block: 14px;
  gap: 8px;
}

#site-logo {
  position: absolute;
  left: clamp(14px, 4vw, 22px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.site-logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  padding: 0.5rem 0.85rem;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.6) inset,
    0 4px 18px rgba(42, 85, 128, 0.2);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.site-logo-link:hover {
  transform: translateY(-2px);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.65) inset,
    0 8px 24px rgba(42, 85, 128, 0.28);
}

.site-logo-link:focus-visible {
  outline: 2px solid var(--brand-mid);
  outline-offset: 4px;
}

.site-logo-img {
  display: block;
  width: auto;
  height: clamp(58px, 13vw, 88px);
  max-width: min(300px, 62vw);
  min-height: 52px;
}

@media (min-width: 1100px) {
  .site-logo-img {
    height: 92px;
    max-width: 320px;
  }
}

#site-navigation-wrap {
  display: flex;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
  padding-inline: clamp(132px, 18vw, 300px);
}

#site-navigation {
  width: 100%;
}

.main-menu.dropdown-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 0;
}

.main-menu.dropdown-menu > .menu-item {
  position: relative;
}

.main-menu.dropdown-menu > .menu-item > .menu-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  min-height: 40px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-decoration: none !important;
  color: var(--header-text-dim);
  white-space: nowrap;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

@media (min-width: 900px) {
  .main-menu.dropdown-menu > .menu-item > .menu-link {
    padding: 8px 16px;
    font-size: 0.86rem;
  }
}

@media (min-width: 1200px) {
  .main-menu.dropdown-menu > .menu-item > .menu-link {
    padding: 9px 18px;
    font-size: 0.9rem;
  }
}

.main-menu.dropdown-menu > .menu-item > .menu-link:hover,
.main-menu.dropdown-menu > .menu-item > .menu-link:focus-visible {
  color: var(--header-hover);
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.main-menu.dropdown-menu > .menu-item.current-menu-item > .menu-link,
.main-menu.dropdown-menu > .menu-item.current_page_item > .menu-link {
  color: var(--header-hover);
  background: rgba(255, 255, 255, 0.18);
}

.nav-arrow::before {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 0.35rem;
  vertical-align: middle;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}

@media (min-width: 768px) {
  .main-menu .sub-menu {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 240px;
    max-width: min(92vw, 340px);
    max-height: min(72vh, 440px);
    overflow-y: auto;
    margin: 0;
    padding: 0.4rem 0;
    list-style: none;
    background: var(--white);
    border: 1px solid rgba(110, 184, 217, 0.35);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 1200;
  }

  .main-menu .menu-item-has-children:hover > .sub-menu,
  .main-menu .menu-item-has-children:focus-within > .sub-menu {
    display: block;
  }

  .main-menu .sub-menu .menu-link {
    display: block;
    padding: 10px 18px;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--ink) !important;
    text-decoration: none !important;
    white-space: normal;
    line-height: 1.35;
    transition: background 0.15s ease, color 0.15s ease;
  }

  .main-menu .sub-menu .menu-item.current-menu-item > .menu-link,
  .main-menu .sub-menu .menu-link:hover,
  .main-menu .sub-menu .menu-link:focus-visible {
    background: linear-gradient(90deg, rgba(255, 229, 102, 0.35), transparent);
    color: var(--brand-dark) !important;
  }
}

.oceanwp-mobile-menu-icon {
  display: none;
  margin-left: auto;
  z-index: 3;
}

.mobile-menu {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 12px;
  transition: background 0.2s ease;
}

.mobile-menu:hover {
  background: rgba(255, 255, 255, 0.12);
}

.hamburger-box {
  display: inline-block;
  width: 28px;
  height: 22px;
  position: relative;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
  width: 28px;
  height: 3px;
  background-color: #fff;
  border-radius: 2px;
  position: absolute;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.hamburger-inner {
  display: block;
  top: 50%;
  margin-top: -1.5px;
}

.hamburger-inner::before,
.hamburger-inner::after {
  content: "";
  display: block;
}

.hamburger-inner::before {
  top: -8px;
}

.hamburger-inner::after {
  bottom: -8px;
}

.mobile-nav-cb:checked ~ #site-header-inner .hamburger-inner {
  transform: rotate(45deg);
}

.mobile-nav-cb:checked ~ #site-header-inner .hamburger-inner::before {
  opacity: 0;
}

.mobile-nav-cb:checked ~ #site-header-inner .hamburger-inner::after {
  transform: rotate(-90deg);
  top: 0;
}

#mobile-dropdown {
  display: none;
  width: 100%;
  background: var(--white);
  border-bottom: 3px solid var(--brand-mid);
  max-height: min(88vh, 720px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-nav-cb:checked ~ #mobile-dropdown {
  display: block;
}

@media (min-width: 768px) {
  #site-header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    justify-items: stretch;
  }

  #site-logo {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    justify-self: start;
    align-self: center;
  }

  #site-navigation-wrap {
    grid-column: 2;
    justify-self: center;
    width: max-content;
    max-width: calc(100vw - 2rem);
    padding-inline: 0;
    flex: none;
  }

  #site-navigation {
    width: auto;
  }

  .oceanwp-mobile-menu-icon {
    display: none;
  }
}

@media (min-width: 768px) and (max-width: 1099px) {
  .main-menu.dropdown-menu > .menu-item > .menu-link {
    padding: 8px 10px;
    font-size: 0.78rem;
  }
}

@media (max-width: 767px) {
  #site-navigation-wrap {
    display: none !important;
  }

  .oceanwp-mobile-menu-icon {
    display: flex;
    position: absolute;
    right: clamp(14px, 4vw, 22px);
    top: 50%;
    transform: translateY(-50%);
  }

  #site-logo {
    position: static;
    transform: none;
    margin-right: auto;
  }

  #site-header-inner {
    justify-content: flex-start;
    padding-right: 56px;
  }

  .site-logo-img {
    height: clamp(54px, 16vw, 72px);
    max-width: min(240px, 68vw);
  }

  #mobile-dropdown .menu {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0 1rem;
  }

  #mobile-dropdown .menu > .menu-item > a.menu-link {
    display: block;
    padding: 14px 22px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--ink) !important;
    text-decoration: none !important;
    border-bottom: 1px solid var(--cream-deep);
  }

  #mobile-dropdown .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0 0 0.4rem;
    background: var(--cream);
  }

  #mobile-dropdown .sub-menu .menu-item:last-child .menu-link {
    border-bottom: none;
  }

  #mobile-dropdown .sub-menu .menu-link {
    display: block;
    padding: 10px 22px 10px 32px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink-muted) !important;
    text-decoration: none !important;
    border-bottom: 1px dashed rgba(58, 52, 47, 0.12);
  }
}

@media (min-width: 768px) {
  #mobile-dropdown {
    display: none !important;
  }
}

.site-main {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 42vh;
}

.container {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding: clamp(1.25rem, 4vw, 2.25rem) clamp(14px, 4vw, 22px) clamp(2.5rem, 6vw, 4rem);
}

.content-area,
.site-content {
  width: 100%;
}

.text-center {
  text-align: center;
}

.home-article {
  max-width: 920px;
  margin-inline: auto;
}

.home-hero {
  margin-bottom: clamp(2.75rem, 7vw, 4rem);
}

.home-hero-cloud-shell {
  position: relative;
  max-width: min(52rem, 100%);
  margin-inline: auto;
}

.home-hero-card {
  position: relative;
  padding: 0;
  text-align: center;
  color: var(--ink);
  background:
    radial-gradient(120% 85% at 50% -10%, rgba(255, 255, 255, 0.98) 0%, rgba(248, 252, 255, 0.94) 38%, rgba(236, 246, 252, 1) 72%),
    linear-gradient(168deg, #ffffff 0%, #f4fbff 42%, #e8f4fc 100%);
  border: 1px solid rgba(142, 202, 230, 0.42);
  border-radius: clamp(26px, 5vw, 44px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.98) inset,
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 28px 72px rgba(74, 155, 196, 0.11),
    0 10px 32px rgba(42, 85, 128, 0.06),
    0 1px 3px rgba(42, 85, 128, 0.04);
  overflow: hidden;
}

.home-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.85rem, 2.8vw, 1.35rem);
  padding: clamp(2.25rem, 6vw, 3.25rem) clamp(1.5rem, 5vw, 2.75rem) clamp(2.35rem, 5.5vw, 3.1rem);
  max-width: 40rem;
  margin-inline: auto;
}

.home-hero-card::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 55% at 50% 0%, rgba(184, 232, 255, 0.28) 0%, transparent 58%),
    radial-gradient(ellipse 70% 45% at 12% 88%, rgba(255, 241, 196, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 92% 78%, rgba(184, 232, 255, 0.12) 0%, transparent 55%);
  pointer-events: none;
}

.home-hero-card::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  pointer-events: none;
  mix-blend-mode: soft-light;
  opacity: 0.9;
}

.home-hero-top {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.home-hero-visual {
  position: relative;
  z-index: 1;
  margin: 0;
}

/* Мягкое «боке» за логотипом */
.home-hero-logo-cloud {
  position: relative;
  display: inline-block;
  margin: 0.15rem auto 0;
  padding: clamp(0.75rem, 2.5vw, 1.15rem) clamp(1rem, 3.2vw, 1.5rem);
  isolation: isolate;
}

.home-hero-logo-puff {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  border-radius: 58% 42% 55% 45% / 52% 48% 50% 50%;
  background: radial-gradient(
    ellipse 100% 90% at 42% 38%,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(240, 249, 255, 0.75) 45%,
    rgba(200, 232, 248, 0.22) 72%,
    transparent 88%
  );
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.5) inset,
    0 18px 44px rgba(74, 155, 196, 0.1);
}

.home-hero-logo-puff--a {
  inset: 4% 6% 10% 4%;
}

.home-hero-logo-puff--b {
  inset: 18% -6% 22% 58%;
  border-radius: 45% 55% 48% 52% / 55% 45% 52% 48%;
  opacity: 0.82;
  transform: rotate(-8deg);
  background: radial-gradient(
    circle at 35% 40%,
    rgba(255, 255, 255, 0.94) 0%,
    rgba(232, 246, 255, 0.55) 48%,
    rgba(184, 232, 255, 0.18) 76%,
    transparent 88%
  );
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.4) inset,
    0 12px 32px rgba(74, 155, 196, 0.1);
}

.home-hero-logo-puff--c {
  width: 26%;
  height: 26%;
  left: -2%;
  top: 8%;
  right: auto;
  bottom: auto;
  border-radius: 52% 48% 55% 45% / 48% 52% 50% 50%;
  opacity: 0.72;
  background: radial-gradient(
    circle at 50% 45%,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(232, 248, 255, 0.45) 58%,
    transparent 80%
  );
  box-shadow: 0 8px 22px rgba(74, 155, 196, 0.1);
}

.home-hero-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0.42rem 1.15rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-night);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(110, 184, 217, 0.38);
  border-radius: 999px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 4px 18px rgba(74, 155, 196, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.home-hero-title {
  position: relative;
  margin: 0;
  font-size: clamp(1.55rem, 4.2vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--brand-night);
  line-height: 1.12;
  text-wrap: balance;
}

.home-hero-logo-wrap {
  position: relative;
  z-index: 1;
  margin: 0;
}

.home-hero-logo-link {
  display: inline-block;
  padding: clamp(0.4rem, 1.6vw, 0.6rem) clamp(0.5rem, 2vw, 0.85rem);
  border-radius: var(--radius-xl);
  background: transparent;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), filter 0.35s ease;
}

.home-hero-logo-link:hover {
  transform: scale(1.025) translateY(-3px);
  filter: drop-shadow(0 16px 36px rgba(74, 155, 196, 0.18));
}

.home-hero-logo-link:focus-visible {
  outline: 2px solid var(--brand-mid);
  outline-offset: 4px;
}

.home-hero-logo {
  display: block;
  width: clamp(196px, 44vw, 288px);
  max-width: min(288px, 86vw);
  height: auto;
  filter: drop-shadow(0 12px 32px rgba(42, 85, 128, 0.12));
}

.home-hero-sub {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 36rem;
  font-size: clamp(0.98rem, 2.15vw, 1.12rem);
  line-height: 1.62;
  color: var(--ink-muted);
  text-wrap: balance;
}

.home-hero-tagline {
  position: relative;
  z-index: 1;
  margin: 0;
  padding-top: 0.15rem;
  font-size: clamp(0.95rem, 2vw, 1.06rem);
  color: var(--ink-muted);
  max-width: 32rem;
  margin-inline: auto;
  line-height: 1.58;
  text-wrap: balance;
}

.home-hero-tagline strong {
  color: var(--brand-deep);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.home-section {
  margin-top: 0.5rem;
}

.home-section-head {
  text-align: center;
  margin-bottom: 1.75rem;
}

.home-section-icon {
  display: block;
  width: 3.25rem;
  height: 3.25rem;
  margin: 0 auto 0.75rem;
  background: url("../img/dandelion.svg") center / contain no-repeat;
  opacity: 0.72;
  filter: drop-shadow(0 2px 8px rgba(74, 155, 196, 0.35));
}

.home-section-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 800;
  color: var(--ink);
}

.home-section-lead {
  margin: 0;
  font-size: 0.98rem;
  color: var(--ink-muted);
}

.home-dir-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.home-dir-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.65rem;
  padding: 1.65rem 1.25rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(110, 184, 217, 0.28);
  box-shadow: var(--shadow-card);
  text-decoration: none !important;
  color: var(--ink) !important;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.home-dir-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  opacity: 0.95;
}

.home-dir-card--pre::after {
  background: linear-gradient(90deg, var(--sky), var(--brand));
}

.home-dir-card--school::after {
  background: linear-gradient(90deg, var(--sunny-mid), var(--sunny-deep));
}

.home-dir-card--teen::after {
  background: linear-gradient(90deg, var(--blossom), var(--brand-deep));
}

.home-dir-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(74, 155, 196, 0.22);
  border-color: rgba(255, 213, 74, 0.55);
}

.home-dir-card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cream-deep), var(--sunny));
  box-shadow: 0 4px 12px rgba(232, 185, 35, 0.25);
}

.home-dir-card--pre .home-dir-card-icon {
  background: linear-gradient(135deg, #d4f1f4, var(--sky));
}

.home-dir-card--school .home-dir-card-icon {
  background: linear-gradient(135deg, var(--sunny), var(--sunny-mid));
}

.home-dir-card--teen .home-dir-card-icon {
  background: linear-gradient(135deg, #ffe0d8, var(--blossom));
}

.home-dir-card-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.08rem;
  line-height: 1.25;
}

.home-dir-card-more {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-deep);
}

.home-dir-card-more::after {
  content: " →";
}

.home-dir-card-desc {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink-muted);
  max-width: 22rem;
  margin: 0 0 0.15rem;
}

.home-intro-card {
  max-width: 40rem;
  margin-inline: auto;
  padding: 1.35rem 1.4rem 1.45rem;
  text-align: center;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(110, 184, 217, 0.28);
  box-shadow: var(--shadow-card);
}

.home-intro-card p {
  margin: 0 0 1rem;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--ink-muted);
}

.home-inline-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.35rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  background: linear-gradient(135deg, var(--brand-mid) 0%, var(--brand) 100%);
  color: #fff !important;
  box-shadow: 0 6px 18px rgba(74, 155, 196, 0.32);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.home-inline-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(74, 155, 196, 0.4);
}

.home-pill-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem 0.65rem;
  max-width: 52rem;
  margin-inline: auto;
}

.home-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none !important;
  color: var(--brand-night) !important;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(142, 202, 230, 0.55);
  box-shadow: 0 2px 8px rgba(74, 155, 196, 0.1);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.home-pill:hover {
  background: #fff;
  border-color: var(--brand-mid);
  transform: translateY(-1px);
}

.home-media-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  max-width: 56rem;
  margin-inline: auto;
}

.home-media-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.15rem 1.1rem;
  text-decoration: none !important;
  color: var(--ink) !important;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(110, 184, 217, 0.28);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.home-media-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 213, 74, 0.45);
  box-shadow: 0 16px 40px rgba(74, 155, 196, 0.18);
}

.home-media-card-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--brand-night);
}

.home-media-card-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--ink-muted);
}

.home-record-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1rem;
  max-width: 40rem;
  margin-inline: auto;
  text-align: center;
}

.home-record-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.5rem 1.5rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none !important;
  background: linear-gradient(135deg, var(--brand-mid) 0%, var(--brand) 100%);
  color: #fff !important;
  box-shadow: 0 6px 18px rgba(74, 155, 196, 0.32);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.home-record-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(74, 155, 196, 0.42);
}

.home-record-btn--ghost {
  background: rgba(255, 255, 255, 0.95);
  color: var(--brand-deep) !important;
  border: 1px solid rgba(142, 202, 230, 0.85);
  box-shadow: none;
}

.home-record-btn--ghost:hover {
  border-color: var(--brand-mid);
  box-shadow: 0 4px 14px rgba(74, 155, 196, 0.15);
}

.home-record-link {
  flex-basis: 100%;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--brand-deep);
}

.home-cta-bar {
  margin-top: 2rem;
  padding: 1.5rem 1.25rem;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(110, 184, 217, 0.2) 0%, rgba(255, 229, 102, 0.22) 100%);
  border: 1px solid rgba(142, 202, 230, 0.45);
  box-shadow: var(--shadow-card);
}

.home-cta-inner {
  text-align: center;
  max-width: 36rem;
  margin-inline: auto;
}

.home-cta-line {
  margin: 0.25rem 0;
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--ink);
}

.home-cta-line--muted {
  font-size: 0.95rem;
  color: var(--ink-muted);
}

.home-cta-line a {
  font-weight: 700;
}

@media (max-width: 520px) {
  .home-record-row {
    flex-direction: column;
  }

  .home-record-btn {
    width: 100%;
    max-width: 20rem;
  }
}

.content-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(110, 184, 217, 0.22);
  box-shadow: var(--shadow-card);
  padding: clamp(1.35rem, 4vw, 2.25rem);
}

.article-header-inner {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--cream-deep);
}

.breadcrumb {
  font-size: 0.86rem;
  color: var(--ink-muted);
  margin-bottom: 0.6rem;
}

.breadcrumb a {
  color: var(--brand-deep);
  text-decoration: none;
  font-weight: 600;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb-sep {
  margin: 0 0.35rem;
  opacity: 0.45;
}

.breadcrumb-current {
  color: var(--ink);
  font-weight: 600;
}

.article-title {
  margin: 0;
  font-size: clamp(1.55rem, 3.5vw, 2.05rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.2;
}

.prose .article-body > *:first-child {
  margin-top: 0;
}

.prose .article-body p {
  margin: 0 0 1.05em;
}

.prose .article-body h2,
.prose .article-body h3 {
  font-family: var(--font-display);
  margin: 1.6em 0 0.55em;
  line-height: 1.25;
  color: var(--brand-dark);
}

.prose .article-body h2 {
  font-size: 1.35rem;
}

.prose .article-body h3 {
  font-size: 1.15rem;
}

.prose .article-body img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.prose .article-body a {
  font-weight: 600;
}

/* Внутренние страницы: единое оформление контента из БД */
.singular.page-inner .article-body {
  font-size: 1.02rem;
  line-height: 1.64;
}

.singular.page-inner .article-header-inner {
  border-bottom-color: rgba(142, 202, 230, 0.5);
}

.singular.page-inner .prose .article-body h2,
.singular.page-inner .prose .article-body h3 {
  color: var(--brand-night);
}

.singular.page-inner .prose .article-body h2 {
  font-size: clamp(1.18rem, 2.6vw, 1.42rem);
  padding-bottom: 0.35rem;
  border-bottom: 2px solid rgba(142, 202, 230, 0.42);
  margin-top: 1.75em;
}

.singular.page-inner .prose .article-body > ul {
  list-style: none;
  padding-left: 0;
  margin: 1em 0 1.25em;
}

.singular.page-inner .prose .article-body > ul > li {
  position: relative;
  padding-left: 1.2rem;
  margin: 0.4em 0;
}

.singular.page-inner .prose .article-body > ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-mid);
  opacity: 0.88;
}

.singular.page-inner .prose .article-body > ol {
  padding-left: 1.25rem;
  margin: 1em 0 1.25em;
}

.singular.page-inner .prose .article-body > ol > li::marker {
  color: var(--brand-deep);
  font-weight: 700;
}

.singular.page-inner .prose .article-body img {
  border-radius: var(--radius-lg);
}

.singular.page-inner .prose .article-body table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin: 1.25em 0;
  font-size: 0.92rem;
}

.singular.page-inner .prose .article-body th,
.singular.page-inner .prose .article-body td {
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(142, 202, 230, 0.35);
}

.singular.page-inner .prose .article-body th {
  background: linear-gradient(180deg, #f3faff, #e8f4fc);
  font-weight: 700;
  color: var(--brand-night);
}

.singular.page-inner .prose .article-body iframe {
  max-width: 100%;
  border-radius: var(--radius);
  margin: 1rem 0;
}

/* Шаблонные страницы templates/pages/ (напр. контакты) */
.page-kontakty .contact-lead {
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
  color: var(--ink-muted);
  max-width: 40rem;
}

.page-kontakty .contact-block {
  margin: 1.75rem 0 0;
}

.page-kontakty .contact-block h2 {
  margin-top: 0;
}

/* Направления: каталог плитками (img + h2 + p + ссылка) */
.singular.page-inner .dir-tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
  gap: 1.2rem;
  margin: 0.75rem 0 0.25rem;
}

.singular.page-inner .dir-tile {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1rem 1rem 1.1rem;
  border-radius: var(--radius-xl);
  background: linear-gradient(165deg, #ffffff 0%, #f5faff 55%, #edf6fc 100%);
  border: 1px solid rgba(142, 202, 230, 0.5);
  box-shadow:
    0 3px 0 rgba(255, 255, 255, 0.7) inset,
    0 12px 32px rgba(74, 155, 196, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.singular.page-inner .dir-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(110, 184, 217, 0.75);
  box-shadow:
    0 3px 0 rgba(255, 255, 255, 0.75) inset,
    0 18px 40px rgba(74, 155, 196, 0.18);
}

.singular.page-inner .dir-tile > img:first-child {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  background: #eef6fc;
  box-shadow: 0 6px 18px rgba(74, 155, 196, 0.15);
}

.singular.page-inner .dir-tile > img:first-child[src$=".svg"] {
  object-fit: contain;
  padding: 1.1rem;
  aspect-ratio: 16 / 10;
}

.singular.page-inner .dir-tile > h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.28;
  color: var(--brand-night);
  margin: 0.85rem 0 0.35rem;
  text-align: center;
}

.singular.page-inner .dir-tile > p {
  flex: 1 1 auto;
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--ink-muted);
  text-align: center;
}

.singular.page-inner .dir-tile > a,
.singular.page-inner .dir-tile > .dir-tile-open,
.singular.page-inner .dir-tile > button.dir-tile-open {
  display: inline-flex;
  align-self: center;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  padding: 0.45rem 1.2rem;
  margin-top: auto;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.84rem;
  line-height: 1.2;
  text-decoration: none;
  background: linear-gradient(135deg, var(--brand-mid) 0%, var(--brand) 100%);
  color: #fff !important;
  border: none;
  box-shadow: 0 5px 16px rgba(74, 155, 196, 0.3);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.singular.page-inner .dir-tile > a:hover,
.singular.page-inner .dir-tile > .dir-tile-open:hover,
.singular.page-inner .dir-tile > button.dir-tile-open:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(74, 155, 196, 0.38);
}

.dir-extra-section {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(142, 202, 230, 0.35);
}

.dir-extra-heading {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--brand-night);
  text-align: center;
}

.dir-extra-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
}

.dir-extra-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  width: 100%;
  padding: 1rem 1.1rem;
  text-align: left;
  border: 1px solid rgba(142, 202, 230, 0.45);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.dir-extra-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand-mid);
  box-shadow: 0 12px 32px rgba(74, 155, 196, 0.14);
}

.dir-extra-card-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--brand-night);
}

.dir-extra-card-hint {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-deep);
}

/* Галерея: плитки превью */
.singular.page-inner .gal-tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 1.15rem;
  margin: 0.5rem 0 0;
}

.singular.page-inner .gal-tile {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0.85rem 0.85rem 1rem;
  border-radius: var(--radius-xl);
  background: linear-gradient(165deg, #ffffff 0%, #f5faff 50%, #e8f4fc 100%);
  border: 1px solid rgba(142, 202, 230, 0.48);
  box-shadow:
    0 3px 0 rgba(255, 255, 255, 0.65) inset,
    0 10px 28px rgba(74, 155, 196, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.singular.page-inner .gal-tile:hover {
  transform: translateY(-3px);
  box-shadow:
    0 3px 0 rgba(255, 255, 255, 0.7) inset,
    0 16px 36px rgba(74, 155, 196, 0.18);
}

.singular.page-inner .gal-tile > img:first-child {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 20px rgba(74, 155, 196, 0.16);
}

.singular.page-inner .gal-tile > p,
.singular.page-inner .gal-tile .gal-tile-caption {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--brand-night);
  margin: 0.75rem 0 0.5rem;
  text-align: center;
}

.singular.page-inner .gal-tile > a {
  display: inline-flex;
  align-self: center;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.45rem 1.25rem;
  margin-top: auto;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.84rem;
  text-decoration: none;
  background: linear-gradient(135deg, var(--brand-mid) 0%, var(--brand) 100%);
  color: #fff !important;
  border: none;
  box-shadow: 0 5px 16px rgba(74, 155, 196, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.singular.page-inner .gal-tile > a:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(74, 155, 196, 0.38);
}

/* Альбомы галереи: единый блок «фотоальбом», сетка + лайтбокс */
.page-gallery-album .article-body > .album-viewer {
  margin: 0.5rem 0 2.25rem;
}

.page-gallery-album .album-viewer {
  padding: clamp(0.85rem, 2.5vw, 1.15rem) clamp(0.75rem, 2.2vw, 1.15rem) clamp(1rem, 2.8vw, 1.35rem);
  border-radius: var(--radius-xl);
  background: linear-gradient(168deg, rgba(255, 255, 255, 0.97) 0%, #f0f8fd 48%, #e4f2fb 100%);
  border: 1px solid rgba(110, 184, 217, 0.38);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 14px 40px rgba(74, 155, 196, 0.12);
}

.page-gallery-album .album-photo-mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: clamp(0.55rem, 1.8vw, 1rem);
  margin: 0;
  touch-action: manipulation;
}

.page-gallery-album .album-photo-mosaic figure.gallery-item {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(165deg, #ffffff 0%, #f2f9fd 100%);
  border: 1px solid rgba(142, 202, 230, 0.42);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 10px 28px rgba(74, 155, 196, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.page-gallery-album .album-photo-mosaic figure.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 18px 40px rgba(74, 155, 196, 0.2);
}

.page-gallery-album .album-photo-mosaic figure.gallery-item > a {
  position: relative;
  z-index: 1;
  display: block;
  line-height: 0;
  cursor: pointer;
  text-decoration: none;
  outline-offset: 4px;
}

.page-gallery-album .album-photo-mosaic figure.gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  pointer-events: none;
}

.page-gallery-album .album-viewer figure,
.page-gallery-album .album-photo-mosaic figure.gallery-item {
  margin: 0;
}

.album-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100002;
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: clamp(12px, 3vw, 28px);
  padding-top: clamp(2.5rem, 8vw, 3.25rem);
  border: none;
  background: transparent;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.album-lightbox-meta {
  position: absolute;
  top: clamp(10px, 2.5vw, 20px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: #fff;
  background: rgba(0, 0, 0, 0.38);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.album-lightbox-counter:empty {
  display: none;
}

.album-lightbox::backdrop {
  background: rgba(18, 36, 48, 0.78);
  backdrop-filter: blur(6px);
}

.album-lightbox-figure {
  margin: 0;
  flex: 1;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.album-lightbox-img {
  max-width: min(96vw, 1120px);
  max-height: min(86vh, 900px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow:
    0 4px 0 rgba(255, 255, 255, 0.12) inset,
    0 28px 80px rgba(0, 0, 0, 0.35);
}

.album-lightbox-close {
  position: absolute;
  top: clamp(10px, 2.5vw, 22px);
  right: clamp(10px, 2.5vw, 22px);
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 50%;
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  transition: background 0.2s ease, transform 0.15s ease;
}

.album-lightbox-close:hover {
  background: rgba(0, 0, 0, 0.5);
  transform: scale(1.05);
}

.album-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.6rem;
  height: 3.4rem;
  border: none;
  border-radius: 10px;
  font-size: 1.85rem;
  line-height: 1;
  cursor: pointer;
  color: #fff;
  background: rgba(0, 0, 0, 0.32);
  transition: background 0.2s ease;
}

.album-lightbox-nav:hover {
  background: rgba(0, 0, 0, 0.5);
}

.album-lightbox-prev {
  left: clamp(8px, 2vw, 20px);
}

.album-lightbox-next {
  right: clamp(8px, 2vw, 20px);
}

@media (max-width: 520px) {
  .page-gallery-album .album-photo-mosaic {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.55rem;
  }

  .album-lightbox-nav {
    width: 2.2rem;
    height: 2.85rem;
    font-size: 1.5rem;
  }
}

/* Игры по Бахотскому: сетка фото из figure */
.singular.page-inner .baht-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.7rem;
  max-width: 48rem;
  margin: 1.25rem auto 0;
  padding: 0.85rem;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(142, 202, 230, 0.4);
}

.singular.page-inner .baht-photo-grid figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(74, 155, 196, 0.15);
  transition: transform 0.15s ease;
}

.singular.page-inner .baht-photo-grid figure:hover {
  transform: scale(1.02);
}

.singular.page-inner .baht-photo-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

/* Услуги и цены */
.singular.page-inner .price-sheet {
  margin-top: 0.35rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.35rem;
}

.singular.page-inner .price-sheet > p {
  text-align: center;
  margin: 0.4rem 0;
  font-size: 0.98rem;
  line-height: 1.45;
  color: var(--ink-muted);
}

.singular.page-inner .price-sheet > p b {
  color: var(--brand-night);
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
}

.singular.page-inner .price-table {
  width: 100%;
  min-width: 36rem;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  background: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid rgba(142, 202, 230, 0.45);
  box-shadow: var(--shadow-card);
}

.singular.page-inner .price-table td,
.singular.page-inner .price-table th {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid rgba(142, 202, 230, 0.28);
  vertical-align: top;
}

.singular.page-inner .price-table tr:last-child td {
  border-bottom: none;
}

.singular.page-inner .price-table tr:first-child td {
  background: linear-gradient(180deg, #e8f4fc 0%, #dceefa 100%);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--brand-night);
  text-transform: none;
}

.singular.page-inner .price-table tr:nth-child(even):not(:first-child) td {
  background: rgba(245, 250, 255, 0.55);
}

.singular.page-inner .price-table td b {
  color: var(--brand-night);
  font-weight: 700;
}

@media (max-width: 640px) {
  .singular.page-inner .price-table {
    min-width: 28rem;
    font-size: 0.8rem;
  }

  .singular.page-inner .gal-tiles-grid {
    grid-template-columns: 1fr;
  }

  .singular.page-inner .dir-tiles-grid {
    grid-template-columns: 1fr;
  }
}

#site-footer {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  margin-top: auto;
  width: 100%;
}

.footer-wave {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 12px;
  transform: translateY(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  opacity: 0.85;
}

.footer-inner {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-inline: clamp(14px, 4vw, 28px);
  box-sizing: border-box;
}

.footer-surface {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(1.65rem, 3.5vw, 2.25rem) clamp(1.25rem, 4vw, 2.5rem) clamp(1.5rem, 3vw, 2rem);
  text-align: center;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, #ffffff 0%, #f5faff 42%, #edf6fc 100%);
  border: 1px solid rgba(142, 202, 230, 0.55);
  box-shadow:
    0 4px 0 rgba(255, 255, 255, 0.75) inset,
    0 16px 40px rgba(74, 155, 196, 0.12);
}

@media (min-width: 900px) {
  .footer-surface {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto 1fr auto;
    column-gap: clamp(1.5rem, 4vw, 2.75rem);
    row-gap: 0.35rem;
    text-align: left;
    align-items: start;
  }

  .footer-surface-brand {
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 0.35rem;
  }

  .footer-surface-lines {
    grid-column: 1;
    grid-row: 2 / span 2;
    margin: 0 0 0.5rem;
  }

  .footer-surface-pay-title {
    grid-column: 2;
    grid-row: 1;
    margin: 0 0 0.45rem;
    text-align: left;
  }

  .footer-surface-pay {
    grid-column: 2;
    grid-row: 2;
    justify-content: flex-start;
    margin-bottom: 0.65rem;
  }

  .footer-surface-yandex {
    grid-column: 2;
    grid-row: 3;
    justify-content: flex-start;
    margin: 0 0 0.5rem;
  }

  .footer-surface-copy {
    grid-column: 1;
    grid-row: 4;
    align-self: end;
    margin: 0.75rem 0 0.2rem;
  }

  .footer-surface-photo {
    grid-column: 2;
    grid-row: 4;
    align-self: end;
    margin: 0.75rem 0 0.2rem;
    text-align: right;
  }

  .footer-surface-nav {
    grid-column: 1 / -1;
    grid-row: 5;
    justify-content: flex-start;
    padding-top: 1.1rem;
    margin-top: 0.35rem;
  }
}

.footer-surface-brand {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-night);
}

.footer-surface-lines {
  margin: 0 0 1rem;
}

.footer-surface-lines p {
  margin: 0.35rem 0;
  font-size: 0.98rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

.footer-surface-lines a {
  color: var(--brand-deep);
  font-weight: 700;
  text-decoration: none;
}

.footer-surface-lines a:hover {
  text-decoration: underline;
}

.footer-surface-dot {
  margin: 0 0.35rem;
  color: rgba(74, 120, 150, 0.45);
}

.footer-surface-pay-title {
  margin: 0.85rem 0 0.5rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--brand-dark);
}

.footer-surface-pay {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 1rem;
  margin-bottom: 0.85rem;
}

.footer-surface-pay a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  filter: drop-shadow(0 2px 6px rgba(74, 155, 196, 0.2));
  transition: transform 0.15s ease, filter 0.15s ease;
}

.footer-surface-pay a:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 4px 10px rgba(74, 155, 196, 0.28));
}

.footer-surface-pay svg {
  max-height: 34px;
  width: auto;
  max-width: 72px;
}

.footer-surface-yandex {
  margin: 0.35rem 0 0.75rem;
  display: flex;
  justify-content: center;
}

.footer-surface-yandex iframe {
  border: 0;
  max-width: 100%;
}

.footer-surface-copy {
  margin: 0.5rem 0 0.25rem;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.footer-surface-photo {
  margin: 0 0 1.1rem;
  font-size: 0.82rem;
  color: rgba(74, 100, 120, 0.85);
}

.footer-surface-photo a {
  color: var(--brand-deep);
  font-weight: 600;
}

.footer-surface-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem 0.85rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(142, 202, 230, 0.4);
}

.footer-surface-nav a {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--brand-night);
  text-decoration: none;
}

.footer-surface-nav a:hover {
  color: var(--brand-deep);
  text-decoration: underline;
}

/* «О нас» (/onas): плоский HTML из WXR — карточки собираются в app.prepare_onas_body_html */
.page-onas .article-body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.35rem;
  align-items: stretch;
}

.page-onas .container {
  padding-top: clamp(0.5rem, 2vw, 0.85rem);
}

.page-onas .content-card {
  padding-top: clamp(0.85rem, 2.5vw, 1.15rem);
}

.page-onas .article-header-inner {
  display: none;
}

.page-onas .onas-intro {
  grid-column: 1 / -1;
  max-width: 52rem;
  margin-inline: auto;
  text-align: center;
  padding: 0 0 0.5rem;
}

.page-onas .onas-intro .elementor-section,
.page-onas .onas-intro section[class*="elementor"] {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  min-height: 0 !important;
  margin-top: 0 !important;
}

.page-onas .onas-intro h1 {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3.2vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-night);
  margin: 0 0 0.75rem;
  line-height: 1.2;
}

.page-onas .onas-intro h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin: 0 0 0.85rem;
}

.page-onas .onas-intro p {
  margin: 0 auto 1rem;
  max-width: 42rem;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--ink-muted);
}

.page-onas .onas-teacher-card {
  position: relative;
  grid-column: span 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  height: 100%;
  min-height: 0;
  padding: 1.35rem 1.15rem 1.45rem;
  border-radius: 22px;
  background: linear-gradient(165deg, #ffffff 0%, #f3faff 48%, #e8f4fc 100%);
  border: 1px solid rgba(142, 202, 230, 0.55);
  box-shadow:
    0 4px 0 rgba(255, 255, 255, 0.65) inset,
    0 14px 36px rgba(74, 155, 196, 0.14);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.page-onas .onas-teacher-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(120% 80% at 50% 0%, rgba(184, 232, 255, 0.35) 0%, transparent 55%);
  opacity: 0.85;
}

.page-onas .onas-teacher-card:hover {
  transform: translateY(-5px);
  border-color: rgba(110, 184, 217, 0.75);
  box-shadow:
    0 4px 0 rgba(255, 255, 255, 0.7) inset,
    0 22px 48px rgba(74, 155, 196, 0.22);
}

.page-onas .onas-teacher-card > img:first-of-type {
  position: relative;
  z-index: 1;
  display: block;
  align-self: center;
  width: 160px;
  height: 160px;
  max-width: 100%;
  object-fit: cover;
  object-position: center 38%;
  border-radius: 9999px;
  border: 4px solid rgba(255, 255, 255, 0.95);
  outline: 3px solid rgba(142, 202, 230, 0.65);
  box-shadow: 0 10px 28px rgba(74, 155, 196, 0.22);
  margin: 0 auto 0.35rem;
}

.page-onas .onas-teacher-card:has([data-teacher-open="egorova-ekaterina-vitalevna"]) > img:first-of-type,
.page-onas .onas-teacher-card:has(img[src*="DSC_4578"]) > img:first-of-type {
  object-position: center 32%;
}

.page-onas .onas-teacher-card:has([data-teacher-open="egorova-mariya-konstantinovna"]) > img:first-of-type,
.page-onas .onas-teacher-card:has(img[src*="DSC_4475"]) > img:first-of-type {
  object-position: center 30%;
}

.page-onas .onas-teacher-card:has([data-teacher-open="doronina-elena-vyacheslavovna"]) > img:first-of-type,
.page-onas .onas-teacher-card:has(img[src*="DSC_6873"]) > img:first-of-type {
  object-position: center 35%;
}

.page-onas .onas-teacher-card:has([data-teacher-open="leunova-irina-ivanovna"]) > img:first-of-type,
.page-onas .onas-teacher-card:has(img[src*="DSC_6937"]) > img:first-of-type {
  object-position: center 22%;
}

.page-onas .onas-teacher-card:has(img[src*="066-01"]) > img:first-of-type,
.page-onas .onas-teacher-card:has(a[href*="doronina-ev"]) > img:first-of-type {
  object-position: center 28%;
}

.page-onas .onas-teacher-card > h2 {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  margin: 0.5rem 0 0;
  line-height: 1.3;
  align-self: center;
  max-width: 100%;
}

.page-onas .onas-teacher-card > h2:nth-of-type(1) {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-night);
  text-transform: capitalize;
}

.page-onas .onas-teacher-card > h2:nth-of-type(2) {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
}

.page-onas .onas-teacher-card > ul {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0 0 0.35rem;
  padding: 0;
  width: 100%;
  text-align: left;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--ink-muted);
  flex: 1 1 auto;
}

.page-onas .onas-teacher-card > ul li {
  position: relative;
  padding-left: 1.1rem;
  margin: 0.28rem 0;
}

.page-onas .onas-teacher-card > ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-mid);
  opacity: 0.85;
}

.page-onas .onas-teacher-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(142, 202, 230, 0.4);
}

.page-onas .onas-teacher-actions a {
  flex: 1 1 calc(50% - 0.28rem);
  min-width: min(100%, 7.5rem);
  min-height: 2.7rem;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.65rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand-deep) !important;
  border: 1px solid rgba(142, 202, 230, 0.85);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.page-onas .onas-teacher-actions a:hover {
  background: #fff;
  border-color: var(--brand-mid);
}

.page-onas .onas-teacher-actions a[href="#"],
.page-onas .onas-teacher-actions a[role="button"] {
  background: linear-gradient(135deg, var(--brand-mid) 0%, var(--brand) 100%);
  color: #fff !important;
  border: 1px solid transparent;
  box-shadow: 0 5px 16px rgba(74, 155, 196, 0.32);
}

.page-onas .onas-teacher-actions a[href="#"]:hover,
.page-onas .onas-teacher-actions a[role="button"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(74, 155, 196, 0.4);
  border-color: transparent;
}

/* Карточки без обёртки (нет пары ссылок подряд) */
.page-onas .onas-teacher-card > a {
  position: relative;
  z-index: 1;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0.35rem 0.2rem 0;
  padding: 0.5rem 1rem;
  min-height: 2.7rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.page-onas .onas-teacher-card > a[href="#"],
.page-onas .onas-teacher-card > a[role="button"] {
  background: linear-gradient(135deg, var(--brand-mid) 0%, var(--brand) 100%);
  color: #fff !important;
  border: none;
  box-shadow: 0 6px 18px rgba(74, 155, 196, 0.35);
}

.page-onas .onas-teacher-card > a[href="#"]:hover,
.page-onas .onas-teacher-card > a[role="button"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(74, 155, 196, 0.42);
}

.page-onas .onas-teacher-card > a[href^="http"] {
  background: rgba(255, 255, 255, 0.85);
  color: var(--brand-deep) !important;
  border: 1px solid rgba(142, 202, 230, 0.75);
  box-shadow: none;
}

.page-onas .onas-teacher-card > a[href^="http"]:hover {
  background: #fff;
  border-color: var(--brand-mid);
}

@media (max-width: 640px) {
  .page-onas .article-body {
    grid-template-columns: 1fr;
  }
}

/* «О нас»: если в теле снова окажется разметка Elementor — те же визуальные приёмы */
.page-onas .article-body .elementor-section {
  margin-bottom: 0.5rem;
}

.page-onas .article-body .elementor-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: center;
  align-items: stretch;
}

.page-onas .article-body .elementor-column.elementor-col-100 > .elementor-widget-wrap {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  text-align: left;
  align-items: stretch;
}

.page-onas .article-body .elementor-column.elementor-col-33 {
  flex: 1 1 240px;
  max-width: 340px;
}

.page-onas .article-body .elementor-column.elementor-col-33 > .elementor-widget-wrap {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.35rem 1.15rem 1.5rem;
  border-radius: 22px;
  background: linear-gradient(165deg, #ffffff 0%, #f3faff 48%, #e8f4fc 100%);
  border: 1px solid rgba(142, 202, 230, 0.55);
  box-shadow:
    0 4px 0 rgba(255, 255, 255, 0.65) inset,
    0 14px 36px rgba(74, 155, 196, 0.14);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.page-onas .article-body .elementor-column.elementor-col-33 > .elementor-widget-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(120% 80% at 50% 0%, rgba(184, 232, 255, 0.35) 0%, transparent 55%);
  opacity: 0.85;
}

.page-onas .article-body .elementor-column.elementor-col-33 > .elementor-widget-wrap:hover {
  transform: translateY(-5px);
  border-color: rgba(110, 184, 217, 0.75);
  box-shadow:
    0 4px 0 rgba(255, 255, 255, 0.7) inset,
    0 22px 48px rgba(74, 155, 196, 0.22);
}

.page-onas .article-body .elementor-column.elementor-col-33 .elementor-widget-wrap > .elementor-widget {
  position: relative;
  z-index: 1;
  width: 100%;
}

.page-onas .article-body .elementor-widget-image {
  margin-bottom: 0.15rem;
}

.page-onas .article-body .elementor-widget-image img {
  display: block;
  margin-inline: auto;
  width: 148px !important;
  height: 148px !important;
  max-width: 148px !important;
  object-fit: cover;
  border-radius: 9999px;
  border: 4px solid rgba(255, 255, 255, 0.95);
  outline: 3px solid rgba(142, 202, 230, 0.65);
  box-shadow: 0 10px 28px rgba(74, 155, 196, 0.22);
}

.page-onas .article-body .elementor-widget-heading .elementor-heading-title {
  margin: 0.85rem 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-night);
  line-height: 1.25;
}

.page-onas .article-body .elementor-widget-text-editor {
  font-size: 0.9rem;
  line-height: 1.58;
  color: var(--ink-muted);
}

.page-onas .article-body .elementor-widget-text-editor p {
  margin: 0 0 0.65em;
}

.page-onas .article-body .elementor-widget-text-editor p:last-child {
  margin-bottom: 0;
}

.page-onas .article-body .elementor-button,
.page-onas .article-body .elementor-button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.75rem;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  background: linear-gradient(135deg, var(--brand-mid) 0%, var(--brand) 100%);
  color: #fff !important;
  border: none;
  box-shadow: 0 6px 18px rgba(74, 155, 196, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.page-onas .article-body .elementor-button:hover,
.page-onas .article-body .elementor-button-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(74, 155, 196, 0.42);
}

@media (max-width: 640px) {
  .page-onas .article-body .elementor-column.elementor-col-33 {
    max-width: none;
  }
}

/* «О нас»: подробнее о специалисте — модальное окно */
.page-onas .teacher-details-trigger {
  font: inherit;
  font-family: var(--font-display);
  cursor: pointer;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
  background: rgba(255, 255, 255, 0.96);
  color: var(--brand-deep) !important;
  border: 1px solid rgba(142, 202, 230, 0.9);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.page-onas .teacher-details-trigger:hover {
  background: #fff;
  border-color: var(--brand-mid);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(74, 155, 196, 0.2);
}

.page-onas .teacher-details-trigger:focus-visible {
  outline: 2px solid var(--brand-mid);
  outline-offset: 2px;
}

.page-onas .onas-teacher-actions .teacher-details-trigger {
  flex: 1 1 calc(50% - 0.28rem);
  min-width: min(100%, 7.5rem);
}

.page-onas .onas-teacher-card > .teacher-details-trigger {
  align-self: center;
  margin: 0.35rem 0.2rem 0;
}

.teacher-dialog {
  width: min(100% - 1.5rem, 46rem);
  max-height: min(92vh, 720px);
  padding: 0;
  border: none;
  border-radius: var(--radius-xl);
  background: transparent;
  box-shadow: none;
}

.teacher-dialog::backdrop {
  background: rgba(24, 42, 52, 0.48);
  backdrop-filter: blur(4px);
}

.teacher-dialog-panel {
  display: flex;
  flex-direction: column;
  max-height: min(92vh, 720px);
  background: linear-gradient(185deg, #ffffff 0%, #f6fbff 45%, #eaf4fb 100%);
  border: 1px solid rgba(110, 184, 217, 0.42);
  border-radius: var(--radius-xl);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 28px 72px rgba(42, 85, 128, 0.22);
  overflow: hidden;
}

.teacher-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.15rem 1.1rem 1rem 1.35rem;
  border-bottom: 1px solid rgba(142, 202, 230, 0.38);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(243, 250, 255, 0.88) 100%);
}

.teacher-dialog-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.12rem, 2.9vw, 1.42rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-night);
  line-height: 1.28;
  padding-top: 0.1rem;
  text-wrap: balance;
}

.teacher-dialog-close-form {
  margin: 0;
  flex-shrink: 0;
}

.teacher-dialog-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(142, 202, 230, 0.45);
  border-radius: 14px;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--brand-night);
  background: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.teacher-dialog-close:hover {
  background: var(--cream-deep);
  border-color: var(--brand-mid);
  color: var(--ink);
}

.teacher-dialog-close:active {
  transform: scale(0.96);
}

/* Тело модалки: фото + образование + курсы */
.teacher-dialog-prose {
  padding: 1.15rem 1.35rem 1.5rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.62;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.teacher-dialog-prose > img:first-of-type {
  display: block;
  margin: 0 auto 1.25rem;
  width: min(220px, 88%) !important;
  max-width: 100% !important;
  height: min(260px, 34vh) !important;
  max-height: min(260px, 34vh) !important;
  object-fit: cover;
  object-position: center 22%;
  border-radius: var(--radius-lg);
  border: 3px solid rgba(255, 255, 255, 0.95);
  outline: 2px solid rgba(142, 202, 230, 0.55);
  box-shadow: 0 10px 32px rgba(74, 155, 196, 0.2);
}

.teacher-dialog-prose img:not(:first-of-type) {
  display: block;
  margin: 0.75rem auto;
  max-width: min(200px, 85%) !important;
  max-height: 200px !important;
  width: auto !important;
  height: auto !important;
  object-fit: cover;
  border-radius: var(--radius);
}

.teacher-dialog-prose h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Блок основного образования (первый абзац после H1) */
.teacher-dialog-prose h1 + p {
  margin: 0 0 1.15rem;
  padding: 0.85rem 1rem;
  text-align: center;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(142, 202, 230, 0.35);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(74, 155, 196, 0.08);
}

.teacher-dialog-prose h1 + p br {
  line-height: 1.8;
}

/* Заголовок секции «Дополнительное образование» */
.teacher-dialog-prose a[tabindex="0"] {
  display: block;
  margin: 1.35rem 0 0.65rem;
  padding: 0.45rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none !important;
  color: var(--brand-deep) !important;
  border-bottom: 2px solid rgba(255, 213, 74, 0.65);
  pointer-events: none;
  cursor: default;
}

/* Курсы и семинары — только после «Дополнительное образование» */
.teacher-dialog-prose a[tabindex="0"] ~ p {
  margin: 0.55rem 0;
  padding: 0.55rem 0.65rem 0.55rem 0.85rem;
  font-size: 0.9rem;
  line-height: 1.58;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.55);
  border-left: 3px solid var(--brand-mid);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.teacher-dialog-prose p strong {
  color: var(--brand-night);
  font-weight: 700;
}

.teacher-dialog-prose a:not([tabindex="0"]) {
  color: var(--brand-deep);
  font-weight: 600;
}

.teacher-dialog-prose a[target="_blank"]:has(svg) {
  display: none !important;
}

.teacher-dialog-prose svg {
  display: none !important;
}

/* Модалки направлений */
.dir-dialog {
  width: min(100% - 1.5rem, 52rem);
}

.dir-dialog .teacher-dialog-panel {
  border-color: rgba(110, 184, 217, 0.5);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.92) inset,
    0 32px 80px rgba(42, 85, 128, 0.28);
}

.dir-dialog .teacher-dialog-head {
  padding: 1.25rem 1.35rem 1.05rem 1.5rem;
  background: linear-gradient(180deg, #ffffff 0%, #eef7fc 100%);
}

.dir-dialog .teacher-dialog-title {
  font-size: clamp(1.2rem, 3vw, 1.55rem);
  color: var(--brand-night);
}

.dir-dialog .teacher-dialog-prose {
  padding: 1.35rem 1.5rem 1.65rem;
  font-size: 1rem;
  line-height: 1.68;
}

.dir-dialog .teacher-dialog-prose > img:first-of-type {
  border-radius: var(--radius-xl);
  margin-bottom: 1.35rem;
}

.dir-dialog .teacher-dialog-prose h2,
.dir-dialog .teacher-dialog-prose h3 {
  font-family: var(--font-display);
  color: var(--brand-night);
  margin: 1.35em 0 0.5em;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid rgba(142, 202, 230, 0.4);
}

.dir-dialog .teacher-dialog-prose h2 {
  font-size: 1.15rem;
}

.dir-dialog .teacher-dialog-prose ul {
  margin: 0.5em 0 1em;
  padding-left: 1.2rem;
}

.dir-dialog .teacher-dialog-prose li {
  margin-bottom: 0.35em;
}

.dir-dialog .teacher-dialog-prose li::marker {
  color: var(--brand-mid);
}

.dir-dialog .teacher-dialog-prose p {
  margin: 0 0 0.95em;
}

.dir-dialog .teacher-dialog-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 0.92rem;
}

.dir-dialog .teacher-dialog-prose td,
.dir-dialog .teacher-dialog-prose th {
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(142, 202, 230, 0.45);
}

@media (max-width: 480px) {
  .teacher-dialog-prose > img:first-of-type {
    width: min(200px, 92%) !important;
    height: min(220px, 32vh) !important;
    max-height: min(220px, 32vh) !important;
  }
}
