/* noto-sans-100 - latin_latin-ext */

@font-face {
  font-display: swap;
  /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 100;
  src: url('../fonts/noto-sans-v42-latin_latin-ext-100.woff2') format('woff2');
  /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* noto-sans-100italic - latin_latin-ext */
@font-face {
  font-display: swap;
  /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Noto Sans';
  font-style: italic;
  font-weight: 100;
  src: url('../fonts/noto-sans-v42-latin_latin-ext-100italic.woff2') format('woff2');
  /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* noto-sans-200 - latin_latin-ext */
@font-face {
  font-display: swap;
  /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 200;
  src: url('../fonts/noto-sans-v42-latin_latin-ext-200.woff2') format('woff2');
  /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* noto-sans-200italic - latin_latin-ext */
@font-face {
  font-display: swap;
  /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Noto Sans';
  font-style: italic;
  font-weight: 200;
  src: url('../fonts/noto-sans-v42-latin_latin-ext-200italic.woff2') format('woff2');
  /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* noto-sans-300 - latin_latin-ext */
@font-face {
  font-display: swap;
  /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 300;
  src: url('../fonts/noto-sans-v42-latin_latin-ext-300.woff2') format('woff2');
  /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* noto-sans-300italic - latin_latin-ext */
@font-face {
  font-display: swap;
  /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Noto Sans';
  font-style: italic;
  font-weight: 300;
  src: url('../fonts/noto-sans-v42-latin_latin-ext-300italic.woff2') format('woff2');
  /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* noto-sans-regular - latin_latin-ext */
@font-face {
  font-display: swap;
  /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/noto-sans-v42-latin_latin-ext-regular.woff2') format('woff2');
  /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* noto-sans-italic - latin_latin-ext */
@font-face {
  font-display: swap;
  /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Noto Sans';
  font-style: italic;
  font-weight: 400;
  src: url('../fonts/noto-sans-v42-latin_latin-ext-italic.woff2') format('woff2');
  /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* noto-sans-500 - latin_latin-ext */
@font-face {
  font-display: swap;
  /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 500;
  src: url('../fonts/noto-sans-v42-latin_latin-ext-500.woff2') format('woff2');
  /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* noto-sans-500italic - latin_latin-ext */
@font-face {
  font-display: swap;
  /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Noto Sans';
  font-style: italic;
  font-weight: 500;
  src: url('../fonts/noto-sans-v42-latin_latin-ext-500italic.woff2') format('woff2');
  /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* noto-sans-600 - latin_latin-ext */
@font-face {
  font-display: swap;
  /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 600;
  src: url('../fonts/noto-sans-v42-latin_latin-ext-600.woff2') format('woff2');
  /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* noto-sans-600italic - latin_latin-ext */
@font-face {
  font-display: swap;
  /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Noto Sans';
  font-style: italic;
  font-weight: 600;
  src: url('../fonts/noto-sans-v42-latin_latin-ext-600italic.woff2') format('woff2');
  /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* noto-sans-700 - latin_latin-ext */
@font-face {
  font-display: swap;
  /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 700;
  src: url('../fonts/noto-sans-v42-latin_latin-ext-700.woff2') format('woff2');
  /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* noto-sans-700italic - latin_latin-ext */
@font-face {
  font-display: swap;
  /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Noto Sans';
  font-style: italic;
  font-weight: 700;
  src: url('../fonts/noto-sans-v42-latin_latin-ext-700italic.woff2') format('woff2');
  /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* noto-sans-800 - latin_latin-ext */
@font-face {
  font-display: swap;
  /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 800;
  src: url('../fonts/noto-sans-v42-latin_latin-ext-800.woff2') format('woff2');
  /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* noto-sans-800italic - latin_latin-ext */
@font-face {
  font-display: swap;
  /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Noto Sans';
  font-style: italic;
  font-weight: 800;
  src: url('../fonts/noto-sans-v42-latin_latin-ext-800italic.woff2') format('woff2');
  /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* noto-sans-900 - latin_latin-ext */
@font-face {
  font-display: swap;
  /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 900;
  src: url('../fonts/noto-sans-v42-latin_latin-ext-900.woff2') format('woff2');
  /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* noto-sans-900italic - latin_latin-ext */
@font-face {
  font-display: swap;
  /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Noto Sans';
  font-style: italic;
  font-weight: 900;
  src: url('../fonts/noto-sans-v42-latin_latin-ext-900italic.woff2') format('woff2');
  /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

:root {
  --font-color: #2b2b2b;
  --background-color: #FAFAFA;
  --konosport-red-1: #DE1C25;
  --konosport-red-2: hsl(from var(--konosport-red-1) h s calc(l * 1.2));

  color: var(--font-color);
}

* {
  margin: 0;
  padding: 0;
  font-family: "Noto Sans";

  @supports (corner-shape: superellipse(1.4)) {
    corner-shape: superellipse(1.4);
  }
}

body {
  background: var(--background-color);

  scroll-behavior: smooth;
}

a {
  text-decoration: none;

  color: inherit;
}

button {
  background: transparent;
  border: none;
}

img,
svg {
  display: block;
}

div.hr {
  width: 100%;
  height: 1px;
  background: currentColor;
}

.link {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.5rem;
  transition: 0.2s ease-in-out;

  &:hover {
    color: var(--konosport-red-2);
    text-decoration-color: currentColor;
  }
}

#nav-header {
  height: 8rem;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 0 4rem;
  box-sizing: border-box;

  box-shadow: 0 0 10px gray;

  #logo-link {
    display: flex;
    align-items: center;
    gap: 2rem;

    height: 100%;

    img {
      height: 80%;
    }

    p {
      font-size: xx-large;
      font-weight: 600;

      &::first-letter {
        color: var(--konosport-red-2);
      }
    }
  }

  nav ul {
    list-style: none;

    display: flex;

    justify-content: space-between;
    gap: 2rem;
  }

  #show-sidebar {
    display: none;

    height: 3rem;

    svg {
      fill: currentColor;
      height: 100%;
      aspect-ratio: 1;
    }
  }

  #sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;

    padding: 0 1rem;
    padding-top: 4rem;
    box-sizing: border-box;

    height: 100vh;
    width: 100vw;
    top: -150%;
    left: 0;

    position: fixed;

    background: white;

    z-index: 3;

    transition: 0.2s ease-in-out;

    div.hr {
      width: 100%;
      height: 1px;
      background: #2b2b2b;
    }

    #hide-sidebar svg {
      height: 4rem;
      aspect-ratio: 1;
    }

    ul {
      list-style: none;

      display: flex;
      flex-direction: column;
      gap: 0.5rem;

      margin-top: 1rem;
    }
  }

  @media(max-width: 85rem) {
    nav {
      display: none;
    }

    #show-sidebar {
      display: block;
    }
  }

  @media(max-width: 50rem) {
    & {
      padding: 0 1rem;

      height: 5rem;
    }

    #logo-link {
      img {
        display: none;
      }

      height: unset;

      gap: 0.5rem;
    }
  }
}

#main-header {
  height: 80vh;
  position: relative;

  img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 0 0;

    z-index: -1;
  }

  #title-wrapper {
    position: absolute;
    align-content: center;

    height: 100%;
    width: 100%;

    backdrop-filter: brightness(60%);
    color: #FAFAFA;

    #header-title {
      margin-left: 10rem;

      width: fit-content;

      @media (max-width: 60rem) {
        margin: 0 auto;
        padding: 0 2rem;
      }

      h1 {
        font-size: 3rem;
        font-weight: 800;

        &::first-letter {
          color: var(--konosport-red-2);
        }
      }

      h2 {
        font-size: 1.5rem;
      }

      @media(min-width: 35rem) {
        h1 {
          font-size: 5rem;
        }
      }

      @media(min-width: 50rem) {
        h1 {
          font-size: 7rem;
        }

        h2 {
          font-size: 2rem;
        }
      }
    }
  }
}

.section-title {
  position: relative;
  top: -0.7em;

  font-size: xx-large;
  font-weight: 600;

  margin: 0 auto;
  width: fit-content;
  padding: 0 1.5rem;
  box-sizing: border-box;
  background: var(--background-color);

  @media(max-width: 30rem) {
    font-size: x-large;
    padding: 0 0.5rem;
  }
}

.big-button {
  margin: 2rem auto;

  padding: 0.8rem 1rem;

  border-radius: 0.5rem;
  border: none;

  background: var(--konosport-red-2);
  color: #FAFAFA;

  transition: box-shadow 0.3s ease-out;

  &:hover {
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.5);
  }
}

#about-us-wrapper {
  padding: 0 min(10vw, 2rem);

  #about-us {
    height: 10rem;
    background: blue;
  }
}

#events-preview {
  padding: 0 1.5rem;
  box-sizing: border-box;

  #event-section-wrapper {
    margin: 0 auto;
    margin-top: 5rem;

    max-width: max-content;

    display: flex;
    flex-direction: column;
    align-items: center;

  }

  #event-list {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;

    max-width: 79rem;
    width: 100%;

    padding: 1rem;

    list-style: none;

    overflow-x: auto;
    scroll-snap-type: x mandatory;

    scrollbar-width: none;

    .event-item {
      list-style-type: none;

      scroll-snap-align: center;

      max-width: max-content;
      flex: 1 0 100%;

      .event {
        display: flex;
        flex-direction: column;

        height: 35rem;
        width: 100%;
        max-width: 25rem;

        overflow: hidden;

        border-radius: 0.5rem;
        box-shadow: 0 0 10px 2px #ccc;

        img {
          height: 40%;
          width: 100%;
          object-fit: cover;
        }

        .event-content {
          padding: 1rem 1.5rem;
          box-sizing: border-box;

          flex: 1;
          overflow: hidden;

          display: flex;
          flex-direction: column;
          gap: 0.5rem;

          .event-title {
            font-size: 1.1rem;
            font-weight: 800;
          }

          .event-info {
            list-style: none;

            display: flex;
            flex-direction: column;
            gap: 0.5rem;

            li {
              display: flex;
              align-items: center;
              gap: 0.5rem;

              svg {
                stroke: var(--konosport-red-2);
                display: inline;

                height: 1.2rem;
                aspect-ratio: 1;
              }

              p {
                display: inline;
              }
            }
          }

          .event-description {
            flex: 1;

            overflow: hidden;
          }

          .event-link {
            position: relative;
            bottom: 0;
            align-self: center;

            &::after {
              position: absolute;
              content: "➔";
              transition: 0.3s ease-in-out;

              z-index: -1;

              translate: 0.2rem 0;
            }

            &:hover {
              &::after {
                translate: 0.4rem 0;
              }
            }

          }
        }
      }
    }
  }

  #event-selector-list {
    list-style: none;

    display: flex;
    gap: 0.2rem;

    .event-selector {
      height: 1.5rem;
      padding: 0.4rem;
      align-content: center;

      cursor: pointer;

      p {
        text-indent: 100px;
        overflow: hidden;

        background: rgba(0, 0, 0, 0.25);
        border-radius: 50%;
        corner-shape: round;

        height: 100%;
        aspect-ratio: 1;

        transition: 0.3s ease-in-out;
      }

      &.event-selected p {
        background: black;
        transform: scale(1.3);
      }
    }
  }
}

#gallery-section-wrapper {
  padding: 5rem 2rem;

  #gallery-section {
    max-width: 80rem;
    margin: 0 auto;

    #gallery {
      display: grid;
      grid-template-columns: repeat(3, auto);
      gap: 15px;

      @media (max-width: 70rem) {
        grid-template-columns: repeat(2, auto);
      }

      @media (max-width: 45rem) {
        grid-template-columns: repeat(1, auto);
      }

      .gallery-image {
        width: 100%;
        aspect-ratio: 4 / 3;

        border-radius: 1rem;
        overflow: hidden;

        img {
          width: 100%;

          object-fit: cover;
        }
      }
    }
  }
}

footer {
  --footer-background-color: #2B2B2B;
  background: var(--footer-background-color);
  color: #FAFAFA;

  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 4rem;

  padding-top: 5rem;

  #columns-wrapper {
    display: flex;
    justify-content: space-around;

    max-width: 60rem;
    width: 100%;

    @media (max-width: 35rem) {
      flex-direction: column;
      gap: 4rem;
      align-items: center;

      width: 100%;

      .column {
        text-align: center;

        ul {
          align-items: center;
        }
      }
    }

    .column {
      ul {
        list-style: none;
        display: flex;
        flex-direction: column;

        gap: 1rem;

        li {
          height: 1.5rem;
          align-content: center;
        }
      }

      svg {
        height: 1.2rem;
        aspect-ratio: 1;
      }

      .column-heading {
        font-size: x-large;
        font-weight: bold;
        margin-bottom: 2rem;
      }

      .contact-item {
        display: flex;
        align-items: center;
        gap: 0.5rem;

        .contact-icon {
          fill: var(--konosport-red-2);
          display: block;

          transition: transform 0.2s ease-out;
        }

        .contact-icon:has(~.contact-text:hover) {
          transform: scale(1.2);
        }
      }
    }
  }

  .social-media {
    display: flex;
    justify-content: center;
    gap: 3rem;

    margin-top: 1rem;

    .social-media-link {
      border: 1px solid white;
      border-radius: 100%;

      @supports (corner-shape: round) {
        corner-shape: round;
      }

      line-height: 0;
      font-size: 0;
      color: transparent;

      height: 3rem;
      padding: 0.7rem;
      box-sizing: border-box;

      transition: 0.2s ease-in-out;

      &:hover {
        transform: scale(1.1);
      }

      svg {
        display: block;

        height: 100%;
        /* by default make the icon square, others can be given other ratios */
        aspect-ratio: 1;

        fill: var(--konosport-red-2);
      }
    }
  }

  #credit {
    text-align: center;
    padding: 1rem 0;
    width: 100%;
    background: hsl(from var(--footer-background-color) h s calc(l * 0.8));
  }
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
  }

  10%,
  90% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

#flashes {
  position: fixed;
  bottom: 5rem;

  left: 0;
  right: 0;
  margin: 0 auto;
  width: fit-content;

  list-style: none;

  pointer-events: none;

  .flash {
    animation: fadeInOut 3s ease-in-out forwards;

    box-shadow: 0 0 7px 0 rgba(0, 0, 0, 0.5);

    font-size: small;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;

    padding: 0.7rem;
    box-sizing: border-box;

    width: fit-content;

    border-radius: 0.5rem;

    margin-bottom: 0.5rem;

    svg {
      margin-left: auto;
      height: 0.8rem;
      aspect-ratio: 1;
    }
  }

  .flash-error {
    background: lightcoral;
  }

  .flash-success {
    background: lightgreen;
  }

  .flash-primary {
    background: lightgray;
  }
}

.section-border-top {
  @media(min-width: 85rem) {
    border-top: 1px solid #2B2B2B;
  }
}

#contact-section-wrapper {
  padding: 5rem 2rem;

  #contact-section {
    max-width: 40rem;
    margin: 0 auto;

    padding: 0 1rem;
    box-sizing: border-box;

    form {
      display: flex;
      flex-direction: column;
      align-items: center;
      --inputs-gap: 1.5rem;
      gap: var(--inputs-gap);

      margin-top: 1rem;

      .form-row {
        width: 100%;
        display: flex;
        gap: 0.5rem;

        @media(max-width: 30rem) {
          flex-direction: column;
          gap: var(--inputs-gap);
        }
      }

      .label-input-wrapper {
        width: 100%;
      }

      label,
      input {
        display: block;

        .required {
          color: red;
        }
      }

      label {
        font-weight: 500;
        margin-bottom: 0.5rem;
        text-indent: 0.25rem;
      }

      input:not([type="submit"]),
      textarea {
        width: 100%;

        padding: 0.7rem;
        box-sizing: border-box;

        font-size: small;

        border-radius: 0.5rem;
        border: 1px solid #aaa;
      }

      textarea {
        resize: vertical;
        height: 7rem;
      }

      input.big-button {
        font-size: medium;
        width: unset;
        padding: 0.5rem 1rem;
        margin: unset;
      }
    }
  }
}