/* 
 * 介護ナイン - メインスタイルシート
 * style.css
 */

/* ========== 基本設定 ========== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: "Zen Kaku Gothic New","M PLUS 1p",'Hiragino Sans', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
    background-color: #E6F3F8; /* 薄い水色 */
    background-image: url('../images/background.png'); /* 背景画像追加 */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #333;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: 45px; 
}

.container {
    max-width: 800px; 
    margin: 0 auto;
    padding: 0 10px;
    width: 100%;
}

a {
    color: #FF8C00;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========== ヘッダー ========== */
header {
    padding: 8px 0; /* ヘッダーの上下パディングを減少 */
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 10px; /* ヘッダー下部の余白を減少 */
}

.logo {
    text-align: center;
}

.logo img {
    height: 40px; /* ロゴのサイズを大きく */
    margin: 0 auto;
}

/* ========== メイン ========== */
main {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    /* フッターとの間隔を調整 */
    margin-bottom: -20px;
}

/* ========== ヒーローセクション ========== */
.hero-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 15px 10px; /* 上下パディングを減少 */
    margin: 0 auto 10px; /* 下部マージンを減少 */
    max-width: 800px; /* フォーム幅と合わせる */
    gap: 10px; /* ギャップを減少 */
}

.hero-text {
    flex: 1.2; /* テキスト部分を少し広く */
    text-align: center; /* 中央揃えに変更 */
}

.hero-section h1 {
    font-size: 24px;
    margin-bottom: 10px; /* マージンを減少 */
    color: #333; /* 少し濃い色に */
    text-align: center;
    line-height: 1.4;
}

.hero-section h2 {
    font-size: 28px; /* サイズ拡大 */
    margin-bottom: 10px; /* マージンを減少 */
    line-height: 1.3;
    text-align: center;
    font-weight: bold;
}

/* 地域名に含まれる区切り文字「・」を小さく表示 */
.hero-section h2 .separator {
    font-size: 18px;
    vertical-align: middle;
    color: #555;
    margin: 0 2px;
}

/* 「の」の文字を小さく表示 */
.hero-section h2 .small-text {
    font-size: 18px;
    vertical-align: middle;
    color: #555;
}

/* 「非公開求人」をハイライト */
.highlight {
    color: #FF8C00; /* オレンジ色 */
    font-weight: bold;
    font-size: 32px;
    display: inline-block;
}

/* 「を」の文字を小さく表示 */
.small-connector {
    font-size: 18px;
    vertical-align: middle;
    color: #555;
    margin: 0 2px;
}

/* 「無料」を最も大きく表示 */
.emphasis {
    color: #FF8C00;
    font-weight: bold;
    font-size: 36px;
    display: inline-block;
}

/* 「で紹介」は通常サイズ */
.normal-text {
    font-size: 28px;
    display: inline-block;
}

.hero-image {
    flex: 0.8; /* イラスト部分を少し狭く */
    max-width: 280px; /* イメージサイズを少し縮小 */
    display: flex;
    justify-content: flex-end; /* 右寄せに */
    align-items: center;
}

.hero-image img.counselor-image {
    max-height: 30vh; /* 高さを少し減少 */
    width: auto;
    object-fit: contain;
}

/* ========== ステップナビゲーション ========== */
.steps-nav {
    display: flex;
    justify-content: center;
    margin: 10px 0 15px; /* 上下マージンを減少 */
    flex-wrap: nowrap;
    position: relative; /* 追加：吹き出し用 */
}

.step-item {
    width: 45px; /* サイズ拡大 */
    height: 45px; /* サイズ拡大 */
    border-radius: 50%;
    background-color: #ccc;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px; /* フォントサイズ拡大 */
    font-weight: bold;
    margin: 0 8px; /* 左右マージン調整でより間隔をあける */
    position: relative;
    padding: 0; /* 内部のパディングをなくし、テキストの余白問題を解決 */
}

.step-item:not(:last-child):after {
    content: '';
    position: absolute;
    top: 50%;
    right: -13px; /* 線の位置調整 */
    width: 5px; /* 線の長さ調整 */
    height: 1px;
    background-color: #ccc;
}

.step-item.active {
    background-color: #FF8C00;
}

.step-item.active:not(:last-child):after {
    background-color: #FF8C00;
}

/* ========== ステップコンテンツ ========== */
#step-content {
    margin-top: 10px; /* 上部マージン減少 */
}

.step-content-inner {
    background-color: #fff;
    border-radius: 8px;
    padding: 15px; /* パディングを少し増加 */
    box-shadow: 0 1px 5px rgba(0,0,0,0.1);
    margin-bottom: 0; /* フッターとの間隔調整 */
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center; /* h3を中央寄せするために追加 */
}

.step-content-inner h3 {
    text-align: center;
    margin-bottom: 12px;
    font-size: 16px;
    position: relative;
    color: #555;
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
    width: auto;
}

.step-content-inner h3:before {
    content: '■';
    color: #FF8C00;
    margin-right: 2px; /* 間隔を狭く修正 */
    position: relative;
    display: inline-block;
}

.selection-type {
    font-size: 0.8em;
    font-weight: normal;
    margin-left: 5px;
    color: #666;
}

/* ========== オプション選択グリッド ========== */
.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px; /* グリッド間隔を少し増加 */
    margin-bottom: 15px;
    text-align: left; /* グリッド内は左寄せに戻す */
}

.option-item {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.option-item:hover {
    border-color: #FF8C00;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.option-item.selected {
    border-color: #FF8C00;
    background-color: #FFF5E6;
}

.option-item img {
    width: 60px;
    height: 60px;
    margin: 0 auto 8px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.option-item:hover img {
    transform: scale(1.05);
}

.option-item p {
    font-size: 15px;
    font-weight: bold;
    margin: 0;
    line-height: 1.2;
    color: #333;
}

.full-width {
    grid-column: span 2;
}

/* ========== フォーム要素 ========== */
.form-group {
    margin-bottom: 12px; /* マージン底を少し増加 */
}

.form-group label {
    display: block;
    margin-bottom: 3px;
    font-weight: bold;
    color: #555;
    font-size: 13px;
}

input[type="text"],
input[type="tel"],
input[type="email"],
select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    height: 38px;
}

input:focus,
select:focus {
    outline: none;
    border-color: #FF8C00;
}

.help-text {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

.area-info {
    text-align: center;
    margin: 5px 0 10px;
    font-weight: bold;
    color: #555;
    font-size: 13px;
}

.form-agreement {
    margin: 10px 0;
    text-align: center;
    font-size: 12px;
}


/* ========== ナビゲーションボタン ========== */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 15px; /* マージン上部を増加 */
}

/* STEP1の「次へ」ボタン位置調整 */
#step1-content .navigation-buttons {
    justify-content: flex-end; /* 右寄せに変更 */
}

.back-button,
.next-button,
.submit-button {
    padding: 10px 18px;
    border-radius: 30px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.back-button {
    background-color: #f0f0f0;
    color: #555;
}

.back-button:hover {
    background-color: #e0e0e0;
}

.back-button:before {
    content: "← ";
    margin-right: 5px;
}

.next-button,
.submit-button {
    background-color: #FF8C00;
    color: #fff;
    box-shadow: 0 2px 5px rgba(255, 140, 0, 0.3);
}

.next-button:hover,
.submit-button:hover {
    background-color: #FF7800;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 140, 0, 0.4);
}

.next-button:after {
    content: " →";
    margin-left: 5px;
}

.submit-button {
    padding: 12px 25px;
    font-size: 18px;
    margin-left: auto;
    animation: submitPulse 2s infinite;
}

@keyframes submitPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* ========== フッター ========== */
footer {
    background-color: #FF8C00;
    color: #fff;
    padding: 8px 0;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 100;
}

.footer-links {
    text-align: center;
    margin-bottom: 3px;
}

.footer-links a {
    color: #fff;
    margin: 0 8px;
    text-decoration: none;
    font-size: 12px;
}

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

.copyright {
    text-align: center;
    font-size: 10px;
}

/* ========== モーダルウィンドウ ========== */
.modal-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 10% auto;
    padding: 12px;
    width: 90%;
    max-width: 500px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.modal-close {
    position: absolute;
    top: 5px;
    right: 8px;
    color: #aaa;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
}

.modal-close:hover {
    color: #555;
}

#modal-body {
    max-height: 60vh;
    overflow-y: auto;
    padding: 5px;
}

/* ========== 離脱防止ポップアップ ========== */
.exit-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 1001;
    justify-content: center;
    align-items: center;
}

.exit-popup-content {
    background-color: #fff;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    max-width: 350px;
    width: 90%;
}

.exit-popup-image {
    width: 100%;
    height: auto;
    margin-bottom: 12px;
}

.exit-popup-buttons {
    display: flex;
    justify-content: center; /* 中央配置に変更 */
    padding: 0 12px;
}

.continue-button {
    padding: 7px 12px;
    border-radius: 5px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    width: 60%; /* ボタン幅を調整 - 少し広げる */
    font-size: 13px;
    background-color: #FF8C00;
    color: #fff;
}

.continue-button:hover {
    background-color: #FF7800;
}

/* ========== PCビュー用の調整（追加） ========== */
@media (min-width: 768px) {
    /* ヒーローイメージを10%縮小 */
    .hero-section-image img {
        max-width: 90%;
        margin: 0 auto;
    }
    
    /* フォームを15%縮小 */
    .step-content-inner {
        max-width: 680px; /* 800pxから約15%縮小 */
        margin-left: auto;
        margin-right: auto;
    }
    
    /* ステップナビゲーションも同じ幅に合わせる */
    .steps-nav {
        max-width: 680px;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* メインコンテンツにパディングを追加してフッターとの重なりを防止 */
    main {
        padding-bottom: 60px;
        margin-bottom: 0;
    }
    
    /* コンテナ幅も調整 */
    .container {
        max-width: 680px;
    }
}