/* Reset and base styles */


/* Mega Menu Styles */
.megamenu {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.megamenu-container {
  margin: 0 auto;
  padding: 0 1rem;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.megamenu-logo {
  display: flex;
  flex: 0 0 25%;
}

.megamenu-logo  img{
  display: flex;
  justify-content: flex-start;
  width: 100%;
}

.megamenu-logo a {
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
  color: #333;
}

.megamenu-nav {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.megamenu-item {
  position: static;
  padding: 0 1rem;
}

.megamenu-link {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.megamenu-link {
  position: relative;
  transition: color 0.3s ease;
}

/* Underline pseudo-element (desktop only) */
.megamenu-link::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-1);
  transition: width 0.3s ease;
}

/* On hover, change text color and animate the underline */
.megamenu-item:hover .megamenu-link {
  color: var(--primary-1);
}

.megamenu-item:hover .megamenu-link::before {
  width: 100%;
}



.megamenu-content {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  width: 100%;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.megamenu-cta-container{
  background-color: var(--neutral-200);
  border-radius: 25px;
}

.megamenu-cta-container img{
  max-width: 80%;
  margin: auto;
}

.megamenu-item:hover .megamenu-content {
  opacity: 1;
  visibility: visible;
}

.megamenu-feature {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 1rem;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: background-color .2s ease-in-out;
}

.megamenu-feature:hover {
  background-color: #f5f5f5;
  cursor: pointer;
  transition: background-color .2s ease-in-out;
}

.megamenu-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-1);
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.megamenu-feature-text {
  flex-grow: 1;
  text-align: start;
}

.megamenu-feature-text h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: #333;
  font-weight: 600;
  text-transform: uppercase;
}

.megamenu-feature-text p {
  font-size: 0.875rem;
  color: #666;
  margin: 0;
  line-height: 1.4;
}

.store-button {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #f0f0f0;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s;
}

.store-button:hover {
  background: #e0e0e0;
  color: #333;
}

.megamenu-button {
  background: var(--primary-1);
  border: 1px solid var(--primary-1);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s;
}

.megamenu-button:hover {
  background: transparent;
  color: var(--primary-1);
  border: 1px solid var(--primary-1);
  transition: background-color 0.2s;
  
}

.megamenu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  position: relative;
  width: 35px;
  height: 30px;
}

.megamenu-toggle:hover  {
  background-color: unset!important;
}

.megamenu-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background: #333;
  transition: all 0.3s;
  position: absolute;
  left: 5px;
}

.megamenu-toggle span:nth-child(1) {
  top: 4px;
}

.megamenu-toggle span:nth-child(2) {
  top: 14px;
}

.megamenu-toggle span:nth-child(3) {
  top: 24px;
}

.megamenu-toggle.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 14px;
}

.megamenu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.megamenu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg);
  top: 14px;
}

.megamenu-mobile-actions {
  display: none;
}

.megamenu-item.standard-dropdown {
  position: relative;
}

.megamenu-item.standard-dropdown .megamenu-content {
  width: auto;
  min-width: 200px;
  left: 0;
  right: auto;
  padding: 0.5rem 0;
}

.standard-dropdown-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.standard-dropdown-list li a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  color: #333;
  text-decoration: none;
  transition: all 0.2s ease;
}

.standard-dropdown-list li a:hover {
  background-color: #f5f5f5;
  color: var(--primary);
}

.standard-dropdown-list li i {
  width: 20px;
  margin-right: 0.75rem;
  color: #666;
}

.standard-dropdown-list li a:hover i {
  color: var(--primary);
}



/* Desktop chevron and hover effects */
@media (min-width: 992px) {
  /* Using the CSS relational pseudo-class :has() to check for dropdown content.
     Only items that contain a .megamenu-content will get a chevron. */
     .megamenu-item:has(.megamenu-content) > .megamenu-link::after {
      content: '\f054';
      font-family: 'Font Awesome 6 Free';
      font-weight: 900;
      font-size: 0.75rem;
      margin-left: 0.25rem;
      transition: transform 0.3s ease;
    }
  
    .megamenu-item:has(.megamenu-content):hover > .megamenu-link::after {
      transform: rotate(90deg);
    }
}



/* Responsive Styles */
@media (max-width: 991px) {
  
  .megamenu-mobile-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex: 0 0 60%;
  }

  .megamenu-toggle {
    display: flex;
  }

  .megamenu-nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    flex-direction: column;
    padding: 1rem;
    display: none;
    overflow-y: auto;
  }

  .megamenu-nav.active {
    display: flex;
    width: 100vw;
  }

  .megamenu-item {
    padding: 0;
    border-bottom: 1px solid #eee;
  }

  .megamenu-link {
    padding: .5rem 0;
    justify-content: space-between;
  }

  .megamenu-link::before {
    display: none;
  }

  .megamenu-content {
    position: static;
    box-shadow: none;
    padding: 1rem 0 1rem 0;
    display: none;
    opacity: 1;
    visibility: visible;
  }

  .megamenu-item.active .megamenu-content {
    display: block;
  }

  .megamenu-button {
    font-size: .8rem;
    width: 100%;
    height: 40px;
    display: flex;
    flex: 0 0 40%;
    justify-content: center;
    align-items: center;
  }

  .standard-dropdown-list {
    list-style: none;
    padding: 0 1rem;
  }

  .standard-dropdown-list li {
    border-bottom: 1px solid #eee;
  }

  .standard-dropdown-list li:last-child {
    border-bottom: none;
  }

  .standard-dropdown-list li a {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    color: #333;
    text-decoration: none;
  }

  .standard-dropdown-list li i {
    width: 20px;
    margin-right: 1rem;
    color: #666;
  }

  
}

@media screen and (max-width:768px){

  .store-button {
    width: 30px;
    height: 30px;
  }

  .store-button i{
    font-size: .8rem;
  }

  .megamenu-button {
    font-size: .8rem;
    max-height: 30px;
    padding: .4rem 1rem!important;
    align-items: center;
  }
  
  .megamenu-mobile-actions {
    justify-content: flex-end;
    padding-right: 1rem!important;
  }

  .standard-dropdown-list li a {
    padding: 0.75rem 0;
  }
  
}

/* Additional breakpoint for mobile layout */
@media screen and (max-width: 474px) {
  .megamenu-feature {
    padding: 0.75rem;
  }

  .megamenu-icon {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  .megamenu-feature-text h4 {
    font-size: 0.875rem;
  }

  .megamenu-feature-text p {
    font-size: 0.75rem;
  }

  .megamenu-cta-container img{
    max-width: 40%;
    margin: auto;
  }
}


@media screen and (max-width: 430px) {

  .megamenu-logo {
    display: flex;
    flex:
    0 0 20%;
  }

  .megamenu-mobile-actions{
    flex: 0 0 70%;
    gap: .4rem;
  }

  .megamenu-toggle span:nth-child(1) {
    top: 6px;
  }

  .megamenu-toggle span:nth-child(2) {
    top: 14px;
  }

  .megamenu-toggle span:nth-child(3) {
    top: 22px;
  }

}


@media screen and (max-width: 330px) {

  .megamenu-mobile-actions{
    flex: 0 0 80%;
    gap: .3rem;
  }

  .megamenu-toggle span:nth-child(1) {
    top: 6px;
    width: 20px;
  }

  .megamenu-toggle span:nth-child(2) {
    top: 14px;
    width: 20px;
  }

  .megamenu-toggle span:nth-child(3) {
    top: 22px;
    width: 20px;
  }

}


@media screen and (max-width: 300px) {

  .megamenu-container{
    padding: 0;
    height: 50px;
  }

  .megamenu-mobile-actions{
    gap: .3rem;
    justify-content: flex-start;
    padding-right: 0!important;
  }

  .megamenu-button {
    font-size: .6rem;
    max-height: 30px;
    padding:.1rem .4rem !important;
    align-items: center;
    width: 60%!important;
    display: flex;
  }

  .store-button {
    display: flex;
  }

  .megamenu-toggle span{
    display: flex;
  }

}