/* --- 1. Base Styles & Typography --- */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif; /* 日本語フォントを優先 */
    line-height: 1.6; /* 標準的な行の高さ */
    margin: 0;
    padding: 0;
    background-color: #f8f9fa; /* 明るくクリーンな背景色 */
    color: #343a40; /* 基本の文字色を少し濃くして可読性アップ */
    -webkit-font-smoothing: antialiased; /* フォントを滑らかに表示 */
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Noto Sans JP', sans-serif;
    color: #212529; /* ほぼ黒で見出しを強調 */
    margin-bottom: 0.8em;
    line-height: 1.2;
    font-weight: 700; /* 全体的に見出しを太く */
}

h1 { font-size: 2em; }
h2 { font-size: 1.6em; }
h3 { font-size: 1.3em; }

p {
    margin-bottom: 1em;
    color: #495057; /* 段落の文字色を落ち着かせる */
}

a {
    color: #9dd99b; /* 最新トレンドの鮮やかな青 */
    text-decoration: none;
    transition: color 0.2s ease; /* ホバー時のアニメーションをシンプルに */
}


#fv {
    width: 100%;
    height: 100%;
    max-width: 800px;
    margin: 0 auto;
}

#fv img {
    width: 100%;
    height: 100%;
    vertical-align: bottom;
}

/* --- 2. Utility Classes --- */
.container {
    max-width: 800px; /* 全体の最大幅 */
    margin: 0 auto;
    padding: 0 25px; /* 左右のパディング */
}


.card {
    background-color: #fff; /* カードの背景色 */
    border-radius: 8px; /* 角の丸みを標準に */
    padding: 16px;
    margin-bottom: 25px; /* カード間の下マージン */
    border: 1px solid #e9ecef; /* 細いボーダーを追加 */
}

#secondary .card {
    box-shadow: none;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.button-primary {
    background-color: #9dd99b;
    color: #fff;
}


.button-action {
    background-color: #28a745; /* 応募ボタンの鮮やかなグリーン */
    color: #fff;
    padding: 15px 30px;
    font-size: 1.1em;
    border-radius: 50px; /* 丸いボタン */
    box-shadow: 0 4px 10px rgba(40,167,69,0.2);
}

.button-action:hover {
    background-color: #218838;
    box-shadow: 0 6px 15px rgba(40,167,69,0.3);
}

/* アイコンとテキストのスペース */
.fas, .far, .fal, .fab {
    margin-right: 8px;
}

/* アクセシビリティ */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}


/* --- 3. Header --- */
#site-header {
    background-color: #fff; /* ヘッダーを白に */
    border-bottom: 1px solid #e0e0e0; /* 細い区切り線 */
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* 軽い影 */
    position: sticky; /* スクロールしても追従 */
    top: 0;
    z-index: 1000;
}

#site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.site-branding h1 {
    margin: 0;
    font-size: 2.2em;
    font-weight: 700;
}

.site-branding h1 a {
    color: #343a40; /* サイトタイトルをダークな色に */
    text-decoration: none;
}
.site-branding h1 a:hover {
    color: #9dd99b;
}


.site-branding h1 img {
    width: 100%;
    max-width: 300px;
    height: auto;
}

.site-description {
    font-size: 0.9em;
    color: #6c757d; /* サブタイトル色 */
    margin-top: 5px;
}

#site-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px; /* メニュー間のスペース */
}

#site-navigation a {
    color: #495057; /* ナビゲーションリンクの色 */
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    transition: color 0.2s ease;
}

/* ナビゲーション下線アニメーション（シンプル版） */
#site-navigation a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: #9dd99b;
    transition: width 0.2s ease;
}

#site-navigation a:hover::after,
#site-navigation .current-menu-item a::after {
    width: 100%;
}
#site-navigation .current-menu-item a {
    color: #9dd99b; /* アクティブなメニュー項目を強調 */
}


/* --- 4. Main Content Layout --- */
.main-content-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px; /* メインコンテンツとサイドバーの間隔 */
    align-items: flex-start; /* 上揃え */
    background: #fff;
    padding-top: 20px;
    padding-bottom: 20px;
}

#primary {
    width: 100%;
    min-width: 0;
}

#secondary {
    min-width: 280px;
    max-width: 350px;
    position: -webkit-sticky;
    position: sticky;
    top: 100px;
}

/* --- 5. Page Header (Index & Search) --- */
.page-header {
    margin-bottom: 30px;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.page-title {
    text-align: left;
    color: #212529;
    font-size: 1.7em;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 10px;
}

.page-title .fas {
    font-size: 0.8em;
    color: #9DD99B;
}

.search-query-summary {
    font-size: 1.1em;
    color: #555;
    margin-top: 10px;
}


/* --- 6. Sidebar Search Widget --- */
.widget-search-job .widget-title {
    font-size: 1.5em;
    font-weight: 600;
    color: #212529;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 12px;
    margin-top: 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.search-form-field {
    margin-bottom: 15px;
}

.search-form-field label {
    display: block;
    font-weight: 500;
    color: #495057;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.search-form input[type="search"],
.search-form input[type="text"] ,
.search-form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da; /* 入力フィールドのボーダー */
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.search-form input[type="search"]:focus,
.search-form input[type="text"]:focus {
    border-color: #9dd99b;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25); /* フォーカス時のハイライト */
}

.search-form .search-submit-button {
    width: 100%;
    margin-top: 5px;
}


/* --- 7. Job List (Grid) --- */
.job-list.grid-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 30px;
}

.job-item {
    display: flex;
    height: 100%;
    width: 100%;
    overflow: hidden;
    margin: 0;
    /* .card クラスに基本的なスタイルがあるため、ここはシンプルに */
}

.job-item-thumbnail {
    width: 30%;
    height: 180px;
    background-color: #e9ecef; /* 明るい背景 */
    background-size: cover;
    background-position: center;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd; /* プレースホルダーアイコンの色 */
    font-size: 3.5em;
    border-bottom: 1px solid #dee2e6; /* 下線を追加 */
}

.job-item-thumbnail.placeholder::before {
    content: "\f0b1"; /* Font Awesomeのbriefcaseアイコン */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

.job-item-content {
    width: 70%;
    padding: 0 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.job-item .job-title {
    font-size: 1.25em;
    margin-top: 0;
    margin-bottom: 8px;
    line-height: 1.3;
    font-weight: 600;
}

.job-item .job-title a {
    color: #212529;
    display: block;
}
.job-item .job-title a:hover {
    color: #9dd99b;
}

.job-item .job-company,
.job-item .job-salary,
.job-item .job-location {
    font-size: 0.9em;
    color: #6c757d;
    margin-top: 0;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
}

.job-item .job-description-summary {
    font-size: 0.85em;
    color: #6c757d;
    margin-bottom: 15px;
    flex-grow: 1;
    line-height: 1.5;
}

.job-item .button {
    align-self: flex-start;
    margin-top: 10px;
    margin-left: auto;
    margin-right: 0;
}


/* --- 8. Job Detail Page --- */
.job-detail .entry-header {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 10px;
    border-bottom: 2px dashed #ccc;
    padding-bottom: 10px;
}

.job-detail .entry-title {
    font-size: 2em;
    margin-top: 0;
    margin-bottom: 0;
    color: #212529;
    line-height: 1.2;
}

.job-detail .job-company {
    font-size: 1em;
    color: #555;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: left;
    font-weight: 500;
    margin-top: 0px;
}

.job-detail .job-image-hero {
    margin: 0 auto 40px auto;
    max-width: 800px;
    border-radius: 10px;
    overflow: hidden;
}

.job-detail .job-image-hero img {
    width: 100%;
    height: auto;
    display: block;
}

.job-info-section,
.job-description-section,
.job-feature-section,
.job-free-text-section {
    padding: 0;
    margin-bottom: 25px;
}

.job-info-section h2,
.job-description-section h2,
.job-feature-section h2,
.job-free-text-section h2 {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    color: #212529;
    font-size: 1.3em;
    font-weight: 600;
}

.job-info-section h2 i,
.job-description-section h2 i,
.job-feature-section h2 i,
.job-free-text-section h2 i {
    color: #9dd99b;
}


.job-info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.job-info-table th {
    width: 120px;
    text-align: left;
    padding: 10px;
    background-color: #f8f8f8;
    border-bottom: 1px solid #e0e0e0;
}

.job-info-table td {
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.job-content-text p {
    font-size: 1em;
    line-height: 1.7;
    color: #495057;
    margin-bottom: 1em;
}

.job-apply-section {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 40px;
}

.back-to-list-link {
    text-align: center;
    margin-top: 30px;
    font-size: 1em;
}

.back-to-list-link a {
    color: #555;
    display: inline-flex;
    align-items: center;
    padding: 10px 15px;
    background-color: #e9ecef;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.back-to-list-link a:hover {
    background-color: #dee2e6;
    text-decoration: none;
}

/* --- 9. Pagination --- */
.pagination {
    text-align: center;
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 30px;
}

.pagination a {
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    border: 1px solid #ced4da;
    text-decoration: none;
    color: #9dd99b;
    width: 3em;
    line-height: 3em;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    font-weight: 500;
    font-size: 0.95em;
    margin: 0 4px;
}

.pagination a:hover {
    background-color: #e7f2ff;
    border-color: #9dd99b;
    color: #9dd99b;
    text-decoration: none;
}

.pagination a.current {
    background-color: #9dd99b;
    color: #fff;
    border-color: #9dd99b;
    font-weight: 600;
}

.pagination a.prev,
.pagination a.next {
    width: 3em;
    line-height: 3em;
    min-width: unset;
}

/* --- 10. Footer --- */
#site-footer {
    background-color: #343a40; /* ダークなフッター */
    color: #f8f9fa;
    padding: 30px 0;
    text-align: center;
    margin-top: 40px;
    font-size: 0.9em;
    border-top: 3px solid #9dd99b; /* アクセントカラーのライン */
}

#site-footer .footer-links a {
    color: #adb5bd;
    margin: 0 10px;
    font-weight: 400;
}
#site-footer .footer-links a:hover {
    color: #9dd99b;
    text-decoration: underline;
}
#site-footer .copyright {
    margin-bottom: 10px;
    font-size: 0.85em;
    color: #ced4da;
}

/* --- 11. No Results Message --- */
.no-results {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    text-align: center;
    color: #6c757d;
    font-size: 1.1em;
    margin-bottom: 25px;
    font-weight: 500;
    border: 1px solid #e9ecef;
}


/* --- 12. Responsive Adjustments (Media Queries) --- */

/* Tablet (max-width: 992px) */
@media (max-width: 992px) {
    .container {
        padding: 0 20px;
    }

    #site-header {
        padding: 15px 0;
    }

    .site-branding h1 {
        font-size: 2em;
    }

    #site-navigation ul {
        gap: 15px;
    }

    .main-content-container {
        flex-direction: column;
        gap: 20px;
    }

    #secondary {
        display: none;
        max-width: 100%;
        order: 1; /* サイドバーを上にする */
        padding: 25px;
    }
    #primary {
        width: 100%;
    }

    .job-info-table {
        font-size: 0.8em;
    }


    .card {
        padding: 25px;
        margin-bottom: 20px;
    }

    .job-list.grid-container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }

    .job-item-thumbnail {
        height: 160px;
    }

    .job-item-content {
        padding: 18px;
    }

    .job-detail .entry-title {
        font-size: 4vw;
    }

    .job-detail .job-company {
        font-size: 3.2vw;
    }

    .job-detail .job-image-hero {
        margin-bottom: 30px;
    }

    .job-info-section,
    .job-description-section,
    .job-feature-section,
    .job-free-text-section {
        padding: 25px;
        margin-bottom: 20px;
    }

    .job-meta-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .pagination {
        margin-top: 30px;
    }

    #site-footer {
        padding: 25px 0;
        margin-top: 30px;
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    #site-header .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-branding {
        width: 100%;
        text-align: center;
    }
    .site-branding h1 {
        font-size: 1.8em;
    }

    .site-branding h1 img {
        max-width: 200px;
    }

    #site-navigation {
        width: 100%;
    }
    #site-navigation ul {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    #site-navigation a::after {
        display: none;
    }

    h1 { font-size: 1.8em; }
    h2 { font-size: 1.5em; }
    h3 { font-size: 1.2em; }

    .page-title {
        font-size: 1.6em;
    }

    .card {
        padding: 20px;
    }

    .job-list.grid-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .job-item-thumbnail {
        height: 140px;
    }

    .job-item-content {
        padding: 15px;
    }

    .job-item .job-title {
        font-size: 1.1em;
    }
    .job-item .button {
        width: 100%;
    }

    .job-detail .entry-title {
        font-size: 1.8em;
    }
    .job-detail .job-company {
        font-size: 1.1em;
    }

    .job-info-section,
    .job-description-section,
    .job-feature-section,
    .job-free-text-section {
        padding: 20px;
    }

    .button-action {
        padding: 12px 25px;
        font-size: 1em;
    }

    .no-results {
        padding: 25px;
        font-size: 1em;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 2vw;
    }

    .main-content-container {
        padding: 15px 2vw;
    }

    #site-header {
        padding: 10px 0;
    }

    .site-branding h1 {
        font-size: 1.5em;
    }

    #content {
        padding: 0 0 25px;
    }

    .page-title {
        font-size: 5vw;
    }

    .page-header {
        padding-bottom: 0;
        margin-bottom: 1rem;
    }
}

/* --- 13. Hero Search Form --- */
.job-search-hero {
    background-color: #eee; /* メインカラーを背景に */
    color: #fff;
    padding: 20px 0;
    text-align: center;
    margin-bottom: 40px;
    width: 100%;
    border-radius: 10px;
}

.job-search-hero .container {
    padding: 0 25px;
}

.search-form-title {
    font-size: 1.5em;
    font-weight: 700;
    margin: 0 0 20px;
    color: #333;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.search-form-wrap {
    background: rgba(255, 255, 255, 0.5); /* 半透明の背景 */
    border-radius: 10px;
    padding: 25px;
    backdrop-filter: blur(5px); /* 背景をぼかす */
    -webkit-backdrop-filter: blur(5px);
    position: relative;
}

.search-form-wrap::before {
    content: 'Search';
    position: absolute;
    top: -4px;
    left: 0px;
    font-size: 2em;
    color: #333;
    opacity: 0.2;
    transform: scale(1.3,1) rotate(-10deg);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    font-family: cursive;
}

.search-form-main {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.search-field-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex-grow: 1;
}

.search-field-item {
    flex-grow: 1;
    min-width: 150px; /* 項目ごとの最小幅 */
}

.search-field-keyword {
    flex-grow: 2;
}

.search-form-main .search-field {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.8em;
    color: #495057;
    transition: box-shadow 0.2s ease;
    /* 追加するプロパティ */
    -webkit-appearance: none; /* Safari, Chrome用 */
    -moz-appearance: none;    /* Firefox用 */
    appearance: none;         /* 標準 */
}

.search-form-main .search-field::placeholder {
    color: #adb5bd;
}

.search-form-main .search-field:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(255,255,255,0.4);
}

.search-submit-button-hero {
    padding: 12px 30px;
    font-size: 1.1em;
    border-radius: 8px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .job-search-hero {
        padding: 40px 0;
    }
    .search-form-title {
        font-size: 4.5vw;
    }
    .search-form-main {
        flex-direction: column;
        gap: 10px;
    }
    .search-field-group {
        flex-direction: column;
        width: 100%;
    }
    .search-submit-button-hero {
        width: 100%;
    }
}

/* --- Contact Form 7 のスタイル --- */
#post-19{
    width: 100%;
}

.wpcf7 {
    /* フォーム全体への影響を最小限に */
    margin: 0;
}

.wpcf7 p {
    margin-bottom: 20px; /* 各フィールドの間に適切な間隔を確保 */
}

/* ラベルと入力欄のレイアウト */
.wpcf7 label {
    font-size: 1em;
    font-weight: 500;
    color: #495057;
    display: block; /* ラベルを独立したブロックとして表示 */
    margin-bottom: 8px; /* ラベルと入力欄の間のスペース */
}

/* テキスト、メール、件名、テキストエリアの入力欄 */
.wpcf7-form-control-wrap input[type="text"],
.wpcf7-form-control-wrap input[type="email"],
.wpcf7-form-control-wrap textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box; /* パディングとボーダーを幅に含める */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* フォーカス時のスタイル */
.wpcf7-form-control-wrap input[type="text"]:focus,
.wpcf7-form-control-wrap input[type="email"]:focus,
.wpcf7-form-control-wrap textarea:focus {
    border-color: #9dd99b;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(157, 217, 155, 0.25); /* #9dd99b の透明度付きシャドウ */
}

/* 送信ボタンのスタイル */
.wpcf7-form-control.wpcf7-submit {
    /* 既存の .button-primary のスタイルを適用 */
    background-color: #9dd99b;
    color: #fff;
    padding: 12px 30px;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.wpcf7-form-control.wpcf7-submit:hover {
    background-color: #8cc489; /* 少し濃いめの色に */
}

/* 送信結果メッセージのスタイル */
.wpcf7-response-output {
    margin: 2em 0.5em 1em;
    padding: 0.8em 1em;
    border: 2px solid #00a0d2;
    border-radius: 5px;
    text-align: center;
}

/* 送信成功時のスタイル */
.wpcf7-mail-sent-ok {
    border-color: #28a745;
    background-color: #d4edda;
    color: #155724;
}

/* 送信失敗時のスタイル */
.wpcf7-mail-sent-ng {
    border-color: #dc3545;
    background-color: #f8d7da;
    color: #721c24;
}

/* 入力エラー時のスタイル */
.wpcf7-not-valid-tip {
    color: #dc3545;
    font-size: 0.9em;
    margin-top: 5px;
    display: block;
}

/* 入力エラーが発生したフィールドのスタイル */
.wpcf7-not-valid input[type="text"],
.wpcf7-not-valid input[type="email"],
.wpcf7-not-valid textarea {
    border-color: #dc3545 !important;
}

/* 送信中のスピナー */
.wpcf7 .wpcf7-spinner {
    visibility: hidden;
    display: inline-block;
    background-color: #28a745;
    opacity: 0.75;
    width: 20px;
    height: 20px;
    border-radius: 100%;
    -webkit-animation: spin-pulse 1s infinite ease-in-out;
    animation: spin-pulse 1s infinite ease-in-out;
}

/* --- Search Query Summary Styles --- */
.search-query-summary {
    background-color: #e9f5e9; /* 淡いグリーン系の背景色 */
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.search-query-summary .summary-title {
    font-size: 1.2em;
    font-weight: 600;
    color: #28a745;
    margin: 0 0 15px;
    display: flex;
    align-items: center;
}

.search-query-summary .summary-title::before {
    content: '\f0b0'; /* Font Awesomeのfilterアイコン */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 10px;
    color: #28a745;
}

.search-query-summary .summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-query-summary .summary-item {
    font-size: 1em;
    color: #495057;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.search-query-summary .summary-item:last-child {
    margin-bottom: 0;
}

.search-query-summary .summary-item .fas {
    color: #9dd99b;
    margin-right: 10px;
    min-width: 20px; /* アイコンの幅を揃える */
    text-align: center;
}

.search-query-summary .summary-item span {
    font-weight: 600;
    color: #343a40;
    margin-right: 5px;
}