/* Здесь вы напишете основную часть стилей страницы.

Будьте внимательны! Для корректной работы скриптов на этом сайте нужно, чтобы в HTML некоторые классы были названы особым образом:
✦ like-icon — для svg-иконки анимированного сердца
✦ card__like-button — для кнопки Like рядом с иконкой
✦ card__icon-button — для кнопки, оборачивающей иконку
✦ card__icon-button — для кнопки, оборачивающей иконку
✦ is-liked — для обозначения состояния лайкнутой иконки в виде сердца
✦ button__text — для обозначения текстового элемента внутри кнопки

*/

.page {
  min-inline-size: 320px;
  min-block-size: 100dvb;
  font-family: var(--main-font, "Inter"), sans-serif;
  font-variation-settings: "wght" var(--main-font-weight, 410);
  background-color: var(--bg-color, #fff);
  background-image: var(--bg-gradient);
  background-size: cover;
  background-attachment: fixed;
  display: flex;
  flex-flow: column wrap;
  align-items: center;
}

.section {
  box-sizing: border-box;
  background-color: var(--bg-color, #fff);
  border: 2px solid var(--main-color, #000);
  inline-size: var(--section-width);
}

.header {
  font-family: var(--style-font, "PressStart2P"), fantasy;
  font-weight: var(--main-font-weight-style, 400);
  letter-spacing: 0rem;
  text-transform: uppercase;
  padding-block: clamp(7.5rem, calc(7.324rem + 0.751vw), 8rem);
  margin-block: clamp(6.25rem, calc(6.206rem + 0.188vw), 6.375rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.header__logo {
  font-size: var(--header-logo-size);
  vertical-align: bottom;
  line-height: 100%;
}

.header__title {
  font-size: var(--header-title-size);
  line-height: 100%;
}

.card {
  margin-block-end: 50px;
}

.card__title {
  font-size: var(--main-font-size, 18px);
  font-variation-settings: "wght" var(--title-font-weight, 715);
  line-height: 139%;
  vertical-align: middle;
  margin: 3px 10px;
}

.card__image-block {
  inline-size: 100%;
  position: relative;
}

.card__image {
  inline-size: 100%;
  border-top: 2px solid var(--main-color, #000);
  border-bottom: 2px solid var(--main-color, #000);
  display: block;
}

.filter_saturate {
  filter: saturate(1.3);
}

.filter_sepia {
  filter: sepia(45%);
}

.filter_brightness {
  filter: brightness(0.5);
}

.filter_contrast-brightness {
  filter: contrast(1.5) brightness(0.4);
}

.filter_blur {
  filter: blur(0.3rem);
}

.filter_grayscale {
  filter: grayscale(0.6);
}

.filter_hue {
  filter: hue-rotate(40deg);
}

.card__label {
  position: absolute;
  top: 25px;
  right: clamp(0.813rem, calc(1.127vw + 0.548rem), 1.563rem);
  color: var(--main-color, #000);
  font-family: var(--style-font, "PressStart2P"), fantasy;
  font-weight: var(--main-font-weight-style, 400);
  font-size: var(--button-font-size, 14px);
  text-shadow: 0 0 1px var(--bg-color, #fff);
  mix-blend-mode: hard-light;
  z-index: 1;
  opacity: 0.5;
}

@supports (-webkit-text-stroke: 1px var(--bg-color, #fff)) or
  (text-stroke: 1px var(--bg-color, #fff)) {
  .card__label {
    text-shadow: none;
    -webkit-text-stroke: 1px var(--bg-color, #fff);
    text-stroke: 1px var(--bg-color, #fff);
  }
}

.card__description {
  font-size: var(--main-font-size, 18px);
  line-height: 21px;
  letter-spacing: 0rem;
  margin: var(--article-margin, 25px);
}

.card__description p:not(:last-of-type) {
  margin-block-end: 27px;
}

.card__like-block {
  display: flex;
  justify-content: right;
  margin-inline-end: var(--article-margin, 25px);
  margin-block-end: var(--article-margin, 25px);
  cursor: pointer;
  block-size: 38px;
  gap: 7px;
}

.card__icon-button {
  background-color: var(--bg-color, #fff);
  transition: border 0.3s ease;
  block-size: 38px;
  border: 2px solid transparent;
  display: flex;
  align-items: center;
  padding: 0;
}

.button {
  box-sizing: border-box;
  background-color: var(--bg-color, #fff);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.3s ease;
}

.button::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--main-color, #000);
  translate: -100%;
  transition: translate 0.5s ease-in-out;
}

.button:hover::before {
  translate: 0%;
}

.button:focus {
  outline: none;
}

.button:focus-visible {
  box-shadow: 2px 2px 0 var(--main-color, #000);
}

.card__like-button {
  inline-size: 130px;
  block-size: 100%;
  text-align: center;
}

.button__text {
  color: var(--bg-color);
  font-family: var(--style-font, "PressStart2P"), fantasy;
  font-weight: var(--main-font-weight-style, 400);
  font-size: var(--button-font-size, 14px);
  line-height: 90%;
  letter-spacing: 0rem;
  position: relative;
  mix-blend-mode: difference;
}

.card__icon-button:focus {
  outline: none;
}

.card__icon-button:focus-visible {
  outline: none;
  border: 2px solid var(--main-color, #000);
}

.save_button-block {
  display: flex;
  background-color: inherit;
  border: none;
  justify-content: center;
  margin-block-end: 100px;
}

.save_button {
  padding-block: var(--save-button-padding, 15px);
  display: flex;
  justify-content: center;
  gap: 8px;
  align-items: center;
  inline-size: clamp(19.125rem, calc(2.723vw + 18.487rem), 20.938rem);
}

.save_button-svg {
  inline-size: 21px;
  block-size: 21px;
  mix-blend-mode: difference;
  color: var(--bg-color, #fff);
  position: relative;
}

.popup {
  box-sizing: border-box;
  display: flex;
  padding-block: 30px;
  padding-inline: 30px;
  gap: 30px;
  flex-direction: column;
  align-items: center;
  text-transform: uppercase;
  inline-size: 353px;
}

.popup:not([open]) {
  display: none;
}

.floppy_block {
  display: flex;
  flex-direction: row;
  gap: 20px;
  block-size: 63px;
  inline-size: 100%;
}

.popup_svg {
  inline-size: 39px;
  block-size: 39px;
  align-self: center;
}

.popup_text {
  inline-size: clamp(12.375rem, calc(3.38vw + 11.583rem), 14.625rem);
  font-family: var(--style-font, "PressStart2P"), fantasy;
  font-weight: var(--main-font-weight-style, 400);
  font-size: var(--button-font-size, 14px);
  line-height: 150%;
  letter-spacing: 0rem;
}

.popup_ok_button {
  block-size: 38px;
  inline-size: 100%;
}

.popup::backdrop {
  background: var(--main-color, #000);
  opacity: 75%;
}

@media (width <= 375px) {
  .save_button {
    flex-direction: column;
  }

  .save_button-svg {
    inline-size: 28px;
    block-size: 28px;
  }

  .popup {
    padding-inline: 38px;
    inline-size: 100%;
  }
}
