*{
    scroll-behavior: smooth;
    margin:0;
    padding:0;
    text-decoration: none;
    list-style: none;
}
body{
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
}
 .navbar{
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 1rem;
    background: red;
 }

 .menu-toggle{
   display: grid;
   grid-template-rows: 4px 4px 4px;
   row-gap: 6px;
   width: 30px;
   padding: 0;
   background: none;
   border: none;
   cursor: pointer;
 }

.menu-toggle li{
    background-color: #f5f5f5;
    height: 3px;

}


.nav-links{
    text-align: left;
    display: grid;
    grid-column: 1/-1;
    grid-template-columns: 1fr;
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transform-origin: top;
    max-height: 0;
}
.nav-links a{
    color: #f5f5f5;
}
.nav-links.menuClosingAnimation{
    animation: slideUp 0.5s;
}

.nav-links.active.menuReady{
    max-height: 150px;
    margin-top: 1rem;
    animation: slideDown 0.5s ease-out;
}
.nav-links.active a:hover{
 color: yellow;
 transition: color 0.5s ease-in;
}

h1{
    padding: 5px;
    background-color: yellow;
    margin-bottom: 10px;
}

h2{
    padding: 5px;
    margin-bottom: 10px;
}
p{
    padding: 5px;
    margin-bottom: 10px;
}
figure{
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s, transform 0.5s;
    padding: 5px;
    margin-bottom: 10px;
}

figure.is-visible{
    opacity: 1;
    transform: translateY(0);
}
#valuable{
  padding: 0.482rem;
  display: grid;
  gap: 3rem;
}

#valuable figure{
text-align: center;
}

#valuable img{
  width: 100%;
  object-fit: cover;
  aspect-ratio: 16/9;
}

#valuable figcaption {
transform: translateY(-0.245rem);
background-color: white;
}

.question{
    margin-top: -45px;
    margin: auto;
    background-image: url(../img/animation-question-mark/question.png);
    width: 331px;
    height: 251px;
    animation: jump 0.7s steps(5) infinite;
}
a:hover{
    color: orange;
    transition: color 0.5s ease-in;
}

@keyframes slideUp{
    0%  {max-height: 150px}
    100% {max-height: 0px}
}

@keyframes slideDown{
    0% {max-height: 0px;}
    100% {max-height: 150px;}
}
@keyframes jump{
  from {background-position: 0;}
   to  {background-position: -1655px;}
}

figcaption{
    padding: 5px;
}
figure img{
    transition: all 0.5s ease;
}

figure img:hover{
border-style: solid;
border-width: 5px;
padding: 5px;
animation: rainbowBoarder 1s infinite ease;
}
#valuable img{
  width: 100%;
  object-fit: cover;
  aspect-ratio: 16/9;
}

#valuable figcaption {
transform: translateY(-0.245rem);
background-color: white;
}

@keyframes rainbowBoarder{
    0%{border-color: red}
    25%{border-color: orange}
    50%{border-color: yellow}
    75%{border-color: green}
    100%{border-color: blue}
}





dialog{
    display: none;
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    border: none;
    margin: auto;
    padding: 0;
    transition: all 0.4s ease-out allow-discrete;
    place-items: center;
    top: 5vh;
    max-width: 95vw;
    max-height: 90vh;

}
dialog[open] {
    display: grid;
    opacity: 1;
    transform: scale(1) translateY(0);
}
@starting-style{
    dialog[open] {
        opacity: 0;
        transform: scale(1) translateY(20px);
    }
}
dialog figure:hover img{
animation: none;
border-style: none;
border-width: none;
padding: none;
}


dialog::backdrop{
    background-color: rgb( 0 0 0 / 0);
    transition: all 0.4s ease-out, display 0.4s allow-discrete, overlay 0.4s allow-discrete;

}
@starting-style{
 dialog[open]::backdrop{
    background-color: rgb( 0 0 0 / 0); ;
}
}
dialog[open]::backdrop{
    background-color: rgb(0 0 0 / 0.8);
}
dialog button{
    background: none;
    border: 2px solid red;
    color: red;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    cursor: pointer;
    width: 100%;
    height: 100%;
    transition: all 0.3s ease;
    padding: 0.482rem;
}

dialog form{
    width: 100%;
    text-align: center;
    padding: 0 1.2 0.6rem;
}
dialog button:hover{
    background-color: red;
    color:white
}

dialog button:active{
    transform:scale(0.95);
}

dialog button:focus{
    outline: none;
    border-color: red;
}
dialog img{
  max-width: 100%;
  width: 100%;
  max-height: 80vh;
}

footer{
    padding: 10px;
    height: 25px;
    background-color: red;
    color: white;
}
@media screen and (min-width: 400px){
  #valuable{
    grid-template-columns: 1fr 1fr;
  }
}   
@media screen and (min-width: 800px){
  #valuable{
    grid-template-columns: 1fr 1fr 1fr;
  }
} 
@media screen and (min-width: 1200px){
  #valuable{
    grid-template-columns: repeat(4, 1fr);
  }
} 

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