@charset "utf-8";
/* CSS Document */
@import url("style.css");

body {
	font-family: "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", "メイリオ", Meiryo, Osaka, "ＭＳ Ｐゴシック", "MS PGothic", sans-serif;
}
img	{
	vertical-align: bottom;
}
.basicinfo {
	padding: 20px;
	border: 1px solid #666;
}
#header h1 , #footer p{
	margin: 0px;
}
#header h1 {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 48px;
}
#footer p {
	font-size: 12px;
}
#container {
	width: 950px;
	margin-right: auto;
	margin-left: auto;
}
.subject {
	width: 300px;
	float: left;
	margin-right: 25px;
}
.subject h2+p {
	font-size: 16px;
	font-weight: bold;
	padding-bottom: 7px;
	border-bottom-width: 1px;
	border-bottom-style: solid;
	border-bottom-color: #666;
}
.subject p+p {
	font-size: 14px;
	margin-bottom: 0px;
}
#footer {
	margin-top: 30px;
	clear: both;
}
#main {
	overflow: hidden;
}
.subject h2 {
	margin-top: 0px;
}
#subject03 {
	margin-right: 0px;
}
#nav ul {
	list-style-type: none;
	margin-left: 0px;
	padding-left: 0px;
	border-top-width: 1px;
	border-right-width: 1px;
	border-bottom-width: 1px;
	border-left-width: 1px;
	border-top-style: none;
	border-right-style: solid;
	border-bottom-style: solid;
	border-left-style: solid;
	border-top-color: #666;
	border-right-color: #666;
	border-bottom-color: #666;
	border-left-color: #666;
	margin-top: 0px;
	overflow: hidden;
}
#nav ul li {
	float: left;
	border-right-width: 1px;
	border-right-style: solid;
	border-right-color: #666;
}
#nav ul li a {
	font-size: 12px;
	color: #000;
	text-decoration: none;
	width: 120px;
	display: block;
	text-align: center;
	line-height: 34px;
}
#nav ul li a:hover {
	background-color: #FDD035;
}
#content h2 {
	font-size: 20px;
	border-left-width: 20px;
	border-left-style: solid;
	border-left-color: #DC6618;
	margin-top: 0px;
	padding-top: 20px;
	padding-bottom: 20px;
	padding-left: 20px;
}
#content p {
	font-size: 14px;
}
#sidebar {
	color: #FFF;
	background-color: #DC6618;
	padding: 20px;
	float: right;
	width: 240px;
}
#sidebar ul li a {
	font-size: 14px;
	color: #FFF;
	text-decoration: none;
}
#sidebar ul li {
	margin-bottom: 10px;
}
#sidebar ul {
	margin-left: 0px;
	padding-left: 20px;
}
#sidebar h3 {
	font-size: 14px;
	margin-top: 0px;
	padding-bottom: 5px;
	border-bottom-width: 1px;
	border-bottom-style: solid;
	border-bottom-color: #FFF;
}
#content {
	float: left;
	width: 640px;
}
#event #content h2 {
	border-left-color: #83A80F;
}
#event #sidebar {
	background-color: #83A80F;
}
#contact #content h2 {
	border-left-color: #046096;
}
#contact #sidebar {
	font-size: 12px;
	background-color: #046096;
}
#photos {
	border: 2px solid #DC6618;
	margin-top: 30px;
	position: relative;
	height: 350px;
}
#photos img {
	padding: 5px;
	border: 1px solid #666;
	background-color: #FFF;
}
#photo01 {
	position: absolute;
	left: 29px;
	top: 34px;
	z-index: 1;
}
#photo02 {
	position: absolute;
	left: 296px;
	top: 87px;
}
table {
	font-size: 14px;
	margin-top: 30px;
	border: 1px solid #83A80F;
	border-collapse: collapse;
	width: 600px;
}
th {
	padding: 5px;
	border: 1px solid #83A80F;
	background-color: #C2E162;
}
td {
	padding: 10px;
	border: 1px solid #83A80F;
}
#date {
	width: 100px;
}
label {
	display: block;
}
#namae, #email {
	width: 300px;
}
#comment {
	width: 550px;
}
form {
	margin-top: 30px;
	padding-top: 10px;
	padding-right: 20px;
	padding-bottom: 10px;
	padding-left: 20px;
	border: 3px solid #EDE596;
}

@media screen and (max-width: 767px){
    #header h1{
            font-size: 24px;/*spレイアウト用のサイズ調整*/
    }    
        .basicinfo{
            padding: 10px;/*h1の周辺のpadding調整*/
    }
    #nav ul li a{
            width: auto;/*ナビゲーションの各項目の横幅をテキスト量に依存させる*/
            font-size: 10px;/*spレイアウト用のサイズ調整*/
            padding-left: 5px;/*spレイアウト用のナビゲーション可読性確保*/
            padding-right: 5px;/*spレイアウト用のナビゲーション可読性確保*/
    }
    
#container {
    width: 100%;
}
img{
    max-width: 100%;/*画像原本の最大横幅まで可変させる。拡大による画像の劣化を防ぐ*/    
    height: auto;/*max-widthの状態に追随*/
    }
    .subject{
        width: 100%;/*.subjectを１カラムの状態に変更する。sp対応の定番のレイアウトに修正している*/
        margin-right: 0;/*1カラムの.subjectには不要のため、margin-right:0に修正*/
        border: 1px solid #aaa;/*.subjectを枠線付の状態にする*/
        border-top-width: 8px;/*.subject間の分け目をより分かりやすくしている*/
        padding: 10px;/*SPレイアウト、可読性確保*/
        margin-bottom: 8px;/*後に続く.subjectとの隙間確保*/
        box-sizing: border-box;/*ボックスモデルの計算を、borderまで含めてcssのwidthに含ませ、レイアウト崩れを修正している*/
    }
    #subject01{
            border-top-color: #dc6618;/*.subjectを一つずつ色分けし、どこのブロックがどれか、というイメージ付けを行っている*/
    }
    #subject02{
            border-top-color: #83a80f;
    }
    #subject03{
            border-top-color: #046096;
    }
    .subject img{
            width: 30%;/*spレイアウト対応。imgを小さくして左にfloat。一覧性向上を目的*/
            float: left;/*これに続いているp要素と合わせ、親の中で左右に散らせている。spレイアウト対応*/
    }
    .subject p{
            width: 68%;/*spレイアウト対応。画像と横並びを設定*/
            float: right;/*spレイアウト対応。画像と横並びを設定*/
    }
    .subject h2{
        margin: 0;/*spレイアウト対応。レイアウト崩れを修正*/
    }
    .subject h2+p{
        margin: 0;/*spレイアウト対応。レイアウト崩れを修正*/
    }
    #content{
            width: 100%;/*spレイアウト対応。#contentのみで親の幅を占有させる*/
            margin-bottom: 20px;/*可読性の確保*/
    }
    #sidebar{
            width: 100%;/*spレイアウト対応。#sidebarのみで親の幅を占有させる*/
            box-sizing: border-box;/*右端からのはみ出しを修正*/
    }
    #photos{
            border: none;/*#photosの枠線不要のため*/
            height: auto;/*#photosの固定の高さを解除*/
            text-align: center;/*ネストしているimgのセンタリング*/
    }
    #photos img{
            position: static;/*絶対配置されている写真2枚を、両方一気に通常のレイアウト状態に戻す*/
            max-width: 100%;/*画像一枚のみで親の横幅を占有させる*/
            margin-top: 8px;/*可読性の確保*/
            box-sizing: border-box;/*写真の縁取りのpaddingまで、cssのwidthに含ませた*/
    }
    #photos p{
            display: inline;/*#photosの中の写真の自動改行を防ぎ、横並びにする*/
    }
    table{
            width: 100%;/*tableの固定値を可変値に変更*/
    }
    #date{
            width: 50px;/*thのみ固定にし、右側のtd要素を可変にそのまましておく*/
    }
    #namae,#email,#comment{
            width: 100%;/*#namae,#email,#commentの固定値を可変値に変更*/
    }
}

@media screen and (min-width: 768px) and (max-width: 959px){
#container {
    width: 100%;
}
img{
    max-width: 100%;/*画像原本の最大横幅まで可変させる。拡大による画像の劣化を防ぐ*/    
    height: auto;/*max-widthの状態に追随*/
    }
    .subject{
        width: 31.6%;/*#containerの固定width=950pxと、.subjectの固定width=300pxを比率計算している*/
        margin-right: 2.6%;/*#containerの固定width=950pxと、.subjectのmargin-right固定=25pxを比率計算している*/
    }
    #content{
            width: 67%;/*#containerとの比率計算*/
    }
    #sidebar{
            width: 25%;/*#containerとの比率計算*/
    }
    #photos{
            border: none;/*#photosの枠線不要のため*/
            height: auto;/*#photosの固定の高さを解除*/
    }
    #photos img{
            position: static;/*絶対配置されている写真2枚を、両方一気に通常のレイアウト状態に戻す*/
            max-width: 45%;/*#photosの中に写真を二枚、隙間をいれながら配置する。そのために45%とmax-widthで画像の原本サイズ以上に拡大されることを防ぎつつ調整をしている*/
    }
    #photos p{
            display: inline;/*#photosの中の写真の自動改行を防ぎ、横並びにする*/
    }
    table{
            width: 100%;/*tableの固定値を可変値に変更*/
    }
    #comment{
            width: 100%;/*#commentの固定値を可変値に変更*/
    }
}
