@charset "UTF-8";

/*!
Theme Name: Simplicity2 child
Template:   simplicity2
Version:    20161002
*/

/* Simplicity子テーマ用のスタイルを書く */

/* サイドバーの見出し背景を修正 */
#sidebar h3{
  height: 50px;
  line-height: 50px;
  padding: 0 20px;
  border-radius: 5px;
  background: #084B8A;
  font-weight: bold;
  color: #F2F2F2;
}

body {
font-family : YuGothic, ‘游ゴシック’, sans-serif;
}


/* 見出しを変更 */
 
.article h1 {
 font-weight: 800;
 font-size: 1.8rem;
 line-height: 1.3;
}
 
.article h2 {
 font-size: 22px;
 line-height: 28px;
 padding: 15px 10px 12px 20px;
 background: #FFD700;
 color: #000;
 margin: 25px 0;
 font-weight: 550;
 position: relative;
 border:none;
}
.article h2:before{
 content: "";
 position: absolute;
 top: 0;
 left: 0;
 border-width: 0px 0px 16px 16px;
 border-style: solid;
 border-color: #FFF #7BC8BC #7BC8BC #FFF;
 background: #7BC8BC;
 display: block;
 width: 0;
}
 
.entry h2 a{
 font-weight: 700;
 font-size: 1.2rem;
 line-height: 1.4;
}
 
.article h3{
 font-size: 1.3rem;
 font-weight: 600;
 line-height: 1.3;
 padding: 5px 15px;
 border-left: 6px solid #FFD700;
 border-bottom: none !important;
 color: #000;
 margin:35px 0px 30px;
}
 
.article h4{
 font-size: 1.1rem;
 font-weight: 600;
 line-height: 1.3;
 padding: 5px 15px;
 border-bottom: none !important;
 border-left: 2px solid #FFD700;
 color: #000;
 margin:35px 5px 20px;
}


/* フォントを灰色にする */
body{
　color:#555555 !important;
}



/* mainとsidebarの枠線を消す */
#main,#sidebar{
 border:none !important;
}


/* 記事間に線を引く */
#main .entry {
 border-bottom: 1px solid #F0F0F0;
 padding-bottom: 15px;
}


/* 関連記事間に線を引く */
#main .related-entry {
 border-bottom: 1px solid #F0F0F0;
 padding-bottom: 10px; 
}




/* メタ情報の大きさを変更し、右側へ*/
.post-meta,.entry .post-meta a  {
    font-size: 12px;
    line-height: 160%;
}
 
.entry .post-meta {
    text-align: right !important;
}

/* サイドバー行間*/
#sidebar li {
    margin-bottom: 1px;
}


/*グローバルナビの修飾 */
#navi {
 border-top:1px solid #F3F3F3;
 border-bottom:1px solid #F3F3F3;
}


 



/* ナビメニュー */
#navi ul{
color: #909396; /* 文字色（白） */
line-height: 30px; /* 高さ */
font-weight:bold; /* 太字にして */
}


/*グローバルナビの等間隔 */
#navi ul{
display: flex; /*フレキシブルボックス*/
text-align: center; /*センタリングは好みで*/
}
#navi ul{
  width: 700px; /*幅は大きめに調節する*/
}


/* 同じ幅にするなら以下*/
#{$wrap} #{$menu} > li.mega-menu-item {
  width: 170px;/* 1070/6=178*/
}


/*ホバー時の線と文字の色を変更*/
#navi ul li a:hover{
    color: #FFD700 !important;
　　　　　　　　background-color:white;
}
#navi ul li a:before{
   background:#10aba6 !important;
}
#navi ul,#navi{
 background-color:white;
}

/サイドバー文字の大きさを変更*/
#sidebar h4{
  margin-bottom: 10px;
  font-size:14px;
}
 
.widget{
  margin-bottom: 45px;
  font-size:14px;

.entry h2 a{
  color:#333;
  font-size:20px;
  text-decoration:none;
  font-weight:bold;
}
 
.post-meta{
  margin-bottom: 1.7em;
  text-align:right;
  background-color:#F7F7F7;
  color:#555;
  font-size:13px;
}
 
.entry-read{
  margin:0;
  font-size:13px
}
 
.footer-post-meta{
  text-align: right;
  color:#555;
  font-size:13px;
}


/* 記事を読むボタンの装飾 */
#breadcrumb span.sp {
    display:none;
}

#breadcrumb div[itemtype="http://data-vocabulary.org/Breadcrumb"] {
  background: #F3F3F3;
  padding: 4px;
  position:relative;
  margin-right:20px;
}
 
#breadcrumb div[itemtype="http://data-vocabulary.org/Breadcrumb"] a:after,
#breadcrumb div[itemtype="http://data-vocabulary.org/Breadcrumb"] a:before
{
  content:'';
  position:absolute;
  top: 0;
  bottom: 0;
  width: 1em;
  background: #F3F3F3;
  transform: skew(-10deg);
}
 
 
#breadcrumb div[itemtype="http://data-vocabulary.org/Breadcrumb"] a:before{
  left: -.6em;
  border-radius: 5px 0 0 5px;
}
#breadcrumb div[itemtype="http://data-vocabulary.org/Breadcrumb"] a:after{
  right: -.6em;
  border-radius: 0 5px 5px 0;
}

#breadcrumb a {
    color: #4D4D4D;
    font-weight:700;
}

#breadcrumb {
    color: #4D4D4D;
}


function add_ads_before_1st_h2($the_content) {
if (is_single()) {
//広告（AdSense）タグを記入
$ads = &amp;lt;&amp;lt;&amp;lt; EOF&lt;/code&gt;
 
<script type="text/javascript">
    google_ad_client = "ca-pub-9834927932760981";
    google_ad_slot = "5896918554";
    google_ad_width = 468;
    google_ad_height = 60;
</script>
<!-- daijinnタイトル下 -->
<script type="text/javascript"
src="//pagead2.googlesyndication.com/pagead/show_ads.js">
</script> 
 
EOF;
$h2 = '/&amp;lt;h2.*?&amp;gt;/i';//H2見出しのパターン
if ( preg_match( $h2, $the_content, $h2s )) {//H2見出しが本文中にあるかどうか
$the_content = preg_replace($h2, $ads.$h2s[0], $the_content, 1);//最初のH2を置換
}
}
return $the_content;
}
add_filter('the_content','add_ads_before_1st_h2');