/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600&display=swap");

/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 3.5rem;

  /*========== Colors ==========*/
  /*Color mode HSL(hue, saturation, lightness)*/
  --black-color-red: hsl(0, 55%, 50%);
  --black-color-light: hsl(220, 24%, 15%);
  --black-color-lighten: hsl(220, 20%, 18%);
  --white-color: #fff;
  --body-color: hsl(220, 100%, 97%);

  /*========== Font and typography ==========*/
  /*.5rem = 8px | 1rem = 16px ...*/
  --body-font: "Montserrat", sans-serif;
  --normal-font-size: .938rem;

  /*========== Font weigth ==========*/
  --font-regular: 400;
  --font-semi-bold: 600;

  /*========== z index ==========*/
  --z-tooltip: 10;
  --z-fixed: 100;
}

/*========== Responsive typography ==========*/
@media screen and (min-width: 1024px) {
  :root {
    --normal-font-size: 1rem;
  }
}

/*=============== BASE ===============*/
* {
  /* box-sizing: border-box; */
  padding: 0;
  margin: 0;
}

body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--white-color);
}

.qw{
  width: 50px;
  height: 50px;
}

ul {
  list-style: none;
  /* Color highlighting when pressed on mobile devices */
  /*-webkit-tap-highlight-color: transparent;*/
}

a {
  text-decoration: none;
}

/*=============== REUSABLE CSS CLASSES ===============*/
/* .container {
  max-width: 1120px;
  margin-inline: 1.5rem;
} */

/*=============== HEADER ===============*/
.header {
  /* position: fixed; */
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--black-color-red);
  box-shadow: 0 2px 16px hsla(220, 32%, 8%, .3);
  z-index: var(--z-fixed);
}
/*=============== NAV ===============*/
.nav {
  height: var(--header-height);
}

.nav__logo, 
.nav__burger, 
.nav__close {
  color: var(--white-color);
}

.nav__data {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  column-gap: .25rem;
  font-weight: var(--font-semi-bold);
  /* Color highlighting when pressed on mobile devices */
  /* -webkit-tap-highlight-color: transparent; */
}

.nav__logo i {
  font-weight: initial;
  font-size: 1.25rem;
}

.nav__toggle {
  position: relative;
  width: 32px;
  height: 32px;
}

.nav__link:focus, .dropdown__link:focus {
  /* outline: 2px solid var(--white-color); */
  outline:none;
  background-color: var(--black-color-light);
}


.nav__burger, 
.nav__close {
  position: absolute;
  inset: 0;
  margin: auto;
  font-size: 1.25rem;
  cursor: pointer;
  transition: opacity .1s, transform .4s;
}

.nav__link, .dropdown__link {
  transition: background-color 0.3s ease, color 0.3s ease;
}


.nav__close {
  opacity: 0;
}
.nav__logo, 
.nav__link, 
.dropdown__link, 
a:hover{
  text-decoration: none;
  color: white;
}

.nav__link {
  font-weight: var(--font-semi-bold);
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: 0.3s;
}

.nav__link:hover {
  background-color: var(--black-color-light);
}

/* Show menu */
.show-menu {
  max-height: none;
  opacity: 1;
  top: 3.5rem;
  pointer-events: initial;
}

/* Show icon */
.show-icon .nav__burger {
  opacity: 0;
  transform: rotate(90deg);
}
.show-icon .nav__close {
  opacity: 1;
  transform: rotate(90deg);
}

/*=============== DROPDOWN ===============*/
.dropdown__item {
  cursor: pointer;
}

.dropdown__arrow {
  font-size: 1.25rem;
  font-weight: initial;
  transition: transform .4s;
}

.dropdown__link, 
.dropdown__sublink {
  padding: 1.25rem 1.25rem 1.25rem 2.5rem;
  color: var(--white-color);
  background-color: var(--black-color-light);
  display: flex;
  align-items: center;
  column-gap: .5rem;
  font-weight: var(--font-semi-bold);
  transition: background-color .3s;
}

.dropdown__link i, 
.dropdown__sublink i {
  font-size: 1.25rem;
  font-weight: initial;
}

.dropdown__link:hover, 
.dropdown__sublink:hover {
  background-color: var(--black-color-red);
}

.dropdown__menu, 
.dropdown__submenu {
  max-height: none;
  overflow: hidden;
  transition: max-height .4s ease-out;
}

/* Show dropdown menu & submenu */
.dropdown__item:hover .dropdown__menu, 
.dropdown__subitem:hover > .dropdown__submenu {
  max-height: none;
  transition: max-height .4s ease-in;
}

.dropdown__item.active
/* Rotate dropdown icon */
.dropdown__item:hover .dropdown__arrow {
  transform: rotate(180deg);
}

/*=============== DROPDOWN SUBMENU ===============*/
.dropdown__add {
  margin-left: auto;
}

.dropdown__sublink {
  background-color: var(--black-color-lighten);
}
/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (max-width: 340px) {
  .container {
    margin-inline: 1rem;
  }

  .nav__link {
    padding-inline: 1rem;
  }
}

/* For large devices */
@media screen and (min-width: 1118px) {
  .container {
    margin-inline: auto;
  }

  .nav {
    height: calc(var(--header-height) + 2rem);
    display: flex;
    justify-content: space-between;
  }
  .nav__toggle {
    display: none;
  }
  .nav__list {
    height: 85%;
    display: flex;
    column-gap: 3rem;
  }
  .nav__link {
    height: 120%;
    padding: 0;
    justify-content: initial;
    column-gap: .25rem;
  }
  .nav__link:hover {
    background-color: transparent;
  }
  .nav__link.active {
    border-bottom: 3px solid var(--white-color);
  }

  .dropdown__item, 
  .dropdown__subitem {
    position: relative;
  }

  .dropdown__menu, 
  .dropdown__submenu {
    max-height: none;
    overflow: initial;
    position: absolute;
    left: 0;
    top: 6rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s, top .3s;
  }

  .dropdown__link, 
  .dropdown__sublink {
    padding-inline: 1rem 3.5rem;
  }

  .dropdown__subitem .dropdown__link {
    padding-inline: 1rem;
  }

  .dropdown__submenu {
    position: absolute;
    left: 100%;
    top: .5rem;
  }

  /* Show dropdown menu */
  .dropdown__item:hover .dropdown__menu {
    max-height: none;
    opacity: 1;
    top: 5.5rem;
    pointer-events: initial;
    transition: top .3s;
  }

  /* Show dropdown submenu */
  .dropdown__subitem:hover > .dropdown__submenu {
    opacity: 1;
    top: 0;
    pointer-events: initial;
    transition: top .3s;
  }
}

/* Burger menu for smaller screens */
@media screen and (max-width: 768px) {
  .nav__toggle {
    display: block; /* Show burger menu */
    position: absolute;
    top: 50%; /* Vertically center */
    right: 2rem; /* Align to the far right */
    transform: translateY(-50%); /* Correct vertical centering */
  }

  .nav__menu {
    display: none; /* Hidden initially */
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--black-color-red);
    z-index: var(--z-fixed);
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    max-height: none;
    overflow: hidden; /* Prevent content overflow */
    transition: max-height 0.4s ease-out; /* Smooth height transition */
  }

  .nav__menu.show-menu {
    display: flex; /* Show the menu */
    max-height: none; /* Allow dynamic height adjustment */
    overflow: visible; /* Allow full visibility */
    transition: max-height 0.4s ease-out;
  }

  .dropdown__menu {
    max-height: 0; /* Start collapsed */
    overflow: hidden; /* Prevent overflowing content */
    transition: max-height 0.4s ease-out; /* Smooth height transition for expansion */
  }

  .dropdown__item.active .dropdown__menu {
    max-height: 500px; /* Adjust based on dropdown content */
    overflow: visible;
    transition: max-height 0.4s ease-in; /* Smooth opening animation */
  }
  .dropdown__sublink {
    padding-left: 2.5rem; /* Indent nested dropdown items */
    transition: max-height 0.4s ease-out;
    max-height: 500px; /* Adjust based on dropdown content */
    overflow: visible;
    transition: max-height 0.4s ease-in; /* Smooth opening animation */
  }
}



/* 🔔 Notification Bell Icon */
.nav__link.notif {
  position: relative;
  font-size: 22px; /* Adjust size */
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
}

/* 🔴 Notification Badge (Fixed Misalignment) */
.notification-count {
  position: absolute;
  right: -5px; /* Adjust horizontal position */
  background: red;
  color: white;
  font-size: 12px;
  font-weight: bold;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
  transform: translate(50%, -50%);
}

/* 🔽 Notification Dropdown (Styled Like Other Menus) */
.notification-dropdown {
  position: relative;
}

.notification-menu {
  position: absolute;
  right: 0;
  width: 300px;
  background: white;
  border-radius: 5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: none;
  padding: 10px 0;
  z-index: 1000;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Show dropdown */
.notification-dropdown.show .notification-menu {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Header inside dropdown */
.notification-menu .dropdown__header {
  font-weight: bold;
  text-align: center;
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

/* Empty notifications message */
.notification-menu .dropdown__empty {
  text-align: center;
  padding: 10px;
  color: #999;
}

/* Individual notification items */
.notification-menu li {
  padding: 10px;
  border-bottom: 1px solid #ddd;
  cursor: pointer;
  transition: background 0.3s ease;
}

/* Remove border from last item */
.notification-menu li:last-child {
  border-bottom: none;
}

/* Hover effect */
.notification-menu li:hover {
  background: #f5f5f5;
}

/* Remove black highlight on bell click */
.nav__link.notif:focus {
  outline: none;
  background: none !important;
}