@use "../variables" as *;

.footerContainer {
  width: 100%;
  font-size: 0.875rem;
  color: $footerContColor;
  padding: 2rem 0;

  .container {
    width: $containerWidth;
    margin: 0 auto;
    padding: 0 1rem;
  }

  .footerContent {
    @extend .container;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid $footerLineColor;

    .logoSection {
      display: flex;
      align-items: center;
      gap: 1rem;

      img {
        height: 60px;
      }

      address {
        font-style: normal;
        color: $footerAddressColor;
        line-height: 1.6;
      }
    }

    .socialIcons {
      display: flex;
      gap: 1rem;

      a {
        color: $footerSocialLinkColor;
        font-size: 1.5rem;
        transition: color 0.3s;

        &:hover {
          color: $footerSocialLinkHoverColor;
        }
      }
    }

    @media (max-width: 1240px) and (min-width: 768px) {
      flex-direction: column;
      gap: 1.5rem;
      text-align: center;
      padding-bottom: 1.5rem;

      .logoSection {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;

        img {
          height: 55px;
        }

        address {
          margin-top: 0;
          text-align: right;
          flex-grow: 1;
        }
      }

      .socialIcons {
        justify-content: center;
      }
    }

    @media (max-width: 768px) {
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 1rem;
      padding-bottom: 1rem;

      .logoSection {
        flex-direction: column;
        align-items: center;

        img {
          height: 50px;
        }

        address {
          margin-top: 0.5rem;
        }
      }

      .socialIcons {
        justify-content: center;
      }
    }

    @media (max-width: 480px) {
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 1rem;
      padding-bottom: 1rem;

      .logoSection {
        flex-direction: column;
        align-items: center;

        img {
          height: 40px;
        }

        address {
          margin-top: 0.5rem;
          text-align: center;
        }
      }

      .socialIcons {
        justify-content: center;
      }
    }
  }

  .footerBottom {
    @extend .container;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    text-align: center;
    gap: 1rem;

    @media (min-width: 1240px) {
      flex-direction: row;
      text-align: left;

      .bottomLinks {
        order: 3;
        display: flex;
        gap: 1rem;
        list-style: none;
        padding: 0;
        margin: 0;

        li a {
          text-decoration: none;
          color: $footerBottomItemColor;
          transition: color 0.3s;

          &:hover {
            color: $footerBottomItemHoverColor;
          }
        }
      }

      .developerCredit {
        order: 2;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        justify-content: center;

        img {
          height: 20px;
        }

        span {
          font-size: 0.875rem;
          color: $footerBottomCreditColor;
        }
      }

      .copyright {
        order: 1;
        font-size: 0.875rem;
        color: $footerBottomCopyrightColor;
      }
    }

    @media (max-width: 1240px) {
      flex-direction: column;
      gap: 1rem;

      .bottomLinks {
        display: flex;
        gap: 1rem;
        list-style: none;
        padding: 0;
        margin: 0;

        li a {
          text-decoration: none;
          color: $footerBottomItemColor;
          transition: color 0.3s;

          &:hover {
            color: $footerBottomItemHoverColor;
          }
        }
      }

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

        img {
          height: 18px;
        }

        span {
          font-size: 0.75rem;
          color: $footerBottomCreditColor;
        }
      }
    }
  }
}
