/* [CODIGO] Paired with the guarded migrations under scripts/elementor/. */
html {
  scroll-behavior: auto !important;
}

.x-box {
  width: 100% !important;
  max-width: 1440px !important;
  margin-inline: auto;
  padding-inline: 40px !important;
}

/* Legacy sections keep their backgrounds full bleed and box only their content. */
.elementor-section.x-box {
  max-width: none !important;
  padding-inline: 0 !important;
}

.elementor-section.x-box > .elementor-container {
  width: 100%;
  max-width: 1440px !important;
  margin-inline: auto;
  padding-inline: 40px !important;
}

.site-main .x-box a {
  overflow-wrap: anywhere;
}

.x-box .event-wrapper,
.x-box .event-wrapper .single-event {
  max-width: 100%;
}

.x-box .event-wrapper .single-event::after {
  width: calc(100% - 50px);
}

.elementor-location-header {
  position: relative;
  z-index: 100;
  min-height: var(--hi-header-height, 135px);
  background: #fff;
  box-shadow: rgba(50, 50, 93, 0.18) 0 12px 32px -18px;
}

#main-header.hi-header {
  background: #fff;
  box-shadow: none;
  --gap: 16px;
  padding-block: 20px;
}

#main-header.hi-header.is-fixed.visible {
  box-shadow: rgba(50, 50, 93, 0.18) 0 12px 32px -18px;
}

/* Fixed positioning drops the centered x-box out of normal layout. */
@media (min-width: 1441px) {
  #main-header.hi-header.is-fixed {
    max-width: none !important;
    padding-inline: max(40px, calc((100vw - 1360px) / 2)) !important;
  }
}

/* The home gradient spans the page and otherwise paints over the footer sides. */
body.home .elementor-location-footer {
  position: relative;
  z-index: 1;
}

.hi-header .e-con,
.hi-footer-grid .e-con,
.hi-mega-menu .e-con {
  min-width: 0;
}

#main-header .hi-header-brand {
  width: 125px;
  flex: 0 0 125px;
}

#main-header .hi-header-body {
  flex: 1;
  width: auto;
  --gap: 12px;
}

#main-header .hi-header-body > .e-con-inner {
  gap: 4px;
}

#main-header .hi-header-actions,
#main-header .hi-header-primary {
  width: 100%;
  --gap: 16px;
}

#main-header .hi-give {
  width: auto;
  flex: 0 0 auto;
}

.hi-header .hi-give .elementor-button {
  white-space: nowrap;
}

/* One responsive pair: Elementor mobile/tablet, ElementsKit desktop. */
@media (min-width: 1025px) {
  #main-header .hi-mobile-nav,
  #main-header .hi-desktop-nav .elementskit-menu-hamburger {
    display: none !important;
  }

  #main-header .hi-desktop-nav,
  #main-header .hi-desktop-nav .elementskit-menu-container,
  #main-header .hi-desktop-nav .elementskit-navbar-nav {
    display: flex !important;
  }

  #main-header .hi-utility-nav .elementor-menu-toggle {
    display: none !important;
  }

  #main-header .hi-utility-nav .elementor-nav-menu--main {
    display: block !important;
  }
}

#main-header .hi-desktop-nav {
  width: auto;
  flex: 1;
  min-width: 0;
}

.hi-header #menu-new-menu {
  justify-content: space-between;
}

.hi-header #menu-new-menu > li > a {
  padding: 7px clamp(8px, 1.3vw, 24px);
  min-height: 38px;
  font-size: clamp(13px, 1.1vw, 16px);
  white-space: nowrap;
}

#main-header .hi-header-search {
  width: clamp(130px, 15vw, 230px);
  flex: 0 1 auto;
  min-width: 0;
}

.hi-header-search input {
  min-width: 0;
  width: 100%;
}

/* Replace the legacy document-width/130px positioning, including inline JS. */
#main-header.hi-header .elementor-widget-ekit-nav-menu .elementskit-navbar-nav > li.elementskit-megamenu-has.relative_position.about-us-li .elementskit-megamenu-panel {
  left: 0 !important;
  right: 0 !important;
  top: var(--hi-desktop-menu-top, 100%) !important;
  width: 100% !important;
  max-height: calc(100dvh - var(--hi-header-height, 135px));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.hi-header .about-us-li:focus-within > .elementskit-megamenu-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.hi-header .about-us-li.hi-menu-dismissed > .elementskit-megamenu-panel {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#main-header.hi-header.is-fixed:focus-within,
#main-header.hi-header.is-fixed.hi-menu-open {
  top: 0;
  opacity: 1;
}

.elementor .hi-mega-menu .elementor-element-c5ee86c {
  padding: 32px;
  gap: 24px;
}

.elementor .hi-mega-menu .elementor-element-4f59717 {
  width: 45%;
  flex: 0 0 45%;
}

.elementor .hi-mega-menu .elementor-element-5541600 {
  flex: 1;
  flex-wrap: wrap;
  gap: 16px 24px;
}

.elementor .hi-mega-menu .elementor-element-5541600 > .elementor-widget {
  width: auto;
  flex: 1 1 140px;
  margin: 0;
}

.elementor .hi-mega-menu .mt-text-animation li {
  height: auto;
  overflow: visible;
}

.elementor .hi-mega-menu .mt-text-animation li a,
.elementor .hi-mega-menu .mt-text-animation li:hover a:first-child,
.elementor .hi-mega-menu .mt-text-animation li:hover a:last-child {
  transform: none;
  white-space: normal;
  overflow-wrap: anywhere;
}

.elementor .hi-mega-menu .mt-text-animation.first a {
  font-size: clamp(22px, 2.2vw, 32px);
}

.elementor.elementor-location-footer .hi-footer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(300px, 1.4fr) minmax(230px, 1fr);
  gap: clamp(24px, 4vw, 64px);
  padding: 40px clamp(24px, 4vw, 64px);
}

.elementor-location-footer {
  background: #313131;
}

.elementor.elementor-location-footer .hi-footer-grid > .hi-footer-brand,
.elementor.elementor-location-footer .hi-footer-grid > .hi-footer-nav,
.elementor.elementor-location-footer .hi-footer-grid > .hi-footer-meta {
  width: 100%;
  padding: 0;
  min-width: 0;
}

.elementor.elementor-location-footer .hi-footer-grid .hi-footer-brand {
  justify-content: flex-start;
  gap: 24px;
}

.elementor.elementor-location-footer .hi-footer-grid .hi-footer-logos {
  width: 100%;
  max-width: 270px;
  padding: 0;
}

.elementor.elementor-location-footer .hi-footer-grid .hi-footer-logos > .e-con {
  padding: 0;
  gap: 24px;
  align-items: center;
  flex-wrap: nowrap;
}

.hi-footer-logos .elementor-widget-image {
  min-width: 0;
  flex: 1;
}

.hi-footer-logos img {
  width: auto;
  max-height: 90px;
  object-fit: contain;
}

.elementor.elementor-location-footer .hi-footer-grid .hi-footer-copyright {
  width: 100%;
  max-width: 360px;
}

.elementor.elementor-location-footer .hi-footer-grid .hi-footer-nav {
  display: block;
}

.elementor.elementor-location-footer .hi-footer-grid .hi-footer-nav > .e-con-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-content: start;
  width: 100%;
  max-width: none;
}

.hi-footer-grid .hi-footer-nav > .e-con-inner > .elementor-widget {
  width: 100%;
  min-width: 0;
}

.hi-footer-grid #about-menu[hidden] {
  display: none !important;
}

.hi-footer-grid #about-menu:not([hidden]) {
  display: block;
}

.elementor.elementor-location-footer .hi-footer-grid .hi-footer-links {
  width: 100%;
  padding: 0;
}

.hi-footer-links .elementor-widget,
.hi-footer-links .elementor-divider-separator {
  max-width: 100%;
}

.elementor.elementor-location-footer .hi-footer-links .elementor-heading-title {
  line-height: 1.5;
}

.hi-footer-grid .elementor-icon-list-text,
.hi-footer-grid .elementor-heading-title {
  overflow-wrap: anywhere;
}

.hi-footer-grid .elementor-icon-list-item a,
.hi-footer-links .elementor-heading-title a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}

.hi-footer-grid .elementor-social-icons-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
}

.hi-footer-grid .elementor-social-icon {
  width: 36px;
  height: 36px;
}

.hi-header a:focus-visible,
.hi-header button:focus-visible,
.hi-header [role="button"]:focus-visible,
.hi-footer-grid a:focus-visible {
  outline: 2px solid #00a5d6;
  outline-offset: 4px;
}

@media (max-width: 1100px) and (min-width: 1025px) {
  .hi-header #menu-new-menu > li > a {
    padding-inline: 7px;
  }
}

@media (max-width: 1024px) {
  #main-header .hi-mobile-nav {
    display: block !important;
  }

  #main-header .hi-desktop-nav,
  #main-header .hi-utility-nav {
    display: none !important;
  }

  #main-header.hi-header {
    padding-block: 10px;
  }

  #main-header.hi-header > .e-con-inner {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 4px;
    align-items: center;
    position: static;
    padding-block: 0;
  }

  #main-header .hi-header-brand {
    width: 100%;
  }

  #main-header .hi-header-brand img {
    width: 90px;
  }

  #main-header .hi-header-body {
    display: contents;
  }

  #main-header .hi-header-body > .e-con-inner {
    display: contents;
  }

  #main-header .hi-header-actions {
    padding: 0;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    position: static;
  }

  #main-header .hi-give {
    order: -1;
  }

  #main-header .hi-give .elementor-button {
    padding: 10px 12px;
    font-size: 13px;
  }

  #main-header .hi-mobile-nav {
    margin: 0;
    position: static;
  }

  #main-header .hi-mobile-nav .elementor-menu-toggle {
    min-width: 42px;
    min-height: 42px;
    padding: 5px;
    color: #2d3142;
    background: #fff;
    font-size: 28px;
  }

  #main-header .hi-mobile-nav .elementor-menu-toggle__icon--open,
  #main-header .hi-mobile-nav .elementor-menu-toggle__icon--close {
    position: relative;
    width: 26px;
    height: 20px;
    margin: 0;
    font-size: 0;
  }

  #main-header .hi-mobile-nav .elementor-menu-toggle__icon--open,
  #main-header .hi-mobile-nav .elementor-menu-toggle.elementor-active .elementor-menu-toggle__icon--close {
    display: block;
  }

  #main-header .hi-mobile-nav .elementor-menu-toggle__icon--close,
  #main-header .hi-mobile-nav .elementor-menu-toggle.elementor-active .elementor-menu-toggle__icon--open {
    display: none;
  }

  #main-header .hi-mobile-nav .elementor-menu-toggle__icon--open::before {
    content: "";
    position: absolute;
    inset: 0;
    width: 26px;
    height: 20px;
    margin: 0;
    opacity: 1;
    border-radius: 0;
    background: linear-gradient(
      to bottom,
      #2d3142 0 2px,
      transparent 2px 9px,
      #2d3142 9px 11px,
      transparent 11px 18px,
      #2d3142 18px 20px
    );
  }

  #main-header .hi-mobile-nav .elementor-menu-toggle__icon--open::after {
    display: none;
  }

  #main-header .hi-mobile-nav .elementor-menu-toggle__icon--close::before,
  #main-header .hi-mobile-nav .elementor-menu-toggle__icon--close::after {
    content: "";
    position: absolute;
    top: 9px;
    left: 0;
    display: block;
    width: 26px;
    height: 2px;
    margin: 0;
    opacity: 1;
    border-radius: 0;
    background: #2d3142;
  }

  #main-header .hi-mobile-nav .elementor-menu-toggle__icon--close::before {
    transform: rotate(45deg);
  }

  #main-header .hi-mobile-nav .elementor-menu-toggle__icon--close::after {
    transform: rotate(-45deg);
  }

  #main-header .hi-header-primary {
    grid-column: 1 / -1;
    width: 100%;
    margin: 0;
  }

  #main-header .hi-header-search {
    width: 100%;
    padding: 0;
  }

  #main-header .hi-header-search .elementor-search-form__container {
    min-height: 36px;
  }

  #main-header .hi-header-search .elementor-search-form__input,
  #main-header .hi-header-search .elementor-search-form__submit {
    min-height: 36px;
    height: 36px;
  }

  .hi-mobile-nav nav.elementor-nav-menu--dropdown.elementor-nav-menu__container {
    top: var(--hi-header-height, 120px) !important;
    left: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    max-height: calc(100dvh - var(--hi-header-height, 145px)) !important;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .hi-mobile-nav .elementor-nav-menu--dropdown a {
    white-space: normal;
    min-height: 44px;
  }

  .elementor.elementor-location-footer .hi-footer-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
  }

  .elementor.elementor-location-footer .hi-footer-grid .hi-footer-brand {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(180px, 270px) minmax(0, 1fr);
    align-items: center;
  }
}

@media (min-width: 768px) {
  .hi-footer-grid #about-menu[hidden] {
    display: block !important;
  }
}

@media (max-width: 767px) {
  .x-box {
    padding-inline: 20px !important;
  }

  .elementor-section.x-box > .elementor-container {
    padding-inline: 20px !important;
  }

  .x-box .event-wrapper .single-event::after {
    width: calc(100% - 30px);
    left: 30px;
  }

  #main-header.hi-header {
    padding-block: 10px;
  }

  #main-header.hi-header > .e-con-inner {
    grid-template-columns: 72px minmax(0, 1fr);
    column-gap: 8px;
    row-gap: 4px;
  }

  #main-header .hi-header-brand img {
    width: 72px;
  }

  #main-header .hi-give .elementor-button {
    padding: 9px 10px;
    font-size: 12px;
  }

  .elementor.elementor-location-footer .hi-footer-grid {
    grid-template-columns: minmax(0, 1fr);
    padding-block: 26px;
    gap: 28px;
  }

  .elementor.elementor-location-footer .hi-footer-grid .hi-footer-brand {
    display: flex;
  }

  .elementor.elementor-location-footer .hi-footer-grid .hi-footer-nav > .e-con-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .hi-footer-grid #about-menu {
    padding-left: 20px;
    border-left: 1px solid #707070;
  }

  .hi-footer-grid #about-linker li:last-child a {
    justify-content: space-between;
    width: 100%;
  }

  .hi-footer-grid #about-linker li:last-child a::after {
    content: "";
    width: 9px;
    height: 9px;
    margin: 0 6px 4px 16px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
  }

  .hi-footer-grid #about-linker li:last-child a[aria-expanded="true"]::after {
    margin-bottom: -4px;
    transform: rotate(225deg);
  }

  .hi-footer-grid .elementor-social-icons-wrapper {
    justify-content: center;
  }

  .hi-footer-grid .elementor-icon-list-item a,
  .hi-footer-links .elementor-heading-title a {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #main-header.hi-header,
  .hi-header .elementskit-megamenu-panel {
    transition: none;
  }
}
