@charset "UTF-8";


html {
	font-size: 100%;
}

body {
	font-family: "Yu Gothic Medium", "游ゴシック Medium", Yu Gothic, "游ゴシック体", "ヒラギノ角ゴ Pro M3", sans-serif;
	line-height: 1.7;
}

a {
	text-decoration: none;
}

img {
	max-width: 100%;
}



/* ---------- 背景画像 ---------- */

#title {
	background-color: #ffffff;
		height: 100%;
}

#title .page-title {
	text-transform: none;
}

.big-bg {
	background-size: cover;
	background-position: center top;
}

/* ---------- HEADER ---------- */
.logo {
	width: 60px;
	margin-top: 10px;
}

.main-nav {
	display: flex;
	font-size: 1rem;
	text-transform: uppercase;
	margin-top: 15px;
	list-style: none;
}

.main-nav li {
	margin-left: 36px;
}

.page-header {
	display: flex;
	justify-content: space-between;
}

.wrapper {
	max-width: 90%;
	margin: 0 auto;
}

.menu-button {
	font-size: 0.8rem;
	background: #dcdcdc;
	color: #000000;
	border-radius: 5px;
	padding: 5px 15px;
}

.menu-button:hover {
	background: #a9a9a9;
}

/* ---------- ハンバーガーメニュー（PCでは非表示） ---------- */
.menu-toggle,
.hamburger {
	display: none;
}

/* ---------- TITLE ---------- */

#title {
	height: 300px;
	margin-bottom:40px ;
}

#title .page-title {
	text-align: center;
}

/* ---------- RANKING ---------- */

#back {
		background-image: url(images/bg_gray.jpg);
	background-repeat: repeat;
	margin: 0;
}

article {
	width: 100%;
}

.ranking {
	display: flex;
	justify-content: space-between;
	margin: 50px 0;
}

.article-group {
	width:60%;
	text-align: center;
	margin: 0 auto;
	background: #ffffff;
	padding: 20px;
}

article img {
	margin: 20px 0;
	cursor: pointer;
}

article p {
	margin-bottom: 0.5rem;
	text-align: left;
	font-size: 20px;
	font-weight: bold;
	border-bottom: 1px #a9a9a9 dashed;
}

h2 {
	text-align: center;
	font-size: 30px;
	margin-top: 15px;
}

.text-container {
	text-align: left;
	display: inline-block;
	padding: 20px 50px;
	
}

input[type="radio"] {
  display: none;
}

.button{
	font-size: 1.375rem;
	background: #c1000e;
	color: #ffffff;
	border-radius: 5px;
	padding: 0 30px;
	margin: 10px;
}

.button.active {
  display: none;
}

/* タブ切り替えの完全版 */
input[name="article"] {
    display: none;
}

#article-yearly, 
#article-firsthalf, 
#article-secondhalf {
    display: none;
}

#yearly:checked ~ #article-yearly,
#firsthalf:checked ~ #article-firsthalf,
#secondhalf:checked ~ #article-secondhalf {
    display: block;
}

.button.normal {
    display: inline-block;
    cursor: pointer;
    background: #555555;
    color: #ffffff;
    padding: 0 30px;
    margin: 10px;
    border-radius: 5px;
}

#yearly:checked ~ label[for="yearly"],
#firsthalf:checked ~ label[for="firsthalf"],
#secondhalf:checked ~ label[for="secondhalf"] {
    background-color: #c1000e;
}


/* ---------- SIDEMENU ---------- */

aside {
	width: 22%;
	text-align: left;
}

.sub-menu {
	list-style: none;
}

.button:hover {
	background: #cd5c5c;
}

/* ---------- 見出し ---------- */

.home-content {
	background-color: #c1000e;
}

.ranking-logo {
	height: 40%;
	padding: 10px;
	text-align: center;
}

.head {
	text-align: center;
	font-size: 20px;
}


/* ---------- FOOTER ---------- */

footer {
	background: #000000;
	text-align: center;
	padding: 26px 0;
}

footer p {
	color: #ffffff;
	font-size: 0.875rem;
}

.icon {
	height: 40px;
}

/* ---------- responsive ---------- */

@media (max-width: 767px) {
	.head {
		font-size: 0.75rem;
	}
	
	/* 横並びになっている大枠を、縦並びに変更 */
	.ranking {
		margin-top: 40px; /* 先ほど追加したテキスト下との余白 */
		flex-direction: column;
		margin-left: auto;
		margin-right: auto;
		align-items: center; /* ←念のため、大枠も中央揃えにする指示を追加 */
	}

	/* メインコンテンツとサイドバーの幅をスマホ画面いっぱいに */
	.article-group,
	aside {
		width: 100%;
		box-sizing: border-box; 
	}

	/* スマホ表示ではサイドバーの上の余白を少し空ける */
	aside {
		margin-top: 40px;
		text-align: center; 
	}
    
    /* ヘッダーメニューがスマホで画面外にはみ出さないように折り返す */
	.main-nav {
		flex-wrap: wrap;
		justify-content: center;
	}

	.main-nav li {
		margin-left: 10px;
		margin-bottom: 10px;
	}

	.article-group {
	width:95%;
	}

	.text-container {
		display: block; /* PC版のinline-blockを解除してブロック要素にする */
		width: 100%; /* 幅を親の白い箱にピッタリ合わせる */
		box-sizing: border-box; /* 余白（padding）を幅の中に含める魔法のコード */
		padding: 20px 15px; /* 左右の余白をスマホ向けに狭くする */
	}

	.button,
	.button.normal {
	font-size: 1.1rem;
	padding: 2px 15px;
	margin: 10px;
}



/* ---------- ランキング部分のスマホ用調整 ---------- */
	
	/* 順位テキストのフォントサイズを小さくする */
	article p {
		font-size: 16px; /* お好みで 14px や 15px に変更して調整してください */
	}

	/* 【おすすめ】スマホ画面に合わせて左右の余白も狭くする */
	.text-container {
		padding: 20px 15px; /* PC用の50pxだとスマホでは余白が広すぎるため、15pxに縮小 */
	}

/* ハンバーガーアイコンの表示とデザイン */
	.hamburger {
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		width: 30px;
		height: 22px;
		cursor: pointer;
		margin-top: 25px; /* ロゴの高さとバランスを合わせる */
		z-index: 100; /* メニューより手前に表示させる */
		position: relative;
	}

	/* 三本線のデザイン */
	.hamburger span {
		display: block;
		height: 3px;
		width: 100%;
		background-color: #000000;
		border-radius: 3px;
		transition: all 0.3s; /* アニメーションを滑らかにする */
	}

	/* スマホメニューの大枠（初期状態は非表示） */
	.nav-menu {
		position: absolute; /* ヘッダーの下に重なるように配置 */
		top: 80px; /* ヘッダーの高さに合わせて調整 */
		left: 0;
		width: 100%;
		background-color: #ffffff;
		box-shadow: 0 4px 6px rgba(0,0,0,0.1); /* 少し影をつける */
		display: none; /* 初期状態は隠す */
		z-index: 99;
	}

	/* メニューのリストを縦並びに */
	.main-nav {
		flex-direction: column;
		padding: 20px 0;
		margin: 0;
	}

	.main-nav li {
		margin: 0;
		text-align: center;
		padding: 10px 0;
	}

	/* ▼▼ タップされた時の動き ▼▼ */

	/* 1. チェックが入ったらメニューを表示 */
	.menu-toggle:checked ~ .nav-menu {
		display: block;
	}

	/* 2. メニューが開いている時、三本線を「×」に変形させる */
	.menu-toggle:checked ~ .hamburger span:nth-child(1) {
		transform: translateY(9.5px) rotate(45deg);
	}
	.menu-toggle:checked ~ .hamburger span:nth-child(2) {
		opacity: 0; /* 真ん中の線を消す */
	}
	.menu-toggle:checked ~ .hamburger span:nth-child(3) {
		transform: translateY(-9.5px) rotate(-45deg);
	}

}