.contests-wrapper {
    background-color: #fff;
    margin: 50px;
    border-radius: 10px;
    display: grid;
    gap: 75px;
    padding: 75px;
    scroll-margin-top: 128px;
}

.contest {
    width: 90%;
    gap: 20px;
    display: grid;
    border-radius: 20px;
    padding: 15px 25px;
    align-items: center;
    scroll-margin-top: 128px;
}

.contest-foto {
    width: 650px;
    height: 700px;
}

.contest-links {
    margin: 40px 0;
}

.contest-foto img {
    width: 650px;
    height: 700px;
    border-radius: 15px;
    /* object-fit: contain; */
}

.contest-title {
    font-size: 20pt;
    color: #184677;
    font-weight: 600;
}

.contest-desc {
    font-weight: 100;
    font-size: 13pt;
}

.contest-info p {
    display: grid;
    grid-auto-flow: column;
    align-items: center;
    gap: 30px;
    text-align: left;
    justify-content: start;
}

.contest-info p img {
    width: 48px;
}

.contests-popup {
    position: sticky;
    bottom: 0;
    z-index: 3;
    margin: 50px;
    width: 60%;
    background: white;
    border-radius: 15px;
    justify-self: center;
    overflow-y: auto;
    display: none;
}

.contests-popup .popup-image {
    background-image: url("/static/assets/images/contests/4776ebff-32f7-4fae-b055-4d9e5e68de60.jpg");
    background-size: cover;
    background-repeat: no-repeat;
    width: 100%;
    height: 600px;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.contests-popup .popup-info {
    display: grid;
    /* justify-content: center; */
    font-size: 18pt;
    gap: 20px;
    margin: 40px 40px;
    align-items: center;
}

.contests-popup .popup-info p {
    display: grid;
    grid-auto-flow: column;
    align-items: center;
    gap: 30px;
    text-align: left;
    justify-content: start;
}

.contests-popup .popup-info p img {
    width: 48px;
}






.portfolio-wrap {
    max-width: 1500px;
    margin: 0 auto;
    display: grid;
    justify-content: center;
    /* flex-wrap: wrap; */
    grid-template-columns: repeat(auto-fill, minmax(100px, 700px));
 }
 .portfolio-item {
    padding: 10px;
    user-select: none;
 }
 .portfolio-item a {
    display: block;
    text-decoration: none;
    color: white;
 }
 .portfolio-item-wrap {
    position: relative;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 0 5px rgba(0, 0, 0, .2);
    background: black;
    color: white;
    height: 100%;
 }
 .portfolio-item img {
    display: block;
    width: 100%;
    opacity: .75;
    transition: .5s ease-in-out;
    max-width: 700px;
    height: 100%;
 }
 .portfolio-item-inner {
    position: absolute;
    top: 45%;
    left: 7%;
    right: 7%;
    bottom: 45%;
    border: 1px solid white;
    border-width: 0 1px 1px;
    transition: .4s ease-in-out;
 }
 .portfolio-heading {
    overflow: hidden;
    transform: translateY(-50%);
 }
 .portfolio-heading h3 {
    font-family: 'Roboto', sans-serif;
    font-weight: normal;
    display: table;
    margin: 0 auto;
    padding: 0 10px;
    position: relative;
 }
 .portfolio-heading h3:before, .portfolio-heading h3:after {
    content: "";
    position: absolute;
    top: 50%;
    width: 50px;
    height: 1px;
    background: white;
 }
 .portfolio-heading h3:before {
    left: -50px;
 }
 .portfolio-heading h3:after {
    right: -50px;
 }

 .portfolio-heading:after {
    content: 'Наведите курсор на блок для подробностей';
    font-size: 8pt;
 }
 .portfolio-item-inner ul {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    /* padding: 0 20px; */
    opacity: 0;
    list-style: none;
    font-family: 'Roboto', sans-serif;
    pointer-events: none;
    transition: .4s ease-in-out;
	height: 90%;
    overflow: auto;
 }
 .portfolio-item-inner li {
    position: relative;
    font-size: 14px;
    padding: 10px 0;
    margin-bottom: 4px;
 }

 .portfolio-item-inner li:hover {
    text-decoration: underline;
 }

 .portfolio-item-inner li:after {
    content: "";
    position: absolute;
    left: 50%;
    margin-left: -2px;
    bottom: -4px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: white;
    box-shadow: 10px 0 0 white, -10px 0 0 white;
 }
 .portfolio-item-inner li:last-child:after {
    content: none;
 }
 .portfolio-item:hover img, .portfolio-item.hover-class img {
    opacity: 0.45;
    transform: scale(1.1);
 }
 .portfolio-item:hover .portfolio-item-inner,  .portfolio-item.hover-class .portfolio-item-inner {
    top: 7%;
    bottom: 7%;
 }
 .portfolio-item:hover ul {
    pointer-events: all;
    opacity: 1;
    transition-delay: .5s;
 }

 .portfolio-item.hover-class ul {
    opacity: 1;
    transition-delay: .5s;
 }

 .portfolio-item:hover  .portfolio-heading:after,  .portfolio-item.hover-class  .portfolio-heading:after {
    content: '';
 }

.contest a:not(.reg) {
    color: black;
}

.contest a:focus, .contest a:hover {
    opacity: 0.6;
}

.contest h2 {
    justify-self: center;
}

.contest-dates {
  list-style-type: none;
  gap: 30px;
  display: grid;
}

.anchors {
  display: grid;
  justify-items: start;
  padding: 20px 40px 20px 40px;
  font-size: 20px;
}

.anchors ul {
    list-style-type: "— ";
    gap: 15px;
    display: grid;
}

.anchors ul a {
    color: black;
}

.reg {
  padding: 20px 55px;
  font-size: 13pt;
  border-radius: 5px;
  cursor: pointer;
  background-color: #ff7e0a;
  color: #fff;
  font-weight: 600;
  outline: none;
  justify-self: center;
  height: auto;
  text-decoration: none;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.second-par {
    color: #2563eb;
}

.not-find-contest {
  display: grid;
  grid-auto-flow: row;
  justify-items: center;
  background: white;
  border-radius: 20px;
  color: #151331;
  padding: 40px 0px;
  gap: 20px;
  margin-bottom: 20px;
  margin-top: 20px;
  width: 60%;
  justify-self: center;
  scroll-margin-top: 128px;
}

#contest {
  display: grid;
}

.not-find-contest h2 {
  max-width: 800px;
  text-align: center;
}

@media screen and (max-width: 1395px) {
  .not-find-contest {
    width: 80%;
  }
}

@media screen and (max-width: 1324px) {

    .contest {
        width: 90%;
    }

    .contest-foto {
        width: 550px;
        height: 600px;
    }

    .contest-foto img {
        width: 550px;
        height: 600px;
    }
}

@media screen and (max-width: 1100px) {

    .contest-foto {
        width: 450px;
        height: 500px;
    }

    .contest-foto img {
        width: 450px;
        height: 500px;
    }
}

@media screen and (max-width: 959px) {
    .contests-wrapper {
        /* grid-template-columns: repeat(auto-fill, 200px); */
        padding: 10px;
    }

    .contest {
       width: 90%;
    }

    .contest-foto {
        width: 300px;
        height: 350px;
    }

    .contest-foto img {
        width: 300px;
        height: 350px;
    }
}

@media screen and (max-width: 800px) {
    .contest {
       grid-template-rows: auto auto;
       width: 90%;
       grid-template-columns: auto;
    }

    .contest-foto {
        width: 300px;
        height: 350px;
    }

    .contest-foto img {
        width: 300px;
        height: 350px;
    }
}

@media screen and (max-width: 724px) {
    .contest {
        width: 90%;
    }

    .contest-foto {
        width: 300px;
        height: 400px;
    }

    .contest-foto img {
        width: 300px;
        height: 400px;
    }

    .anchors {
        font-size: 16px;
    }

    .portfolio-heading:after {
        content: 'Нажмите на блок для подробностей';
     }

     .portfolio-item-inner ul {
        grid-template-columns: repeat(auto-fill, minmax(100px, 155px));
        display: grid;
        justify-content: center;
		padding-top: 30px;
    }

    .portfolio-item-inner ul li {
        font-size: 8pt;
    }

    .portfolio-item-inner li:after {
        content: none;
     }
}

@media screen and (max-width: 629px) {
  .not-find-contest {
    width: 95%;
  }

  .not-find-contest h2 {
    font-size: 16px;
  }

  .not-find-contest .politics {
    font-size: 13px;
  }
}

@media screen and (max-width: 500px) {
    .contests-wrapper {
        border-radius: 0px;
    }

    .contest-title {
        font-size: 12pt;
        text-align: center;
    }

    .contest-desc {
        font-size: 8pt;
        text-align: center;
    }

    .contest-links {
        font-size: 10pt;
    }

    .contests-wrapper {
        margin: 0px;
    }

    .portfolio-item-inner ul li {
        font-size: 7pt;
    }
}

@media screen and (max-width: 400px) {
    .portfolio-item-inner ul {
        grid-template-columns: repeat(auto-fill, minmax(100px, 143px));
        display: grid;
        justify-self: center;
        align-self: center;
    }

    .portfolio-item-inner ul li {
        font-size: 7pt;
    }

    .portfolio-item-inner li:after {
        content: none;
     }
}