body {
    font-family: Arial, sans-serif;
}

.main-nav {
    width: 100%;
    background-color: #101010;
    box-shadow:0 1px 10px rgba(0, 0, 0, 0.3);
    position: relative;
}

.top-menu {
    display: flex;
    justify-content: center;
    padding-top:15px;
    padding-bottom:10px;
    margin: 0;
    list-style: none;
    background-color: #101010;
}

.top-menu li {
    margin: 0 15px;
    position: relative;
}

.top-menu li a {
    text-decoration: none;
    color: rgb(255, 255, 255);
    font-weight: bold;
    font-style: italic;
    text-transform: uppercase;
    transition: color 0.3s;
}

.top-menu li.active a {
    color: red;
    border-bottom: 2px solid red;
}

.top-menu li a:hover {
    color: red;
}

.top-menu-spacer {
    font-size:24px;
    font-weight:600;
    font-style:italic;
    color:red;
    padding-left:0px;
    padding-right:0px;
    margin-top:-4px
}

.sub-menu-spacer {
    font-size:24px;
    font-weight:400;
    font-style:italic;
    color:red;
    padding-left:0px;
    padding-right:0px;
    margin-top:-4px;
}

.submenu-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
    background-color: #101010;
    
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1; /* Ensure submenu-wrapper is above other elements */
}

.sub-menu {
    position: absolute;
    display: flex;
    justify-content: center;
    padding-top:15px;
    padding-bottom:10px;
    margin: 0;
    list-style: none;
    opacity: 0;
    transition: opacity 0.5s ease-out;
    width: 100%;
    flex-wrap: wrap;
    z-index: 2; /* Ensure submenus are above the wrapper but still managed by wrapper */
}

.sub-menu li {
    margin: 0 15px;
    display: inline;
}

.sub-menu li a {
    text-decoration: none;
    color: rgb(255, 255, 255);
    font-weight: normal;
    font-style: italic;
    transition: color 0.3s;
}

.sub-menu li a:hover {
    color: red;
}

.submenu-wrapper.active {
    max-height: 200px; /* Adjust this value based on submenu height */
    border-top: 1px solid #dddddd50;
}

.sub-menu.active {
    opacity: 1;
    position: relative;
    z-index: 3; /* Ensure the active submenu is above all others */
}


/* Hide hamburger menu by default (desktop view) */
.hamburger-menu {
  display: none;
}

/* Media query for mobile devices (width <= 768px) */
@media (max-width: 768px) {
  /* Hide desktop menu */
  .main-nav {
    display: none;
  } 

  /* Show hamburger menu */
  .hamburger-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: block;
    z-index: 100;
    background-color: #101010;
    box-shadow:0 1px 10px rgba(0, 0, 0, 0.3);
    
  }

  /* Hamburger icon styling */
  .hamburger {
    font-size: 30px;
    cursor: pointer;
    position: relative;
    z-index: 11;
    
    padding-left: 5px;
    padding-top:10px;
    padding-bottom:10px;
  }

  /* Side menu styling (mobile view) */
  .side-menu {
    height: 100%;
    width: 0;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #101010;
    overflow-x: hidden;
    transition: 0.3s;
    padding-top: 90px;
    z-index:10;
  }

  .side-menu a {
    padding: 10px 15px;
    text-decoration: none;
    color: rgb(255, 255, 255);
    font-weight: bold;
    font-style: italic;
    display: block;
    transition: 0.3s;
    border-bottom: 2px solid lightgrey;
  }

  .side-menu a:hover {
    background-color: #252525;
    border-bottom: 2px solid red;
    color:red;
  }

  .close-btn {
    position: absolute;
    top: 0;
    right: 25px;
    font-size: 36px;
  }

  .side-menu.active {
    width: 250px;
  }
  
  .top-side-menu {
      margin-top:-25px;
  }
  
  /* Hide all submenus initially */
    .submenu {
        display: none;
        list-style-type: none;
    }
    
    /* Add style for active submenus */
    .submenu-active {
        display: block;
        list-style-type: none;
    }
  
    .mobile-menu-item {
        list-style-type: none;
        margin-left: -40px;
    }
    
    .arrow-menu-right {
        padding-right:6px;
        margin-top:-5px;
        font-size:20px;
        font-weight:900;
        display: inline-block;
        transform-origin: center;
        transition: transform 0.3s ease;
        color:red;
    }
    
    .arrow-menu-right.rotate {
        transform: rotate(90deg); /* Rotate 90 degrees to point down */
    }
}