body,
html {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Roboto", sans-serif;

  background: var(--body-background-color);
  color: var(--text-color);

  overflow-x: hidden;
}

body {
  opacity: 0;
  -webkit-animation: body-appear 1s forwards;
  animation: body-appear 1s forwards;
}

@-webkit-keyframes body-appear {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes body-appear {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

:root {
  --h1-font-size: clamp(1.8rem, 2.5vw, 2.5rem);
  --h2-font-size: clamp(1.1rem, 2vw, 1.5rem);
  --p-font-size: clamp(0.9rem, 1.8vw, 1.2rem);
  --header-background-color: rgba(57, 57, 57);
  --body-background-color: rgb(57, 57, 57);
  --text-color: rgb(231, 231, 231);
}

img {
  max-width: 100%;
}

header {
  background-color: var(--header-background-color);
  width: 100vw;
  height: 3rem;

  position: fixed;

  padding-bottom: 5rem;

  z-index: 1000;
}

.headline-container {
  display: flex;

  align-items: center;
  justify-content: center;
}

.headline {
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0;
  font-size: var(--h1-font-size);
}

.links-container {
  position: fixed;
  top: 6rem;
  right: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  background-color: rgba(57, 57, 57, 0.3);
  gap: 2rem;

  z-index: 1000;

  transform: translateX(100%);

  transition: all 0.4s ease-in-out;
}

.links-container > * {
  border: none;
  background-color: transparent;
  font-size: clamp(0.8rem, 2vw, 2rem);
}

.menu-btn a {
  text-decoration: none;
  color: rgb(231, 225, 225);
  font-weight: 400;
  font-size: var(--h1-font-size);

  transition: 0.4s;
}

.menu-btn a:hover {
  color: rgb(230, 81, 17);
}

.active-pg a {
  text-decoration: underline;
  color: #429baafe;
}

.active-pg a:hover {
  color: #429baafe;
}

.active-pg a:visited {
  color: #429baafe;
}

/* --------------------------------------------Logo */
.new-logo {
  max-width: 100px;
  z-index: 1000;
}

@-webkit-keyframes logo-rotate {
  from {
    rotate: (0);
  }
  to {
    rotate: 360deg;
  }
}

@keyframes logo-rotate {
  from {
    rotate: (0);
  }
  to {
    rotate: 360deg;
  }
}

.flip-it {
  /* transform: scaleX(-1); */
  display: inline-block;
  /* color: red; */
  -webkit-animation: flip-it 500ms forwards 3s;
  animation: flip-it 500ms forwards 3s;
}

@-webkit-keyframes flip-it {
  0% {
  }
  50% {
    display: inline-block;
    color: red;
    text-transform: uppercase;
    transform: translateY(-5px) scaleX(0);
  }
  100% {
    display: inline-block;
    color: red;
    text-transform: uppercase;
    transform: translateY(0) scaleX(-1);
  }
}

@keyframes flip-it {
  0% {
  }
  50% {
    display: inline-block;
    color: red;
    text-transform: uppercase;
    transform: translateY(-5px) scaleX(0);
  }
  100% {
    display: inline-block;
    color: red;
    text-transform: uppercase;
    transform: translateY(0) scaleX(-1);
  }
}

/* -------------------------Open menu, close menu */
.menu-btn-fa {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 1rem;
  margin-top: 15px;

  font-size: 1.2rem;

  background-color: transparent;
  border: none;
  color: rgb(231, 225, 225);

  transition: all 0.4s ease-in-out;
  -webkit-animation: move-btn 2s linear alternate infinite;
  animation: move-btn 2s linear alternate infinite;
}

@-webkit-keyframes move-btn {
  from {
    transform: translate(5px, 5px);
    color: pink;
  }
  to {
    transform: translate(-5px, -5px);
    color: beige;
  }
}

@keyframes move-btn {
  from {
    transform: translate(5px, 5px);
    color: pink;
  }
  to {
    transform: translate(-5px, -5px);
    color: beige;
  }
}

.close-menu-btn {
  display: none;
}

/* ------------------------------- Main ------------------------------------------------------------------- */

.portfolio-main {
  padding-top: 8rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.main-header {
  opacity: 0;
  -webkit-animation: main-header-appear 1s both;
  animation: main-header-appear 1s both;
}

/* WordPress link */

.wp-link {
  color: wheat;
  font-size: var(--p-font-size);
}

a.wp-link:visited {
  color: wheat;
}

a.wp-link:hover {
  color: #00bfff; /* bright blue */
  cursor: pointer;
}

.main-header h2 {
  font-size: var(--h1-font-size);
  text-align: center;
  padding: 0, 1rem;
}

@-webkit-keyframes main-header-appear {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes main-header-appear {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.main-header h4 {
  text-align: left;
  font-size: var(--h2-font-size);
  margin-right: 2rem;
  margin-left: 2rem;
}

/* Cards */

.cards-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  gap: 1rem;
}

.card {
  border-radius: 15px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 2rem 2rem 0 2rem;

  position: relative;

  transition: all 0.4s;

  scale: 0.5;
}

.show-card {
  scale: 1;
}

.card::before {
  content: "";
  width: 80%;
  height: 1px;
  position: absolute;
  background: linear-gradient(90deg, red, rgb(57, 57, 57));
  border-radius: 50%;
  bottom: 0;
  left: 0;
}

.card-text {
  display: flex;
  flex-direction: column;
}

.card-header {
  font-size: var(--h1-font-size);
  text-align: center;
  text-shadow: -2px 2px 2px black;

  transition: color 2s, transform 1s;
  transform: translateY(100px);
  color: lightblue;
}

.show-card-header {
  transform: translateY(0);
  color: white;
  text-shadow: -4px 4px 4px black;
}

.project-button {
  cursor: pointer;
  background-color: var(--body-background-color);
  color: var(--text-color);

  border: 0.2px solid;
  border-radius: 8px;
  padding: 0.3rem 0.5rem;
  margin-bottom: 0.3rem;

  transform: translate(50px, 50px);

  transition: all 1s;
}

.project-button:hover {
  background-color: var(--text-color);
  color: var(--body-background-color);
}

.show-button {
  transform: translate(0, 0);
}

.btn-arrow {
  color: rgb(191, 134, 245);
  font-size: 1rem;

  -webkit-animation: colorArrow 0.5s alternate infinite;

  animation: colorArrow 0.5s alternate infinite;
}

@-webkit-keyframes colorArrow {
  from {
    color: rgb(191, 134, 245);
  }
  to {
    color: rgb(106, 172, 9);
  }
}

@keyframes colorArrow {
  from {
    color: rgb(191, 134, 245);
  }
  to {
    color: rgb(106, 172, 9);
  }
}

.card-description {
  text-align: left;
  padding: 0 1rem 0 1rem;
  border: 1px solid;
  border-radius: 8px;
  border-color: rgba(245, 222, 179, 0.374);
  padding: 1rem 2rem;

  margin-right: 1rem;
  text-shadow: -2px 2px 2px black;
  font-size: var(--p-font-size);
  max-width: 800px;
  height: 100px;
  overflow-y: auto;

  z-index: 1;

  transform: translateX(100%);
  transition: transform 0.9s ease-in-out;
  will-change: transform;
  -webkit-transform: translateX(100%);
}

.show-card-description {
  transform: translateX(0);
  -webkit-transform: translateX(0);
}

.card-img {
  width: 80%;
  margin-bottom: 2rem;
  border-radius: 15px;

  transform: scale(0);

  transition: all 0.8s;
}

.card-show-img {
  transform: scale(1);
}

/*  ------------------------------- Footer ---------------------------------------------------------------- */

footer {
  font-size: clamp(0.7rem, 1vw, 0.8rem);
  margin-left: auto;
  transform: translateY(0);
  display: flex;
  justify-content: flex-end;
  margin-right: 1rem;
}

/* ----------------------- Breakpoints -------------------------------------------- */
@media (min-width: 576px) {
  .menu-btn-fa {
    display: none;
  }

  .links-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;

    gap: 2rem;

    margin-left: auto;
    margin-right: auto;
    margin-top: -2px;

    padding-top: 2rem;
    padding-bottom: 1rem;

    transform: translateX(0%);
  }

  header {
    height: -webkit-fit-content;
    height: -moz-fit-content;
    height: fit-content;
  }
  .main-header {
    margin-top: 200px;
  }

  /* Cards */
  .shopping-list {
    margin-top: 4rem;
  }

  .card-img {
    max-width: 30%;
    /* margin-bottom: 2rem; */
    margin-top: 2rem;
    margin-left: 10%;
    border-radius: 15px;
  }
  .card {
    flex-direction: row;
  }

  .card-text {
    align-items: flex-start;
    max-width: 40%;
  }
  
    .new-logo {
    margin-left: 3rem;
    margin-right: -5rem;
  }
}
