/* ==========================================================================
   Static-archive fixes for The Skills Centre
   Restores behaviour that Elementor normally drives with JavaScript, so the
   standalone site works without the WordPress runtime.
   ========================================================================== */

/* Reveal elements Elementor would un-hide via JS entrance animations */
.elementor-invisible { opacity: 1 !important; visibility: visible !important; animation: none !important; }

/* --------------------------------------------------------------------------
   HEADER NAV — hover dropdowns (replaces the smartmenus JS)
   Scoped to the horizontal main menu so the vertical footer menu is unaffected.
   -------------------------------------------------------------------------- */
.elementor-nav-menu--layout-horizontal .elementor-nav-menu > li { position: relative; }
.elementor-nav-menu--layout-horizontal .elementor-nav-menu > li > .sub-menu {
  display: block;
  position: absolute; top: 100%; left: 0;
  min-width: 250px; margin: 0; padding: 8px 0; list-style: none;
  background: #fff; box-shadow: 0 14px 34px rgba(0,0,0,.16); border-radius: 4px; z-index: 9999;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.elementor-nav-menu--layout-horizontal .elementor-nav-menu > li:hover > .sub-menu,
.elementor-nav-menu--layout-horizontal .elementor-nav-menu > li:focus-within > .sub-menu {
  opacity: 1; visibility: visible; transform: none;
}
.elementor-nav-menu--layout-horizontal .sub-menu .elementor-sub-item {
  display: block; padding: 9px 20px; white-space: nowrap; line-height: 1.35; color: #2b2b2b;
}
.elementor-nav-menu--layout-horizontal .sub-menu .menu-item:hover > .elementor-sub-item { background: #f3f4f6; }
/* third-level submenu flies to the side */
.elementor-nav-menu--layout-horizontal .sub-menu .menu-item { position: relative; }
.elementor-nav-menu--layout-horizontal .sub-menu .sub-menu { top: -8px; left: 100%; }

/* --------------------------------------------------------------------------
   FOOTER / VERTICAL MENUS — hide nested submenus, tighten item spacing
   -------------------------------------------------------------------------- */
.elementor-nav-menu.sm-vertical .sub-menu { display: none !important; }
.elementor-nav-menu.sm-vertical > li > .elementor-item {
  padding-top: 6px !important; padding-bottom: 6px !important;
}

/* --------------------------------------------------------------------------
   HOMEPAGE BLOG (posts.cards) — normalise thumbnail box to the image
   -------------------------------------------------------------------------- */
.elementor-posts--thumbnail-top .elementor-post__thumbnail {
  height: 210px; padding-bottom: 0 !important; overflow: hidden;
}
.elementor-posts--thumbnail-top .elementor-post__thumbnail img {
  position: static; width: 100%; height: 100%; object-fit: cover;
}

/* --------------------------------------------------------------------------
   IMAGE CAROUSEL — keep slides usable (Swiper is initialised in static-fixes.js)
   -------------------------------------------------------------------------- */
.elementor-image-carousel-wrapper .swiper-slide { display: flex; align-items: center; justify-content: center; }
.elementor-image-carousel-wrapper .swiper-slide img { width: 100%; height: auto; }

/* --------------------------------------------------------------------------
   MOBILE MENU — drawer shown when the toggle is tapped
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  nav.elementor-nav-menu--dropdown.sf-open { display: block !important; }
}
