@charset "UTF-8";

main {
	display: flex;
	flex-direction: column
}
#principal {
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-around;
}

#contenedorseccionesgaleria1, #contenedorseccionesgaleria2 {
	max-width: 1000px;
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	margin-right: auto;
	margin-left: auto;
	margin-top: 1em;
}

#contenedorseccionesgaleria1{
	padding-top: 10em;
}
#contenedorseccionesgaleria2 {
	padding-bottom: 10em;
}
section{
	width: 29%;
	position: relative;
	border: solid 1px black;
	box-sizing: border-box;
	margin-bottom: 1em;
	perspective: 1000px;
	transform-style: preserve-3d;
}
section > div {
    transition:transform .3s linear 0s;
}
section div:first-of-type, section div:nth-of-type(2){
	position: absolute;
	top: 0px;
	left: 0px;
	width: 50%;
	height: 100%;
	overflow: hidden;	
	transform-origin: left center;
}
section div:nth-of-type(2){
	transform-origin: right center;
	left: 50%;
}
section div:first-of-type img {
	position: absolute;
	left: 0px;
	top: 0px;
	width: 200%;
	height: auto;
}
section div:nth-of-type(2) img {
	position: absolute;
	left: -100%;
	top: 0px;
	width: 200%;
	height: auto;
}
section div:last-of-type{
	position:absolute;
	top: 0px;
	left: 0px;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-content: center;
	padding: 1em;
	box-sizing: border-box;
	transform: scale(0);
	z-index: 3;
}
section > img{
	width: 100%;
	height: auto;
	display: block;
	transition: all 0s linear 0s;
	opacity:0;
}
section > div > h2{
	margin-bottom: 0px;
	text-align: center;
}
section > div > p{
	margin-top: 0px;
	text-align: center;
	color:black;
}
section:hover div:first-of-type {
	transform: rotateY(-100deg)
}
section:hover div:nth-of-type(2) {
	transform: rotateY(100deg)
}
section:hover div{
	transform: scale(1);
}

@media (max-width: 750px){
		#contenedorseccionesgaleria1, #contenedorseccionesgaleria2{
			flex-direction:column;
			justify-content: flex-start;
			align-items: center;
		}
	section {
		width: 80%;
	}
}
@media (max-width: 750px){
		#contenedorseccionesgaleria2{
			margin-top: 0px;
}
}

@media (max-width: 610px){
	section > div > h2{
	font-size: 2em;
	}

section > div > p{
	font-size: 2em;
}
}
@media (max-width: 500px){
	section > div > h2{
	font-size: 2em;
	}

section > div > p{
	font-size: 2em;
}
}