/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */


/* Document

   ========================================================================== */


/**

 * 1. Correct the line height in all browsers.

 * 2. Prevent adjustments of font size after orientation changes in iOS.

 */


 html {

    line-height: 1.15; /* 1 */
  
    -webkit-text-size-adjust: 100%; /* 2 */
  
  }
  
  
  /* Sections
  
     ========================================================================== */
  
  
  /**
  
   * Remove the margin in all browsers.
  
   */
  
  
  body {
  
    margin: 0;
  
  }
  
  
  /**
  
   * Render the `main` element consistently in IE.
  
   */
  
  
  main {
  
    display: block;
  
  }
  
  
  /**
  
   * Correct the font size and margin on `h1` elements within `section` and
  
   * `article` contexts in Chrome, Firefox, and Safari.
  
   */
  
  
  h1 {
  
    font-size: 2em;
  
    margin: 0.67em 0;
  
  }
  
  
  /* Grouping content
  
     ========================================================================== */
  
  
  /**
  
   * 1. Add the correct box sizing in Firefox.
  
   * 2. Show the overflow in Edge and IE.
  
   */
  
  
  hr {
  
    box-sizing: content-box; /* 1 */
  
    height: 0; /* 1 */
  
    overflow: visible; /* 2 */
  
  }
  
  
  /**
  
   * 1. Correct the inheritance and scaling of font size in all browsers.
  
   * 2. Correct the odd `em` font sizing in all browsers.
  
   */
  
  
  pre {
  
    font-family: monospace, monospace; /* 1 */
  
    font-size: 1em; /* 2 */
  
  }
  
  
  /* Text-level semantics
  
     ========================================================================== */
  
  
  /**
  
   * Remove the gray background on active links in IE 10.
  
   */
  
  
  a {
  
    background-color: transparent;
  
  }
  
  
  /**
  
   * 1. Remove the bottom border in Chrome 57-
  
   * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
  
   */
  
  
  abbr[title] {
  
    border-bottom: none; /* 1 */
  
    text-decoration: underline; /* 2 */
  
    text-decoration: underline dotted; /* 2 */
  
  }
  
  
  /**
  
   * Add the correct font weight in Chrome, Edge, and Safari.
  
   */
  
  
  b,
  
  strong {
  
    font-weight: bolder;
  
  }
  
  
  /**
  
   * 1. Correct the inheritance and scaling of font size in all browsers.
  
   * 2. Correct the odd `em` font sizing in all browsers.
  
   */
  
  
  code,
  
  kbd,
  
  samp {
  
    font-family: monospace, monospace; /* 1 */
  
    font-size: 1em; /* 2 */
  
  }
  
  
  /**
  
   * Add the correct font size in all browsers.
  
   */
  
  
  small {
  
    font-size: 80%;
  
  }
  
  
  /**
  
   * Prevent `sub` and `sup` elements from affecting the line height in
  
   * all browsers.
  
   */
  
  
  sub,
  
  sup {
  
    font-size: 75%;
  
    line-height: 0;
  
    position: relative;
  
    vertical-align: baseline;
  
  }
  
  
  sub {
  
    bottom: -0.25em;
  
  }
  
  
  sup {
  
    top: -0.5em;
  
  }
  
  
  /* Embedded content
  
     ========================================================================== */
  
  
  /**
  
   * Remove the border on images inside links in IE 10.
  
   */
  
  
  img {
  
    border-style: none;
  
  }
  
  
  /* Forms
  
     ========================================================================== */
  
  
  /**
  
   * 1. Change the font styles in all browsers.
  
   * 2. Remove the margin in Firefox and Safari.
  
   */
  
  
  button,
  
  input,
  
  optgroup,
  
  select,
  
  textarea {
  
    font-family: inherit; /* 1 */
  
    font-size: 100%; /* 1 */
  
    line-height: 1.15; /* 1 */
  
    margin: 0; /* 2 */
  
  }
  
  
  /**
  
   * Show the overflow in IE.
  
   * 1. Show the overflow in Edge.
  
   */
  
  
  button,
  
  input {
  
    /* 1 */
  
    overflow: visible;
  
  }
  
  
  /**
  
   * Remove the inheritance of text transform in Edge, Firefox, and IE.
  
   * 1. Remove the inheritance of text transform in Firefox.
  
   */
  
  
  button,
  
  select {
  
    /* 1 */
  
    text-transform: none;
  
  }
  
  
  /**
  
   * Correct the inability to style clickable types in iOS and Safari.
  
   */
  
  
  button,
  
  [type="button"],
  
  [type="reset"],
  
  [type="submit"] {
  
    -webkit-appearance: button;
  
  }
  
  
  /**
  
   * Remove the inner border and padding in Firefox.
  
   */
  
  
  button::-moz-focus-inner,
  
  [type="button"]::-moz-focus-inner,
  
  [type="reset"]::-moz-focus-inner,
  
  [type="submit"]::-moz-focus-inner {
  
    border-style: none;
  
    padding: 0;
  
  }
  
  
  /**
  
   * Restore the focus styles unset by the previous rule.
  
   */
  
  
  button:-moz-focusring,
  
  [type="button"]:-moz-focusring,
  
  [type="reset"]:-moz-focusring,
  
  [type="submit"]:-moz-focusring {
  
    outline: 1px dotted ButtonText;
  
  }
  
  
  /**
  
   * Correct the padding in Firefox.
  
   */
  
  
  fieldset {
  
    padding: 0.35em 0.75em 0.625em;
  
  }
  
  
  /**
  
   * 1. Correct the text wrapping in Edge and IE.
  
   * 2. Correct the color inheritance from `fieldset` elements in IE.
  
   * 3. Remove the padding so developers are not caught out when they zero out
  
   *    `fieldset` elements in all browsers.
  
   */
  
  
  legend {
  
    box-sizing: border-box; /* 1 */
  
    color: inherit; /* 2 */
  
    display: table; /* 1 */
  
    max-width: 100%; /* 1 */
  
    padding: 0; /* 3 */
  
    white-space: normal; /* 1 */
  
  }
  
  
  /**
  
   * Add the correct vertical alignment in Chrome, Firefox, and Opera.
  
   */
  
  
  progress {
  
    vertical-align: baseline;
  
  }
  
  
  /**
  
   * Remove the default vertical scrollbar in IE 10+.
  
   */
  
  
  textarea {
  
    overflow: auto;
  
  }
  
  
  /**
  
   * 1. Add the correct box sizing in IE 10.
  
   * 2. Remove the padding in IE 10.
  
   */
  
  
  [type="checkbox"],
  
  [type="radio"] {
  
    box-sizing: border-box; /* 1 */
  
    padding: 0; /* 2 */
  
  }
  
  
  /**
  
   * Correct the cursor style of increment and decrement buttons in Chrome.
  
   */
  
  
  [type="number"]::-webkit-inner-spin-button,
  
  [type="number"]::-webkit-outer-spin-button {
  
    height: auto;
  
  }
  
  
  /**
  
   * 1. Correct the odd appearance in Chrome and Safari.
  
   * 2. Correct the outline style in Safari.
  
   */
  
  
  [type="search"] {
  
    -webkit-appearance: textfield; /* 1 */
  
    outline-offset: -2px; /* 2 */
  
  }
  
  
  /**
  
   * Remove the inner padding in Chrome and Safari on macOS.
  
   */
  
  
  [type="search"]::-webkit-search-decoration {
  
    -webkit-appearance: none;
  
  }
  
  
  /**
  
   * 1. Correct the inability to style clickable types in iOS and Safari.
  
   * 2. Change font properties to `inherit` in Safari.
  
   */
  
  
  ::-webkit-file-upload-button {
  
    -webkit-appearance: button; /* 1 */
  
    font: inherit; /* 2 */
  
  }
  
  
  /* Interactive
  
     ========================================================================== */
  
  
  /*
  
   * Add the correct display in Edge, IE 10+, and Firefox.
  
   */
  
  
  details {
  
    display: block;
  
  }
  
  
  /*
  
   * Add the correct display in all browsers.
  
   */
  
  
  summary {
  
    display: list-item;
  
  }
  
  
  /* Misc
  
     ========================================================================== */
  
  
  /**
  
   * Add the correct display in IE 10+.
  
   */
  
  
  template {
  
    display: none;
  
  }
  
  
  /**
  
   * Add the correct display in IE 10.
  
   */
  
  
  [hidden] {
  
    display: none;
  
  }
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(85c128721035823e5405.woff2) format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(da6143a97b8ed2ae857b.woff2) format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url(037d78a2cd9135e7d2c1.woff2) format("woff2");
}

.page {
  max-width: 1280px;
  font-family: "Inter", Arial, Helvetica, sans-serif;
  background-color: black;
  color: white;
  margin: auto;
  padding: 0;
  font-size: 16px;
  line-height: 1.25;
}

.page__section {
  max-width: 880px;
  width: 100%;
  position: relative;
  margin: 0 auto;
}

.page__content {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 0 20px;
}

@media screen and (max-width: 636px) {
  .page__content {
    padding: 0;
  }

  .content {
    margin: 0 19px;
  }
}

.header {
  max-width: 880px;
  border-bottom: 1px solid rgba(84 84 84 / 0.7);
  display: flex;
  min-height: 74px;
  padding-top: 45px;
}

.header__logo {
  width: 173px;
  height: 33px;
}

@media screen and (max-width: 636px) {
  .header__logo {
    width: 126px;
    height: 24px;
    padding-bottom: 32px;
    margin-left: 27px;
  }

  .header {
    padding-top: 28px;
    min-height: 56px;
  }
}

.footer {
  max-width: 880px;
  color: #545454;
  margin: 67px auto 60px;
}

.footer__copyright {
  font-family: "Inter", Arial, sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: #545454;
  max-width: 318px;
  line-height: 1.2;
  margin: 0;
}

@media screen and (max-width: 480px) {
  .footer__copyright {
    font-size: 14px;
  }

  .footer {
    max-width: 282px;
    margin: 48px auto 36px;
  }
}

.profile {
  display: flex;
  align-items: center;
  padding: 40px 0 51px;
  margin: 0 auto;
  max-width: 880px;
}

.profile__info {
  display: grid;
  grid-template-areas:
    "title button"
    "description description";
  grid-template-columns: minmax(auto, auto) auto;
  align-items: center;
  row-gap: 7px;
  margin-left: 30px;
  column-gap: 18px;
}

.profile__edit-button {
  background: transparent url(a1892ea72cb87c8fc3aa.svg) center no-repeat;
  height: 24px;
  width: 24px;
  grid-area: button;
  border: 1px solid white;
}

.profile__edit-button:hover {
  opacity: 0.6;
  cursor: pointer;
}

.profile__add-button {
  background: transparent url(d86bb2edc2f6eadb96b7.svg) center no-repeat;
  width: 150px;
  height: 50px;
  margin-left: auto;
  border: 2px solid white;
}

.profile__add-button:hover {
  opacity: 0.6;
  cursor: pointer;
}

.profile__title {
  font-size: 42px;
  line-height: 48px;
  font-weight: 500;
  grid-area: title;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  max-width: 400px;
}

.profile__description {
  font-size: 18px;
  line-height: 22px;
  font-weight: 400;
  grid-area: description;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  max-width: 400px;
}

.profile__image {
  height: 120px;
  width: 120px;
  border-radius: 50%;
  object-fit: cover;
  background-position: center;
}

.profile__avatar {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
}

.profile__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile__avatar-edit {
  position: absolute;
  inset: 0;
  border: none;
  background:
    rgba(0, 0, 0, 0.6)
    url(a086f758840ae814ecde.svg)
    center / 26px 26px
    no-repeat;
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.profile__avatar:hover .profile__avatar-edit {
  opacity: 1;
}

@media screen and (max-width: 770px) {
  .profile__title {
    font-size: 22px;
    line-height: normal;
    max-width: 196px;
  }
}

@media screen and (max-width: 680px) {
  .profile {
    flex-direction: column;
    align-items: center;
    padding-top: 42px;
    max-width: 282px;
    padding-bottom: 36px;
  }

  .profile__image {
    display: flex;
    justify-content: center;
    margin: 0 auto;
  }

  .profile__title {
    font-size: 22px;
    line-height: normal;
    max-width: 196px;
  }

  .profile__description {
    font-size: 14px;
    text-align: center;
    line-height: 17px;
  }

  .profile__info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 282px;
    grid-gap: 14px 10px;
    margin-top: 30px;
    margin-left: 19px;
    margin-bottom: 36px;
    width: 100%;
  }

  .profile__add-button {
    margin-left: auto;
    width: 282px;
    padding: 0;
  }

  .profile__edit-button {
    margin: 0;
    width: 18px;
    height: 18px;
  }
}


.cards {
  /*fonts */
  flex-direction: column-reverse;
  display: flex;
}

.cards__list {
  display: grid;
  justify-content: center;
  grid-template-columns: repeat(auto-fit, 282px);
  grid-gap: 20px 17px;
  padding: 0;
  margin: 0;
}

.card {
  display: flex;
  width: 282px;
  height: 361px;
  flex-direction: column;
  list-style: none;
  border-radius: 10px;
  overflow: hidden;
  font-family: "Inter", Arial, sans-serif;
  position: relative;
}

.card__image {
  width: 100%;
  height: 282px;
  object-fit: cover;
}

.card__image_preview {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 10px;
}

.card__description {
  display: flex;
  background-color: white;
  color: black;
  padding-top: 25px;
  padding-bottom: 25px;
  padding-left: 20px;
  padding-right: 20px;
  align-items: center;
  justify-content: space-between;
  border-radius: 0 0 10px 10px;
}

.card__title {
  max-width: 220px;
  font-size: 24px;
  font-weight: 900;
  line-height: 29px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  margin: 0;
}

.card__like-button {
  background: transparent url(490e8e45f6fd07daa7ff.svg) center no-repeat;
  width: 21px;
  height: 18px;
  border: none;
}

.card__like-button_active {
  background-image: url(226461bd64622361ffb2.svg);
}

.card__image-container {
  position: relative;
  width: 282px;
  height: 282px;
  cursor: pointer;
}




.card__like-button:hover {
  opacity: 0.5;
  cursor: pointer;
}

.card__delete-button {
  background: transparent url(c4956c32989e66228de8.svg) center no-repeat;
  width: 21px;
  height: 18px;
  border: none;
  position: absolute;
  top: 15px;
  right: 15px;
  cursor: pointer;
}
.modal {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: flex;
  padding: 19px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal_opened {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal__container {
  position: relative;
  background-color: #fff;
  margin: auto;
  padding: 36px;
  border-radius: 10px;
  box-sizing: border-box;
}

.modal__container_type_preview {
  display: flex;
  flex-direction: column;
  align-items: center; /* centers the image */
  justify-content: center;
  background-color: transparent;
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  padding: 0;
  flex-wrap: nowrap;
}

.modal__caption {
  font-family: "Inter", arial, sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 14.52px;
  text-align: left; /* left-align text */
  color: rgba(255, 255, 255, 1);
  margin-top: 10px; /* 10px space from the image */
  display: block;
  width: 100%;
}

.modal__close {
  height: 40px;
  width: 40px;
  position: absolute;
  cursor: pointer;
  top: -45px;
  right: -45px;
  background-image: url(61b629a4dc3574160af9.svg);
  border: none;
  background-color: transparent;
  background-repeat: no-repeat;
  background-size: contain;
  transition: 1s;
}

.modal__close:hover {
  opacity: 0.6;
}

.modal__close_preview {
  top: -50px;
  right: -50px;
}

.modal__form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.modal__heading {
  max-width: 330px;
  font-family: "Inter", arial, sans-serif;
  font-size: 24px;
  font-weight: 900;
  color: #000;
  margin: 0;
  margin-bottom: 54px;
}

.modal__input {
  font-size: 14px;
  line-height: 17px;
  border-right: none;
  border-left: none;
  border-top: none;
  font-family: "Inter", arial, sans-serif;
  padding-bottom: 10px;
  border-bottom: solid 1px rgb(0 0 0 / 0.2);
  display: block;
  width: 100%;
}

.modal__button {
  cursor: pointer;
  width: 358px;
  height: 50.15px;
  background-color: black;
  color: white;
  font-size: 18px;
  font-family: "Inter", arial, sans-serif;
  margin-top: 25px;
  line-height: 21.78px;
  border: none;
  border-radius: 2px;
}

.modal__button:hover {
  opacity: 60%;
}

.modal__error {
  font-size: 12px;
  line-height: 15px;
  color: #ff0000;
  margin-top: 5px;
  display: block;
  transition: opacity 0.3s;
  max-width: 330px;
}

.modal__error_visible {
  opacity: 1;
}

/* Input error state */
.modal__input_type_error {
  border-bottom: 2px solid #ff0000; /* red underline */
}

/* Disabled Save button style */
.modal__button_disabled {
  background-color: #f0f0f0;
  color: #b0b0b0;
  border: 1px solid #d0d0d0;
  cursor: default;
  opacity: 1;
  pointer-events: none;
}

@media screen and (max-width: 480px) {
  .modal__container {
    width: 100%;
    padding: 22px;
  }

  .modal__close {
    width: 26px;
    height: 26px;
    left: unset;
    right: 0;
    bottom: calc(100% + 18px);
  }

  .modal__heading {
    max-width: 238px;
    font-size: 18px;
    line-height: 18px;
    margin-bottom: 63px;
  }

  .modal__input {
    flex-shrink: 0;
  }

  .modal__button {
    height: 46px;
    flex-shrink: 0;
    width: 100%;
    font-size: 14px;
    line-height: 16.94px;
  }
}



