/*
Theme Name: COCOWORKS
Description: ハワイ求人ポータルサイトテーマ（企業管理機能付き）
Version: 1.0
Author: Gemini
*/

/* リセット & 基本設定 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Meiryo, sans-serif;
    background: #f8f9fa; color: #333; line-height: 1.6;
}

/* 共通カラー定義 */
:root {
    --primary: #0089d0;
    --primary-hover: #006ba6;
    --success: #3ea612;
    --danger: #bf2534;
    --gray-bg: #f8f9fa;
    --border: #e1e8ed;
}

/* ヘッダー */
.header { background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 1000; }
.header-content { max-width: 1200px; margin: 0 auto; padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; }
.logo img { height: 40px; width: auto; }
.nav { display: flex; gap: 1.5rem; align-items: center; }
.nav a { text-decoration: none; color: #333; font-weight: 600; font-size: 0.9rem; }
.btn-primary { 
    background: var(--primary); 
    color: #fff !important; 
    padding: 0.5rem 1.2rem; 
    border-radius: 20px; 
    transition: 0.3s; 
    border: none !important;    /* 枠線を強制的に消す */
    outline: none !important;   /* フォーカス時の枠線を消す */
    box-shadow: none;           /* 影による枠線効果も消す */
}
.btn-primary:hover { 
    background: var(--primary-hover); 
    opacity: 0.9; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* ホバー時のみ少し浮かすと綺麗です */
}
/* フォーム共通 */
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea {
    width: 100%; padding: 0.8rem; border: 2px solid var(--border); border-radius: 8px; margin-bottom: 1rem; font-size: 1rem;
}
button { cursor: pointer; }

/* ユーティリティ */
.container { max-width: 1200px; margin: 0 auto; padding: 2rem; }
.card { background: #fff; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); padding: 2rem; margin-bottom: 2rem; }
.text-center { text-align: center; }

/* --- 求人カード基本スタイル --- */
.job-card { background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.1); margin-bottom: 1.5rem; transition: 0.3s; }
.job-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.15); }
.job-card-content { display: grid; grid-template-columns: 250px 1fr; }
.job-image img { width: 100%; height: 100%; object-fit: cover; }
.job-info { padding: 1.5rem; }
.job-title { font-size: 1.3rem; margin-bottom: 0.5rem; font-weight: bold; }
.details { display: none; margin-top: 1rem; border-top: 1px solid #eee; padding-top: 1rem; }
.job-card-buttons { background: #f9f9f9; padding: 1rem; display: flex; justify-content: flex-end; gap: 1rem; }

/* 絞り込みサイドバー基本 */
.search-sidebar { font-size: 0.85rem; }
.search-sidebar h3 { font-size: 1rem !important; margin-bottom: 0.8rem !important; }
/* チェックボックスを3列に並べる */
.filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* 33%ずつ3列 */
    gap: 0.2rem 0.4rem; /* 隙間をさらに微調整 */
}

.filter-grid label {
    font-size: 0.75rem; /* 3列に入れるために文字を少し小さく */
    margin-bottom: 0 !important;
    white-space: nowrap; /* 折り返しを禁止 */
    display: flex;
    align-items: center;
    overflow: hidden; /* はみ出し防止 */
    text-overflow: ellipsis;
}

.filter-grid input {
    margin-right: 3px;
    transform: scale(0.8); /* チェックボックス自体も少し小さくしてスペース確保 */
}

/* --- レスポンシブ (スマホ: 768px以下) --- */
@media (max-width: 768px) {
    /* ヘッダー調整 */
    .header-content { flex-wrap: wrap; padding: 0.5rem 1rem; }
    .logo img { height: 30px; }
    .nav { width: 100%; justify-content: space-around; margin-top: 0.5rem; }

    /* レイアウトを縦並びに */
    .job-search-layout { flex-direction: column; }
    .search-sidebar { width: 100% !important; flex: none !important; margin-bottom: 1.5rem; padding: 1rem !important; }
    .search-sidebar form { display: block !important; }

    /* 求人カード：画像上・情報下のデザインへ変更 */
    .job-card-content { display: block; }
    .job-image { width: 100%; height: 200px; }
    .job-info { padding: 1rem; }
    .job-title { font-size: 1.1rem; }

    /* タグエリアを2列グリッドで整理 */
    .job-info div[style*="display:flex"] {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem !important;
    }
    .job-info span {
        justify-content: center;
        padding: 0.4rem 0.5rem !important;
        font-size: 0.75rem !important;
        white-space: nowrap;
    }

    /* ボタンエリアを横並び全幅に */
    .job-card-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
        padding: 1rem;
    }
    .job-card-buttons .btn-primary {
        width: 100%;
        margin: 0;
        padding: 0.6rem 0.5rem !important;
        font-size: 0.85rem !important;
        border-radius: 25px;
        justify-content: center;
    }

    /* フォーム要素の縮小 */
    input[type="text"] { padding: 0.5rem !important; font-size: 0.9rem !important; }
}

/* 応募するボタン（緑） */
.btn-apply {
    background: #3ea612 !important;
}
.btn-apply:hover {
    background: #368e10 !important;
    opacity: 0.9;
}

/* 閉じる/詳細ボタン（デフォルト青） */
.btn-details {
    background: #0089d0 !important;
}

/* 閉じるボタン（赤） ※JSで切り替わった時用 */
.btn-danger {
    background: #bf2534 !important;
}

.button-primary {
    display: flex;             /* 中の文字を中央に寄せるため */
    justify-content: center;   /* 中の文字を中央に寄せるため */
    align-items: center;
    width: 50%;                /* 横幅 50% */
    margin: 0 auto;            /* ★ これでボタン自体が真ん中に寄ります */
    padding: 0.6rem 0.5rem !important;
    font-size: 0.85rem !important;
    border-radius: 25px;
    background: #3ea612 !important;
    border: none !important;   /* 黒枠を消す設定も維持 */
    color: #fff !important;
    text-decoration: none;
    cursor: pointer;
}

.button-primary:hover {
    background: #2d790c !important;
}