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

Будьте внимательны! Для корректной работы скриптов на этом сайте нужно, чтобы в 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;
  background-image: var(--page-gradient);
  background-attachment: fixed;
  background-size: cover;
  min-width: 375px;
  overflow-x: hidden;
}

.container__block {
  width: clamp(23.438rem, 16.2859rem + 30.5157vw, 43.75rem);
}

.header {
  display: flex;
  flex-direction: column;
  justify-self: center;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 100px 0px;
  background-color: var(--backgroung-color, #FFFFFF);
  border: 2px solid var(--color-border, black);
  font-family: var(--font-title);
  padding: 130px 122.5px;
  white-space: nowrap;
}

.header__icon {
  font-size: clamp(3.0625rem, 2.7104rem + 1.5023vw, 4.0625rem);
  font-weight: 400;
  line-height: 100%;
}

.header__title {
  font-size: clamp(0.875rem, 0.6769rem + 0.8451vw, 1.4375rem);
  font-weight: 400;
  line-height: 100%;
  text-transform: uppercase;
}

.card {
  display: flex;
  flex-direction: column;
  justify-self: center;
  border: 2px solid var(--color-border);
  position: relative;
  background-color: var(--backgroung-color, #FFFFFF);
  margin-bottom: 50px;
}

.card__title {
  font-family: var(--font-card);
  font-size: 18px;
  font-weight: 715;
  font-variation-settings: "wght" 715;
  padding: 4px 10px;
}

.img__conteiner {
  position: relative;
}

.card__img {
  display: block;
  object-fit: cover;
  object-position: center;
  inline-size: 100%;
  min-height: 376px;
}

.card__description {
  padding: 25px;
}

.card__text {
  font-family: var(--font-card);
  font-weight: 410;
  font-variation-settings: "wght" 410;
  font-size: 18px;
  line-height: 21px;
  padding-bottom: 25px;
}

.card__button {
  display: flex;
  justify-self: flex-end;
  gap: 4px;
}

.button {
  background-color: var(--backgroung-color, #FFFFFF);
  border: 2px solid var(--color-border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  position: relative;
  overflow: hidden;
  transition: 0.5s ease-in-out;
}

.button__text {
  font-size: 14px;
  font-weight: 400;
  font-family: var(--font-title);
  line-height: 90%;
  position: relative;
  z-index: 1;
  color: var(--button-text-color, #fff);
  mix-blend-mode: difference;
}

.button:focus {
  outline: none;
}

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

.card__like-button {
  inline-size: 130px;
  padding: 0;
}

.button::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--accent-color, #000);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease-in-out;
  z-index: 0;
  pointer-events: none;
}

.button:hover::before {
  transform: scaleX(1);
}

.img__icon {
  position: absolute;
  top: 25px;
  right: 25px;
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 400;
  line-height: 100%;
  text-shadow:
    1px 0 0 white,
    1px 0 0 white,
    0 1px 0 white,
    0 1px 0 white,
    -1px 0 0 white,
    -1px 0 0 white,
    0 -1px 0 white,
    0 -1px 0 white;
  opacity: 0.5;
}

@supports ((-webkit-text-stroke: 1px white) or (text-stroke: 1px white)) {
  .img__icon {
    -webkit-text-stroke: 1px white;
    text-shadow: none;
  }
}

.card__icon-button {
  border: 2px solid transparent;
  background-color: transparent;
  block-size: 38px;
  padding: 0;
  transition: border-color 0.3s ease;
  cursor: pointer;
}

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

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

.footer__button {
  padding: 20.5px 20px;
  max-height: 55px;
  margin-bottom: 100px;
}

.button__img {
  margin-right: 8px;
  position: relative;
  z-index: 1;
  mix-blend-mode: difference;
  filter: brightness(0) invert(1);
}

.popup {
  padding: 30px;
  border: 2px solid var(--color-border);
  display: none;
}

.popup__button {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  padding: 12.5px 132.5px;
  font-family: var(--font-title);
  text-transform: uppercase;
}

.popup[open] {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  overflow-x: hidden;
}

.popup::backdrop {
  background-color: var(--color-border);
  opacity: 75%;
}

.popup__content {
  display: flex;
  gap: 20px;
  align-items: center;
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 400;
}

.popup__img {
  height: 39px;
}

.popup__text {
  text-transform: uppercase;
  max-width: 234px;
  line-height: 150%;
}

@media (width <= 376px) {
  .footer__button {
    flex-direction: column;
    gap: 8px;
    padding: 17px 20px;
    max-height: 88px;
  }

  .button__img {
    width: 28px;
    margin-right: 0;
  }

  .header {
    padding: 122px 16px;
  }

}

.filter__grayscale {
  filter: grayscale(85%);
}

.filter__saturate {
  filter: saturate(220%) contrast(115%) brightness(108%);
}

.filter__contrast {
  filter: sepia(85%) saturate(160%) contrast(110%);
}

.filter__hue-rotate {
  filter: hue-rotate(200deg) saturate(120%) brightness(95%);
}

.filter__sepia {
  filter: sepia(75%) contrast(70%) brightness(70%);
}

.filter__blur {
  filter: blur(3px) saturate(120%);
}

.filter__brightness {
  filter: sepia(40%) hue-rotate(90deg) saturate(150%) brightness(90%);
}