*{
box-sizing: border-box;
margin: 0;
padding: 0;
}

html{
font-size: 20px;
line-height: 1.44rem;
scroll-behavior: smooth;
}

nav{
    background-color: #B2B2E1;
    align-items: center;
    padding: 0 1.5rem;
    position: fixed;
    width:100%;
    top: 0;
    right:0;
    left: 0;
    word-spacing: 10px;
}

header{
    background-color: #CD99DD;
    font-size: 32px;
    padding: 20px;
    text-align: center;
    width:100%;
}
header h1{
  padding-top: 20px;
  padding-bottom: 10px;
}

body{
    background-color: #D9D2FF;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 18px;
    padding: 10px;
    text-align: center;    
}
a{
  padding-bottom: 20px;
  margin-bottom: 10px;
}
#gallery{
  padding: 0.482rem;
  display: grid;
  gap: 3rem;
}

#gallery figure{
text-align: center;
}

#gallery img{
  width: 100%;
  object-fit: cover;
  aspect-ratio: 16/9;
  transition: transform 0.5s ease;
}

#gallery figcaption {
transform: translateY(-0.245rem);
background-color:#E6E6FA;
transition: transform 0.5s ease;
}


dialog figcaption{
transform: translateY(-0.245rem);
background-color:#E6E6FA; 
}

/* modal styles */
dialog{
  position: fixed;
  top: 5vh;
  max-width: 95vw;
  max-height: 90vh;
  margin: 0 auto;
}
dialog  ::backdrop{
   background-color:#EBE8FC ;
}
button {
  height: 100%;
  width: 100%;
  background-color: #B19CD7;
  &:hover{
    background-color: white;
  }
}

dialog img{
  width: 100%;
  max-height: 80vh;
}
figcaption{
  width: 100%;
  text-align: center;
  font-size: 0.833rem ;
}
@media screen and (max-width: 520px){
  h1{
     font-size: 28px;
  }
  figcaption{
    font-size: 14px;
  }
}
@media screen and (min-width: 400px){
  #gallery{
    grid-template-columns: 1fr 1fr;
  }
}   
@media screen and (min-width: 800px){
  #gallery{
    grid-template-columns: 1fr 1fr 1fr;
  }
} 
  

@media screen and (min-width: 1200px){
  #gallery{
    grid-template-columns: repeat(4, 1fr);
  }
} 

@media screen and (min-width: 1600px){
  #gallery{
    grid-template-columns: repeat(5, 1fr);
  }
} 

footer{
  width: 100wv;
  background-color: #D99CDA;
}


