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

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

*/

.page {
  font-family:var(--main-font), sans-serif;
  background-color: var(--bg-color);
  background-image: var(--page-gradient);
  background-size: cover;        /* растянуть на всю страницу */
  background-attachment: fixed;  /* фон фиксируется при прокрутке */
  min-inline-size: 320px;
  min-block-size: 100dvb;
  font-variation-settings:"wght" var(--font-card-text);
}


.header {
  display:flex;
  justify-content:center;
  align-items:center;
}

.header__info {
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  width: var(--width);
  margin-block-start:100px;
  border:2px solid var(--main-text-color);
  padding:117px 16px 123px 16px;
  text-align:center;
  text-transform:uppercase;
  background-color: var(--bg-color-card);
}

.header__title {
  color:var(--main-text-color);
  font-family:var(--second-font);
  font-size: clamp(3.063rem, 2.71rem + 1.502vw, 4.063rem);
}

.header__title_paragraph {
  margin-block-start:20px;
  color:var(--main-text-color);
  font-family: var(--second-font);
  font-size: clamp(0.875rem, 0.677rem + 0.845vw, 1.438rem);
}


main {
  display:grid;
  justify-content:center;
  gap:49px;
  margin-top:100px;
  margin-bottom:100px;
}

.card {
  display:flex;
  flex-direction:column;
  width: var(--width);
  border:2px solid var(--main-text-color);
  background-color: var(--bg-color);
}

.card__title {
  display:flex;
  padding:4px 10px 4px 10px;
  color:var(--main-text-color);
  font-size:var(--card-text-font-size);
  font-variation-settings:"wght" var(--font-card-h);
}

.card__photo img {
  display:block;
  inline-size:100%;
  block-size:100%;
}

.card__photo {
  position:relative;
  display: inline-block;
  border-top:2px solid var(--main-text-color);
  border-bottom:2px solid var(--main-text-color);
}

.card__special_paragraph {
  position:absolute;
  right:25px;
  z-index:1;
  display:flex;
  justify-content:right;
  padding-top:25px;
  padding-left:15px;
  opacity:50%;
  color:var(--main-text-color);
  font-family:var(--second-font);
  font-size:var(--special-font-size);
  text-shadow:
   -1px -1px 0 var(--bg-color),
    1px -1px 0 var(--bg-color),
   -1px  1px 0 var(--bg-color),
    1px  1px 0 var(--bg-color);       
  font-variation-settings:"wght" var(--font-header-weight);
  -webkit-text-stroke:1px solid var(--bg-color);
  mix-blend-mode: hard-light;
}

@supports (-webkit-text-stroke: 1px var(--bg-color)) {

  .card__special_paragraph {
    text-shadow: none;
    -webkit-text-stroke: 1px var(--bg-color);
  }
  
}


.article__wrapper {
  display:grid;
  gap:25px;
  padding:25px 25px 25px 25px;
  font-size:var(--card-text-font-size);
  font-variation-settings:"wght" var(--font-card-text);
}

.card-bottom {
  display:flex;
  justify-content:right;
  gap:5px;
  padding-right:25px;
  padding-bottom:23px;
}

.button {
  border:2px solid var(--main-text-color);
  font-family:var(--second-font);
  background-color:var(--bg-color);
  font-variation-settings:"wght" var(--font-header-weight);
  position:relative;
  overflow:hidden;
  cursor: pointer;
}

.card__like-button {
  width:130px;
  height:38px;
}

.button__text {
  color:white;
  font-size:var(--special-font-size);
  font-variation-settings:"wght" var(--font-header-weight);
  mix-blend-mode:difference;
}

 .dialog {
    display: none;
    flex-direction: column;
    justify-content:center;
    align-items: center;
    gap:30px;
    width:100%;
    max-width:341px; 
    border: 2px solid var(--main-text-color);
    padding:30px 0px 30px 0px;
    background:var(--bg-color);
  }

  .dialog[open] {
    position:fixed;
    display: flex;
             
  }

  .dialog[open]::backdrop {
    background: rgba(0,0,0,0.75);
  }

  .dialog-content {
    display: flex;
    align-items: center;
    gap:20px;
    padding-left:30px;
  }

  .dialog-paragraph {
    width:234px;
    font-family:var(--second-font);
    font-size:var(--special-font-size);
    line-height:1.5;
    text-transform:uppercase;
    font-variation-settings:"wght" var(--font-header-weight);
  }

  .dialog-btn {
    width:261px;
    height:38px;
    padding:0;
    text-transform:uppercase;
  }

  /* .dialog_form {
    padding-top:30px;
  } */

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

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

.filter-rotate {
  filter: hue-rotate(-280deg);
}

.filter-sepia {
  filter: sepia(50%);
}

.filter-invert {
  filter: invert(0.4);
}

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

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

.save-btn {
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:8px;
  width:306px;
  height:84px;
  margin-right:34.5px;
  margin-left:34.5px;
  padding:0;
}

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


@media (width >= 1440px) {

    main {
      gap:50px;
      margin-top:98px;
    }


    .dialog {
      width:100%;
      max-width:353px;
    }

    .dialog-content {
      padding-left:0;
    }

    .dialog-btn {
      width:293px;
    }

    .header__info {
      padding:130px 122.5px 127px 122.5px;
    }

    .article__wrapper {
      padding-top:19px;
    }

    .card-bottom {
      padding-bottom:24px;
    }

    .save-btn {
      flex-direction:row;
      width:335px;
      height:55px;
      margin-right:182.5px;
      margin-left:182.5px;
    }

    .save-btn svg {
      width:21px;
      height:21px;
    }

}

.button:focus {
  box-shadow: 2px 2px 0 var(--main-text-color);
  outline:none;
  transition:0.3s ease;
}

.card__icon-button {
  display:flex;
  justify-content:center;
  align-items:center;
  width:39px;
  height:36px;
  border:2px solid transparent;
  padding:0;
  background-color:transparent;
}

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

.card__icon-button:focus-visible {
  border:2px solid var(--main-text-color);
  outline:none;
  transition:0.3s ease;
}

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

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

.diskette {
  flex-shrink: 0;
  color:white;
  mix-blend-mode:difference;
}

.sparks {
  opacity:0%;
}

.contour {
  transition:fill 0.1s linear 0s;
}

.core {
  transition:0.3s linear 0.03s;
}

.heart:hover .core {
  fill:var(--contour-color);
  transition:0.3s linear 0s;
}

.heart:hover .main-body {
  fill:var(--contour-color);
  transition:0.3s linear 0.05s;
}

.heart:active .core {
  fill:var(--animation-fill-color);
  transition:0.3s linear 0s;
}

.heart:active .main-body {
  fill:var(--animation-fill-color);
  transition:0.3s linear 0.05s;
}

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

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

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

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

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

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

.main-body {
  transition:0.3s linear 0s;
}

