/* ===========================
   HEADER LAYOUT
   =========================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(20, 20, 20, 0.75); /* transparency is now 0.75 */
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px; /* or your previous value */
  border-top: none;
  border-bottom: 1px solid #20c0ff; /* Match footer line color */
}

.header-left {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.header-center {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
  position: static; /* remove absolute positioning */
}

.header-right {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 40px; /* 1cm from the right edge */
}

/* ===========================
   LOGOS
   =========================== */
.logo {
  height: 48px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.rustlogo {
  display: block;
  margin: 0 auto;
  max-height: 64px;
}

/* ===========================
   USER INFO
   =========================== */
.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 1px solid #444; /* Small border between language and user info/login */
  padding-left: 40px; /* 10mm to the right */
}

.user-info .avatar {
  border-radius: 50%;
  height: 32px;
  width: 32px;
  object-fit: cover;
}

.user-info span {
  color: #fff;
  font-size: 14px;
}

.user-info a {
  color: #ccc;
  font-size: 14px;
  text-decoration: none;
}

.user-info a:hover {
  color: #fff;
}

/* ===========================
   LANGUAGE DROPDOWN
   =========================== */
.language-toggle {
  position: relative;
  margin-right: 40px; /* 10mm to the right */
  margin-left: -40px; /* Move 10mm to the left */
}

.language-btn {
  display: flex;
  align-items: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 14px;
}

.flag-icon {
  width: 20px;
  height: 14px;
  margin-right: 6px;
  vertical-align: middle;
}

.language-btn .arrow {
  margin-left: 4px;
  font-size: 10px;
}

/* ===========================
   DROPDOWN MENU
   =========================== */
.language-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #222;
  border: 1px solid #444;
  border-radius: 4px;
  min-width: 140px;
  padding: 5px 0;
  z-index: 1000;

  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.language-dropdown.open {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.language-dropdown a {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  color: #fff;
  font-size: 14px;
  text-decoration: none;
}

.language-dropdown a:hover {
  background: #333;
}

.language-dropdown a img {
  width: 20px;
  height: 14px;
  margin-right: 8px;
}

/* ===========================
   RESPONSIVE BEHAVIOUR
   =========================== */
@media (max-width: 768px) {
  header {
    flex-wrap: wrap;
    padding: 10px;
  }

  .header-center {
    order: 3;
    margin-top: 10px;
  }

  .header-right {
    order: 2;
  }

  .header-left {
    order: 1;
  }

  .language-dropdown {
    right: auto;
    left: 0;
  }
}

/* ===========================
   FLAG BUTTON HOVER EFFECT
   =========================== */
.language-btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.language-btn:hover .arrow {
  color: #fff;
}

/* Add padding to body or main container to prevent content hiding under header */
body, .main-container {
  padding-top: 80px; /* adjust to match header height */
}

.center-line {
  width: 5mm;
  height: 2px;
  background: #fff;
  margin-top: 8px;
  margin-bottom: 0;
}