/* 
 *　小谷村移住なび
 *　　定住支援
 */

/* top */
#top {
	margin: 85px auto 57px;
	max-width: 933px;
	overflow: hidden;
	width: 95%;
}
#top h2 {
	display: block;
	float: left;
	margin: 0;
}
#top h2 img {
	display: block;
}
#wrapper {
	background: url(../img/common/flower.png) no-repeat right bottom;
	float: left;
	padding: 52px 98px 33px 24px;
}
#wrapper p {
	background: url(../img/support/line01.png) repeat-y left top;
	color: #523833;
	font-size: 3rem;
	font-weight: bold;
	line-height: 49px;
	margin: 0;
	max-width: 441px;
	padding: 0 40px 0 20px;
	width: calc(100% - 60px);
}

/* support */
div#support {
	margin: 0 auto;
	max-width: 878px;
	width: 95%;
}
div#support ul:not(.list) {
	font-size: 0;
	margin: 0;
	padding: 0;
}
div#support ul:not(.list) li {
	display: inline-block;
	margin: 0;
	margin-bottom: 51px;
	margin-left: calc(25% - 215px);
	position: relative;
}
a.button {
	cursor: pointer;
}

/* support .tile */
div.tile {
	background-color: white;
	border: 4px solid #E5AC00;
	border-radius: 17px;
	color: #5F6439;
	display:  none;
	opacity: 0;
	padding: 22px 19px 12px;
	position: absolute;
	transition: all 0.5s;
	width: 285px;
	z-index: 3;
}
div.tile.active {
	display: block;
	opacity: 1;
}
div.tile a.btn_close {
	color: #666666;
	cursor: pointer;
	float: right;
	font-size: 2.6rem;
	font-weight: bold;
	line-height: 1em;
	margin-right: -10px;
	margin-top: -22px;
	text-decoration: none;
}
div.tile a.btn_close:hover {
	color: #E5AC00;
}
div.tile h3 {
	font-size: 1.5rem;
	font-weight: bold;
	line-height: 1.2em;
	margin: 0 0 1em;
}
div.tile p {
	font-size: 1.5rem;
	font-weight: normal;
	line-height: 1.4em;
	margin: 0 0 1em;
}
div.tile p.small {
	font-size: 1.4rem;
	margin: 0;
}

/* support ul.list */
div#support ul.list {
	display: none;
	opacity: 0;
	padding: 0;
	position: absolute;
	transition: all 0.5s;
	z-index: 2;
}
div#support ul.list.active {
	display: block;
	opacity: 1;
}
div#support ul.list li {
	margin-bottom: 9px;
	margin-left: 0;
	width: 279px;
}
div#support ul.list li a:not(.btn_close) {
	background-color: #5C6769;
	border: 2px solid white;
	border-radius: 2px;
	color: white;
	display: block;
	font-size: 1.7rem;
	font-weight: bold;
	line-height: 24px;
	padding-left: 5px;
	text-decoration: none;
	width: calc(100% - 9px);
}
div#support ul.list li a:hover {
	color: #E5AC00;
}
div#support ul.list li p.small a,
div#support ul.list li p.small a:hover {
	background: none;
	color: #5F6439;
	display: inline-block;
	font-size: 1.4rem;
	font-weight: normal;
}
div#support > ul li:nth-child(4n) div {
	right: 0;
}

@media (max-width: 940px) {
	div#support ul:not(.list) > li {
		margin-left: calc((100% - 645px) / 4);
	}
	div#support > ul > li:nth-child(3n) div,
	div#support > ul > li:nth-child(3n) ul.list {
		left: inherit;
		right: 0;
	}
	div#support > ul > li:not(:nth-child(3n)) div,
	div#support > ul > li:not(:nth-child(3n)) ul.list {
		left: 0;
		right: inherit;
	}
}
@media (max-width: 700px) {
	div#support ul:not(.list) > li {
		margin-left: calc((100% - 430px) / 3);
	}
	div#support > ul > li:nth-child(2n) div,
	div#support > ul > li:nth-child(2n) ul.list {
		left: inherit;
		right: 0;
	}
	div#support > ul > li:not(:nth-child(2n)) div,
	div#support > ul > li:not(:nth-child(2n)) ul.list {
		left: 0;
		right: inherit;
	}
}
@media (max-width: 660px) {
	#wrapper {
		padding: 52px 0 33px;
	}
}
@media (max-width: 470px) {
	div#support ul:not(.list) > li {
		margin-left: calc((100% - 215px) / 2);
	}
	div.tile {
		left: calc((100% - 331px) / 2);
	}
	div#support ul.list li {
		width: 100%;
	}
	div#support > ul li div,
	div#support > ul li ul.list {
		left: -68px;
		right: inherit;
	}
	div#support > ul > Li div {
		box-sizing: border-box;
		left: calc(108px - 48vw) !important;
		right: inherit;
		width: 95vw;
	}
}
@media (max-width: 380px) {
	div.tile {
		left: calc((100% - 286px) / 2);
		width: 240px;
	}
}

