@media screen and (max-width: 869px) {
  #nav-wide {
    display: none;
  }
    /* Style the navigation menu */
  .topnav {
    overflow: hidden;
    background-color: #333;
    position: relative;
  }

  /* Hide the links inside the navigation menu (except for logo/home) */
  .topnav #narrowMenu {
    display: none;
  }

  /* Style navigation menu links */
  .topnav a {
    color: white;
    padding: 14px 46px;
    text-decoration: none;
    font-size: 20px;
    display: block;
  }

  /* Style the hamburger menu */
  .topnav a.icon {
    background: black;
    display: block;
    position: absolute;
    right: 0;
    top: 0;
  }

  /* Add a grey background color on mouse-over */
  .topnav a:hover {
    background-color: #ddd;
    color: black;
  }

  /* Style the active link (or home/logo) */
  .active {
    background-color: rgba(156, 18, 23, 0.85);
    color: white;
  }
}


* {
  margin: 0;
  padding: 0;
}

body {
  background-color: white;
  font-family: 'Raleway', sans-serif;
  /*font-family: 'Inter', serif;*/
}

header {
  position: relative;
  background-color: white;
}

@media screen and (min-width: 870px) {
  #nav-narrow {
    display: none;
  }

  header > nav {
    width: 100%;
    display: flex;
    max-height: 200px;
  }

  #logo {
    line-height: 60px;
    font-size: 30px;
    padding-right: 4%;
    padding-top: 1%;
    margin-left: 15%;
    color: white;
    width: 40%;
    letter-spacing: 2px;
    text-shadow: 2px 2px 5px;
  }

  header > nav > ul {
    margin: 0;
    padding: 40px 0 0 0;
    list-style-type: none;
    display: flex;
    position: relative;
    right: 15%;
  }

  header > nav > ul > li {
    line-height: 60px;
    margin: 0;
    padding: 0;
    text-align: center;
    display: inline-block;
    min-width: 20px;
    font-weight: 800;

  } 

  header > nav > ul > li > a {
    position: relative;
    margin: 0 15px;
      color: black;
  }

  header > nav > ul > li:hover {
    background-color: none;
  }

  header > nav > ul > li > div {
    position: absolute;
    padding: 0 10px;
    
    background-color: black;
    display:none;
    background-color: aliceblue;
    min-width: 100px;
  }

  header > nav > ul > li > div > ul {
    margin: 0px 0 10px 0;
    padding: 0;
    list-style: none;
  }

  header > nav > ul > li> div > ul > li:hover {
    background-color: rgba(0,0,0,0.2);
  }

  header > nav > ul > li > div > ul > li > a {
    padding: 5px;
      color: black;
  }
}

footer {
  color: white;
  background: linear-gradient(to right, #B4B4B4, #000000);
}

footer > nav {
  display: flex;
}

footer > nav > ul {
  margin: 0;
  padding: 20px 0px 0 0;
  display: flex;
  position: relative;
}

.footer-column {
  padding: 0 20px;
  min-width: 150px;
}

.footer-column ul {
  list-style-type: none;
  color: #C1C1FB;
}

.footer-column a {
  color: #C1C1FB;
}

a {
  text-decoration: none;
}

footer > nav > ul > li {
  line-height: 30px;
  margin: 0;
  padding: 0;
  text-align: center;
  display: inline-block;
} 

#footer-logo {
  margin-right: auto;
}

#footer-logo img {
  min-height: 80px;
  min-width: 80px;
  max-height: 100px;
  max-width: 100px;
  padding: 20% 0 40% 15%;
}


.gradient-button {
  color: white;
  border: none;
  padding: 12px;
  border-radius: 5px;
  cursor: pointer;
  background-size: 300% 100%;
  background-image: linear-gradient(to right, #666666, #000000, #000000, #666666);
  transition: background-position 0.4s ease;
}

.gradient-button:hover {
  background-position: 100% 0
}

#main-h1 {
  font-size: 2.7em;
}

#main-p {
  font-size: 1.1em;
}

#main-button {
  padding: 18px 25px;
  font-size: 1.1em;
}

#main-image {
  text-align: center;
  place-items: center;
  place-content: center;
  background: 
    linear-gradient(rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.3)),
    url("main-image.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  min-height: 400px;
}

#main-image-text {
  /*font-family: 'Inter', serif;*/
  margin-top: 60px;
}

#main-image p {
  padding: 10px 0 25px 0;
  margin: 0 auto;
  max-width: 70%;
}

#product-h2 {
  margin: 15px 0 0 0;
  font-size: 2.0em;
}

#product-section {
  text-align: center;
  place-items: center;
  place-content: center;
  margin-top: 30px;
}

#product-list {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    padding: 30px 0 60px 0;
    list-style: none;
}

#product-list li {
    margin: 0 auto;
    flex: 1 1 calc(25% - 10px);
    max-width: calc(25% - 10px);
    padding: 0;
    text-align: center;
    border-radius: 5px;
}

.product {
  position: relative;
  height: 250px;
  min-width: 25%;
  border-radius: 5px;
  max-width: 325px;
  margin:auto;
}

.product:hover .overlay {
  height: 50%;
}

.product img {
  height: 100%;
  width: auto;
  max-width: 100%;
  border-radius: 5px;
}

#product-test {
  background: no-repeat center/contain url("product3.jpg");
  border-radius: 5px;
}

.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(156, 18, 23, 0.85);
  overflow: hidden;
  width: 100%;
  height: 25%;
  transition: .4s ease;
  border-radius: 5px;
}

.text {
  color: white;
  padding-top: 5%;
  font-weight: 600;
  font-size: 1.2em;
}

#about-image {
  text-align: center;
  place-items: center;
  place-content: center;
  background: 
    linear-gradient(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 1)),
    no-repeat center/cover url("building.jpg");
  min-height: 330px;
}

#about-h1 {
  font-size: 3em;
  margin-top: 12%;
  font-weight: 500;
}

#quality-container {  /* differs from Maya's version */
  text-align: center;
  place-items: center;
  place-content: center;
}

#quality-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 30px 40px;
    list-style: none;
}

#quality-list li {
    margin: 0 auto;
    flex: 1 1 calc(25% - 10px);
    max-width: calc(25% - 10px);
    padding: 0;
    text-align: center;
}

.quality h4 {
  font-size: 1.2em;
}

.quality p {
  font-size: 1.1em;
  margin: 10px 0;
}

#about-container {
  max-width: 800px;
  margin: auto;
  margin-top: 30px;
  padding: 25px 20px;
  font-size: 1.2em;
}

#about-container p {
  padding-bottom: 0.4em;
}

#news-section {
  text-align: center;
  place-items: center;
  place-content: center;
  margin: 30px 0;
  border-top: 4px solid #9C1217;
}

#news-h2 {
  margin: 30px 0;
  font-size: 2.0em;
}

.news-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 0;
    max-width: 800px;
    text-align: center;
}

.news-item {
    background: white;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 2px solid black;
}

.news-item:nth-child(1),
.news-item:nth-child(2) {
    border-top: 0;
}


.news-item:nth-child(odd) {
    text-align: left;
    border-right: 2px solid black;
}

.news-item:nth-child(even) {
    text-align: right;
}


.news-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
}

.news-item a {
  color: black;
}

.news-item-image {
  display: grid;
}

.news-item-image:nth-child(odd) {
  justify-self: start;
}

.news-item-image:nth-child(even) {
  justify-self: end;
}

.map-container {
  position: relative;
}

.map-overlay {
  content: " ";
  z-index: 10;
  display: block;
  position: absolute;
  height: 100%;
  width: 35%;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(193, 193, 251, 0.80);
  text-align: left;
}

.map-overlay h2 {
  padding: 50px 30px 20px 10%;
}

.map-overlay p {
  padding: 10px 30px 10px 10%;
}

.popup {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.popup-content {
  background: #fff;
  padding: 20px;
  border-radius: 5px;
  text-align: center;
  z-index: 1001;
  max-height: 100%;
  min-width: 450px;
}

.openPopup {
  color: white;
  border: none;
  padding: 12px;
  border-radius: 5px;
  cursor: pointer;
  background-size: 300% 100%;
  background-image: linear-gradient(to right, #666666, #000000, #000000, #666666);
  transition: background-position 0.4s ease;
}

.closePopup {
  margin-top: 10px;
  padding: 5px 10px;
  background-color: #dc3545;
  color: #fff;
  border: none;
  border-radius: 3px;
}

.openPopup:hover {
  background-position: 100% 0
}

/* styles for the categories */

#main-image-category {
  text-align: center;
  place-items: center;
  place-content: center;
  background: 
    linear-gradient(rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.3)),
    url("product-category1.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  min-height: 400px;
}


#main-h1-category {
  font-size: 2.0em;
  padding: 40px 0;
}

#main-image-category p {
  padding: 10px 0 25px 0;
  margin: 0 auto;
  max-width: 70%;
}

#product-info {
  padding: 60px 0;
  justify-items: center;
}

#product-info p {
  padding: 10px 10%;
  font-size: 1.2em;
  max-width: 900px;
}

input[type=text], select, textarea {
  width: 100%;
  padding: 12px; 
  border: 1px solid #ccc;
  border-radius: 4px; 
  box-sizing: border-box;
  margin-top: 6px; 
  margin-bottom: 16px; 
  resize: vertical 
}

input[type=submit] {
  background-color: #333;
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

input[type=submit]:hover {
  background-color: rgba(156, 18, 23, 1);
}

label {
  display: block;
}

form {
  max-height: 500px; 
  overflow-y: auto; 
  padding-right: 15px; 
}

form p {
  font-weight: 100;
}

@media screen and (max-width: 869px) {
  .map-overlay {
    position: inherit;
    width: inherit;
    padding-bottom: 10px;
  }
}