@import './../../styles/variables/index.scss';
@import './../../styles/utils/index.scss';

.teamMembersContainer {
  margin: 0 auto;
  max-width: 1366px;
  display: flex;
  justify-content: flex-end;
  padding: 0 16px 80px;

  @media (min-width: 560px) {
    padding: 0 32px;
  }

  @media (min-width: 900px) {
    padding: 0 43px;
  }

  .container {
    display: flex;
    flex-wrap: wrap;
    gap: 0 14.5px;
    max-width: 1197px;

    @media (min-width: 560px) {
      gap: 0 30px;
    }

    @media (min-width: 900px) {
      gap: 0 41px;
    }
  }

  .teamMembercontainer {
    width: 100%;
    max-width: calc(50% - 14.5px);

    svg {
      @media (max-width: 899px) {
        width: 89px;
      }
    }

    @media (max-width: 559px) {
      &.teamMemberOdd {
        margin-top: -60px;
      }

      &.firstChild {
        margin-top: 0;
      }

      &:nth-child(1) {
        margin-top: 0;
      }

      &.teamMemberEven {
        margin-top: 60px;
      }

      &.teamMemberMobileMarginTop {
        margin-top: 120px;

        @media (min-width: 560px) {
          margin-top: 0;
        }
      }
    }
    @media (min-width: 560px) {
      max-width: calc(33.3% - 20px);
      margin-bottom: 60px;
    }

    @media (min-width: 900px) {
      max-width: calc(33.3% - 56px);
      margin-bottom: 81px;
    }

    .imgContainer {
      margin: 0 auto;
      position: relative;

      img {
        display: block;
        max-width: 342px;
        width: 100%;
        height: auto;
      }

      .overlay {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 100%;
        opacity: 0;
        transition: 0.5s ease;
        background-color: $medium-blue;
      }

      &:hover .overlay {
        opacity: 0.9;
      }

      .overlayContent {
        > div {
          color: $white;
          margin: 0 ruleOfThree(1366px, 100vw, 35px);
          @media (min-width: 1366px) {
            margin: 0 40px;
          }
        }

        .overlayQuestion {
          margin: ruleOfThree(1366px, 100vw, 35px)
            ruleOfThree(1366px, 100vw, 35px) 8px;
          color: $white;
          @media (min-width: 1366px) {
            margin: 52px 40px 8px;
          }
        }
        .overlayAnswer {
          font-size: ruleOfThree(1366px, 100vw, 24px);
          line-height: ruleOfThree(1366px, 100vw, 35px);
          @media (min-width: 1366px) {
            font-size: 24px;
            line-height: 35px;
          }
        }
      }
    }

    .modal {
      position: fixed;
      left: 0;
      top: 0;
      width: 100%;
      height: 100vh;
      z-index: 1111;
      background-color: rgba(39, 102, 196, 0.95);
      overflow: hidden;
      z-index: 11221;
      transform: translateY(-100%);

      .modalBtnClose {
        position: absolute;
        top: 20px;
        right: 20px;
        color: $white;
        background: transparent;
        border: 0;
        width: 32px;
        height: 32px;
        padding: 0;
        cursor: pointer;

        &::before,
        &::after {
          content: '';
          display: block;
          width: 24px;
          height: 2px;
          background: $white;
          position: absolute;
          top: 50%;
          left: 50%;
          transform-origin: center;
        }

        &::before {
          transform: translate(-50%, -50%) rotate(45deg);
        }

        &::after {
          transform: translate(-50%, -50%) rotate(-45deg);
        }
      }

      .modalContent {
        padding: 100px 32px;
        h4 {
          color: $white;
          margin-bottom: 52px;
        }
        > div {
          color: $white;
          margin-bottom: 20px;
        }
      }
    }

    .title {
      margin-top: 23px;
      margin-bottom: 4px;
      color: $main-blue;

      @media (max-width: 559px) {
        font-size: 14px;
        line-height: 20px;
      }

      @media (max-width: 899px) {
        font-size: 21px;
        line-height: 25px;
      }
    }

    .subTitle {
      margin-bottom: 16px;
      font-family: $font-family-atak-light;
      font-weight: 400;
    }

    .actionContainer {
      img {
        height: 23.96px;
        width: 23.27px;
        display: inline-block;
        vertical-align: middle;
        margin-right: -10px;
        margin-top: -3px;
      }
    }

    /* IMPROVE THIS CSS */
    &.teamMemberMarginLeft {
      @media (min-width: 900px) {
        margin-left: ruleOfThree(1112px, 100%, 80px);
      }
    }
  }
}
