/*
  Palladium — Dark modern design v4 (complete rewrite)
  Mobile-first, fluid, no horizontal overflow at any zoom/resolution.

  Breakpoints:
    sm  480px   large phones landscape
    md  768px   tablets
    lg  1024px  small desktops
    xl  1280px  desktops

  Scoped via body.palladium-dark
*/

/* ═══════════════════════════════════════════════════════════════════════ */
/* 1. TOKENS                                                              */
/* ═══════════════════════════════════════════════════════════════════════ */

body.palladium-dark {
  --p-bg-0: #07070a;
  --p-bg-1: #0b0b10;
  --p-surface: rgba(255,255,255,.06);
  --p-surface-hi: rgba(255,255,255,.09);
  --p-border: rgba(255,255,255,.10);
  --p-text: rgba(255,255,255,.92);
  --p-text-muted: rgba(255,255,255,.70);
  --p-text-faint: rgba(255,255,255,.55);
  --p-accent: #d28b3d;
  --p-accent-2: #f2c17b;
  --p-teal: #25d6c8;
  --p-shadow-lg: 0 30px 90px rgba(0,0,0,.6);
  --p-shadow-md: 0 16px 45px rgba(0,0,0,.45);
  --p-radius-sm: 16px;
  --p-radius-md: 22px;
  --p-radius-lg: 28px;
  --p-radius-xl: 32px;
  --p-pad: clamp(14px, 4vw, 56px);
  --p-gap: clamp(10px, 2vw, 18px);

  --ast-global-color-0: var(--p-accent);
  --ast-global-color-1: var(--p-accent-2);
  --ast-global-color-2: var(--p-text);
  --ast-global-color-3: var(--p-text-muted);
  --ast-global-color-4: #121219;
  --ast-global-color-5: #0b0b10;

  background:
    radial-gradient(1200px 600px at 82% -10%, rgba(210,139,61,.26), transparent 55%),
    radial-gradient(900px 520px at 0% 12%, rgba(37,214,200,.10), transparent 55%),
    linear-gradient(180deg, var(--p-bg-0), var(--p-bg-1));
  color: var(--p-text);
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* 2. GLOBAL OVERFLOW FIX                                                 */
/* ═══════════════════════════════════════════════════════════════════════ */

body.palladium-dark,
body.palladium-dark #page,
body.palladium-dark .site {
  overflow-x: hidden;
  max-width: 100%;
}

body.palladium-dark #page,
body.palladium-dark .site-content,
body.palladium-dark #content {
  background: transparent !important;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* 3. TYPOGRAPHY                                                          */
/* ═══════════════════════════════════════════════════════════════════════ */

body.palladium-dark,
body.palladium-dark .entry-content { color: var(--p-text); }
body.palladium-dark p,
body.palladium-dark li { color: var(--p-text-muted); }
body.palladium-dark h1,body.palladium-dark h2,body.palladium-dark h3,
body.palladium-dark h4,body.palladium-dark h5,body.palladium-dark h6 {
  color: var(--p-text);
  letter-spacing: -.02em;
}
body.palladium-dark a {
  color: inherit;
  text-decoration-color: rgba(210,139,61,.45);
  text-underline-offset: .18em;
}
body.palladium-dark a:hover { color: var(--p-accent-2); }

/* ═══════════════════════════════════════════════════════════════════════ */
/* 4. HEADER (Astra)                                                      */
/* ═══════════════════════════════════════════════════════════════════════ */

body.palladium-dark .site-header,
body.palladium-dark .main-header-bar,
body.palladium-dark .ast-primary-header-bar {
  background: rgba(10,10,14,.55) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--p-border);
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}
body.palladium-dark .main-header-bar .ast-container {
  max-width: 100%;
  overflow-x: hidden;
}
body.palladium-dark .main-header-menu a,
body.palladium-dark .ast-builder-menu-1 a,
body.palladium-dark .ast-builder-menu-2 a {
  color: rgba(255,255,255,.88) !important;
}
body.palladium-dark .main-header-menu a:hover,
body.palladium-dark .ast-builder-menu-1 a:hover,
body.palladium-dark .ast-builder-menu-2 a:hover {
  color: var(--p-accent-2) !important;
}
body.palladium-dark .ast-above-header-bar,
body.palladium-dark .ast-primary-header-bar,
body.palladium-dark .main-header-bar {
  padding-top: 8px;
  padding-bottom: 8px;
}
body.palladium-dark .main-header-menu { gap: 8px; }
body.palladium-dark .main-header-menu .menu-link {
  padding: 8px;
  border-radius: 999px;
  font-size: 14px;
}
body.palladium-dark .main-header-menu .menu-link:hover {
  background: rgba(255,255,255,.06);
}
@media (min-width:768px) {
  body.palladium-dark .main-header-menu { gap: 14px; }
  body.palladium-dark .main-header-menu .menu-link { padding: 10px; }
}

/* Tablet fix: keep desktop menu in ONE row (no wrap over hero) */
@media (max-width: 1100px) {
  body.palladium-dark #primary-site-navigation-desktop .main-header-menu {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 10px;
    padding: 2px 2px 8px;
    margin: 0;
  }
  body.palladium-dark #primary-site-navigation-desktop .main-header-menu::-webkit-scrollbar {
    display: none;
  }
  body.palladium-dark #primary-site-navigation-desktop .main-header-menu > li {
    flex: 0 0 auto;
  }
  body.palladium-dark #primary-site-navigation-desktop .main-header-menu .menu-link {
    white-space: nowrap;
  }
}

body.palladium-dark .ast-header-button-1 a.menu-link { display: none !important; }
body.palladium-dark .ast-header-button-1 .ast-custom-button-link { text-decoration: none !important; }
body.palladium-dark .ast-header-button-1 .ast-custom-button {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(210,139,61,.95), rgba(180,108,38,.95));
  border: 1px solid rgba(210,139,61,.35);
  color: #0b0b10;
  font-weight: 650;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
}
@media (min-width:768px) {
  body.palladium-dark .ast-header-button-1 .ast-custom-button {
    padding: 10px 14px;
    font-size: 14px;
    box-shadow: 0 14px 32px rgba(0,0,0,.45);
  }
}
@media (hover:hover) and (pointer:fine) {
  body.palladium-dark .ast-header-button-1 .ast-custom-button:hover {
    transform: translateY(-1px);
    filter: saturate(1.05);
  }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* 5. GLOBAL BUTTONS & INPUTS                                             */
/* ═══════════════════════════════════════════════════════════════════════ */

body.palladium-dark .ast-button,
body.palladium-dark .wp-block-button__link,
body.palladium-dark .uagb-buttons-repeater a,
body.palladium-dark button,
body.palladium-dark input[type="submit"] {
  border-radius: 999px !important;
  border: 1px solid rgba(210,139,61,.35) !important;
  background: linear-gradient(180deg, rgba(210,139,61,.95), rgba(180,108,38,.95)) !important;
  color: #0b0b10 !important;
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
  font-size: 15px;
  padding: 12px 20px;
}
@media (hover:hover) and (pointer:fine) {
  body.palladium-dark .ast-button:hover,
  body.palladium-dark .wp-block-button__link:hover,
  body.palladium-dark .uagb-buttons-repeater a:hover,
  body.palladium-dark button:hover,
  body.palladium-dark input[type="submit"]:hover {
    transform: translateY(-1px);
    filter: saturate(1.05);
    box-shadow: 0 14px 36px rgba(0,0,0,.5);
  }
}
body.palladium-dark input[type="text"],
body.palladium-dark input[type="email"],
body.palladium-dark input[type="tel"],
body.palladium-dark input[type="url"],
body.palladium-dark input[type="password"],
body.palladium-dark textarea,
body.palladium-dark select {
  background: var(--p-surface) !important;
  border: 1px solid var(--p-border) !important;
  color: var(--p-text) !important;
  border-radius: var(--p-radius-sm) !important;
}
body.palladium-dark input::placeholder,
body.palladium-dark textarea::placeholder {
  color: var(--p-text-faint) !important;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* 6. SPECTRA / UAG NEUTRALIZE                                            */
/* ═══════════════════════════════════════════════════════════════════════ */

body.palladium-dark .wp-block-uagb-container,
body.palladium-dark .wp-block-uagb-info-box,
body.palladium-dark .wp-block-uagb-faq { background-color: transparent !important; }
body.palladium-dark .uagb-container__shape .uagb-container__shape-fill { fill: var(--p-surface) !important; }
body.palladium-dark .wp-block-uagb-info-box .uagb-infobox__content-wrap,
body.palladium-dark .wp-block-uagb-info-box .uagb-infobox {
  background: var(--p-surface) !important;
  border: 1px solid var(--p-border) !important;
  border-radius: var(--p-radius-md) !important;
  box-shadow: var(--p-shadow-md);
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* 7. LAYOUT PRIMITIVES                                                   */
/* ═══════════════════════════════════════════════════════════════════════ */

body.palladium-dark .p-section.alignfull {
  padding: clamp(40px, 6vw, 96px) 16px;
}
body.palladium-dark .p-section.alignfull > .wp-block-group__inner-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}
body.palladium-dark .p-section--glass {
  margin: 16px 10px;
  border-radius: var(--p-radius-xl);
  border: 1px solid var(--p-border);
  background:
    radial-gradient(600px 320px at 12% 12%, rgba(210,139,61,.10), transparent 60%),
    radial-gradient(500px 320px at 92% 10%, rgba(37,214,200,.05), transparent 55%),
    rgba(255,255,255,.03);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--p-shadow-md);
  overflow: hidden;
}
@media (min-width:768px) {
  body.palladium-dark .p-section--glass { margin: 18px 14px; border-radius: 36px; }
}

body.palladium-dark .p-section__title {
  font-size: clamp(24px, 5vw, 44px);
  line-height: 1.08;
  margin: 0 0 12px;
}
body.palladium-dark .p-section__subtitle {
  max-width: 60ch;
  margin: 0 0 20px;
  color: var(--p-text-muted);
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.5;
}

/* Kicker pill */
body.palladium-dark .p-kicker {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--p-border);
  color: rgba(255,255,255,.86);
  text-transform: uppercase;
  letter-spacing: .10em;
  font-size: 11px;
  font-weight: 650;
  margin: 0 0 14px;
  backdrop-filter: blur(8px);
  width: fit-content;
}
@media (min-width:768px) {
  body.palladium-dark .p-kicker { font-size: 12px; padding: 8px 14px; letter-spacing: .12em; }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* 8. HERO                                                                */
/* ═══════════════════════════════════════════════════════════════════════ */

body.palladium-dark .wp-block-cover.p-hero {
  margin: 10px;
  border-radius: var(--p-radius-xl);
  overflow: hidden;
  box-shadow: var(--p-shadow-lg);
  border: 1px solid var(--p-border);
  min-height: min(92vh, 92dvh) !important;
  max-height: 1000px;
  position: relative;
  display: flex;
  flex-direction: column;
}
@media (min-width:768px) {
  body.palladium-dark .wp-block-cover.p-hero {
    margin: 14px;
    border-radius: 36px;
  }
}

body.palladium-dark .wp-block-cover.p-hero .wp-block-cover__image-background {
  filter: saturate(1.08) contrast(1.08) brightness(.78);
  transform: scale(1.02);
}
body.palladium-dark .wp-block-cover.p-hero .wp-block-cover__background {
  background:
    radial-gradient(800px 400px at 12% 12%, rgba(210,139,61,.22), transparent 60%),
    radial-gradient(600px 400px at 90% 10%, rgba(37,214,200,.08), transparent 55%),
    linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.68) 60%, rgba(0,0,0,.92) 100%) !important;
}
body.palladium-dark .wp-block-cover.p-hero .wp-block-cover__inner-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 14px 24px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
@media (min-width:768px) {
  body.palladium-dark .wp-block-cover.p-hero .wp-block-cover__inner-container {
    padding: clamp(24px, 4vw, 56px);
  }
}

body.palladium-dark .p-hero-title {
  font-size: clamp(36px, 10vw, 78px);
  line-height: .95;
  margin: 0 0 12px;
  word-break: break-word;
}
body.palladium-dark .p-hero-subtitle {
  max-width: 60ch;
  font-size: clamp(15px, 2.5vw, 20px);
  margin: 0 0 20px;
  color: rgba(255,255,255,.75);
  line-height: 1.45;
}

/* Hero CTAs */
body.palladium-dark .p-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}
body.palladium-dark .p-hero-ctas .wp-block-button {
  flex: 1 1 100%;
  min-width: 0;
}
@media (min-width:480px) {
  body.palladium-dark .p-hero-ctas .wp-block-button { flex: 0 1 auto; }
}
body.palladium-dark .p-hero-ctas .wp-block-button .wp-block-button__link {
  width: 100%;
  text-align: center;
  white-space: nowrap;
  padding: 14px 24px;
  font-size: 15px;
}
@media (min-width:480px) {
  body.palladium-dark .p-hero-ctas .wp-block-button .wp-block-button__link { width: auto; }
}
body.palladium-dark .p-hero-ctas .wp-block-button.is-style-outline .wp-block-button__link {
  background: rgba(255,255,255,.08) !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  color: rgba(255,255,255,.92) !important;
  box-shadow: none;
}
body.palladium-dark .p-hero-ctas .wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: rgba(210,139,61,.20) !important;
  border-color: rgba(210,139,61,.35) !important;
}

/* Hero stats — always grid, never WP columns layout */
body.palladium-dark .p-stats {
  margin-top: 16px;
  display: grid !important;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}
body.palladium-dark .p-stats .wp-block-column {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--p-border);
  border-radius: 14px;
  padding: 12px 10px;
  backdrop-filter: blur(10px);
  min-width: 0;
  margin: 0 !important;
  width: auto !important;
  flex-basis: auto !important;
}
body.palladium-dark .p-stat__num {
  margin: 0;
  font-size: clamp(18px, 4.5vw, 26px);
  line-height: 1;
}
body.palladium-dark .p-stat__label {
  margin: 4px 0 0;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--p-text-faint);
  line-height: 1.3;
}
@media (min-width:480px) {
  body.palladium-dark .p-stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 20px;
  }
  body.palladium-dark .p-stats .wp-block-column { padding: 14px 12px; border-radius: 16px; }
  body.palladium-dark .p-stat__label { font-size: 11px; margin-top: 6px; }
}
@media (min-width:768px) {
  body.palladium-dark .p-stats { gap: 16px; margin-top: 24px; }
  body.palladium-dark .p-stats .wp-block-column { padding: 16px; border-radius: 18px; }
  body.palladium-dark .p-stat__label { font-size: 12px; letter-spacing: .10em; margin-top: 8px; }
}

/* Hero scroll indicator */
body.palladium-dark .p-hero-scroll {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.4);
  animation: p-bounce 2s ease-in-out infinite;
}
@keyframes p-bounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* 9. MARQUEE                                                             */
/* ═══════════════════════════════════════════════════════════════════════ */

body.palladium-dark .p-marquee {
  overflow: hidden;
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.02);
}
body.palladium-dark .p-marquee__track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: p-marquee 40s linear infinite;
  will-change: transform;
}
body.palladium-dark .p-marquee__track > span {
  padding: 0 10px;
  font-size: clamp(13px, 1.6vw, 17px);
  font-weight: 600;
  color: rgba(255,255,255,.55);
  letter-spacing: .02em;
  text-transform: uppercase;
  flex-shrink: 0;
}
body.palladium-dark .p-marquee__dot {
  width: 5px !important;
  height: 5px !important;
  padding: 0 !important;
  border-radius: 50%;
  background: var(--p-accent);
  opacity: .45;
  display: inline-block;
  flex-shrink: 0;
}
@keyframes p-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* 10. BENTO GRID                                                         */
/* ═══════════════════════════════════════════════════════════════════════ */

body.palladium-dark .p-bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 24px;
}
body.palladium-dark .p-bento__card {
  position: relative;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--p-radius-md);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  min-height: 140px;
  transition: transform 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
}
body.palladium-dark .p-bento__card--hero {
  background:
    radial-gradient(500px 300px at 20% 80%, rgba(210,139,61,.14), transparent 60%),
    rgba(255,255,255,.05);
  border-color: rgba(210,139,61,.16);
}
body.palladium-dark .p-bento__num {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
  color: rgba(255,255,255,.04);
  pointer-events: none;
  user-select: none;
}
body.palladium-dark .p-bento__card--hero .p-bento__num {
  font-size: 72px;
  color: rgba(210,139,61,.06);
}
body.palladium-dark .p-bento__title {
  margin: 0 0 6px;
  font-size: clamp(17px, 2.5vw, 24px);
  font-weight: 700;
  color: rgba(255,255,255,.94);
  line-height: 1.2;
}
body.palladium-dark .p-bento__desc {
  margin: 0;
  color: rgba(255,255,255,.60);
  font-size: 14px;
  line-height: 1.5;
  max-width: 48ch;
}
body.palladium-dark .p-bento__cta {
  display: inline-flex;
  margin-top: 16px;
  padding: 12px 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(210,139,61,.95), rgba(180,108,38,.95));
  border: 1px solid rgba(210,139,61,.35);
  color: #0b0b10 !important;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none !important;
  width: fit-content;
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
body.palladium-dark .p-bento__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0,0,0,.5);
}

@media (min-width:480px) {
  body.palladium-dark .p-bento { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  body.palladium-dark .p-bento__card--hero { grid-column: 1 / -1; }
  body.palladium-dark .p-bento__card--wide { grid-column: 1 / -1; }
}
@media (min-width:768px) {
  body.palladium-dark .p-bento {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: 16px;
  }
  body.palladium-dark .p-bento__card--hero {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
  }
  body.palladium-dark .p-bento__card { padding: 28px 24px; border-radius: 24px; }
  body.palladium-dark .p-bento__num { font-size: 64px; }
  body.palladium-dark .p-bento__card--hero .p-bento__num { font-size: 120px; }
  body.palladium-dark .p-bento__desc { font-size: 15px; }
}
@media (hover:hover) and (pointer:fine) {
  body.palladium-dark .p-bento__card:hover {
    transform: translateY(-3px);
    border-color: rgba(255,255,255,.16);
    box-shadow: 0 24px 64px rgba(0,0,0,.35);
  }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* 11. SIGNUP SECTION                                                     */
/* ═══════════════════════════════════════════════════════════════════════ */

body.palladium-dark .p-signup__grid {
  gap: 20px;
}
@media (max-width:767px) {
  body.palladium-dark .p-signup__grid.wp-block-columns {
    flex-direction: column !important;
  }
  body.palladium-dark .p-signup__grid .wp-block-column {
    flex-basis: 100% !important;
    width: 100% !important;
  }
}
body.palladium-dark .p-small {
  margin: 16px 0 0;
  color: var(--p-text-muted);
  font-size: 14px;
}
body.palladium-dark .p-small a { color: var(--p-text); }

body.palladium-dark .p-checklist {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 10px;
}
body.palladium-dark .p-checklist li {
  position: relative;
  padding-left: 28px;
  color: rgba(255,255,255,.78);
  font-size: 15px;
  line-height: 1.5;
}
body.palladium-dark .p-checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(210,139,61,.18);
  border: 1px solid rgba(210,139,61,.30);
  color: var(--p-text);
  font-weight: 800;
  font-size: 11px;
}

body.palladium-dark .p-checklist--compact {
  gap: 8px;
}
body.palladium-dark .p-checklist--compact li {
  font-size: 14px;
}

body.palladium-dark .p-form-card {
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius-md);
  padding: 16px;
  box-shadow: var(--p-shadow-lg);
}
body.palladium-dark .p-form-card__title {
  margin: 0 0 12px;
  font-weight: 700;
  color: var(--p-text);
}
body.palladium-dark .p-form-card__hint {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--p-text-faint);
}

/* About page split section */
body.palladium-dark .p-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 18px;
}
@media (min-width: 768px) {
  body.palladium-dark .p-split {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: start;
    gap: 18px;
  }
}
body.palladium-dark .p-split__text p {
  margin-top: 0;
}
body.palladium-dark .p-split__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
body.palladium-dark .p-split__card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--p-radius-md);
  padding: 16px;
  box-shadow: 0 14px 34px rgba(0,0,0,.40);
  backdrop-filter: blur(12px);
}
body.palladium-dark .p-split__card-title {
  font-weight: 700;
  color: rgba(255,255,255,.92);
  margin-bottom: 10px;
}

/* Slightly denser bento for inner pages */
body.palladium-dark .p-bento--compact .p-bento__card {
  min-height: 120px;
}

/* Contacts page */
body.palladium-dark .p-contacts {
  margin-top: 18px;
}
body.palladium-dark .p-contacts__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 768px) {
  body.palladium-dark .p-contacts__grid {
    grid-template-columns: 0.95fr 1.05fr;
    gap: 18px;
    align-items: start;
  }
}
body.palladium-dark .p-contacts__cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 480px) {
  body.palladium-dark .p-contacts__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.palladium-dark .p-contacts__cards .p-contact-card:last-child {
    grid-column: 1 / -1;
  }
}

body.palladium-dark .p-contacts__note {
  margin-top: 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--p-radius-md);
  padding: 16px;
  box-shadow: 0 14px 34px rgba(0,0,0,.40);
  backdrop-filter: blur(12px);
}
body.palladium-dark .p-contacts__note-title {
  font-weight: 700;
  color: rgba(255,255,255,.92);
  margin-bottom: 8px;
}
body.palladium-dark .p-contacts__note-text {
  color: rgba(255,255,255,.70);
  line-height: 1.5;
}
body.palladium-dark .p-contacts__note-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

body.palladium-dark .p-map-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--p-radius-md);
  box-shadow: 0 14px 34px rgba(0,0,0,.40);
  overflow: hidden;
}
body.palladium-dark .p-map-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 10px;
}
body.palladium-dark .p-map-card__title {
  font-weight: 700;
  color: rgba(255,255,255,.92);
}
body.palladium-dark .p-map-card__link {
  color: rgba(255,255,255,.72);
  text-decoration: none !important;
}
body.palladium-dark .p-map-card__link:hover { color: var(--p-accent-2); }
body.palladium-dark .p-map-card__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: rgba(0,0,0,.25);
}
body.palladium-dark .p-map-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
body.palladium-dark .p-map-card__hint {
  padding: 12px 14px 14px;
  color: rgba(255,255,255,.62);
  font-size: 13px;
  line-height: 1.4;
  border-top: 1px solid rgba(255,255,255,.06);
}

/* Timetable: pricing + embed card */
body.palladium-dark .p-pricing {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 18px;
}
@media (min-width: 768px) {
  body.palladium-dark .p-pricing {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: stretch;
  }
}
body.palladium-dark .p-price-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 14px 34px rgba(0,0,0,.40);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
@media (min-width: 768px) {
  body.palladium-dark .p-price-card { padding: 22px; }
}
body.palladium-dark .p-price-card--accent {
  background:
    radial-gradient(600px 320px at 15% 10%, rgba(210,139,61,.14), transparent 60%),
    rgba(255,255,255,.06);
  border-color: rgba(210,139,61,.18);
}
body.palladium-dark .p-price-card__kicker {
  font-weight: 800;
  letter-spacing: .10em;
  text-transform: uppercase;
  font-size: 11px;
  color: rgba(255,255,255,.62);
}
body.palladium-dark .p-price-card__rows {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}
body.palladium-dark .p-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.08);
}
body.palladium-dark .p-price-row span {
  color: rgba(255,255,255,.78);
}
body.palladium-dark .p-price-row strong {
  color: rgba(255,255,255,.94);
  font-weight: 800;
}
body.palladium-dark .p-price-card__hint {
  color: rgba(255,255,255,.62);
  font-size: 13px;
  line-height: 1.45;
}
body.palladium-dark .p-price-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

body.palladium-dark .p-embed-card {
  margin-top: 16px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 24px;
  box-shadow: 0 14px 34px rgba(0,0,0,.40);
  overflow: hidden;
}
body.palladium-dark .p-embed-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 10px;
}
body.palladium-dark .p-embed-card__title {
  font-weight: 700;
  color: rgba(255,255,255,.92);
}
body.palladium-dark .p-embed-card__link {
  color: rgba(255,255,255,.72);
  text-decoration: none !important;
}
body.palladium-dark .p-embed-card__link:hover { color: var(--p-accent-2); }
body.palladium-dark .p-embed-card__frame {
  position: relative;
  width: 100%;
  height: min(80vh, 780px);
  min-height: 520px;
  background: rgba(0,0,0,.25);
}
@media (max-width: 480px) {
  body.palladium-dark .p-embed-card__frame {
    height: min(78vh, 680px);
    min-height: 460px;
  }
}
body.palladium-dark .p-embed-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
body.palladium-dark .p-embed-card__hint {
  padding: 12px 14px 14px;
  color: rgba(255,255,255,.62);
  font-size: 13px;
  line-height: 1.45;
  border-top: 1px solid rgba(255,255,255,.06);
}
body.palladium-dark .p-embed-card__hint a { color: rgba(255,255,255,.86); }
body.palladium-dark .p-embed-card__hint a:hover { color: var(--p-accent-2); }

/* Rent: halls grid */
body.palladium-dark .p-rent-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 18px;
}
@media (min-width: 480px) {
  body.palladium-dark .p-rent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}
@media (min-width: 1024px) {
  body.palladium-dark .p-rent-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }
}
body.palladium-dark .p-rent-card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  min-height: 180px;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 14px 34px rgba(0,0,0,.40);
  background-image: var(--p-rent-img);
  background-size: cover;
  background-position: center;
  transform: translateZ(0);
}
@media (min-width: 768px) {
  body.palladium-dark .p-rent-card { min-height: 220px; }
}
body.palladium-dark .p-rent-card__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(520px 280px at 20% 10%, rgba(210,139,61,.16), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,.10) 0%, rgba(0,0,0,.68) 68%, rgba(0,0,0,.92) 100%);
}
body.palladium-dark .p-rent-card__content {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 2;
}
body.palladium-dark .p-rent-card__title {
  font-weight: 800;
  color: rgba(255,255,255,.95);
  font-size: 18px;
  line-height: 1.1;
  text-shadow: 0 10px 26px rgba(0,0,0,.55);
}
body.palladium-dark .p-rent-card__meta {
  margin-top: 6px;
  color: rgba(255,255,255,.72);
  font-size: 13px;
  font-weight: 650;
}
@media (hover:hover) and (pointer:fine) {
  body.palladium-dark .p-rent-card {
    transition: transform 180ms ease, box-shadow 180ms ease;
  }
  body.palladium-dark .p-rent-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--p-shadow-lg);
  }
}

/* Teachers page (styles + override legacy shortcode output) */
body.palladium-dark .p-teachers-tools {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
@media (min-width: 768px) {
  body.palladium-dark .p-teachers-tools {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}
body.palladium-dark .p-teachers-tools__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Switch */
body.palladium-dark .p-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  width: fit-content;
  user-select: none;
}
body.palladium-dark .p-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
body.palladium-dark .p-switch__ui {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.12);
  position: relative;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.15);
}
body.palladium-dark .p-switch__ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,.85);
  transition: transform 180ms ease, background 180ms ease;
}
body.palladium-dark .p-switch__label {
  color: rgba(255,255,255,.78);
  font-size: 14px;
  line-height: 1.2;
}
body.palladium-dark #p-teachers-filter-individual:checked + .p-switch__ui {
  background: rgba(210,139,61,.22);
  border-color: rgba(210,139,61,.35);
}
body.palladium-dark #p-teachers-filter-individual:checked + .p-switch__ui::after {
  transform: translateX(18px);
  background: rgba(255,255,255,.92);
}

/* Override legacy inline <style> produced by shortcode */
body.palladium-dark .teachers-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
  padding: 0 !important;
  margin-top: 12px;
}
@media (min-width: 768px) {
  body.palladium-dark .teachers-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }
}
@media (min-width: 1024px) {
  body.palladium-dark .teachers-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 18px !important;
  }
}

body.palladium-dark .teacher-card {
  background: rgba(255,255,255,.06) !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  border-radius: 22px !important;
  box-shadow: 0 14px 34px rgba(0,0,0,.40) !important;
  overflow: hidden;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 18px 14px !important;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease !important;
  backdrop-filter: blur(12px);
}
@media (min-width: 768px) {
  body.palladium-dark .teacher-card { padding: 22px 18px !important; border-radius: 24px !important; }
}
@media (hover:hover) and (pointer:fine) {
  body.palladium-dark .teacher-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: var(--p-shadow-lg) !important;
    border-color: rgba(255,255,255,.16) !important;
  }
}

body.palladium-dark .teacher-card img {
  width: 92px !important;
  height: 92px !important;
  border-radius: 999px !important;
  object-fit: cover !important;
  margin-bottom: 14px !important;
  border: 1px solid rgba(255,255,255,.14);
}
@media (min-width: 768px) {
  body.palladium-dark .teacher-card img { width: 112px !important; height: 112px !important; margin-bottom: 16px !important; }
}

body.palladium-dark .teacher-name {
  font-weight: 700 !important;
  font-size: 16px !important;
  margin-bottom: 10px !important;
  color: rgba(255,255,255,.92) !important;
  text-decoration: none !important;
}
body.palladium-dark .teacher-name:hover { color: var(--p-accent-2) !important; }

body.palladium-dark .teacher-desc {
  font-size: 13px !important;
  color: rgba(255,255,255,.68) !important;
  line-height: 1.5 !important;
  margin-bottom: 14px !important;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.palladium-dark .individual-info {
  font-size: 13px !important;
  color: rgba(242,193,123,.86) !important;
  font-weight: 700 !important;
  margin-bottom: 12px !important;
}

body.palladium-dark .teacher-buttons {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 10px !important;
  justify-content: stretch;
  width: 100%;
  margin-top: auto;
}
body.palladium-dark .button-more,
body.palladium-dark .button-signup {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 0 !important;
  padding: 10px 14px !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  text-align: center;
  text-decoration: none !important;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease !important;
  color: rgba(255,255,255,.92) !important;
}
body.palladium-dark .button-more {
  background: rgba(255,255,255,.08) !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  box-shadow: none !important;
}
body.palladium-dark .button-signup {
  background: linear-gradient(180deg, rgba(210,139,61,.95), rgba(180,108,38,.95)) !important;
  border: 1px solid rgba(210,139,61,.35) !important;
  color: #0b0b10 !important;
  box-shadow: 0 10px 26px rgba(0,0,0,.40) !important;
}
@media (hover:hover) and (pointer:fine) {
  body.palladium-dark .button-more:hover,
  body.palladium-dark .button-signup:hover {
    transform: translateY(-1px) !important;
  }
}

body.palladium-dark .p-teacher-hidden {
  display: none !important;
}

/* Custom lead form (replaces iframe widget) */
body.palladium-dark .p-lead-form {
  display: grid;
  gap: 12px;
}
body.palladium-dark .p-lead-grid {
  display: grid;
  gap: 10px;
}
@media (min-width: 480px) {
  body.palladium-dark .p-lead-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
body.palladium-dark .p-field input {
  width: 100% !important;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 16px !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  background: rgba(255,255,255,.06) !important;
  color: rgba(255,255,255,.92) !important;
  outline: none;
}
body.palladium-dark .p-field input:focus {
  border-color: rgba(210,139,61,.40) !important;
  box-shadow: 0 0 0 4px rgba(210,139,61,.16);
}
body.palladium-dark .p-agree {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: rgba(255,255,255,.72);
  font-size: 13px;
  line-height: 1.4;
}
body.palladium-dark .p-agree input[type="checkbox"] {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  accent-color: var(--p-accent);
}
body.palladium-dark .p-agree a {
  color: rgba(255,255,255,.86);
  text-decoration-color: rgba(210,139,61,.35);
}
body.palladium-dark .p-agree a:hover { color: var(--p-accent-2); }

body.palladium-dark .p-lead-submit {
  width: 100%;
  min-height: 48px;
}
@media (min-width: 480px) {
  body.palladium-dark .p-lead-submit {
    width: auto;
    justify-self: start;
    padding-inline: 26px;
  }
}

body.palladium-dark .p-lead-status {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: rgba(255,255,255,.72);
}
body.palladium-dark .p-lead-status[data-kind="success"] {
  color: rgba(242,193,123,.92);
}
body.palladium-dark .p-lead-status[data-kind="error"] {
  color: rgba(255,255,255,.86);
}

body.palladium-dark .p-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* 12. DIRECTIONS — nav + grid + cards (mobile-first)                     */
/* ═══════════════════════════════════════════════════════════════════════ */

body.palladium-dark .p-dir-block { margin-top: 0; padding: 0; }

/* Nav: horizontal scroll on mobile, wraps on tablet+ */
body.palladium-dark .p-dir-nav__wrap {
  margin: 0 0 16px;
  overflow: hidden;
}
body.palladium-dark .p-dir-nav { margin: 0; padding: 0; }
body.palladium-dark .p-dir-nav__scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 0 12px;
}
body.palladium-dark .p-dir-nav__scroll::-webkit-scrollbar { display: none; }
body.palladium-dark .p-dir-nav__link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  color: rgba(255,255,255,.86);
  text-decoration: none !important;
  font-weight: 650;
  font-size: 13px;
  white-space: nowrap;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}
body.palladium-dark .p-dir-nav__link:hover,
body.palladium-dark .p-dir-nav__link:focus {
  background: rgba(210,139,61,.18);
  border-color: rgba(210,139,61,.30);
  color: rgba(255,255,255,.94);
}
body.palladium-dark .p-dir-nav__link:focus-visible {
  outline: 2px solid var(--p-accent);
  outline-offset: 2px;
}
@media (min-width:768px) {
  body.palladium-dark .p-dir-nav__scroll {
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 10px;
    padding: 4px 0 18px;
  }
  body.palladium-dark .p-dir-nav__link { font-size: 14px; padding: 10px 16px; min-height: 44px; }
}

body.palladium-dark .p-dir-block__groups { margin-top: 0; }

body.palladium-dark .p-dir-group {
  margin-top: 34px;
  scroll-margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.06);
}
body.palladium-dark .p-dir-group:first-of-type { margin-top: 0; }
body.palladium-dark .p-dir-group:first-of-type {
  padding-top: 0;
  border-top: 0;
}
body.palladium-dark .p-dir-group__head { margin-bottom: 12px; }
body.palladium-dark .p-dir-group__title {
  margin: 0;
  font-size: clamp(18px, 3vw, 28px);
  line-height: 1.15;
  font-weight: 700;
}
body.palladium-dark .p-dir-group__subtitle {
  margin: 6px 0 0;
  color: var(--p-text-muted);
  font-size: 14px;
  line-height: 1.5;
  max-width: 70ch;
}

/* Grid: 2 cols mobile, auto-fill on larger */
body.palladium-dark .p-directions__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width:480px) {
  body.palladium-dark .p-directions__grid { gap: 12px; }
}
@media (min-width:768px) {
  body.palladium-dark .p-directions__grid {
    /* На планшете/десктопе не даём сетке превратиться в 5 тесных колонок */
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}
@media (min-width:1024px) {
  body.palladium-dark .p-directions__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
  }
}

/* Direction card */
body.palladium-dark .p-direction-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 150px;
  padding: 12px;
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none !important;
  border: 1px solid var(--p-border);
  box-shadow: 0 14px 34px rgba(0,0,0,.40);
  transform: translateZ(0);
  -webkit-tap-highlight-color: transparent;
}
@media (min-width:480px) {
  body.palladium-dark .p-direction-card { min-height: 200px; padding: 16px; border-radius: 20px; }
}
@media (min-width:768px) {
  body.palladium-dark .p-direction-card { min-height: 280px; padding: 20px; border-radius: 24px; }
}
@media (min-width:1024px) {
  body.palladium-dark .p-direction-card { min-height: 320px; padding: 22px; border-radius: var(--p-radius-lg); }
}

body.palladium-dark .p-direction-card__media { position: absolute; inset: 0; }
body.palladium-dark .p-direction-card__img,
body.palladium-dark .p-direction-card__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: scale(1.03);
  filter: saturate(1.05) contrast(1.04) brightness(.84);
}
body.palladium-dark .p-direction-card__img {
  object-fit: cover;
  object-position: 50% 35%;
}
body.palladium-dark .p-direction-card__bg {
  background-size: cover;
  background-position: center;
}
body.palladium-dark .p-direction-card__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 35%;
  opacity: 0;
  transition: opacity 220ms ease;
}
@media (hover:hover) and (pointer:fine) {
  body.palladium-dark .p-direction-card--video-active .p-direction-card__video { opacity: 1; }
  body.palladium-dark .p-direction-card {
    transition: transform 180ms ease, box-shadow 180ms ease;
  }
  body.palladium-dark .p-direction-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--p-shadow-lg);
  }
}
body.palladium-dark .p-direction-card__badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.92);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  opacity: .92;
}
body.palladium-dark .p-direction-card__badge::before { content: "▶"; font-size: 9px; }
@media (min-width:768px) {
  body.palladium-dark .p-direction-card__badge {
    top: 14px; right: 14px; padding: 7px 10px; font-size: 11px;
  }
  body.palladium-dark .p-direction-card__badge::before { font-size: 10px; }
}
body.palladium-dark .p-direction-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.04) 0%, rgba(0,0,0,.5) 50%, rgba(0,0,0,.92) 100%);
}
@media (min-width:768px) {
  body.palladium-dark .p-direction-card__overlay {
    background:
      radial-gradient(600px 300px at 14% 10%, rgba(210,139,61,.15), transparent 60%),
      linear-gradient(180deg, rgba(0,0,0,.06) 0%, rgba(0,0,0,.6) 55%, rgba(0,0,0,.92) 100%);
  }
}
body.palladium-dark .p-direction-card__content { position: relative; z-index: 2; }
body.palladium-dark .p-direction-card__title {
  font-size: 14px;
  line-height: 1.2;
  font-weight: 700;
  color: rgba(255,255,255,.98);
  text-shadow: 0 6px 18px rgba(0,0,0,.5);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
@media (min-width:480px) { body.palladium-dark .p-direction-card__title { font-size: 16px; } }
@media (min-width:768px) { body.palladium-dark .p-direction-card__title { font-size: 20px; font-weight: 650; } }
@media (min-width:1024px) { body.palladium-dark .p-direction-card__title { font-size: 22px; } }
body.palladium-dark .p-direction-card__meta {
  margin-top: 3px;
  color: rgba(255,255,255,.7);
  font-size: 11px;
  font-weight: 600;
}
@media (min-width:768px) {
  body.palladium-dark .p-direction-card__meta { margin-top: 8px; font-size: 14px; }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* 13. SCHEDULE CTA (cover section)                                       */
/* ═══════════════════════════════════════════════════════════════════════ */

body.palladium-dark .wp-block-cover.p-schedule-hero {
  margin: 16px 10px;
  border-radius: var(--p-radius-xl);
  overflow: hidden;
  box-shadow: var(--p-shadow-lg);
  border: 1px solid var(--p-border);
}
body.palladium-dark .wp-block-cover.p-schedule-hero .wp-block-cover__image-background {
  filter: saturate(1.08) contrast(1.08) brightness(.72);
  transform: scale(1.02);
}
body.palladium-dark .wp-block-cover.p-schedule-hero .wp-block-cover__background {
  background:
    radial-gradient(600px 300px at 80% 20%, rgba(37,214,200,.15), transparent 60%),
    radial-gradient(500px 300px at 10% 80%, rgba(210,139,61,.12), transparent 55%),
    linear-gradient(180deg, rgba(0,0,0,.18) 0%, rgba(0,0,0,.72) 58%, rgba(0,0,0,.92) 100%) !important;
}
body.palladium-dark .wp-block-cover.p-schedule-hero .wp-block-cover__inner-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 64px);
}
@media (min-width:768px) {
  body.palladium-dark .wp-block-cover.p-schedule-hero {
    margin: 22px 14px;
    border-radius: 36px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* 14. FINAL CTA                                                          */
/* ═══════════════════════════════════════════════════════════════════════ */

body.palladium-dark .p-final-cta {
  margin: 16px 10px;
  border-radius: var(--p-radius-xl);
  border: 1px solid var(--p-border);
  background:
    radial-gradient(600px 300px at 80% 15%, rgba(210,139,61,.12), transparent 55%),
    radial-gradient(500px 280px at 10% 85%, rgba(37,214,200,.06), transparent 55%),
    rgba(255,255,255,.03);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--p-shadow-lg);
  overflow: hidden;
  text-align: center;
}
@media (min-width:768px) {
  body.palladium-dark .p-final-cta { margin: 22px 14px; border-radius: 36px; }
}
body.palladium-dark .p-final-cta__inner {
  max-width: 800px;
  margin: 0 auto;
  padding: clamp(36px, 7vw, 96px) clamp(16px, 4vw, 48px);
}
body.palladium-dark .p-final-cta__text {
  max-width: 50ch;
  margin: 0 auto 28px;
  color: var(--p-text-muted);
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.6;
}
body.palladium-dark .p-final-cta__contacts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 28px;
}
@media (min-width:480px) {
  body.palladium-dark .p-final-cta__contacts { grid-template-columns: repeat(3, 1fr); gap: 12px; }
}
body.palladium-dark .p-final-cta__contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--p-radius-sm);
  text-decoration: none !important;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}
body.palladium-dark .p-final-cta__contact:hover {
  background: rgba(210,139,61,.10);
  border-color: rgba(210,139,61,.22);
  transform: translateY(-2px);
}
body.palladium-dark .p-final-cta__contact-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--p-text-faint);
  margin-bottom: 4px;
}
body.palladium-dark .p-final-cta__contact-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--p-text);
}
body.palladium-dark .p-final-cta__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
@media (min-width:480px) {
  body.palladium-dark .p-final-cta__actions {
    flex-direction: row;
    justify-content: center;
    gap: 12px;
  }
}

/* Custom .p-btn tokens */
body.palladium-dark .p-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 650;
  font-size: 15px;
  text-decoration: none !important;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}
body.palladium-dark .p-btn--primary {
  background: linear-gradient(180deg, rgba(210,139,61,.95), rgba(180,108,38,.95));
  border: 1px solid rgba(210,139,61,.35);
  color: #0b0b10;
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
}
body.palladium-dark .p-btn--ghost {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.92);
}
body.palladium-dark .p-btn--lg {
  padding: 14px 26px;
  font-size: 16px;
  width: 100%;
  text-align: center;
}
@media (min-width:480px) {
  body.palladium-dark .p-btn--lg { width: auto; }
}
@media (hover:hover) and (pointer:fine) {
  body.palladium-dark .p-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 36px rgba(0,0,0,.5);
  }
  body.palladium-dark .p-btn--ghost:hover {
    background: rgba(210,139,61,.18);
    border-color: rgba(210,139,61,.30);
  }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* 15. SCROLL REVEAL                                                      */
/* ═══════════════════════════════════════════════════════════════════════ */

body.palladium-dark.p-reveal--init .p-reveal {
  opacity: 0;
  transform: translateY(24px);
}
body.palladium-dark.p-reveal--init .p-reveal.p-reveal--visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 650ms cubic-bezier(.22,1,.36,1), transform 650ms cubic-bezier(.22,1,.36,1);
}
body.palladium-dark.p-reveal--init .p-reveal--visible .p-bento__card {
  animation: p-card-in 550ms cubic-bezier(.22,1,.36,1) both;
}
body.palladium-dark.p-reveal--init .p-reveal--visible .p-bento__card:nth-child(1) { animation-delay: 0ms; }
body.palladium-dark.p-reveal--init .p-reveal--visible .p-bento__card:nth-child(2) { animation-delay: 70ms; }
body.palladium-dark.p-reveal--init .p-reveal--visible .p-bento__card:nth-child(3) { animation-delay: 140ms; }
body.palladium-dark.p-reveal--init .p-reveal--visible .p-bento__card:nth-child(4) { animation-delay: 210ms; }
body.palladium-dark.p-reveal--init .p-reveal--visible .p-bento__card:nth-child(5) { animation-delay: 280ms; }
body.palladium-dark.p-reveal--init .p-reveal--visible .p-bento__card:nth-child(6) { animation-delay: 350ms; }
@keyframes p-card-in {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
body.palladium-dark.p-reveal--init .p-reveal--visible .p-final-cta__contact {
  animation: p-card-in 450ms cubic-bezier(.22,1,.36,1) both;
}
body.palladium-dark.p-reveal--init .p-reveal--visible .p-final-cta__contact:nth-child(1) { animation-delay: 0ms; }
body.palladium-dark.p-reveal--init .p-reveal--visible .p-final-cta__contact:nth-child(2) { animation-delay: 80ms; }
body.palladium-dark.p-reveal--init .p-reveal--visible .p-final-cta__contact:nth-child(3) { animation-delay: 160ms; }

/* ═══════════════════════════════════════════════════════════════════════ */
/* 16. DIRECTION PAGES (child of Направления)                             */
/* ═══════════════════════════════════════════════════════════════════════ */

body.palladium-dark .p-dir-hero.alignfull {
  position: relative;
  min-height: clamp(360px, 55vh, 700px);
  margin: 10px;
  border-radius: var(--p-radius-xl);
  overflow: hidden;
  box-shadow: var(--p-shadow-lg);
  border: 1px solid var(--p-border);
  background-image: var(--p-dir-hero-image);
  background-size: cover;
  background-position: center;
}
@media (min-width:768px) {
  body.palladium-dark .p-dir-hero.alignfull { margin: 14px; border-radius: 36px; }
}
body.palladium-dark .p-dir-hero__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(800px 400px at 12% 12%, rgba(210,139,61,.20), transparent 60%),
    radial-gradient(600px 400px at 90% 10%, rgba(37,214,200,.08), transparent 55%),
    linear-gradient(180deg, rgba(0,0,0,.10) 0%, rgba(0,0,0,.60) 55%, rgba(0,0,0,.92) 100%);
}
body.palladium-dark .p-dir-hero__inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--p-pad);
  min-height: inherit;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
body.palladium-dark .p-dir-hero__title {
  margin: 0;
  font-size: clamp(28px, 6vw, 64px);
  line-height: .98;
  text-shadow: 0 12px 36px rgba(0,0,0,.5);
}
body.palladium-dark .p-dir-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

/* Teacher posts (category: trainers) — hide default post header/title */
body.palladium-dark.p-teacher .entry-header,
body.palladium-dark.p-teacher .entry-title,
body.palladium-dark.p-teacher .ast-single-post .entry-header {
  display: none !important;
}

/* Teacher profile template (existing markup: .teacher-page) */
body.palladium-dark.p-teacher .ast-container {
  max-width: 100%;
}
body.palladium-dark.p-teacher .teacher-page {
  width: min(1200px, calc(100% - 20px));
  margin: 14px auto;
  border-radius: 36px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: var(--p-shadow-lg);
  background: rgba(255,255,255,.03);
  display: grid;
  grid-template-columns: 220px 1fr;
  grid-template-rows: clamp(260px, 40vh, 420px) auto auto;
  grid-template-areas:
    "avatar title"
    "body body"
    "actions actions";
  position: relative;
}
@media (max-width: 600px) {
  body.palladium-dark.p-teacher .teacher-page {
    width: calc(100% - 20px);
    border-radius: 26px;
    margin: 10px auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    grid-template-areas:
      "avatar"
      "title"
      "body"
      "actions";
  }
}
body.palladium-dark.p-teacher .teacher-page::before {
  content: "";
  grid-row: 1;
  grid-column: 1 / -1;
  z-index: 0;
  background:
    radial-gradient(900px 460px at 12% 12%, rgba(210,139,61,.22), transparent 60%),
    radial-gradient(700px 420px at 90% 10%, rgba(37,214,200,.08), transparent 55%),
    linear-gradient(180deg, rgba(0,0,0,.12) 0%, rgba(0,0,0,.62) 58%, rgba(0,0,0,.92) 100%);
  pointer-events: none;
}
body.palladium-dark.p-teacher .teacher-page > img {
  grid-area: avatar;
  z-index: 2;
  align-self: end;
  justify-self: center;
  width: 156px !important;
  height: 156px !important;
  border-radius: 999px !important;
  object-fit: contain !important;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 18px 46px rgba(0,0,0,.55);
  padding: 10px;
  box-sizing: border-box;
  display: block;
  transform: none;
  filter: none;
  margin: 0 0 18px 0;
}
@media (max-width: 600px) {
  body.palladium-dark.p-teacher .teacher-page > img {
    align-self: center;
    margin: 10px auto 0;
    width: 132px !important;
    height: 132px !important;
    padding: 8px;
  }
}
body.palladium-dark.p-teacher .teacher-page > h1 {
  grid-area: title;
  z-index: 2;
  align-self: end;
  margin: 0;
  padding: 0 18px 22px 0;
  font-size: clamp(30px, 6vw, 64px);
  line-height: .98;
  color: rgba(255,255,255,.96);
  text-shadow: 0 18px 46px rgba(0,0,0,.55);
}
@media (min-width: 768px) {
  body.palladium-dark.p-teacher .teacher-page > h1 {
    padding: 0 26px 26px 0;
  }
}
@media (max-width: 600px) {
  body.palladium-dark.p-teacher .teacher-page > h1 {
    align-self: start;
    text-align: center;
    padding: 18px 16px 10px;
  }
}

body.palladium-dark.p-teacher .teacher-page .full-desc {
  grid-area: body;
  padding: 18px 16px;
  background: rgba(7,7,10,.80);
  border-top: 1px solid rgba(255,255,255,.06);
}
@media (min-width: 768px) {
  body.palladium-dark.p-teacher .teacher-page .full-desc {
    padding: 22px 22px;
  }
}

body.palladium-dark.p-teacher .teacher-page .full-desc :where(p, ul, ol, blockquote) {
  max-width: 78ch;
  color: rgba(255,255,255,.74) !important;
  line-height: 1.65;
}
body.palladium-dark.p-teacher .teacher-page .full-desc p {
  margin: 0 0 14px;
}
body.palladium-dark.p-teacher .teacher-page .full-desc a {
  color: rgba(255,255,255,.88) !important;
  text-decoration-color: rgba(210,139,61,.35);
}
body.palladium-dark.p-teacher .teacher-page .full-desc a:hover {
  color: var(--p-accent-2) !important;
}
body.palladium-dark.p-teacher .teacher-page .full-desc .wp-block-quote {
  margin: 14px 0;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
}
body.palladium-dark.p-teacher .teacher-page .full-desc .wp-block-quote p {
  margin: 0;
}

body.palladium-dark.p-teacher .teacher-page .teacher-buttons {
  grid-area: actions;
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  background: rgba(7,7,10,.90);
  border-top: 1px solid rgba(255,255,255,.06);
}
body.palladium-dark.p-teacher .teacher-page .teacher-buttons a {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 650;
  text-decoration: none !important;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.92) !important;
}
body.palladium-dark.p-teacher .teacher-page .teacher-buttons a[href*="impulsecrm.ru/widget/"] {
  background: linear-gradient(180deg, rgba(210,139,61,.95), rgba(180,108,38,.95)) !important;
  border-color: rgba(210,139,61,.35) !important;
  color: #0b0b10 !important;
  box-shadow: 0 10px 26px rgba(0,0,0,.40);
}
@media (hover:hover) and (pointer:fine) {
  body.palladium-dark.p-teacher .teacher-page .teacher-buttons a:hover {
    transform: translateY(-1px);
  }
}

body.palladium-dark .p-teacher-hero__subtitle {
  max-width: 70ch;
  margin: 12px 0 0;
  color: rgba(255,255,255,.72);
  font-size: clamp(14px, 2vw, 18px);
  line-height: 1.5;
}

/* Prose skin for templated pages (teacher posts, etc) */
body.palladium-dark .p-prose {
  color: rgba(255,255,255,.78);
}
body.palladium-dark .p-prose :where(p, ul, ol, blockquote) {
  max-width: 75ch;
}
body.palladium-dark .p-prose p {
  margin: 0 0 14px;
  line-height: 1.65;
}
body.palladium-dark .p-prose :where(ul, ol) {
  margin: 0 0 14px;
  padding-left: 1.1rem;
}
body.palladium-dark .p-prose li {
  margin: 6px 0;
  color: rgba(255,255,255,.72);
}
body.palladium-dark .p-prose :where(h2, h3, h4) {
  color: rgba(255,255,255,.92);
  letter-spacing: -.02em;
  margin: 22px 0 12px;
  line-height: 1.15;
}
body.palladium-dark .p-prose h2 { font-size: clamp(22px, 3.2vw, 32px); }
body.palladium-dark .p-prose h3 { font-size: clamp(18px, 2.6vw, 24px); }
body.palladium-dark .p-prose h4 { font-size: clamp(16px, 2.2vw, 20px); }

body.palladium-dark .p-prose a {
  color: rgba(255,255,255,.86);
  text-decoration-color: rgba(210,139,61,.35);
}
body.palladium-dark .p-prose a:hover { color: var(--p-accent-2); }

body.palladium-dark .p-prose .wp-block-quote {
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 14px 34px rgba(0,0,0,.40);
}
body.palladium-dark .p-prose .wp-block-quote p {
  margin: 0;
  color: rgba(255,255,255,.80);
}

/* Direction pages — normalize legacy UAGB layouts into one consistent skin */
body.palladium-dark.p-direction .uagb-container__shape {
  display: none !important;
}
/* Legacy first block is just a duplicated title with huge paddings — remove it */
body.palladium-dark.p-direction .uagb-block-5b8951e7 {
  display: none !important;
}
/* Hide extra H1s inside legacy content, keep injected hero title */
body.palladium-dark.p-direction .entry-content h1:not(.p-dir-hero__title) {
  display: none !important;
}
body.palladium-dark.p-direction .p-dir-hero__title {
  display: block !important;
}

/* Hero enhancements for direction pages */
body.palladium-dark .p-dir-hero {
  isolation: isolate;
}
body.palladium-dark .p-dir-hero__watermark {
  position: absolute;
  left: clamp(14px, 3vw, 34px);
  top: clamp(14px, 3vw, 30px);
  z-index: 1;
  font-weight: 900;
  letter-spacing: -0.03em;
  font-size: clamp(28px, 7vw, 84px);
  line-height: 1;
  color: rgba(255,255,255,.08);
  text-transform: uppercase;
  pointer-events: none;
  user-select: none;
  max-width: min(92vw, 1100px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  mix-blend-mode: overlay;
}
body.palladium-dark .p-dir-hero__subtitle {
  max-width: 70ch;
  margin: 12px 0 0;
  color: rgba(255,255,255,.72);
  font-size: clamp(14px, 2vw, 18px);
  line-height: 1.5;
}

/* Articles */
body.palladium-dark.p-article .entry-header,
body.palladium-dark.p-article .entry-title,
body.palladium-dark.p-article .ast-single-post .entry-header {
  display: none !important;
}

body.palladium-dark .p-article-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
}
body.palladium-dark .p-article-meta__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.82);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}
body.palladium-dark .p-article-meta__date {
  color: rgba(255,255,255,.68);
  font-weight: 650;
  font-size: 13px;
}
body.palladium-dark .p-article-meta__dot {
  color: rgba(255,255,255,.35);
}

/* Slightly different watermark for articles */
body.palladium-dark .p-article-hero .p-dir-hero__watermark {
  color: rgba(255,255,255,.06);
}

/* Prose: media defaults */
body.palladium-dark .p-prose :where(img, video) {
  max-width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(0,0,0,.40);
}
body.palladium-dark .p-prose :where(figure) {
  margin: 18px auto;
  max-width: 920px;
}
body.palladium-dark .p-prose :where(figcaption) {
  margin-top: 10px;
  color: rgba(255,255,255,.55);
  font-size: 12px;
  text-align: center;
}

body.palladium-dark .p-article-cta {
  margin-top: 0;
}

/* If UAGB advanced headings appear later, make them match our typography */
body.palladium-dark.p-direction .wp-block-uagb-advanced-heading .uagb-heading-text {
  color: rgba(255,255,255,.92) !important;
  letter-spacing: -.02em;
  line-height: 1.12 !important;
}
body.palladium-dark.p-direction .wp-block-uagb-advanced-heading .uagb-desc-text {
  color: rgba(255,255,255,.62) !important;
  text-transform: uppercase;
  letter-spacing: .10em;
  font-weight: 800;
}

body.palladium-dark.p-direction .wp-block-uagb-container.alignfull {
  background: transparent !important;
  margin: 0 !important;
  padding: clamp(36px, 6vw, 92px) 16px !important;
}
body.palladium-dark.p-direction .uagb-container-inner-blocks-wrap {
  max-width: 1200px;
  margin: 0 auto;
}

body.palladium-dark.p-direction .entry-content :where(h2, h3, h4) {
  color: rgba(255,255,255,.92) !important;
  letter-spacing: -.02em;
  line-height: 1.15;
  margin: 22px auto 12px !important;
  max-width: 75ch;
}
body.palladium-dark.p-direction .entry-content h2 {
  font-size: clamp(22px, 3.4vw, 34px) !important;
}
body.palladium-dark.p-direction .entry-content h2:not(.uagb-ifb-title) {
  text-align: left !important;
}
body.palladium-dark.p-direction .entry-content h3 {
  font-size: clamp(18px, 2.8vw, 24px) !important;
}
body.palladium-dark.p-direction .entry-content :where(p, ul, ol, blockquote) {
  max-width: 75ch;
  margin-left: auto !important;
  margin-right: auto !important;
  color: rgba(255,255,255,.72) !important;
  line-height: 1.65;
}
body.palladium-dark.p-direction .entry-content :where(ul, ol) {
  padding-left: 1.1rem !important;
}
body.palladium-dark.p-direction .entry-content li {
  margin: 6px 0;
  color: rgba(255,255,255,.72) !important;
}
body.palladium-dark.p-direction .entry-content .wp-block-social-links {
  max-width: 1200px;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Inline light “cards” / FAQ accordions from legacy content */
body.palladium-dark.p-direction .entry-content :where(details, div, section, p, blockquote)[style*="background: #fff"],
body.palladium-dark.p-direction .entry-content :where(details, div, section, p, blockquote)[style*="background:#fff"],
body.palladium-dark.p-direction .entry-content :where(details, div, section, p, blockquote)[style*="background: #ffffff"],
body.palladium-dark.p-direction .entry-content :where(details, div, section, p, blockquote)[style*="background:#ffffff"],
body.palladium-dark.p-direction .entry-content :where(details, div, section, p, blockquote)[style*="background-color:#fff"],
body.palladium-dark.p-direction .entry-content :where(details, div, section, p, blockquote)[style*="background-color: #fff"],
body.palladium-dark.p-direction .entry-content :where(details, div, section, p, blockquote)[style*="background-color:#ffffff"],
body.palladium-dark.p-direction .entry-content :where(details, div, section, p, blockquote)[style*="background-color: #ffffff"] {
  background: rgba(255,255,255,.06) !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  border-radius: 18px !important;
  box-shadow: 0 14px 34px rgba(0,0,0,.40) !important;
  color: rgba(255,255,255,.80) !important;
  width: auto !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Legacy centered wrappers — keep reasonable spacing */
body.palladium-dark.p-direction .entry-content div[style*="text-align: center"],
body.palladium-dark.p-direction .entry-content div[style*="text-align:center"] {
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 1200px;
}

/* FAQ blocks authored as <details>/<summary> with inline light styles */
body.palladium-dark.p-direction .entry-content details {
  background: rgba(255,255,255,.06) !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  border-radius: 18px !important;
  padding: 14px 16px !important;
  margin: 0 auto 12px !important;
  max-width: min(920px, 100%);
  box-shadow: 0 14px 34px rgba(0,0,0,.40) !important;
}
body.palladium-dark.p-direction .entry-content details > summary {
  cursor: pointer;
  font-weight: 800 !important;
  color: rgba(255,255,255,.90) !important;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
body.palladium-dark.p-direction .entry-content details > summary::-webkit-details-marker {
  display: none;
}
body.palladium-dark.p-direction .entry-content details > summary::after {
  content: "+";
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.84);
}
body.palladium-dark.p-direction .entry-content details[open] > summary::after {
  content: "–";
}
body.palladium-dark.p-direction .entry-content details > :not(summary) {
  margin-top: 12px;
  color: rgba(255,255,255,.74) !important;
}

/* Video embeds (VK / YouTube) — consistent responsive card */
body.palladium-dark.p-direction .entry-content iframe[src*="vkvideo.ru"],
body.palladium-dark.p-direction .entry-content iframe[src*="youtube.com"],
body.palladium-dark.p-direction .entry-content iframe[src*="youtu.be"] {
  display: block !important;
  width: min(920px, 100%) !important;
  aspect-ratio: 16 / 9;
  height: auto !important;
  border: 0 !important;
  border-radius: 24px !important;
  margin: 18px auto !important;
  box-shadow: 0 18px 46px rgba(0,0,0,.55);
  overflow: hidden;
  background: rgba(0,0,0,.35);
}

/* Non-video iframes (rare) — just make them not ugly */
body.palladium-dark.p-direction .entry-content iframe {
  max-width: 100% !important;
  border-radius: 18px;
}

/* UAGB info-boxes inside direction pages — unify as glass cards */
body.palladium-dark.p-direction .wp-block-uagb-info-box {
  background: rgba(255,255,255,.05) !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  border-radius: 28px !important;
  box-shadow: 0 18px 46px rgba(0,0,0,.55) !important;
  padding: clamp(18px, 3vw, 28px) !important;
  max-width: 1200px;
  margin-left: auto !important;
  margin-right: auto !important;
}
body.palladium-dark.p-direction .wp-block-uagb-info-box .uagb-ifb-content {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* “Yellow notes” (inline light callouts like #fff8e1 / #fffbea / #fffbe6 / #fff3cd) */
body.palladium-dark.p-direction .entry-content :where(div, section, p, blockquote)[style*="background: #fff8e1"],
body.palladium-dark.p-direction .entry-content :where(div, section, p, blockquote)[style*="background:#fff8e1"],
body.palladium-dark.p-direction .entry-content :where(div, section, p, blockquote)[style*="background: #fffbea"],
body.palladium-dark.p-direction .entry-content :where(div, section, p, blockquote)[style*="background:#fffbea"],
body.palladium-dark.p-direction .entry-content :where(div, section, p, blockquote)[style*="background: #fffbe6"],
body.palladium-dark.p-direction .entry-content :where(div, section, p, blockquote)[style*="background:#fffbe6"],
body.palladium-dark.p-direction .entry-content :where(div, section, p, blockquote)[style*="background: #fff3cd"],
body.palladium-dark.p-direction .entry-content :where(div, section, p, blockquote)[style*="background:#fff3cd"] {
  background:
    radial-gradient(520px 260px at 18% 20%, rgba(210,139,61,.18), transparent 60%),
    rgba(255,255,255,.06) !important;
  border: 1px solid rgba(210,139,61,.22) !important;
  border-left-width: 4px !important;
  border-radius: 18px !important;
  box-shadow: 0 14px 34px rgba(0,0,0,.40) !important;
  color: rgba(255,255,255,.78) !important;
  width: auto !important;
  max-width: min(920px, 100%) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

/* Neutralize inline hard-coded dark text colors inside direction content */
body.palladium-dark.p-direction .entry-content :where(section, details, summary, p, span, strong, em, b, i, li, h2, h3, h4, div)[style*="color:"] {
  color: inherit !important;
}
body.palladium-dark.p-direction .entry-content :where(section, details, summary, p, span, strong, em, b, i, li, h2, h3, h4, div)[style*="color:#"] {
  color: inherit !important;
}

/* Keep emoji/CTA headings centered if author intended it */
body.palladium-dark.p-direction .entry-content :where(h2, h3)[style*="text-align: center"],
body.palladium-dark.p-direction .entry-content :where(h2, h3)[style*="text-align:center"] {
  text-align: center !important;
}


/* CTA info-box at the end of many direction pages — keep centered */
body.palladium-dark.p-direction .wp-block-uagb-info-box .uagb-ifb-title-prefix,
body.palladium-dark.p-direction .wp-block-uagb-info-box .uagb-ifb-title,
body.palladium-dark.p-direction .wp-block-uagb-info-box .uagb-ifb-desc {
  text-align: center !important;
}
body.palladium-dark.p-direction .wp-block-uagb-info-box .uagb-ifb-desc {
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 75ch;
}
body.palladium-dark.p-direction .wp-block-uagb-info-box .uagb-ifb-title {
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 28ch;
}
body.palladium-dark.p-direction .wp-block-uagb-info-box .uagb-ifb-button-wrapper {
  display: flex !important;
  justify-content: center !important;
}

/* Unify legacy “signup” links inside direction content into our buttons */
body.palladium-dark.p-direction .entry-content a[href*="impulsecrm.ru/widget/"] {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 12px 18px !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, rgba(210,139,61,.95), rgba(180,108,38,.95)) !important;
  border: 1px solid rgba(210,139,61,.35) !important;
  color: #0b0b10 !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  box-shadow: 0 10px 26px rgba(0,0,0,.40) !important;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* 17. PAGE-12 (Направления list page) legacy cards                      */
/* ═══════════════════════════════════════════════════════════════════════ */

body.palladium-dark.page-id-12 .directions-full-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
  gap: 16px !important;
}
body.palladium-dark.page-id-12 .direction-page {
  background: rgba(255,255,255,.05) !important;
  border: 1px solid var(--p-border) !important;
  border-radius: var(--p-radius-lg) !important;
  box-shadow: var(--p-shadow-lg);
  padding: 0 !important;
  overflow: hidden;
  position: relative;
  min-height: 340px;
  text-align: left !important;
}
body.palladium-dark.page-id-12 .direction-image { position: absolute; inset: 0; }
body.palladium-dark.page-id-12 .direction-image img {
  width: 100% !important; height: 100% !important;
  border-radius: 0 !important; object-fit: cover !important;
  margin: 0 !important; transform: scale(1.03);
}
body.palladium-dark.page-id-12 .direction-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.06) 0%, rgba(0,0,0,.55) 55%, rgba(0,0,0,.88) 100%);
  z-index: 1;
  pointer-events: none;
}
body.palladium-dark.page-id-12 .direction-title {
  position: absolute;
  left: 18px; right: 18px; bottom: 18px;
  margin: 0 !important;
  z-index: 3;
  color: rgba(255,255,255,.96) !important;
  font-weight: 650;
  font-size: clamp(18px, 2.5vw, 30px) !important;
  line-height: 1.1 !important;
  text-shadow: 0 12px 32px rgba(0,0,0,.5);
}
body.palladium-dark.page-id-12 .direction-full-text,
body.palladium-dark.page-id-12 .direction-buttons {
  position: absolute; left: 18px; right: 18px; z-index: 3;
  opacity: 0; transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}
body.palladium-dark.page-id-12 .direction-full-text {
  bottom: 72px; color: rgba(255,255,255,.72) !important; font-size: 13px !important; line-height: 1.5 !important;
}
body.palladium-dark.page-id-12 .direction-buttons {
  bottom: 16px; display: flex !important; gap: 8px !important;
}
body.palladium-dark.page-id-12 .details-button,
body.palladium-dark.page-id-12 .signup-button {
  background: rgba(255,255,255,.10) !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  color: rgba(255,255,255,.92) !important;
  padding: 8px 14px !important;
  border-radius: 999px !important;
  font-weight: 600 !important;
  backdrop-filter: blur(8px);
}
@media (hover:hover) and (pointer:fine) {
  body.palladium-dark.page-id-12 .direction-page:hover { transform: translateY(-3px); }
  body.palladium-dark.page-id-12 .direction-page:hover .direction-full-text,
  body.palladium-dark.page-id-12 .direction-page:hover .direction-buttons { opacity: 1; transform: translateY(0); }
  body.palladium-dark.page-id-12 .direction-page:hover .direction-title { transform: translateY(-76px); }
}
@media (max-width:600px) {
  body.palladium-dark.page-id-12 .direction-page { min-height: 280px; }
  body.palladium-dark.page-id-12 .direction-full-text,
  body.palladium-dark.page-id-12 .direction-buttons { opacity: 1; transform: none; }
  body.palladium-dark.page-id-12 .direction-title { bottom: 90px; }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* 18. FOOTER                                                             */
/* ═══════════════════════════════════════════════════════════════════════ */

body.palladium-dark .site-footer,
body.palladium-dark .ast-footer-overlay {
  background: var(--p-bg-0) !important;
  border-top: 1px solid rgba(255,255,255,.06);
}

/* Astra footer has nested wraps that may stay light — force dark everywhere */
body.palladium-dark .site-footer .site-primary-footer-wrap,
body.palladium-dark .site-footer .ast-builder-grid-row-container,
body.palladium-dark .site-footer .footer-widget-area,
body.palladium-dark .site-footer .footer-bar-navigation,
body.palladium-dark .site-footer .ast-footer-copyright,
body.palladium-dark .site-footer .ast-footer-html-1 {
  background: transparent !important;
}

body.palladium-dark .site-footer {
  color: rgba(255,255,255,.78);
}
body.palladium-dark .site-footer p,
body.palladium-dark .site-footer li {
  color: rgba(255,255,255,.68);
}
body.palladium-dark .site-footer a,
body.palladium-dark .site-footer .menu-link {
  color: rgba(255,255,255,.78) !important;
  text-decoration-color: rgba(210,139,61,.35);
}
body.palladium-dark .site-footer a:hover,
body.palladium-dark .site-footer .menu-link:hover {
  color: var(--p-accent-2) !important;
}

/* Subtle bottom gradient so the page doesn't end in a “white void” */
body.palladium-dark .site-footer::before {
  content: "";
  display: block;
  height: 48px;
  margin-top: -48px;
  background: linear-gradient(180deg, rgba(7,7,10,0) 0%, var(--p-bg-0) 100%);
  pointer-events: none;
}
