/***************************** IMPORTS *****************************/
@import url("https://fonts.googleapis.com/css2?family=Anton&family=Manrope:wght@400;500;700&display=swap");
/***************************** NORMALIZE *****************************/
/**
 * Remove the default margin
 */
body,
h1,
h2,
h3,
p,
ul {
  margin: 0;
}

/**
 * Remove the default list property
 */
ul {
  list-style: none;
  padding: 0;
}

/**
 * Remove the default button property
 */
button {
  background: none;
  border: none;
  padding: 0;
}

/**
 * Remove the default input property
 */
input {
  padding: 0;
}

/* remove chrome cross on typing*/
input[type=search]::-webkit-search-decoration,
input[type=search]::-webkit-search-cancel-button,
input[type=search]::-webkit-search-results-button,
input[type=search]::-webkit-search-results-decoration {
  display: none;
}

/***************************** BASE *****************************/
/**
 * Set up a decent box model on the root element
 */
html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  background-color: #ededed;
  max-width: 1440px;
  margin: auto;
}

main {
  padding: 17px 102px 201px;
}

@media screen and (max-width: 500px) {
  main {
    padding: 17px 50px 100px;
  }
}
@media screen and (max-width: 400px) {
  main {
    padding: 17px 20px 100px;
  }
}
/***************************** TYPOGRAPHY *****************************/
/***************************** font */
/* default font property */
* {
  font: 14px "Manrope", sans-serif;
  font-weight: 400;
}

/* title font family  */
.recipe-card__title,
.hero__title,
.filters__total-recipes {
  font-family: "Anton", sans-serif;
}

/* common font-size */
.hero__search-bar,
.filter__button {
  font-size: 1.143rem;
}

/* common font-weight */
.recipe-card__subtitle,
.filters__ingredient--selected {
  font-weight: 700;
}

.filter__button,
.recipe-card__ingredient {
  font-weight: 500;
}

/* specific font property */
.recipe-card__title {
  font-size: 1.286rem;
}
.recipe-card__subtitle, .recipe-card__duration {
  font-size: 0.857rem;
}
.recipe-card__subtitle {
  letter-spacing: 1.08px;
  text-transform: uppercase;
}

.hero__title {
  font-size: 3.143rem;
  text-transform: uppercase;
}

.filters__total-recipes {
  font-size: 1.5rem;
}

.filter__list-items button {
  text-align: left;
}

/*************************************** color */
* {
  color: #1b1b1b;
}

.recipe-card__subtitle,
.recipe-card__ingredient-quantity,
.hero__search-bar,
.filters__search-bar {
  color: #7a7a7a;
}

.hero__title {
  color: #ffd15b;
  text-align: center;
}

@media screen and (max-width: 700px) {
  * {
    font-size: 12px;
  }
  .hero__title {
    font-size: 2.143rem;
  }
}
/***************************** HELPERS *****************************/
.flex-col {
  display: flex;
  flex-direction: column;
}

.flex-row {
  display: flex;
  flex-direction: row;
}

/**
 * Hide element while making it readable for screen readers
 */
.visually-hidden {
  border: 0;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

/* animations */
@keyframes apparition {
  0% {
    opacity: 0;
  }
  99% {
    opacity: 1;
  }
}
/***************************** HERO HEADER *****************************/
.hero {
  background-image: url("../photos/lampos-aritonang-24gR_9lCdes-unsplash-1.webp");
  background-repeat: no-repeat;
  height: 667px;
}
.hero__logo {
  padding: 45px 69px 93px;
  width: -moz-fit-content;
  width: fit-content;
}
.hero__title {
  margin: 80px 375px 0;
}
.hero__search-container {
  background-color: #ffffff;
  border-radius: 11px;
  margin: 30px auto;
  width: 66%;
  overflow: hidden;
}
.hero__search-container .input {
  width: 95%;
  padding-left: 35px;
}
.hero__search-container .cross-svg {
  align-self: center;
  margin-right: 17px;
  width: -moz-fit-content;
  width: fit-content;
}
.hero__search-bar-submit {
  background-color: #1b1b1b;
  border-radius: 10px;
  cursor: pointer;
  height: 52px;
  margin: 10px;
  padding: 12px;
  position: relative;
  width: 51px;
  z-index: 1;
}
.hero__search-bar-submit::after {
  content: "";
  border-radius: 10px;
  background-color: #ffd15b;
  bottom: 0;
  left: 0;
  opacity: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: opacity 250ms;
  z-index: -1;
}
.hero__search-bar-submit:hover::after {
  opacity: 1;
}
.hero__search-bar-submit:hover circle,
.hero__search-bar-submit:hover line {
  stroke: #1b1b1b;
}

@media screen and (max-width: 1120px) {
  .hero {
    height: 400px;
  }
  .hero__logo {
    padding: 40px;
  }
  .hero__title {
    margin: 10px 0;
  }
}
@media screen and (max-width: 560px) {
  .hero__search-container {
    width: 90%;
  }
}
/***************************** FILTERS *****************************/
.filters {
  justify-content: space-between;
}
.filters__container {
  gap: 64px;
}
.filters__total-recipes {
  align-self: center;
}

@media screen and (max-width: 1024px) {
  .filters {
    flex-direction: column;
    gap: 25px;
    align-items: center;
  }
  .filters__container {
    flex-direction: column;
    gap: 25px;
  }
}
/***************************** RECIPES *****************************/
.recipes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 48px;
  grid-template-rows: 731px;
}
.recipes--not-found {
  margin: 25px auto;
  width: -moz-fit-content;
  width: fit-content;
}

@media screen and (max-width: 1240px) {
  .recipes {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media screen and (max-width: 955px) {
  .recipes {
    grid-template-columns: repeat(1, 1fr);
  }
}
.tags {
  animation: tagsDisappearing 500ms forwards;
  height: 55px;
}
.tags--activate {
  animation: tagsAppearing 500ms forwards;
  height: auto;
  padding: 21px 0 0;
  transform-origin: top;
}
.tags__list {
  gap: 15px;
  flex-wrap: wrap;
  max-width: 100%;
}

@keyframes tagsAppearing {
  0% {
    padding-bottom: 0;
  }
  100% {
    padding-bottom: 43px;
  }
}
@keyframes tagsDisappearing {
  0% {
    height: 98px;
  }
  100% {
    height: 55px;
  }
}
/***************************** FORM *****************************/
.input {
  border: none;
}
.input:hover, .input:active, .input:focus, .input:focus-within {
  outline: none;
}
.input-container .cross-svg {
  width: 20px;
}
.input-container .cross-svg .empty-input-button {
  cursor: pointer;
  display: none;
}
.input-container .cross-svg .empty-input-button--typing {
  display: block;
}

.filter__container {
  background-color: #ffffff;
  border-radius: 11px;
  position: relative;
}
.filter__button {
  align-items: center;
  cursor: pointer;
  gap: 63px;
  justify-content: space-between;
  padding: 17px 16px;
}
.filter__list-container {
  background-color: #ffffff;
  border-radius: 0 0 11px 11px;
  display: none;
  margin-top: -8px;
  overflow-y: hidden;
  position: absolute;
  z-index: 2;
}
.filter__list-container .filter__input-container {
  align-items: center;
  border: 0.5px solid #c6c6c6;
  border-radius: 2px;
  height: -moz-fit-content;
  height: fit-content;
  margin: 5px 16px 24px;
  position: relative;
  padding-right: 5px;
}
.filter__list-container .filter__input-container .input {
  height: 35px;
  padding-left: 10px;
  width: 75%;
}
.filter__list-container--open {
  animation: openList forwards 0.3s;
  display: flex;
  transform-origin: top;
  z-index: 1;
}
.filter__list-container--close {
  animation: closeList forwards 0.3s;
  display: flex;
  transform-origin: top;
}
.filter__list-items {
  gap: 13px;
  max-height: 200px;
  overflow: auto;
  padding: 0 16px 15px;
  width: 100%;
}
.filter__magnifier-svg {
  padding-bottom: 5px;
  position: relative;
}
.filter--open .filter__arrow {
  animation: arrowChange forwards 0.2s;
}

@keyframes arrowChange {
  0% {
    opacity: 1;
  }
  10% {
    opacity: 0;
    transform: rotate(0deg);
  }
  50% {
    opacity: 0;
    transform: rotate(180deg);
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: rotate(180deg);
  }
}
@keyframes openList {
  from {
    max-height: 0;
  }
  to {
    max-height: 250px;
  }
}
@keyframes closeList {
  from {
    max-height: 250px;
  }
  to {
    max-height: 0;
  }
}
/***************************** RECIPE CARD *****************************/
.recipe-card {
  background-color: #ffffff;
  border-radius: 21px;
  box-shadow: 0px 4px 34px 30px rgba(0, 0, 0, 0.04);
  gap: 30px;
  overflow: hidden;
  position: relative;
}
.recipe-card img {
  height: 253px;
  -o-object-fit: cover;
     object-fit: cover;
  width: 100%;
}
.recipe-card__duration {
  background-color: #ffd15b;
  border-radius: 14px;
  padding: 5px 15px;
  position: absolute;
  right: 20px;
  top: 21px;
}
.recipe-card__content {
  gap: 30px;
  padding: 0 25px 61px;
}
.recipe-card__content-section {
  gap: 15px;
}
.recipe-card__instruction {
  max-height: 76px;
  overflow: hidden;
}
.recipe-card__ingredients-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  row-gap: 21px;
}

@media screen and (max-width: 700px) {
  .recipe-card__instruction {
    max-height: 100px;
    overflow: hidden;
  }
}
.tag {
  animation: apparition 500ms forwards;
  background-color: #ffd15b;
  border-radius: 10px;
  gap: 60px;
  padding: 17px 18px;
}
.tag button {
  cursor: pointer;
}