/* ==========================================================
   HEADER
========================================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: var(--transition);
}

.header.scrolled {
  background: #fff;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================
   CONTAINER
========================================================== */

.header > .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-height);
}

/* ==========================================================
   LOGO
========================================================== */

.logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  flex-shrink: 0;
}

.logo span {
  color: var(--color-secondary);
}

.logo-main {
  font-size: 1.9rem;
  line-height: 1.1;
}

.logo-sub {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--color-secondary);
}

/* ==========================================================
   NAVIGATION
========================================================== */

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-left: auto;
}

/* links */

.nav > a,
.nav-button > a {
  position: relative;

  display: flex;
  align-items: center;

  font-weight: 500;

  color: var(--color-text);

  text-decoration: none;

  transition: color 0.25s ease;
}

.nav > a:hover,
.nav-button > a:hover {
  color: var(--color-primary);
}

.nav > a::after,
.nav-button > a::after {
  content: "";

  position: absolute;

  left: 0;
  bottom: -0.35rem;

  width: 0;
  height: 2px;

  background: var(--color-primary);

  transition: width 0.25s ease;
}

.nav > a:hover::after,
.nav-button > a:hover::after {
  width: 100%;
}

/* ==========================================================
   SUBMENU
========================================================== */

.has-submenu {
  position: relative;
}

.nav-button {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.submenu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 28px;
  height: 28px;

  padding: 0;

  border: none;
  background: transparent;

  cursor: pointer;
}

.submenu-toggle i {
  font-size: 0.7rem;

  transition: transform 0.25s ease;
}

.has-submenu:hover .submenu-toggle i,
.has-submenu.open .submenu-toggle i {
  transform: rotate(180deg);
}

.submenu {
  position: absolute;

  top: calc(100% + 12px);

  left: 50%;

  transform: translate(-50%, 10px);

  min-width: 240px;

  padding: 0.5rem 0;

  background: #fff;

  border-radius: 12px;

  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);

  opacity: 0;
  visibility: hidden;

  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    visibility 0.25s ease;

  z-index: 1000;
}

.has-submenu:hover > .submenu,
.has-submenu.open > .submenu {
  opacity: 1;
  visibility: visible;

  transform: translate(-50%, 0);
}

.submenu a {
  display: block;

  padding: 0.8rem 1.25rem;

  color: var(--color-text);

  text-decoration: none;

  white-space: nowrap;

  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.submenu a:hover {
  background: #f6f7f9;

  color: var(--color-primary);
}

/* ==========================================================
   LANGUAGE
========================================================== */

.language-selector {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.language-button {
  display: flex;
  align-items: center;
  gap: 0.6rem;

  padding: 0.55rem 0.9rem;

  border: 1px solid var(--color-border);
  border-radius: 999px;

  background: #fff;

  cursor: pointer;

  transition: var(--transition);
}

.language-button:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.flag {
  width: 18px;
  height: 18px;

  object-fit: cover;

  border-radius: 2px;
}

.language-current {
  font-size: 0.95rem;
  font-weight: 500;
}

.language-button i {
  font-size: 0.75rem;
  transition: transform 0.25s ease;
}

.language-button.open i {
  transform: rotate(180deg);
}

.language-menu {
  position: absolute;

  top: calc(100% + 0.5rem);
  right: 0;

  display: none;
  flex-direction: column;

  min-width: 180px;

  padding: 0.4rem;

  gap: 0.25rem;

  background: #fff;

  border: 1px solid var(--color-border);

  border-radius: var(--radius-md);

  box-shadow: var(--shadow-md);

  overflow: hidden;
}

.language-menu.show {
  display: flex;
}

.language-menu button {
  display: flex;
  align-items: center;

  gap: 0.75rem;

  width: 100%;

  padding: 0.7rem 0.9rem;

  border: none;

  border-radius: 8px;

  background: #fff;

  text-align: left;

  cursor: pointer;

  transition: var(--transition);
}

.language-menu button:hover {
  background: #f5f7fb;
}

/* ==========================================================
   HAMBURGER
========================================================== */

.hamburger {
  display: none;

  flex-direction: column;

  justify-content: center;

  gap: 0.35rem;

  width: 48px;
  height: 48px;

  flex-shrink: 0;

  cursor: pointer;
}

.hamburger span {
  width: 26px;
  height: 3px;

  border-radius: 2px;

  background: var(--color-text);

  transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 992px) {
  .hamburger {
    display: flex;
  }

  .nav {
    position: fixed;

    top: var(--header-height);
    right: -100%;

    flex-direction: column;

    align-items: stretch;

    gap: 1rem;

    width: 320px;

    height: calc(100vh - var(--header-height));

    padding: 2rem;

    background: #fff;

    box-shadow: var(--shadow-lg);

    transition: right 0.35s ease;

    margin-left: 0;

    overflow-y: auto;
  }

  .nav.active {
    right: 0;
  }

  .nav > a {
    display: block;

    width: 100%;
  }

  .has-submenu {
    width: 100%;
  }

  .nav-button {
    display: flex;

    align-items: center;

    justify-content: space-between;

    width: 100%;
  }

  .nav-button > a {
    flex: 1;
  }

  .submenu-toggle {
    width: 40px;
    height: 40px;
  }

  .submenu {
    position: static;

    min-width: auto;

    margin-top: 0.5rem;

    transform: none;

    display: none;

    opacity: 1;

    visibility: visible;

    box-shadow: none;

    border-radius: 8px;

    background: #f7f8fa;
  }

  .has-submenu.open > .submenu {
    display: block;
  }
}

/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 768px) {
  .language-current {
    display: none;
  }
}


