/*
* This file is now clean and working with
* the fixed variables from main.css.
*/

header {
  width: 100%;
  height: 80px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  background: transparent;
  padding: 10px 20px;
  transition: background 0.5s ease-in-out;
}

header.scrolled {
  background: var(--color-brand-dark);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* --------------------------- */
/* Menu toggle (mobile) */
/* --------------------------- */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 20px;
  cursor: pointer;
}

.menu-icon {
  width: 25px;
  height: auto;
}

.close-icon {
  display: none;
  width: 25px;
  height: auto;
  cursor: pointer;
}

/* --------------------------- */
/* Layout */
/* --------------------------- */
.lowerHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.lowerHeader > img {
  height: 75px;
  width: auto;
  cursor: pointer;
}

.contentSide {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* --------------------------- */
/* Links (Desktop) */
/* --------------------------- */
.links {
    display: flex;
    align-items: center;
    gap: 35px;
}

.links ul {
  list-style: none;
  display: flex;
  gap: 25px;
  margin: 0;
  padding: 0;
  align-items: center;
}

/*
 * ==========================================================
 * This simple rule will now work perfectly.
 * ==========================================================
 */
.links ul li a {
  text-decoration: none;
  color: var(--color-white); /* This will now work */
  font-weight: 500;
  transition: color 0.3s ease;
  font-size: 16px; 
  font-weight: 600;
}

.links ul li a:hover {
  color: var(--color-brand-primary); /* This will now work */
}

/* --------------------------- */
/* Phone */
/* --------------------------- */
.phoneCalling {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-white);
  font-weight: 600; 
  font-size: 16px;
  border-radius: 10px;
  padding: 0 10px 5px;
  transform: translateY(-2px);
}

.phoneIcon {
  width: 25px;
  height: auto;
  transform: translateY(7px);
}

.phoneCalling a {
  text-decoration: none;
  color: var(--color-white);
}

.phoneCalling:hover {
  background: var(--color-brand-primary);
}

/* --------------------------- */
/* Language switcher */
/* --------------------------- */
.language-switcher {
  cursor: pointer;
  color: var(--color-white);
  font-weight: 600;
  padding: 5px 10px;
  display: flex;
  gap: 10px;
  background: transparent;
  border: none;
  border-radius: 5px;
  transition: background-color 0.3s, color 0.3s;
}

.language-switcher:hover {
  background-color: var(--color-brand-primary);
  color: var(--color-white);
  border: 1px solid var(--color-brand-primary);
}

/* --------------------------- */
/* Social icons */
/* --------------------------- */
.socialIcons {
  display: flex;
  gap: 7px;
}

.socialIcons a {
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
}

.socialIcons img {
  width: 30px;
  height: 30px;
  transition: transform 0.3s;
}

.socialIcons img:hover {
  transform: scale(1.1);
}

/* --------------------------- */
/* Dropdown */
/* --------------------------- */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--color-brand-dark);
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(122, 121, 121, 0.2);
  z-index: 1;
  transition: all 0.3s ease;
  border-radius: 5px;
  overflow: hidden;
}

.dropdown-content a {
  color: var(--color-white);
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: #444; 
}

.dropdown:hover .dropdown-content {
  display: block;
}

.active {
  color: var(--color-brand-primary);
}

/* --- Nested Dropdown Styles --- */
.nested-dropdown {
    position: relative;
    display: block;
    list-style: none;
}

.nested-dropdown .nested-dropbtn {
    color: var(--color-white);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.nested-dropdown .nested-dropbtn:hover {
    background-color: #444;
}

.nested-dropdown-content {
    display: none;
    position: absolute;
    left: 100%; 
    top: 0;
    background-color: #383838;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(122, 121, 121, 0.3);
    z-index: 2;
    border-radius: 5px;
    overflow: hidden;
}

.nested-dropdown:hover .nested-dropdown-content {
    display: block;
}

.nested-dropdown-content a {
    color: var(--color-white);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    white-space: nowrap;
}

.nested-dropdown-content a:hover {
    background-color: #555;
}


/* --------------------------- */
/* Responsive */
/* --------------------------- */
@media (max-width: 992px) {
  .menu-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    z-index: 1100;
  }

  .contentSide {
    display: none;
  }

  .links {
    position: fixed;
    top: 0;
    left: -100%;
    width: 75%;
    height: 100vh;
    background: var(--color-brand-dark);
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px;
    transition: left 0.3s ease;
    overflow-y: auto;
    z-index: 1000;
  }
  
  html[dir="rtl"] .links {
    right: -100%;
    left: auto;
    transition: right 0.3s ease;
  }
  
  .links.open {
    left: 0;
  }
  
  html[dir="rtl"] .links.open {
    right: 0;
    left: auto;
  }

  .links.open .contentSide {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
  }

  .links ul {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }

  .links ul li {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    width: 100%;
  }

  .links ul li a {
    display: block;
    padding: 15px;
    font-size: 16px;
    color: var(--color-white);
  }

  .lowerHeader > img {
    height: 50px;
  }
}

@media (max-width: 576px) {
  .lowerHeader > img {
    height: 40px;
  }

  .phoneCalling {
    font-size: 14px;
  }

  .language-switcher {
    font-size: 14px;
    gap: 5px;
  }

  .socialIcons img {
    width: 25px;
    height: 25px;
  }
}