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

Будьте внимательны! Для корректной работы скриптов на этом сайте нужно, чтобы в 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(--font-family-main);
  font-variation-settings: "wght" var(--font-weight-content);
  background-attachment: fixed;
  background-image: var(--bg-image);
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.header {
  justify-content: center;
  flex-direction: column;
  border: 2px solid #000;
  background-color: #fff;
  margin-block-start: 100px;
  margin-block-end: 100px;
}

.hd__title {
  display: grid;
  padding: clamp(7.625rem, 7.0481rem + 2.4615vw, 8.125rem) 0;
  gap: 20px;
  font-family: var(--font-family-pix);
  background-color: var(--bg-hd-color);
  text-transform: uppercase;
  text-align: center;
}

.title {
  font-weight: var(--font-weight-regular);
  font-size: clamp(3.0625rem, 1.8943rem + 4.9844vw, 4.0625rem);
}

.subtitle {
  font-weight: var(--font-weight-regular);
  font-size: clamp(0.875rem, 0.2179rem + 2.8037vw, 1.4375rem);
}

.content {
  width: var(--content-width);
  display: grid;
  grid-template-columns: 1fr;
  gap: 50px;
  /* background-color: #fff; */
  /* margin: 0 auto; */
  background: transparent;
  box-sizing: border-box;
}

.card__content {
  border: 2px solid #000;
  background: #fff;
  /* gap: 25px; */
  font-size: 18px;
  /* box-sizing: border-box; */
  /* height: 758px; */
}

.card__content-img {
  position: relative;
  border-top: 2px solid #000;
  border-bottom: 2px solid #000;
  inline-size: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
}

.card__content-item {
  display: flex;
  flex-direction: column;
  gap: 23px;
  padding: 29px 25px 20px 25px;
}

.paragraph {
  box-sizing: border-box;
  display: grid;
  gap: 25px;
  line-height: 21px;
}

.card__title {
  font-family: var(--font-family-main);
  font-size: var(--font-size-card);
  font-variation-settings: "wght" var(--fint-weight-title);
  display: flex;
  padding: 4px 10px;
  box-sizing: border-box;
}

.content__img {
  object-fit: cover;
  aspect-ratio: 1/1;
  inline-size: 100%;
  block-size: 100%;
  object-position: center;
}

.card__label {
  position: absolute;
  top: 25px;
  right: 25px;
  font-family: var(--font-family-pix);
  font-size: var(--font-size-regular);
  mix-blend-mode: hard-light;
  color: #000;
  opacity: 0.5;
  z-index: 2;
  text-shadow:
    -1px -1px 0 var(--label-shadow),
    1px -1px 0 var(--label-shadow),
    -1px 1px 0 var(--label-shadow),
    1px 1px 0 var(--label-shadow);
}

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

.button {
  inline-size: 130px;
  block-size: 38px;
  font-family: var(--font-family-pix);
  font-weight: 400;
  font-size: 14px;
  line-height: 90%;
  background: var(--bg-button-color);
  /* mix-blend-mode: var(--button-mix-mode); */
  position: relative;
  overflow: hidden;
  border: 2px solid #000;
  z-index: 1;
  transition: box-shadow 0.3s ease;
  cursor: pointer;
  outline: none;
}

.button::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--overlay-color);
  transform: translateX(-100%);
  transition: transform 0.5s ease-in-out;
  z-index: -1;
}
/* .button__save:hover  {
  filter: brightness(0) invert(1); /*для черной иконки(личнное напоминание)
} */

.button:focus-visible {
  box-shadow: 2px 2px var(--contour-color);
  outline: none;
}

.button:hover::before {
  transform: translateX(0);
}

.button__text {
  justify-content: center;
  mix-blend-mode: difference;
  position: relative;
  z-index: 2;
  color: #fff;
}

/* .button:hover {
  color: #fff;
  position: relative;
  z-index: 2;
} */

.content__button {
  display: flex;
  justify-content: end;
  margin-bottom: 30px;
  margin-right: 25px;
  gap: 7px;
}

.card__icon-button {
  background-color: var(--bg-button-color);
  border: none;
  transition: 0.3s ease;
  margin: 0;
  padding: 0;
  block-size: 36px;
  background: transparent;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* .card__like-button {
  cursor: pointer;
} */

.sparks {
  opacity: 0;
  transform-origin: center;
}

.button__save {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  inline-size: 306px;
  block-size: 84px;
  margin: 0 auto;
  margin-bottom: 100px; /*нижний отступ*/
}

.floppy {
  width: 28px;
  height: 28px;
  /* fill: #000; */
}

.button__save-icon {
  width: 28px;
  height: 28px;
  mix-blend-mode: var(--button-mix-mode);
  fill: var(--bg-button-color);
  position: relative;
  color: var(--bg-button-color);
  z-index: 2;
}

.dialog {
  display: block;
  font-family: var(--font-family-pix);
  font-size: var(--font-size-regular);
  padding: 30px;
  border: 2px solid #000;
  /* background: #fff; */
  max-width: 357px;
  width: 100%;
}

.dialog::backdrop {
  background: #000;
  opacity: 0.75;
}

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

.button__dialog {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.dialog__icon {
  width: 39px;
  height: 39px;
  flex-shrink: 0;
  /* mix-blend-mode: var(--button-mix-mode);
  fill: #fff;
  color: #fff; */
}

.title__dialog {
  font-family: var(--font-family-pix);
  font-size: var(--font-size-regular);
  line-height: 1.5;
  margin: 0;
  text-transform: uppercase;
  max-width: 234px;
}

.button__dialog-click {
  font-family: var(--font-family-pix);
  font-size: var(--font-size-regular);
  width: 100%;
  height: 38px;
  border: 2px solid #000;
  position: relative;
  overflow: hidden;
  justify-content: center;
  z-index: 2;
}

/* .button__dialog-click::before {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--overlay-color);
  transform: scaleX(0);
  transform-origin: left center;
  transition:
    transform 0.4s ease-in-out,
    height 0.4s ease-in-out,
    top 0.4s ease-in-out;
  z-index: 1;
} */

/* .button__dialog-click:hover::before {
  transform: scaleX(1);
  height: 100%;
  top: 0;
}

.button__dialog-click:hover .button__text {
  color: #fff;
} */

@media (width >= 375px) {
  .button__save {
    block-size: 55px;
    inline-size: 335px;
    flex-direction: row;
    align-items: center;
    padding: 17px 0;
  }

  .button__save .button__save-icon {
    width: 21px;
    height: 21px;
  }

  .dialog {
    padding: 30px 40px;
    max-width: 345px;
  }
}
/*фильтры для img*/
.brightness {
  filter: var(--filter-start);
}

.grayscale {
  filter: var(--filter-clean);
}

.sepia {
  filter: var(--filter-fear);
}

.hue-rotate {
  filter: var(--filter-ideal);
}

.blur {
  filter: var(---filter-strategy1);
}

.saturate {
  filter: var(--filter-strategy2);
}

.contrast {
  filter: var(--filter-strategy3);
}

.saturate-two {
  filter: var(--filter-final);
}

.like-icon {
  transform-origin: center;
}
