@import url('https://fonts.googleapis.com/css2?family=EB+Garamond&display=swap');


header, main, footer {
    width: 70%;
    min-width: 400px;
    max-width: 1500px;
    background-color: white;
    margin-left: auto;
    margin-right: auto;
    padding: 10px;
    font-family: 'EB Garamond', serif;
}



header {
    position: relative;
}

header div img {
    width: 20%;
    height: 10%;
    margin-left: 40%;
}

nav div {
    display: block;
}

nav ul {
    list-style-type: disc;
    margin-block-start: 1em;
    margin-block-end: 1em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    padding-inline-start: 40px;
    text-align: center;
}
nav ul li {
    display: inline-block;
    white-space: nowrap;
    padding: 0 10px;
}

nav a {
    text-decoration: none;
    font-size: 2em;
    margin-right: 1em;
    color:black;
    padding: 0 4px;
}

nav a:hover {
   background-color: red;
   color: white;
}

body {
    background-image: url("images/background.jpg");
}

article ul {
    margin-left: auto;
    margin-right: auto;
    
}

article h1 {
    text-transform: uppercase;
    text-align: center;
    size: 1.5em;
}

article h1::after {
    content: '';
    display: block;
    height: 4px;
    width: 150px;
    background: red;
    margin: 20px auto;
}

article p {
    text-align: justify;
}

table {
    margin-left: auto;
    margin-right: auto;
}

article img {
    width: 500px;
    height: 500px;
    padding-top: 5px;
    padding-bottom: 5px;
}

article img:hover {
    opacity: 80%;
}

#referenciak ul li {
    list-style-type: none;
    margin-left: 22%;
}

/*------------------*/

.container {
    position: relative;
    width: 50%;
    margin: 10px 10px;
  }
  
  .image {
    display: block;
    width: 200px;
    height: 200px;
  }
.overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    width: 200px;
    opacity: 0;
    transition: .5s ease;
    background-color: red;
  }
  
  .container:hover .overlay {
    opacity: 1;
  }
  
  .text {
    color: white;
    font-size: 20px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
  }
/*------------------*/

.dolt {
    font-style: italic;
}

footer {
   background-color: gray;
}

footer p {
    color: white;
    font-style: italic;
    text-align: center;
}

@media screen and ( max-width: 700px ) {
    nav ul li {
        display:list-item;
        list-style-type: none;
    }

    #referenciak ul li {
        list-style-type: none;
        margin-left: 16%;
        
    }
    article img {
        width: 200px;
        height: 200px;
        padding-top: 5px;
        padding-bottom: 5px;
    }
}