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

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

*/

.page {
  font-family: var(--font-main);
  font-variation-settings: 'wght' var(--font-weight-text);
}

.page-wrapper {
  background-image: var(--background-gradient);
  background-position: center;
  background-attachment: fixed;
  background-size: cover;
  padding-top: 25%;
  padding-bottom: 50px;
}

.content-section {
  inline-size: var(--content-width);
  border: 2px solid #000000;
  margin-block-end: 50px;
  background-color: #ffffff;
}

.card__save-button {
  margin: 50px 32px 0px 32px;
  margin-inline: auto;
  gap: 8px;
  padding: 15px 20px;
  flex-direction: column;
}

.header {
  inline-size: var(--content-width);
  border: 2px solid #000000;
  margin-top: 0;
  margin-bottom: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-block: var(--header-padding-block);
  padding-inline: var(--header-padding-inline);
  background-color: #ffffff;
}

.header__logo {
  font-family: var(--font-accent);
  font-size: clamp(49px, 4.5vw, 65px);
  font-weight: 400;
  font-style: normal;
  line-height: 100%;
  letter-spacing: 0;
  vertical-align: bottom;
  text-transform: uppercase;
  color: #000000;
  margin: 0;
}

.header__title {
  font-family: var(--font-accent);
  font-size: clamp(14px, 1.5vw, 23px);
  font-weight: 400;
  line-height: 100%;
  text-transform: uppercase;
  color: #000000;
  margin-top: 20px;
}

.card {
  box-sizing: content-box;
}

.card__image-wrapper {
  position: relative;
  inline-size: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-top: 2px solid #000000;
  border-bottom: 2px solid #000000;
  isolation: isolate;
}

.card__image {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: right center;
}

.card__image--sepia {
  filter: sepia(0.3) brightness(1.1) contrast(1.05);
}

.card__image--grayscale {
  filter: grayscale(0.4) brightness(0.9) contrast(1.2);
}

.card__image--blur {
  filter: blur(1px) opacity(0.95) saturate(0.8);
}

.card__image--brightness {
  filter: brightness(1.15) contrast(1.3) saturate(1.4);
}

.card__image--hue-rotate {
  filter: hue-rotate(15deg) saturate(1.2) brightness(1.05);
}

.card__image--hue-rotate-inverted {
  filter: hue-rotate(180deg) saturate(1.3) contrast(1.1);
}

.card__image--grayscale-blur {
  filter: grayscale(0.6) brightness(0.85) contrast(0.9) blur(0.5px);
}

.card__image--sepia-hue {
  filter: sepia(0.5) hue-rotate(30deg) saturate(1.1) brightness(1.05) contrast(1.15);
}

.card__label {
  position: absolute;
  inset-block-start: 25px;
  inset-inline-end: 25px;
  z-index: 1;
  font-family: var(--font-accent);
  font-size: 14px;
  text-transform: uppercase;
  opacity: 0.5;
  mix-blend-mode: hard-light;
  color: #000000;
  line-height: 100%;
  text-shadow:
    -1px 0 var(--label-stroke-color),
    1px 0 var(--label-stroke-color),
    0 -1px var(--label-stroke-color),
    0 1px var(--label-stroke-color);
}

.card__text {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 25px;
}

.card__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.card__icon-button {
  flex-shrink: 0;
  padding: 0;
  min-inline-size: 38px;
  min-block-size: 38px;
  border: 2px solid transparent;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s ease;
}


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

.card__icon-button:focus-visible {
  border-color: var(--Themes-mainColor, #000000);
}

.like-icon {
  display: block;
  inline-size: 39px;
  block-size: 36px;
  transform-origin: center;
  overflow: visible;
}

.like-icon .contour {
  fill: var(--contour-color);
  transition: fill 0.1s linear;
}

.like-icon .core {
  fill: transparent;
  transition: fill 0.3s linear 0.03s;
}

.like-icon .main-body {
  fill: transparent;
  transition: fill 0.3s linear;
}

.like-icon .sparks {
  opacity: 0;
}

.like-icon .heart {
  transform: scale(1);
  transform-origin: center;
}

.like-icon:hover .core {
  fill: var(--contour-color);
  transition-delay: 0s;
}

.like-icon:hover .main-body {
  fill: var(--contour-color);
  transition-delay: 0.05s;
}

.like-icon:active .core {
  fill: var(--animation-fill-color);
  transition-delay: 0s;
}

.like-icon:active .main-body {
  fill: var(--animation-fill-color);
  transition-delay: 0.05s;
}

.like-icon.is-liked .core {
  fill: var(--animation-fill-color);
  transition-delay: 0s;
}

.like-icon.is-liked .main-body {
  fill: var(--animation-fill-color);
  transition-delay: 0.05s;
}

.like-icon.is-liked .contour {
  fill: var(--animation-fill-color);
  transition: fill 0.3s linear 0.06s;
}

.like-icon.is-liked .heart {
  animation: heart-scale 0.3s ease-in 0.1s;
}

.like-icon.is-liked .sparks {
  animation: heart-sparks 0.3s ease-in 0.3s;
}

.button {
  position: relative;
  border: 2px solid var(--Themes-mainColor, #000000);
  background: var(--Themes-background, #FFFFFF);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
  font-family: var(--font-main);
  font-size: 14px;
  color: #000000;
  cursor: pointer;
}

.button:focus {
  outline: none;
  box-shadow: 2px 2px 0 var(--Themes-mainColor, #000000);
}

.button::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--Themes-mainColor, #000000);
  transform: translateX(-100%);
  transition: transform 0.5s ease-in-out;
  z-index: 0;
}

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

.card__like-button {
  min-inline-size: 130px;
  min-block-size: 38px;
  padding: 9px 17px;
  gap: 10px;
}

.button__text {
  position: relative;
  z-index: 1;
  font-family: var(--font-accent);
  font-weight: 400;
  font-style: normal;
  font-size: 14px;
  line-height: 90%;
  letter-spacing: 0;
  vertical-align: middle;
  color: var(--Themes-background, #ffffff);
  mix-blend-mode: difference;
}

.card__text p {
  font-family: var(--font-main);
  font-weight: 410;
  font-style: normal;
  font-size: 18px;
  line-height: 21px;
  letter-spacing: 0;
}

 .card__title {
  font-family: var(--font-main);
  font-size: 18px;
  letter-spacing: 0;
  color: #000000;
  padding: 6px 10px;
  font-variation-settings: 'wght' 715;
 }



.card__save-icon {
  position: relative;
  z-index: 1;
  display: block;
  inline-size: 28px;
  block-size: 28px;
  flex-shrink: 0;
  color: var(--Themes-background, #ffffff);
  mix-blend-mode: difference;
 }

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

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

@media (width > 768px) {
  .page-wrapper {
    padding-top: 100px;
  }

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

  .header {
    margin-top: 0;
    margin-bottom: 95px;
    margin-inline: auto;
  }

  .card__save-button {
    flex-direction: row;
  }

  .card__save-icon {
    inline-size: 21px;
    block-size: 21px;
  }
}

.dialog {
  border: none;
  padding: 0;
  background: transparent;
  max-inline-size: 90vw;
}

.dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.75);
}

.dialog__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  border: 2px solid var(--Themes-mainColor, #000000);
  padding: 30px;
  background: var(--Themes-background, #FFFFFF);
}

.dialog__message {
  display: flex;
  align-items: center;
  gap: 20px;
  min-inline-size: 293px;
}

.dialog__icon {
  display: block;
  inline-size: 39px;
  block-size: 39px;
  color: var(--Themes-mainColor, #000000);
  flex-shrink: 0;
}

.dialog__text {
  font-family: var(--font-accent);
  font-weight: 400;
  font-style: normal;
  font-size: 14px;
  line-height: 150%;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--Themes-mainColor, #000000);
  margin: 0;
  min-inline-size: 234px;
  max-inline-size: 234px;
}

.dialog__button {
  min-inline-size: 293px;
  min-block-size: 38px;
  padding: 9px 17px;
}

.dialog__button .button__text {
  text-transform: uppercase;
}
