@import url("reset.css");

:root {
  --primary-color: #3498db;
  --secondary-color: #2ecc71;
  --background-color: #f2f2f7;
  --max-width: 1200px;
}

#nav-background {
  height: 20vh;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background-color: black;
}

.content-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
}

.top-spacing {
  margin-top: 3rem;
}

.download-appstore-badge {
  width: 200px;
}

.navigation {
  display: flex;

  li {
    margin: 0 0.5rem;
    font-size: 1.1rem;
    list-style-type: none;

    a {
      font-weight: 500;
      color: white;
      text-decoration: none;
    }
  }
}

nav {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background-color: black;

  #logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    font-size: 2rem;
    font-weight: 700;
    color: white;

    img {
      width: 60px;
    }
  }
}

main {
  width: 100%;
  padding: 10vh;
}

section {
  width: 100%;
  h2 {
    width: 70%;
    margin: auto;
    margin-bottom: 2rem;
    padding: 2rem;
    text-align: center;
  }
}

#home-section {
  margin-top: 10vh;
  height: 70vh;

  #home-section-container {
    width: 100%;
    min-height: 50%;
    display: flex;
    padding: 2rem;
    background-color: var(--background-color);
    border-radius: 32px;

    div {
      width: 60%;
      display: flex;
      flex-direction: column;
      align-items: start;
      gap: 2rem;

      p {
        width: 90%;
        font-size: 20px;
      }

      a {
        margin-top: auto;
      }
    }
  }

  #gymner-home-portrait {
    width: 40vh;
    position: absolute;
    top: -20vh;
    right: 0;
  }
}

#exercises-routines-section {
  text-align: center;

  img {
    width: 70%;
  }
}

#meals-section {
  text-align: center;

  img {
    width: 50%;
  }
}

#more-features-section {
  #features-container {
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 24px;

    .feature {
      flex: 1;
      padding: 1.5rem;
      background-color: var(--background-color);
      border-radius: 18px;

      .image-container {
        display: flex;
        align-items: center;
        width: 100px;
        height: 100px;
        margin: 0 auto 1.5rem;
        background-color: white;
        border-radius: 100%;

        img {
          width: 100%;
          padding: 1rem;
          object-fit: cover;
        }
      }
    }

    #icloud-feature {
      img {
        filter: brightness(0%);
      }
    }

    #dark-mode-feature {
      color: white;
      background-color: #2c2c2e;
    }
  }
}

footer {
  background-color: black;
  color: white;

  #footer-container {
    padding: 5rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;

    div {
      width: 100%;
      margin-top: 2rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
  }
}

/* Tablet devices (min-width: 768px) */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  nav {
    flex-direction: column;
    gap: 1rem;
  }

  main {
    padding: 1rem;
  }

  section {
    text-align: center;

    h2 {
      width: 100%;
    }
  }

  #home-section {
    margin-top: 1rem;
    height: auto;

    #home-section-container {
      min-height: auto;
      flex-direction: column-reverse;
      padding: 1rem;

      div {
        width: 100%;
        padding: 0;

        p {
          width: 100%;
          font-size: 1rem;
          text-align: left;
        }
      }
    }

    #gymner-home-portrait {
      position: relative;
      top: 0;
      width: 100%;
      height: 70svh;
      object-fit: contain;
    }
  }

  #exercises-routines-section,
  #meals-section {
    img {
      width: 100%;
    }
  }

  #more-features-section {
    #features-container {
      flex-direction: column;

      .feature {
        text-align: left;
      }
    }
  }

  footer {
    #footer-container {
      div {
        flex-direction: column-reverse;
        gap: 1rem;
      }
    }
  }
}
