@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap");

:root {
  --sg-text: #1f2f46;
  --sg-header-height-desktop: 110px;
  --sg-header-surface: linear-gradient(180deg, rgba(249, 251, 255, 0.96) 0%, rgba(236, 245, 255, 0.92) 100%);
  --sg-top-strip: linear-gradient(180deg, rgba(227, 239, 255, 0.82) 0%, rgba(245, 249, 255, 0.62) 38%, rgba(255, 255, 255, 0) 100%);
  --sg-glass-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(232, 238, 247, 0.56));
  --sg-glass-border: rgba(255, 255, 255, 0.68);
  --sg-glass-inner: rgba(149, 166, 194, 0.22);
  --sg-glass-shadow: 0 24px 60px rgba(31, 47, 70, 0.12);
  --sg-glass-shadow-hover: 0 32px 75px rgba(31, 47, 70, 0.16);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(215, 225, 239, 0.78), transparent 30%),
    radial-gradient(circle at top right, rgba(234, 239, 247, 0.82), transparent 28%),
    linear-gradient(180deg, #f7f9fc 0%, #eef3f8 100%);
  color: var(--sg-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body > header,
body > main,
body > footer {
  width: 100%;
}

main {
  flex: 1 0 auto;
  display: block;
}

#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.loaded {
  opacity: 0;
  visibility: hidden;
}

.sg-header {
  position: sticky;
  top: 0;
  width: 100%;
  background: var(--sg-header-surface);
  border-bottom: 0;
  backdrop-filter: blur(18px);
  z-index: 9999;
  padding: 8px 0;
  box-shadow: 0 8px 24px rgba(72, 110, 180, 0.05);
}

.sg-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -14px;
  height: 14px;
  background: linear-gradient(180deg, rgba(205, 220, 242, 0.24) 0%, rgba(255, 255, 255, 0.10) 52%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.sg-header .sg-shell {
  max-width: none;
  margin: 0 auto;
  padding-left: clamp(8px, 1.2vw, 16px);
  padding-right: clamp(16px, 2.1vw, 30px);
}

.sg-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 25px;
}

.sg-header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 28px;
  flex-wrap: nowrap;
  min-width: 0;
}

.sg-logo {
  display: inline-flex;
  align-items: center;
  min-height: 92px;
  flex: 0 1 auto;
  overflow: visible;
  transition: transform 0.3s ease;
}

.sg-logo:hover {
  transform: scale(1.02);
}

.sg-logo img {
  width: clamp(248px, 16vw, 330px);
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.sg-nav {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  margin-left: auto;
  gap: 28px;
  position: relative;
  overflow: visible;
}

.sg-nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.sg-nav-item.has-submenu::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 14px;
}

.sg-nav > a,
.sg-nav-item > a {
  font-size: 16px;
  font-weight: 800;
  color: #3e0718;
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 10px 0;
  letter-spacing: -0.01em;
}

.sg-nav a:hover,
.sg-nav a.is-active,
.sg-nav-item.is-active > a {
  color: #ff2b2b;
}

@media (min-width: 992px) {
  .sg-header {
    padding: 0;
  }

  .sg-header-inner {
    min-height: var(--sg-header-height-desktop);
  }

  .sg-header .sg-logo {
    min-height: var(--sg-header-height-desktop);
    height: var(--sg-header-height-desktop);
    overflow: hidden;
    align-items: flex-start;
  }

  .sg-header .sg-logo img {
    width: clamp(236px, 15vw, 308px);
    transform: translateY(-10px);
    transform-origin: top left;
  }

  .sg-header .sg-nav > a,
  .sg-header .sg-nav-item > a {
    padding-top: 0;
    padding-bottom: 0;
  }
}

.sg-subnav {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  min-width: 360px;
  padding: 10px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(16, 32, 57, 0.08);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.14);
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(12px);
  transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
  z-index: 10000;
  overflow: hidden;
}

.sg-nav-item:hover .sg-subnav {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.sg-subnav a {
  padding: 15px 20px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  color: #102039;
  display: block;
  text-decoration: none;
  background: #ffffff;
  border: 1px solid transparent;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.sg-subnav a:hover,
.sg-subnav a.is-active {
  background: #f4f7fb;
  color: #102039;
  border-color: rgba(47, 103, 246, 0.14);
  box-shadow: inset 4px 0 0 #2f67f6;
}

.sg-menu-toggle,
.sg-mobile-menu {
  display: none;
}

.sg-menu-toggle {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  flex: 0 0 auto;
  gap: 6px;
  cursor: pointer;
}

.sg-menu-toggle span {
  width: 26px;
  height: 3px;
  border-radius: 999px;
  background: #2348a0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.sg-header.is-mobile-open .sg-menu-toggle span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.sg-header.is-mobile-open .sg-menu-toggle span:nth-child(2) {
  opacity: 0;
}

.sg-header.is-mobile-open .sg-menu-toggle span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.sg-mobile-menu {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(16, 32, 57, 0.08);
  box-shadow: 0 18px 42px rgba(16, 32, 57, 0.12);
}

.sg-mobile-link,
.sg-mobile-subnav a {
  display: block;
  text-decoration: none;
  color: #102039;
}

.sg-mobile-link {
  font-size: 15px;
  font-weight: 800;
  padding: 12px 0;
}

.sg-mobile-link:hover,
.sg-mobile-link.is-active,
.sg-mobile-group.is-active > .sg-mobile-parent-row > .sg-mobile-link,
.sg-mobile-group.is-open > .sg-mobile-parent-row > .sg-mobile-link,
.sg-mobile-subnav a:hover,
.sg-mobile-subnav a.is-active {
  color: #2348a0;
}

.sg-mobile-group + .sg-mobile-group,
.sg-mobile-group + .sg-mobile-link,
.sg-mobile-link + .sg-mobile-group,
.sg-mobile-link + .sg-mobile-link {
  border-top: 1px solid rgba(16, 32, 57, 0.08);
}

.sg-mobile-parent-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sg-mobile-parent-row .sg-mobile-link {
  flex: 1 1 auto;
}

.sg-mobile-parent-toggle {
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  position: relative;
  flex: 0 0 auto;
  cursor: pointer;
}

.sg-mobile-parent-toggle span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  background: #2348a0;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.sg-mobile-parent-toggle span:last-child {
  transform: translate(-50%, -50%) rotate(90deg);
}

.sg-mobile-group.is-open .sg-mobile-parent-toggle span:last-child {
  opacity: 0;
}

.sg-mobile-subnav {
  display: none;
  padding: 0 0 12px 14px;
}

.sg-mobile-group.is-open .sg-mobile-subnav {
  display: block;
}

.sg-mobile-subnav a {
  padding: 10px 0;
  font-size: 14px;
  font-weight: 700;
}

.category-grid,
.sector-grid,
.item-grid,
.company-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 40px 0;
}

.company-grid {
  perspective: 1200px;
}

.category-grid {
  grid-template-columns: repeat(2, minmax(340px, 420px));
  justify-content: center;
  perspective: 1200px;
}

.category-card,
.sector-card,
.item-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  padding: 30px;
  border-radius: 34px;
  overflow: hidden;
  text-decoration: none;
  border: 1px solid rgba(113, 156, 255, 0.20);
  background:
    radial-gradient(circle at top left, rgba(79, 138, 255, 0.20), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(236, 243, 255, 0.86));
  box-shadow: 0 22px 54px rgba(16, 32, 57, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(18px) saturate(145%);
  transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  text-align: center;
}

.category-card::before,
.sector-card::before,
.item-card::before,
.company-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.88), transparent 28%),
    radial-gradient(circle at 84% 18%, rgba(47, 103, 246, 0.18), transparent 22%),
    linear-gradient(135deg, rgba(47, 103, 246, 0.16), rgba(255, 255, 255, 0.05) 58%);
  opacity: 0.95;
}

.category-card:hover,
.sector-card:hover,
.item-card:hover,
.company-card:hover {
  transform: translateY(-10px) rotateX(2deg);
  box-shadow: 0 30px 68px rgba(16, 32, 57, 0.16), 0 0 0 1px rgba(47, 103, 246, 0.06);
  border-color: rgba(47, 103, 246, 0.28);
}

.category-card::after,
.sector-card::after,
.item-card::after,
.company-card::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(47, 103, 246, 0.10);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.08)),
    linear-gradient(135deg, rgba(47, 103, 246, 0.03), transparent 52%);
}

.category-card h3,
.sector-card h3,
.item-card h4,
.company-card h3 {
  position: relative;
  z-index: 2;
  color: var(--sg-text);
  font-weight: 800;
  text-shadow: none;
  text-wrap: balance;
}

.category-card h3,
.sector-card h3,
.item-card h4 {
  font-size: 24px;
  letter-spacing: -0.03em;
}

.company-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 165px;
  padding: 24px;
  border-radius: 32px;
  overflow: hidden;
  text-decoration: none;
  background:
    radial-gradient(circle at top left, rgba(79, 138, 255, 0.20), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(236, 243, 255, 0.86));
  border: 1px solid rgba(113, 156, 255, 0.20);
  box-shadow: 0 22px 54px rgba(16, 32, 57, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(18px) saturate(145%);
  transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  text-align: center;
}

.company-card::before {
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.88), transparent 28%),
    radial-gradient(circle at 88% 20%, rgba(47, 103, 246, 0.18), transparent 24%),
    linear-gradient(135deg, rgba(47, 103, 246, 0.14), rgba(255, 255, 255, 0.04) 58%);
}

.company-card::after {
  inset: 14px;
  border: 1px solid rgba(47, 103, 246, 0.10);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.08)),
    linear-gradient(135deg, rgba(47, 103, 246, 0.03), transparent 52%);
}

.company-card:hover {
  transform: translateY(-10px) rotateX(2deg);
  border-color: rgba(47, 103, 246, 0.28);
  box-shadow: 0 30px 68px rgba(16, 32, 57, 0.16), 0 0 0 1px rgba(47, 103, 246, 0.06);
}

.company-card h3 {
  font-size: 17px;
  line-height: 1.45;
  letter-spacing: -0.02em;
  max-width: 92%;
  color: #243754;
}

.category-card {
  height: 200px;
  padding: 28px;
  border-radius: 32px;
  background:
    radial-gradient(circle at top left, rgba(79, 138, 255, 0.20), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(236, 243, 255, 0.86));
  border: 1px solid rgba(113, 156, 255, 0.20);
  box-shadow: 0 22px 54px rgba(16, 32, 57, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(18px) saturate(145%);
}

.category-card::before {
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.88), transparent 28%),
    radial-gradient(circle at 84% 18%, rgba(47, 103, 246, 0.18), transparent 22%),
    linear-gradient(135deg, rgba(47, 103, 246, 0.16), rgba(255, 255, 255, 0.05) 58%);
}

.category-card::after {
  inset: 14px;
  border: 1px solid rgba(47, 103, 246, 0.10);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.08)),
    linear-gradient(135deg, rgba(47, 103, 246, 0.03), transparent 52%);
}

.category-card:hover {
  transform: translateY(-10px) rotateX(2deg);
  border-color: rgba(47, 103, 246, 0.28);
  box-shadow: 0 30px 68px rgba(16, 32, 57, 0.16), 0 0 0 1px rgba(47, 103, 246, 0.06);
}

.category-card h3 {
  max-width: 88%;
  font-size: 23px;
  line-height: 1.24;
  letter-spacing: -0.03em;
  color: #243754;
}

.sg-main {
  position: relative;
  padding: 40px 0;
}

.sg-main::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 88px;
  background:
    radial-gradient(circle at 18% 0%, rgba(28, 100, 223, 0.10) 0%, rgba(28, 100, 223, 0) 48%),
    radial-gradient(circle at 82% 0%, rgba(81, 214, 255, 0.10) 0%, rgba(81, 214, 255, 0) 44%),
    var(--sg-top-strip);
  pointer-events: none;
  z-index: 0;
}

.sg-main > .sg-shell,
.sg-main > .container,
.sg-main > .container-fluid {
  position: relative;
  z-index: 1;
}

@media (max-width: 991px) {
  .sg-header {
    padding: 6px 0;
  }
  .sg-header .sg-shell {
    padding-left: 0;
    padding-right: 14px;
  }
  .sg-shell {
    padding-left: 16px;
    padding-right: 16px;
  }
  .sg-header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: nowrap;
  }
  .sg-logo {
    min-height: 72px;
    margin-right: auto;
    flex: 0 0 auto;
  }
  .sg-logo img {
    width: min(286px, calc(100vw - 92px));
    max-width: calc(100vw - 92px);
  }
  .sg-nav {
    display: none;
  }
  .sg-menu-toggle {
    display: inline-flex;
    align-self: center;
    margin-left: auto;
  }
  .sg-header.is-mobile-open .sg-mobile-menu {
    display: block;
  }
  .category-grid,
  .sector-grid,
  .company-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .sg-header {
    padding: 8px 0;
  }
  .sg-header .sg-shell {
    padding-left: 0;
    padding-right: 12px;
  }
  .sg-logo {
    min-height: 80px;
  }
  .sg-logo img {
    width: min(274px, calc(100vw - 82px));
    max-width: calc(100vw - 82px);
  }
  .sg-main {
    padding: 28px 0 40px;
  }
  .sg-main::before {
    height: 72px;
  }
  .category-grid,
  .sector-grid,
  .item-grid,
  .company-grid {
    gap: 16px;
    margin: 24px 0;
  }
  .category-card,
  .sector-card,
  .item-card {
    height: auto;
    min-height: 148px;
    padding: 24px 18px;
    border-radius: 24px;
  }
  .company-card {
    height: auto;
    min-height: 136px;
    padding: 22px 18px;
    border-radius: 24px;
  }
  .category-card::after,
  .sector-card::after,
  .item-card::after,
  .company-card::after {
    inset: 10px;
    border-radius: 18px;
  }
  .category-card h3,
  .sector-card h3,
  .item-card h4 {
    max-width: 100%;
    font-size: 21px;
    line-height: 1.2;
  }
  .company-card h3 {
    max-width: 100%;
    font-size: 16px;
    line-height: 1.42;
  }
}

@media (max-width: 520px) {
  .category-card,
  .sector-card,
  .item-card,
  .company-card {
    padding: 20px 16px;
  }
  .category-card h3,
  .sector-card h3,
  .item-card h4 {
    font-size: 19px;
  }
  .company-card h3 {
    font-size: 15px;
  }
}
