/* ================================
   SITE HEADER - Modern Structure
   ================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #1c232e;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Add padding to body to prevent content from going under fixed header */
body {
  padding-top: 137px;
}

/* Top Color Bar */
.header-color-bar {
  display: flex;
  width: 100%;
  height: 10px;
}

.color-segment {
  flex: 1;
}

.color-segment-1 {
  background: #02619d;
  flex: 0 0 34%;
}

.color-segment-2 {
  background: #4e93cf;
  flex: 0 0 33%;
}

.color-segment-3 {
  background: #84b6e0;
  flex: 0 0 33%;
}

/* Header Container */
.header-container {
  width: 100%;
  padding: 0 20px;
  border-bottom: 1px solid #0c3650;
  position: relative;
}

.header-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 127px;
  gap: 30px;
  padding: 0 220px;
}

/* Logo */
.header-logo {
  flex-shrink: 0;
  position: absolute;
  left: 20px;
  z-index: 10;
}

.header-logo .logo {
  width: 199px;
  height: 67px;
  background: url("../images/global/logos/logo_paos.svg") no-repeat center;
  background-size: contain;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.header-logo .logo:hover {
  opacity: 0.8;
}

/* Language Selector */
.header-language-selector {
  position: absolute;
  right: 20px;
  display: flex;
  align-items: center;
  z-index: 10;
}

.lang-dropdown-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lang-dropdown-toggle:hover {
  border-color: #4e93cf;
}

.current-lang-flag {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: fill;
}

.lang-arrow {
  color: #4e93cf;
  font-size: 0.8em;
  transition: transform 0.3s ease;
}

.header-language-selector.dropdown-open .lang-arrow {
  transform: rotate(180deg);
}

.lang-buttons-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.lang-button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background-color: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  padding: 0;
  overflow: hidden;
}

.lang-button .flag-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.lang-button.active {
  border-color: #4e93cf;
  border-width: 3px;
  box-shadow: 0 0 10px rgba(78, 147, 207, 0.5);
}

.lang-button:hover {
  border-color: #4e93cf;
  transform: scale(1.1);
  box-shadow: 0 0 8px rgba(78, 147, 207, 0.4);
}

/* Main Navigation */
.header-nav {
  flex: 0;
  display: flex;
  justify-content: center;
}

.main-menu {
  display: none;
}

.main-menu.active-lang {
  display: block;
}

/* Mobile Menu Button */
.mobile-menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 4px;
  background-color: #02619d;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: background-color 0.3s ease;
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle:active {
  background-color: #4e93cf;
}

.menu-icon {
  display: block;
  position: absolute;
  height: 2px;
  width: 18px;
  background-color: #ffffff;
  border-radius: 5px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.2s ease;
}

.menu-icon::before,
.menu-icon::after {
  content: "";
  position: absolute;
  height: 2px;
  width: 18px;
  background-color: #ffffff;
  border-radius: 5px;
  left: 0;
  transition: all 0.2s ease;
}

.menu-icon::before {
  top: -6px;
}

.menu-icon::after {
  top: 6px;
}

/* Mobile Menu Active State */
.mobile_active ~ .mobile-menu-toggle .menu-icon {
  background-color: transparent;
}

.mobile_active ~ .mobile-menu-toggle .menu-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.mobile_active ~ .mobile-menu-toggle .menu-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Responsive Breakpoints */
@media screen and (max-width: 1200px) {
  .header-wrapper {
    min-height: 80px;
    gap: 15px;
    justify-content: space-between;
    padding: 0 70px 0 20px;
  }

  .header-logo {
    position: static;
  }

  .header-logo .logo {
    width: 150px;
    height: 50px;
  }

  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 20px;
    right: 15px;
    z-index: 5102;
  }

  /* Language selector becomes dropdown on mobile */
  .header-language-selector {
    top: 20px;
    right: 70px;
    z-index: 101;
    margin-right: 20px;
    display: flex;
    align-items: center;
  }

  .lang-dropdown-toggle {
    display: flex;
  }

  .lang-buttons-container {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #4a8dc2 !important;
    border: none !important;
    border-radius: 15px !important;
    padding: 0 !important;
    flex-direction: column;
    gap: 0 !important;
    display: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
    z-index: 9999;
    min-width: 60px;
    overflow: hidden;
  }

  .header-language-selector.dropdown-open .lang-buttons-container {
    display: flex !important;
  }

  .lang-buttons-container .lang-button {
    border: none !important;
    border-radius: 0 !important;
    width: 100%;
    height: auto;
    padding: 12px 15px !important;
    transition: all 0.25s ease;
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  .lang-buttons-container .lang-button:first-child {
    border-radius: 15px 15px 0 0 !important;
  }

  .lang-buttons-container .lang-button:last-child {
    border-bottom: none !important;
    border-radius: 0 0 15px 15px !important;
  }

  .lang-buttons-container .lang-button:hover {
    background-color: rgba(30, 41, 59, 0.7) !important;
    transform: none !important;
    box-shadow: none !important;
  }

  .lang-buttons-container .lang-button .flag-icon {
    width: 24px;
    height: 24px;
  }

  body {
    padding-top: 90px;
  }
}

@media screen and (max-width: 576px) {
  .header-container {
    padding: 0 15px;
  }

  .header-wrapper {
    padding: 0 15px 0 15px;
  }

  .header-logo .logo {
    width: 120px;
    height: 40px;
  }

  .header-language-selector {
    top: 25px;
    right: 60px;
    display: flex;
    align-items: center;
  }

  .lang-button {
    width: 20px;
    height: 20px;
  }

  .current-lang-flag {
    width: 20px;
    height: 20px;
    object-fit: cover !important;
    display: inline-block !important;
    clip-path: circle(40%);
    border-radius: 50%;
  }
  
}
