/* Файл: menu.css
   Назначение: верхнее меню Neygen.ru, mega-menu для "Все нейросети"
   и CPA mega-menu для "Оплата зарубежных сервисов".
*/

/* =========================
   Базовое меню
========================= */

.container-header {
  position: relative;
  z-index: 1000;
}

.navbar-menu-list {
  display: flex;
  align-items: center;
  gap: 30px;
}

.navbar-menu-list-item {
  border-bottom: 3px solid #fff;
}

.navbar-menu-list-item:hover {
  border-bottom: 3px solid #c8daff;
}

.navbar-menu-list-item a {
  display: block;
  position: relative;
  padding-top: 20px;
  padding-bottom: 15px;
  cursor: pointer;
  text-transform: uppercase;
  white-space: nowrap;
  transition: all 0.25s;
  font-weight: 500;
}

.navbar-menu-list-item a:hover {
  color: #3f6ecb;
}

.navbar-menu-list-item-active {
  border-bottom: 3px solid #3f6ecb !important;
}

.navbar-menu-list-item-active:hover {
  border-bottom: 3px solid #3f6ecb !important;
}

/* Старый класс зелёной кнопки, оставлен для совместимости */
.navbar-menu-list-item-target {
  height: 46px;
  border: 0;
  border-radius: 14px;
  padding: 0 22px;
  background: #eef8df;
  color: #5d8a1f;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.navbar-menu-list-item-target a {
  color: #5d8a1f;
  padding: 16px 0;
  display: block;
  font-size: 14px;
}


/* =========================
   Mega-menu: Все нейросети
========================= */

.navbar-menu-list-item--mega {
  position: static;
}

.neygen-mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 999;

  background: #ffffff;
  border-top: 1px solid #e8ecef;
  border-bottom: 1px solid #e8ecef;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transform: translateY(10px);
  transition:
    opacity 0.18s ease,
    visibility 0.18s ease,
    transform 0.18s ease;
}

.navbar-menu-list-item--mega:hover .neygen-mega-menu,
.navbar-menu-list-item--mega:focus-within .neygen-mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.neygen-mega-menu__inner {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 28px 0 30px;

  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 220px;
  gap: 36px;
}

.neygen-mega-menu__intro {
  padding: 22px;
  border: 1px solid #e4ebff;
  border-radius: 22px;
  background: linear-gradient(180deg, #f8faff 0%, #f2f5ff 100%);
}

.neygen-mega-menu__eyebrow {
  margin-bottom: 8px;
  color: #3f6ecb;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.neygen-mega-menu__title {
  margin-bottom: 10px;
  color: #333e50;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
}

.neygen-mega-menu__intro p {
  margin: 0 0 18px;
  color: #667085;
  font-size: 14px;
  line-height: 1.55;
}

/* Перебиваем общие стили ссылок меню внутри mega-menu */
.navbar-menu-list-item .neygen-mega-menu a {
  display: flex;
  padding: 0;
  text-transform: none;
  white-space: normal;
  font-weight: 500;
}

.neygen-mega-menu__all {
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 12px;
  background: #3f6ecb;
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 700 !important;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.neygen-mega-menu__all:hover {
  background: #2e6ff1;
  transform: translateY(-1px);
}

.neygen-mega-menu__heading {
  margin-bottom: 14px;
  color: #333e50;
  font-size: 18px;
  font-weight: 800;
}

.neygen-mega-menu__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.neygen-mega-menu__item {
  display: flex;
  min-height: 74px;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;

  padding: 14px 16px !important;
  border: 1px solid #edf1f7;
  border-radius: 16px;
  background: #ffffff;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.neygen-mega-menu__item:hover {
  background: #f7f9ff;
  border-color: #dfe7ff;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.neygen-mega-menu__logo,
.neygen-mega-menu__logo-placeholder {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.neygen-mega-menu__logo {
  display: block;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid #edf1f7;
}

.neygen-mega-menu__logo-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #edf4ff;
  color: #3f6ecb;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.neygen-mega-menu__item-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0px;
}

.neygen-mega-menu__item-content strong,
.neygen-mega-menu__item strong {
  color: #333e50;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.neygen-mega-menu__item-content span,
.neygen-mega-menu__item span {
  color: #9299a2;
  font-size: 13px;
  line-height: 1.35;
}

.neygen-mega-menu__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.neygen-mega-menu__links a {
  align-items: center;
  gap: 10px;
  min-height: 44px;

  padding: 0 14px !important;
  border: 1px solid #edf1f7;
  border-radius: 14px;
  background: #ffffff;

  color: #333e50;
  font-size: 14px;
  font-weight: 700 !important;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.neygen-mega-menu__links a i {
  width: 18px;
  color: #3f6ecb;
  text-align: center;
}

.neygen-mega-menu__links a:hover {
  background: #3f6ecb;
  border-color: #3f6ecb;
  color: #ffffff !important;
}

.neygen-mega-menu__links a:hover i {
  color: #ffffff;
}


/* =========================
   CPA mega-menu: Оплата зарубежных сервисов
========================= */

.navbar-menu-list-item--payment {
  position: relative;
  border-bottom-color: #ffffff;
}

.navbar-menu-list-item--payment:hover {
  border-bottom-color: transparent !important;
}

.navbar-payment-link {
  display: flex !important;
  align-items: center;
  justify-content: center;

  min-height: 40px;
  margin: 7px 0 0;
  padding: 0 22px !important;

  background: #eef7df;
  border-radius: 16px;

  color: #3d6d16 !important;
  font-size: 14px;
  font-weight: 800 !important;
  line-height: 1;
  text-transform: uppercase;
}

.navbar-payment-link:hover,
.navbar-menu-list-item--payment:hover .navbar-payment-link {
  background: #e3f2cd;
  color: #315b0f !important;
}

.neygen-payment-mega,
.neygen-payment-mega * {
  box-sizing: border-box;
}

.neygen-payment-mega {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 2000;

  width: min(920px, calc(100vw - 40px));

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transform: translateY(10px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s ease;
}

.navbar-menu-list-item--payment:hover .neygen-payment-mega,
.navbar-menu-list-item--payment:focus-within .neygen-payment-mega {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.neygen-payment-mega::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}

/* Перебиваем общее white-space: nowrap из верхнего меню */
.navbar-menu-list-item .neygen-payment-mega a,
.neygen-payment-mega a {
  white-space: normal !important;
  text-transform: none !important;
}

.neygen-payment-mega__inner {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 18px;
  align-items: stretch;

  padding: 18px;
  background: #ffffff;
  border: 1px solid #e6ebf2;
  border-radius: 24px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.14);
}

.neygen-payment-mega__main {
  padding: 22px 24px;
  background: linear-gradient(180deg, #f7fbef 0%, #eef7df 100%);
  border: 1px solid #dceec4;
  border-radius: 22px;
}

.neygen-payment-mega__label {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 7px 11px;

  background: #ffffff;
  border: 1px solid #dceec4;
  border-radius: 999px;

  color: #4d7c1c;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.neygen-payment-mega__main h3 {
  margin: 0 0 12px;
  padding: 0;

  color: #263238 !important;
  font-size: 23px;
  font-weight: 900;
  line-height: 1.2;
}

.neygen-payment-mega__main p {
  margin: 0 0 16px;

  color: #667085;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.55;
}

.neygen-payment-mega__features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.neygen-payment-mega__features span {
  display: inline-flex;
  padding: 7px 10px;

  background: #ffffff;
  border: 1px solid #dceec4;
  border-radius: 999px;

  color: #3d6d16;
  font-size: 12px;
  font-weight: 800;
}

.neygen-payment-mega__button {
  display: flex !important;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-height: 45px;
  padding: 13px 18px !important;

  background: #3f6ecb;
  border-radius: 12px;

  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: 1.2;

  box-shadow: 0 10px 22px rgba(63, 110, 203, 0.26);
}

.neygen-payment-mega__button:hover {
  background: #2f5fbd;
  color: #ffffff !important;
}

.neygen-payment-mega__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto auto;
  gap: 12px;
  align-content: start;
}

.neygen-payment-mega__card {
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;

  min-height: 130px;
  padding: 16px !important;
  overflow: hidden;

  background: #ffffff;
  border: 1px solid #e6ebf2;
  border-radius: 18px;

  color: #344054 !important;
  line-height: 1.35;

  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.neygen-payment-mega__card:hover {
  transform: translateY(-2px);
  border-color: #cfdcf7;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
  color: #344054 !important;
}

.neygen-payment-mega__icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 38px;
  height: 38px;

  background: #f3f7ff;
  border-radius: 12px;

  font-size: 20px;
  line-height: 1;
}

.neygen-payment-mega__card strong {
  display: block;
  color: #263238;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.25;
  white-space: normal !important;
}

.neygen-payment-mega__card em {
  display: block;
  max-width: 100%;

  color: #8a94a6;
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.45;

  white-space: normal !important;
  overflow-wrap: anywhere;
}

.neygen-payment-mega__note {
  grid-column: 1 / -1;
  align-self: start;

  min-height: auto;
  padding: 14px 16px;

  background: #f7f9ff;
  border: 1px solid #e3e9fb;
  border-radius: 14px;

  color: #667085;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

/**
 * Файл: menu.css
 * Блок: промокод в CPA mega-menu
 * Задача: показать промокод Neygen и визуально подсветить копирование
 */

.neygen-payment-mega__promo {
  width: 100%;
  margin: 0 0 16px;
  padding: 13px 14px;

  display: flex;
  flex-direction: column;
  gap: 7px;
  grid-column: 1 / -1;
  align-self: start;

  background: #ffffff;
  border: 1px dashed #a8cf77;
  border-radius: 16px;

  color: #315b0f;
  cursor: pointer;
  font-family: inherit;
  text-align: left;

  box-shadow: 0 8px 18px rgba(61, 109, 22, 0.08);

  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.neygen-payment-mega__promo:hover {
  transform: translateY(-1px);
  background: #fbfff5;
  border-color: #7fb246;
  box-shadow: 0 12px 24px rgba(61, 109, 22, 0.13);
}

.neygen-payment-mega__promo-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.neygen-payment-mega__promo-label {
  padding: 5px 8px;
  background: #eef7df;
  border-radius: 999px;

  color: #4d7c1c;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.neygen-payment-mega__promo strong {
  color: #263238;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.04em;
}

.neygen-payment-mega__promo-discount {
  margin-left: auto;
  padding: 5px 8px;

  background: #3f6ecb;
  border-radius: 999px;

  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.neygen-payment-mega__promo-hint {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.neygen-payment-mega__promo.is-copied {
  background: #f4fbec;
  border-color: #78ab43;
}

.neygen-payment-mega__promo.is-copied .neygen-payment-mega__promo-hint {
  color: #4d7c1c;
}


/* =========================
   Адаптив
========================= */

@media (max-width: 1100px) {
  .neygen-mega-menu__inner {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .neygen-mega-menu__section--categories {
    display: none;
  }

  .neygen-mega-menu__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .navbar-menu-list {
    gap: 22px;
  }

  .neygen-payment-mega {
    right: -20px;
    width: min(860px, calc(100vw - 32px));
  }

  .neygen-payment-mega__inner {
    grid-template-columns: 280px 1fr;
  }
}

@media (max-width: 900px) {
  .neygen-payment-mega {
    display: none;
  }

  .navbar-payment-link {
    border-radius: 12px;
  }
}

@media (max-width: 768px) {
  .neygen-mega-menu {
    display: none;
  }
}