section#categories {
   	padding: 50px 0 65px 0;
    box-sizing: border-box;
    background: white;
}

section#categories .container {
	display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 70%;
    overflow: visible;
}

@media screen and (max-width: 1450px) {

	section#categories .container {
		width: 90%;
	}

}

section#categories .container a {
	flex: 0 0 19.2%;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin-right: 1%;
    text-align: center;
    overflow: hidden;
    background-color: white;
    box-shadow: 0 0 10px 1px #f3f3f3;
}

section#categories .container a:nth-child(5),
section#categories .container a:nth-child(10),
section#categories .container a:nth-child(15),
section#categories .container a:nth-child(20),
section#categories .container a:nth-child(25),
section#categories .container a:nth-child(30)
 {
	margin-right: 0;
}

section#categories .container a:nth-child(1n+6) {
	margin-top: 1%;
}

section#categories .container a:hover h1 {
    margin-top: -20px;
}

section#categories .container a h3 {
    background: white;
    color: #444;
    padding: 15px 25px;
    font-weight: 900;
    text-transform: uppercase;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    border-bottom: solid var(--maincolor) 5px;
}

@media screen and (max-width: 1200px) {

	section#categories .container a {
		flex: 0 0 24.25%;
	}

	section#categories .container a:nth-child(5n) {
		margin-right: 1%;
	}

	section#categories .container a:nth-child(4n) {
		margin-right: 0;
	}

	section#categories .container a:nth-child(1n+5) {
		margin-top: 1%;
	}

}

@media screen and (max-width: 950px) {

	section#categories .container a {
		flex: 0 0 32.66667%;
	}

	section#categories .container a:nth-child(5n) {
		margin-right: 1%;
	}

	section#categories .container a:nth-child(4n) {
		margin-right: 1%;
	}

	section#categories .container a:nth-child(3n) {
		margin-right: 0;
	}

	section#categories .container a:nth-child(1n+4) {
		margin-top: 1%;
	}

}

@media screen and (max-width: 680px) {

	section#categories .container a {
		flex: 0 0 49.5%;
	}

	section#categories .container a:nth-child(5n) {
		margin-right: 1%;
	}

	section#categories .container a:nth-child(4n) {
		margin-right: 1%;
	}

	section#categories .container a:nth-child(3n) {
		margin-right: 1%;
	}

	section#categories .container a:nth-child(2n) {
		margin-right: 0;
	}

	section#categories .container a:nth-child(1n+3) {
		margin-top: 1%;
	}

}

@media screen and (max-width: 500px) {

	section#categories .container a {
		flex: 0 0 100%;
		margin-right: 0 !important;
	}

	section#categories .container a:nth-child(1n+2) {
		margin-top: 1%;
	}

}