/* =========================================================
   AXIS UPSKILL — Elementor Hero Slider (CSS)
   Main container class : axis-hero-slider
   Slide container class: axis-hero-slide
   Optional widget classes: axis-badge, axis-title, axis-subtitle,
   axis-desc, axis-btn-row, axis-btn-primary, axis-btn-secondary
   ========================================================= */

.axis-hero-slider {
  --axis-navy: #092d50;
  --axis-blue: #123f66;
  --axis-orange: #f47721;
  --axis-white: #ffffff;
  --axis-light: #f3f5f8;

  --axis-h: 0px;
  --axis-fade: 0.9s;
  --axis-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --axis-pad-x: clamp(24px, 7vw, 110px);
  --axis-delay: 5000ms; /* set by JS from CONFIG.autoplayDelay */
  --axis-font: "Plus Jakarta Sans", "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  isolation: isolate;
  background-color: var(--axis-navy);
  touch-action: pan-y;
}

/* ---------- Full width: break out of boxed theme / page wrappers ---------- */
body:not(.elementor-editor-active) .axis-hero-slider {
  box-sizing: border-box;
  flex: 0 0 auto;
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
}

html:has(.axis-hero-slider),
body:has(.axis-hero-slider) {
  overflow-x: clip; /* stops the 100vw scrollbar gap causing sideways scroll */
}

/* If the main container is set to "Boxed", Elementor adds an inner wrapper.
   Flatten it so the slides still sit directly in the slider grid. */
.axis-hero-slider > .axis-hero-inner {
  display: contents !important;
}

/* ---------- Before JS runs / no-JS: show the first slide only ---------- */
.axis-hero-slider:not(.axis-is-ready) .axis-hero-slide:not(:first-child) {
  display: none;
}

/* ---------- Stacked grid: all slides share one cell ----------
   The cell grows to the tallest slide, so content is never
   clipped, never overlaps, and the layout never jumps.        */
.axis-hero-slider.axis-is-ready {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(var(--axis-h), auto);
  gap: 0 !important;
}

/* ---------- Slide base ---------- */
.axis-hero-slider .axis-hero-slide {
  --width: 100%;

  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background-color: var(--axis-navy);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.axis-hero-slider.axis-is-ready .axis-hero-slide {
  grid-area: 1 / 1;
  z-index: 1;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--axis-fade) var(--axis-ease),
    visibility 0s linear var(--axis-fade);
}

.axis-hero-slider.axis-is-ready .axis-hero-slide.is-active {
  z-index: 2;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity var(--axis-fade) var(--axis-ease),
    visibility 0s linear 0s;
}

/* ---------- Optional brand overlay: only when a slide has the class
   axis-brand-overlay. By default use Elementor's own Background Overlay
   (Style tab), which is fully controllable. ---------- */
.axis-hero-slider .axis-hero-slide.axis-brand-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    rgba(9, 45, 80, 0.94) 0%,
    rgba(9, 45, 80, 0.8) 42%,
    rgba(18, 63, 102, 0.38) 100%
  );
}

.axis-hero-slider .axis-hero-slide.axis-brand-overlay > *:not(.axis-hero-nav) {
  position: relative;
  z-index: 2;
}

/* ---------- Typography ---------- */
.axis-hero-slide .axis-badge {
  width: auto;
}

.axis-hero-slide .axis-badge .elementor-heading-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px 18px;
  border: 1px solid rgba(244, 119, 33, 0.65);
  border-radius: 999px;
  background: rgba(244, 119, 33, 0.14);
  color: var(--axis-white);
  font-family: var(--axis-font);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.axis-hero-slide .axis-badge .elementor-heading-title::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--axis-orange);
  flex: none;
}

.axis-hero-slide .axis-title .elementor-heading-title {
  margin: 0;
  color: var(--axis-white);
  font-family: var(--axis-font);
  font-size: clamp(2.1rem, 1.2rem + 3.6vw, 4.25rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.axis-hero-slide .axis-accent,
.axis-hero-slide .axis-title .elementor-heading-title span.axis-accent {
  color: var(--axis-orange);
}

.axis-hero-slide .axis-subtitle .elementor-heading-title {
  margin: 0;
  color: var(--axis-light);
  font-family: var(--axis-font);
  font-size: clamp(1.1rem, 0.95rem + 0.8vw, 1.5rem);
  font-weight: 500;
  line-height: 1.4;
}

.axis-hero-slide .axis-desc,
.axis-hero-slide .axis-desc p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-family: var(--axis-font);
  font-size: clamp(0.98rem, 0.92rem + 0.3vw, 1.125rem);
  font-weight: 400;
  line-height: 1.7;
}

/* ---------- Buttons ---------- */
.axis-hero-slide .axis-btn-row {
  --flex-direction: row;
  --flex-wrap: wrap;
  --align-items: center;
  --justify-content: flex-start;
  --gap: 16px;
  --row-gap: 16px;
  --column-gap: 16px;
  --padding-top: 10px;
  --padding-right: 0px;
  --padding-bottom: 0px;
  --padding-left: 0px;
  width: auto;
}

.axis-hero-slide .axis-btn-primary .elementor-button,
.axis-hero-slide .axis-btn-secondary .elementor-button {
  padding: 16px 32px;
  border: 2px solid var(--axis-orange);
  border-radius: 999px;
  font-family: var(--axis-font);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  box-shadow: none;
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease,
    transform 0.3s var(--axis-ease),
    box-shadow 0.3s ease;
}

.axis-hero-slide .axis-btn-primary .elementor-button {
  background: var(--axis-orange);
  color: var(--axis-white);
  box-shadow: 0 10px 28px rgba(244, 119, 33, 0.35);
}

.axis-hero-slide .axis-btn-primary .elementor-button:hover,
.axis-hero-slide .axis-btn-primary .elementor-button:focus-visible {
  background: #ff8a3a;
  border-color: #ff8a3a;
  color: var(--axis-white);
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(244, 119, 33, 0.45);
}

.axis-hero-slide .axis-btn-secondary .elementor-button {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.7);
  color: var(--axis-white);
}

.axis-hero-slide .axis-btn-secondary .elementor-button:hover,
.axis-hero-slide .axis-btn-secondary .elementor-button:focus-visible {
  background: var(--axis-white);
  border-color: var(--axis-white);
  color: var(--axis-navy);
  transform: translateY(-2px);
}

/* ---------- Content entrance (staggered) ----------
   --axis-i is set per widget by the JS.
   Outgoing content fades fast; incoming content waits for the
   background to start fading in, so text never collides.      */
.axis-hero-slider.axis-is-ready .axis-hero-slide .elementor-widget {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

.axis-hero-slider.axis-is-ready .axis-hero-slide.is-active .elementor-widget {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.8s var(--axis-ease) calc(0.35s + var(--axis-i, 0) * 0.09s),
    transform 0.8s var(--axis-ease) calc(0.35s + var(--axis-i, 0) * 0.09s);
}

/* ---------- Arrows ---------- */
.axis-hero-slider .axis-hero-arrow {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(9, 45, 80, 0.45);
  color: var(--axis-white);
  box-shadow: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    transform 0.3s var(--axis-ease);
}

/* Small prev/next pair, bottom centre, inside each slide container */
.axis-hero-slider .axis-hero-slide > .axis-hero-nav {
  position: absolute;
  left: 50%;
  bottom: clamp(20px, 3.5vh, 36px);
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
}

/* If dots are enabled in settings, lift the arrows above them */
.axis-hero-slider.has-dots .axis-hero-slide > .axis-hero-nav {
  bottom: clamp(56px, 8vh, 76px);
}

.axis-hero-slider .axis-hero-arrow:hover,
.axis-hero-slider .axis-hero-arrow:focus-visible {
  background: var(--axis-orange);
  border-color: var(--axis-orange);
  color: var(--axis-white);
  transform: scale(1.08);
}

.axis-hero-slider .axis-hero-arrow:focus-visible,
.axis-hero-slider .axis-hero-dot:focus-visible {
  outline: 2px solid var(--axis-white);
  outline-offset: 3px;
}

.axis-hero-slider .axis-hero-arrow svg {
  display: block;
  width: 18px;
  height: 18px;
  pointer-events: none;
}

/* ---------- Pagination dots (active dot doubles as a progress bar) ---------- */
.axis-hero-slider .axis-hero-dots {
  position: absolute;
  left: 50%;
  bottom: clamp(22px, 4vh, 44px);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 6px;
  transform: translateX(-50%);
}

.axis-hero-slider .axis-hero-dot {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 12px 4px; /* larger tap target */
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.axis-hero-slider .axis-hero-dot-bar {
  position: relative;
  display: block;
  width: 10px;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition:
    width 0.45s var(--axis-ease),
    background-color 0.3s ease;
}

.axis-hero-slider .axis-hero-dot:hover .axis-hero-dot-bar {
  background: var(--axis-white);
}

.axis-hero-slider .axis-hero-dot.is-active .axis-hero-dot-bar {
  width: 48px;
  background: rgba(255, 255, 255, 0.35);
}

.axis-hero-slider .axis-hero-dot-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--axis-orange);
  transform: scaleX(0);
  transform-origin: left center;
}

/* Static fill while autoplay is paused, animated while playing */
.axis-hero-slider .axis-hero-dot.is-active .axis-hero-dot-bar::after {
  transform: scaleX(1);
}

.axis-hero-slider.is-playing .axis-hero-dot.is-active .axis-hero-dot-bar::after {
  animation: axis-hero-progress var(--axis-delay) linear forwards;
}

@keyframes axis-hero-progress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .axis-hero-slider {
    --axis-h: 0px;
    --axis-pad-x: clamp(24px, 8vw, 72px);
  }

}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  .axis-hero-slider {
    --axis-h: 0px;
    --axis-pad-x: 22px;
  }

  .axis-hero-slider .axis-hero-slide.axis-brand-overlay::after {
    background: linear-gradient(
      180deg,
      rgba(9, 45, 80, 0.9) 0%,
      rgba(9, 45, 80, 0.82) 55%,
      rgba(9, 45, 80, 0.92) 100%
    );
  }

  .axis-hero-slider .axis-hero-arrow {
    width: 36px;
    height: 36px;
  }

  .axis-hero-slide .axis-btn-row {
    --flex-direction: column;
    --align-items: stretch;
    width: 100%;
  }

  .axis-hero-slide .axis-btn-primary,
  .axis-hero-slide .axis-btn-secondary {
    width: 100%;
  }

  .axis-hero-slide .axis-btn-primary .elementor-button,
  .axis-hero-slide .axis-btn-secondary .elementor-button {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .axis-hero-slider {
    --axis-fade: 0.01s;
  }

  .axis-hero-slider.axis-is-ready .axis-hero-slide .elementor-widget,
  .axis-hero-slider.axis-is-ready .axis-hero-slide.is-active .elementor-widget {
    transform: none;
    transition-duration: 0.01s;
    transition-delay: 0s;
  }
}

/* ---------- Elementor editor: stack the slides so each one is
   fully visible and editable. JS does not run in the editor. ---------- */
.elementor-editor-active .axis-hero-slider {
  display: flex !important;
  flex-direction: column;
  min-height: 0;
  overflow: visible;
}

.elementor-editor-active .axis-hero-slider .axis-hero-slide {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  min-height: 520px;
  margin-bottom: 10px;
  outline: 2px dashed rgba(244, 119, 33, 0.75);
  outline-offset: -4px;
}

.elementor-editor-active .axis-hero-slider .elementor-widget {
  opacity: 1 !important;
  transform: none !important;
}
