/* style.css */
body {
    font-family: sans-serif;
    margin: 0;
    background-color: #f0f2f5; /* デフォルト背景色 */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #333;
}

.container.index-page {
    background-image: url("background.png");
    background-size: cover; /* 画像がコンテナ全体を覆うように */
    background-position: center; /* 画像を中央に配置 */
    background-repeat: no-repeat; /* 画像を繰り返さない */
}

.container {
    background-color: #fff; /* index.pngのメインコンテンツ背景色 */
    width: 100%;
    max-width: 450px; /* index.pngの幅に合わせる */
    min-height: 100vh; /* 画面全体の高さに */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    padding: 0; /* 全画面なのでpaddingは内部要素で調整 */
    box-sizing: border-box;
    position: relative; /* フッター固定のため */
}

.main-content-area { /* ヘッダーとメインコンテンツを包括するdiv */
    flex-grow: 1;
    overflow-y: auto; /* メインコンテンツが長い場合にスクロール */
    padding: 20px; /* 左右のパディング */
    padding-bottom: 120px; /* フッターの高さ分を確保 */
    box-sizing: border-box;
}

header {
    text-align: center;
    margin-top: 40px; /* 画像を参考に調整 */
    margin-bottom: 20px;
    width: 100%; /* 中央寄せのため */
}

.sub-title {
    font-size: 0.9em;
    color: #002b5b; /* 画像の紺色 */
    margin-bottom: 5px;
}

h1 {
    font-size: 3.5em; /* 画像を参考に調整 */
    color: #002b5b; /* 画像の紺色 */
    margin: 0;
    font-weight: bold;
    letter-spacing: 1px; /* 画像を参考に調整 */
}

.sub-title-kana {
    font-size: 0.9em;
    color: #002b5b; /* 画像の紺色 */
    margin-top: 5px;
}

header::after {
    content: "";
    display: block;
    width: 80px;
    height: 4px;
    /* background-color: #002b5b; */
    margin: 20px auto 0;
    position: relative;
}

header::before {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    /* background-color: #ff6600; */
    margin: 0 auto 5px;
    position: relative;
    left: 30px;
}

.index-main {
    display: flex;
    flex-direction: column;
    align-items: flex-end; 
    width: 100%;
    box-sizing: border-box;
}

.description-wrapper {
    width: 83%;
    display: flex;
    justify-content: flex-end;
    margin-top: 30px;
}

.description {
    background-color: rgba(248, 249, 250, 0.9);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative;
    border-left: 5px solid #002b5b;
    max-width: 80%;
    text-align: left;
}

.description::before {
    content: "";
    position: absolute;
    left: -15px;
    top: 20px;
    width: 5px;
    height: 60px;
    background-color: #ff6600;
}

.description-title {
    font-weight: bold;
    color: #002b5b;
    margin-bottom: 15px;
    font-size: 90%;
}

.description p {
    font-size: 79%;
    line-height: 1.7;
    color: #333;
}

footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 20px;
    background-color: #002278; /* 指示通り変更 */
    color: white;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 900;
}

.start-btn {
    background-color: #f2f5ff; /* 指示通りボタン内色変更 */
    color: #002278; /* ボタン内色に合わせて文字色変更 */
    border: 4px solid transparent; /* グラデーション枠のための準備 */
    padding: 16px 33px; /* border幅を考慮して調整 */
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    width: 80%;
    max-width: 300px;
    margin-bottom: 10px;
    position: relative; /* 枠線グラデーション用 */
    background-clip: padding-box; /* 枠線グラデーション用 */
}

.start-btn::before { /* 枠線グラデーション用疑似要素 */
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: -1;
    margin: -4px; /* border幅分だけ外側に */
    border-radius: inherit; /* 親要素の角丸を継承 */
    background: linear-gradient(135deg, #FF0000, #007dff);
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.footer-logo {
    max-width: 180px;
    height: auto;
    filter: brightness(0) invert(1); /* フッター背景が濃くなったのでロゴを白に */
}

/* フォーム用のスタイル */
.form-container {
    position: fixed;
    bottom: -100%; /* 初期状態では画面外 */
    left: 0;
    width: 100%;
    height: 100%; /* 画面全体を覆う */
    background-color: #f0f2f5;
    z-index: 1000;
    transition: bottom 0.5s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center; /* 内部要素を中央揃え */
    box-sizing: border-box;
}

.form-container.visible {
    bottom: 0; /* 表示時に画面下からスライドイン */
}

.progress-bar-container {
    position: fixed; /* 画面上部に固定 */
    top: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    padding: 15px 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1001; /* form-navigationより手前 */
    text-align: center;
    box-sizing: border-box;
}

.progress-bar-text {
    font-size: 1.1em;
    color: #002b5b;
    margin-bottom: 10px;
    font-weight: bold;
}

.progress-bar {
    width: 80%;
    max-width: 350px;
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
}

.progress-bar-inner {
    width: 0%;
    height: 100%;
    background-color: #ff6600;
    border-radius: 5px;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.progress-bar-number {
    position: absolute;
    right: 10px;
    color: #002b5b;
    font-size: 0.8em;
    font-weight: bold;
}

.question-set-wrapper { 
    width: 100%;
    flex-grow: 1; /* 残りの高さを全て使う */
    overflow-y: auto; /* ここでスクロールを有効に */
    padding-top: 80px; /* 固定ヘッダー分 */
    padding-bottom: 80px; /* 固定フッター分 */
    box-sizing: border-box;
    display: flex; 
    flex-direction: column; /* 設問セットを縦に並べる */
    align-items: center; /* 設問セットを中央揃え */
}

.question-set {
    width: 90%; /* 横幅を親要素に合わせる */
    max-width: 600px; /* 最大幅を設定 */
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin: 20px auto; /* 上下マージンと左右中央揃え */
}

.question-item {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.question-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.question-text {
    font-size: 1.1em;
    color: #002b5b;
    margin-bottom: 20px;
    line-height: 1.5;
}

.options-container {
    display: flex;
    justify-content: space-around; /* 均等配置 */
    align-items: center;
    flex-wrap: nowrap; /* スマホでも横一列を維持 */
    width: 100%; /* コンテナ幅いっぱいに広げる */
}

.option-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    flex: 1 1 auto; /* 基本サイズ自動、伸縮許可 */
    min-width: 50px; /* 最小幅を確保して見切れ防止 */
    padding: 0 3px; /* 左右に少しパディング */
    box-sizing: border-box;
}

.option-item input[type="radio"] {
    display: none;
}

.option-item .option-circle {
    width: 32px; /* サイズ調整 */
    height: 32px;
    border: 2px solid #002b5b;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.option-item:nth-child(2) .option-circle,
.option-item:nth-child(3) .option-circle {
    width: 26px; /* 中央2つをさらに小さく */
    height: 26px;
}

.option-item input[type="radio"]:checked + .option-circle {
    background-color: #ff6600;
    border-color: #ff6600;
}

.option-label {
    font-size: 0.65em; /* サイズ調整 */
    color: #555;
    margin-top: 6px; /* マージン調整 */
    text-align: center;
    line-height: 1.1;
    word-break: keep-all; 
    overflow-wrap: break-word;
    min-height: 2.2em; /* ラベルが2行になる場合も高さを揃える */
    display: flex;
    align-items: center; /* テキストを垂直中央に */
    justify-content: center; /* テキストを水平中央に */
}

.form-navigation {
    position: fixed; /* 画面下部に固定 */
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background-color: #fff;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    text-align: center;
    z-index: 1001;
    box-sizing: border-box;
}

.nav-btn {
    background-color: #003049;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1em;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.nav-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.nav-btn:not(:disabled):hover {
    background-color: #001f30;
}

/* thanks.php固有のスタイル */
.container.result-page .main-content-area {
    padding-bottom: 20px; 
    background-color: #f3f5ff;
}

.container.result-page footer {
    position: static; /* thanksページではフッター固定解除 */
    background-color: #002278; /* 指示通り変更 */
    padding: 20px;
    margin-top: 20px;
    border-top: none;
}

.container.result-page .footer-logo {
    filter: brightness(0) invert(1);
}

.result-header { /* 「診断結果」のタイトルを囲むdiv */
    text-align: center; /* h1内のテキストを中央揃え */
    margin-bottom: 25px; /* 見栄え調整のためのマージン */
}

.result-content {
    text-align: center;
    padding: 30px 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-top: 30px;
}

.result-content h2 {
    color: #002b5b; /* 既存 */
    margin-bottom: 20px; /* 下線とのバランスを見て調整 */
    padding-bottom: 8px;   /* テキストと下線の間の余白 */
    border-bottom: 3px solid #ff6600; /* オレンジ色の下線 */
    display: inline-block; /* 下線の幅をテキストの長さに合わせる */
}

.result-content p {
    line-height: 1.6;
    margin-bottom: 10px;
}

.result-type {
    font-size: 1.5em;
    font-weight: bold;
    color: #ff6600;
    margin-bottom: 20px;
}

.restart-btn {
    display: block; /* ブロック要素にして中央寄せを可能に */
    width: fit-content; /* ボタンの幅を内容に合わせる */
    margin-top: 30px;   /* 上の要素との間隔 */
    margin-bottom: 30px; /* 下の要素との間隔 (お好みで調整) */
    margin-left: auto;  /* 左右のマージンをautoにして中央寄せ */
    margin-right: auto; /* 左右のマージンをautoにして中央寄せ */
    background-color: #003049; /* 既存 */
    color: white; /* 既存 */
    padding: 12px 25px; /* 既存 */
    text-decoration: none; /* 既存 */
    border-radius: 20px; /* 既存 */
    transition: background-color 0.2s ease; /* 既存 */
}

.restart-btn:hover {
    background-color: #001f30;
}
.eventtitle {
    text-decoration:underline;
    text-decoration-color:#003049;
}

.event-btn {
    display: block; /* ブロック要素にして中央寄せを可能に */
    width: fit-content; /* ボタンの幅を内容に合わせる */
    margin-top: 30px;   /* 上の要素との間隔 */
    margin-left: auto;  /* 左右のマージンをautoにして中央寄せ */
    margin-right: auto; /* 左右のマージンをautoにして中央寄せ */
    background-color: #003049; /* 既存 */
    color: white; /* 既存 */
    padding: 12px 25px; /* 既存 */
    text-decoration: none; /* 既存 */
    border-radius: 20px; /* 既存 */
    transition: background-color 0.2s ease; /* 既存 */
}

.event-btn:hover {
    background-color: #001f30;
}

.lp-btn {
    display: block; /* ブロック要素にして中央寄せを可能に */
    width: fit-content; /* ボタンの幅を内容に合わせる */
    margin-top: 30px;   /* 上の要素との間隔 */
    margin-bottom: 30px; /* 下の要素との間隔 (お好みで調整) */
    margin-left: auto;  /* 左右のマージンをautoにして中央寄せ */
    margin-right: auto; /* 左右のマージンをautoにして中央寄せ */
    background-color: #f67520; /* 既存 */
    color: white; /* 既存 */
    padding: 12px 25px; /* 既存 */
    text-decoration: none; /* 既存 */
    border-radius: 20px; /* 既存 */
    transition: background-color 0.2s ease; /* 既存 */
}

.lp-btn:hover {
    background-color: #f46100;
}
.footer-links {
    margin-bottom: 10px; /* Adjust spacing as needed */
    text-align: center; /* Center the links if they wrap */
    font-size: 14px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin: 0 10px; /* Adds horizontal spacing between links */
}

.footer-links a:hover {
    text-decoration: underline;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .main-content-area {
        padding: 15px;
        padding-bottom: 110px; 
    }
    header {
        margin-top: 30px;
    }
    h1 {
        font-size: 2.8em;
    }
    .index-main {
        /* align-items: center; */
        padding: 0 10px;
    }
    .description-wrapper {
        justify-content: center;
        width: 80%;
    }
    .description {
        padding: 20px;
        max-width: 95%;
    }
    .description p {
        /* font-size: 0.9em; */
    }
    .start-btn {
        font-size: 1.1em;
        padding: 14px 31px; /* border幅考慮 */
        width: 90%;
        margin-bottom: 8px;
    }
    .footer-logo {
        max-width: 160px;
    }

    .question-set-wrapper {
        padding-top: 75px; 
        padding-bottom: 75px; 
    }
    .option-item .option-circle {
        width: 28px; /* さらに調整 */
        height: 28px;
    }
    .option-item:nth-child(2) .option-circle,
    .option-item:nth-child(3) .option-circle {
        width: 22px; /* さらに調整 */
        height: 22px;
    }
    .option-label {
        font-size: 0.6em; /* さらに調整 */
        min-height: 2em;
    }
    .question-text {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .main-content-area {
        padding: 10px;
        padding-bottom: 100px; 
    }
    header {
        margin-top: 20px;
    }
    h1 {
        font-size: 2.2em;
    }
    .sub-title, .sub-title-kana {
        font-size: 0.8em;
    }
    .index-main {
        padding: 0 5px;
    }
    .description {
        padding: 15px;
        max-width: 100%;
    }
    .description-title {
        font-size: 80%;
    }
    footer {
        padding: 10px 15px;
    }
    .start-btn {
        width: 95%;
        font-size: 1em;
        padding: 12px 27px; /* border幅考慮 */
        margin-bottom: 5px;
    }
    .footer-logo {
        max-width: 130px;
    }

    .progress-bar-text {
        font-size: 1em;
    }
    .progress-bar {
        height: 8px;
    }
    .question-set-wrapper {
        padding-top: 70px; 
        padding-bottom: 70px; 
    }
    .question-set {
        padding: 10px;
        width: 95%;
        margin: 10px auto;
    }
    .option-item .option-circle {
        width: 26px; /* 極小画面での調整 */
        height: 26px;
    }
    .option-item:nth-child(2) .option-circle,
    .option-item:nth-child(3) .option-circle {
        width: 20px; /* 極小画面での調整 */
        height: 20px;
    }
    .option-label {
        font-size: 0.55em; /* 極小画面での調整 */
        min-height: 1.8em;
    }
    .nav-btn {
        padding: 12px 25px;
        font-size: 1em;
    }
}
.radar-chart-container {
    width: 80%; /* 幅を調整 */
    max-width: 500px; /* 最大幅を設定 */
    margin: 30px auto 20px auto; /* 上下のマージンを調整 */
}

/* 性格タイプ・強み共通の見出しスタイル */
.section-title {
    display: flex; /* 要素を横並びにする */
    align-items: center; /* 中央揃え（垂直方向） */
    margin-top: 30px; /* 上のマージン */
    margin-bottom: 10px; /* 下のマージン (h3とh4/pの間のスペース用) */
    background-color: #f3f5ff;
}

.title-bar {
    width: 10px; /* バーの幅 */
    height: 35px; /* バーの高さ（h3のフォントサイズに合わせると良い） */
    background-color: #00298f; /* バーの色（濃い青系の例） */
    margin-right: 10px; /* バーとテキストの間隔 */
    /* border-radius: 2px;  */
}

.section-title h3 {
    margin: 0; /* h3のデフォルトマージンをリセット */
    font-size: 1.5em; /* 文字サイズ調整 */
    color: #00298f; /* 文字色 */
    font-weight: bold;
}
 /* 結果説明文のスタイル調整（任意） */
.result-content > p.description-text { /* クラス名を追加して特定 */
    margin-top: 0;
    margin-bottom: 20px; /* 強みセクションとの間隔 */
}

/* 性格タイプ説明文 */
.personality-description {
    margin-top: 0; /* h2の直後なので上マージンは少なめ、または無し */
    margin-bottom: 30px; /* 次のセクションとの間隔 */
    line-height: 1.7;
    font-size: 1.0em;
    text-align: left;
}
.personality-image {
    width: 50%;
}

/* 強み・課題の各項目のスタイル */
.item-title { /* 強み・課題の具体的なタイトル用 */
    font-size: 1.15em;
    font-weight: bold;
    color: #333;
    margin-top: 10px;
    margin-bottom: 5px;
    text-align: left;
}
.item-title:first-of-type {
     margin-top: 0; /* 各セクションの最初の項目はsection-titleからのマージンで調整 */
     text-align: left;
}

.item-description { /* 強み・課題の具体的な説明文用 */
    margin-top: 0;
    margin-bottom: 15px;
    line-height: 1.6;
    text-align: left;
}

/* おすすめの職種リスト */
.recommended-jobs-list {
    list-style-position: inside;
    padding-left: 0; /* discがtitle-barと揃うように調整 */
    margin-top: 0;
    margin-bottom: 20px;
    text-align: left;
}
.recommended-jobs-list li {
    margin-bottom: 8px;
    line-height: 1.6;
    font-size: 1.0em;
    text-align: left;
}
.one-point-advice-text {
    font-size: 1.0em;
    line-height: 1.6;
    margin-top: 0;
    margin-bottom: 20px; /* 次のセクションとの間隔 */
    text-align: left;
}
/* SNS共有・ダウンロードボタン用スタイル */
.share-download-section {
    margin-top: 25px; /* 上の要素との間隔 */
    margin-bottom: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee; /* 区切り線 */
    text-align: center;
}
.share-download-section h4 {
    font-size: 1.2em; /* style.cssの.section-title h3に近いサイズ感 */
    color: #002b5b; /* style.cssの主要カラー */
    margin-bottom: 18px;
    font-weight: bold;
}
.share-buttons-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px; /* ボタン間のスペース */
}
.sns-share-button, .result-download-button {
    display: inline-flex; /* アイコンとテキストを中央揃え */
    align-items: center;
    justify-content: center;
    gap: 8px; /* アイコンとテキストの間 */
    padding: 10px 18px;
    border-radius: 25px; /* style.cssの.start-btnに近い丸み */
    text-decoration: none !important;
    color: white !important; 
    font-weight: bold;
    font-size: 0.9em;
    transition: opacity 0.2s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    min-width: 130px; /* ボタンの最小幅 */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.sns-share-button img, .result-download-button img {
     width: 18px; /* アイコンサイズ */
     height: 18px;
     margin-right: 5px; /* アイコンとテキストの間のスペースを微調整 */
}
.sns-share-button:hover, .result-download-button:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}
.sns-share-button.twitter { background-color: #1DA1F2; }
.sns-share-button.line { background-color: #00B900; }
.sns-share-button.instagram {
    background: #d6249f;
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%,#d6249f 60%,#285AEB 90%);
}
.result-download-button { background-color: #5a5a5a; } /* Bootstrap Success Green */

.info-banner {
    background-color: #002080; /* 画像に近い濃い青色 */
    color: white;
    padding: 15px 30px;
    font-size: 16px;
    font-family: sans-serif; /* フォントはお好みで指定してください */
    border-radius: 5px; /* 少し角を丸くする場合。不要な場合は0に */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center; /* テキストが複数行になる場合も考慮 */
    margin-top: 10px;
}

.info-banner .text {
    margin: 0 15px; /* アイコンとテキストの間隔 */
}

.info-banner .icon {
    display: inline-block;
    width: 20px; /* アイコンの幅 */
    height: 20px; /* アイコンの高さ */
    position: relative;
    flex-shrink: 0; /* アイコンが縮まないようにする */
}

/* CSSで矢印を作成 */
.arrow-up::before,
.arrow-up::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent; /* 矢印の半分の幅 */
    border-right: 8px solid transparent; /* 矢印の半分の幅 */
}

.arrow-up::before {
    bottom: 8px; /* 1つ目の三角形の位置 */
    border-bottom: 10px solid white; /* 矢印の色と高さ */
}

.arrow-up::after {
    bottom: 0px; /* 2つ目の三角形の位置 */
    border-bottom: 10px solid white; /* 矢印の色と高さ */
}

.result-image-for-sharing img {
    width: 100%;
    max-width: 500px; /* 最大幅を設定 */
    margin: 0 auto; /* 中央寄せ */
    display: block; /* ブロック要素にして中央寄せを可能に */    
}