@import url('./font.css');

* {
  margin: 0;
  padding: 0;
}

header {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  position: fixed;
  z-index: 9999;
  padding: 10px 0;
  background-color: rgb(116, 70, 39);
}

header a {
  height: 80%;
  background-color: rgb(193, 97, 33);
  margin: 0 10px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  text-decoration: none;
  border-radius: 10px;
  font-family: 'Montserrat';
  color: white;
}

header a:hover {
  background-color: rgb(195, 144, 109);
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;

  background-image: url('../images/back.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;

  color: #222;

  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #f4f6f9;
  opacity: 0.6;
  z-index: -1;
}

main {
  padding-top: 30px;
  max-width: 1800px;
  margin: 0 auto;
}

main>div {
  background-color: #ffffff;
  padding: 25px;
  margin-bottom: 25px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

h1 {
  text-align: center;
  position: fixed;
  top: 45px;
  background-color: #f4f6f9;
  left: 0;
  right: 0;
  z-index: 9998;
  font-size: 44px;
  position: sticky;
  margin-bottom: 15px;
  color: #1f3a5f;
}


h2 {
  text-align: center;
  font-size: 30px;
  margin-bottom: 15px;
  color: #1f3a5f;
}

h3 {
  margin: 15px 0;
  font-size: 23px;
  text-align: center;
}

p {
  text-indent: 30px;
  margin-bottom: 12px;
  font-size: 22px;
}

ol,
ul {
  margin: 10px 0 15px 25px;
}

li {
  margin-bottom: 6px;
  font-size: 125%;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 15px auto;
}

@media (min-width: 769px) and (max-width: 1600px) {
  header {
    padding: 8px 0;
  }

  header a {
    margin: 0 7px;
    padding: 0 8px;
    font-size: 15px;
  }

  main {
    max-width: calc(100% - 48px);
    padding-top: 24px;
  }

  main>div {
    padding: 20px;
    margin-bottom: 20px;
  }

  h1 {
    top: 40px;
    font-size: 38px;
    margin-bottom: 12px;
  }

  h2 {
    font-size: 26px;
    margin-bottom: 12px;
  }

  h3 {
    margin: 12px 0;
    font-size: 21px;
  }

  p {
    margin-bottom: 10px;
    font-size: 20px;
  }

  li {
    font-size: 118%;
  }

  img {
    margin: 12px auto;
  }
}

@media (min-width: 769px) and (max-width: 1366px),
  (min-width: 769px) and (max-height: 800px) {
  header {
    padding: 6px 0;
  }

  header a {
    margin: 0 5px;
    padding: 0 7px;
    border-radius: 8px;
    font-size: 14px;
  }

  main {
    max-width: calc(100% - 32px);
    padding-top: 18px;
  }

  main>div {
    padding: 16px;
    margin-bottom: 16px;
  }

  h1 {
    top: 34px;
    font-size: 32px;
    line-height: 1.18;
    margin-bottom: 10px;
  }

  h2 {
    font-size: 23px;
    line-height: 1.25;
    margin-bottom: 10px;
  }

  h3 {
    margin: 10px 0;
    font-size: 19px;
  }

  p {
    text-indent: 24px;
    margin-bottom: 8px;
    font-size: 18px;
    line-height: 1.5;
  }

  ol,
  ul {
    margin: 8px 0 12px 22px;
  }

  li {
    margin-bottom: 4px;
    font-size: 108%;
    line-height: 1.45;
  }

  img {
    margin: 10px auto;
  }
}

@media (max-width: 768px) {

  header {
    flex-direction: column;
    gap: 8px;
  }

  header a {
    width: 80%;
    justify-content: center;
  }

  main {
    padding: 225px 10px 10px 10px;
  }

  main>div {
    padding: 15px;
  }

  h1 {
    font-size: 18px;
  }

  p {
    text-indent: 15px;
  }
}

@media (max-width: 430px) {
  * {
    box-sizing: border-box;
  }

  body {
    min-width: 320px;
    overflow-x: hidden;
    background-attachment: scroll;
  }

  header {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
  }

  header a {
    width: auto;
    min-height: 38px;
    margin: 0;
    padding: 6px 8px;
    justify-content: center;
    text-align: center;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.2;
  }

  main {
    width: 100%;
    padding: 12px 10px 18px;
  }

  main>div {
    padding: 14px;
    margin-bottom: 14px;
    border-radius: 6px;
  }

  h1 {
    position: static;
    padding: 8px 6px;
    margin-bottom: 12px;
    font-size: 23px;
    line-height: 1.2;
  }

  h2 {
    font-size: 20px;
    line-height: 1.25;
  }

  h3 {
    font-size: 18px;
    line-height: 1.3;
  }

  p {
    text-indent: 18px;
    font-size: 16px;
    line-height: 1.55;
  }

  ol,
  ul {
    margin-left: 20px;
  }

  li {
    font-size: 16px;
    line-height: 1.45;
  }

  img,
  video {
    max-width: 100%;
  }

  video {
    width: 100% !important;
    height: auto !important;
  }
}
