@font-face {
  font-family: "GreatVibes";
  src: url("/Content/font/GreatVibes-Regular.ttf");
  font-weight: normal;
}
@font-face {
  font-family: "NotoSerif";
  src: url("/Content/font/NotoSerif-Regular.ttf");
  font-weight: normal;
}

* {
  padding: 0;
  margin: 0;
  font-family: "NotoSerif";
}

body {
  height: 100vh;
  width: 100vw;
  background: url("Content/AK2024_HG.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  overflow: hidden;
}

.calendar {
  position: absolute;
  padding-left: 4%;
  padding-top: 4%;
  display: grid;
  grid-template-columns: repeat(6, minmax(50px, 400px));
  max-width: 56vw;
  grid-gap: 0.65vw;

  .calendar-day {
    aspect-ratio: 1/1;
    perspective: 1000px;
    transform-style: preserve-3d;
    transition: all 300ms;
    background-repeat: no-repeat;

    &.available {
      .calendar-day-back {
        background: white !important;
      }

      .calendar-day-back-not-avilable-text {
        display: none;
      }
    }

    .calendar-day-back-not-avilable-text {
      text-align: center;
    }

    div {
      position: fixed;
      height: 100%;
      width: 100%;
      backface-visibility: hidden;

      border-radius: 2rem;

      display: flex;
      align-items: center;
      justify-content: center;
    }

    .calendar-day-front {
      width: 100%;
      height: 100%;
      background-repeat: no-repeat !important;
      background-size: cover !important;
      background-position: center !important;
      cursor: pointer;

      border: 2px solid transparent;
      border-radius: 20%;
      transition: border 0.3s ease-in-out;
    }

    &#day-1 .calendar-day-front {
      background: url("Content/Kacheln\ 172x172/01.png");
    }
    &#day-2 .calendar-day-front {
      background: url("Content/Kacheln\ 172x172/02.png");
    }
    &#day-3 .calendar-day-front {
      background: url("Content/Kacheln\ 172x172/03.png");
    }
    &#day-4 .calendar-day-front {
      background: url("Content/Kacheln\ 172x172/04.png");
    }
    &#day-5 .calendar-day-front {
      background: url("Content/Kacheln\ 172x172/05.png");
    }
    &#day-6 .calendar-day-front {
      background: url("Content/Kacheln\ 172x172/06.png");
    }
    &#day-7 .calendar-day-front {
      background: url("Content/Kacheln\ 172x172/07.png");
    }
    &#day-8 .calendar-day-front {
      background: url("Content/Kacheln\ 172x172/08.png");
    }
    &#day-9 .calendar-day-front {
      background: url("Content/Kacheln\ 172x172/09.png");
    }
    &#day-10 .calendar-day-front {
      background: url("Content/Kacheln\ 172x172/10.png");
    }
    &#day-11 .calendar-day-front {
      background: url("Content/Kacheln\ 172x172/11.png");
    }
    &#day-12 .calendar-day-front {
      background: url("Content/Kacheln\ 172x172/12.png");
    }
    &#day-13 .calendar-day-front {
      background: url("Content/Kacheln\ 172x172/13.png");
    }
    &#day-14 .calendar-day-front {
      background: url("Content/Kacheln\ 172x172/14.png");
    }
    &#day-15 .calendar-day-front {
      background: url("Content/Kacheln\ 172x172/15.png");
    }
    &#day-16 .calendar-day-front {
      background: url("Content/Kacheln\ 172x172/16.png");
    }
    &#day-17 .calendar-day-front {
      background: url("Content/Kacheln\ 172x172/17.png");
    }
    &#day-18 .calendar-day-front {
      background: url("Content/Kacheln\ 172x172/18.png");
    }
    &#day-19 .calendar-day-front {
      background: url("Content/Kacheln\ 172x172/19.png");
    }
    &#day-20 .calendar-day-front {
      background: url("Content/Kacheln\ 172x172/20.png");
    }
    &#day-21 .calendar-day-front {
      background: url("Content/Kacheln\ 172x172/21.png");
    }
    &#day-22 .calendar-day-front {
      background: url("Content/Kacheln\ 172x172/22.png");
    }
    &#day-23 .calendar-day-front {
      background: url("Content/Kacheln\ 172x172/23.png");
    }
    &#day-24 .calendar-day-front {
      background: url("Content/Kacheln\ 172x172/24.png");
    }

    .calendar-day-back {
      transform: rotateY(180deg);
      background-color: #fff;
      z-index: 500;
      cursor: pointer;
    }
  }
}

.calendar-day-back-close-btn {
  position: absolute;
  top: 1rem;
  left: 1rem;
  border-radius: 2rem;
  border: none;
  background-color: hsla(0, 0%, 0%, 0.1);
  z-index: 500;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: 0.2s;
  font-weight: 600;
  opacity: 0;
  transition: 0.5s;
  font-size: 1.5rem;

  &:hover {
    background-color: #3c8d0d;
    color: white;
  }
}

.day-content {
  visibility: hidden;
  z-index: 600;

  &.show {
    visibility: visible;
  }

  .calendar-day-back-content {
    color: #385052;
    font-size: 2em;
    font-weight: bold;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.2);
    align-items: center;
    justify-content: center;

    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 10%;
    left: 0;
    display: none;
    opacity: 0;
    z-index: 5;
    transition: opacity 1s ease-in-out, top 1s ease-in-out;

    display: flex;
    flex-direction: column;
    gap: 1rem;

    video {
      width: 50vw;
      border-radius: 2rem;
    }

    h1 {
      text-align: center;
      font-family: "GreatVibes";
      color: #0f8a5f;
    }

    p {
      text-align: center;
      max-width: 70ch;
    }

    &.open {
      opacity: 1;
      top: 0;

      & ~ .calendar-day-back-close-btn {
        opacity: 1;
      }
    }

    .links {

      a {
        font-size: 3rem;
        line-height: 1;

        &.instagram {
          background: -webkit-linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); 
          -webkit-background-clip: text;
          -webkit-text-fill-color: transparent;
        }
        &.facebook {
          color: #4267B2;
        }
        &.linkedin {
          color: #0e76a8; 
        }
      }
    }
  }
  .calendar-day-back-circle {
    position: fixed;
    width: 100px;
    height: 100px;
    background-color: #fff;
    border-radius: 2rem;
    transform: translate(-50%, -50%) rotate(0deg);
    transition: transform 0.5s ease-in-out, width 0.5s ease-in-out,
      height 0.5s ease-in-out, top 0.5s ease-in-out, left 0.5s ease-in-out,
      border-radius 0.5s ease-in-out;
    z-index: 1;

    &.open {
      width: 100vw;
      height: 100vh;
      transform: translate(0%, 0%);
      top: 0 !important;
      left: 0 !important;
      border-radius: 0;
    }
  }
}

.loading {
  position: fixed;
  width: 100vw;
  height: 100vh;
  top: 0;
  left: 0;
  z-index: 1000;
  background-color: #151522;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 1rem;
  transition: opacity 0.5s ease-in-out;
  opacity: 1;
  pointer-events: none;

  &.hide {
    opacity: 0;
  }

  h1, h2 {
    color: #0f8a5f;
    font-family: "GreatVibes";
    text-align: center;
  }

  img {
    aspect-ratio: 1/1;
  }
}

.christmas-soft-red-green {
  background: linear-gradient(135deg, #e57373, #81c784);
  color: #ffffff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* 2. Frostiges Blau und weiches Weiß */
.christmas-soft-blue-white {
  background: linear-gradient(135deg, #90caf9, #e3f2fd);
  color: #1a237e;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

/* 3. Dezentes Gold und warmes Beige */
.christmas-soft-gold-beige {
  background: linear-gradient(135deg, #ffecb3, #ffe0b2);
  color: #5d4037;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.15);
}

/* 4. Weiches Tannengrün und cremiges Weiß */
.christmas-soft-green-cream {
  background: linear-gradient(135deg, #a5d6a7, #f1f8e9);
  color: #2e7d32;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

@media screen and (max-width: 1000px) {
  body {
    background: #151522;
  }

  .loading {
    opacity: 0;
  }

  .calendar {
    display: none;
  }

  #screenToSmall {
    opacity: 1;
    pointer-events: all;

    h1, h2 {
      font-family: 'Times New Roman', Times, serif;
    }

    a {
      color: white;
      text-decoration: none;
      font-size: 1.5rem;
      cursor: pointer;

      &:hover {
        color: wheat;
      }

      i {
        margin-right: 1rem;
      }
    }
  }
}

@property --rotate {
  syntax: "<angle>";
  initial-value: 132deg;
  inherits: false;
}

:root {
  --card-height: 172px;
  --card-width: 172px;
}

.calendar-day::after {
  position: absolute;
  content: "";
  top: 0;
  left: 0;
  right: 0;
  z-index: -1;
  height: 100%;
  width: 100%;
  margin: 0 auto;
  transform: scale(0);
  filter: blur(calc(var(--card-height) / 6));
  background-image: linear-gradient(
    var(--rotate)
    , #608DDD 43%, #EFC550);
    opacity: 0;
  transition: opacity .5s, transform .5s;
  /* animation: spin 2.5s linear infinite; */
}

.calendar-day:hover {
  transform: scale(1.01);

  &::after {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes spin {
  0% {
    --rotate: 0deg;
  }
  100% {
    --rotate: 360deg;
  }
}