/* Layout */
html,
body {
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(1160px, calc(100% - 44px));
  margin: 0 auto;
}

main {
  flex: 1;
}

/* Navbar */
.navbar {
  min-height: 82px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 84px;
  padding: 1.35rem clamp(24px, 5.4vw, 92px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 34px rgba(24, 18, 61, 0.035);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.95rem;
  text-decoration: none;
  flex: 0 0 auto;
}

.navbar .brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.navbar-brand-image {
  width: 235px;
  height: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 48px;
  margin-left: 40px;
  font-size: 15px;
  font-weight: 750;
  color: #252a3d;
}

.nav-links > a,
.nav-dropdown > a,
.nav-dropdown-toggle {
  padding: 30px 0;
  position: relative;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: color 220ms cubic-bezier(.2,.8,.2,1), transform 220ms cubic-bezier(.2,.8,.2,1);
}

.nav-links > a::after,
.nav-dropdown > a::after,
.nav-dropdown-toggle::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  height: 2px;
  border-radius: 999px;
  background: rgba(111, 66, 255, 0.42);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 220ms cubic-bezier(.2,.8,.2,1);
}

.nav-links > a:hover,
.nav-dropdown:hover > a,
.nav-dropdown:hover > .nav-dropdown-toggle,
.nav-dropdown.is-open > a,
.nav-dropdown.is-open > .nav-dropdown-toggle {
  color: var(--primary);
  transform: translateY(-1px);
}

.nav-links > a:hover::after,
.nav-dropdown:hover > a::after,
.nav-dropdown:hover > .nav-dropdown-toggle::after,
.nav-dropdown.is-open > a::after,
.nav-dropdown.is-open > .nav-dropdown-toggle::after {
  transform: scaleX(1);
}

.nav-dropdown-toggle:focus-visible {
  outline: 2px solid rgba(111, 66, 255, 0.42);
  outline-offset: 6px;
}

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

.dropdown-menu {
  position: absolute;
  top: calc(100% - 8px);
  left: 50%;
  z-index: 120;
  display: grid;
  gap: 4px;
  min-width: 220px;
  padding: 10px;
  border: 1px solid rgba(18, 20, 38, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 22px 60px rgba(24, 18, 61, 0.14);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition:
    opacity 180ms cubic-bezier(.2,.8,.2,1),
    visibility 180ms cubic-bezier(.2,.8,.2,1),
    transform 180ms cubic-bezier(.2,.8,.2,1);
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.is-open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.dropdown-menu a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: #252a3d;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  transition:
    background-color 180ms cubic-bezier(.2,.8,.2,1),
    color 180ms cubic-bezier(.2,.8,.2,1),
    transform 180ms cubic-bezier(.2,.8,.2,1);
}

.dropdown-menu a:hover,
.dropdown-menu a:focus-visible {
  color: var(--primary);
  background: rgba(111, 66, 255, 0.09);
  transform: translateX(2px);
}

/* Footer */
.footer {
  background: #07081f;
  color: var(--white);
  padding: 78px 0 38px;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: clamp(28px, 4.2vw, 54px);
  align-items: start;
  margin-bottom: 48px;
}

.footer p {
  color: rgba(255,255,255,0.84);
  font-size: 16px;
  line-height: 1.66;
  font-weight: 500;
  max-width: 360px;
}

.footer a {
  color: rgba(255,255,255,0.72);
  font-size: 14px;
  line-height: 1.95;
  font-weight: 550;
  display: block;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer a:hover {
  color: #ffffff;
  transform: translateX(2px);
}

.footer h4 {
  font-size: 14px;
  margin-bottom: 18px;
  color: var(--white);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.14);
  padding-top: 30px;
  text-align: center;
  color: rgba(255,255,255,0.72);
  font-size: 13px;
  font-weight: 500;
}

/* Responsive Layout */
@media (max-width: 980px) {
  .navbar {
    height: auto;
    padding-top: 18px;
    padding-bottom: 16px;
    flex-direction: column;
    gap: 14px;
  }

  .nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(24px, 7vw, 48px);
    margin-left: 0;
  }

  .nav-links > a,
  .nav-dropdown > a,
  .nav-dropdown-toggle {
    padding: 10px 0;
  }

  .nav-links > a::after,
  .nav-dropdown > a::after,
  .nav-dropdown-toggle::after {
    bottom: 4px;
  }

  .dropdown-menu {
    top: calc(100% + 8px);
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 34px 42px;
  }

}

@media (max-width: 768px) {
  .navbar {
    position: sticky;
    align-items: center;
    padding-left: 18px;
    padding-right: 18px;
  }

  .navbar-brand-image {
    width: 180px;
  }

  .nav-links {
    width: 100%;
    gap: 28px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .footer {
    padding: 60px 0 30px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

}

@media print {
  * {
    box-shadow: none !important;
    text-shadow: none !important;
  }

  .navbar {
    position: static;
    height: auto;
    padding: 18px 34px;
    background: #ffffff;
  }

  .navbar-brand-image {
    width: 200px;
  }

  .nav-links > a,
  .nav-dropdown > a,
  .nav-dropdown-toggle {
    padding: 0;
  }

  main {
    min-height: 0;
    display: block;
  }

  .footer {
    color: #07081f;
    background: #ffffff;
    border-top: 1px solid rgba(10, 12, 30, 0.10);
    break-before: auto;
    page-break-before: auto;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .footer a,
  .footer h4,
  .footer-bottom {
    color: #07081f;
  }

  .footer-grid {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
