/* 全体的なスタイル */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* ゴシック体に戻す */
    line-height: 1.8;
    background-color: #ffffff;
    color: #212529;
}

/* ヘッダー */
header {
    background: #ffffff;
    color: #212529;
    padding: 1.5rem 0; /* 左右のパディングを0に */
    text-align: center;
    border-bottom: 1px solid #dee2e6;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-container {
    max-width: 100%; /* デフォルトで100%幅 */
    width: 100%;
    margin: 0 auto;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 0.8rem; /* スマホでの左右のパディングを狭くする */
}


header h1 {
    margin: 0;
    flex-grow: 1; /* タイトルを中央に寄せる */
}

header h1 a {
    text-decoration: none;
    color: inherit;
}

/* ハンバーガーメニューボタン */
.hamburger-menu {
    display: block;
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1000; /* 最前面に表示 */
    background: none;
    border: none;
    padding: 0;
}

.hamburger-menu span {
    display: block;
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: #333;
    transition: all 0.3s;
}

.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 9px; }
.hamburger-menu span:nth-child(3) { top: 18px; }

.hamburger-menu.is-active span:nth-child(1) { top: 9px; transform: rotate(45deg); }
.hamburger-menu.is-active span:nth-child(2) { opacity: 0; }
.hamburger-menu.is-active span:nth-child(3) { top: 9px; transform: rotate(-45deg); }

/* グローバルナビゲーション（メニューパネル） */
.global-nav {
    display: none; /* 初期状態では非表示 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #ffffff; /* 完全な白 */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 999; /* ハンバーガーボタンより一つ下 */
    overflow-y: auto; /* メニューが多い場合にスクロール可能に */
}

.global-nav.is-active {
    display: flex; /* アクティブになったら表示 */
}

.global-nav ul {
    list-style: none;
    padding: 0;
    flex-direction: column;
    text-align: center;
}

.global-nav ul ul {
    /* サブメニューのスタイル */
    list-style: none;
    padding-left: 20px; /* インデント */
    margin-top: 10px;
}

.global-nav ul ul li {
    margin: 10px 0; /* サブメニュー項目の余白 */
}

.global-nav ul ul a {
    font-size: 1.2rem; /* サブメニューのフォントサイズを少し小さく */
    color: #555; /* サブメニューの文字色を少し薄く */
}

.global-nav li {
    margin: 20px 0;
}

.global-nav a {
    font-size: 1.5rem;
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

/* メインコンテンツ */
main {
    margin: 4rem auto;
    width: 100%; /* デフォルトで100%幅 */
    padding: 0 0.8rem; /* スマホでの左右の余白を狭くする */
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.box {
    text-align: center;
    display: block; /* h1とpが縦に並ぶように */
}

.box h1 {
    margin-bottom: 0.5rem; /* h1の下に余白を追加 */
}

.box p {
    margin-top: 0.5rem; /* pの上に余白を追加 */
}

section, article {
    margin-bottom: 0.4rem;    
    padding: 0.2rem;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #333;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #ced4da; /* 目立たないグレーに変更 */
    color: #333;
}

.article-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-left: 10px;
    border-left: 4px solid #ced4da; /* 目立たないグレーに変更 */
    color: #333;
}

h4 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: #333;
    font-weight: bold;
}

a {
    color: #6c757d; /* より落ち着いたグレーに変更 */
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ボタンの基本スタイル */
.btn {
    display: inline-block;
    padding: 12px 24px; /* 少し大きくする */
    background-color: #007bff;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px; /* 角を少し丸くする */
    transition: all 0.3s ease; /* トランジションをallに変更 */
    margin-top: 1rem;
    border: none; /* ボタンの枠線を消す */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 影を追加 */
    font-weight: bold; /* 文字を太くする */
}

.btn:hover {
    background-color: #0056b3;
    text-decoration: none;
    transform: translateY(-2px); /* 少し上に移動 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* 影を濃くする */
}

/* button-container内のpタグ内のaタグにスタイルを適用 */
.button-container p a {
    display: inline-block; /* aタグをブロック要素にしてpaddingを適用可能にする */
    padding: 12px 24px;
    background-color: #007bff;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: bold;
}

.button-container p a:hover {
    background-color: #0056b3;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* フッター */
footer {
    width: 100%; /* 幅を100%に */
    padding: 2rem 0;
    background: #f8f9fa;
    color: #6c757d;
    margin-top: 2rem;
    border-top: 1px solid #dee2e6;
}

.footer-content {
    max-width: 100%; /* デフォルトで100%幅 */
    margin: 0 auto;
    text-align: center;
    padding: 0 1.5rem; /* スマホでの左右のパディング */
}

/* リスト */
ul {
    list-style-position: inside;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem; /* リストの下に余白を追加 */
}

li {
    margin-bottom: 0.8rem; /* 各リストアイテムの下に余白を追加 */
}

/* テーブル */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

thead {
    background-color: #f8f9fa;
}

th, td {
    border: 1px solid #dee2e6;
    padding: 12px;
    text-align: left;
}

.provider-section {
    padding: 1.5rem 0; /* 内側の余白を調整 */
    margin-bottom: 2.5rem; /* 下のセクションとの余白を維持 */
}

h3 {
    font-size: 1.3rem; /* h3を少し小さく */
    margin-bottom: 1rem;
    padding-left: 0; /* 横のラインをなくす */
    border-left: none; /* 横のラインをなくす */
    color: #333;
}

.ranking-title {
    display: flex;
    align-items: center;
    gap: 10px; /* アイコンとテキストの間のスペース */
}

.ranking-title i {
    color: #FFD700; /* 金色 */
    font-size: 1.5rem;
}

/* アフィリエイトボタン */
.button-container.gmo-wimax-button a {
    background-color: #CC0000; /* 落ち着いた赤 */
}

.button-container.gmo-wimax-button a:hover {
    background-color: #990000;
}

.button-container.other-wimax-button a {
    background-color: #0099FF; /* UQライトブルーに近い青 */
}

.button-container.other-wimax-button a:hover {
    background-color: #0066CC;
}


.affiliate-button-container {
    text-align: center;
}

.button-container {
    text-align: center;
    margin-bottom: 1.5rem; /* ボタンコンテナの下に余白を追加 */
}

.article-eyecatch,
.article-image,
.article-header-image {
    max-width: 100%;
    height: auto;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    width: 100%; /* 画像がコンテナの幅を超えないようにする */
}

@media (min-width: 768px) {
    main {
        max-width: 720px;
        padding: 0;
    }

    .header-container,
    .footer-content {
        max-width: 960px;
        padding: 0;
    }
    section, article {
        margin-bottom: 1rem;
        padding: 1rem;
    }    
}

/* カードコンテナ */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* カード */
.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card img {
    width: 100%;
    height: auto;
    display: block;
}

.card-content {
    padding: 1rem;
}

.card-content h3 {
    margin: 0;
    font-size: 1.2rem;
    border-left: none;
    padding-left: 0;
}