/* motion_graphics.css */

figure iframe{
  max-width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  object-position: center;

}

main{
  padding: 0 1.2rem 1.2rem 1.2rem;
}

.exercise1 section{
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.44rem;
}


h2 {
  margin-top: 30px;
  text-align: center;
}

h3 {
  margin-top: 30px;
  text-decoration: underline;
}

iframe {
  width:280px;
  height:158px; 
}

#exercise1, #exercise2, #exercise3, #exercise4, #exercise5, #exercise6, #project, #project2, #project3, #finalProject{
    margin-top: 50px;
  }

  
  #exercise1 figcaption{
    display: block;
    padding: 10px 1rem 0;
    background-color: rgb(46, 52, 114);
    margin-bottom: 10px;
  }

  #exercise1 figcaption:hover, #exercise1 figcaption:focus{
    background-color: rgba(30, 23, 255, 0.562);
  }

  #exercise2 figcaption{
    display: block;
    padding: .5rem 0;
    background-color: rgb(46, 52, 114);
  }

  #exercise2 figcaption:hover, #exercise2 figcaption:focus{
    background-color: rgba(30, 23, 255, 0.562);
  }

  #exercise3 figcaption{
    display: block;
    padding: .5rem 0;
    background-color: rgb(46, 52, 114);
  }

  #exercise3 figcaption:hover, #exercise3 figcaption:focus{
    background-color: rgba(30, 23, 255, 0.562);
  }

  #exercise4 figcaption{
    display: block;
    padding: .5rem 0;
    background-color: rgb(46, 52, 114);
  }

  #exercise4 figcaption:hover, #exercise4 figcaption:focus{
    background-color: rgba(30, 23, 255, 0.562);
  }

  #exercise5 figcaption{
    display: block;
    padding: .5rem 0;
    background-color: rgb(46, 52, 114);
  }

  #exercise5 figcaption:hover, #exercise5 figcaption:focus{
    background-color: rgba(30, 23, 255, 0.562);
  }

  #exercise5 img{
    width:651px;
    height:377px;
    padding: .5rem 0;
  }

  #exercise6 figcaption{
    display: block;
    padding: .5rem 0;
    background-color: rgb(46, 52, 114);
  }

  #exercise6 figcaption:hover, #exercise6 figcaption:focus{
    background-color: rgba(30, 23, 255, 0.562);
  }

  #exercise6 img {
    max-width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    object-position: center;
  }

  #exercise6 figure {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.44rem;
  }



  #project figcaption{
    display: block;
    padding: .5rem 0;
    background-color: rgb(46, 52, 114);
  }

  #project figcaption:hover, #project figcaption:focus{
    background-color: rgba(30, 23, 255, 0.562);
  }

  #project2 figcaption{
    display: block;
    padding: .5rem 0;
    background-color: rgb(46, 52, 114);
  }

  #project2 figcaption:hover, #project2 figcaption:focus{
    background-color: rgba(30, 23, 255, 0.562);
  }

  /* Project 3 Section */
  #project3 figcaption{
    display: block;
    padding: .5rem 0;
    background-color: rgb(46, 52, 114);
  }

  #project3 figcaption:hover, #project2 figcaption:focus{
    background-color: rgba(30, 23, 255, 0.562);
  }

  #project3 figure {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
  }

  #project3 img {
    max-width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    object-position: center;
  }

  /* Final Project Section */
  #finalProject figcaption{
    display: block;
    padding: .5rem 0;
    background-color: rgb(46, 52, 114);
  }

  #finalProject figcaption:hover, #project2 figcaption:focus{
    background-color: rgba(30, 23, 255, 0.562);
  }

  #finalProject figure {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Split into two equal columns */
    gap: 15px;
    align-items: start;
    height: 315px;
}

  #finalProject img {
    max-width: 100%;
    object-fit: cover;
    object-position: center;
    height: 315px;
    
  }

  #finalProject h4 {
    margin-top: 50px;
  }

  #finalProject figure iframe {
    margin-bottom: 50px;
  }

  

/* Responsive Adjustments */
@media screen and (min-width: 800px) {
  iframe {
    width: 560px;
    height: 315px;
  }

  #project3 figure {
    grid-template-columns: repeat(3, 1fr);
  }
}

