/*
Theme Name: 株式会社アース用テーマ
Description: サイトリニューアル用のオリジナルテーマ
*/



/* ▼追加CSS(問い合わせフォーム用)▼ */
/* =========================================
   1. タイトル（お問い合わせ）の装飾
========================================= */
h1.wp-block-post-title,
.entry-title {
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin-bottom: 50px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
}
h1.wp-block-post-title::after,
.entry-title::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background-color: #00aced; 
}

/* =========================================
   2. フォーム全体（縦並びスッキリ版・スマホ対応）
========================================= */
.cf7-custom-form {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 10px; 
    box-sizing: border-box; 
}

.form-row {
    margin-bottom: 30px; 
}

.form-row dt {
    font-weight: bold;
    color: #333;
    margin-bottom: 10px; 
    display: flex;
    align-items: center;
}

.form-row dd {
    margin: 0;
}

.req, .opt {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: 10px;
    color: #fff;
    white-space: nowrap;
}
.req { background-color: #e53e3e; } 
.opt { background-color: #a0aec0; } 

/* =========================================
   3. 入力欄のデザイン（文字サイズ大きめ）
========================================= */
.cf7-custom-form input[type="text"],
.cf7-custom-form input[type="email"],
.cf7-custom-form input[type="tel"],
.cf7-custom-form select,
.cf7-custom-form textarea {
    box-sizing: border-box; 
    width: 100%;
    padding: 16px 20px; 
    border: 1px solid #a8c6df; 
    border-radius: 6px;
    font-size: 24px; /* 基本は24px */
    background-color: #fff;
    transition: all 0.3s ease;
}

/* ★追加：メールアドレス欄のみ16pxに戻す設定 */
.cf7-custom-form input[type="email"] {
    font-size: 16px;
}

.cf7-custom-form input:focus,
.cf7-custom-form select:focus,
.cf7-custom-form textarea:focus {
    border-color: #00aced;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 172, 237, 0.3);
}

::placeholder {
    color: #9cb3c9;
    opacity: 1;
}

.zip-flex {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #555;
    font-weight: bold;
}
.zip-input {
    width: 200px !important; 
}
.note {
    display: block;
    font-size: 13px;
    color: #718096;
    margin-top: 8px;
}

/* =========================================
   4. 送信ボタンと完了メッセージ
========================================= */
.form-privacy {
    text-align: center;
    margin: 40px 0;
    font-size: 16px;
    font-weight: bold;
}
.form-privacy input[type="checkbox"] {
    transform: scale(1.5);
    margin-right: 10px;
}

.form-submit {
    text-align: center;
}
.form-submit input[type="submit"] {
    background-color: #1a1c6a;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    padding: 18px 60px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.form-submit input[type="submit"]:hover {
    background-color: #00aced;
}

.wpcf7 form.sent .wpcf7-response-output {
    background-color: #f0fdf4; 
    border: 2px solid #22c55e !important; 
    color: #166534; 
    padding: 20px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    margin-top: 30px;
    white-space: pre-wrap; 
}

.wpcf7 form.sent .wpcf7-response-output::after {
    content: "3営業日以内に担当より返信いたします。";
    display: block; 
    margin-top: 10px; 
    font-weight: normal; 
}
/* =========================================
   5. スマホ用：プルダウンの矢印を綺麗にする
========================================= */
.cf7-custom-form select {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23333333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 20px;
    padding-right: 50px;
}
/* =========================================
   6. 送信ボタンとチェックボックスの完全中央揃え
========================================= */
.form-privacy,
.form-submit {
    display: block !important;
    text-align: center !important;
    position: relative;
}

/* プライバシーポリシーの中央揃えとズレ防止 */
.form-privacy label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* 送信ボタン自体を中央に配置 */
.form-submit input[type="submit"] {
    margin: 0 auto;
    display: inline-block;
}

/* ★原因解決★ 透明な「くるくるアイコン」を絶対配置にして、ボタンを左に押し出すのを防ぐ */
.form-submit .wpcf7-spinner {
    position: absolute;
    margin-left: 15px; /* ボタンの右側に浮かせておく */
}
/* =========================================
   7. お知らせ（NEWS）一覧・詳細用デザイン
========================================= */
/* ▼ 一覧ページ（リスト）▼ */
.news-list {
    max-width: 800px;
    margin: 0 auto;
    list-style: none;
    padding: 0;
    border-top: 2px solid #1a1c6a; /* アースのネイビー */
}
.news-list li {
    border-bottom: 1px solid #e2e8f0;
}
.news-list a {
    display: flex;
    align-items: center;
    padding: 20px 10px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s;
}
.news-list a:hover {
    background-color: #f8fafc;
}

/* =========================================
   ★修正：一覧ページ：カテゴリとタイトルの被り修正
========================================= */
.news-meta {
    display: flex;
    align-items: center;
    width: auto !important; /* 固定幅をやめて自動調整に */
    min-width: 250px;       /* 最低限の幅を確保 */
    margin-right: 20px;     /* タイトルとの隙間を必ず空ける */
    flex-shrink: 0;
}
.news-date {
    font-size: 14px;
    color: #555;
    margin-right: 15px;
}
.news-cat {
    font-size: 11px;
    background-color: #1a1c6a;
    color: #fff;
    padding: 4px 10px;
    border-radius: 3px;
    white-space: nowrap; /* ★文字が2行に折れ曲がるのを防ぐ */
}
.news-title {
    font-size: 16px;
    font-weight: bold;
    line-height: 1.5;
    margin: 0;
}

/* スマホ用の切り替え（縦並びにして見やすく） */
@media (max-width: 767px) {
    .news-list a {
        flex-direction: column;
        align-items: flex-start;
    }
    .news-meta {
        margin-bottom: 8px;
    }
}

/* ▼ 詳細ページ（記事本文）▼ */
.news-single-header {
    max-width: 800px;
    margin: 0 auto 30px;
    border-bottom: 2px solid #1a1c6a;
    padding-bottom: 20px;
}
.news-single-title {
    font-size: 24px;
    color: #333;
    margin-top: 15px;
    margin-bottom: 0;
    line-height: 1.5;
}
.news-single-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    color: #333;
    font-size: 16px;
}
.news-single-content img {
    max-width: 100%; /* スマホではみ出さない魔法 */
    height: auto;
}
.back-btn-wrap {
    text-align: center;
    margin-top: 60px;
}
.back-btn {
    display: inline-block;
    border: 1px solid #1a1c6a;
    color: #1a1c6a;
    padding: 12px 50px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}
.back-btn:hover {
    background-color: #1a1c6a;
    color: #fff;
}

/* =========================================
   カテゴリ色（トップと下層ページ両方に効かせます）
========================================= */
.cat.bg-policy,      .news-cat.bg-policy      { background: #005bab !important; } /* 方針発表会（アースブルー紺） */
.cat.bg-morningmtg,  .news-cat.bg-morningmtg  { background: #232584 !important; } /* 全体朝礼（紺） */
.cat.bg-recruitnews, .news-cat.bg-recruitnews { background: #26a2cb !important; } /* 採用・求人（青緑） */
.cat.bg-store,       .news-cat.bg-store       { background: #ef4444 !important; } /* 新店・店舗情報（赤） */
.cat.bg-training,    .news-cat.bg-training    { background: #8476b5 !important; } /* 研修（紫） */
.cat.bg-csr,         .news-cat.bg-csr         { background: #007937 !important; } /* CSR（緑） */
.cat.bg-media,       .news-cat.bg-media       { background: #f59e0b !important; } /* メディア関連（オレンジ） */
.cat.bg-other,       .news-cat.bg-other       { background: #6b7280 !important; } /* その他（グレー） */

/* =========================================
   8. カテゴリー選択メニュー
========================================= */
.news-category-menu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0 auto 40px;
    max-width: 800px;
}
.news-category-menu a {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid #1a1c6a;
    border-radius: 50px;
    color: #1a1c6a;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s;
}
.news-category-menu a:hover,
.news-category-menu a.active {
    background-color: #1a1c6a;
    color: #fff;
}
/* =========================================
   お知らせ一覧のアイキャッチ画像レイアウト（コンパクト版）
========================================= */

/* ▼追加：リスト自体の上下の隙間も狭くして、一覧性を高めます */
.news-list a {
    display: flex;
    align-items: center;
    padding: 12px 10px; /* ★元の20pxから12pxに縮小しました */
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s;
}

.news-thumbnail {
    width: 100px;         /* ★150pxの約2/3（100px）に変更 */
    flex-shrink: 0;
    margin-right: 20px;   /* テキストとの隙間も少し調整 */
}
.news-thumbnail img {
    width: 100%;
    height: 70px;         /* ★高さも約2/3（70px）に変更 */
    object-fit: cover;
    border-radius: 4px;   /* 角の丸みもサイズに合わせて少し小さく */
    display: block;
}
.news-text-wrap {
    flex-grow: 1;
}

/* --- スマホ表示の時の調整 --- */
@media (max-width: 767px) {
    /* スマホの時は、画像を小さくして横並びを維持するパターンに変えます */
    .news-list a {
        flex-direction: row; /* 横並びのまま */
        align-items: flex-start;
    }
    .news-thumbnail {
        width: 80px;         /* スマホではさらに小さく */
        margin-right: 15px;
        margin-bottom: 0;
    }
    .news-thumbnail img {
        height: 60px;
    }
    /* スマホでは日付やカテゴリとタイトルを少し詰める */
    .news-meta {
        margin-bottom: 5px;
        min-width: auto;
    }
}