/*CSS document*/

body {
    font-family: sans-serif;
	line-height: 1.4em;
	color: #222;
	background-color: #ddd;
	box-sizing: border-box;
    margin: 0;
    padding: 0;
}

h1 {
    padding-top: 2em;
    margin-bottom: 1em;
}

img {
	width: 100%;
}


div.container {
    background-color: #fafafa;
    max-width: 60em;
    margin: 0 auto;
    padding: 1em;
}


main {
    position: relative;
    overflow: hidden;
    padding-bottom: calc(66% + 5em);
}

figure{
    margin: 0;
    width: calc(100%-2em);
    position: absolute;
    opacity: 0;
    transition: opacity 0.5s;
    padding-bottom: 3em;
}

figcaption {
    font-size: 1.2em;
    font-weight: bold;
    margin: 1em 0;
    color: #888;
}


input:nth-of-type(1):checked ~ main figure:nth-of-type(1),
input:nth-of-type(2):checked ~ main figure:nth-of-type(2),
input:nth-of-type(3):checked ~ main figure:nth-of-type(3),
input:nth-of-type(4):checked ~ main figure:nth-of-type(4){
    opacity: 1;
}

nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: .2em;
}

}
main.gallery {
    position: relative;
	overflow: auto;
    padding-bottom: calc(60%);
	height:25%;
	
	
}

main.gallery figure {
    margin: 0;
    width: flex;
    position: absolute;
    opacity: 0;
    transition: opacity 0.5s;
	padding-left: 1em;
}

main.gallery figcaption {
    color: rgb(240, 240, 240);
  font-family: "termina", sans-serif;
  font-weight: 700;
  font-style: normal;
  font-size: 17px;
 margin: auto;
}
nav.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: 1em 0em;
    grid-gap: 0.2em;
	margin-left: 1em;
}
h3.gallery{
   color: rgb(240, 240, 240);
  text-decoration: none;
  font-family: "termina", sans-serif;
  font-weight: 700;
  font-style: normal;
  font-size: 13px;
}
div.gallery input {
    display: none;
}
input[name="item"] {
    display: none;
}
figure.gallery img{
		width: 50em;
		height: 50em;
		flex: 1 0 40em;
		object-fit: cover;
	}

/* how tall deos my padding nrrf yyyo be : the height of the image, but how tall is the image: the height of the container > devide 2 number byyyy the first number 
