/*! 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(c8ba52b05a9ef10f4758.woff2) format("woff2"),
       url(8c206db99195777c6769.woff) format("woff");
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(293fd13dbca5a3e450ef.woff2) format("woff2"),
       url(9053572c46aeb4b16caa.woff) format("woff");
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url(15ca31c0a2a68f76d2d1.woff2) format("woff2"),
       url(c6938660eec019fefd68.woff) format("woff");
}
.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: black;
  font-family: 'Inter', 'Arial', sans-serif;
  color: #FFFFFF;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.content {
  max-width: 880px;
  margin: 0 15.625% 0; 
}

@media screen and (max-width: 425px){
  .content {
    display: flex;
    flex-direction: column;
    margin: 0; 
  } 
}

.header {
  display: flex;
  justify-content: flex-start;
  align-items: start;
  min-height: 74px;
  padding-top: 40px;
  border-bottom: 1px solid rgb(84, 84, 84, 0.7);
}

@media screen and (max-width: 425px){
  .header {
    width: 320px;
    min-height: 56px;
    padding-top: 28px;
  } 
}
.header__logo {
  width: 142px;
  height: 33px;
}

@media screen and (max-width: 425px){
  .header__logo {
    width: 104px;
    height: 24px;
    margin-left: 27px;
  } 
} 
.profile {
  padding: 40px 0 50px;
  display: flex;
  align-items: center;
}

@media screen and (max-width: 768px) {
  .profile {
    flex-direction: column;
    max-width: 282px;
    padding: 42px 0 36px;
    margin: auto;
  } 
}

.profile__add-button {
  margin: auto 0 auto auto;
  width: 150px;
  min-height: 50px;
  background: black;
  cursor: pointer;
  border: 2px solid white;
  transition: .3s;
  background-image: url(d86bb2edc2f6eadb96b7.svg);
  object-fit: contain;
  background-repeat: no-repeat;
  background-color: black;
  background-position: center;
  padding: 0;
}

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

@media screen and (max-width: 768px) {
  .profile__add-button {
    margin: auto;
    width: 282px;
    height: 50px;
  }
} 

.profile__icon {
  width: 22px;
  height: 22px;
}

@media screen and (max-width: 425px) {
  .profile__icon {
    width: 16px;
    height: 16px;
  }
} 

.profile__avatar {
  display: flex;
  position: relative;
  justify-content: center;
  align-items: center;
  width: 120px;
  height: 120px;
}

.profile__avatar:hover .profile__overlay {
  background-color: rgb(0, 0, 0, .7);
  opacity: 1;
}
.profile__avatar-photo {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border-radius: 100%;
  object-fit: cover;
}





.profile__avatar-icon {
  width: 26px;
  height: 26px;
  position: absolute;
  top: 49px;
  left: 47px;
}
.profile__overlay {
  top: 0;
  left: 0;
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: .2s;
}
.profile__edit-button {
  grid-area: profile__edit-Button;
  width: 24px;
  height: 24px;
  background-image: url(8667ac4a523e8fc42e59.svg);
  object-fit: contain;
  background-repeat: no-repeat;
  background-color: black;
  background-position: center;
  margin: 0;
  padding: 0;
  cursor: pointer;
  border: 1px solid white;
  transition: .3s;
}

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

@media screen and (max-width: 425px) {
  .profile__edit-button {
    width: 18px;
    height: 18px;
    margin-bottom: 8px;
    margin-left: 8px;
    
  }
}
.profile__info {
  display: grid;
  grid-template-columns: auto 24px;
  grid-template-areas: "profile__name profile__edit-Button"
                       "profile__job .";
  row-gap: 16px;
  column-gap: 18px;
  align-items: end;
  margin-left: 30px;
  max-width: 430px;
}

@media screen and (max-width: 980px) {
  .profile__info {
    grid-template-columns: auto 18px;
    justify-content: flex-start;
    column-gap: 10px;
    margin-left: 14px;
    margin: 26px 0 33px;
    padding-left: 19px;
    row-gap: 6px;
    max-width: 200px;
  } 
}

@media screen and (max-width: 768px) {
  .profile__info {
    max-width: 250px;
    text-align: center;
  } 
}
.profile__job {
  grid-area: profile__job;
  font-weight: 400;
  font-size: 18px;
  line-height: 22px;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

@media screen and (max-width: 980px) {
  .profile__job {
    font-size: 14px;
    line-height: 17px;
  } 
}
.profile__name {
  grid-area: profile__name;
  font-weight: 500;
  font-size: 42px;
  line-height: 48px;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

@media screen and (max-width: 980px) {
  .profile__name {
    font-size: 27px;
    line-height: 33px;
  } 
}

.cards {
  display: grid;
  /* grid-template-columns: repeat(auto-fit, minmax(282px, 1fr)); */
  grid-template-columns: repeat(3, 282px);
  column-gap: 17px;
  row-gap: 25px;
  margin: auto;
  max-width: 880px;
  justify-content: center;
 }

 @media screen and (max-width: 980px){
  .cards {
    grid-template-columns: repeat(2, 282px);
  } 
}

@media screen and (max-width: 645px){
  .cards {
    row-gap: 20px;
    grid-template-columns: 282px;
  } 
}

.cards__caption {
  display: flex;
  justify-content: space-between;
  margin: 25px 15px 31px 21px;
  align-items: center;
  max-height: 23px;
}

.cards__image {
  width: 100%;
  min-height: 282px;
  max-height: 282px;
  vertical-align: top;
  transition: .3s;
  object-fit: cover;
}

.cards__image:hover {
  opacity: 0.85;
}
.cards__item {
  position: relative;
  border-radius: 10px;
  background: #FFFFFF;
  color: black;
  overflow: hidden;
  padding: 0;
  margin: 0; 
}

.cards__title {
  display: inline-block;
  font-weight: 900;
  font-size: 24px;
  line-height: 29px;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}
.cards__like {
  min-width: 22px;
  height: 19px;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  background-color: #FFFFFF;
  transition: .3s;
  background-image: url(87ed371465c7a6a1cd01.svg);
  background-size: 100%;
  background-position: center;
}

.cards__like:hover {
  opacity: 0.5;
}


.cards__counter-likes {
  font-size: 13px;
  margin: 3px auto 0;
}
.cards__likes-info {
  display: flex;
  flex-direction: column;
}
.cards__like_active{
  background-image: url(e787eeb70bb65b7b453a.svg);
}
.cards__basket {
  position: absolute;
  top: 5%;
  left: 86%;
  min-width: 18px;
  height: 19px;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  
  transition: .3s;
  background-image: url(cbc09a894bdd4c956365.svg);
  background-size: 100%;
  background-position: center;
}

.cards__basket:hover {
  opacity: 0.5;
}


.footer {
  margin: 0;
  padding: 66px 0 60px;
  display: flex;
  justify-content: start;
  align-items: center;
}

@media screen and (max-width: 425px){
  .footer {
    margin: auto;
    min-width: 282px;
    padding: 48px 0 36px;
  } 
}

.footer__copyright {
  font-weight: 400;
  font-size: 18px;
  line-height: 22px;
  margin: 0;
  color: #545454;
}

@media screen and (max-width: 425px){
  .footer__copyright {
    font-size: 14px;
    line-height: 17px;
  } 
}

.popup {
  display: flex;
  visibility: hidden;
  position: fixed;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: all .4s ease 0s;
}
.popup__form {
  position: relative;
}
.popup__button-close {
  position: absolute;
  width: 32px;
  height: 32px;
  right: -35px;
  top: -35px;
  cursor: pointer;
  padding: 0;
  border: none;
  background-color: rgba(0, 0, 0, 0);
  transition: .3s;
}

.popup__button-close:hover {
  opacity: .6;
}

@media screen and (max-width: 560px) {
  .popup__button-close {
    width: 20px;
    height: 20px;
    right: 0px;
}
}
.popup__icon {
  width: 100%;
  height: 100%;
}
.popup__button-save {
  width: 358px;
  min-height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000000;
  color: #FFFFFF;
  margin: 9.33px 0 37px;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  font-size: 18px;
  line-height: 22px;
  transition: .3s;
}

.popup__button-save:hover {
  opacity: .8;
}

@media screen and (max-width: 560px){
  .popup__button-save {
    max-width: 238px;
    min-height: 46px;
    margin: 9.33px 0 25px;
    font-size: 14px;
    line-height: 17px;
  } 
}
.popup__container {
  position: relative;
  width: 430px;
  background: #FFFFFF;
  box-shadow: 0px 0px 25px rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media screen and (max-width: 560px){
  .popup__container {
    width: 282px;
  } 
}
.popup__title {
  margin: 34px 0 54px;
  font-weight: 900;
  font-size: 24px;
  line-height: 29px;
  color: black;
  min-width: 362px;
  text-align: start; 
}

@media screen and (max-width: 560px) {
  .popup__title {
    min-width: 238px;
    margin: 25px 0 75px;
    font-size: 18px;
    line-height: 22px;
  } 
}
.popup__input {
  display: flex;
  justify-content: start;
  align-items: flex-start;
  min-width: 358px;
  min-height: 27px;
  font-weight: 400;
  font-size: 14px;
  line-height: 17px;
  padding: 0;
  border-top: none;
  border-left: none;
  border-right: none;
  border-bottom: 1px solid rgb(0, 0, 0, 0.2);
  /* margin-top: 30px; */
}

/* .popup__input:nth-child(1) {
  margin-top: 0px;
} */

@media screen and (max-width: 560px) {
  .popup__input {
    min-width: 238px;
  } 
}
.popup__container-image {
  position: relative;
}

.popup_opened {
  /* display: flex; */
  visibility: visible;
  opacity: 1;
}
.popup__card-image {
  max-width: 75vw;
  max-height: 75vh;
}
.popup__caption {
  margin-top: 10px;
  padding: 0;
  font-size: 12px;
  line-height: 15px;
}
.popup_image {
  background: rgba(0, 0, 0, .9);
}
.popup__button-save_disabled {
  opacity: .2;
  border: 1px solid #000000;
  color: #000000;
  background-color: white;
  pointer-events: none;
}
.popup__title_size_s {
  margin: 34px 0 22px;
}
.popup__input_type_error {
  border-bottom: 1px solid #FF0000;
}
.popup__input-error {
  font-size: 12px;
  line-height: 15px;
  color: #FF0000;
  display: flex;
  max-width: 358px;
  height: 30px;
}

@media screen and (max-width: 560px){
  .popup__input-error {
    max-width: 238px;
    font-size: 10px;
    line-height: 12px;
  } 
}

