@font-face {
  font-family: "Trebuchet MS";
  src: local("Trebuchet MS"), url("./trebuchetms.ttf") format("truetype");
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

:root {
  font: 16px/1.2 "Trebuchet MS", sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.container {
  width: clamp(300px, 90dvw, 720px);
}

.button {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.header {
  padding: 30px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.header__title {
  font-weight: 400;
}

.form {
  position: relative;
}

.form__search {
  position: relative;
  padding: 10px;
  border-radius: 10px;
  border: 0;
  background: whitesmoke;
  transition: background 0.3s ease;
}

.form__submit {
  display: none;
}

.form__reset {
  display: none;
  position: absolute;
  top: 5px;
  right: 10px;
  background: url(./cross.svg) no-repeat center/35%;
}

.main {
  width: 100%;
  display: flex;
  justify-content: center;
  background: whitesmoke;
}

.main__inner {
  padding: 30px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.image {
  width: 240px;
  height: 240px;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.footer {
  padding: 30px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__text {
  display: flex;
}

a {
  color: inherit;
  text-underline-offset: 4px;
}

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100dvw;
  height: 100dvh;
  z-index: 2;
  cursor: pointer;
  background: rgba(41, 41, 41, 0.6);
}

.modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
}

.active {
  display: block;
}

@media (hover: hover) {
  .form__search:hover {
    background: gainsboro;
  }

  .button:hover {
    background-color: gainsboro;
  }

  .image:hover {
    z-index: 1;
    transform: scale(1.1);
    box-shadow: -1px 0px 20px 5px rgba(0, 0, 0, 0.2);
  }
}

@media (max-width: 767px) {
  .header {
    justify-content: center;
    gap: 15px;
  }
}
