* {
  margin: 0px;
  padding: 0px;
  box-sizing: border-box; 
  font-family: 'Open Sans', sans-serif;
  transition: .2s ease-in-out;
}
html, body {
  height: 100%;
  min-height: 100%;
}

/* Общие */
section {
  margin-top: 63px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 50px 20px;
 }

 @media (max-width: 1000px){

  section{
    padding: 50px 50px;
  }

}

@media (max-width: 600px){

  section{
    padding: 30px 30px;
  }

}

nav, ul {
	list-style: none;
	/*margin-top:15px;*/
}

a {
	text-decoration: none;
	color: #f85c37;
	padding:10px;	
  cursor: pointer;
}

header nav a:hover, a:focus {
	color: #1C85BB;
}

.hr {
  width: 50%;
  height: 2px;
  background-color: #2196F3;
  border: 0;
  margin-bottom: 25px;
}

.clearfix:before,
.clearfix:after {
  content: " ";
  display: table;
}
.clearfix:after {clear: both;}

/*картинка вверху*/
section.box-header, 
section.box-me,
section.box-igra {
  margin-top: -63px;
}

.box-header, .box-me, .box-igra {
  position: relative;
  justify-content: center;
  min-height: 80vh;
  color: #000;
  text-align: center;
}

.background-image,
.background-image-me,
.background-image-igra {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../img/4.jpg') no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
  z-index: -1;
}

.background-image:after,
.background-image-me:after,
.background-image-igra:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;
  opacity: 0.65;
}

.box-header h1{
  font: bold 60px 'Bad Script', sans-serif;
  margin-bottom: 15px;
}

.box-header h2, .box-me h2, .box-igra h2 {
  font: normal 28px 'Bad Script', sans-serif;
}

/* Шапка */
header{
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  width: 100vw;
  color: #fff;
  padding: 20px 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  line-height: 30px;
}

header h2 {
  margin-left: 20px;
  font-size: 1.25em;
}

header nav {
  display: flex;
  font-weight: 900;
}

header nav li {
  display: inline-block;
  margin-right: 10px;
}

header nav li:last-child{
  margin-right: 20px;  
}

@media (max-width: 980px){
  header{
    flex-direction: column; 
    padding: 20px 20px;
  }

  header h2 {
  margin-left: 0;
  margin-bottom: 10px;
}

}

@media (max-width: 700px){

  header{
    flex-direction: column;   
  }

  header h2{
    margin-bottom: 10px;
  }

  header nav li {
    margin-right: 5px;
  }

  header nav li:last-child{
    margin-right: 0;  
  }

}

.menu-icon {
  text-align: right;
  position: absolute;
  right: 5%;
  top: 30%;
  display: none;
}

.menu-icon>i {
  font-size: 1.5625em;
  color: #f85c37;
}

@media (max-width: 600px){

  .menu-icon {
    display: block;
  }

  .menu {
    position: absolute;
    /*top: 100%;*/
    left: 0;
    right: 0;
    display: none;
    background: #FFFFFF;
    text-align: center;
  }

  .menu li {
    display: block;
    margin-right: 0;
  }

  .menus li:last-child{
    margin-bottom: 5px;  
  }

  .menu a {
    width: 100%;
    padding: 5px;
    display: block;
    background: aliceblue;
    text-decoration: none;
    margin: 1px 0;
  }


}

/*слайдер*/
.slider {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
}

.slider span {
  font-family: 'Bad Script', sans-serif !important;
  color: #fff;
  font-size: 2rem;
  text-shadow: 0 0 10px #fff;
}

.item {
  height: 60vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-basis: 25%;
  transition: all 0.2s;
}

.item:hover {
  flex-basis: 70%;
}

.item-1 {
  background: url('../img/7.jpg') no-repeat center center;
  background-size: cover;
}

.item-2 {
  background: url('../img/15.jpg') no-repeat center center;
  background-size: cover;
}

.item-3 {
  background: url('../img/9.jpg') no-repeat center center;
  background-size: cover;
}

.item-4 {
  background: url('../img/10.jpg') no-repeat center center;
  background-size: cover;
}

@media (max-width: 640px) {
  .slider {
    flex-flow: column; /*переворот оси*/
    height: 100vh;
  }

  .item {
    width: 100%;
  }

  .item:hover {
    flex-grow: 30%;
  }
}
/*конец слайдера*/

/*gallery*/
#gallery {
  padding: 50px 0;
}

section h3.title {
  color: #414a4f;
  text-transform: capitalize; /*первая буква в тексте заглавная*/
  font-weight: bold;
  font-size: 2em;
  font-family: 'Open Sans', sans-serif;
  margin-bottom: 20px;
  /*text-align: center;*/
}

section p {
  max-width: 800px;
  margin-bottom: 20px;
  padding: 0 20px;
  line-height: 2;
}

ul.grid {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.gallery {
  background-color: #F9F9F9; /* Фон */
  padding: 10px; /* Внутренние отступы */
  margin: auto;
}

.gallery .grid li {
  padding: 5px;
  height: 350px;
  opacity: 0.5;
  background-clip: content-box;
  background-size: cover;
  background-position: center;

-webkit-transition: all 0.3s ease-out;
   -moz-transition: all 0.3s ease-out;
     -o-transition: all 0.3s ease-out;

}

li.small {
  width: 38%;
}

li.large {
  width: 58%;
}

.gallery .grid li:hover, .gallery .grid li:hover {
  margin-top: 5px;
  opacity: 1;
}

@media (max-width: 900px) {
    
    li.small, li.large {
      width: 90%;
    } 

}

/* Обо мне, специализация */
.about-me>p>a {
  padding: 0;
}

.about-me p {
  font-family: 'Open Sans', sans-serif;
  color: #999999;
  margin-bottom: 20px;
}

.about {
  margin-top: 0;
}
.about .grid {
  margin-top: 30px;
}

.about .grid li {
  padding: 0 30px;
  width: 33%;
  text-align: center;
}

.about .grid li i{
    font-size: 3.125em;
    color: #fa7921;
    margin-bottom: 20px;
}

.about .grid li h4 {
  color: #555;
  font-size: 1.5625em;
  margin-bottom: 25px;
}

.about .grid li p {
  margin: 0;
  margin-bottom: 30px;
}

@media (max-width: 1000px){

  .about .grid li{
    width: 70%;
  }

  .about .grid li:last-child{
    margin-bottom: 0;
  }

}  

@media (max-width: 700px){

  .about .grid li{
    width: 100%;
  }

}

/*приветствие обо мне*/
.box-me {
  min-height: 60vh;
}

.background-image-me {
  background: url('../img/box-me.jpg') no-repeat bottom center;
  background-size: cover;
  z-index: -1;
}

#about {
  padding: 100px 0;
  margin-bottom: -40px;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
}

#about p {
  margin: 0;
  padding: 0 10px 0 0;
}

.photo-me {
  width: 45%;
}
.photo-me img {
  display: block;
  margin: 0 auto;
  height: 50vh;
  -webkit-border-radius: 4px;
     -moz-border-radius: 4px;
          border-radius: 10px 10px 100px 200px;

  -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
     -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
          box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);

  border: 1px #CCCCCC solid;
  animation: skew 2s linear infinite;
}

@keyframes skew {
  0% { transform: skew(0deg);}
  25% {transform: skew(15deg);}
  50% {transform: skew(0deg);}
  75% {transform: skew(-15deg);}
  100% {transform: skew(0deg);}
}
.photo-me img:hover{
  /*transform: skew(15deg);*/
  animation-play-state: paused;
}
.about-me {
  width: 55%;
}

.title-me  {
  color: #414a4f;
  margin-bottom: 10px;
}

h5 {
  color: #393939;
  margin-bottom: 10px;
}

/*соц.кнопки в блоке обо мне*/
#about .social-bar-wrap {
  margin-top: 20px;
}

#about .social-bar-wrap a {
  padding: 0 10px;
  font-size: 24px;
  color: #555;
} 

/*.social-bar-wrap a img {
  width: 24px;
  height: auto;
  transition: all 0.5s;
}
#about .social-bar-wrap a img:hover {
  width: 28px;
  opacity: 0.4;
}*/
#about .social-bar-wrap a:hover {
  opacity: .4;
  color: #ffbf00;
} /*конец соц.кнопок*/

@media (max-width: 1000px) {
  .about-me {
    width: 60%;
  }
  .photo-me img {
    height: 45vh;
  }
}

@media (max-width: 920px) {
  .about-me {
    width: 55%;
  }
}

@media (max-width: 800px) {
  #about {
    flex-direction: column;
  }
  .photo-me {
    width: 100%;
    margin-bottom: 40px;
  }
  .photo-me img {
    height: 35vh;
  }
  .about-me {
    width: 90%;
  }
}

@media (max-width: 660px){
  section h3.about-me  {
    font-size: 1.5em;
  }
}
@media (max-width: 460px){
  section h3.about-me  {
    font-size: 1.2em;
  }
}

/*подвал*/
footer {
  display: -webkit-flex;
  display: -moz-flex;
  display: -ms-flex;
  display: -o-flex;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: #434445;
  width: 100%;
  padding: 20px;
  margin: 0 auto 0;
  color: #fff;
  font-size: 1em;
  line-height: 24px;
}
.footer-col .social-bar-wrap a {
  padding: 0 10px;
  font-size: 20px;
  color: #ffbf00;
  opacity: .4;
}
.footer-col .social-bar-wrap a:hover {
  opacity: 1;
  color: #ffbf00;
}
@media (max-width: 640px) {
  footer {flex-direction: column;}
  .footer-col {margin-top: 10px;}
}

@media (max-width: 360px) {
  footer > p {
    font-size: 14px;
  }
}
/*конец подвал*/ 


/* Загадки */
.box-igra {
  min-height: 60vh;
}

.background-image-igra {
  background: url('../img/igra.jpg') no-repeat bottom center;
  background-size: cover;
  z-index: -1;
}

#igra {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 90px auto 110px;
}

.puzzles h1 {
  color: #fa7921;
  font-size: 40px;
  font-weight: 300;
  margin-bottom: 20px;
}

.box {
  font: 16pt sans-serif;
}

input {
  -webkit-transition: All 1s ease;
     -moz-transition: All 1s ease;
       -o-transition: All 1s ease;
          transition: All 1s ease;
               width: 305px;
              height: 30px;
                font: 17pt Verdana;
               color: #211d1d;
}

input:focus {
  width: 350px; /*ширина при фокусе*/
}

.box a {
  text-decoration: none;
  background: #30A8E6;
  color: #fff;
  padding: 10px;
  border-radius: 4px;
}

.box a:hover {
  background: #1C85BB;
}

#answer {
  margin-bottom: 25px;
  margin-top: -15px;
  color: #fa7921;
}

@media (max-width: 375px) {
  input, input:focus {
    width: 305px;
  }
}
@media (max-width: 330px){
  .box {
    font-size: 14pt;
  }
  input, input:focus {
    width: 270px;
  }
}
/*конец загадки*/

section.work {
  padding: 0;
  margin: 0;
}
.work {
  display: -webkit-flex;
  display: -moz-flex;
  display: -ms-flex;
  display: -o-flex;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;  
}
.work h2 {
  margin: 70px 0 0;
  font-size: 2em;
  color: #414a4f;
}/*
.work h2:after{
    content: "";
    display: block;
    margin: 0 auto;
    border: 1px solid #2196F3;
    width: 70%;
}*/
.work-row {
  display: -webkit-flex;
  display: -moz-flex;
  display: -ms-flex;
  display: -o-flex;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 50px 0; 
}
.work-row--portfolio,
.work-row--counsel {
  margin-bottom: 10px;
}
.work-row--head {
  width: 70%;
  font-size: 20px;
  text-align: center;
}
.work-row a {
  padding: 0;
}
.overflow {
  width: 50%;
  height: 60vh;
  text-align: center;
  overflow: auto;
  box-shadow: 1px 1px 5px #606060;
  opacity: 0.4;
}
.overflow::-webkit-scrollbar {
  display: none;
}
.overflow:hover,
.overflow:focus{
  opacity: 1;
  width: 60%;
}
div.last-img {
  height: 100%;
}
.work-row img {
  width: 100%;
}
p.mark {
  font-size: 12px;
  margin-top: 20px;
}
@media(max-width: 900px) {
  .overflow {
    width: 65%;
  }
  .overflow:hover,
  .overflow:focus{
    width: 75%;
  }
}
@media(max-width: 740px) {
  .overflow {
    width: 70%;
  }
  .overflow:hover,
  .overflow:focus{
    width: 75%;
  }
}
@media(max-width: 630px) {
  .work-row--head {
    font-size: 18px;
  }
}
@media(max-width: 520px) {
  .overflow {
    height: 40vh;
  }
  .work-row--head {
    font-size: 16px;
    width: 80%;
  }
}

/*кновпка наверх*/
.btn-up {
  display: none;
  position: fixed;
  height: 100%;
  bottom: 0;
  right: 0;
  z-index: 999;
  border: none;
  outline: none;
  background-color: transparent;
  color: #999999;
  cursor: pointer;
  padding: 10px 20px;
  text-shadow: 1px 1px 5px #999999;
  font-size: 14px;
}
.btn-up:hover {
  background-color: #f3f3f3;
  font-size: 16px;
  text-shadow: none;
}
@media (max-width: 800px) {
  .btn-up {
    padding: 5px 10px;
    border-radius: 5px;
  }
}

/****email box****/

.email-box {
  perspective: 1000px;
  background-color: #2196F3;
}

.email-box__text {
  font-size: 20px;
  text-align: center;
  padding: 20px 20px 0;
  line-height: 2;
}

.email-box__text > a {
  padding: 0;
}


.container {
  width: 900px;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center; 
  height: 100vh;
  transition: 1s;
  transform: rotateX(55deg) rotateZ(-45deg) rotateY(10deg) translateX(70px);
  transform-style: preserve-3d; /*перспектива для выезда карточки */
}

.container-origin {
  transform: rotate(0deg) translate(0) !important;
  padding: 30px 0;
  height: auto;
}

.email-box__img {
  max-width: 100%;
}

.email-box__card {
  width: 200px;
  margin: 10px;
  transition: 0.3s;
}

.email-box__card:hover {
  cursor: pointer;
  transform: translateZ(10px) scale(1.2);
}

@media (max-width: 930px) {
  .container {
    width: 650px;
    transform: rotateX(55deg) rotateZ(-45deg) rotateY(10deg) translateX(70px) translateY(-180px);
  }
}

@media (max-width: 810px) {
  .container {
    width: 650px;
    transform: rotateX(48deg) rotateZ(-34deg) rotateY(9deg) translateX(0px) translateY(-200px);
  }
}

@media (max-width: 730px) {
  .container {
    width: 650px;
    height: auto;
    transform: none;
    padding-bottom: 20px;
  }

  .email-box__card {
    width: 45%;
    height: 40vh;
    display: flex;
    justify-content: center;
    align-items: baseline;
    overflow: auto;
  }
  .email-box__card::-webkit-scrollbar {
    display: none;
  }

  .email-box__card:hover {
    cursor: pointer;
    transform: none;
  }

  .email-box__img {
    max-width: 200%;
  }
}

@media (max-width: 670px) {
  .container {
    width: 100%;
  }

  .email-box__card {
    width: 70%;
    height: 50vh;
  }
}

@media (max-width: 450px) {

  .email-box__card {
    width: 70%;
    height: 50vh;
    overflow: auto;
  }
}

@media (max-width: 340px) {

  .email-box__card {
    height: 40vh;
  }
}
