:root {
  --linkedin-col: 1;
  --instagram-col: 2;
  --email-col: 3;
  --macro-col: 4;
}

footer {
  position: relative;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

.footer_container {
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), 1fr);
  gap: 1rem;
  padding-top: var(--padding-block);
  padding-bottom: var(--padding-block);
  padding-left: var(--padding-inline);
  padding-right: var(--padding-inline);
}

footer.black-theme {
  background-color: var(--white);
  color: var(--black) !important;
}

footer.white-theme {
  background-color: var(--black);
  color: var(--white) !important;
}

.footer_title {
  grid-column: 1 / span 2;
  grid-row: 1;
  align-self: center;
  margin-bottom: 0;
}

.email-icon {
  background-size: 50%;
  width: 100%;
  height: 100%;
  display: flex;
  background-repeat: no-repeat;
  background-position: center;
  justify-self: center;
}

.macro-icon {
  background-size: 50%;
  width: 100%;
  height: 100%;
  display: flex;
  background-repeat: no-repeat;
  background-position: center;
}

.black-theme .email-icon {
  background-image: url("/assets/ui/email_icon_black.svg");
}

.white-theme .email-icon {
  background-image: url("/assets/ui/email_icon_white.svg");
}

.black-theme .macro-icon {
  background-image: url("/assets/ui/macro_logo_black.svg");
}

.white-theme .macro-icon {
  background-image: url("/assets/ui/macro_logo_white.svg");
}

.horizontal_line {
  position: absolute;
  top: 60%;
  right: 0;
  width: 100vw;
  height: 2px;
}

.white-theme .horizontal_line {
  border-top: 0.125rem solid #fff;
  /* background-image: url("/assets/ui/footer_line_white.svg"); */
}

.black-theme .horizontal_line {
  border-top: 0.125rem solid #000;
  /* background-image: url("/assets/ui/footer_line_black.svg"); */
}

footer a {
  width: 74.5%;
  height: auto;
  aspect-ratio: 1;
  text-align: center;
  line-height: 3.5rem;
  font-size: 1.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  border: var(--line-width) solid #fff;
  z-index: 1;
  transition: 0.5s;
  color: inherit;
  text-decoration: none;
  justify-self: end;
}

a .icon {
  position: relative;
  transition: 0.5s;
  z-index: 3;
}

a.white-bg {
  background-color: #fff;
  border-color: #000;
}

a.white-bg .icon {
  color: #000;
}

a.white-bg:hover .email-icon {
  background-image: url("/assets/ui/email_icon_white.svg");
}

a.white-bg:hover .macro-icon {
  background-image: url("/assets/ui/macro_logo_white.svg");
}

a.white-bg:hover .icon {
  color: #fff;
  transform: rotateY(360deg);
}

a.white-bg:before {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  transition: 0.5s;
  z-index: 2;
}

a.white-bg:hover:before {
  top: 0;
}

a.black-bg {
  background-color: #000;
  border-color: #fff;
}

a.black-bg .icon {
  color: #fff;
}

a.black-bg:hover .icon {
  color: #000;
  transform: rotateY(360deg);
}

a.black-bg:hover .email-icon {
  background-image: url("/assets/ui/email_icon_black.svg");
}

a.black-bg:hover .macro-icon {
  background-image: url("/assets/ui/macro_logo_black.svg");
}

a.black-bg:before {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  transition: 0.5s;
  z-index: 2;
}

a.black-bg:hover:before {
  top: 0;
}

.footer_container a:nth-of-type(1) {
  grid-column: var(--linkedin-col) / span 1;
  justify-self: start;
}

.footer_container a:nth-of-type(2) {
  grid-column: var(--instagram-col) / span 1;
  justify-self: center;
}

.footer_container a:nth-of-type(3) {
  grid-column: var(--email-col) / span 1;
  justify-self: center;
}

.footer_container a:nth-of-type(4) {
  grid-column: var(--macro-col) / span 1;
  justify-self: end;
}


@media (min-width: 768px) {
  :root {
    --linkedin-col: 5;
    --instagram-col: 6;
    --email-col: 7;
    --macro-col: 8;
  }

  .footer_title {
    grid-column: 1 / span 2;
  }

  .horizontal_line {
    width: 73vw;
  }
}

@media (min-width: 1024px) {
  :root {
    --linkedin-col: 9;
    --instagram-col: 10;
    --email-col: 11;
    --macro-col: 12;
  }

  footer a {
    line-height: 4.5rem;
    font-size: 2.25rem;
    width: 56%;
  }

  .horizontal_line {
    width: 87vw;
    top: 50%;
  }

  .footer_container a:nth-of-type(1), 
  .footer_container a:nth-of-type(2),
  .footer_container a:nth-of-type(3),
  .footer_container a:nth-of-type(4){
    justify-self: end !important;
  }

}

@media (min-width: 2500px) {
  :root {
    --linkedin-col: 13;
    --instagram-col: 14;
    --email-col: 15;
    --macro-col: 16;
  }
  .horizontal_line {
    width: 91vw;
  }
}
@media (min-width: 3840px) {
  :root {
    --linkedin-col: 17;
    --instagram-col: 18;
    --email-col: 19;
    --macro-col: 20;
  }
}
@media (min-width: 5120px) {
  :root {
    --linkedin-col: 21;
    --instagram-col: 22;
    --email-col: 23;
    --macro-col: 24;
  }
}
