/**
 * Audit fixes 2026 — karaway.by
 * Loaded after theme CSS; safe overrides only.
 */

/* 1. Header: readable menu + smooth background */
.s-header .header-panel {
  background: linear-gradient(
    180deg,
    rgba(245, 245, 245, 0.92) 0%,
    rgba(245, 245, 245, 0.78) 55%,
    rgba(245, 245, 245, 0.35) 100%
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.25s ease, backdrop-filter 0.25s ease, box-shadow 0.25s ease;
}

/*
 * Desktop: compact header sitting ABOVE the hero video
 * (not overlaying it). Theme CSS loads after this file, so
 * layout offsets use !important. Mobile/tablet keep overlay.
 */
@media (min-width: 1251px) {
  :root {
    --kw-header-h: 88px;
  }

  .s-header,
  .s-header.scrolled,
  .s-header.scrolled.scrolled-visible {
    position: fixed !important;
    top: 0 !important;
    transform: none !important;
  }

  .s-header .header-panel,
  .s-header.scrolled .header-panel {
    padding: 8px 0 !important;
    background: #f5f5f5 !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
  }

  .s-header .header {
    gap: 16px;
    min-height: 72px;
  }

  .s-header .header__logo,
  .s-header.scrolled .header__logo {
    width: 200px !important;
    height: auto !important;
    padding-top: 0 !important;
  }

  .s-header .header__logo img,
  .s-header .header__logo__karaway {
    max-height: 64px !important;
    width: auto !important;
    max-width: 200px !important;
    height: auto !important;
  }

  .s-header .header__descr {
    font-size: 12px;
    line-height: 1.25;
    max-width: 13em;
  }

  .s-header .header__center {
    gap: 16px;
  }

  .s-header .header__services-btn {
    padding: 0.35em 12px 0.35em 0.45em !important;
    font-size: 15px !important;
    border-radius: 12px;
  }

  .s-header .header__nav {
    font-size: 15px;
    gap: 0.95em;
  }

  .s-header .phone-block__val {
    font-size: 15px;
    line-height: 1.25;
  }

  /* Push homepage hero + video below the header bar */
  .s-intro.s-intro--home,
  .s-intro--home.s-intro--big {
    margin-top: 88px !important;
    padding-top: 28px !important;
  }

  .s-intro--home .intro__content > br {
    display: none !important;
  }

  .s-intro--home .intro__img-wrap {
    top: 0 !important;
    overflow: hidden;
  }

  .s-intro--home #bx_651765591_5 {
    top: 0 !important;
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    min-width: 0 !important;
    min-height: 0 !important;
  }

  .s-intro--home .main-bg {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: top center;
  }
}

.s-header.scrolled .header-panel {
  background: rgba(245, 245, 245, 0.92);
  box-shadow: 0 5px 35px 0 rgba(0, 0, 0, 0.06);
}

/*
 * Header text / icons → black
 * Overrides theme .header--white { color:#FFF } and white nav links.
 */
.s-header .header,
.s-header .header.header--white,
.header--white:not(.s-header.scrolled .header--white),
.s-header .header__descr,
.s-header .header__nav a,
.s-header .header__services-btn,
.s-header .phone-block,
.s-header .phone-block__val,
.s-header .phone-block__descr,
.s-header .phone-block__callback,
.header--white:not(.s-header.scrolled .header--white) .header__nav a,
.header--white:not(.s-header.scrolled .header--white) .phone-block__descr,
.header--white:not(.s-header.scrolled .header--white) .phone-block__callback {
  color: #000 !important;
  text-shadow: none;
}

.s-header .phone-block__callback,
.header--white:not(.s-header.scrolled .header--white) .phone-block__callback {
  text-decoration-color: rgba(0, 0, 0, 0.35) !important;
}

@media (hover: hover) {
  .s-header .phone-block__callback:hover,
  .header--white:not(.s-header.scrolled .header--white) .phone-block__callback:hover {
    text-decoration-color: #000 !important;
  }
}

.s-header .phone-block__callback:active,
.header--white:not(.s-header.scrolled .header--white) .phone-block__callback:active {
  text-decoration-color: #000 !important;
}

/* Social icons: keep contrast on light header panel */
.s-header .header .soc,
.header--white:not(.s-header.scrolled .header--white) .soc {
  background: rgba(0, 0, 0, 0.06);
  color: #000;
}

.s-header .header .soc img,
.s-header .header .soc svg,
.header--white:not(.s-header.scrolled .header--white) .soc img,
.header--white:not(.s-header.scrolled .header--white) .soc svg {
  filter: none;
  color: #000;
  fill: #000;
}

@media (hover: hover) {
  .s-header .header .soc:hover,
  .header--white:not(.s-header.scrolled .header--white) .soc:hover {
    background: rgba(0, 0, 0, 0.12);
  }
}

/*
 * SearchWP: keep original field look — only gray → black
 * (text, border, icon, placeholder). No dark redesign.
 */
.s-header .searchwp-form,
.s-header .searchwp-form-input-container,
.s-header .swp-input,
.s-header .swp-input--search,
.s-header #searchwp-form-1 input[type="search"],
.s-header #searchwp-form-1 input[type="text"],
.s-header .searchwp-form input[type="search"],
.s-header .searchwp-form input[type="text"],
.mob-panel .searchwp-form,
.mob-panel .searchwp-form-input-container,
.mob-panel .swp-input,
.mob-panel .swp-input--search,
.mob-panel #searchwp-form-1 input[type="search"],
.mob-panel #searchwp-form-1 input[type="text"],
.mob-panel .searchwp-form input[type="search"],
.mob-panel .searchwp-form input[type="text"] {
  color: #000 !important;
  caret-color: #000;
}

.s-header .swp-input,
.s-header .swp-input--search,
.s-header #searchwp-form-1 input[type="search"],
.s-header #searchwp-form-1 input[type="text"],
.s-header .searchwp-form input[type="search"],
.s-header .searchwp-form input[type="text"],
.mob-panel .swp-input,
.mob-panel .swp-input--search,
.mob-panel #searchwp-form-1 input[type="search"],
.mob-panel #searchwp-form-1 input[type="text"],
.mob-panel .searchwp-form input[type="search"],
.mob-panel .searchwp-form input[type="text"] {
  border-color: #000 !important;
}

.s-header .swp-input::placeholder,
.s-header .swp-input--search::placeholder,
.s-header #searchwp-form-1 input::placeholder,
.s-header .searchwp-form input::placeholder,
.mob-panel .swp-input::placeholder,
.mob-panel .swp-input--search::placeholder,
.mob-panel #searchwp-form-1 input::placeholder,
.mob-panel .searchwp-form input::placeholder {
  color: #000 !important;
  opacity: 1;
}

.s-header .swp-input::-webkit-input-placeholder,
.s-header .searchwp-form input::-webkit-input-placeholder,
.mob-panel .swp-input::-webkit-input-placeholder,
.mob-panel .searchwp-form input::-webkit-input-placeholder {
  color: #000 !important;
}

.s-header .swp-input::-moz-placeholder,
.s-header .searchwp-form input::-moz-placeholder,
.mob-panel .swp-input::-moz-placeholder,
.mob-panel .searchwp-form input::-moz-placeholder {
  color: #000 !important;
  opacity: 1;
}

.s-header .swp-input:-ms-input-placeholder,
.s-header .searchwp-form input:-ms-input-placeholder,
.mob-panel .swp-input:-ms-input-placeholder,
.mob-panel .searchwp-form input:-ms-input-placeholder {
  color: #000 !important;
}

.s-header .searchwp-form input[type="submit"],
.s-header #searchwp-form-1 input[type="submit"],
.s-header .searchwp-form button,
.s-header .searchwp-form .swp-input--button,
.s-header .searchwp-form svg,
.mob-panel .searchwp-form input[type="submit"],
.mob-panel #searchwp-form-1 input[type="submit"],
.mob-panel .searchwp-form button,
.mob-panel .searchwp-form .swp-input--button,
.mob-panel .searchwp-form svg {
  color: #000 !important;
  fill: #000;
  border-color: #000;
}

/* SearchWP default icon is #CFCFCF SVG on .swp-input--search — make it black */
.s-header .searchwp-form input.swp-input--search,
.mob-panel .searchwp-form input.swp-input--search {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' fill='none'%3E%3Cpath fill='%23000000' d='M6.068 12.136c1.31 0 2.533-.426 3.527-1.136l3.74 3.74c.174.173.402.26.64.26.512 0 .883-.395.883-.9a.87.87 0 0 0-.253-.63L10.89 9.744a6.04 6.04 0 0 0 1.247-3.677C12.136 2.73 9.406 0 6.068 0 2.722 0 0 2.73 0 6.068s2.722 6.068 6.068 6.068m0-1.31c-2.612 0-4.758-2.154-4.758-4.758S3.456 1.31 6.068 1.31c2.604 0 4.758 2.154 4.758 4.758s-2.154 4.758-4.758 4.758'/%3E%3C/svg%3E") !important;
}

/* Kill horizontal scroll on tablet/mobile (header overflow) */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

@media (max-width: 1250px) {
  .s-header,
  .header-panel,
  .header,
  .container-wide {
    max-width: 100vw;
  }

  .header {
    gap: 12px;
    padding-right: 56px;
    box-sizing: border-box;
  }

  .header__left {
    min-width: 0;
    flex: 1 1 auto;
  }

  .header__logo img,
  .header__logo__karaway {
    max-width: min(160px, 42vw);
    height: auto;
  }

  .header__right {
    flex-shrink: 0;
  }

  .header__right .socs {
    flex-wrap: wrap;
    max-width: 42vw;
  }

  .phone-block__val {
    font-size: clamp(12px, 2.4vw, 15px);
    white-space: nowrap;
  }

  /* Page title under logo / head collision */
  .s-page-head {
    padding-top: 1.25rem;
    clear: both;
  }

  .s-page-head h1,
  .s-page-head .h1 {
    position: relative;
    z-index: 1;
    max-width: 100%;
    word-break: break-word;
  }

  .breadcrumbs {
    overflow: hidden;
  }
}

@media (max-width: 768px) {
  .header {
    padding-right: 48px;
    gap: 8px;
  }

  .header__logo img,
  .header__logo__karaway {
    max-width: min(130px, 38vw);
  }

  .header__right .socs .soc:nth-child(n + 3) {
    display: none;
  }
}

/* 3. Promo (Акция) image crop on laptop */
.intro-trigger-banner {
  overflow: visible;
}

.intro-trigger-banner__img {
  max-height: none !important;
  width: auto !important;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: bottom center;
}

@media (min-width: 1025px) and (max-width: 1440px) {
  .intro-triggers {
    align-items: stretch;
  }

  .intro-trigger-banner {
    overflow: hidden;
    min-height: 280px;
  }

  .intro-trigger-banner__img {
    max-height: 100% !important;
    object-fit: contain;
  }
}

/* 4. Second feed / photos block overlap */
.s-home-photos,
.home-photos-slider,
.s-seo #sb_instagram,
.s-seo .sbi {
  position: relative;
  z-index: 1;
  isolation: isolate;
  overflow: hidden;
}

.home-photos__dec-1,
.reviews-slider-block__dec-1,
.reviews-slider-block__dec-2,
.reviews-slider-block__dec-3 {
  pointer-events: none;
  max-width: 40vw;
}

.s-seo {
  position: relative;
  z-index: 2;
  overflow: hidden;
}

/* Blocks protruding past main column */
.main-container,
.s-def .container,
.s-def .container-wide,
.s-def .container-middle {
  max-width: 100%;
}

@media (max-width: 1250px) {
  .anim-preview,
  .prog-incs-grid,
  .tariffs,
  .places__list {
    overflow: hidden;
  }
}

/* 6. Bitrix online chat: lower + safer z-index */
#b24-widget-button-wrapper,
.b24-widget-button-wrapper,
.bx-livechat-wrapper,
div[class*="b24-widget-button"] {
  z-index: 35 !important;
}

#b24-widget-button-wrapper,
.b24-widget-button-wrapper {
  bottom: 18px !important;
  right: 18px !important;
}

@media (max-width: 768px) {
  #b24-widget-button-wrapper,
  .b24-widget-button-wrapper {
    bottom: 72px !important;
    right: 12px !important;
    z-index: 30 !important;
  }
}

/* Category / program scroll: reserve space, reduce jump */
.s-page-head,
.breadcrumbs,
.filter-block,
#filter {
  scroll-margin-top: 100px;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Keep tablet cards from overflowing, but keep heads visible */
@media (max-width: 1024px) {
  .anim-preview__img,
  .intro-trigger-banner__img,
  .home-photos__item__img,
  .prog-inc__img {
    object-fit: contain;
    object-position: top center;
    width: 100%;
    height: auto;
    max-height: none;
  }

  .anim-preview__stage {
    overflow: visible;
  }
}

/*
 * Homepage alignment: action banner cards and August promotion.
 * The campaign artwork is a square source image, so constrain it by the
 * banner/section bounds instead of allowing its intrinsic size to dictate
 * the layout.
 */
.s-intro-triggers {
  position: relative;
}

.intro-triggers {
  align-items: stretch;
}

.intro-trigger-banner {
  box-sizing: border-box;
  min-width: 0;
  overflow: hidden;
}

.intro-trigger-banner__title {
  max-width: 54%;
  overflow-wrap: anywhere;
}

.intro-trigger-banner__img {
  width: auto !important;
  height: auto;
  max-width: 46%;
  max-height: calc(100% - 12px) !important;
  object-fit: contain;
  object-position: right bottom;
}

/* The longer August copy needs a little more room than the standard card. */
.intro-trigger-banner[href="/aktsiya/"] .intro-trigger-banner__title {
  width: 52%;
  max-width: 52%;
}

/* Keep the hero CTA row centred and consistently sized when more actions appear. */
.s-intro--home .intro__actions {
  flex-wrap: wrap;
  align-items: stretch;
}

.s-intro--home .intro__actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/*
 * August promotion: reserve a dedicated text column and anchor the artwork
 * inside the purple section, preventing it from covering the CTA or leaking
 * into the following section.
 */
.s-home-quests {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.s-home-quests .container {
  position: relative;
  z-index: 1;
}

.s-home-quests .home-quests {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: clamp(300px, 27vw, 460px);
  max-width: min(48%, 560px);
}

.s-home-quests .home-quests__title,
.s-home-quests .home-quests__descr {
  max-width: 100%;
}

.s-home-quests .home-quests__descr {
  margin-bottom: 28px;
}

.s-home-quests .home-quests__img {
  left: auto;
  right: max(0px, calc((100vw - 1440px) / 2));
  bottom: 0;
  width: min(48vw, 680px);
  max-width: none;
  max-height: 100%;
  object-fit: contain;
  object-position: right bottom;
}

@media (max-width: 1024px) {
  .intro-triggers {
    align-items: stretch;
  }

  .intro-trigger-banner {
    display: block;
    height: 112px;
  }

  .intro-trigger-banner__title,
  .intro-trigger-banner[href="/aktsiya/"] .intro-trigger-banner__title {
    width: 54%;
    max-width: 54%;
  }

  .intro-trigger-banner__img {
    width: auto !important;
    height: auto;
    max-width: 44%;
    max-height: calc(100% - 8px) !important;
    object-fit: contain;
  }

  .s-home-quests .home-quests {
    min-height: clamp(280px, 40vw, 380px);
    max-width: 50%;
  }

  .s-home-quests .home-quests__img {
    right: -3vw;
    width: min(54vw, 560px);
  }
}

@media (max-width: 680px) {
  .s-intro--home .intro__actions {
    justify-content: center;
  }

  .s-intro--home .intro__actions .btn {
    width: min(100%, 320px);
  }

  .s-home-quests .home-quests {
    align-items: center;
    min-height: 0;
    max-width: none;
    text-align: center;
  }

  .s-home-quests .home-quests__title,
  .s-home-quests .home-quests__descr {
    margin-left: auto;
    margin-right: auto;
  }

  .s-home-quests .home-quests__img {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(100%, 520px);
    max-width: 100%;
    max-height: none;
    margin: 20px auto 0;
  }
}

@media (max-width: 480px) {
  .intro-trigger-banner {
    width: 100%;
    min-height: 112px;
    height: auto;
  }

  .intro-trigger-banner__title,
  .intro-trigger-banner[href="/aktsiya/"] .intro-trigger-banner__title {
    width: 55%;
    max-width: 55%;
  }
}

/*
 * Hero video: keep the TOP of the frame visible (cover was cropping heads).
 * Also applied below 1251px where the header still overlays.
 */
@media (min-width: 1025px) {
  .s-intro--home .intro__img-wrap {
    overflow: hidden;
  }

  .s-intro--home #bx_651765591_5 {
    top: 0 !important;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    min-width: 0 !important;
    min-height: 0 !important;
  }

  .s-intro--home video.main-bg {
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    object-fit: cover !important;
    object-position: top center !important;
  }
}

/*
 * Program GRID + slider cards: heads were clipped because
 * .anim-preview { overflow:hidden } + .anim-preview__stage { margin-top: negative }.
 * Pull the stage back into the card, fit the whole figure, pin to the top.
 */
.animators-grid .anim-preview,
.s-animators .anim-preview,
.s-animators-slider .anim-preview,
.animators-slider .anim-preview,
.anim-preview {
  overflow: hidden;
  padding-top: 12px;
}

.animators-grid .anim-preview__stage,
.s-animators .anim-preview__stage,
.s-animators-slider .anim-preview__stage,
.animators-slider .anim-preview__stage,
.anim-preview__stage {
  overflow: visible !important;
  margin-top: 0 !important;
}

.animators-grid .anim-preview__img,
.s-animators .anim-preview__img,
.s-animators-slider .anim-preview__img,
.animators-slider .anim-preview__img,
.anim-preview__img,
.anim-preview picture img {
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: auto !important;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: top center !important;
  transform: none !important;
}

@media (hover: hover) {
  .anim-preview:hover .anim-preview__img,
  .animators-grid .anim-preview:hover .anim-preview__img,
  .s-animators .anim-preview:hover .anim-preview__img {
    transform: none !important;
  }
}

.intro-trigger-banner__img,
.intro-trigger-banner[href="/kvesty/"] .intro-trigger-banner__img,
.intro-trigger-banner[href="/aktsiya/"] .intro-trigger-banner__img {
  object-fit: contain !important;
  object-position: top center !important;
}

.show-preview__head {
  overflow: hidden;
}

.show-preview__img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: top center !important;
}

.add-preview__img {
  object-fit: contain !important;
  object-position: top center !important;
}

.s-home-quests .home-quests__img {
  object-fit: contain !important;
  object-position: top center !important;
}

.home-photos__item {
  overflow: hidden;
}

.home-photos__item__img,
.home-photos__item video {
  object-fit: cover !important;
  object-position: top center !important;
}

/*
 * Program / service / master-class: stacked classic sections only.
 * Skip .e-con (Космос 50/50 containers). Skip 33/66, col-50 and tabs.
 * Root 2-col grid ONLY when there are 2+ top-sections — a single section
 * (Шоколад из Pop IT) must not be nested: 38% track + inner 38% = postage stamp.
 */
@media (min-width: 768px) {
  /* Image/gallery in first of TWO+ sections → photo left */
  .s-anim-about:not(:has(.e-con)):not(:has(.elementor-col-33)):not(:has(.elementor-col-50)):not(:has(.elementor-widget-tabs)):has(> .elementor > .elementor-top-section:nth-child(2)):has(> .elementor > .elementor-top-section:first-child :is(.elementor-widget-image, .elementor-widget-image-gallery, .elementor-widget-image-carousel)) > .elementor {
    display: grid;
    grid-template-columns: minmax(300px, 42%) minmax(280px, 1fr);
    gap: 24px 40px;
    align-items: start;
    max-width: 1140px;
    margin: 0 auto;
    padding: 12px 16px 40px;
  }

  .s-anim-about:not(:has(.e-con)):not(:has(.elementor-col-33)):not(:has(.elementor-col-50)):not(:has(.elementor-widget-tabs)):has(> .elementor > .elementor-top-section:nth-child(2)):has(> .elementor > .elementor-top-section:first-child :is(.elementor-widget-image, .elementor-widget-image-gallery, .elementor-widget-image-carousel)) > .elementor > .elementor-top-section:first-child {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .s-anim-about:not(:has(.e-con)):not(:has(.elementor-col-33)):not(:has(.elementor-col-50)):not(:has(.elementor-widget-tabs)):has(> .elementor > .elementor-top-section:nth-child(2)):has(> .elementor > .elementor-top-section:first-child :is(.elementor-widget-image, .elementor-widget-image-gallery, .elementor-widget-image-carousel)) > .elementor > .elementor-top-section:nth-child(n + 2) {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  /* Text first, gallery second → swap */
  .s-anim-about:not(:has(.e-con)):not(:has(.elementor-col-33)):not(:has(.elementor-col-50)):not(:has(.elementor-widget-tabs)):has(> .elementor > .elementor-top-section:first-child .elementor-widget-text-editor):has(> .elementor > .elementor-top-section:nth-child(2) :is(.elementor-widget-image, .elementor-widget-image-gallery, .elementor-widget-image-carousel)) > .elementor {
    display: grid;
    grid-template-columns: minmax(300px, 42%) minmax(280px, 1fr);
    gap: 24px 40px;
    align-items: start;
    max-width: 1140px;
    margin: 0 auto;
    padding: 12px 16px 40px;
  }

  .s-anim-about:not(:has(.e-con)):not(:has(.elementor-col-33)):not(:has(.elementor-col-50)):not(:has(.elementor-widget-tabs)):has(> .elementor > .elementor-top-section:first-child .elementor-widget-text-editor):has(> .elementor > .elementor-top-section:nth-child(2) :is(.elementor-widget-image, .elementor-widget-image-gallery, .elementor-widget-image-carousel)) > .elementor > .elementor-top-section:first-child {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  .s-anim-about:not(:has(.e-con)):not(:has(.elementor-col-33)):not(:has(.elementor-col-50)):not(:has(.elementor-widget-tabs)):has(> .elementor > .elementor-top-section:first-child .elementor-widget-text-editor):has(> .elementor > .elementor-top-section:nth-child(2) :is(.elementor-widget-image, .elementor-widget-image-gallery, .elementor-widget-image-carousel)) > .elementor > .elementor-top-section:nth-child(2) {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .s-anim-about:not(:has(.e-con)):not(:has(.elementor-col-33)):not(:has(.elementor-col-50)):not(:has(.elementor-widget-tabs)):has(> .elementor > .elementor-top-section:first-child .elementor-widget-text-editor):has(> .elementor > .elementor-top-section:nth-child(2) :is(.elementor-widget-image, .elementor-widget-image-gallery, .elementor-widget-image-carousel)) > .elementor > .elementor-top-section:nth-child(n + 3) {
    grid-column: 1 / -1;
  }

  /* One section: gallery + text in the same wrap — full content width, not nested in 38% */
  .s-anim-about:not(:has(.e-con)):not(:has(.elementor-col-50)):not(:has(.elementor-widget-tabs)) > .elementor > .elementor-top-section:only-child .elementor-element-populated.elementor-widget-wrap {
    display: grid;
    grid-template-columns: minmax(300px, 42%) minmax(280px, 1fr);
    gap: 24px 40px;
    align-items: start;
    max-width: 1140px;
    margin: 0 auto;
  }

  .s-anim-about:not(:has(.e-con)):not(:has(.elementor-col-33)):not(:has(.elementor-col-50)):not(:has(.elementor-widget-tabs)) .elementor-section-full_width > .elementor-container {
    max-width: 100%;
    padding: 0;
  }

  .s-anim-about:has(.elementor-col-50):not(:has(.elementor-widget-tabs)) .elementor-col-50 .elementor-widget-text-editor {
    background: #fffdf5;
    border-radius: 24px;
    padding: 8px 16px;
    color: #4f453d;
  }
}

/* Only leftover stacked classic sections — not flex containers / Super Mario / 50/50 */
.s-anim-about:not(:has(.e-con)):not(:has(.elementor-col-33)):not(:has(.elementor-col-50)):not(:has(.elementor-widget-tabs)) .elementor-widget-image img,
.s-anim-about:not(:has(.e-con)):not(:has(.elementor-col-33)):not(:has(.elementor-col-50)):not(:has(.elementor-widget-tabs)) .elementor-image-carousel img,
.s-anim-about:not(:has(.e-con)):not(:has(.elementor-col-33)):not(:has(.elementor-col-50)):not(:has(.elementor-widget-tabs)) .swiper-slide-image,
.s-anim-about:not(:has(.e-con)):not(:has(.elementor-col-33)):not(:has(.elementor-col-50)):not(:has(.elementor-widget-tabs)) .gallery-icon img {
  object-fit: contain;
  object-position: top center;
}

/* Full-screen logo preloader */
.kw-preloader {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff6d6;
  transition: opacity 0.38s ease, visibility 0.38s ease;
}

.kw-preloader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.kw-preloader__inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.kw-preloader__logo {
  display: block;
  width: min(240px, 58vw);
  height: auto;
  animation: kw-preloader-pulse 1.35s ease-in-out infinite;
  transform-origin: center;
}

@keyframes kw-preloader-pulse {
  0%,
  100% {
    transform: scale(0.96);
    opacity: 0.78;
  }
  50% {
    transform: scale(1.04);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kw-preloader__logo {
    animation: none;
    opacity: 1;
  }

  .kw-preloader {
    transition-duration: 0.01ms;
  }
}

/*
 * News / blog article: readable column, no program chrome.
 */
.s-article {
  background: #fffdf5;
  padding: 8px 0 72px;
}

.s-article__head {
  padding: 12px 0 8px;
}

.s-article__head h1 {
  color: #4f453d;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.s-article__meta {
  margin: 14px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: #7c7570;
  font-size: 14px;
  font-weight: 500;
}

.s-article__cat {
  padding: 2px 10px;
  border-radius: 999px;
  background: #fff6d6;
  color: #4f453d;
}

.s-article__body,
.s-article__body.container {
  margin-top: 28px;
  color: #4f453d;
  font-size: 18px;
  line-height: 1.65;
}

.s-article__body > *:first-child {
  margin-top: 0;
}

.s-article__body p,
.s-article__body li {
  margin: 0 0 1em;
}

.s-article__body h2,
.s-article__body h3 {
  margin: 1.6em 0 0.55em;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.s-article__body img,
.s-article__body .aligncenter,
.s-article__body .wp-image,
.s-article__body figure:not(.gallery-item) {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 24px auto;
  border-radius: var(--br-40, 24px);
}

.s-article__body ul,
.s-article__body ol {
  padding-left: 1.2em;
}

.s-article__body a {
  color: #4f453d;
  text-decoration-color: #ffcf01;
  text-underline-offset: 3px;
}

/* Event / news galleries: site cards instead of WP 10-col dump */
.s-article .elementor,
.s-article .elementor-section,
.s-article .elementor-container,
.s-article .elementor-column,
.s-article .elementor-widget-wrap,
.s-article .elementor-image-gallery {
  max-width: 100%;
  width: 100%;
}

.s-article .elementor-section-boxed > .elementor-container {
  max-width: 100% !important;
  padding: 0 !important;
}

.s-article .gallery,
.s-article .elementor-image-gallery .gallery,
.s-article [class*="gallery-columns-"] {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap, 14px);
  width: 100% !important;
  margin: 8px 0 0 !important;
}

.s-article .gallery-item,
.s-article .gallery .gallery-item,
.s-article [class*="gallery-columns-"] .gallery-item {
  float: none !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left;
}

.s-article .gallery-icon,
.s-article .gallery-icon a {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0 !important;
  border-radius: var(--br-40, 24px);
  overflow: hidden;
  background: var(--panels, #efe9e9);
  box-shadow: 0 10px 30px rgba(79, 69, 61, 0.06);
}

.s-article .gallery-icon a {
  aspect-ratio: 1;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.s-article .gallery-icon img,
.s-article .gallery-icon a img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
  object-fit: cover !important;
  object-position: top center !important;
  transition: transform 0.3s ease;
}

@media (hover: hover) {
  .s-article .gallery-icon a:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(79, 69, 61, 0.12);
  }

  .s-article .gallery-icon a:hover img {
    transform: scale(1.04);
  }
}

.s-article .gallery-caption {
  display: none;
}

@media (max-width: 1024px) {
  .s-article .gallery,
  .s-article .elementor-image-gallery .gallery,
  .s-article [class*="gallery-columns-"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .s-article .gallery,
  .s-article .elementor-image-gallery .gallery,
  .s-article [class*="gallery-columns-"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .s-article .gallery-icon a {
    border-radius: 16px;
  }
}

.s-article-related {
  padding: 0 0 80px;
  background: #fffdf5;
}

.s-article-related .h2 {
  margin: 0 0 20px;
}

.s-article-related__list {
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.s-article-related__card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border-radius: 20px;
  color: #4f453d;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(79, 69, 61, 0.06);
}

.s-article-related__card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  object-position: top center;
  border-radius: 14px;
}

.s-article-related__card span {
  font-weight: 700;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .s-article-related__list {
    grid-template-columns: 1fr;
  }
}

body.kw-article .s-animators-incs,
body.kw-article .s-home-photos,
body.kw-article .s-tariffs,
body.kw-article .s-animators-slider {
  display: none !important;
}

/*
 * Program pages: keep Elementor column/widget CSS intact.
 * Do not hide .elementor-element / widget-wrap — empty wrappers carry kit spacing.
 */
body.kw-program .s-anim-about {
  --ab-color: #fffdf5;
}

body.kw-program .s-page-head {
  padding-bottom: 8px;
}

/* Complianz GDPR: hide floating "Manage consent", use footer link instead */
#cmplz-manage-consent {
  display: none !important;
  visibility: hidden !important;
}

.footer__copy .kw-cookie-settings {
  cursor: pointer;
}

/*
 * Category «Пакетные предложения» (malysham / detyam / podrostkam).
 * Images 40% smaller than a full grid cell; 2 columns on mobile (6+6).
 */
.page-template-page-price .entry-content:empty {
  display: none;
}

.price-format-table {
  margin: 8px 0 32px;
}

.price-format-table__title {
  margin: 0 0 16px;
  color: #4f453d;
  font-size: 1.45rem;
  font-weight: 700;
  text-align: left;
}

.price-format-table table {
  display: table !important;
  width: 100% !important;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  background: #fffdf5;
  color: #4f453d;
  border-radius: 24px;
  box-shadow: 0 12px 32px rgba(79, 69, 61, 0.1);
  overflow: visible;
  font-family: "Google Sans", Inter, sans-serif;
}

.price-format-table thead {
  display: table-header-group !important;
}

.price-format-table tbody {
  display: table-row-group !important;
}

.price-format-table tr {
  display: table-row !important;
}

.price-format-table th,
.price-format-table td {
  display: table-cell !important;
  vertical-align: middle;
  text-align: left;
  padding: 16px 18px;
  color: #4f453d !important;
  border: 0;
  border-bottom: 1px solid rgba(79, 69, 61, 0.08);
}

.price-format-table thead th {
  background: #ffcf01;
  font-weight: 700;
  padding: 14px 18px;
}

.price-format-table tbody td {
  background: #fffdf5;
}

.price-format-table tbody tr:nth-child(even) td {
  background: #fff8e3;
}

.price-format-table td:first-child {
  width: 28%;
  font-weight: 700;
}

.price-format-table td:nth-child(2) {
  width: 22%;
  font-weight: 700;
  color: #ff8348 !important;
  white-space: nowrap;
}

.price-format-table td:last-child {
  width: 50%;
  font-weight: 400;
}

/* JS clone (if any) must never show — guests get both copies otherwise */
.price-format-table .kw-price-cards,
.page-id-28938 .price-format-table .kw-price-cards {
  display: none !important;
  height: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
}

.page-id-28938 .entry-content table {
  display: none !important;
}

@media (max-width: 767px) {
  .page-id-28938 .price-format-table table,
  .page-id-28938 .price-format-table thead,
  .page-id-28938 .price-format-table tbody,
  .page-id-28938 .price-format-table tr,
  .page-id-28938 .price-format-table th,
  .page-id-28938 .price-format-table td {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .page-id-28938 .price-format-table thead {
    display: none !important;
  }

  .page-id-28938 .price-format-table table {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }

  .page-id-28938 .price-format-table tbody tr {
    margin: 0 0 14px;
    padding: 16px;
    background: #fffdf5;
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(79, 69, 61, 0.1);
  }

  .page-id-28938 .price-format-table tbody td {
    background: transparent !important;
    border: 0;
    padding: 6px 0;
    white-space: normal;
  }

  .page-id-28938 .price-format-table tbody td:first-child {
    font-weight: 700;
    font-size: 1.15rem;
    padding-bottom: 10px;
  }

  .page-id-28938 .price-format-table tbody td:nth-child(2),
  .page-id-28938 .price-format-table tbody td:last-child {
    background: #fff8e3 !important;
    border-radius: 12px;
    padding: 10px 8px;
    margin: 6px 0 0;
  }

  .page-id-28938 .price-format-table tbody td:nth-child(2)::before,
  .page-id-28938 .price-format-table tbody td:last-child::before {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #4f453d;
    font-weight: 600;
    margin-bottom: 4px;
  }

  .page-id-28938 .price-format-table tbody td:nth-child(2)::before {
    content: "Стоимость";
  }

  .page-id-28938 .price-format-table tbody td:last-child::before {
    content: "Комментарий";
  }
}

.page-id-28938 .best-prices__title {
  text-align: center;
  margin: 8px 0 20px;
  color: #4f453d;
}

/*
 * 50/50 program cards: do not rewrite Elementor column widths / flex.
 * Kit + post CSS own the grid; we only nudge overflow images.
 */
body.kw-program .s-anim-about:has(.elementor-col-50):not(:has(.elementor-widget-tabs)) .elementor-col-50 .swiper-slide-image,
body.kw-program .s-anim-about:has(.elementor-col-50):not(:has(.elementor-widget-tabs)) .elementor-col-50 .elementor-widget-image img {
  object-fit: contain;
  object-position: top center;
}

/*
 * Super Mario / 33+66+tabs: leave Elementor kit ( #edf6f9 tabs, 39.6/60 columns ).
 * Only keep carousel photos from cropping.
 */
body.kw-program .s-anim-about:has(.elementor-widget-tabs) .elementor-col-33 .swiper-slide-image,
body.kw-program .s-anim-about:has(.elementor-widget-tabs) .elementor-col-33 .elementor-widget-image img {
  object-fit: contain;
  object-position: top center;
}

/*
 * «Доп услуги»: markup is col-md-12 > col-md-6 + col-md-6 without a nested row,
 * so Bootstrap stacks them. Unwrap only these Bootstrap cols — never .elementor-column.
 */
body.kw-program .tab-service {
  display: flex !important;
  flex-wrap: wrap;
  width: 100%;
}

body.kw-program .tab-service > .col-md-12 {
  display: contents;
}

body.kw-program .tab-service .col-md-6 {
  flex: 0 0 50%;
  max-width: 50%;
  width: 50%;
  box-sizing: border-box;
  padding: 4px 6px;
}

body.kw-program .tab-service .col-md-6 a {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 380px) {
  body.kw-program .tab-service .col-md-6 {
    flex-basis: 50%;
    max-width: 50%;
    padding: 3px 4px;
  }

  body.kw-program .tab-service .col-md-6 a {
    font-size: 13px;
    padding: 8px 6px;
  }
}

/*
 * Shared program card for EVERY slug (media-igry, programmy-dlya-devochek,
 * malysham, rostovye-kukly…). Do not set column widths — Elementor post CSS
 * already has 40/60 on Kapibara etc. Do not hide widget-wrap.
 */
.s-anim-about .tab-service {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
}

.s-anim-about .tab-service > .col-md-12 {
  display: contents;
}

.s-anim-about .tab-service .col-md-6 {
  flex: 0 0 50%;
  max-width: 50%;
  width: 50%;
  box-sizing: border-box;
  padding: 4px 6px;
}

.s-anim-about:not(:has(.elementor-widget-tabs)) > .elementor > .elementor-top-section:first-child .elementor-widget-text-editor {
  background: #fffdf5;
  border-radius: 24px;
}

.s-anim-about:not(:has(.elementor-widget-tabs)) .elementor-widget-image-carousel img,
.s-anim-about:not(:has(.elementor-widget-tabs)) .swiper-slide-image,
.s-anim-about:not(:has(.elementor-widget-tabs)) .elementor-widget-image img {
  object-fit: contain;
  object-position: top center;
}

/*
 * Master-class Elementor containers (e-con): keep native row + 50/50 widths.
 * Do not grid the root .elementor. Cream card on the text child only.
 */
.s-anim-about:has(.e-con):not(:has(.elementor-widget-tabs)) > .elementor > .e-con.e-parent:first-child .elementor-widget-text-editor {
  background: #fffdf5;
  border-radius: 24px;
  color: #4f453d;
}

.s-anim-about:has(.e-con):not(:has(.elementor-widget-tabs)) .gallery-icon img,
.s-anim-about:has(.e-con):not(:has(.elementor-widget-tabs)) .elementor-widget-image img {
  object-fit: contain;
  object-position: top center;
}

/*
 * Hero media in program/master-class cards (no tabs): fill the left column.
 * WP galleries often use thumbnail + gallery-columns-5 — force 1-up, 100% width.
 * Price pills: no absolute overlay (broke «от 150 руб» on Шоколад).
 */
.s-anim-about:not(:has(.elementor-widget-tabs)) .elementor-widget-text-editor {
  color: #4f453d;
}

@media (min-width: 768px) {
  .s-anim-about:not(:has(.elementor-widget-tabs)) .elementor-image-gallery .gallery,
  .s-anim-about:not(:has(.elementor-widget-tabs)) .elementor-image-gallery .gallery.gallery-columns-1,
  .s-anim-about:not(:has(.elementor-widget-tabs)) .elementor-image-gallery .gallery[class*="gallery-columns-"] {
    display: flex;
    flex-direction: column;
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 0;
    gap: 12px;
  }

  .s-anim-about:not(:has(.elementor-widget-tabs)) .elementor-image-gallery .gallery-item,
  .s-anim-about:not(:has(.elementor-widget-tabs)) .elementor-image-gallery .gallery .gallery-item {
    float: none;
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
  }

  .s-anim-about:not(:has(.elementor-widget-tabs)) .elementor-image-gallery .gallery-icon,
  .s-anim-about:not(:has(.elementor-widget-tabs)) .elementor-image-gallery .gallery-icon a {
    display: block;
    width: 100%;
  }

  .s-anim-about:not(:has(.elementor-widget-tabs)) .elementor-image-gallery .gallery-icon img,
  .s-anim-about:not(:has(.elementor-widget-tabs)) .elementor-widget-image img,
  .s-anim-about:not(:has(.elementor-widget-tabs)) .elementor-image-carousel img,
  .s-anim-about:not(:has(.elementor-widget-tabs)) .swiper-slide-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: min(72vh, 680px);
    object-fit: contain;
    object-position: top center;
    margin: 0 auto;
  }

  .s-anim-about:not(:has(.elementor-widget-tabs)) .block-price p {
    height: auto;
    min-height: 50px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
  }

  .s-anim-about:not(:has(.elementor-widget-tabs)) .price-right {
    position: static;
    float: none;
    margin: 8px 4px 8px auto;
    right: auto;
  }
}

/*
 * Universal program card: 1 large photo LEFT + text/tabs RIGHT +
 * full-width 6-up gallery BELOW. Built by audit-fixes.js (data-kw-card).
 * Does not run on news, homepage, Elementor editor.
 */
html:not(.elementor-html) body.kw-program:not(.elementor-editor-active):not(.elementor-editor-preview) .s-anim-about[data-kw-card] {
  --ab-color: #fffdf5;
}

html:not(.elementor-html) body.kw-program:not(.elementor-editor-active):not(.elementor-editor-preview) .s-anim-about[data-kw-card] .kw-program-layout,
html:not(.elementor-html) body.kw-program:not(.elementor-editor-active):not(.elementor-editor-preview) .s-anim-about[data-kw-card] .kw-program-gallery {
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
}

html:not(.elementor-html) body.kw-program:not(.elementor-editor-active):not(.elementor-editor-preview) .s-anim-about[data-kw-card] .kw-program-layout {
  display: grid;
  grid-template-columns: minmax(320px, 42%) minmax(300px, 1fr);
  gap: 28px 40px;
  align-items: start;
  padding-top: 8px;
  padding-bottom: 8px;
}

html:not(.elementor-html) body.kw-program:not(.elementor-editor-active):not(.elementor-editor-preview) .s-anim-about[data-kw-card] .kw-program-hero {
  min-width: 0;
  width: 100%;
}

html:not(.elementor-html) body.kw-program:not(.elementor-editor-active):not(.elementor-editor-preview) .s-anim-about[data-kw-card] .kw-program-hero img {
  min-height: 220px;
}

html:not(.elementor-html) body.kw-program:not(.elementor-editor-active):not(.elementor-editor-preview) .s-anim-about[data-kw-card] .kw-program-hero__link {
  display: block;
  width: 100%;
}

html:not(.elementor-html) body.kw-program:not(.elementor-editor-active):not(.elementor-editor-preview) .s-anim-about[data-kw-card] .kw-program-hero img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  max-height: min(72vh, 720px);
  object-fit: contain;
  object-position: top center;
  border-radius: 24px;
  background: #fff;
}

html:not(.elementor-html) body.kw-program:not(.elementor-editor-active):not(.elementor-editor-preview) .s-anim-about[data-kw-card] .kw-program-text {
  min-width: 0;
  background: #fffdf5;
  border-radius: 24px;
  padding: 12px 20px 20px;
  color: #4f453d;
}

html:not(.elementor-html) body.kw-program:not(.elementor-editor-active):not(.elementor-editor-preview) .s-anim-about[data-kw-card] .kw-program-text > .elementor,
html:not(.elementor-html) body.kw-program:not(.elementor-editor-active):not(.elementor-editor-preview) .s-anim-about[data-kw-card] .kw-program-text .elementor-section,
html:not(.elementor-html) body.kw-program:not(.elementor-editor-active):not(.elementor-editor-preview) .s-anim-about[data-kw-card] .kw-program-text .elementor-container,
html:not(.elementor-html) body.kw-program:not(.elementor-editor-active):not(.elementor-editor-preview) .s-anim-about[data-kw-card] .kw-program-text .elementor-element-populated.elementor-widget-wrap {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  grid-template-columns: none !important;
  margin: 0;
  padding: 0;
}

html:not(.elementor-html) body.kw-program:not(.elementor-editor-active):not(.elementor-editor-preview) .s-anim-about[data-kw-card] .kw-program-text .elementor-column:not(.kw-slot-empty) {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
}

html:not(.elementor-html) body.kw-program:not(.elementor-editor-active):not(.elementor-editor-preview) .s-anim-about[data-kw-card] .kw-program-text .e-con:not(.kw-slot-empty),
html:not(.elementor-html) body.kw-program:not(.elementor-editor-active):not(.elementor-editor-preview) .s-anim-about[data-kw-card] .kw-program-text .e-con-inner {
  width: 100% !important;
  max-width: 100% !important;
  flex-direction: column;
}

html:not(.elementor-html) body.kw-program:not(.elementor-editor-active):not(.elementor-editor-preview) .s-anim-about[data-kw-card] .kw-media-extracted,
html:not(.elementor-html) body.kw-program:not(.elementor-editor-active):not(.elementor-editor-preview) .s-anim-about[data-kw-card] .kw-slot-empty {
  display: none !important;
}

html:not(.elementor-html) body.kw-program:not(.elementor-editor-active):not(.elementor-editor-preview) .s-anim-about[data-kw-card] .price-right {
  position: static !important;
  float: none !important;
  right: auto !important;
  margin: 8px 0 12px auto;
}

html:not(.elementor-html) body.kw-program:not(.elementor-editor-active):not(.elementor-editor-preview) .s-anim-about[data-kw-card] .block-price p {
  height: auto;
  min-height: 50px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

html:not(.elementor-html) body.kw-program:not(.elementor-editor-active):not(.elementor-editor-preview) .s-anim-about[data-kw-card] .kw-program-gallery {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
  margin-bottom: 12px;
  padding-bottom: 12px;
}

html:not(.elementor-html) body.kw-program:not(.elementor-editor-active):not(.elementor-editor-preview) .s-anim-about[data-kw-card] .kw-program-gallery__item {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(79, 69, 61, 0.08);
}

html:not(.elementor-html) body.kw-program:not(.elementor-editor-active):not(.elementor-editor-preview) .s-anim-about[data-kw-card] .kw-program-gallery__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 1024px) {
  html:not(.elementor-html) body.kw-program:not(.elementor-editor-active):not(.elementor-editor-preview) .s-anim-about[data-kw-card] .kw-program-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  html:not(.elementor-html) body.kw-program:not(.elementor-editor-active):not(.elementor-editor-preview) .s-anim-about[data-kw-card] .kw-program-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  html:not(.elementor-html) body.kw-program:not(.elementor-editor-active):not(.elementor-editor-preview) .s-anim-about[data-kw-card] .kw-program-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

/*
 * Price tables (/stoimost/, выпускные, Новый год).
 * Wrapper scrolls; table itself never overflow:hidden / sticky.
 * Breakpoints: 320, 375, 768, 1024, 1280, 1440.
 */
.s-price,
.s-price .price-cats,
.s-price .price-cat,
.price-vypusk {
  overflow: visible;
}

.kw-price-table-wrap {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 12px 0 28px;
  border-radius: 24px;
  background: #fffdf5;
  box-shadow: 0 12px 32px rgba(79, 69, 61, 0.1);
}

.kw-price-table-wrap--scroll {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.s-price table,
.price-cat table,
.price-vypusk table,
.catdescr table,
.s-anim-about table,
.elementor-widget-text-editor table,
.elementor-widget-html table,
.wp-block-table table,
table.new-tables {
  display: table !important;
  width: 100% !important;
  max-width: none;
  min-width: 0;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
  margin: 12px 0 28px;
  background: #fffdf5;
  color: #4f453d;
  border-radius: 24px;
  overflow: visible;
  box-shadow: 0 12px 32px rgba(79, 69, 61, 0.1);
  font-family: "Google Sans", Inter, sans-serif;
}

.kw-price-table-wrap table,
.kw-price-table-wrap table.new-tables {
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  width: 100% !important;
}

.s-price table thead,
.price-cat table thead,
.price-vypusk table thead,
.s-anim-about table thead,
.elementor-widget-text-editor table thead,
.wp-block-table table thead,
table.new-tables thead {
  display: table-header-group !important;
}

.s-price table tbody,
.price-cat table tbody,
.price-vypusk table tbody,
.s-anim-about table tbody,
.elementor-widget-text-editor table tbody,
.wp-block-table table tbody,
table.new-tables tbody {
  display: table-row-group !important;
}

.s-price table tr,
.price-cat table tr,
.price-vypusk table tr,
.s-anim-about table tr,
.elementor-widget-text-editor table tr,
.wp-block-table table tr,
table.new-tables tr {
  display: table-row !important;
  background: transparent;
  margin: 0;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

.s-price table th,
.s-price table td,
.price-cat table th,
.price-cat table td,
.price-vypusk table th,
.price-vypusk table td,
.s-anim-about table th,
.s-anim-about table td,
.elementor-widget-text-editor table th,
.elementor-widget-text-editor table td,
.wp-block-table table th,
.wp-block-table table td,
table.new-tables th,
table.new-tables td {
  display: table-cell !important;
  width: auto !important;
  max-width: none;
  padding: 14px 18px;
  border: 0;
  border-bottom: 1px solid rgba(79, 69, 61, 0.08);
  vertical-align: middle;
  color: #4f453d !important;
  background: transparent;
  font-size: 1.02rem;
  line-height: 1.45;
  font-weight: 400;
}

.s-price table thead td,
.s-price table thead th,
.price-cat table thead td,
.price-cat table thead th,
.price-vypusk table thead td,
.price-vypusk table thead th,
.s-anim-about table thead td,
.s-anim-about table thead th,
.elementor-widget-text-editor table thead td,
.elementor-widget-text-editor table thead th,
.wp-block-table table thead td,
.wp-block-table table thead th,
table.new-tables thead td,
table.new-tables thead th {
  background: #ffcf01;
  color: #4f453d !important;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-align: center;
}

.s-price table tbody tr:nth-child(even) td,
.price-cat table tbody tr:nth-child(even) td,
.price-vypusk table tbody tr:nth-child(even) td,
.s-anim-about table tbody tr:nth-child(even) td,
.elementor-widget-text-editor table tbody tr:nth-child(even) td,
.wp-block-table table tbody tr:nth-child(even) td,
table.new-tables tbody tr:nth-child(even) td {
  background: #fff8e3;
}

.s-price table tbody tr:hover td,
.price-cat table tbody tr:hover td,
.price-vypusk table tbody tr:hover td,
.s-anim-about table tbody tr:hover td,
table.new-tables tbody tr:hover td {
  background: #fff3c4;
}

.s-price table tr[class*="blockpricecont"] td,
.price-cat table tr[class*="blockpricecont"] td,
table.new-tables tr[class*="blockpricecont"] td {
  background: #ffcf01 !important;
  color: #4f453d !important;
  font-weight: 700;
  font-size: 1.2rem;
  text-align: center;
  padding: 16px 18px;
  border-bottom: 0;
}

.s-price table tr[class*="blockpricecont"] + tr td,
.price-cat table tr[class*="blockpricecont"] + tr td,
table.new-tables tr[class*="blockpricecont"] + tr td {
  background: #ffe36a;
  font-weight: 700;
  text-align: center;
}

.s-price table [style*="color: #fff"],
.s-price table [style*="color:#fff"],
.price-cat table [style*="color: #fff"],
.price-cat table [style*="color:#fff"],
table.new-tables [style*="color: #fff"],
table.new-tables [style*="color:#fff"],
.s-price table .title,
table.new-tables .title {
  color: #4f453d !important;
}

.s-price table h3,
.price-cat table h3,
.price-vypusk table h3,
.s-anim-about table h3 {
  margin: 0 0 8px;
  color: #4f453d;
  font-size: 1.25rem;
  font-weight: 700;
}

.kw-price-packages td:first-child,
.s-price table.kw-price-packages td:first-child {
  width: 44% !important;
  vertical-align: top;
}

.kw-price-packages ul {
  margin: 8px 0 0;
  padding: 0 0 0 1.15em;
}

.kw-price-packages li {
  margin: 0 0 0.2em;
}

.kw-price-packages td:nth-child(2),
.kw-price-packages td:nth-child(3),
.kw-price-packages td:nth-child(4) {
  vertical-align: middle;
  text-align: center;
  white-space: normal;
}

.kw-price-packages td:nth-child(4) {
  font-weight: 700;
  color: #ff8348 !important;
}

.kw-price-cards {
  display: none;
}

@media (min-width: 768px) {
  .s-price table,
  .s-price table thead,
  .s-price table tbody,
  .s-price table tr,
  .s-price table th,
  .s-price table td,
  .price-cat table,
  .price-cat table thead,
  .price-cat table tbody,
  .price-cat table tr,
  .price-cat table th,
  .price-cat table td,
  table.new-tables,
  table.new-tables tbody,
  table.new-tables tr,
  table.new-tables td,
  table.kw-price-packages,
  table.kw-price-packages thead,
  table.kw-price-packages tbody,
  table.kw-price-packages tr,
  table.kw-price-packages th,
  table.kw-price-packages td,
  .price-format-table table,
  .price-format-table thead,
  .price-format-table tbody,
  .price-format-table tr,
  .price-format-table th,
  .price-format-table td {
    display: revert !important;
  }

  .s-price table,
  .price-cat table,
  table.new-tables,
  table.kw-price-packages,
  .price-format-table table {
    display: table !important;
  }

  .s-price table thead,
  table.kw-price-packages thead,
  .price-format-table thead {
    display: table-header-group !important;
  }

  .s-price table tbody,
  table.new-tables tbody,
  table.kw-price-packages tbody,
  .price-format-table tbody {
    display: table-row-group !important;
  }

  .s-price table tr,
  table.new-tables tr,
  table.kw-price-packages tr,
  .price-format-table tr {
    display: table-row !important;
  }

  .s-price table th,
  .s-price table td,
  table.new-tables td,
  table.kw-price-packages th,
  table.kw-price-packages td,
  .price-format-table th,
  .price-format-table td {
    display: table-cell !important;
  }

  .kw-price-cards {
    display: none !important;
  }
}

.s-price table p,
.price-cat table p,
.price-vypusk table p,
table.new-tables p {
  margin: 0 0 0.35em;
}

.s-price table p:last-child,
.price-cat table p:last-child,
table.new-tables p:last-child {
  margin-bottom: 0;
}

.s-anim-about .elementor-widget-text-editor:has(table),
.wp-block-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.s-price .tabs-block {
  margin-bottom: 18px;
}

.s-price .js-price-tabs {
  row-gap: 8px;
}

.s-price .price-cat {
  margin-bottom: 8px;
}

.s-price .price-item:has(.price-item__photo) {
  display: grid;
  grid-template-columns: 80px minmax(0, 1.5fr) minmax(120px, 0.7fr) 168px;
  align-items: center;
  gap: 12px 18px;
  padding: 12px 8px;
}

.s-price .price-item__photo {
  display: block;
  width: 80px;
  height: 80px;
  border-radius: 18px;
  overflow: hidden;
  background: #fff6d6;
  box-shadow: 0 6px 16px rgba(79, 69, 61, 0.1);
  flex-shrink: 0;
}

.s-price .price-item__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.s-price .price-item__center {
  font-weight: 700;
  color: #ff8348;
  white-space: nowrap;
}

@media (max-width: 680px) {
  .s-price .price-item:has(.price-item__photo) {
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-areas:
      "photo name"
      "photo price"
      "photo btn";
  }

  .s-price .price-item__photo {
    grid-area: photo;
    width: 72px;
    height: 72px;
    border-radius: 16px;
  }

  .s-price .price-item__left {
    grid-area: name;
  }

  .s-price .price-item__center {
    grid-area: price;
    white-space: normal;
  }

  .s-price .price-item__right {
    grid-area: btn;
  }
}

@media (max-width: 1439px) {
  .s-price table th,
  .s-price table td,
  .price-cat table th,
  .price-cat table td,
  table.new-tables th,
  table.new-tables td {
    padding: 12px 16px;
    font-size: 1rem;
  }
}

@media (max-width: 1279px) {
  .s-price table th,
  .s-price table td,
  .price-cat table th,
  .price-cat table td,
  table.new-tables th,
  table.new-tables td {
    padding: 12px 14px;
    font-size: 0.98rem;
  }
}

/* Tablet 768–1024: keep a real table, don't squash columns */
@media (max-width: 1023px) {
  .kw-price-table-wrap--scroll table,
  .kw-price-table-wrap--scroll table.new-tables {
    min-width: 760px;
  }

  .s-price table th,
  .s-price table td,
  .price-cat table th,
  .price-cat table td,
  table.new-tables th,
  table.new-tables td {
    padding: 10px 12px;
    font-size: 0.95rem;
    line-height: 1.4;
  }

  .s-price table h3,
  .price-cat table h3 {
    font-size: 1.12rem;
  }
}

@media (max-width: 767px) {
  .kw-price-table-wrap {
    border-radius: 18px;
  }

  .kw-price-table-wrap--scroll table,
  .kw-price-table-wrap--scroll table.new-tables {
    min-width: 680px;
  }

  .s-price table th,
  .s-price table td,
  .price-cat table th,
  .price-cat table td,
  table.new-tables th,
  table.new-tables td {
    padding: 10px 12px;
    font-size: 0.92rem;
  }

  /* Hide the real table; show generated cards so columns never mix */
  .s-price .kw-price-table-wrap--stack,
  .page-template-page-price .kw-price-table-wrap--stack {
    overflow: visible;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }

  .s-price .kw-price-table-wrap--stack table,
  .page-template-page-price .kw-price-table-wrap--stack table {
    display: none !important;
  }

  .s-price .kw-price-table-wrap--stack .kw-price-cards,
  .page-template-page-price .kw-price-table-wrap--stack .kw-price-cards {
    display: block;
  }

  .kw-price-card__meta--format {
    grid-template-columns: 1fr;
  }

  .kw-price-card__meta--format > div:last-child {
    color: #4f453d;
    font-weight: 400;
    text-align: left;
  }

  .kw-price-card__meta--format > div:first-child {
    color: #ff8348;
  }

  .kw-price-card {
    margin: 0 0 14px;
    padding: 16px;
    background: #fffdf5;
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(79, 69, 61, 0.1);
    color: #4f453d;
  }

  .kw-price-card h3 {
    margin: 0 0 8px;
    font-size: 1.2rem;
    color: #4f453d;
  }

  .kw-price-card ul {
    margin: 0 0 12px;
    padding: 0 0 0 1.15em;
  }

  .kw-price-card li {
    margin: 0 0 0.25em;
  }

  .kw-price-card__meta {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
  }

  .kw-price-card__meta > div {
    background: #fff8e3;
    border-radius: 12px;
    padding: 10px 8px;
    text-align: center;
    font-weight: 700;
    font-size: 0.86rem;
    line-height: 1.35;
  }

  .kw-price-card__meta span {
    display: block;
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #4f453d;
    margin-bottom: 4px;
  }

  .kw-price-card__meta > div:last-child {
    color: #ff8348;
  }
}

@media (max-width: 374px) {
  .kw-price-table-wrap--scroll table,
  .kw-price-table-wrap--scroll table.new-tables {
    min-width: 620px;
  }

  .kw-price-card {
    padding: 12px 10px;
  }

  .kw-price-card__meta > div {
    font-size: 0.78rem;
    padding: 8px 4px;
  }
}

/* /stoimost/ «Лучшие предложения» — только этот блок, в конце файла чтобы перекрыть Bitrix CSS. */
#kw-stoimost-packages.kw-package-offers,
.page-id-28938 #kw-stoimost-packages.kw-package-offers.best-prices {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 20px 16px !important;
  align-items: stretch !important;
  justify-items: stretch !important;
  padding: 4px 0 24px !important;
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  overflow: visible !important;
}

#kw-stoimost-packages.kw-package-offers > a.kw-package-offers__item,
.page-id-28938 #kw-stoimost-packages .kw-package-offers__item {
  display: flex !important;
  flex-direction: column !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  float: none !important;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 22px rgba(79, 69, 61, 0.1);
}

#kw-stoimost-packages.kw-package-offers img,
.page-id-28938 #kw-stoimost-packages img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: top center !important;
  transform: none !important;
  aspect-ratio: 2 / 3;
}

@media (max-width: 991px) {
  #kw-stoimost-packages.kw-package-offers,
  .page-id-28938 #kw-stoimost-packages.kw-package-offers.best-prices {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px 12px !important;
  }
}

@media (max-width: 375px) {
  #kw-stoimost-packages.kw-package-offers {
    gap: 10px 8px !important;
  }
}

/* Format table under H1: one copy for guests (cached HTML + old JS clone). */
.page-id-28938 .price-format-table .kw-price-cards {
  display: none !important;
}
