/* Hamburguer */
#hamburguer {
	padding: 7px 0 0 0;
	margin: 0px;
	width: 18px;
	height: 11px;
	cursor: pointer;
	cursor: hand;
	display: inline-block;
	vertical-align: top;
	font-size: 14px;
	transition: all 0.3s ease-out;
}
#hamburguer:after {
	content: attr(data-content);
	display: inline-block;
	vertical-align: top;
	margin: -10px 0 0 0px;
	padding: 0 0 0 25px;
	width: 0px;
	color: rgba(0, 0, 0, 0);
	transition: all 0.3s ease-out;
	overflow: hidden;
}
#hamburguer:hover {
	transform: translateX(-40px);
}
#hamburguer:hover:after {
	width: 35px;
	color: rgba(0, 0, 0, 1);
}
#hamburguer span {
	content: '';
	display: block;
	width: 18px;
	height: 3px;
	background: #000;
	border-radius: 4px;
}
#hamburguer span:before {
	content: '';
	position: absolute;
	display: block;
	width: 18px;
	height: 3px;
	background: #000;
	border-radius: 4px;
	margin: -7px 0 0 0;
}
#hamburguer span:after {
	content: '';
	position: absolute;
	display: block;
	width: 18px;
	height: 3px;
	background: #000;
	border-radius: 4px;
	margin: 7px 0 0 0;
}
#hamburguer:hover span {
	transform: rotate(135deg);
	transition: all 0.22s;
}
#hamburguer:hover span:before {
	opacity: 0;
	margin: 0px;
}
#hamburguer:hover span:after {
	transform: rotate(-90deg);
	margin: 0px;
}

/* Pesquisa */
menu section:nth-of-type(3) form {
	border: #FFF 1px solid;
	border-radius: 7px;
	display: grid;
	grid-template-columns: auto 30px;
	grid-gap: 0 10px;
	align-items: center;
	padding: 0px;
	margin: 0px;
}
menu section:nth-of-type(3) input[type=search],
menu section:nth-of-type(3) input[type=image] {
	margin: 0px;
	background: transparent;
	border: none;
}
menu section:nth-of-type(3) input[type=image] {
	width: 20px;
	height: auto;
}

/* Login */
menu section:nth-of-type(5) {
	grid-area: login;
	padding: 30px 0 0 0;
}
menu section:nth-of-type(5) ul li:nth-of-type(1) {
	margin: 0 0 15px 0;
}
menu section:nth-of-type(5) ul li:nth-of-type(1) a {
	border: #FFF 1px solid;
	display: inline-block;
	vertical-align: middle;
	padding: 7px 30px 0 30px;
	margin: 0px;
	border-radius: 5px;
	font-weight: 400;
}
menu section:nth-of-type(5) ul li:nth-of-type(1) a:before {
	content: attr(data-content);
	color: #000;
	position: absolute;
	opacity: 0;
}

menu section:nth-of-type(5) ul li:nth-of-type(2) {
	margin: 0 0 15px 0;
}
menu section:nth-of-type(5) ul li:nth-of-type(2) a {
	border: none;
	display: inline-block;
	vertical-align: middle;
	padding: 7px 30px 0 30px;
	margin: 0px;
	border-radius: 5px;
	font-weight: 400;
	font-size: 12px;
}
menu section:nth-of-type(5) ul li:nth-of-type(2) a:hover {
	background: none;
	color: #FFF;
}
menu section:nth-of-type(5) ul li:nth-of-type(2) img {
	max-height: 30px;
	width: auto;
	display: inline-block;
	vertical-align: middle;
	padding: 0px;
	margin: 0 10px 0 0;
}


@media only screen and (max-width: 1200px) {
	#destaques div {
		grid-template-columns: repeat(2, 1fr);
	}
	nav section:nth-of-type(1) {
		text-align: center;
	}
	nav section:nth-of-type(2) #hamburguer {
		display: block;
		grid-area: hamburguer;
		justify-self: flex-end;
	}
	nav section:nth-of-type(2) ul {
		display: none;
	}
	
	/* Menu mobile */
	menu {
		position: fixed;
		background: #000;
		top: 0px;
		bottom: 0px;
		right: 0px;
		margin: 0px;
		height: 100%;
		text-align: center;
		padding: 10px 30px 40px 30px;
		display: grid;
		grid-template-rows: 40px 150px 100px auto auto 100px;
		grid-template-columns: auto;
		grid-template-areas: "fechar" "logo" "pesquisa" "menu" "login" "redes" "apps";
		transform: translateX(100%);
		transition: all 0.5s ease-in;
		overflow: hidden;
		overflow-y: auto;
		z-index: 9999;
		color: #FFF;
	}
	
	menu::-webkit-scrollbar {
		width: 3px;
	}
	menu::-webkit-scrollbar-track {
		-webkit-box-shadow: inset 0 0 6px #CEEEFB;
	} 
	menu::-webkit-scrollbar-thumb {
	  background-color: #1B2638;
	  outline: 1px solid #1B2638;
	}
	
	/* Fechar menu */ 
	menu section:nth-of-type(1) {
		grid-area: fechar;
		display: block;
		vertical-align: top;
		justify-self: end;
		color: rgba(255, 255, 255, 0);
		font-size: 13px;
		line-height: 15px;
		height: 17px;
		cursor: pointer;
		cursor: hand;
		white-space: nowrap;
		overflow: hidden;
		width: 20px;
		transition: all 0.3s ease-out;
	}
	menu section:nth-of-type(1):hover {
		color: rgba(255, 255, 255, 1);
		width: 100px;
		transition: all 0.3s ease-in;
	}
	menu section:nth-of-type(1) span {
		content: '';
		display: inline-block;
		vertical-align: middle;
		background: #FFF;
		width: 18px;
		height: 3px;
		margin: 0 10px 0 0;
		border-radius: 4px;
		transform: rotate(45deg);
		-webkit-transform: rotate(45deg);
	}
	menu section:nth-of-type(1) span:before {
		content: '';
		position: absolute;
		background: #FFF;
		width: 18px;
		height: 3px;
		margin: 0 0 0 -9px;
		border-radius: 4px;
		transform: rotate(-90deg);
		-webkit-transform: rotate(-90deg);
	}
	
	/* Logo */ 
	menu section:nth-of-type(2) img {
		display: inline-block;
		vertical-align: top;
		width: 80%;
		max-width: 250px;
		height: auto;
		transition: all 0.5s;
	}
	menu section:nth-of-type(2) {
		display: block;
		grid-area: logo;
	}
	
	menu section:nth-of-type(3) {
		grid-area: pesquisa;
	}
	menu section:nth-of-type(4) {
		grid-area: menu;
	}
	menu ul li, menu ul li span {
		display: block;
		text-align: center;
	}
	
	/* Submenus */ 
	menu li ul {
		position: relative;
		background: none;
		border-radius: 0px;
		padding: 0px;
		transition: all 0.5s ease-in;
	}
	menu ul li:hover > ul {
		padding: 10px 0 20px 0;
		transition-delay: 0.5s;
	}
	menu ul li a, menu ul li label {
		color: #FFF;
		font-weight: 400;
	}
	menu ul li a:hover, menu ul li:hover label {
		background: #FFF;
		color: #1B2638;
		cursor: pointer;
		cursor: hand;
	}
	
	/* Login */ 
	menu section:nth-of-type(3),
	menu section:nth-of-type(5),
	menu section:nth-of-type(6),
	menu section:nth-of-type(7) {
		display: block;
	}
	
	#main, #registar {
		padding: 0 50px 80px 50px;
	}
}

@media only screen and (max-width: 1100px) {
	.duas_colunas, .tres_colunas, .dois_um, .noticia, #contactos, #registar {
		grid-template-columns: auto;
		grid-gap: 50px 0;
		grid-template-areas: unset;
	}
	.colesq, .coldir {
		grid-area: unset;
	}
	
	article.lista {
		height: 480px;
		max-width: 396px;
		justify-self: center;
		margin: 0 auto;
	}
	article.lista section {
		margin: -485px 0 0 0;
		padding: 390px 30px 30px 30px;
	}
	article.lista:hover section {
		padding: 250px 30px 30px 30px;
	}
}

@media only screen and (max-width: 1030px) {
	footer {
		grid-template-columns: auto;
		text-align: center;
	}
	footer #morada {
		text-align: center; 
	}
	footer #morada img {
		margin: 0 auto 30px auto;
	}
	footer #morada ul {
		margin: 0 auto; 
	}
	footer .social, footer .apps {
		margin: 30px auto 0 auto;
		text-align: center;
	}
	footer .apps p {
		text-align: center;
	}
	
	#barra {
		grid-template-columns: auto;
	}
	
	#pcontactos {
		padding: 20px 50px 80px 50px;
	}
	#pcontactos div {
		grid-template-columns: auto;
	}
	
	#contactos {
		padding: 20px 50px 80px 50px;
	}
	#contactos {
		grid-template-columns: auto;
	}
	#icones {
		grid-template-columns: auto;
		grid-gap: 30px 0;
	}
	
	#vartigo {
		grid-template-columns: auto;
	}
	
	#corpo *, .corpo *, #projetos *  {
		max-width: 100%;
		height: auto;
	}
}

@media only screen and (max-width: 980px) {
	#imgaleria {
		grid-template-columns: repeat(4, 1fr);
	}
	 #artigos {
		grid-template-columns: repeat(2, 1fr);
	}
	#destaques div {
		grid-template-columns: auto;
	}
}

@media only screen and (max-width: 870px) {
	header {
		display:  block;
	}
	header section:nth-of-type(1) {
		background-size: auto 180px;
	}
	header section span {
		background: none;
		padding-bottom: 130px;
	}
	#intro, #descobrir {
		padding-left: 50px;
		padding-right: 50px;
	}
	#intro {
		grid-template-columns: auto;
		grid-gap: 50px 0;
	}
	#imgaleria {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media only screen and (max-width: 800px) {
	#imgaleria {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media only screen and (max-width: 550px) {
	#imgaleria {
		grid-template-columns: auto;
	}
	#imgaleria figure {
		width: 100%;
		height: 100%;
		min-height: 250px;
	}
	#imgaleria img {
		width: auto;
		height: auto;
		max-width: 100%;
		max-height: none;
	}
}

@media only screen and (max-width: 450px) {
	article.lista {
		height: 380px;
		max-width: 100%;
		justify-self: center;
		margin: 0 auto;
	}	
	article.lista section {
		margin: -485px 0 0 0;
		padding: 390px 30px 30px 30px;
	}
	article.lista:hover section {
		padding: 250px 30px 30px 30px;
	}
	
	.mini-header {
		background-size: auto 500px !important;
		background-position: top center !important;
		background-attachment: fixed !important;
	}
}