/* Andalusit – Elementor widgets, MECHANICS ONLY. The site stylesheet owns the look (colours, type, borders,
   shadows); the Style tab writes real CSS through Elementor's selectors (--as-gap-x/y, radius, chip colours…).
   Logical properties throughout (RTL site). */

/* wrapper + responsive column count (inline --as-cols-d/-t/-m come from the widget) */
.as-el { position: relative; --as-cols: var(--as-cols-d, 3); }
@media (max-width: 1024px) { .as-el { --as-cols: var(--as-cols-t, 2); } }
@media (max-width: 767px)  { .as-el { --as-cols: var(--as-cols-m, 1); } }
.as-el__empty { padding: 24px; text-align: center; opacity: .6; }
.as-el [hidden], .as-el[hidden] { display: none !important; }

/* grid */
.as-grid { display: grid; grid-template-columns: repeat(var(--as-cols, 3), minmax(0, 1fr)); gap: var(--as-gap-y, 24px) var(--as-gap-x, 24px); list-style: none; margin: 0; padding: 0; }
.as-grid__item { min-width: 0; }
.as-grid__item > .as-card, .as-grid__item > .as-tile, .as-grid__item > .as-quote, .as-grid__item > .as-leader { height: 100%; box-sizing: border-box; }
.as-grid__item--wide { grid-column: span 2; }
.as-grid__item--full { grid-column: 1 / -1; }
@media (max-width: 767px) { .as-grid__item--wide { grid-column: 1 / -1; } }
.as-tile { display: block; width: 100%; text-align: start; cursor: pointer; }
.as-tile__media, .as-tile__body { display: block; }
.as-tile__img, .as-card__img { display: block; max-width: 100%; }

/* slider (Elementor's Swiper): the track is Swiper's; arrows and dots are ours to style in the Style tab */
.as-slider { overflow: hidden; }
.as-slider .as-grid--slider { display: flex; flex-wrap: nowrap; gap: 0; }
.as-slider .swiper-slide { flex: none; height: auto; }
.as-slider__arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; cursor: pointer; }
.as-slider__arrow--prev { inset-inline-start: 0; }
.as-slider__arrow--next { inset-inline-end: 0; }
.as-slider__arrow.swiper-button-disabled { opacity: .3; pointer-events: none; }
.as-slider__dots { display: flex; justify-content: center; gap: 8px; }
.as-slider__dots:empty { display: none; }
.as-slider__dots .as-dot { width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; background: currentColor; opacity: .3; cursor: pointer; }
.as-slider__dots .as-dot.is-active { opacity: 1; }
.as-el[data-active-layout="grid"] .as-slider__arrow, .as-el[data-active-layout="grid"] .as-slider__dots { display: none; }

/* chips, tabs, filters: flex rows; the active state lives in aria-pressed / aria-selected (styled by the site CSS) */
.as-chips, .as-tabs, .as-filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--as-chip-gap, 8px); }
.as-chip, .as-tab { cursor: pointer; }
.as-chip[aria-pressed="true"], .as-tab[aria-selected="true"] { cursor: default; }
.as-chip__count { margin-inline-start: .35em; }
.as-filters__field { display: inline-flex; flex-direction: column; min-width: 0; }
@media (max-width: 767px) {
  .as-chips--scroll, .as-calendar .as-chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; scroll-snap-type: x proximity; }
  .as-calendar .as-chips::-webkit-scrollbar { display: none; }
  .as-calendar .as-chip { flex: none; scroll-snap-align: start; }
}

/* calendar / pagination */
.as-el[aria-busy="true"] [data-as-items] { opacity: .5; pointer-events: none; }
.as-pages { display: flex; flex-wrap: wrap; align-items: center; gap: var(--as-chip-gap, 8px); }
.as-pages__btn { cursor: pointer; }
.as-pages__btn[disabled] { opacity: .4; pointer-events: none; }
.as-pages__btn[aria-current] { cursor: default; }

/* series picker */
.as-series__panel:focus { outline: none; }

/* horizontal strips (gallery rows, lesson photos): scroll-snap, no scrollbar; width per item is a custom property */
.as-strip { display: flex; gap: var(--as-strip-gap, var(--as-gap-x, 24px)); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.as-strip::-webkit-scrollbar { display: none; }
.as-strip__item { flex: 0 0 var(--as-strip-item, 280px); max-width: 100%; scroll-snap-align: start; min-width: 0; }
.as-strip__item > .as-card { height: 100%; box-sizing: border-box; }
.as-strip-row__head { display: flex; align-items: center; justify-content: space-between; gap: var(--as-gap-x, 24px); }
.as-strip__nav { display: flex; gap: var(--as-chip-gap, 8px); }
.as-strip__arrow { cursor: pointer; }
.as-strip-row[aria-busy="true"] .as-strip { opacity: .5; pointer-events: none; }
.as-modal__strip .as-strip__item { flex-basis: var(--as-strip-item, 60%); }

/* <dialog> modals: top layer, scrollable body, backdrop click closes (JS) */
.as-modal { box-sizing: border-box; width: min(100% - 32px, 720px); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); padding: 0; border: 0; overflow: auto; }
.as-modal:not([open]) { display: none; }
.as-modal__body { position: relative; }
.as-modal__close { position: absolute; inset-block-start: 0; inset-inline-end: 0; cursor: pointer; }
.as-modal__fact { display: flex; gap: .5em; }
.as-modal__fact dt, .as-modal__fact dd { margin: 0; }

/* leadership: compact cards side by side, the wide one spans the row */
.as-leader { display: flex; gap: var(--as-gap-x, 24px); }
.as-leader__portrait { flex: 0 0 auto; }
.as-leader__portrait img { display: block; max-width: 100%; height: auto; }
.as-leader__body { min-width: 0; flex: 1 1 auto; }
@media (max-width: 767px) { .as-leader { flex-direction: column; } }

/* misc */
.as-status:empty { display: none; }
.as-btn--disabled { pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .as-strip { scroll-behavior: auto; } }
