/* AMBAS theme layout that lived as inline styles in the source page.
   Loaded after the compiled design system (assets/ambas.css). Uses the
   design tokens from :root. Also loaded into the block editor. */

/* ---- HERO ------------------------------------------------------------ */
.ambas-hero {
  position: relative;
  overflow: hidden;
  min-height: 92vh;
  display: flex;
  align-items: center;
  background: var(--color-primary-dark, #12163c);
}
.ambas-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: contrast(1.2) saturate(1.05);
}
.ambas-hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    var(--grad-ink, linear-gradient(160deg, rgba(18,22,60,.9), rgba(18,22,60,.6))),
    linear-gradient(90deg, rgba(18,22,60,.85) 0%, rgba(18,22,60,.45) 46%, rgba(18,22,60,0) 78%);
}
.ambas-hero__content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
  padding: 140px 1.25rem 3.5rem;
  color: #fff;
}
.ambas-hero__content > * { max-width: 660px; }
.ambas-hero__content .spectrum-eyebrow { color: #C9BDFF; }
.ambas-hero__content .wp-block-heading {
  color: #fff;
  font-family: var(--font-heading, Montserrat, sans-serif);
  font-weight: 800;
  font-size: clamp(2.1rem, 4.4vw, 3.5rem);
  line-height: 1.1;
  margin: 0 0 .5rem;
}
.ambas-hero__content .ambas-lead { font-size: 1.15rem; font-weight: 700; color: rgba(255,255,255,.96); }
.ambas-hero__content p { color: rgba(255,255,255,.9); }
.ambas-hero__content .check-list { list-style: none; padding: 0; margin: 1.25rem 0; display: flex; flex-direction: column; gap: .5rem; font-weight: 600; }
.ambas-hero__content .check-list li { position: relative; padding-left: 2rem; color: rgba(255,255,255,.96); }
.ambas-hero__content .check-list li::before {
  content: "";
  position: absolute; left: 0; top: .15em;
  width: 1.25rem; height: 1.25rem; border-radius: 50%;
  background: var(--grad-cta, linear-gradient(135deg,#6C5CE7,#8E7BFF));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}
.ambas-hero__content .check-list li::after {
  content: "";
  position: absolute; left: .34rem; top: .42em;
  width: .55rem; height: .3rem;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}
.ambas-hero__content .wp-block-buttons { margin-top: 1.5rem; gap: .75rem; }
.ambas-hero__content .wp-block-button__link {
  border-radius: var(--radius-sm, 5px);
  padding: .8rem 1.6rem;
  font-weight: 700;
  font-family: var(--font-heading, Montserrat, sans-serif);
}
.ambas-hero__content .btn-primary-pill > .wp-block-button__link {
  background: var(--grad-cta, linear-gradient(135deg,#6C5CE7,#8E7BFF));
  color: #fff;
  border: 0;
}
.ambas-hero__content .btn-secondary-pill > .wp-block-button__link {
  background: rgba(255,255,255,.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,.4);
}

/* ---- 3-LEVEL HEADER MENU (WP nav_menu: .menu-item-has-children / .sub-menu) ---- */
.site-nav .navbar-nav .menu-item-has-children { position: relative; }
.site-nav .navbar-nav > .menu-item-has-children > a { display: inline-flex; align-items: center; }

/* caret markers (pure CSS) */
.site-nav .navbar-nav > .menu-item-has-children > a::after {
  content: ""; margin-left: .38rem; width: .46rem; height: .46rem;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-1px) rotate(45deg); opacity: .75;
  transition: transform .2s var(--ease-standard, ease);
}
.site-nav .sub-menu .menu-item-has-children > a::after {
  content: ""; margin-left: auto; width: .42rem; height: .42rem; flex: none;
  border-top: 2px solid currentColor; border-right: 2px solid currentColor;
  transform: rotate(45deg); opacity: .5;
}

/* dropdown panels — dark-blue card in top/start state (over the hero), turns
   into a light card with dark text once the bar is white (sticky/scroll). The
   sticky override lives in the desktop media query below. */
.site-nav .sub-menu {
  list-style: none; margin: 0; padding: .4rem; min-width: 250px;
  background: rgba(30, 36, 97, .8); /* --color-primary #1E2461 @ 80% */
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius-card, 15px); box-shadow: var(--shadow-lift, 0 18px 44px rgba(30,36,97,.16));
}
.site-nav .sub-menu a {
  display: flex; align-items: center; gap: 1rem;
  padding: .55rem .8rem; border-radius: var(--radius-sm, 15px);
  color: #fff !important; text-decoration: none;
  font-size: .92rem; font-weight: 600; white-space: nowrap;
  transition: background .15s var(--ease-standard, ease), color .15s var(--ease-standard, ease);
}
.site-nav .sub-menu a:hover,
.site-nav .sub-menu a:focus-visible {
  background: rgba(255, 255, 255, .12); color: #fff !important;
}

/* ---- Desktop (>=992px): hover / keyboard-focus flyouts ---- */
@media (min-width: 992px) {
  .site-nav .sub-menu {
    position: absolute; z-index: 1050; opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity .18s var(--ease-standard, ease), transform .18s var(--ease-standard, ease);
  }
  .site-nav .navbar-nav > .menu-item-has-children > .sub-menu { top: 100%; left: 0; margin-top: .75rem; }
  .site-nav .navbar-nav > .menu-item-has-children > .sub-menu::before {
    content: ""; position: absolute; left: 0; right: 0; top: -.75rem; height: .75rem;
  }
  .site-nav .sub-menu .menu-item-has-children > .sub-menu { top: -.4rem; left: 100%; margin-left: .5rem; }
  .site-nav .sub-menu .menu-item-has-children > .sub-menu::before {
    content: ""; position: absolute; left: -.5rem; top: 0; bottom: 0; width: .5rem;
  }
  .site-nav .menu-item-has-children:hover > .sub-menu,
  .site-nav .menu-item-has-children:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
  .site-nav .navbar-nav > .menu-item-has-children:hover > a::after,
  .site-nav .navbar-nav > .menu-item-has-children:focus-within > a::after { transform: translateY(1px) rotate(-135deg); }

  /* Once the bar is white (sticky/scroll), the flyout becomes a light card
     with dark text to match. In the top/start state it stays the dark-blue
     card defined above (reads well over the hero). */
  .site-nav[data-header-config="sticky"] .sub-menu {
    background: rgba(255, 255, 255, .8); /* --color-surface @ 80% */
    border-color: var(--color-border, #E4E7F5);
  }
  .site-nav[data-header-config="sticky"] .sub-menu a { color: var(--color-text, #191D3B) !important; }
  .site-nav[data-header-config="sticky"] .sub-menu a:hover,
  .site-nav[data-header-config="sticky"] .sub-menu a:focus-visible {
    background: var(--color-bg-alt, #E9F1F7); color: var(--color-primary, #1E2461) !important;
  }
}

/* ---- Mobile (<992px): submenus expand inline (tap the item) ---- */
@media (max-width: 991.98px) {
  .site-nav .sub-menu {
    display: none; position: static; min-width: 0;
    background: transparent; border: none; box-shadow: none;
    padding: .15rem 0 .15rem 1rem; margin: .15rem 0 .35rem;
  }
  .site-nav .menu-item-has-children.open > .sub-menu { display: block; }
  .site-nav .sub-menu a { justify-content: flex-start; gap: .5rem; }
  .site-nav[data-header-config="top"] .sub-menu a { color: #fff !important; opacity: .92; }
  .site-nav .navbar-nav > .menu-item-has-children.open > a::after { transform: translateY(1px) rotate(-135deg); }
}

/* ---- LANGUAGE SWITCHER (dropdown: accent pill toggle + frosted flyout) ---- */
.site-nav__lang.lang-dd { position: relative; display: inline-flex; font-weight: 700; font-size: .85rem; }
/* toggle = accent pill showing the current language + caret */
.lang-dd__toggle {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .28rem .7rem; border: 0; border-radius: var(--radius-sm, 15px); line-height: 1; cursor: pointer;
  font: inherit; color: #fff;
  background: var(--color-cta, #2FB3E6);
  background-image: linear-gradient(180deg, #46BEEC 0%, var(--color-cta, #2FB3E6) 100%);
  box-shadow: var(--shadow-glow-cta, 0 10px 28px rgba(47, 179, 230, .34));
  transition: box-shadow .18s var(--ease-standard, ease), transform .18s var(--ease-standard, ease);
}
.lang-dd:hover .lang-dd__toggle,
.lang-dd:focus-within .lang-dd__toggle {
  background-image: linear-gradient(180deg, #3BB6E7 0%, var(--color-cta-dark, #1E8FBE) 100%);
  box-shadow: 0 16px 36px rgba(47, 179, 230, .42);
}
.lang-dd__toggle::after {
  content: ""; width: .4rem; height: .4rem;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-1px) rotate(45deg); opacity: .85;
  transition: transform .2s var(--ease-standard, ease);
}
.lang-dd:hover .lang-dd__toggle::after,
.lang-dd:focus-within .lang-dd__toggle::after { transform: translateY(1px) rotate(-135deg); }
/* flyout menu — solid dark-blue card, matches the nav / mobile menu panels */
.lang-dd__menu {
  position: absolute; top: 100%; right: 0; z-index: 1050; margin-top: .5rem;
  min-width: 3.6rem; padding: .3rem; display: flex; flex-direction: column; gap: .15rem;
  background: var(--color-primary, #1E2461);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius-sm, 15px); box-shadow: var(--shadow-lift, 0 18px 44px rgba(30,36,97,.16));
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .18s var(--ease-standard, ease), transform .18s var(--ease-standard, ease);
}
/* transparent bridge across the .5rem gap so moving the cursor from the toggle
   to the menu keeps .lang-dd:hover alive (otherwise the flyout vanishes) */
.lang-dd__menu::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: .5rem;
}
.lang-dd:hover .lang-dd__menu,
.lang-dd:focus-within .lang-dd__menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-dd__item {
  display: block; text-align: center; padding: .32rem .55rem; border-radius: var(--radius-sm, 15px); line-height: 1;
  text-decoration: none; color: #fff;
  transition: color .18s var(--ease-standard, ease), background .18s var(--ease-standard, ease);
}
.lang-dd__item:hover,
.lang-dd__item:focus-visible { color: #fff; background: rgba(255, 255, 255, .12); }

/* ---- Compact contact CTA in the header (smaller than the global pill) ---- */
.site-nav .btn-primary-pill {
  padding: .34rem .8rem;
  font-size: .78rem;
}

/* ---- Tighter spacing between top-level menu items ---- */
@media (min-width: 992px) {
  .site-nav .navbar-nav { gap: .05rem; }
  /* beat Bootstrap's `.navbar-expand-lg .navbar-nav .nav-link` (0,3,0) */
  .site-nav .navbar-nav > li > a.nav-link { padding-inline: .38rem; }
}

/* ---- Events page: dark category-filter sidebar + calendar (2-column) ---- */
.ambas-events-layout {
  display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 2.5rem; align-items: start;
}
.ambas-events-main { min-width: 0; }
/* TEC adds top padding on its container (64px mobile / 96px desktop, via a
   higher-specificity breakpoint rule); our .section wrapper already supplies the
   top spacing, so drop it — !important is needed to beat TEC's breakpoint rule. */
.ambas-events-main .tribe-events-l-container { padding-top: 0 !important; }
@media (max-width: 900px) {
  .ambas-events-layout { grid-template-columns: 1fr; gap: 1.5rem; }
}
.ambas-events-sidebar {
  background: var(--color-primary, #1E2461);
  border-radius: var(--radius-card, 15px);
  padding: 1.75rem 1.6rem; color: #fff;
}
@media (min-width: 901px) {
  .ambas-events-sidebar { position: sticky; top: 96px; }
}

/* Category checkbox filter (inside the dark sidebar) */
.ambas-evt-filter { display: block; }
.ambas-evt-filter__title {
  margin: 0 0 1.1rem; padding-bottom: .75rem; font-size: 1.15rem; font-weight: 700; color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .18);
}
.ambas-evt-filter__list { display: flex; flex-direction: column; gap: .8rem; }
.ambas-evt-filter__row {
  display: flex; align-items: center; gap: .7rem; cursor: pointer;
  font-size: .95rem; color: rgba(255, 255, 255, .9); line-height: 1.3;
}
.ambas-evt-filter__row:hover { color: #fff; }
.ambas-evt-filter__row input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  inline-size: 1.15rem; block-size: 1.15rem; margin: 0; flex-shrink: 0; cursor: pointer;
  border: 2px solid rgba(255, 255, 255, .55); border-radius: 5px; background: transparent;
  display: inline-grid; place-content: center; transition: border-color .15s, background .15s;
}
.ambas-evt-filter__row input[type="checkbox"]::before {
  content: ""; inline-size: .6rem; block-size: .6rem; transform: scale(0);
  transition: transform .12s var(--ease-standard, ease);
  box-shadow: inset 1rem 1rem var(--color-cta, #2FB3E6);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
.ambas-evt-filter__row input[type="checkbox"]:checked { border-color: var(--color-cta, #2FB3E6); background: #fff; }
.ambas-evt-filter__row input[type="checkbox"]:checked::before { transform: scale(1); }
.ambas-evt-filter__row input[type="checkbox"]:focus-visible { outline: 2px solid var(--color-cta, #2FB3E6); outline-offset: 2px; }

.ambas-evt-filter__actions { display: flex; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.ambas-evt-filter__apply {
  border: 0; cursor: pointer; padding: .5rem 1.4rem; border-radius: 999px;
  font-size: .9rem; font-weight: 600; color: #fff;
  background: var(--color-cta, #2FB3E6);
  background-image: linear-gradient(180deg, #46BEEC 0%, var(--color-cta, #2FB3E6) 100%);
  transition: box-shadow .18s var(--ease-standard, ease);
}
.ambas-evt-filter__apply:hover { box-shadow: 0 10px 24px rgba(47, 179, 230, .4); }
.ambas-evt-filter__reset {
  font-size: .88rem; font-weight: 600; text-decoration: none; color: rgba(255, 255, 255, .7);
}
.ambas-evt-filter__reset:hover { color: #fff; text-decoration: underline; }

.ambas-breadcrumbs { margin: 0 0 1rem; font-size: .85rem; }
.ambas-breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0; }
.ambas-breadcrumbs li { display: inline-flex; align-items: center; gap: .4rem; color: var(--color-text-muted, #6b7280); }
.ambas-breadcrumbs li:not(:last-child)::after { content: "\203A"; opacity: .55; }
.ambas-breadcrumbs a { color: var(--color-cta, #2FB3E6); text-decoration: none; }
.ambas-breadcrumbs a:hover { text-decoration: underline; }
.ambas-breadcrumbs li [aria-current], .ambas-breadcrumbs li[aria-current] { color: var(--color-text, #191D3B); font-weight: 600; }

/* ---- Full-width header: stretch the nav across the whole bar ---- */
/* This hand-picked Bootstrap build omits `.container-fluid { width: 100% }` and the
   `.px-lg-*` utilities, so set both here: fill the bar, with a comfortable side gutter. */
.site-nav > .container-fluid { width: 100%; padding-inline: 1rem; }
@media (min-width: 992px) {
  .site-nav > .container-fluid { padding-inline: 2.5rem; }
}
@media (min-width: 992px) {
  /* Fill the row so the menu centres and the language/contact group hugs the right edge. */
  .site-nav .navbar-collapse { flex-grow: 1; }
}

/* ---- Deep-menu edge flip: flyouts that would overflow the right edge open leftward ---- */
@media (min-width: 992px) {
  .site-nav .navbar-nav > .menu-item-has-children.flip > .sub-menu { left: auto; right: 0; }
  .site-nav .sub-menu .menu-item-has-children.flip > .sub-menu {
    left: auto; right: 100%; margin-left: 0; margin-right: .5rem;
  }
  .site-nav .sub-menu .menu-item-has-children.flip > .sub-menu::before {
    left: auto; right: -.5rem;
  }
}

/* ---- Inner pages (404, single posts/pages) have no dark hero, so the header's
   "top" state would show white text on a light background. Make it solid & readable. ---- */
body:not(.home) .site-nav[data-header-config="top"] {
  background: #fff;
  box-shadow: var(--shadow-soft, 0 10px 30px rgba(30,36,97,.08));
}
body:not(.home) .site-nav[data-header-config="top"] .nav-link,
body:not(.home) .site-nav[data-header-config="top"] a.site-nav__lang-item {
  color: var(--color-text, #1b2036);
}
body:not(.home) .site-nav[data-header-config="top"] .nav-link:hover,
body:not(.home) .site-nav[data-header-config="top"] .nav-link:focus-visible {
  color: var(--color-primary, #1E2461);
}

/* ---- "Про нас" tab bar (page-about.php + single.php) ---- */
/* Clears the fixed 88px header (like .section's top padding does for sections). */
.about-tabs { background: #fff; border-bottom: 1px solid var(--color-border, #E4E7F5); margin-top: 88px; position: sticky; top: 88px; z-index: 900; }
@media (max-width: 991.98px) { .about-tabs { margin-top: 74px; top: 74px; } }
/* Trim the section's top padding a little since the tab bar already spaces it. */
.about-tabs + .section { padding-top: 2.5rem; }
.about-tabs__list {
  display: flex; flex-wrap: wrap; gap: 0 1.75rem; list-style: none; margin: 0; padding: 0;
}
.about-tabs__item > a {
  display: inline-block; padding: 1.05rem .2rem; white-space: nowrap;
  color: var(--color-text-muted, #6b7280); text-decoration: none;
  font-family: var(--font-heading, Montserrat, sans-serif); font-weight: 600; font-size: .98rem;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
  transition: color .15s var(--ease-standard, ease), border-color .15s var(--ease-standard, ease);
}
.about-tabs__item > a:hover,
.about-tabs__item > a:focus-visible { color: var(--color-primary, #1E2461); }
.about-tabs__item.is-active > a {
  color: var(--color-primary, #1E2461);
  border-bottom-color: var(--color-accent, #6C5DD3);
}

/* Light prose defaults for page/post content rendered by the theme */
.ambas-prose { color: var(--color-text, #1b2036); line-height: 1.7; }
.ambas-prose > :first-child { margin-top: 0; }
.ambas-prose h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin: 2rem 0 .75rem; }
.ambas-prose h3 { font-size: 1.25rem; margin: 1.5rem 0 .5rem; }
.ambas-prose p { margin: 0 0 1rem; }
.ambas-prose a { color: var(--color-accent-dark, #4B3FA8); }

/* ---- HERO banner intro list: white check (V) markers instead of disc bullets ---- */
.hero-check-list { list-style: none; margin: 1.25rem 0 1.5rem; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.hero-check-list > li { display: flex; gap: .7rem; align-items: flex-start; }
.hero-check-list > li::before {
  content: "";
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: .28rem;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E");
}
.hero-check-list > li > p { margin: 0 !important; }

/* ---- SSP PODCAST PLAYER: keep the 16:9 cover's aspect (no square crop) ----
   SSP locks the artwork to a 150x150 square, cropping our 16:9 episode covers.
   Give the artwork a fixed height and a floating (auto) width so it keeps the
   photo's real aspect ratio in full; the body/controls flex to fill the rest.
   Paired with the ssp_album_art_cover filter (functions.php) serving the
   full-size image. Desktop only — SSP collapses the artwork below 768px. */
@media (min-width: 769px) {
  .castos-player .player__main {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: stretch;
  }
  .castos-player .player__artwork,
  .castos-player .player__artwork img {
    height: 150px !important;
    width: auto !important;
  }
  .castos-player .player__artwork img {
    max-width: none !important;
    object-fit: contain;
    display: block;
  }
  .castos-player .player__body {
    flex: 1 1 auto;
    min-width: 0;
  }
}
