@font-face {
  font-family: "Square Slabserif";
  src: url("square-slabserif.ttf");
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* remove whitespace on right */
html,
body {
  overflow-x: hidden;
}
html {
  /* CSS HEX */
  --blue-sapphire: #006991ff;
  --burnt-sienna: #de6b48ff;
  --liver: #685155ff;
  --maximum-blue: #42bfddff;
  --yellow-green-crayola: #dbf4a7ff;
  --mauve: #dec1ffff;
  /* kolory */
  --banner: var(--blue-sapphire);
  --subject: var(--yellow-green-crayola);
  --lecture: #f3b6b7;
  --classes: #aeed91;
  --lab: #a5c4f7;
}

body {
  position: relative;
  font-family: Helvetica, Arial, sans-serif;
}

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

h1,
h2 {
  font-family: "Square Slabserif", sans-serif;
  background-color: #006991;
  color: white;
  max-width: 1500px;
  margin: auto;
  padding-left: 30px;
}
h1 {
  padding-top: 30px;
}
h2 {
  padding-top: 10px;
  padding-bottom: 10px;
}

footer {
  font-family: "Square Slabserif", sans-serif;
  background-color: var(--banner);
  color: white;
  max-width: 1500px;
  margin: auto;
  padding: 15px 30px;
}

/* MAIN */
.wrapper {
  display: flex;
  flex-direction: column;
  max-width: 1500px;
  margin: auto;
  padding-bottom: 10px;
}

.subject {
  margin-top: 10px;
  /* background-color: red; */
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-around;
  align-content: flex-start;
}

/* for keeping the "grid" in last row*/
.subject::after,
.subject::before {
  flex-basis: 40%;
  content: "";
  display: block;
  order: 50;
}

.subject .short {
  /* Currently short name is unused, may be usefull for low width screens instead of long name */
  display: none;
}

.subject .name {
  /* background-color: yellowgreen; */
  background-color: var(--subject);
  font-size: x-large;
  order: -1;
  flex-basis: calc(100% - 3 * 41px);
  flex-grow: 1;
  flex-shrink: 5;
  /* line-height: max(10vh, 50px); */
  /* line-height: unset; */
  padding: 10px 20px;
  text-align: left;
  margin-top: 0;
  /* hide second lines */
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

/* .subject .name::first-line {
  opacity: 0;
} */

/* handling the icons which stick to bar */
.github:not(.lecture):not(.lab):not(.classes),
.drive:not(.lecture):not(.lab):not(.classes),
.moodle:not(.lecture):not(.lab):not(.classes) {
  /* background-color: yellowgreen; */
  background-color: var(--subject);
  order: -1;
  width: 10%;
  /* width: 36px; */
  flex-basis: 41px;
  text-align: center;
  /* line-height: max(10vh, 50px); */
  /* padding-top: 10px; */
  /* padding-bottom: 10px; */
  /* padding-right: 10px; */
  margin-top: 0;
  flex-shrink: 0;
}

.github:not(.lecture):not(.lab):not(.classes) a,
.drive:not(.lecture):not(.lab):not(.classes) a,
.moodle:not(.lecture):not(.lab):not(.classes) a {
  padding-right: 10px;
  width: 41px;
}

a {
  height: 100%;
}

.github:not(.lecture):not(.lab):not(.classes) a::before,
.drive:not(.lecture):not(.lab):not(.classes) a::before {
  /* padding-right: 10px; */
  font-size: x-large;
}

.moodle:not(.lecture):not(.lab):not(.classes) a::before {
  height: 24px;
  width: 24px;
}

.github:not(.lecture):not(.lab):not(.classes) a::after,
.drive:not(.lecture):not(.lab):not(.classes) a::after,
.moodle:not(.lecture):not(.lab):not(.classes) a::after {
  display: none;
}

@media (min-width: 600px) {
  .github:not(.lecture):not(.lab):not(.classes),
  .drive:not(.lecture):not(.lab):not(.classes),
  .moodle:not(.lecture):not(.lab):not(.classes) {
    background-color: initial;
    order: 10;
    text-align: initial;
    /* line-height: max(7vh, 32px); */
    line-height: unset;
    /* min-height: 32px; */
    /* margin-top: max(2vh, 8px); */
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 8px;
  }
  .github:not(.lecture):not(.lab):not(.classes) a,
  .drive:not(.lecture):not(.lab):not(.classes) a,
  .moodle:not(.lecture):not(.lab):not(.classes) a {
    padding-bottom: 10px;
    padding-top: 10px;
    width: 100%;
  }
  .github:not(.lecture):not(.lab):not(.classes) a::before,
  .drive:not(.lecture):not(.lab):not(.classes) a::before {
    font-size: 20px;
  }
  .moodle:not(.lecture):not(.lab):not(.classes) a::before {
    height: 20px;
    width: 20px;
  }
  .github:not(.lecture):not(.lab):not(.classes) a::after,
  .drive:not(.lecture):not(.lab):not(.classes) a::after,
  .moodle:not(.lecture):not(.lab):not(.classes) a::after {
    display: initial;
  }
}

.subject > div:not(.name) {
  /* line-height: max(7vh, 32px);
  min-height: 32px; */
  margin-top: 8px;
  flex-basis: 40%;
  font-size: 20px;
}

.subject a {
  padding-bottom: 10px;
  padding-top: 10px;
  display: block;
  padding-left: 5px;
}

/* Icons */
a::before {
  margin-left: 2px;
  margin-right: 7px;
  display: inline-block;
  padding-right: 3px;
  vertical-align: middle;
  font-weight: 900;
}

@media (min-width: 600px) {
  .subject > div:not(.name) {
    flex-basis: 30% !important;
  }

  .subject::after,
  .subject::before {
    flex-basis: 30%;
  }
}

@media (min-width: 900px) {
  .subject {
    width: 45%;
  }
  .wrapper {
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: space-around;
  }
  .subject .name {
    text-align: center;
  }
  .subject > div:not(.name) {
    flex-basis: 40% !important;
  }

  .subject::after,
  .subject::before {
    flex-basis: 40%;
  }
}

@media (min-width: 1100px) {
  .subject {
    width: 30%;
  }
}
