@charset "UTF-8";

/* PC用レイアウト */
@media (min-width:960px) {

	* {
		margin: 0;
		padding: 0;
	}

	body {
		margin: 0 18%;
		border-right: 1px solid;
		border-left: 1px solid;
		background-image: url(img/haikei.gif);
	}

	header {
		background-color: white;
	}

	h1 {
		padding: 0.3em 0 0.3em 0;
		text-align: center;
	}
	
	h1 a{
		text-decoration:none;
		color:black;
	}
	
	h1 img {
		height: 1em;
		vertical-align: middle;
		margin-right: 4px;
	}

	h1 span {
		vertical-align: middle;
	}

	main {
		background-color: white;
	}

	h2 {
		border: 1px solid;
		padding: 0.3em 0.7em;
		border-radius: 3px;
		margin: 0 8px 8px 8px;
	}

	/* h2の上余白部分に白い背景色が適用されていなかったため */
	.space1 {
		height: 8px;
		background-color: white;
	}

	h3 {
		background-color:black;
		color:white;
		margin: 12px 8px 4px 8px;
		padding:4px;
	}

	#nav {
		list-style: none;
		display: flex;
		justify-content: space-around;
	}

	#nav li {
		text-align: center;
		background-color: black;
		height: 35px;
		width: 100%;
		line-height: 35px;
		color: white;
		margin: 0 1px;
		border: solid 1px black;
	}

	#nav li a {
		text-decoration: none;
		color: white;
		display: block;
		line-height: 35px;
		transition: all 0.7s;
	}

	#nav li:hover,
	#nav li a:hover {
		background-color: white;
		color: black;
		transition: all 0.7s;
		border: solid 1px black;
	}

	section {
		padding: 0 2px 7px 8px;
		margin: 8px 8px 0 8px;
		/* 下にmarginを入れると壁紙が透けるので */
	}

	section p,
	section ul,
	section ol,
	section table {
		margin: 2px 13px;
		line-height: 1.7;
	}

	section ul {
		padding: 0 2px 0 20px;
		list-style-type: square;
	}
	
	section ol{
		padding: 0 2px 0 20px;
	}

	footer {
		background-color: black;
		color: white;
		text-align: center;
		height: 25px;
	}

	#news_list ul {
		padding-left: 24px;
		margin-right: 8px;
		list-style-type: square;
	}

	.portfolio_section {
		border:1px dotted;
		margin:10px;
		text-align:center;
	}

	table {
		border-collapse: collapse;
		border-spacing: 0;
	}

	th {
		border: 1px solid #555555;
		padding: 3px 4px;
		background-color: #EEEEEE;
	}

	td {
		border: 1px solid #555555;
		padding: 3px 4px;
	}
	
	.homepage_img{
		height:120px;
		width:250px;
		object-fit:cover;
	}
	
	.hp_all{
		display:flex;
		justify-content:center;
		flex-wrap:wrap;
	}
	
	.hp_all section{
		flex:1;
	}
	
	.red{
		color:red;
	}
}

/* スマホ・タブレット用レイアウト */
@media screen and (max-width:959px) {

	* {
		margin: 0;
		padding: 0;
	}

	body {
		border-right: 1px solid;
		border-left: 1px solid;
		background-image: url(img/haikei.gif);
	}

	header {
		background-color: white;
	}

	h1 {
		padding: 0.5em;
		text-align: center;
		font-size:26px;
	}
	
	h1 a{
		text-decoration:none;
		color:black;
	}

	h1 img {
		height: 1em;
		vertical-align: middle;
		margin-right: 4px;
	}

	h1 span {
		vertical-align: middle;
	}

	header p {
		color: white;
	}

	main {
		font-size: 14px;
		background-color: white;
	}

	h2 {
		border: 1px solid;
		padding: 0.3em 0.4em;
		border-radius: 3px;
		margin: 0 8px 8px 8px;
		font-size: 16px;
	}

	/* h2の上余白部分に白い背景色が適用されていなかったため */
	.space1 {
		height: 8px;
		background-color: white;
	}

	h3 {
		background-color:black;
		color:white;
		padding:4px;
		margin: 12px 8px 4px 8px;
		font-size: 14px;
	}

	#nav {
		list-style: none;
		display: flex;
		justify-content: space-around;
	}

	#nav li {
		text-align: center;
		background-color: black;
		height: 45px;
		width: 100%;
		background-color: black;
		line-height: 45px;
		color: white;
		margin: 0 1px;
	}

	#nav li a {
		text-decoration: none;
		color: white;
		display: block;
		height: 45px;
		line-height: 45px;
	}

	section {
		padding: 0 2px 7px 8px;
	}

	section p,
	section ul,
	section ol,
	section table {
		margin: 2px 13px;
		line-height: 1.7;
	}

	section ul {
		padding: 0 2px 8px 20px;
		list-style-type: square;
	}

	section ol{
		padding: 0 2px 0 20px;
	}
	
	footer {
		background-color: black;
		color: white;
		text-align: center;
		height: 25px;
		font-size: 11px;
	}

	#news_list ul {
		padding-left: 24px;
		margin-right: 8px;
		list-style-type: square;
	}

	.portfolio_section {
		border:1px dotted;
		margin: 8px;
		text-align:center;
	}

	table {
		border-collapse: collapse;
		border-spacing: 0;
	}

	th {
		border: 1px solid #555555;
		padding: 3px 4px;
		background-color: #EEEEEE;
	}

	td {
		border: 1px solid #555555;
		padding: 3px 4px;
	}

	.homepage_img{
		height:120px;
		width:250px;
		object-fit:cover;
	}
	
	.red{
		color:red;
	}
}