/*
Theme Name: Lightning Child Sample
Theme URI:
Template: lightning
Description:
Author:
Tags:
Version: 0.6.1
*/
/**
 /* ========================================
   企業詳細 応募・辞退ボタン
======================================== */

.company-action-buttons {
    display: flex;
    width: 100%;
    margin-top: 30px;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
}

.company-action-button {
    width: 50%;
    padding: 15px 20px;
    text-align: center;
    box-sizing: border-box;
}

.company-action-button:first-child {
    border-right: 1px solid #ddd;
}

.company-action-button img {
    display: inline-block;
    max-width: 100%;
    height: auto;
    border: 0;
}

.company-action-button a {
    display: block;
    text-decoration: none;
}

/* スマートフォン */
@media screen and (max-width: 600px) {

    .company-action-buttons {
        display: block;
    }

    .company-action-button {
        width: 100%;
    }

    .company-action-button:first-child {
        border-right: 0;
        border-bottom: 1px solid #ddd;
    }
}
/* 企業詳細：応募・辞退ボタン */
.company-action-buttons {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 40px;
    width: 100%;
    margin: 30px 0;
}

.company-action-button {
    width: auto !important;
    padding: 0 !important;
    text-align: center;
}

.company-action-button img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

/* スマートフォン */
@media screen and (max-width: 600px) {
    .company-action-buttons {
        flex-direction: column;
        gap: 20px;
    }
}
// 派遣社員求人数を表示するショートコード
function presto_haken_count_box_shortcode() {

    $count = 0;

    // 公開済みの派遣社員求人を集計
    $posts = wp_count_posts('haken_job');

    if ($posts && isset($posts->publish)) {
        $count = (int) $posts->publish;
    }

    return '<div class="presto-haken-count-box">
        <span class="presto-haken-count-label">
            現在の派遣社員求人
        </span>
        <span class="presto-haken-count-number">'
            . esc_html(number_format_i18n($count)) .
        ' 件</span>
    </div>';
}

add_shortcode(
    'haken_count_box',
    'presto_haken_count_box_shortcode'
);
/* ==========================================
   ヘッダー右上ボタン
========================================== */

.presto-header-buttons {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding: 10px 30px;
    max-width: 1000px;
    margin: 0 auto;
}

/* ボタン共通 */
.presto-header-btn {
    display: inline-block;
    padding: 12px 20px;
    color: #ffffff !important;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none !important;
    border-radius: 4px;
    transition: opacity 0.3s;
}

/* ハローワーク求人 */
.presto-hellowork {
    background-color: #0877bd;
}

/* お問い合わせ */
.presto-contact {
    background-color: #172e4d;
}

/* マウスを乗せたとき */
.presto-header-btn:hover {
    opacity: 0.8;
    color: #ffffff !important;
}

/* スマートフォン対応 */
@media (max-width: 767px) {

    .presto-header-buttons {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px;
    }

    .presto-header-btn {
        font-size: 12px;
        padding: 10px 12px;
    }
}
/* ==========================================
   ヘッダーボタンをロゴと同じ高さに配置
========================================== */

@media (min-width: 992px) {

    .presto-header-buttons {
        position: absolute !important;
        top: 18px !important;
        right: 30px !important;
        left: auto !important;
        width: auto !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        z-index: 9999 !important;

        display: flex !important;
        justify-content: flex-end !important;
        gap: 12px;
    }

    /* ヘッダー上部の余白を調整 */
    .site-header {
        position: relative;
    }
}

/* スマートフォン・タブレット */
@media (max-width: 991px) {

    .presto-header-buttons {
        position: relative !important;
        display: flex !important;
        justify-content: center !important;
        flex-wrap: wrap;
        width: 100% !important;
        padding: 10px !important;
    }
}

/* スマートフォン */
@media (max-width: 7px) {
    .presto-header-buttons {
        justify-content: center !important;
        flex-wrap: wrap;
        padding: 10px;
    }
}
/* ==========================================
   スマホ用 ヘッダーボタン幅調整
========================================== */

@media (max-width: 767px) {

    /* ボタン全体を右寄せ */
    .presto-header-buttons {
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        gap: 5px !important;

        width: 100% !important;
        max-width: none !important;

        padding: 10px 8px 10px 65px !important;
        margin: 0 !important;

        box-sizing: border-box !important;
    }

    /* ボタン共通 */
    .presto-header-btn {
        font-size: 10px !important;
        padding: 9px 6px !important;
        border-radius: 4px !important;
        white-space: nowrap !important;
        text-align: center !important;
        line-height: 1.3 !important;
    }

    /* ハローワーク求人ボタン */
    .presto-hellowork {
        flex: 0 1 auto !important;
    }

    /* お問い合わせボタン */
    .presto-contact {
        flex: 0 0 auto !important;
    }

}
/* =====================================
   TOPページ 4画像レイアウト
===================================== */

.presto-top-banners {
    display: block !important;
    width: 100% !important;
    max-width: 1300px !important;
    margin: 0 auto 20px !important;
    clear: both;
}

/* パソコン：4枚横並び */
.presto-top-banners .banner-four {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
    align-items: start !important;
}

.presto-top-banners .presto-banner-item {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.presto-top-banners .presto-banner-item a {
    display: block !important;
}

.presto-top-banners .presto-banner-item img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px;
}

/* 求人数 */
.presto-top-banners .presto-job-count {
    display: block !important;
    margin: 8px 0 0 !important;
    padding: 4px 0 !important;
    color: #168bd2 !important;
    font-size: 17px !important;
    font-weight: bold !important;
    text-align: center !important;
    line-height: 1.5 !important;
}

.presto-top-banners .presto-count-number,
.presto-top-banners .presto-haken-count-box,
.presto-top-banners .presto-haken-count-label,
.presto-top-banners .presto-haken-count-number {
    display: block;
    color: #168bd2 !important;
    font-size: 18px !important;
    font-weight: bold !important;
    text-align: center !important;
}

/* =====================================
   不二エンタープライズの強み
===================================== */

.presto-strengths {
    display: block !important;
    clear: both !important;
    width: 100% !important;
    max-width: 1300px !important;
    margin: 20px auto 40px !important;
    padding: 15px !important;
    background: #eef7ff;
    border-radius: 10px;
    box-sizing: border-box;
}

.presto-strengths-heading {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.presto-strengths-heading h2 {
    margin: 0;
    color: #0055cc;
    font-size: 26px;
    font-weight: bold;
}

.presto-strengths-heading p {
    margin: 0;
    color: #102c65;
    font-size: 15px;
    font-weight: bold;
}

/* 強みのカード4枚 */
.presto-strengths-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
}

.presto-strength-card {
    min-width: 0;
    padding: 15px 10px;
    background: #ffffff;
    border: 1px solid #cce4ff;
    border-radius: 8px;
    text-align: center;
    box-sizing: border-box;
}

.presto-strength-icon {
    font-size: 38px;
    margin-bottom: 10px;
}

.presto-strength-card h3 {
    color: #003b9b;
    font-size: 17px;
    font-weight: bold;
    line-height: 1.5;
}

.presto-strength-card p {
    color: #17356a;
    font-size: 14px;
    line-height: 1.6;
}

/* タブレット */
@media (min-width: 768px) and (max-width: 991px) {
    .presto-top-banners .banner-four,
    .presto-strengths-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .presto-strengths-heading {
        display: block;
    }
}

/* スマートフォン */
@media (max-width: 767px) {
    .presto-top-banners .banner-four,
    .presto-strengths-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .presto-strengths-heading {
        display: block;
    }

    .presto-strengths-heading h2 {
        font-size: 23px;
    }

    .presto-job-count {
        font-size: 20px !important;
    }
}
/* =====================================
   TOPページ 4画像横並び 修正
   クラシックエディターの余分なpタグ対策
===================================== */

/* 画像4枚を横並び */
.presto-top-banners .banner-four {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
    align-items: start !important;
}

/* 余分なpタグを非表示 */
.presto-top-banners .banner-four > p {
    display: none !important;
}

/* 画像を各列いっぱいに表示 */
.presto-top-banners .banner-four > .presto-banner-item {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
}

/* 画像 */
.presto-top-banners .banner-four img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
}

/* スマートフォン */
@media (max-width: 767px) {
    .presto-top-banners .banner-four {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
}
/* =====================================
   TOPページ 求人数表示 最終調整
===================================== */

/* 求人数と画像の間隔 */
.presto-top-banners .presto-job-count {
    margin: 5px 0 0 !important;
    padding: 0 !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    text-align: center !important;
}

/* 正社員の件数 */
.presto-top-banners .presto-count-number {
    font-size: 20px !important;
    line-height: 1.4 !important;
}

/* 派遣社員の件数 */
.presto-top-banners .presto-haken-count-box {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
}

/* 派遣社員の見出し */
.presto-top-banners .presto-haken-count-label {
    display: block !important;
    width: 100% !important;
    font-size: 15px !important;
    white-space: nowrap !important;
    text-align: center !important;
}

/* 派遣社員の件数 */
.presto-top-banners .presto-haken-count-number {
    display: block !important;
    font-size: 20px !important;
    white-space: nowrap !important;
    text-align: center !important;
}
/* =====================================
   不二エンタープライズの強み
   4つのカードを横一列にする
===================================== */

/* 4列表示 */
.presto-strengths .presto-strengths-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
    align-items: stretch !important;
}

/* クラシックエディターが挿入する余分なpタグ */
.presto-strengths-grid > p:empty {
    display: none !important;
}

/* 各カード */
.presto-strengths-grid > .presto-strength-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* カード内の文字 */
.presto-strength-card h3 {
    font-size: 16px !important;
    line-height: 1.5 !important;
}

.presto-strength-card p {
    font-size: 14px !important;
    line-height: 1.6 !important;
}

/* タブレット */
@media (min-width: 768px) and (max-width: 991px) {
    .presto-strengths .presto-strengths-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* スマートフォン */
@media (max-width: 767px) {
    .presto-strengths .presto-strengths-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
}
/* =====================================
   不二エンタープライズの強み
   余分なpタグを除外して4列表示
===================================== */

/* 余分なpタグを非表示 */
.presto-strengths-grid > p {
    display: none !important;
}

/* カード4枚を横一列 */
.presto-strengths .presto-strengths-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
    align-items: stretch !important;
}

/* 各カード */
.presto-strengths-grid > .presto-strength-card {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
}

/* スマートフォン */
@media (max-width: 767px) {
    .presto-strengths .presto-strengths-grid {
        grid-template-columns: 1fr !important;
    }
}
/* TOPページ 求人数を1行表示 */

/* 4枚の画像の横並びを維持 */
.presto-top-banners .banner-four {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
}

/* 求人数を1行表示 */
.presto-top-banners .presto-job-count {
    white-space: nowrap;
    text-align: center;
    font-weight: bold;
    color: #0085d5;
    font-size: 15px;
}

/* 正社員求人の改行を非表示 */
.presto-top-banners .presto-job-count br {
    display: none;
}

/* 数字を横並びに */
.presto-top-banners .presto-count-number {
    display: inline;
}

/* スマホでは画像を縦並び */
@media (max-width: 767px) {
    .presto-top-banners .banner-four {
        grid-template-columns: 1fr;
    }
}
/* 派遣社員求人の表示を1行にする */
.presto-top-banners .presto-job-count p,
.presto-top-banners .presto-job-count div,
.presto-top-banners .presto-job-count span {
    display: inline;
    margin: 0;
}

.presto-top-banners .presto-job-count br {
    display: none;
}
/* ========================================
   TOPページ 派遣社員求人数を1行表示
======================================== */

.presto-top-banners .presto-haken-count-box {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    white-space: nowrap;
    text-align: center;
}

.presto-top-banners .presto-haken-count-label,
.presto-top-banners .presto-haken-count-number {
    display: inline;
    white-space: nowrap;
    margin: 0;
    padding: 0;
}
/* ========================================
   派遣社員求人数を強制的に1行表示
======================================== */

.presto-top-banners .presto-haken-count-box {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 5px;
    white-space: nowrap;
}

.presto-top-banners .presto-haken-count-label,
.presto-top-banners .presto-haken-count-number {
    display: inline-block !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
    flex-shrink: 0;
    font-size: 15px;
}
/* ========================================
   TOPページ 求人数の高さを統一
======================================== */

/* 正社員・派遣社員共通 */
.presto-top-banners .presto-job-count {
    margin-top: 15px !important;
    padding: 0 !important;
    min-height: 30px;
    line-height: 30px !important;
    text-align: center;
}

/* 派遣社員の外側の余白をなくす */
.presto-top-banners .presto-haken-count-box {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 30px;
    line-height: 30px !important;
}

/* 派遣社員の文字と数字 */
.presto-top-banners .presto-haken-count-label,
.presto-top-banners .presto-haken-count-number {
    line-height: 30px !important;
    vertical-align: middle;
}
/* TOPページ 上部画像と4枚のバナーの余白調整 */
.home .entry-body img {
    margin-bottom:  !important;
}

.home .entry-body p:has(> img) {
    margin-top: 0 !important;
    margin-bottom: 10px !important;
}

/* 画像間の空白段落を縮小 */
.home .entry-body p:empty {
    margin: 0 !important;
    padding: 0 !important;
}
/* TOPページ 4枚のバナーを上に移動 */
.home .presto-top-banners {
    margin-top: -50px !important;
    padding-top: 0 !important;
}

/* スマホ表示 */
@media (max-width: 767px) {
    .home .presto-top-banners {
        margin-top: -20px !important;
    }
}
/* TOPページ 4枚の画像間隔を7pxに統一 */
.home .presto-top-banners .banner-four {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 7px !important;
}

/* 各画像の余白をなくす */
.home .presto-top-banners .presto-banner-item {
    margin: 0 !important;
    min-width: 0;
}

/* スマホでは縦並び */
@media (max-width: 767px) {
    .home .presto-top-banners .banner-four {
        grid-template-columns: 1fr !important;
        gap: 7px !important;
    }
}
/* =====================================
   スマホ 求人数の文字サイズ統一
===================================== */

@media screen and (max-width: 767px) {

  /* 正社員・派遣社員の文字を統一 */
  .home .presto-top-banners .presto-job-count,
  .home .presto-top-banners .presto-count-number,
  .home .presto-top-banners .presto-haken-count-label,
  .home .presto-top-banners .presto-haken-count-number {

    font-size: 15px !important;
    font-weight: bold !important;
    color: #168bd2 !important;
    text-align: center !important;
    line-height: 30px !important;
  }

}
/* スマホの正社員・派遣社員求人数を統一 */
@media screen and (max-width: 767px) {

  .home .presto-top-banners .presto-job-count,
  .home .presto-top-banners .presto-count-number,
  .home .presto-top-banners .presto-haken-count-label,
  .home .presto-top-banners .presto-haken-count-number {
    font-size: 20px !important;
    color: #168bd2 !important;
    font-weight: 700 !important;
  }

}
/* =====================================
   お役立ち情報ページ 画像中央配置
===================================== */

.presto-info-images {
    width: 100%;
    text-align: center;
}

.presto-info-images img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-left: auto !important;
    margin-right: auto !important;
}