:root {
  --primary-color: black;
  --danger-color: #f44336;
  --border-color: #ddd;
  --text-muted: #777;
  --text-light: #999;
  --card-radius: 12px;
  --transition: 0.3s ease;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

html {
  box-sizing: border-box;
}
*, *::before, *::after {
  box-sizing: inherit;
}

.logout-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
}


.resource-card a,
.resource-card a:visited,
.resource-card a:hover,
.resource-card a:active,
a,
a:visited,
a:hover,
a:active {
  color: black;
  text-decoration: none;
}

header {
  width: 100%;
  background-color: #ffffff;
  padding: 0; /* убрали внутренние отступы */
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 100%;
  margin: 10px;
  padding: 0 16px; /* можешь поставить 0, если прям в край */
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-left:20px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.nav-links a {
  user-select: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.nav-links a:visited {
  color: inherit;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  font-weight: bold;
  font-size: 20px;
  text-decoration: none;
  color: inherit;
}

.logo-icon {
  width: 20px;
  height: 20px;
  margin-left: 4px;
  vertical-align: middle;
  transition: transform 0.3s ease;
}

.logo-link:hover .logo-icon {
  transform: translate(6px, -6px) rotate(15deg);
}

.add-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 16px;
  background-color: black;
  color: white !important;
  font-size: 13px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.add-button:hover {
  background-color: #333;
}

.add-button .icon {
  width: 26px !important;
  height: 26px !important;
  filter: brightness(0) invert(1);
  margin: 0;
}

.iconadd {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}

.dropdown {
  position: relative;
}

.dropdown:hover .dropdown-menu {
  display: grid;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  max-width: 100vw;
  width: 700px;
  max-height: 400px;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: #fff;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  z-index: 1000;
  padding: 16px;
  border-radius: var(--card-radius);
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 15px !important;
  font-weight: 500;
  color: #000;
  cursor: pointer;
}

.dropdown-menu a {
  display: block;
  padding: 6px 10px;
  text-decoration: none;
  color: #222;
  font-size: 14px;
  border-radius: 5px;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.dropdown-menu a:hover {
  background-color: #f0f0f0;
  color: #000;
}

/* ========== User Dropdown ========== */


.user-dropdown button {
  all: unset; /* сброс стилей */
  display: inline-flex;
  align-items: center;
  gap: 2px;
  cursor: pointer;
}

.user-balance {
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
}

.user-balance a {
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: inherit;
}

.user-dropdown {
  position: relative;
  display: inline-block;
  font-size: 15px;
  font-weight: 500;
  color: #000;
  cursor: pointer;
}

.user-dropdown select {
  padding: 6px 8px;
  font-size: 14px;
  margin-right: 10px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.user-dropdown .dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  transform: translateX(-100px);
  background-color: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow);
  z-index: 1000;
  min-width: 180px;
  overflow: hidden;
  padding: 0;
}

.user-dropdown:hover .dropdown-menu {
  display: block;
}

.user-dropdown .dropdown-menu a,
.user-dropdown .dropdown-menu .logout-link {
  display: block;
  width: 100%;
  padding: 10px 16px;
  text-decoration: none;
  color: #000;
  font-size: 14px;
  white-space: nowrap;
  transition: background 0.2s;
  background: none;
  border: none;
  text-align: left;
}

.user-dropdown .dropdown-menu a:hover,
.user-dropdown .dropdown-menu .logout-link:hover {
  background-color: #f9f9f9;
}

#mobileProfileIcon {
  position: relative;
}

.profile-icon-wrapper {
  position: relative;
  display: inline-block;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: red;
  color: white;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 50%;
  line-height: 1;
  min-width: 16px;
  text-align: center;
  z-index: 10;
}


hr {
  margin: 0;
  border: none;
  border-bottom: 1px solid var(--border-color);
}

.notification-badge {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(-20%, 10%);
  background: red;
  color: white;
  font-size: 11px;
  padding: 2px 2px;
  border-radius: 50%;
  font-weight: bold;
  line-height: 1;
  min-width: 2px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 0 0 1px #fff;
}




/* ========== Бургер-меню ========== */
.burger-menu {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 60px;
  right: 10px;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 10px;
  z-index: 999;
}

.burger-menu.show {
  display: flex;
}

.burger-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: 8px;
}

/* ========== Разметка страницы ========== */
.page-wrapper {
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
}

/* ========== Иконки ========== */
.notification-icon {
  position: relative;
  display: inline-block;
  margin-right: 15px;
  font-size: 20px;
}

.notification-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  background: red;
  color: white;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 50%;
}

.iconbalance {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  padding-left: 2px;
}

.iconnotifications {
  width: 26px;
  height: 26px;
  vertical-align: middle;
}

.iconprofile {
  width: 32px;
  height: 32px;
  vertical-align: middle;
  padding-left: 2px;
}

/* ========== Меню и кнопки ========== */
.menulink {
  font-size: 18px;
  font-weight: 400;
}

.submit {
  background-color: black;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
}

/* ========== Поиск ========== */
.search-toggle {
  background-color: black;
  border-radius: 6px;
}

.search-form {
  display: none;
  flex-direction: row;
  gap: 8px;
  align-items: center;
  position: absolute;
  top: 120%;
  left: 0;
  background: #fff;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  width: calc(100vw - 40px);
  max-width: 480px;
  z-index: 999;
}

.search-form.active {
  display: flex;
}

.search-form input {
  flex: 1;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  outline: none;
}

.search-form input:focus {
  border-color: var(--primary-color);
}

/* ========== Поисковая форма ========== */
.search-form {
  display: none;
  flex-direction: row;
  gap: 10px;
  align-items: center;
  position: absolute;
  top: 110%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  width: 90%;
  max-width: 480px;
  z-index: 999;
}

.search-form.active {
  display: flex;
}

.search-form input {
  flex: 1;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  outline: none;
}

.search-form input:focus {
  border-color: var(--primary-color);
}

.search-form button {
  padding: 8px 12px;
  background-color: var(--primary-color);
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.search-form button img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

/* ========== Правая часть хедера ========== */
.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
  height: 40px;
}

.header-right > * {
  height: 100%;
  display: flex;
  align-items: center;
}

/* ========== Кнопка логина ========== */
.login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
}

.login-button img {
  width: 24px;
  height: 24px;
  display: block;
}

/* ========== Кнопка открытия поиска ========== */
.search-toggle {
  background-color: black;
  border-radius: 6px;
  padding: 6px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-toggle img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

/* ========== Language Selector ========== */
.language-selector {
  position: relative;
  width: 40px;
  cursor: pointer;
}

.language-selector .selected img {
  width: 32px;
  height: 32px;
}

.language-selector .dropdown {
  position: absolute;
  top: 40px;
  left: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  display: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  z-index: 1000;
}

.language-selector .dropdown div {
  padding: 5px;
}

.language-selector .dropdown div:hover {
  background-color: #f0f0f0;
}

.language-selector .dropdown img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

/* ========== Основное выпадающее меню ========== */
.dropdown {
  position: relative;
}

.dropdown:hover .dropdown-menuhead {
  display: block;
}

.dropdown-menuhead {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 1200px; /* увеличено */
  max-height: 800px;
  overflow-y: auto;
  background-color: white;
  border: 1px solid #ddd;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  z-index: 900;
  padding: 20px;
  border-radius: 8px;
  columns: 3 100px; /* шире колонка */
  column-gap: 12px; /* чуть больше отступ между колонками */
  box-sizing: border-box;
}

.dropdown-menuhead a {
  display: inline-block;
  width: 100%;
  padding: 6px 12px;
  text-decoration: none;
  color: #000;
  font-size: 14px;
  border-radius: 6px;
  break-inside: avoid;
  white-space: nowrap;
  transition: background 0.2s;
}


.dropdown-menuhead a:hover {
  background-color: #f2f2f2;
}



.form-title {
  font-size: 26px;
  margin-bottom: 30px;
  font-weight: 600;
}


.burger-toggle {
  display: none;
}

@media (max-width: 768px) {
  .nav-links {
    display: none !important;
  }

  .burger-toggle {
    display: block;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
  }

  .burger-toggle img {
    width: 24px;
    height: 24px;
  }

  .logo-link {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: bold;
    margin-right: auto;
  }

  .logo-icon {
    width: 22px;
    height: 22px;
    margin-left: 6px;
  }

.burger-menu {
  display: none;
  position: fixed;
  top: 60px;
  left: 10px;
  right: 10px;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  flex-direction: column;
  gap: 2px;
}

.burger-menu.show {
  display: flex;
}

.burger-menu a,
.burger-subtoggle {
  text-decoration: none;
  font-size: 16px;
  color: #222;
  padding: 6px 0;
  border-bottom: 1px solid #eee;
  background: none;
  border: none;
  text-align: left;
  width: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 2px;
}

.burger-menu a:last-child {
  border-bottom: none;
}

.subcategory-list {
  display: none;
  flex-direction: column;
  padding-left: 16px;
  gap: 6px;
  margin-top: -6px;

  max-height: 300px; /* ограничение по высоте */
  overflow-y: auto;  /* вертикальный скролл */
  scrollbar-width: thin; /* тонкий скролл в Firefox */
}

.subcategory-list::-webkit-scrollbar {
  width: 6px;
}

.subcategory-list::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
}

.subcategory-list.show {
  display: flex;
}

.subcategory-list li {
  list-style: none;
}

.subcategory-list li a {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #444;
  padding: 6px 8px;
  text-decoration: none;
  border-radius: 6px;
  gap: 6px;
  transition: background 0.2s;
}

.subcategory-list li a:hover {
  background-color: #f2f2f2;
}

.burger-menu a[href="/add/"] {
  font-weight: 600;
  background: #000;
  color: #fff;
  padding: 8px;
  border-radius: 8px;
  text-align: center;
}

.balancetext {
	display: none;
}

.nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-right: 8px;
  flex-wrap: nowrap;
}

  .nav-right > * {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
  }

  .language-selector {
  width: 24px;
  height: 16px;
  flex-shrink: 0;
}

.language-selector .selected img {
  width: 24px;
  height: 16px;
  object-fit: contain;
  border-radius: 2px;
}

  .language-selector .dropdown {
    top: 30px;
  }

  .search-toggle {
    background: none;
    border: none;
    padding: 0;
  }

  .search-toggle img {
    width: 24px;
    height: 24px;
    display: block;
    filter: brightness(0);
  }

.user-balance {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: #000;
  white-space: nowrap;  /* не переносим строку */
  max-width: 80px;       /* ограничение ширины */
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-balance a {
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: inherit;
}

.user-balance .iconbalance {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

  #mobileProfileIcon {
    font-size: 0;
    padding: 0;
    border: none;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
  }

  .iconprofile {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
  }
  .dropdown-menu {
  display: none;
}

.dropdown-menu.show {
  display: block;
}
}


























.site-footer {
  background: #000;
  color: #fff;
  padding: 40px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  gap: 40px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  min-width: 160px;
}

.footer-col h4 {
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 600;
}

.footer-col a {
  color: #fff;
  text-decoration: none;
  margin-bottom: 8px;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.footer-col a:hover {
  opacity: 1;
}

.logo-col h2 {
  font-size: 20px;
  margin-bottom: 10px;
}

.logo-col p {
  max-width: 280px;
  opacity: 0.7;
  margin-bottom: 10px;
  line-height: 1.4;
}

.logo-col small {
  font-size: 12px;
  opacity: 0.6;
}



