/* ****************** Header Styling ************************************** */

/* it both cols in first row */
.header {
  grid-column: 1/-1;
}

.header-info {
  position: relative;
  background: linear-gradient(to right, #adff2f, #87ceeb);
  text-align: center;
  padding: 1rem 1rem;
}

.header-info-hidden {
  display: none;
}

.header-info p {
  color: black;
  font-size: 1em;
}

.header-info p a {
  color: inherit;
  font-size: 0.85em;
}

.header-info p a:hover {
  color: rgb(62, 60, 60);
}

.header-info button {
  position: absolute;
  top: 13px;
  right: 1rem;
  font-size: 20px;
  color: black;
  cursor: pointer;
  border: none;
  background-color: transparent;
  transition: background-color 0.3s ease-in;
  padding-left: 0.3rem;
  padding-right: 0.3rem;
  padding-bottom: 2px;
  border-radius: 40%;
}

.header-info button:hover {
  background-color: rgb(245, 244, 244);
}

nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 3rem 1rem 3rem;
  box-shadow: 1px 1px;
}

.ingreedy {
  font-family: "Pacifico", cursive;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.logo-link {
  text-decoration: none;
  color: inherit;
}

.logo-link:hover {
  color: #ff8c00;
  text-shadow: 0 0 6px rgba(80, 34, 195, 0.3), 0 0 12px rgba(80, 34, 195, 0.3);
}

.nav-logo-cat-input {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dropdown select {
  background-color: transparent;
  outline: none; /* Remove the outline */
  border: none; /* Remove the default border */
  padding: 0.3rem;
  border-radius: 10px; /* Optional: to match your design */
  cursor: pointer;
}

.search {
  width: 500px;
  padding: 0.3rem 0.3rem;
  outline: none;
  border: 1.1px solid black;
  border-radius: 10px;
  background-color: #f7f7f7;
  font-size: medium;
}

.search:focus {
  /* border: 1.5px solid #5022c3 !important; */
  border: 1.5px solid #d89a4e !important;
}

.search::placeholder {
  color: grey;
  opacity: 0.8;
  font-weight: 200;
  font-size: small;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1em;
}

.nav-link {
  font-weight: bold;
  color: inherit;
  text-decoration: none;
  font-size: inherit;
}

/*********************************************** Modal window styling for nav links *******************************/

.modal-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background: linear-gradient(to right, #87ceeb, #adff2f);
  border: 0.2px solid black;
  z-index: 1000;
  padding: 1rem;
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 80vh;
  max-width: 90%;
  min-height: 200px;
  min-width: 500px;
  width: auto;
  border-radius: 4px;
  overflow-y: auto;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.hidden {
  display: none;
}

/***************************** modal-window/seasonal *************************8*/

.modal-card-header {
  display: flex;
  flex-direction: column;
  margin: 1rem 1rem 0rem 2rem;
  text-align: center;
}

.modal-card-header span {
  font-size: 1.5rem;
  font-weight: 600;
  color: #ff5733;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.5px;
}

.close-modal-card {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 0.4rem 0.4rem;
  font-size: 20px;
  background-color: whitesmoke;
  border: none;
  cursor: pointer;
  transition: background-color 0.7s ease-in-out;
  padding: 0.3rem 0.4rem;
  border-radius: 50%;
}

.close-modal-card:hover {
  font-size: 20px;
  /* background-color: rgb(215, 229, 234); */
  background-color: #f1b1a2;
}

.modal-card p {
  font-size: 1em;
  padding: 0.8rem 1rem 0.8rem 1rem;
  margin-left: -1rem;
  margin-right: -1rem;
}

.modal-card p:not(:last-child) {
  font-size: 1em;
  border-bottom: 0.5px solid black;
}

.modal-card p a {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
  color: #002366;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.modal-card p a:hover {
  color: #ffffff;
  background-color: #ff5733;
  text-decoration: none;
  transform: scale(1.05);
}

/*************************************** modal-window/Ingredients *************************/

.ingredients-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 1rem;
}

.ingredients-links p:nth-child(2n) {
  padding-left: 5rem;
}

/* Target all items in the last row */
.ingredients-links p:nth-last-child(-n + 2) {
  border-bottom: none;
}

/***************************************** modal-window/Seasonal-recipes **********************/
.seasonal-modal {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin-left: -1rem;
  margin-right: -1rem;
}

/************************************** Media queries  ***********************************/

@media screen and (max-width: 1170px) and (min-width: 950px) {
  nav {
    padding: 1rem 1rem 1rem 1rem;
  }

  .nav-logo-cat-input {
    gap: 0.5rem;
  }

  .nav-links {
    gap: 0.4rem;
    font-size: 0.9em;
  }

  .search {
    width: 400px;
    padding: 0.3rem 0.3rem;
  }
}

@media screen and (max-width: 950px) and (min-width: 800px) {
  nav {
    padding: 1rem 1rem 1rem 0.7rem;
  }

  .nav-logo-cat-input {
    gap: 0.4rem;
  }

  .nav-links {
    gap: 0.3rem;
    font-size: 0.8em;
  }

  .search {
    width: 300px;
    padding: 0.2rem 0.2rem;
  }
}

@media screen and (max-width: 800px) and (min-width: 650px) {
  nav {
    padding: 1rem 0.5rem 1rem 0.5rem;
  }

  .nav-logo-cat-input {
    gap: 0.2rem;
  }

  .nav-links {
    gap: 0.2rem;
    font-size: 0.75em;
  }

  .search {
    width: 200px;
    padding: 0.1rem 0.3rem 0.1rem 0.3rem;
  }

  .ingreedy {
    font-size: 0.8em;
  }

  .dropdown select {
    font-size: 0.75em;
  }
}

@media screen and (max-width: 650px) {
  nav {
    padding: 0.7rem 0.3rem 1rem 0.3rem;
  }

  .nav-logo-cat-input {
    gap: 0.1rem;
  }

  .nav-links {
    gap: 0.1rem;
    font-size: 0.65em;
  }

  .search {
    width: 180px;
    padding: 0.1rem 0.3rem 0.1rem 0.3rem;
  }

  .ingreedy {
    font-size: 0.75em;
  }

  .dropdown select {
    font-size: 0.65em;
  }
}

@media screen and (max-width: 560px) and (min-width: 450px) {
  nav {
    padding: 0.7rem 0.2rem 1rem 0.2rem;
  }

  .nav-logo-cat-input {
    gap: 0.3rem;
  }

  .nav-links {
    gap: 0.1rem;
    font-size: 0.65em;
  }

  .search {
    width: 160px;
    padding: 0.1rem 0.3rem 0.1rem 0.3rem;
  }

  .search::placeholder {
    color: grey;
    font-weight: 200;
    font-size: x-small;
  }

  .ingreedy {
    font-size: 0.7em;
  }

  .dropdown select {
    display: none;
  }
}

@media screen and (max-width: 450px) {
  nav {
    padding: 0.7rem 0.2rem 1rem 0.2rem;
  }

  .nav-logo-cat-input {
    gap: 0.3rem;
  }

  .nav-links {
    gap: 0.1rem;
    font-size: 0.65em;
  }

  .search {
    width: 160px;
    padding: 0.1rem 0.3rem 0.1rem 0.3rem;
  }

  .search::placeholder {
    color: grey;
    font-weight: 300;
    font-size: x-small;
  }

  .ingreedy {
    font-size: 0.7em;
  }

  .dropdown select {
    display: none;
  }

  .nav-ingredients {
    display: none;
  }
}

@media screen and (max-width: 380px) {
  nav {
    padding: 0.7rem 0.2rem 1rem 0.23rem;
  }

  .nav-logo-cat-input {
    gap: 0.2rem;
  }

  .nav-links {
    gap: 0.1rem;
    font-size: 0.6em;
  }

  .search {
    width: 140px;
    padding: 0.1rem 0.3rem 0.1rem 0.3rem;
  }

  .ingreedy {
    font-size: 0.6em;
  }

  .dropdown select {
    display: none;
  }

  .nav-ingredients {
    display: none;
  }
}

/* **************** */

@media screen and (max-width: 950px) {
  .header-info p {
    color: black;
    font-size: 0.9em;
  }

  .header-info p a {
    color: inherit;
    font-size: 0.85em;
  }
}

@media screen and (max-width: 730px) and (min-width: 560px) {
  .header-info {
    position: relative;
    background: linear-gradient(to right, #adff2f, #87ceeb);
    text-align: center;
    padding: 1rem 0.3rem;
  }

  .header-info p {
    color: black;
    font-size: 0.7em;
  }

  .header-info p a {
    color: inherit;
    font-size: 0.67em;
  }
}

@media screen and (max-width: 560px) and (min-width: 470px) {
  .header-info {
    position: relative;
    background: linear-gradient(to right, #adff2f, #87ceeb);
    text-align: center;
    padding: 1rem 0.2rem;
  }

  .header-info p {
    color: black;
    font-size: 0.65em;
    text-align: start;
  }

  .header-info p a {
    color: inherit;
    font-size: 0.6em;
  }

  .header-info button {
    position: absolute;
    top: 13px;
    right: 0.5rem;
    font-size: 15px;
  }
}

@media screen and (max-width: 470px) {
  .header-info {
    position: static;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.2rem;
  }

  .header-info p {
    color: black;
    font-size: 0.65em;
  }

  .header-info p a {
    text-align: center;
    display: block;
    color: inherit;
    font-size: 0.6em;
  }

  .header-info button {
    position: relative;
    top: 0px;
    right: 0px;
    font-size: 15px;
    align-self: center;
  }
}
