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

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

*/
.page {
    min-inline-size: 320px;
    min-block-size: 100dvb;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: var(--main-font, sans-serif), sans-serif;
    font-variation-settings: "wght" var(--regular);
    font-size: 18px;
    line-height: 116.6%;
    color: var(--main-color);
    background-image: var(--background-image);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

.frame {
    border: 2px solid var(--main-color);
}

.content {
    inline-size: var(--content-inline-size);
}

.header {
    padding-block: var(--container-padding-block);
    padding-inline: var(--container-padding-inline);
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    margin-block: 98px 98px;
    font-family: var(--accent-font, monospace), monospace;
    font-weight: 400;
    text-transform: uppercase;
    background-color: var(--card-bg);
}

.header_link {
    text-decoration: none;
}

.logo {
    font-size: var(--logo-height);
    line-height: 100%;
}

.title {
    font-size: var(--main-title);
    line-height: 100%;
}

.card {
    background-color: var(--card-bg);
}

.card__title {
    padding: 4px 10px;
    font-size: var(--text-font-size);
    font-variation-settings: "wght" var(--bold);
}

.card__image {
    margin: 0;
    position: relative;
    aspect-ratio: 1 / 1;
    border-top: 2px solid var(--main-color);
    border-bottom: 2px solid var(--main-color);
}

.card__image-item {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.bright {
    filter: brightness(50%);
}

.grayscale {
    filter: grayscale(0.6);
}

.saturate {
    filter: saturate(400%);
}

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

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

.sepia {
    filter: sepia(90%);
}

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

.mix {
    filter: hue-rotate(90deg) contrast(50%) brightness(120%);
}

.card__image-symbol {
    position: absolute;
    top: 25px;
    right: 25px;
    font-family: var(--accent-font, monospace), monospace;
    font-size: 14px;
    font-weight: 400;
    line-height: 100%;
    text-transform: uppercase;
    mix-blend-mode: hard-light;
    opacity: 0.5;
    text-shadow: 1px 1px var(--text-shadow-color);
}

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

.card__discription {
    padding: 25px 25px 0 25px;
}

.card__like {
    padding: 25px;
    display: flex;
    gap: 7px;
    justify-content: end;
    align-items: center;
}

.button__text {
    font-family: var(--accent-font, monospace), monospace;
    font-size: 14px;
    font-weight: 400;
    line-height: 90%;
    mix-blend-mode: difference;
    color: var(--main-color-negative);
}

.card__like-button {
    inline-size: 130px;
    block-size: 38px;
    background-color: transparent;
    text-align: center;
}

.button {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.button::before {
    content: " ";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: var(--main-color);
    transition: transform 0.5s ease-in-out;
}

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

.button:focus {
    outline: none;
}

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

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

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

.card__icon-button:focus-visible {
    border-color: var(--main-color);
}

.contour {
    transition: fill 0.1s linear;
}

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

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

.sparks {
    opacity: 0;
}

.heart {
    transform-origin: center;
}

.like-icon {
    flex-shrink: 0;
}

.like-icon:hover .core {
    fill: var(--main-color);
    transition: fill 0.3s linear;
}

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

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

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

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

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

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

.cards-list-item:not(:last-child) {
    margin-bottom: 52px;
}

.button_save {
    margin: 50px auto 100px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--card-bg);
}

.floppy-image {
    color: var(--main-color-negative);
    mix-blend-mode: difference;
    width: 21px;
    height: 21px;
}

.floppy-image-xl {
    flex-shrink: 0;
    block-size: 39px;
    inline-size: 39px;
}

.insert__floppy {
    padding: 30px;
    max-inline-size: 353px;
}

.insert__floppy[open] {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.insert__floppy::backdrop {
    background-color: rgb(0 0 0 / 0.8);
}

.capitals {
    text-transform: uppercase;
    line-height: 150%;
}

.massage_window {
    display: flex;
    gap: 20px;
    align-items: center;
}

.text_height {
    text-transform: uppercase;
}

.button_save_positive {
    background-color: transparent;
    padding-block-start: 12.5px;
    padding-block-end: 10px;
    inline-size: 100%;
    line-height: 90%;
}

@media (width <= 376px) {
    .button_save {
        flex-direction: column;
    }
    .floppy-image {
        width: 28px;
        height: 28px;
    }
    .insert__floppy {
        padding: 30px 40px;
    }
}