:root {
  --home-color: #309a4e;
  --offer-color: #ffe64a;
  --current-color: #ff5126;
  --training-color: #952fa4;
  --about-color: #0090ed;
  --text-color: rgba(0, 0, 0, 0.7);
  --breakpoint-vertical: 1020px;
}

/* ===== Reset & Base ===== */

html {
  font-size: 1rem;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

* {
  margin: 0;
  padding: 0;
  position: relative;
  font-size: 1.43rem;
  transition: 500ms;
}

body {
  background: #ededed url("assets/bg.png");
}

p,
label,
input {
  color: var(--text-color);
}

address {
  font-style: normal;
}

/* ===== Layouts ===== */

.HSwitch {
  display: flex;
  flex-direction: row;
}

.HBox {
  display: flex;
  flex-direction: row;
}

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

.StackedView {
  display: flex;

  &>* {
    position: absolute;
  }
}

/* ===== Alignment ===== */

.horizontalCenter {
  justify-content: center;
}

.horizontalSpaceAround {
  justify-content: space-around;
}

.horizontalSpaceBetween {
  justify-content: space-between;
}

.verticalCenter {
  align-items: center;
}

.textCenter {
  text-align: center;
}

/* ===== Effects ===== */

.shadow {
  box-shadow: 5px 5px 10px 0 rgba(0, 0, 0, 0.5);
}

/* ===== Link Animations ===== */

.Link {
  display: inline-block;
  position: relative;
  cursor: pointer;
  text-decoration: none;

  &::before {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 0;
    transition: width 500ms ease;
  }

  &::after {
    content: "";
    display: block;
    position: absolute;
    right: 0;
    bottom: 0;
    height: 2px;
    width: 0;
    transition: width 500ms ease;
  }

  &:hover::before {
    width: 100%;
    transition: width 500ms ease;
  }

  &:hover::after {
    width: 100%;
    background: transparent;
    transition: all 0s ease;
  }
}

.LinkDark {
  display: inline-block;
  position: relative;
  cursor: pointer;
  text-decoration: none;
  color: black;

  &::before {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 0;
    transition: width 500ms ease;
  }

  &::after {
    content: "";
    display: block;
    position: absolute;
    right: 0;
    bottom: 0;
    height: 2px;
    width: 0;
    background: rgba(0, 0, 0, 0.7);
    transition: width 500ms ease;
  }

  &:hover::before {
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    transition: width 500ms ease;
  }

  &:hover::after {
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    transition: all 0s ease;
  }
}

.LinkLight {
  display: inline-block;
  position: relative;
  cursor: pointer;
  text-decoration: none;
  color: white;

  &::before {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 0;
    transition: width 500ms ease;
  }

  &::after {
    content: "";
    display: block;
    position: absolute;
    right: 0;
    bottom: 0;
    height: 2px;
    width: 0;
    background: rgba(255, 255, 255, 0.7);
    transition: width 500ms ease;
  }

  &:hover::before {
    width: 100%;
    background: rgba(255, 255, 255, 0.7);
    transition: width 500ms ease;
  }

  &:hover::after {
    width: 100%;
    background: rgba(255, 255, 255, 0.7);
    transition: all 0s ease;
  }
}

/* ===== Typography ===== */

.Title {
  color: black;
  font-size: 2.64rem;
  margin: 10px 15px 10px 10px;
}

.SubTitle {
  color: black;
  font-size: 2.14rem;
  margin: 5px 10px 5px 10px;
}

.Page {
  padding: 20px;
}

.Box {
  width: calc(100% - 60px);
  margin: 10px;
  padding: 20px;
  border-bottom: solid 2px;
  border-radius: 20px;
  background-color: white;

  & .Title {
    margin: 0;
    align-self: flex-start;
  }

  & .Spacing {
    margin: 5px;
    height: 1px;
  }
}

/* ===== Header & Navigation ===== */

#header {
  width: 90%;

  & #menu {
    width: calc(100% - 30px);
    margin: 20px 10px;
    padding: 5px;
    background-color: white;
    border-bottom: solid gray;
    border-radius: 20px;
    transition: 300ms;

    & .item {
      border-radius: 20px;
      padding: 15px 50px;
      color: black;
      text-decoration: none;
      cursor: pointer;
      transition: 300ms;
    }
  }

  & .item:nth-child(1):hover,
  & .item:nth-child(1).active {
    color: white !important;
    background-color: var(--home-color);
  }

  & .item:nth-child(2):hover,
  & .item:nth-child(2).active {
    color: white !important;
    background-color: var(--offer-color);
  }

  & .item:nth-child(3):hover,
  & .item:nth-child(3).active {
    color: white !important;
    background-color: var(--current-color);
  }

  & .item:nth-child(4):hover,
  & .item:nth-child(4).active {
    color: white !important;
    background-color: var(--training-color);
  }

  & .item:nth-child(5):hover,
  & .item:nth-child(5).active {
    color: white !important;
    background-color: var(--about-color);
  }
}

/* ===== Body / Page View ===== */

#body {
  width: 90%;
  border-radius: 30px;
  margin-bottom: 20px;

  & #Page-View {
    width: 100%;
  }
}

/* ===== Contact & Map ===== */

#contact {
  width: calc(100% - 20px);

  & #contact-bar {
    display: flex;
    justify-content: center;
    padding: 10px;
    width: calc(100% - 20px);
    color: white;
    border-radius: 50px;
    border-bottom: solid gray;
    background-color: var(--about-color);
  }

  & .item>img,
  & .item>svg {
    width: 40px;
    height: 40px;
    margin-right: 10px;
  }

  & .item:not(:last-child) {
    margin-right: 100px;
  }

  & #map-wrapper {
    overflow: hidden;
    border-radius: 10px;
    width: 100%;
    height: 500px;
    margin-top: 15px;
    margin-bottom: 10px;
  }
}

/* ===== Home Page ===== */

#Home-Page {
  padding: 0;
  margin-top: -10px;
  flex-grow: 1;

  & #profile {
    margin: 10px;
    justify-items: flex-start;
    background-color: white;
    border-radius: 20px;
    border-bottom: solid gray;

    & .Title {
      margin: 0 0 10px;
      color: white;
      background-color: var(--home-color);
      border-radius: 20px;
    }

    & img {
      border-radius: 50%;
      width: 250px;
      height: 250px;
      margin: 10px 10px 30px 10px;
    }
  }

  & #home-head-section {
    height: min-content;
  }

  & #current {
    min-width: 300px;
    margin: 10px;
    border-radius: 20px;
    border-bottom: solid gray;
    background-color: white;
    overflow: hidden;

    & #posts {
      height: calc(100% - 50px);
      padding: 10px;
      overflow-y: auto;

      & .Post:not(:first-child) {
        margin-top: 50px;
      }

      & .Post:last-child {
        margin-bottom: 20px;
      }

      & .Datum {
        font-size: 2ex;
        margin-bottom: -5px;
      }
    }

    & .Title {
      margin: 0;
      color: white;
      background-color: var(--current-color);
      border-radius: 20px;
    }
  }

  & .Box:nth-child(1) {
    border-color: #ec2758;

    & .Title {
      color: #ec2758;
    }
  }

  & .Box:nth-child(2) {
    border-color: #80ba4e;

    & .Title {
      color: #80ba4e;
    }
  }

  & #offer-wrapper .Title {
    display: inline;
    border-bottom: solid gray;
    margin-top: 20px;
    padding: 10px 10px 10px 20px;
    border-radius: 20px;
    color: white;
    background-color: var(--offer-color);
  }

  & #grid-layout-wrapper {
    width: 100%;
    margin-top: 20px;
  }

  & #grid-layout {
    flex-wrap: wrap;
    justify-content: center;
  }

  & .grid {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 200px;
    height: 200px;
    margin: 10px;
    padding: 20px;
    cursor: pointer;
    text-align: center;
    color: white;
    border-radius: 10px;
    border-bottom: solid gray;
    transition: 300ms;
  }

  & .grid:hover {
    width: 220px;
    height: 220px;
    margin: 0;
    font-size: 1.2em;
  }

  & .grid:nth-child(1) {
    background: linear-gradient(to bottom right, #f94033, #ec2758);
  }

  & .grid:nth-child(2) {
    background: linear-gradient(to bottom right, #ec2758, #952fa4);
  }

  & .grid:nth-child(3) {
    background: linear-gradient(to bottom right, #952fa4, #5d3bab);
  }

  & .grid:nth-child(4) {
    background: linear-gradient(to bottom right, #5d3bab, #334daa);
  }

  & .grid:nth-child(5) {
    background: linear-gradient(to bottom right, #334daa, #0090ed);
  }

  & .grid:nth-child(6) {
    background: linear-gradient(to bottom right, #0090ed, #00a2ef);
  }

  & .grid:nth-child(7) {
    background: linear-gradient(to bottom right, #00a2ef, #00b5cd);
  }

  & .grid:nth-child(8) {
    background: linear-gradient(to bottom right, #00b5cd, #40cdb3);
  }
}

/* ===== Meine Angebote Page ===== */

#Meine_Angebote-Page>div {
  & .Title {
    background-color: var(--offer-color);
    color: white;
  }

  & .SubTitle {
    color: white;
    margin: -20px -20px 10px -20px;
    padding: 10px 20px;
    border-radius: 20px;
  }

  & .Box:nth-child(2)>.SubTitle {
    background: linear-gradient(to bottom right, #f94033, #ec2758);
  }

  & .Box:nth-child(3)>.SubTitle {
    background: linear-gradient(to bottom right, #ec2758, #952fa4);
  }

  & .Box:nth-child(4)>.SubTitle {
    background: linear-gradient(to bottom right, #952fa4, #5d3bab);
  }

  & .Box:nth-child(5)>.SubTitle {
    background: linear-gradient(to bottom right, #5d3bab, #334daa);
  }

  & .Box:nth-child(6)>.SubTitle {
    background: linear-gradient(to bottom right, #334daa, #0090ed);
  }

  & .Box:nth-child(7)>.SubTitle {
    background: linear-gradient(to bottom right, #0090ed, #00a2ef);
  }

  & .Box:nth-child(8)>.SubTitle {
    background: linear-gradient(to bottom right, #00a2ef, #00b5cd);
  }

  & .Box:nth-child(9)>.SubTitle {
    background: linear-gradient(to bottom right, #00b5cd, #40cdb3);
  }
}

/* ===== Aktuelles Page ===== */

#Aktuelles-Page>div {
  & .Title {
    background-color: var(--current-color);
    color: white;
  }

  & .Datum {
    font-size: smaller;
    color: rgba(26, 26, 26, 0.7);
    align-self: center;
  }

  & .Post {
    margin-top: 0;
    margin-bottom: 10px;

    & .Text {
      padding: 10px;
    }
  }
}

#Aktuelles-Page img {
  max-height: 300px;
}

/* ===== Trainingsablauf Page ===== */

#Trainingsablauf-Page>div {
  & .Title {
    background-color: var(--training-color);
    color: white;
  }

  & .SubTitle {
    margin: -20px -20px 10px -20px;
    padding: 10px 20px;
    border-radius: 20px;
  }

  & .Box:nth-child(5)>.SubTitle {
    background-color: #bb6dcc;
    color: white;
  }
}

/* ===== Über mich Page ===== */

.ueber_mich-Page {
  & .Title {
    background-color: var(--about-color);
    color: white;
  }

  & #login-btn {
    background-color: var(--about-color);
    color: white;
    padding: 20px;
    cursor: pointer;
    border: none;
    border-bottom: solid black 2px;
    border-radius: 20px;
  }
}

/* ===== Responsive ===== */

@media screen and (max-width: 1020px) {
  * {
    font-size: 1.5rem;
  }

  .Title {
    font-size: 2.25rem !important;
  }

  .SubTitle {
    font-size: 2.14rem !important;
  }

  .HSwitch {
    flex-direction: column;
  }

  #header {
    width: 100%;

    & #menu .item {
      font-size: 1.5em;
      margin: 10px 0;
    }
  }

  #body {
    width: 100%;
  }

  #contact {
    & #contact-center>div {
      margin: 20px 20px 20px 10%;
    }
  }

  .Datum {
    font-size: 1.31rem;
  }

  #Home-Page {
    & #current {
      height: auto;
      max-height: 800px;
      overflow: visible;

      & #posts {
        height: auto;
        overflow-y: visible;
      }
    }

    & #profile {
      & img {
        margin: 10px auto;
      }

      & .Text {
        margin-bottom: 50px;
      }
    }

    & .Box {
      width: calc(100% - 40px);
      padding: 15px;
    }

    & .grid {
      width: 100%;
    }

    & .grid:hover {
      width: 90%;
    }
  }

  #Meine_Angebote-Page .Box .Text {
    margin: 10px;
  }

  #Aktuelles-Page {
    & .Box {
      width: calc(100% - 40px);
      padding: 15px;
    }

    & .Datum {
      font-size: 0.875rem;
    }
  }

  #Trainingsablauf-Page .Box {
    width: calc(100% - 40px);
    padding: 15px;
  }

  .ueber_mich-Page .Box {
    width: calc(100% - 40px);
    padding: 15px;
  }
}