/* ================= GLOBAL ================= */
body {
  font-family: 'DM Sans', system-ui, sans-serif;
}

header {
  width: 100%;
  font-family: var(--font-poppins);
}

/* ================= PRIMARY MENU ================= */
.primary-menu li a {
  font-weight: 500;
  transition: color 0.3s;
}

.primary-menu li a:hover {
  color: var(--color-primary);
}

.primary-menu ul {
  display: flex;
  gap: 24px;
  align-items: center;
}

/* ================= SECONDARY MENU ================= */
.secondary-menu ul {
  display: flex;
  gap: 70px;
}

.secondary-menu li {
  position: relative;
}

.secondary-menu > ul > li > a {
  padding: 14px 0;
  display: inline-flex;
  align-items: center;
  position: relative;
  padding-right: 22px; /* space for arrow */
}

/* Desktop dropdown arrow */
.secondary-menu .menu-item-has-children > a::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  background-repeat: no-repeat;
  background-size: contain;
  transition: transform 0.3s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23222222' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
}

/* ================= DESKTOP DROPDOWN ================= */
.secondary-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 15px 30px rgba(0,0,0,0.08);
  padding: 8px 0;
  display: none;
  z-index: 50;
}

.secondary-menu li:hover > .sub-menu {
  display: block;
}

.secondary-menu .sub-menu a {
  padding: 10px 16px;
  display: block;
}

/* ================= MOBILE MENU ================= */
#mobileMenu {
  max-height: calc(100vh - 100px); 
  overflow-y: auto;              
  -webkit-overflow-scrolling: touch; 
  padding: 1rem;            
  box-sizing: border-box;
}

.secondary-mobile .menu-item-has-children > a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  cursor: pointer;
  padding: 0.5rem 0;
}

/* Mobile arrow matches desktop SVG */
.secondary-mobile .menu-item-has-children > a::after {
  content: "";
  width: 18px;
  height: 18px;
  background-repeat: no-repeat;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23222222' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  transition: transform 0.2s ease;
}

/* Rotate arrow when submenu is open */
.secondary-mobile .open > a::after {
  transform: rotate(180deg);
}

/* Submenu hidden by default */
.secondary-mobile .sub-menu {
  display: none;
  padding-left: 1rem;
  margin-top: 0.25rem;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}

/* Show submenu when parent is open */
.secondary-mobile .open > .sub-menu {
  display: block;
  max-height: 500px; /* adjust as needed */
}

/* ================= MEDIA QUERIES ================= */
@media (max-width: 1023px) {
  header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  }

  #top-announcement {
    position: relative;
    top: 0;
    z-index: 999;
    transition: transform 0.3s ease;
    will-change: transform;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  }
}
