/* Ensure Open Sans is always loaded for the navbar, regardless of which page includes this file */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&display=swap');

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Sign In — outlined button (как на скриншоте) */
.auth-buttons .login-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 22px;
  border: 1.5px solid #F09933;
  border-radius: 50px;
  color: #F09933;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  background: transparent;
  transition: background 0.3s ease, color 0.3s ease;
}

.auth-buttons .login-btn:hover {
  background: #F09933;
  border: 1.5px solid #F09933;
  color: #fff;
}

.wrapper .logo {
  flex-shrink: 0;
}

.lang-menu {
  position: relative;
  display: inline-block;
  margin-left: 10px;
  
  
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 8px;

  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;

  padding: 8px 0px;
  cursor: pointer;

  font-size: 14px;
  font-weight: 600;
}

.lang-flag {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.lang-arrow {
  font-size: 12px;
  color: #666;
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  margin-left: 2px;
  
  background: #fff;
  border-radius: 12px;

  min-width: 140px;

  box-shadow: 0 10px 25px rgba(0,0,0,0.1);

  /* Padding сверху — невидимый мост между кнопкой и меню */
  padding: 8px 0;
  padding-top: 12px;

  display: none;
  z-index: 100;
}

/* Псевдоэлемент заполняет зазор, не давая hover слетать */
.lang-menu::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 12px;
}

.lang-menu:hover .lang-dropdown {
  display: block;
}

.lang-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 10px 14px;

  color: #222;
  text-decoration: none;
  font-weight: 500;

  transition: 0.2s;
}

.lang-dropdown a:hover {
  background: #f5f5f5;
}

.dropdown-flag {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.user-menu {
  position: relative;
}

.user-dropdown {
  display: none;
  position: absolute;
  top: 110%;
  right: 0;
  background: #fff;
  min-width: 180px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  overflow: hidden;
  z-index: 999;
}

.user-dropdown a {
  display: block;
  padding: 12px 18px;
  text-decoration: none;
  color: #333;
  font-size: 14px;
}

.user-dropdown a:hover {
  background: #f7f7f7;
  color: #F09933;
}

/* показываем только при клике */
.user-menu.active .user-dropdown {
  display: block;
} 

nav{
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(0px);
  transition: 0.3s ease;
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

nav .wrapper{
  position: relative;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 0 40px;
  height: 78px;
   
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wrapper .nav-links {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: center;
  flex-wrap: nowrap;
}

.wrapper .nav-links li {
  white-space: nowrap;
}

@media screen and (max-width: 1280px) {

  /* Show hamburger */
  .wrapper .btn {
    display: block !important;
  }

  /* Hide desktop auth buttons */
  .auth-buttons {
    display: none !important;
  }

  /* Show mobile auth items in nav sidebar */
  .nav-links .mobile-auth {
    display: block;
    margin: 15px 20px;
  }

  /* Nav links become sidebar (same as style.css 1125px, but wider) */
  .wrapper .nav-links {
    position: fixed;
    height: 100vh;
    width: 100%;
    max-width: 350px;
    top: 0;
    left: -100%;
    background: #ffffff;
    display: block;
    padding: 60px 8px 30px;
    line-height: 1.5;
    overflow-y: auto;
    box-shadow: 0px 15px 15px rgba(0,0,0,0.18);
    transition: all 0.3s ease;
    flex: none;
  }

  /* Open sidebar on radio check */
  #menu-btn:checked ~ .nav-links {
    left: 0%;
  }

  /* Hamburger is now inside .nav-right — fix sibling selectors */
  #menu-btn:checked ~ .nav-right .btn.menu-btn {
    display: none;
  }
  #close-btn:checked ~ .nav-right .btn.menu-btn {
    display: block;
  }

  /* Nav item styles inside sidebar */
  .nav-links li {
    margin: 2px 0;
    white-space: normal;
  }
  .nav-links li a {
    padding: 12px 24px !important;
    display: block;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #1a1a2e !important;
    border-radius: 8px;
    line-height: 1.4;
    transition: color 0.2s ease, background 0.2s ease;
  }
  .nav-links li a:hover {
    color: #F09933 !important;
    background: rgba(240,153,51,0.07) !important;
  }
  .nav-links .desktop-item {
    display: none;
  }
  .nav-links .mobile-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #1a1a2e;
    font-size: 15px;
    font-weight: 500;
    padding: 12px 24px !important;
    cursor: pointer;
    border-radius: 8px;
    line-height: 1.4;
    transition: color 0.2s ease;
  }
  .nav-links .mobile-item::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid #aaa;
    border-bottom: 1.5px solid #aaa;
    transform: rotate(-45deg);
    transition: transform 0.25s ease;
    flex-shrink: 0;
    margin-right: 4px;
  }
  #showDrop1:checked ~ .mobile-item::after,
  #showDrop2:checked ~ .mobile-item::after,
  #showDrop3:checked ~ .mobile-item::after,
  #showDrop4:checked ~ .mobile-item::after {
    transform: rotate(45deg);
  }
  .nav-links .mobile-item:hover {
    color: #F09933;
  }
  .nav-links .drop-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    padding: 0 !important;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    box-shadow: none;
    background: transparent;
    border-radius: 0;
    transition: max-height 0.3s ease;
    top: auto;
  }
  /* Expand dropdown on checkbox check */
  #showDrop1:checked ~ .drop-menu,
  #showDrop2:checked ~ .drop-menu,
  #showDrop3:checked ~ .drop-menu,
  #showDrop4:checked ~ .drop-menu {
    max-height: 500px;
  }
  /* Drop-menu sub-items */
  .nav-links .drop-menu li {
    margin: 0;
  }
  .nav-links .drop-menu li a {
    font-size: 13px !important;
    color: #666 !important;
    padding: 9px 24px 9px 38px !important;
    border-radius: 0 !important;
    background: transparent !important;
  }
  .nav-links .drop-menu li a:hover {
    color: #F09933 !important;
    background: transparent !important;
  }
  /* Separator before auth buttons */
  .nav-links li:not(.mobile-auth) + li.mobile-auth {
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
    margin-top: 8px;
  }
  /* Mobile auth section */
  .nav-links .mobile-auth {
    display: block;
    margin: 4px 16px;
  }
  .nav-links .mobile-auth a {
    display: block !important;
    text-align: center;
    padding: 11px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 50px !important;
    text-decoration: none;
    line-height: 1.4;
    border: 1.5px solid transparent !important;
  }
  .nav-links .mob-login-btn {
    border-color: #F09933 !important;
    color: #F09933 !important;
    background: transparent !important;
    transition: all 0.25s ease;
  }
  .nav-links .mob-login-btn:hover {
    background: #F09933 !important;
    color: #fff !important;
  }
  .nav-links .mob-signup-btn {
    background: #F09933 !important;
    border-color: #F09933 !important;
    color: #fff !important;
    margin-top: 8px !important;
    box-shadow: 0 3px 10px rgba(240,153,51,0.35);
    transition: all 0.25s ease;
  }
  .nav-links .mob-signup-btn:hover {
    background: #F2B200 !important;
    border-color: #F2B200 !important;
    box-shadow: 0 3px 14px rgba(240,153,51,0.45);
  }

  /* ── Logged-in user button in mobile sidebar ── */
  .nav-links li.user-mobile {
    margin: 4px 16px;
  }
  .nav-links li.user-mobile .signup-btn.user-toggle {
    display: block;
    width: 100%;
    text-align: center;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 50px;
    background: #F09933;
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(240, 153, 51, 0.35);
    transition: background 0.25s ease;
  }
  .nav-links li.user-mobile .signup-btn.user-toggle:hover {
    background: #F2B200;
    box-shadow: 0 3px 14px rgba(240, 153, 51, 0.45);
  }

  /* Dropdown inside mobile sidebar — static, not absolute */
  .nav-links li.user-mobile .user-dropdown {
    position: static;
    display: none;
    box-shadow: none;
    border-radius: 10px;
    background: #fafafa;
    margin-top: 6px;
    overflow: hidden;
  }
  .nav-links li.user-mobile.active .user-dropdown {
    display: block;
  }
  .nav-links li.user-mobile .user-dropdown a {
    padding: 10px 20px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #333 !important;
    border-radius: 0 !important;
    text-align: left;
  }
  .nav-links li.user-mobile .user-dropdown a:hover {
    background: rgba(240,153,51,0.08) !important;
    color: #F09933 !important;
  }
}





/* ── Desktop-only nav styles (do NOT bleed into mobile) ── */
@media (min-width: 1281px) {
  .nav-links li a {
    color: #222;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 10px 14px;
    border-radius: 12px;
    transition: all 0.25s ease;
  }
  .nav-links li a:hover {
    color: #F09933;
    background: rgba(240,153,51,0.08);
  }
  .nav-links .drop-menu {
    position: absolute;
    background: rgba(255, 255, 255, 0.97);
    width: 230px;
    border-radius: 18px;
    padding: 12px 0;
    top: 85px;
    opacity: 0;
    visibility: hidden;
    box-shadow:
      0 10px 30px rgba(0,0,0,0.08),
      0 2px 8px rgba(0,0,0,0.04);
    transition: 0.25s ease;
  }
  .nav-links li:hover .drop-menu {
    top: 70px;
    opacity: 1;
    visibility: visible;
  }
  .nav-links .drop-menu li a {
    font-size: 14px;
    color: #444;
    padding: 9px 18px;
    border-radius: 0;
    font-weight: 400;
  }
  .nav-links .drop-menu li a:hover {
    color: #F09933;
    background: rgba(240,153,51,0.06);
  }
}

.auth-buttons .signup-btn {
  position: relative;
  overflow: hidden;
  background: #F09933;
  color: #fff !important;
  padding: 9px 22px;
  border-radius: 70px;
  text-decoration: none;
  font-weight: 400;
  letter-spacing: 0.5px;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(240, 153, 51, 0.35);
}