:root {
  --header-logo-color: #f9faf8; /* Defines the logo color based on design guidelines */
  --header-hover-color: #f9faf8cc; /* Defines color when hovering over navbar's items */
  --hero-h1-font-size: 3rem; /* Defines the heading font size (48px) based on design guidelines */
  --hero-p-color: #e5e7eb; /* Sets the paragraph text color based on design guidelines */
  --hero-p-font-size: 1.125rem; /* Sets the paragraph font size (18px) based on design guidelines */
  --featprod-title-color: #1f2937; /*Feature products section title color based on design guidelines*/
  --featprod-title-font-size: 2.25rem; /*Feature products section title size (36px) based on design guidelines*/
  --button-color: #3882f6; /* Accent color used for buttons and backgrounds based on design guidelines */
  --button-hover-color: #2b6cb0; /* Accent color used when hovering over button */
}

/* Global styles */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Roboto", sans-serif;
  margin: 0 auto;
}

/*========== MOBILE FIRST ==========*/

/* HEADER */
.navbar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background-color: var(--featprod-title-color);
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
}

.nav-links {
  display: flex;
  list-style-type: none;
  margin-right: 0;
  padding: 0;
  justify-content: flex-end;
  gap: 1rem;
}

.nav-links a {
  color: var(--hero-p-color);
  text-decoration: none;
  font-size: var(--hero-p-font-size);
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--header-logo-color);
  margin-left: 0;
  padding: 0;
}

.navbar a:hover {
  color: var(--header-hover-color);
}

.logo a {
  color: inherit;
  text-decoration: none;
}
/* PRODUCTS */

h1 {
  background-color: var(--featprod-title-color);
  color: var(--header-logo-color);
  font-size: 3rem;
  text-align: center;
  margin: 0;
  padding-top: 1rem;
  overflow: hidden;
}

.products {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.product-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  padding: 4rem 1rem;
  overflow: hidden;
}

.product-container article.product-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  word-break: break-word;
  width: 100%;
  max-width: 600px;
  padding: 0 1rem;
}

.product-container h2 {
  font-size: 2rem;
  margin: 0;
  line-height: 1.2;
  font-weight: 800;
}

.product-container p {
  font-size: 1rem;
  width: 100%;
  line-height: 1.5;
}

.product-container:nth-child(odd) {
  background-color: var(--featprod-title-color);
}

.product-container:nth-child(odd) h2 {
  color: var(--header-logo-color);
}

.product-container:nth-child(odd) p {
  color: var(--hero-p-color);
}

.product-container:nth-child(even) {
  background-color: #ffffff;
  color: #000000;
}

.product-container button {
  display: inline-block;
  background-color: var(--button-color);
  color: var(--hero-p-color);
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  min-width: 120px;
  width: fit-content;
  border-radius: 0.25rem;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

.product-container button:hover,
.product-container button:focus {
  background-color: var(--button-hover-color);
}

.product-container img {
  width: 100%;
  max-width: 600px;
  min-width: 100px;
  border-radius: 0.5rem;
  object-fit: cover;
  height: auto;
}

/* FOOTER */
footer {
  background-color: var(--featprod-title-color);
  color: var(--hero-p-color);
  padding: 1rem;
  text-align: center;
}

footer a {
  color: var(--hero-p-color);
  text-decoration: none;
}

.top-button {
  display: inline-block;
  background-color: var(--button-color);
  color: var(--hero-p-color);
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  min-width: 120px;
  width: fit-content;
  border-radius: 0.25rem;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease;
  margin-top: 1rem;
}

.top-button:hover,
.top-button:focus {
  background-color: var(--button-hover-color);
}
.icons {
  margin-top: 2rem;
}
.icons img {
  width: 3rem;
  height: 3rem;
  color: var(--featprod-title-color);
  object-fit: cover;
  display: inline-block;
  margin-left: 1rem;
  margin-right: 1rem;
}

/*========== TABLET QUERY ==========*/
@media (min-width: 601px) and (max-width: 1024px) {
  /* PRODUCTS SECTION */
  h1 {
    font-size: 4rem;
  }

  .product-container h2 {
    font-size: var(--hero-h1-font-size);
  }

  .product-container p {
    font-size: var(--hero-p-font-size);
  }

  .product-container button {
    font-size: var(--hero-p-font-size);    
  }
/* HEADER */

  .navbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    color: var(--featprod-title-color);
  }

  .logo {
    margin-left: 10%;
    margin-bottom: 0;
  }

  .nav-links {
    flex-direction: row;
    gap: 2rem;
    margin-right: 10%;
  }
}

/*========== DESKTOP QUERY ==========*/
@media (min-width: 1025px) {
  /* PRODUCTS SECTION */
  h1 {
    font-size: 4rem;
  }

  .product-container {
    flex-direction: row;
    padding: 6rem 4rem;
    gap: 4rem;
  }

  .product-container article.product-header {
    text-align: left;
    align-items: flex-start;
    word-break: normal;
  }

  .product-container h2 {
    font-size: var(--hero-h1-font-size);
  }

  .product-container p {
    font-size: var(--hero-p-font-size);
  }

  .product-container button {
    font-size: var(--hero-p-font-size);
  }

  .product-container:nth-child(even) picture {
    order: -1;
  }
  /* HEADER */
  .navbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0;
  }

  .logo {
    margin-left: 7%;
    margin-bottom: 0;
  }

  .nav-links {
    flex-direction: row;
    gap: 2rem;
    margin-right: 7%;
  }
}
