 @keyframes colorchange {
        0% { color: red }
        25% { color: blue }
        50% { color: rgb(245, 225, 47)}
        75% { color: rgb(37, 219, 79) }
        100% { color: red } 
    }

     
    

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

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    min-height: 100vh;
} /* Hade problem med centrering av innehåll, dessa två översta löste det */

body {
    font-family: Arial, Helvetica, sans-serif;
    width: 100%;
    color: black;
    text-align: center;
    padding-bottom: 0px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    
    
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 10px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 30px;
    text-align: left;
    
}

.main-nav a {
    text-decoration: none;
    color: black;
    font-size: 35px; 
   
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.nav-links {
    text-align: right;
    margin-left: auto;
}

.nav-links a {
    text-decoration: none;
    margin-left: 25px;
    color: black;
    font-size: 35px; 
    
   
}

.nav-links a:hover {
     color: blue;
}

.main-nav a:hover {
     animation: colorchange 4s steps(1) infinite; 
}

.work {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    max-width: 1700px;
    margin: 0 auto;
    padding: 40px 20px;
    flex-grow: 1; 
    
}

.work em {
    initial-value: fixed    ;
}

.work figure {
    margin: 0;
    text-align: center;
   
}

.work img {
    max-width: 100%;
    height: auto;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.work img:hover {
    transform: scale(1.02);
}

.work img.enlarged {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    z-index: 999;
    max-width: 100%;
    max-height: 100%;
    transition: none;
    cursor: pointer;
}

.work img.enlarged:hover {
    transform: translate(-50%, -50%) scale(1);
    cursor: pointer;
}

#overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

#overlay.active {
    display: flex;
}

#overlay-img {
    max-width: 90%;
    max-height: 90%;
    cursor: pointer;
}


#page-footer {
    height: 70px;
    width: 100%;
    background-color: blue;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: auto;
    animation: colorchangeBG 4s steps(1) infinite;

    

}

.list {
    margin-top: 200px;
    text-align: center;
}

.list .year {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 80px;
    color: black;
    text-decoration: none;
    color: black;
    display: inline-block;
    margin: 0 20px;
}


.list .y2025:hover {
    color: red
}

.list .y2024:hover {
    color: blue
}

.list .y2023:hover {
    color: rgb(37, 219, 79)
}

.list .y2022:hover {
    color: rgb(245, 225, 47)
}

.contact h1 {
    margin-top: 80px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 100px;
    color: black;
    text-align: center;
    width: 100%;
}

.contact a {
    text-decoration: none;
    color: black;
    font-size: 50px;
    font-family: Arial, Helvetica, sans-serif;
    width: 90%;
}

.contact a:hover  {
    animation: colorchange 4s steps(1) infinite; 
}

@media (max-width: 500px) {
  .work {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 500px) {
    .contact h1 {
        font-size: 54px;
        margin-top: 80px;
    }   
    .contact a {
        font-size: 25px;
        margin-top: 100px;
    }

    .list {
    margin: 0; 
    min-height: 70vh; 
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center;     
    text-align: center;
  }

  .list .year {
    font-size: 90px;
   }

  .main-nav {
    padding: 20px;
    animation: colorchange 4s steps(1) infinite; 
  }

  .main-nav a {
    font-size: 35px;
    padding: 8px 0;
    text-align: left;
    font-style: italic;
    color: inherit;
  }

  .nav-links a {
    font-size: 35px;
    color: rgb(37, 219, 79);
    font-style: normal;
  }

  .nav-links a:nth-last-child(1) {
    color: blue
  }

  .nav-links a:active {
    color: red
  }
}

@media (max-width: 899px) and (orientation: landscape) {
    .work {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    #overlay-img {
        max-height: 70%;
    }

    .main-nav {
    padding: 20px;
  }

  .main-nav a {
    font-size: 35px;
    padding: 8px 0;
    text-align: left;
    font-style: italic;
  }

  .nav-links a {
    font-size: 35px;
    color: rgb(37, 219, 79);
    font-style: normal;
  }

  .nav-links a:nth-last-child(1) {
    color: blue
  }

  .nav-links a:active {
    color: red
  }
}






  