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

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

.header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 100px;
  padding-bottom: 97px;
  font-family: var(--font-accent);
  width: var(--page-width);
}

.header_container {
  background-color: var(--color-white);
  text-align: center;
  padding: 130px 123px;
  border: 1px solid #000;
}

.header_container,
.container {
  width: var(--page-width);
}

.header_title {
  display: flex;
  font-size: var(--logo-font-size);
  font-variation-settings: "wght" var(--text-weight);
  margin: 0;
  padding: 0;
  text-transform: uppercase;
  justify-content: center;
}

.header_subtitle {
  display: flex;
  font-family: var(--font-accent);
  font-variation-settings: "wght" var(--text-weight);
  text-transform: uppercase;
  justify-content: center;
  padding-top: 20px;
  font-size: 23px;
}

.container {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  width: 100%;
  max-width: 696px;
  gap: 52px;
}

.card {
  background-color: var(--color-white);
  width: var(--page-width);
  border: 1px solid #000;
  display: flex;
  flex-direction: column;
}

.card_title {
  display: flex;
  align-items: center;
  font-family: var(--font-main);
  font-variation-settings: "wght" var(--bold-weight);
  padding: 5px 5px 5px 9px;
  font-size: 18px;
}

.images_box {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.card_image {
  display: block;
  width: 100%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  border-top: 2px solid #000;
  border-bottom: 2px solid #000;
}

.label {
  position: absolute;
  z-index: 1;
  top: 25px;
  right: 25px;
  opacity: 0.6;
  color: rgb(0, 0, 0);
  font-family: var(--font-accent);
  font-size: 14px;
  text-shadow: -1px -1px 0 var(--stroke-color), 1px -1px 0 var(--stroke-color),
    -1px 1px 0 var(--stroke-color), 1px 1px 0 var(--stroke-color);
  mix-blend-mode: hard-light;
  text-transform: uppercase;
}

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

.card_text {
  font-family: var(--font-main);
  font-variation-settings: "wght" var(--text-weight);
  margin: 0;
  padding: 25px 30px 0 25px;
  font-size: 18px;
  line-height: 21px;
}

.card_button {
  display: flex;
  justify-content: end;
  align-items: center;
  padding: 26px 27px 24px 0;
  gap: 4px;
}

.card__icon-button {
  outline: none;
  background: none;
  border: 2px solid transparent;
  cursor: pointer;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
  transition: border 0.3s ease;
}

.card__icon-button:focus-visible {
  border: 2px solid var(--color-black);
}

.like-icon {
  width: 37px;
  height: 34px;
}

.like_button {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 10px 35px;
  max-width: 130px;
  border: 2px solid var(--color-black);
  background-color: var(--color-white);
  font-family: var(--font-accent);
  font-size: 14px;
  cursor: pointer;
}

.button {
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
  color: var(--color-white);
}

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

.button::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--color-black);
  transform: translateX(-100%);
  transition: transform 0.5s ease-in-out;
  z-index: 0;
}

/* .button:hover .button_floppy {
  color: var(--color-white);
} */

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

/* .button span {
  position: relative;
  z-index: 1;
  mix-blend-mode: difference;
} */

.button .text,
.button span,
.button .button_floppy {
  position: relative;
  z-index: 1;
  mix-blend-mode: difference;
}

.button_floppy {
  position: relative;
  z-index: 1;
  fill: currentColor;
}

.button__text {
  font-family: var(--font-accent);
  font-size: 14px;
  font-variation-settings: "wght" var(--text-weight);
}

.main {
  width: var(--page-width);
}

.additional_word {
  mix-blend-mode: hard-light;
}

.footer {
  margin-top: 50px;
  margin-bottom: 100px;
  text-align: center;
}

.modal_content {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  text-align: center;
}

.modal_text {
  font-family: var(--font-accent);
  font-size: 14px;
  padding-inline: 5px;
  font-variation-settings: "wght" var(--text-weight);
  line-height: 150%;
  letter-spacing: 0%;
  text-align: left;
  text-transform: uppercase;
}

.modal_button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 15px 20px;
  border: 2px solid var(--color-black);
  background-color: var(--color-white);
  font-family: var(--font-accent);
  font-size: 14px;
  cursor: pointer;
}

.dialog {
  padding: 20px;
  font-family: var(--font-accent);
  background-color: var(--color-white);
  text-align: center;
  font-size: 14px;
  max-width: 340px;
}

.dialog[open] {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 30px;
}

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

.close_button {
  padding: 10px 125px;
  font-family: var(--font-accent);
  font-size: 14px;
  text-transform: uppercase;
  background-color: var(--color-white);
  border: 2px solid var(--color-black);
  cursor: pointer;
}

.filter-brightness {
  filter: brightness(200%);
}

.filter-contrast {
  filter: contrast(20%);
}

.filter-blur {
  filter: blur(2px);
}

.filter-opacity {
  filter: opacity(0.8);
}

.filter-grayscale {
  filter: grayscale(0.8);
}

.filter-saturate {
  filter: saturate(158%);
}

.filter-drop-shadow-blur-grayscale {
  filter: drop-shadow(5px 15px 3px rgba(0, 0, 0, 0.8)) blur(2px) grayscale(1);
}

@media (width <= 375px) {
  .header {
    padding-bottom: 103px;
  }

  .header_title {
    font-size: 49px;
  }

  .header_container {
    text-align: center;
    padding: 120px 10px;
  }
  .header_subtitle {
    font-size: 14px;
  }

  .label {
    top: 25px;
    right: 26px;
  }

  .modal_button {
    flex-direction: column;
    gap: 8px;
    padding: 15px 20px;
  }

  .button_floppy {
    width: 28px;
    height: 28px;
  }
}