@font-face {
  font-family: "Inter";
  src: url("./Inter.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-white: #ffffff;
  --color-gray: #f1f2f3;
  --color-black: #202020;
  --color-light-blue: #22aaee;
  --color-light-blue-background: #90d4f6;
  --color-blue: #0077ff;
  --color-blue-background: #7fbaff;
  --color-dark-blue: #18A0E4;
  --color-violet-background: #baa9f6;
  --color-violet: #7755ee;
}

::selection {
  background-color: var(--color-dark-blue);
  color: var(--color-white);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  white-space: nowrap;
  clip-path: inset(100%);
  clip: rect(0 0 0 0);
  overflow: hidden;
}

body {
  font-family: "Inter", sans-serif;
  font-weight: 400;
  color: var(--color-black);
  background-color: var(--color-gray);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  row-gap: 3em;
}

h1 {
  font-size: clamp(36px, 3.33vw, 64px);
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.link {
  color: var(--color-light-blue);
  transition-duration: 0.2s;
}

.link--hidden {
  color: inherit;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  column-gap: 1em;
  background-color: var(--color-light-blue);
  color: var(--color-white);
  padding: 2em 4vw;
  border-bottom-left-radius: 2em;
  border-bottom-right-radius: 2em;
  font-size: clamp(14px, 0.833vw, 16px);
  user-select: none;
}

.header__logo {
  display: flex;
  flex-direction: column;
  align-items: start;
}

.header__logo-title {
  font-size: clamp(40px, 2.5vw, 48px);
  font-weight: 700;
}

.header__menu-list {
  display: flex;
  column-gap: 1em;
  font-size: 1.25rem;
}

.header__menu-link {
  padding: 0.5em;
  border-radius: 0.5em;
  transition-duration: 0.2s;
}

.header__menu-link--active {
  background-color: var(--color-white);
  color: var(--color-black) !important;
}

.header__burger-checkbox {
  position: absolute;
  visibility: hidden;
}

.header__burger-button {
  display: none;
  position: relative;
  z-index: 1;
  cursor: pointer;
  position: relative;
  border: none;
  background: transparent;
  width: 40px;
  height: 26px;
}

.header__burger-button::before,
.header__burger-button::after {
  content: '';
  left: 0;
  position: absolute;
  display: block;
  width: 100%;
  height: 4px;
  border-radius: 10px;
  background: var(--color-white);
}

.header__burger-button::before {
  top: 0;
  box-shadow: 0 11px 0 var(--color-white);
  transition: box-shadow .3s .15s, top .3s .15s, transform .3s;
}

.header__burger-button::after {
  bottom: 0;
  transition: bottom .3s .15s, transform .3s;
}

.header__burger-checkbox:checked + .header__burger-button::before {
  top: 11px;
  transform: rotate(45deg);
  box-shadow: 0 6px 0 rgba(0,0,0,0);
  transition: box-shadow .15s, top .3s, transform .3s .15s;
}

.header__burger-checkbox:checked + .header__burger-button::after {
  bottom: 11px;
  transform: rotate(-45deg);
  transition: bottom .3s, transform .3s .15s;
}

.header__burger-checkbox:checked ~ .header__menu-list {
  transform: translateY(0);
}

main {
  width: 80%;
  display: flex;
  flex-direction: column;
  row-gap: 64px;
  margin: 0 auto;
}

a {
  text-decoration: none;
  color: inherit;
}

main > section {
  display: flex;
  flex-direction: column;
  row-gap: 16px;
  align-items: center;
  width: 100%;
}

main > section > div,
main > section > nav,
main > section > p {
  width: 100%;
}

.about__content {
  font-size: 1.25em;
  text-align: center;
}

.page-menu__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  justify-content: center;
}

.page-menu__link {
  padding: 0.5em;
  background-color: var(--color-light-blue);
  color: var(--color-white);
  border-radius: 0.5em;
  transition-duration: 0.2s;
}

.catalog__content {
  display: flex;
  flex-direction: column;
  row-gap: 64px;
  margin: 0 auto;
}

.catalog-group {
  display: flex;
  flex-direction: column;
  row-gap: 16px;
}

.catalog-group__title {
  font-size: clamp(28px, 2.5vw, 48px);
  font-weight: 700;
  text-align: center;
}

.catalog-group__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.catalog-group__list--index {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  font-size: 20px;  /* для локальных em*/
  display: flex;
  column-gap: 20px;
  background-color: var(--color-white);
  border-radius: 2em;
  padding: 1em;
  transition-duration: 0.2s;
  height: 100%;
  min-height: 9em;
}

.card--menu {
  flex-direction: column;
  font-size: 1rem;
  padding: 1.25em;
  row-gap: 4px;
  column-gap: none;
  align-items: center;
  text-align: center;
  min-height: none;
}

.card__icon-wrapper {
  display: flex;
  flex-direction: column;
  row-gap: 0.5em;
  padding: 1em;
  justify-content: center;
  align-items: center;
  text-align: center;
  background-color: var(--color-violet-background);
  color: var(--color-violet);
  font-weight: 700;
  border-radius: 1em;
  flex-shrink: 0;  /* Запрет на сжатие обёртки */
  width: 80px;     /*                          */
  user-select: none;
}

.card--telegram > .card__icon-wrapper {
  background-color: var(--color-light-blue-background);
  color: var(--color-light-blue);
}

.card--vk > .card__icon-wrapper {
  background-color: var(--color-blue-background);
  color: var(--color-blue);
}

.card--menu > .card__icon {
  width: clamp(80px, 5.2vw, 100px);
  user-select: none;
}

.card__type {
  margin-inline: -1em;
}

.card__text-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  row-gap: 0.5em;
  word-break: break-word;
}

.card__title {
  font-size: clamp(20px, 1.25vw, 24px);
  font-weight: 700;
}

.card__description {
  font-size: clamp(14px, 0.833vw, 16px);
}

.manual {
  display: flex;
  flex-direction: column;
  row-gap: 40px;
}

.manual-about {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  column-gap: 32px;
  row-gap: 8px;
}

.manual-about__element {
  display: flex;
  column-gap: 4px;
}

.manual-about__icon {
  user-select: none;
}

.manual-part {
  display: flex;
  flex-direction: column;
  row-gap: 0.5em;
  width: 100%;
}

.manual-part__title {
  font-size: clamp(28px, 2.08vw, 40px);
  text-align: start;
}

.manual-part__content {
  display: flex;
  flex-direction: column;
  row-gap: 1em;
}

.manual-part__content ul,
.manual-part__content ol {
  margin: 0;
  padding-left: 30px;
}

.manual-part__content h3 {
  font-size: clamp(20px, 1.25vw, 24px);
  margin-block: 0 0.5rem;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border: 0.25em solid var(--color-black);
  border-radius: 2em;
  padding: 1.5em;
}

table {
  width: 100%;
  border: 2px solid var(--color-black);
}

th, td {
  border-top: 2px solid var(--color-black);
  border-left: 2px solid var(--color-black);
  padding: 0.5em;
  overflow-x: auto;
}

table caption {
  font-size: clamp(20px, 1.25vw, 24px);
  font-weight: 700;
  text-align: start;
  margin-bottom: 0.5rem;
}

.footer {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2em;
  background-color: var(--color-black);
  color: var(--color-white);
  padding: 2em 4vw;
  border-top-left-radius: 2em;
  border-top-right-radius: 2em;
  font-size: clamp(14px, 0.833vw, 16px);
  user-select: none;
}

.footer h2 {
  font-size: clamp(16px, 1.25vw, 24px);
  font-weight: 700;
}

.footer svg {
  width: 3em;
  height: 3em;
  transition-duration: 0.2s;
}

.resources,
.contact {
  display: flex;
  flex-direction: column;
  row-gap: 0.5em;
}

.resources__list {
  display: flex;
  column-gap: 0.5em;
}

.resources__item:first-child {
  margin-right: 0.25em;
}

.warning {
  grid-column: -1 / 1;
  text-align: center;
  margin-top: 2em;
}

@media (max-width: 1440px) {
  main,
  .catalog__content {
    row-gap: 56px;
  }

  .catalog-group__list {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

@media (max-width: 1200px) {
  .header__menu-list {
    gap: 0.5em;
  }
}

@media (max-width: 1024px) {
  main,
  .catalog__content {
    row-gap: 48px;
  }

  .header__menu-list {
    position: absolute;
    top: 0;
    left: 0;
    flex-wrap: wrap;
    row-gap: 0.2em;
    background: var(--color-light-blue);
    transform: translateY(-100%);
    width: 100%;
    transition: 0.2s;
    padding: 1em 16vw 1em 4vw;
    border-bottom-left-radius: 2em;
    border-bottom-right-radius: 2em;
    min-height: 137px;
    align-items: center;
}

  .header__burger-button {
    display: block;
  }

  .catalog-group__list {
    gap: 24px;
  }
}

@media (max-width: 768px) {
  main,
  .catalog__content {
    row-gap: 40px;
  }

  .header {
    padding-block: 1.5em;
  }

  .header__menu-list {
    min-height: 123px;
  }

  .catalog-group__list {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer {
    display: flex;
    flex-direction: column;
  }

  .resources,
  .contact {
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 425px) {
  main {
    width: 85%;
  }

  .card {
    font-size: 16px;
  }

  .card__icon-wrapper {
    width: 64px;
  }
}

@media (hover: hover) {
  .header__menu-link:hover:not(.header__menu-link--active) {
    background-color: var(--color-dark-blue);
  }

  .page-menu__link:hover {
    transform: scale(1.05);
  }

  .link:hover {
    color: var(--color-dark-blue);
  }

  .card:hover {
    transform: scale(1.05);
  }

  tr:hover {
    background-color: var(--color-white);
  }

  .footer svg:hover {
    opacity: 0.7;
  }
}

@media (hover: none) {
  .header__menu-link:active:not(.header__menu-link--active) {
    background-color: var(--color-dark-blue);
  }

  .page-menu__link:active {
    transform: scale(1.05);
  }

  .link:active {
    color: var(--color-dark-blue);
  }

  .card:active {
    transform: scale(1.05);
  }

  .footer svg:active {
    opacity: 0.7;
  }
}