/* 
* Header CSS
* This file contains styles for the website header
*/

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background-color: rgba(0, 0, 0, 0.9);
  color: #fff;
  z-index: 1000;
  transition: all 0.3s ease;

  .headerContainer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 32px;
    max-width: 1200px;
    margin: 0 auto;
  }

  .logoContainer {
    a {
      display: block;
    }

    h1 {
      font-size: 2.4rem;
      font-weight: 700;
      letter-spacing: 1px;
      text-transform: uppercase;

      span {
        font-weight: 300;
        color: #00a0e9;
      }
    }
  }

  .mainNav {
    ul {
      display: flex;
      gap: 32px;

      li {
        a {
          position: relative;
          font-size: 1.6rem;
          font-weight: 400;
          transition: color 0.3s ease;
          padding: 8px 0;

          &::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 0;
            height: 2px;
            background-color: #00a0e9;
            transition: width 0.3s ease;
          }

          &:hover {
            color: #00a0e9;

            &::after {
              width: 100%;
            }
          }
        }
      }
    }
  }

  .hamburgerMenu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 20px;
    cursor: pointer;

    span {
      display: block;
      width: 100%;
      height: 2px;
      background-color: #fff;
      transition: all 0.3s ease;
    }

    &.active {
      span {
        &:nth-child(1) {
          transform: translateY(9px) rotate(45deg);
        }

        &:nth-child(2) {
          opacity: 0;
        }

        &:nth-child(3) {
          transform: translateY(-9px) rotate(-45deg);
        }
      }
    }
  }
}

/* Header scroll state */
.header.scrolled {
  height: 64px;
  background-color: rgba(0, 0, 0, 1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Media Queries */
@media (max-width: 768px) {
  .header {
    height: 64px;

    .headerContainer {
      padding: 0 16px;
    }

    .mainNav {
      position: fixed;
      top: 64px;
      left: 0;
      width: 100%;
      height: 0;
      background-color: rgba(0, 0, 0, 0.95);
      overflow: hidden;
      transition: height 0.3s ease;

      &.active {
        height: calc(100vh - 64px);
      }

      ul {
        flex-direction: column;
        align-items: center;
        padding: 32px 0;
        gap: 24px;

        li {
          a {
            font-size: 1.8rem;
          }
        }
      }
    }

    .hamburgerMenu {
      display: flex;
    }
  }
}