/* ==========================================================================
   Magengrim — motion layer
   Subtle, professional entrance + interaction animations.
   Everything is opt-in via [data-anim] and fully disabled for users who
   have requested reduced motion.
   ========================================================================== */

:root {
  --mg-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --mg-dur: 720ms;
}

/* --- Entrance animations ------------------------------------------------ */

html.mg-js [data-anim] {
  opacity: 0;
  will-change: opacity, transform;
  transition:
    opacity var(--mg-dur) var(--mg-ease),
    transform var(--mg-dur) var(--mg-ease);
  transition-delay: var(--mg-delay, 0ms);
}

html.mg-js [data-anim="up"]    { transform: translate3d(0, 26px, 0); }
html.mg-js [data-anim="fade"]  { transform: none; }
html.mg-js [data-anim="left"]  { transform: translate3d(-28px, 0, 0); }
html.mg-js [data-anim="right"] { transform: translate3d(28px, 0, 0); }
html.mg-js [data-anim="zoom"]  { transform: scale(0.965); }

html.mg-js [data-anim].is-visible {
  opacity: 1;
  transform: none;
}

/* Images settle in with a whisper of scale rather than a slide. */
.elementor-widget-image img[data-anim] {
  transform: scale(1.02);
}

/* --- Header ------------------------------------------------------------- */

/* Header contents fade down once on load. */
.ekit-template-content-header .elementor-element-733c4f0e {
  animation: mgHeaderIn 800ms var(--mg-ease) both;
}

@keyframes mgHeaderIn {
  from { opacity: 0; transform: translate3d(0, -10px, 0); }
  to   { opacity: 1; transform: none; }
}

/* Nav links get an underline that grows from the centre. */
.jkit-nav-menu .jkit-menu > li > a {
  position: relative;
  transition: color 260ms var(--mg-ease);
}

@media (min-width: 1025px) {
  .jkit-nav-menu .jkit-menu > li > a::after {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 4px;
    height: 1.5px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: center;
    opacity: 0.55;
    transition: transform 320ms var(--mg-ease);
  }

  .jkit-nav-menu .jkit-menu > li:hover > a::after,
  .jkit-nav-menu .jkit-menu > li.current-menu-item > a::after {
    transform: scaleX(1);
  }
}

/* --- Buttons ------------------------------------------------------------ */

.elementor-button,
.jkit-button-wrapper {
  transition:
    transform 280ms var(--mg-ease),
    box-shadow 280ms var(--mg-ease),
    background-color 280ms var(--mg-ease);
}

.elementor-button:hover,
.jkit-button-wrapper:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(44, 27, 99, 0.22);
}

.elementor-button:active,
.jkit-button-wrapper:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(44, 27, 99, 0.18);
}

/* --- Cards & panels ----------------------------------------------------- */

.elementor-widget-icon-box,
.elementor-widget-image-box,
.jkit-icon-box,
.jkit-image-box,
.card-wrapper {
  transition:
    transform 380ms var(--mg-ease),
    box-shadow 380ms var(--mg-ease);
}

.elementor-widget-icon-box:hover,
.elementor-widget-image-box:hover,
.jkit-icon-box:hover,
.jkit-image-box:hover {
  transform: translateY(-5px);
}

/* Accordion styling lives in the FAQ ACCORDION block at the end of this file. */

/* --- Images ------------------------------------------------------------- */

.elementor-widget-image img,
.jkit-image-box img {
  transition: transform 620ms var(--mg-ease);
}

.elementor-widget-image a:hover img,
.jkit-image-box:hover img {
  transform: scale(1.03);
}

/* Logo has a quieter response than content images: it fades, never scales. */
.jkit-nav-logo img {
  transition: opacity 260ms var(--mg-ease);
}

.ekit-template-content-header .elementor-element-1d9ff4 a:hover img {
  opacity: 0.82;
}

/* --- Links -------------------------------------------------------------- */

.elementor-widget-icon-list .elementor-icon-list-item a,
.jkit-icon-list a {
  transition: transform 260ms var(--mg-ease), color 260ms var(--mg-ease);
  display: inline-block;
}

.elementor-widget-icon-list .elementor-icon-list-item a:hover,
.jkit-icon-list a:hover {
  transform: translateX(3px);
}

/* Social icons */
.elementor-social-icon,
.jkit-social-icon a {
  transition: transform 300ms var(--mg-ease), opacity 300ms var(--mg-ease);
}

.elementor-social-icon:hover,
.jkit-social-icon a:hover {
  transform: translateY(-3px) scale(1.06);
}

/* --- Section backgrounds ------------------------------------------------ */

/* Background-image panels ease in rather than snapping once decoded. */
.elementor-motion-effects-layer {
  transition: transform 900ms var(--mg-ease);
}

/* --- Form fields -------------------------------------------------------- */

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  transition:
    border-color 260ms var(--mg-ease),
    box-shadow 260ms var(--mg-ease);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
  box-shadow: 0 0 0 3px rgba(44, 27, 99, 0.12);
  outline: none;
}

/* --- Reduced motion ----------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  [data-anim],
  [data-anim].is-visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .ekit-template-content-header .elementor-element-733c4f0e {
    animation: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   FAQ ACCORDION
   Cards deal in on scroll, lift on hover, and open with a height transition
   whose body content drifts up as the panel makes room for it.
   ========================================================================== */

.jkit-accordion {
  --mg-accent: #5270aa;
}

/* --- Cards ------------------------------------------------------------- */

.jkit-accordion .card-wrapper {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  transition:
    transform 420ms var(--mg-ease),
    box-shadow 420ms var(--mg-ease);
}

.jkit-accordion .card-wrapper:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(16, 12, 42, 0.09);
}

.jkit-accordion .card-wrapper.is-open {
  box-shadow: 0 18px 44px rgba(16, 12, 42, 0.11);
}

/* --- Header ------------------------------------------------------------ */

.jkit-accordion .card-header-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  cursor: pointer;
  transition: color 300ms var(--mg-ease);
}

.jkit-accordion .card-header-button .title {
  transition: transform 420ms var(--mg-ease), color 300ms var(--mg-ease);
}

.jkit-accordion .card-wrapper:hover .card-header-button .title,
.jkit-accordion .card-wrapper.is-open .card-header-button .title {
  transform: translateX(6px);
}

.jkit-accordion .card-wrapper.is-open .card-header-button .title {
  color: var(--mg-accent);
}

/* --- Chevron ----------------------------------------------------------- */

.jkit-accordion .right-icon-group {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  transition:
    background-color 380ms var(--mg-ease),
    transform 520ms var(--mg-ease);
}

.jkit-accordion .card-wrapper:hover .right-icon-group {
  background: rgba(82, 112, 170, 0.1);
}

.jkit-accordion .card-wrapper.is-open .right-icon-group {
  background: rgba(82, 112, 170, 0.14);
  transform: rotate(180deg);
}

.jkit-accordion .right-icon-group svg {
  width: 14px;
  height: 14px;
  transition: fill 300ms var(--mg-ease);
}

.jkit-accordion .card-wrapper.is-open .right-icon-group svg {
  fill: var(--mg-accent);
}

/* The theme swaps in a second chevron on open and hides the first. One icon
   that rotates reads better, so the default chevron is kept visible
   throughout and the duplicate is suppressed. */
.jkit-accordion .card-wrapper .right-icon-group .normal-icon,
.jkit-accordion .card-wrapper.expand .right-icon-group .normal-icon,
.jkit-accordion .card-wrapper.is-open .right-icon-group .normal-icon {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.jkit-accordion .card-wrapper .right-icon-group .active-icon,
.jkit-accordion .card-wrapper.expand .right-icon-group .active-icon,
.jkit-accordion .card-wrapper.is-open .right-icon-group .active-icon {
  display: none !important;
}

.jkit-accordion .right-icon-group .normal-icon svg {
  display: block;
}

/* --- Panel ------------------------------------------------------------- */

.jkit-accordion .card-expand.is-animated {
  height: 0;
  overflow: hidden;
  transition: height 460ms var(--mg-ease);
  will-change: height;
}

.jkit-accordion .card-body {
  opacity: 0;
  transform: translateY(-10px);
  transition:
    opacity 420ms var(--mg-ease) 90ms,
    transform 460ms var(--mg-ease) 90ms;
}

.jkit-accordion .card-wrapper.is-open .card-body {
  opacity: 1;
  transform: none;
}

/* --- Entrance ---------------------------------------------------------- */

/* Cards deal in one after another when the section scrolls into view. */
[data-anim].is-visible .jkit-accordion .card-wrapper {
  animation: mgCardDeal 620ms var(--mg-ease) both;
  animation-delay: calc(var(--mg-card-index, 0) * 110ms);
}

@keyframes mgCardDeal {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jkit-accordion .card-wrapper,
  .jkit-accordion .card-body,
  .jkit-accordion .card-expand.is-animated,
  .jkit-accordion .right-icon-group,
  .jkit-accordion .card-header-button .title {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}
