html, body {
  height: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background-color: #f5f7fa;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
  color: #111E6C;
  overflow-x: hidden;
}
main {
  flex: 1 0 auto;
}
footer {
  flex-shrink: 0;
  padding: 30px 20px;
  font-size: 0.9rem;
  color: #666;
  text-align: center;
  background: none;
}
header {
  background-color: #111E6C;
  color: white;
  padding: 10px 20px 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1001;
  overflow: visible !important;
}
header img {
  height: 50px;
}
/* Кнопка меню (бургер/крестик) */
.menu-icon {
  position: relative;
  width: 48px;
  height: 48px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  overflow: visible !important;
}
.menu-icon .bar {
  position: absolute;
  left: 50%;
  width: 28px;
  height: 4px;
  background: #fff;
  border-radius: 2.2px;
  transition: 0.34s cubic-bezier(.4,2,.6,1);
  transform-origin: center;
}
.menu-icon .bar:nth-child(1) {
  top: 13px;
  transform: translateX(-50%);
}
.menu-icon .bar:nth-child(2) {
  top: 24px;
  transform: translateX(-50%);
}
.menu-icon .bar:nth-child(3) {
  top: 35px;
  transform: translateX(-50%);
}
.menu-icon.open .bar:nth-child(1) {
  top: 24px;
  transform: translateX(-50%) rotate(45deg);
}
.menu-icon.open .bar:nth-child(2) {
  opacity: 0;
}
.menu-icon.open .bar:nth-child(3) {
  top: 24px;
  transform: translateX(-50%) rotate(-45deg);
}
/* --- Desktop menu --- */
.desktop-menu {
  display: none;
}

.icon {
  height: 20px;
  vertical-align: top;
}

@media (min-width: 1024px) {
  .menu-icon, .side-drawer, .overlay {
    display: none !important;
  }
  .desktop-menu {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-left: 40px;
  }
  .desktop-menu > .menu-item {
    position: relative;
    padding: 8px 12px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.18s;
    color: white;
    text-decoration: none;
    white-space: nowrap;
  }
  .desktop-menu > .menu-item:hover,
  .desktop-menu > .menu-item:focus-within {
    background: rgba(255,255,255,0.10);
  }
  .desktop-menu .desktop-submenu {
    display: none;
    position: absolute;
    top: 40px;
    left: 0;
    min-width: 170px;
    background: white;
    color: #111E6C;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.16);
    padding: 10px 0 10px 0;
    margin-top: -5px;
    z-index: 1002;
  }
  .desktop-menu .has-submenu:hover .desktop-submenu,
  .desktop-menu .has-submenu:focus-within .desktop-submenu {
    display: block;
  }
  .desktop-menu .desktop-submenu a {
    display: block;
    padding: 9px 24px 9px 20px;
    color: #111E6C;
    text-decoration: none;
    border: none;
    background: none;
    transition: background 0.2s;
    font-weight: 500;
  }
  .desktop-menu .desktop-submenu a:hover, .desktop-menu .desktop-submenu a.active {
    background: #f5f7fa;
    color: #243be0;
    font-weight: 600;
  }
  .desktop-menu > .menu-item:not(.has-submenu) {
    text-decoration: none;
  }
  .desktop-menu svg.arrow {
    width: 16px; height: 16px; margin-left: 4px; vertical-align: -2px; filter: invert(1);
    transform: none !important;
  }
}
.overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: 998;
  display: none;
  transition: opacity 0.3s ease;
}
.overlay.active {
  display: block;
}

/* --- Chrome style mobile menu (side-drawer) --- */
.side-drawer {
  position: fixed;
  top: 18px;
  right: 10px;
  left: 10px;
  width: auto;
  max-width: 98vw;
  min-width: 230px;
  max-height: 94vh;
  height: auto;
  border-radius: 28px;
  box-shadow: 0 8px 32px 0 rgba(32, 60, 120, 0.18), 0 1.5px 8px 0 rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.99);
  border: 1.5px solid #f1f3fa;
  padding: 16px 12px 18px 12px;
  z-index: 2001;
  overflow-y: auto;
  overscroll-behavior: contain;
  transition: right 0.3s cubic-bezier(.4,2,.6,1), left 0.3s cubic-bezier(.4,2,.6,1), border-radius 0.25s, opacity 0.3s;
  opacity: 0;
  pointer-events: none;
}
.side-drawer.open {
  right: 10px;
  left: 10px;
  opacity: 1;
  pointer-events: auto;
}
.drawer-close {
  text-align: right;
  font-size: 28px;
  cursor: pointer;
  margin-bottom: 10px;
}
.drawer-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  color: #111E6C;
  text-decoration: none;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  user-select: none;
}
.drawer-link:hover {
  background-color: #f0f0f0;
}
.arrow {
  transition: transform 0.3s ease, scale 0.3s ease, filter 0.3s ease;
  width: 16px;
  height: 16px;
  transform-origin: center;
  flex-shrink: 0;
  margin-left: 8px;
}
.arrow.open {
  transform: rotate(180deg) scale(1.2);
  filter: brightness(1.2);
}
.arrow:hover {
  filter: brightness(1.5);
}
.submenu {
  overflow: hidden;
  padding-left: 15px;
  transition: max-height 0.3s ease;
  max-height: 0;
}
.submenu a {
  display: block;
  padding: 8px 0;
  color: #444;
  text-decoration: none;
}
.submenu a:hover {
  text-decoration: underline;
}
.submenu a.active {
  font-weight: bold;
  text-decoration: underline;
  color: #111E6C;
}
.buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  padding: 40px 20px;
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}
.link-btn {
  background-color: white;
  border: 2px solid #111E6C;
  color: #111E6C;
  border-radius: 12px;
  padding: 15px 25px;
  font-size: 1.1rem;
  text-decoration: none;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  text-align: center;
  display: block;
}

.link-btn img {
  height: 20px;
  vertical-align: top;
  /* Дополнительно, если нужно: */
  margin-right: 8px; /* Отступ справа от иконки */
}

.link-btn:hover {
  background-color: #111E6C;
  color: white;
}
.card-grid {
  display: none;
}
@media (min-width: 1024px) {
  .buttons {
    display: none;
  }
  .card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 40px;
    max-width: 1200px;
    margin: auto;
    justify-content: center;
  }
  .card-grid a {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
  }
  .card-grid a:focus-visible {
    outline: 2px solid #111E6C;
    outline-offset: 2px;
  }
  .card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    cursor: pointer;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  .card img {
  height: 20px;
  vertical-align: top;
  /* Дополнительно, если нужно: */
  margin-right: 8px; /* Отступ справа от иконки */
}

  .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  }
  .card h3 {
    margin: 10px 0 5px;
    font-size: 1.1rem;
  }
  .card p {
    font-size: 0.9rem;
    color: #555;
  }
}
/* Scrollbar style for side-drawer (optional, for nice Android scroll) */
.side-drawer::-webkit-scrollbar {
  width: 8px;
  background: #f5f7fa;
}
.side-drawer::-webkit-scrollbar-thumb {
  background: #ccd6ee;
  border-radius: 6px;
}
