Challenge Project: Responsive Club Website

https://www.codecademy.com/workspaces/6418bfe6de9de70ee06cff40

Hi there, Here is how I solved the CSS Challenge Project. Please have a look and help me to improve the code. Your suggestion is valuable. Many thanks for your precious time.

Best Regards.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>South Village Run Club</title>
    <link rel="stylesheet" href="styles.css" />
    <link rel="preconnect" href="https://fonts.googleapis.com" />
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
    <link
      href="https://fonts.googleapis.com/css2?family=Lexend+Mega:wght@400;500;600;700;800&family=Montserrat:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500;1,600;1,700;1,800&family=Nunito+Sans:wght@400;700&family=Poppins:wght@400;700&family=Potta+One&family=Rancho&family=Roboto:wght@400;500;700&family=Source+Code+Pro:wght@400;700&display=swap"
      rel="stylesheet"
    />
  </head>
  <body>
    <!-- HTML for Navigation Bar -->
    <header class="navbar">
      <div class="container">
        <a href="#events">Events</a>
      </div>

      <div class="container">
        <a href="#results">Results</a>
      </div>

      <div class="container">
        <a href="#partnering">Partnering Restaurants</a>
      </div>
    </header>

    <!-- HTML for Page Title -->
    <div class="page-title">
      <h1>South Village Run Club</h1>
    </div>

    <!-- Events - Meetup, Workout, Celebrate Section -->
    <div id="events" class="events">
      <h2>Meetup. Workout. Celebrate.</h2>
      <p>
        Come join our vibrant community whose focus is training hard and
        enjoying local post-workout cuisine - guilt-free! South Village
      </p>
      <p>
        Run Club is a free MeetUp group sponsored by <a href="#">City Shoes</a>.
      </p>
    </div>
    <div class="photos">
      <img
        src="https://static-assets.codecademy.com/Paths/front-end-career-path/responsive-club-website/tunnel-runners.jpg"
        alt=""
      />
      <img
        src="https://static-assets.codecademy.com/Paths/front-end-career-path/responsive-club-website/meetup-wine.jpg"
        alt=""
      />
      <img
        src="https://static-assets.codecademy.com/Paths/front-end-career-path/responsive-club-website/runners-grayscale.jpg"
        alt=""
      />
    </div>

    <!-- Results Section -->
    <div id="results" class="results">
      <h2>
        "I build my weeknight plans around their events. I can exercise and meet
        new people every week!"
      </h2>
      <p>-Bryce R. - financial advisor/frequent runner since 2018</p>
    </div>
    <div class="photos">
      <img
        src="https://static-assets.codecademy.com/Paths/front-end-career-path/responsive-club-website/coffeshop.jpg"
        alt=""
      />
      <img
        src="https://static-assets.codecademy.com/Paths/front-end-career-path/responsive-club-website/marathon-runners.jpg"
        alt=""
      />
      <img
        src="https://static-assets.codecademy.com/Paths/front-end-career-path/responsive-club-website/hangouts.jpg"
        alt=""
      />
    </div>

    <!-- JOIN - Partnering Restaurants Section -->
    <div id="partnering" class="join">
      <h2>Come join the fun!</h2>
      <img
        src="https://static-assets.codecademy.com/Paths/front-end-career-path/responsive-club-website/runners-church.jpg"
        alt=""
      />
      <h2>We meet every evening in the city square at 7PM!</h2>
    </div>

    <!-- HTML FOOTER similar to top navbar. -->
    <footer class="navbar">
      <a href="#events">Events</a>
      <a href="#results">Results</a>
      <a href="#partnering">Partnering Restaurants</a>
    </footer>
  </body>
</html>
  • {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: “Montserrat”, sans-serif;
    font-size: 16px;
    background-color: lightsalmon;
    }

/* CSS for NAVIGATION BAR */
header {
width: 100%;
background-color: teal;
}
.navbar {
background-color: teal;
padding: 1.35rem 0 0.5rem 4.4rem;
}
.container {
background-color: teal;
display: inline-block;
}
.navbar a {
background-color: teal;
text-decoration: none;
color: lightsalmon;
margin: 2rem;
transition: ease-in-out 0.3s;
}
.navbar a:hover {
text-decoration: underline;
font-weight: bold;
transition: ease-in-out 0.3s;
}

/* CSS fo Page Title */
.page-title {
height: 60vh;
}
.page-title h1 {
font-size: 2rem;
background: #01010180;
color: #ff7f50;
padding: 1rem;
text-align: center;
position: relative;
top: 45%;
}

/* CSS events section */
.events {
margin: 4rem 0;
padding: 0 1rem;
color: white;
}
.events h2 {
font-size: 2rem;
color: #ffff00;
margin: 1.25rem 0;
}
.events p {
margin: 1rem 0;
}
.photos {
display: flex;
justify-content: space-evenly;
padding: 2rem 0;
}
.photos img {
width: 30%;
}

/* Results Section CSS */
.results {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 30%;
background-color: #008080;
margin: 4em 0;
padding: 1em;
color: #ffff00;
}
.results h2 {
font-size: 2.5rem;
background-color: #008080;
padding: 1rem;
}
.results p {
background-color: #008080;
padding: 1rem;
}

/* JOIN - Partnering Restaurants Section */
.join {
display: flex;
flex-direction: column;
align-items: center;
}
.join h2 {
text-align: center;
color: #ffff00;
margin: 2rem;
font-size: 2rem;
}
.join img {
width: 50%;
}

/* Media Queries Screen Sizes */
@media only screen and (max-width: 768px) {
.page-title h1 {
font-size: 1.5rem;
}

.events h2,
.results h2,
.join h2 {
font-size: 1.25rem;
}

.photos {
flex-direction: column;
}

.photos img {
margin: 0.4em;
width: 100%;
}
}

@media only screen and (max-width: 640px) {
.page-title {
height: 10vh;
}
.navbar {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin: 0 auto;
padding: 1em;
width: 100%;
}
.navbar .container {
margin: 0.5em;
}
}