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

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

*/

.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-default);
  min-inline-size: 320px;
  min-block-size: 100dvb;
  background-image:
    repeating-linear-gradient(to right, var(--bg-gradient)),
    repeating-linear-gradient(to bottom, var(--bg-gradient)),
    linear-gradient(to bottom, #e7e7e7, #1a1a1a);
  background-size: cover;
  gap: 95px;
  padding: 100px 0px;
  font-variation-settings: "wght" var(--font-weight-text);
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 50px;
}

.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-items: center;
  background-color: #fff;
  padding: clamp(122px, 118.7273px + 0.9091vw, 130px) 16px;
  border: var(--border);
}

.block {
  width: var(--block);
}

.logo {
  font-family: var(--font-accent);
  font-size: clamp(49px, 43.3662px + 1.5023vw, 65px);
  padding-bottom: 20px;
}

.logo-discriptor {
  font-family: var(--font-accent);
  font-size: clamp(0.875rem, 0.6769rem + 0.8451vw, 1.4375rem);
  text-transform: uppercase;
}

/*Карточки*/

.card-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 50px
}

.card-item {
  display: flex;
  flex-direction: column;
  background-color: #FFF;
  border: var(--border);
}

.card-header {
  font-size: 18px;
  line-height: 22px;
  padding: 4px 10px;
  font-weight: 715;
  border-bottom: var(--border);
  font-variation-settings: "wght" var(--font-weight-header);

}

.image-wrapper {
  display: flex;
  position: relative;
}

.card-image {
  border-top: var(--border);
  position: relative;
  object-fit: cover;
  object-position: center;
  aspect-ratio: 1 / 1;
}

/*Image filters*/

.normal {
  filter: brightness(130%);
}

.saturation {
  filter: saturate(15%) brightness(120%);
}

.contrast {
  filter: contrast(80%) saturate(340%);
}

.hue {
  filter: hue-rotate(0.1turn);
}

.invert {
  filter: invert(80%);
}

.sepia {
  filter: sepia(0.9);
}

.blur {
  filter: blur(8px);
}

.multiply {
  filter: hue-rotate(0.2turn) blur(4px) sepia(0.4);
}

/*Image filters END*/

@supports((text-stroke: 1px #FFF) or (-webkit-text-stroke: 1px #FFF)) {
  .watermark {
    -webkit-text-stroke: 1px #FFF;
    text-shadow: none;
  }
}

.watermark {
  font-family: var(--font-accent);
  font-size: 14px;
  text-shadow: -1px -1px 0 #FFF, 1px -1px 0 #FFF, -1px 1px 0 #FFF, 1px 1px 0 #FFF;
  position: absolute;
  opacity: 50%;
  top: 25px;
  right: 25px;
}

.card-footer {
  display: flex;
  flex-direction: column;
  gap: 25px;
  padding: 25px;
  font-size: 18px;
  line-height: 21px;
  font-weight: 410;
  border-top: var(--border);
}

.button-group {
  display: flex;
  flex-direction: row;
  align-self: flex-end;
  gap: 7px
}

.card__icon-button {
  display: flex;
  align-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid transparent;
  transition: border 0.3s ease;


}

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

.card__icon-button:focus-visible {
  border: 2px solid #000;
}

.button {
  border: var(--border);
  background-color: #FFF;
  gap: 8px;
  align-items: center;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition: 0.3s ease;
}

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

/* Псевдоэлемент*/
.button::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: translate(-100%);
  transition: 0.5s ease-in-out;
  background-color: white;
  mix-blend-mode: difference;
}

/* По ховеру */
.button:hover::before {
  transform: translate(0);
}

.card__like-button {
  min-width: 130px;
  border: var(--border);
  justify-content: center;
  height: 38px;
}

.card__like-button:focus-visible {
  outline: none;
  box-shadow: 2px 2px 0px #000;

}

.button-save {
  display: flex;
  padding: 14px 18px;
  gap: 8px;
  align-self: center;
}

.button-save:focus-visible {
  outline: none;
  box-shadow: 2px 2px 0px #000;
}

.dialog {
  padding: 0px;
}

.dialog-container {
  max-width: 353px;
  font-family: var(--font-accent);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding: 30px;
}

.dialog-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
}

.text-diablog {
  display: flex;
  flex-direction: column;
  text-transform: uppercase;
  line-height: 150%;
}

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

.button-dialog {
  min-width: 293px;
  height: 38px;
}

.button-dialog:focus-visible {
  outline: none;
  box-shadow: 2px 2px 0px #000;
}

@media (width <=375px) {
  .page {
    width: 100%;
    min-width: 375px;
  }

  .card-image {
    width: 100%;
  }

  .button-save {
    display: flex;
    flex-direction: column;
  }

  .dialog-container {
    padding: 30px 40px;
  }

  .button-dialog {
    min-width: 261px;
  }

  .button-save>svg {
    width: 28px;
    height: 28px;
  }

}