/* ==========================================================================
   Page Typography
   ========================================================================== */

.pages-leading h2,
.pages-leading h3 {
  font-weight: 700;
  color: rgba(22, 78, 99, 1);
  font-size: 1.5rem;
  line-height: 2rem;
}

.pages-leading ol {
  list-style: decimal;
  margin-left: 1rem;
}

/* ==========================================================================
   Desktop Menu (Default)
   ========================================================================== */

.wp-menu {
  background: rgba(22, 78, 99, 1);
  position: relative;
  z-index: 1000;
}

.menu-container {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-item {
  position: relative;
  border-right: 1px solid rgb(80, 112, 122);
}

.menu-item:last-child {
  border-right: none;
}

.menu-item > a {
  color: #eee;
  text-decoration: none;
  padding: 10px 15px;
  display: block;
  transition: background 0.3s ease, color 0.3s ease;
}

.menu-item > a:hover {
  background: rgb(9, 65, 85);
  color: rgb(255, 217, 0);
}

/* Arrow for parent items (desktop default: DOWN) */
.menu-item-has-children > a::after {
  content: "\f107"; /* Font Awesome chevron-down */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-left: 8px;
  margin-top: 4px;
  font-size: 14px;
  float: right;
  transition: transform 0.3s ease;
}

/* ==========================================================================
   Submenu (Desktop)
   ========================================================================== */

.sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  width: max-content;
  background: rgb(22, 78, 99);
  list-style: none;
  display: none;
  margin: 0.5px 0 0;
  padding: 0;
  box-shadow: 0 3px 5px rgba(22, 78, 99, 0.4);
  z-index: 100;
}

.menu-item:hover > .sub-menu {
  display: block;
}

.sub-menu .sub-menu {
  left: 100%;
  top: 0;
  margin-left: 2px;
}

.sub-menu .menu-item {
  border-right: none;
  border-bottom: 1px solid rgb(80, 112, 122);
}

.sub-menu .menu-item:last-child {
  border-bottom: none;
}

/* Desktop nested arrow rotates RIGHT */
.sub-menu .menu-item-has-children > a::after {
  transform: rotate(270deg); /* right */
}

.sub-menu .menu-item a {
  padding: 8px 15px;
}

/* ==========================================================================
   Mobile Menu
   ========================================================================== */

.mobile-toggle {
  display: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 10px;
}

@media (max-width: 768px) {

  .menu-container {
    flex-direction: column;
    display: none;
    width: 100%;
  }

  .wp-menu.active .menu-container {
    display: flex;
  }

  .menu-item {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgb(80, 112, 122);
  }

  .menu-item > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    width: 100%;
  }

  /* MOBILE: arrow DOWN (forced) */
  .menu-item-has-children > a::after {
    transform: rotate(0deg) !important;
    font-size: 0.9em;
    margin-left: 10px;
  }

  /* MOBILE: submenu open → arrow RIGHT */
  .menu-item.open > a::after {
    transform: rotate(180deg) !important;
  }

  /* Mobile Submenus collapse */
  .sub-menu {
    position: static;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    background: transparent;
    box-shadow: none;
    transition:
      max-height 0.3s ease,
      opacity 0.3s ease,
      visibility 0.3s ease;
  }

  .menu-item.open > .sub-menu {
    max-height: 500px;
    opacity: 1;
    visibility: visible;
  }

  .sub-menu .menu-item a {
    padding-left: 30px;
  }

  /* Nested submenus in mobile */
  .sub-menu .sub-menu {
    left: 0;
  }

  .sub-menu .menu-item-has-children > a::after {
    transform: rotate(0deg) !important;
    margin-right: 5px;
  }

  .sub-menu .menu-item.open > a::after {
    transform: rotate(180deg) !important;
  }

  .mobile-toggle {
    display: block;
  }
}

/* ==========================================================================
   Swiper Navigation Adjustments
   ========================================================================== */

.swiper-button-next:after,
.swiper-button-prev:after {
  display: none;
}
