@import url('https://fonts.googleapis.com/css2?family=Fredericka+the+Great&family=Open+Sans:ital@0;1&display=swap');

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background-color: #e4d559;
  color: #000;
  overflow: hidden;

  font-family: "times new roman", times, serif;
}
body {
  overflow: auto;
  background-image: url(/static/img/bg.jpg);
  background-size: cover;
  background-position: 0 20%;
  background-repeat: no-repeat;
}

body.home {
  background-image: url(/static/img/mandala.jpg);
  background-attachment: fixed;
  background-position: bottom left;
  background-repeat: no-repeat;
  background-size: auto;
}

a {
  text-decoration: none;
}

nav {
  background: #27223e;
  position: fixed;
  width: 100%;
}
nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 5em;
}
nav a {
  color: #fff;
  font-size: 18px;
  line-height: 2.5em;
}
nav a:hover {
  color: #dfcfba;
  transition: color .3s ease-in-out;
}

footer > div {
  margin: 5em 0 0 0;
  display: flex;
  justify-content: center;
  gap: 2em;

  font-family: "Open Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-variation-settings: "wdth" 100;
}
footer div div:first-child::before {
  content: "";
  height: 100%;
  display: block;
  width: 5em;
  background-image: url(/static/img/leaves.avif);
  background-position: center left;
  background-repeat: no-repeat;
}
footer a {
  color: #000;
}

main {
  margin-top: 5em;
  font-size: 18px;
}

h1 {
  font-family: "Fredericka the Great", serif;
  font-weight: 400;
  font-style: normal;
  text-align: center;
}
h2 {
  margin-top: 2em;
  color: #27223e;
  font-style: italic;
}

.home main {
  display: flex;
  justify-content: center;
  color: #27223e;
}
.home main > div {
  padding: 1em;
  width: 30rem;
  background: rgba(228, 213, 89, .8);
}
.home main p {
  font-size: 19px;
  margin: .2em;
  font-style: italic;
}
.home main p:nth-child(11) {
  margin-top: 2em;
}
.home main p:nth-child(12), .home main span {
  font-family: "Fredericka the Great", serif;
  font-weight: 400;
  font-style: normal;
}
.home main p:nth-child(12) {
  font-size: 40px;
}
.home main p:nth-child(13) {
  margin-top: 1em;
}
.home footer {
  display: flex;
  justify-content: center;
}
.home footer > div {
  width: 30rem;
  padding: 1em;
  background: rgba(228, 213, 89, .8);
}

.teaching main > div {
  display: flex;
  justify-content: center;
  align-content: stretch;
  gap: 5em;
}
.teaching main p {
  max-width: 30em;
  text-align: justify;
}
.teaching main div div:last-child {
  border: 3px solid #000;
  align-self: stretch;
  width: 15em;
  height: 15em;
}
.teaching img {
  height: 100%;
}

.translation main {
  display: flex;
  flex-flow: column;
}
.translation main > div {
  max-width: 30em;
  margin: auto;
}
.translation main p {
  text-align: justify;
}

.about main > div {
  display: flex;
  justify-content: center;
  align-content: stretch;
  gap: 3em;
}
.about main div div:first-child {
  max-width: 25em;
}
.about main div div:last-child {
  max-width: 22em;
}
.about main p {
  text-align: justify;
}
.about main img {
  max-width: 100%;
}

.contact main > div {
  display: flex;
  justify-content: center;
  align-content: stretch;
  gap: 3em;
}
.contact main > div > div:first-child {
  max-width: 25em;
}
.contact main > div > div:last-child {
  width: 17em;
}
.contact main img {
  max-width: 100%;
}
.contact main ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.contact main a {
  display: flex;
  align-items: center;
  gap: 1em;
  margin: .5em;
  height: 3em;
  padding: .2em 1em;
  background: #27223e;
  border-radius: 1em 1em;
  color: #fff;
  font-size: 16px;

  font-family: "Open Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-variation-settings: "wdth" 100;
}
.contact main a:hover {
  color: #dfcfba;
  transition: color .3s ease-in-out;
}
.contact main a:hover svg {
  fill: #dfcfba;
  transition: fill .3s ease-in-out;
}
.contact main a:first-child {
  margin-top: 0;
}
.contact main a span {
  display: block;
}
.contact .icon {
  width: 2em;
  height: 2em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.contact svg {
  width: 100%;
  height: 100%;
  fill: #fff;
}


@media only screen and (max-width: 600px) {
  nav {
    position: relative;
    padding: 1em 0;
  }
  nav ul {
    flex-direction: column;
    gap: 0;
  }
  nav a {
    line-height: 2em;
    padding-left: 2em;
  }
  footer > div {
    flex-direction: column;
    gap: 0;
    padding: 2em;
  }
  .teaching main > div {
    flex-direction: column;
    align-items: center;
    padding: 0 2em;
  }
  .teaching main div div:last-child {
    align-self: auto;
  }
  .translation main > div {
    padding: 0 2em;
  }
  .about main > div {
    flex-direction: column-reverse;
    gap: 1em;
    padding: 0 2em;
  }
  .contact main > div {
    flex-direction: column;
    padding: 0 2em;
    gap: 2em;
  }
}
