:root {
  --White: #ffffff;
  --Black: #000000;
}

html {
  scroll-behavior: smooth;
}

body {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Header Styles */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1002;
  transition: all 0.3s ease;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  height: 90px;
}

.header__container {
  max-width: 1440px;
  width: 90%;
  margin: 0 auto;
  padding: 0 15px;
  height: 90px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  align-items: center;
  gap: 40px;
}

/* Logo Column */
.header__logo {
  display: flex;
  align-items: center;
}

.header__logo-link {
  text-decoration: none;
  color: #000;
}

.header__logo-text {
  font-family: "Montserrat", sans-serif;
  font-size: 24px;
  font-weight: 600;
  margin: 0;
}

.header__logo img {
  max-height: 70px;
  width: auto;
}

.header__right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 40px;
}

/* Navigation Column */
.header__nav {
  display: flex;
  justify-content: center;
}

.header__menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 40px;
  align-items: center;
}

.header__menu li {
  margin: 0;
}

.header__menu a {
  color: #000;
  text-decoration: none;
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.header__menu a:active {
  font-weight: 700;
}

.header--transparent {
  background: transparent;
  box-shadow: none;
}
.header--transparent .header__menu a {
  color: #ffffff;
}
.header--transparent .header__menu a::after {
  background: #ffffff;
}
.header--transparent.header--scrolled .header__nav > ul > li > a {
  color: #000000;
}
.header--scrolled {
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Smooth logo resizing */
.header__logo img {
  transition: max-height 0.3s ease;
}

/* Compact header on scroll (desktop) */
@media (min-width: 993px) {
  .header--compact {
    height: 70px;
  }
  .header--compact .header__container {
    height: 70px;
  }
  .header--compact .header__logo img {
    max-height: 50px;
  }
}

.header__menu-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.header__menu a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: #112050;
  transition: width 0.3s ease;
}

.header__menu a:hover::after {
  width: 100%;
}

/* Header dropdowns */
.header__menu li {
  position: relative;
}
.header__menu li.menu-item-has-children > a {
  padding-right: 18px;
}
.header__menu li.menu-item-has-children > a::before {
  content: "";
  position: absolute;
  right: 0;
  top: 40%;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
  transition: transform 0.2s ease;
}
.header__menu .sub-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 220px;
  background: #1c327c;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 8px 0;
  margin: 0;
  list-style: none;
  border-radius: 6px;
  display: none;
  z-index: 1003;
}
.header__menu .sub-menu li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}
.header__menu .sub-menu li:last-child {
  border-bottom: none;
}
.header__menu .sub-menu li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 42px;
  color: #ffffff;
  text-decoration: none;
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  white-space: nowrap;
  position: relative;
}
.header__menu .sub-menu li a:hover {
  background: rgba(0, 0, 0, 0.04);
}
.header__menu .sub-menu li a::after {
  content: "";
  width: 7px;
  height: 12px;
  position: absolute;
  left: calc(100% - 24px);
  top: 50%;
  transform: translateY(-50%);
  background-color: transparent;
  background-repeat: no-repeat;
  background-size: 7px 12px;
  background-position: center;
  /* Inline SVG arrow (white) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='12' viewBox='0 0 7 12' fill='none'%3E%3Cpath d='M4.6 5.65375L0 1.05375L1.05375 0L6.7075 5.65375L1.05375 11.3075L0 10.2538L4.6 5.65375Z' fill='white'/%3E%3C/svg%3E");
}
.header__menu li:hover > .sub-menu,
.header__menu li:focus-within > .sub-menu {
  display: block;
}

/* Rotate caret when parent or submenu is active (hover/focus) */
.header__menu li.menu-item-has-children:hover > a::before,
.header__menu li.menu-item-has-children:focus-within > a::before {
  transform: translateY(-50%) rotate(-135deg);
}

@media (min-width: 993px) {
  .header__mobile-menu-toggle {
    display: none;
  }
  .header__mobile-panel {
    display: none;
  }
}

/* Mobile navigation (no desktop changes) */
@media (max-width: 992px) {
  .header {
    height: 72px;
  }
  .header__container {
    grid-template-columns: 1fr auto;
    height: 72px;
    gap: 16px;
  }
  .header__logo {
    width: 100%;
  }
  .header__logo-text {
    font-size: 20px;
  }
  .header__logo img {
    max-height: 70px;
  }
  .header__nav,
  .header__buttons {
    display: none;
  }
  .header__mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 1);
    border-radius: 6px;
    flex-direction: column;
  }
  .header--transparent .header__mobile-menu-toggle {
    border-color: #000;
  }
  .header__mobile-menu-line {
    display: block;
    width: 18px;
    height: 2px;
    background: #000000;
    margin: 2px 0;
    transition: background 0.2s ease;
  }
  .header--transparent .header__mobile-menu-line {
    background: #000;
  }

  .header__mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
  }
  .header__mobile-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: min(86vw, 360px);
    background: #ffffff;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    padding-top: 72px;
    z-index: 9001;
    box-shadow: -16px 0 40px rgba(0, 0, 0, 0.18);
  }
  .header__mobile-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 1);
    border-radius: 6px;
    color: #000;
  }
  .header--transparent .header__mobile-close {
    border-color: #000;
    color: #000;
  }
  .header--transparent + .header__mobile-overlay,
  .header--transparent + .header__mobile-overlay + .header__mobile-panel {
    /* Keep stacking context consistent */
  }
  .header__mobile-panel-inner {
    padding: 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    gap: 16px;
  }
  .header__mobile-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .header__mobile-menu li a {
    display: block;
    padding: 12px 8px;
    color: #000000;
    text-decoration: none;
    font-family: "Montserrat", sans-serif;
    font-size: 16px;
  }
  .header__mobile-menu li.menu-item-has-children > a {
    position: relative;
    padding-right: 22px;
  }
  .header__mobile-menu li.menu-item-has-children > a::after {
    content: "";
    position: absolute;
    right: 6px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-50%) rotate(45deg);
  }
  .header__mobile-menu .sub-menu {
    list-style: none;
    margin: 0 0 8px 8px;
    padding: 0 0 0 12px;
    border-left: 2px solid rgba(0, 0, 0, 0.1);
  }
  .header__mobile-cta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #1c327c;
    border: 1px solid #1c327c;
    color: #ffffff;
    border-radius: 6px;
    text-decoration: none;
    font-family: "Roboto", sans-serif;
    font-size: 16px;
  }
  .header__mobile-cta-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
  }

  /* Open state */
  body.header-mobile-open .header__mobile-overlay {
    opacity: 1;
    pointer-events: auto;
  }
  body.header-mobile-open .header__mobile-panel {
    transform: translateX(0%);
  }
}
.header__buttons {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
}
.header__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 6px;
  text-decoration: none;
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
.header__button--primary {
  background: #1c327c;
  color: #ffffff;
  border: 1px solid #1c327c;
}
.header__button--primary:hover {
  background: #112050;
  border-color: #112050;
}
.header__button--primary:active {
  transform: translateY(1px);
}
.header__button-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* Footer Styles */
.footer {
  background: #ffffff;
  padding: 80px 0;
}

.footer__container {
  max-width: 1280px;
  width: 90%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.footer__top {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 64px;
  align-items: flex-start;
}

.footer__logo {
  max-height: 98px;
  width: auto;
  display: block;
}

.footer__menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer__menu li {
  padding: 8px 0;
}
.footer__menu a {
  color: #000000;
  text-decoration: none;
  font-family: "Roboto", sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.5;
}
.footer__menu a:hover {
  text-decoration: underline;
}
.footer__block {
  margin-bottom: 24px;
}
.footer__block-title {
  color: #000000;
  font-family: "Roboto", sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 4px 0;
}
.footer__block-text {
  color: #000000;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
}
.footer__block-text--links a {
  color: #000000;
  text-decoration: underline;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  display: block;
}
.footer__block-text--links a:hover {
  color: #112050;
  text-decoration: underline;
}
.footer__social {
  display: flex;
  gap: 10px;
}
.footer__social-link {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  color: #000000;
}
.footer__social-icon svg {
  display: block;
}
.footer__social-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

.footer__credits {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.footer__divider {
  height: 1px;
  width: 100%;
  background: #000000;
}
.footer__credits-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}
.footer__copyright {
  color: #000000;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
}
.footer__legal-links {
  display: flex;
  gap: 24px;
}
.footer__legal-links a {
  color: #000000;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  text-decoration: underline;
}
.footer__legal-links a:hover {
  color: #112050;
  text-decoration: underline;
}
@media (max-width: 992px) {
  .footer__top {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer__col--brand,
  .footer__col--social {
    grid-column: 1 / -1;
  }
  .footer__credits-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* 404 Page */
.error-404 {
  position: relative;
  padding: 212px 0 164px 0;
  background: #eef5ff;
  color: #000000;
}
.error-404__container {
  max-width: 1280px;
  width: 90%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.error-404__title {
  color: #3a53a8;
  font-family: "Roboto", sans-serif;
  font-size: 56px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.2;
}
.error-404__subtitle {
  color: #1c1c1c;
  font-family: "Roboto", sans-serif;
  font-size: 32px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}
.error-404__text {
  color: #1c1c1c;
  font-family: "Roboto", sans-serif;
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.5;
  margin: 0;
  max-width: 768px;
}
.error-404__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  background: #1c327c;
  color: #ffffff;
  border: 1px solid #1c327c;
  margin-top: 16px;
}
.error-404__button:hover {
  background: #112050;
  border-color: #112050;
}
.error-404__button:active {
  transform: translateY(1px);
}
@media (max-width: 768px) {
  .error-404 {
    padding: 96px 0 48px 0;
  }
  .error-404__title {
    font-size: 40px;
  }
  .error-404__subtitle {
    font-size: 28px;
  }
  .error-404__text {
    font-size: 16px;
  }
}
