/* PROF: Adicionei as linhas seguintes: linha 28 e linha 46
A razão pela qual a transição não funcionava era porque faltava 
definir o valor inicial da propriedade (neste caso width: 100%), 
logo o browsers não sabia interpolar entre um width desconhecido e zero.
*/
html, body {
    height: 100%;
    width: 100%;
    background:black;
    margin: 0%;

}

h2{
    text-align: center;
    font-family:'Great Vibes', cursive;
    font-size: 270%;
    color: white;
}

div.container {
    width: calc(100% - 100px);
    height: calc(100% - 100px);
    margin: 50px;
    display: grid;
    grid-template-columns: 55% 0% 5% 0% 20% 0%;
    margin: 100px;
    grid-gap: 25px;

}

div.grid-item {
    background-color: white;
}

div.grid-item#grid-1 {
    width: 100%; 
    grid-column-start: 1;
    grid-column-end: 2;
    grid-row-start: 1;
    grid-row-end: 4;
    background-image: url(../images/c.jpg);
    background-position: center;
    background-size: cover;
    transition: 2s width;
    cursor: pointer;
}

iframe{
    opacity: 0;

}

div.grid-item#grid-1:active {
    width: 0;
/* background-position: -500px; */
}

div.grid-item#grid-1:active > iframe {
opacity: 1;
display: block;
}

div.grid-item#grid-2 {

    grid-column-start: 4;
    grid-column-end: 7;
    grid-row-start: 1;
    grid-row-end: 4;
    background:black;
    cursor: pointer;
    transition-property: background;
    transition-duration: 400ms;
    transition-timing-function: linear;
      transition-delay: 1s, 2s;
      width: 100%;
}

div.grid-item#grid-2:hover {
    background-image: url(../images/b.jpg);
    background-position: center;
    background-size: cover;
/* background-position: -500px; */
}

div.grid-item#grid-3 {   
height: 100%;
    grid-column-start: 1;
    grid-column-end: 3;
    grid-row-start: 4;
    grid-row-end: 7;
    transition: 250ms height;
    cursor: pointer;
    background-image: url(../images/a.jpg);
    background-position: center;
    }


div.grid-item#grid-3:active {
    height: 0;}
    
h1{
        opacity: 0;
        font-family: 'Great Vibes', cursive;
        text-align: center;
        color: white;
    }
        
p{
            opacity: 0;
        font-family: Arial, Helvetica, sans-serif;
        color: white;
        }


div.grid-item#grid-3:active > h1 {
  display:block;	
  opacity: 1;
  font-display: center;
}

div.grid-item#grid-3:active > p {
    display:block;
    opacity: 1;	
    font-display: center;
  }



div.grid-item#grid-4 {
    grid-column-start: 4;
    grid-column-end: 7;
    grid-row-start: 4;
    grid-row-end: 7;
    background-image: url(../images/e.jpg);

}
@keyframes slide {	
  0% {
    left: 990px;
    top: 600px;
  }
  25% {
    left: 1070px;
    top: 700px;
  }
  50% {
    left: 1000px;
    top: 690px;
  }
75% {
    left: 1140px;
    top: 660px;
  }
  100% {
    left: 990px;
    top: 600px;
  }
}
div.grid-item#grid-4 > .binoculo {
    animation-name: slide;
    animation-duration: 2s;
    animation-timing-function: ease-in-out;
    animation-direction: alternate;
    animation-fill-mode: forwards;
   animation-play-state: running;
    animation-iteration-count: infinite;
  }

  .binoculo {
    height: 50px;
    position: absolute;
    width: 50px;
  }