/*
Theme Name: 有限会社ケントク樹脂工業 テーマ
Author: Your Name
Description: シンプルで精密なプラスチック成形会社のテーマ
Version: 1.14
*/

/* --- 1. 変数・基本設定 --- */
:root {
    --main-color: #1a2a40; 
    --accent-color: #ff6b35; 
    --bg-light: #f8fafc;
    --text-color: #333;
    --white: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.8;
    color: var(--text-color);
    background-color: var(--white);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- 2. 共通ヘッダー（固定せずスクロール） --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5%; 
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.logo {
    font-size: 1.3rem; 
    font-weight: bold;
    color: var(--main-color);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

nav ul { display: flex; list-style: none; gap: 20px; align-items: center; }
nav a { text-decoration: none; color: var(--text-color); font-size: 0.9rem; font-weight: 500; }
nav a:hover { color: var(--accent-color); }

.btn-contact {
    background: var(--accent-color);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.85rem;
}

.hamburger { display: none; }

/* --- 3. ヒーローセクション --- */
.hero {
    width: 100%;
    height: 70vh;
    min-height: 400px;
    /* 背景画像はPHP側で動的に指定するため、ここでは画像URLを削除します */
    background-color: var(--main-color);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--white);
    text-align: center;
    padding: 0 20px;
}

.hero h1 { font-size: 3rem; margin-bottom: 20px; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }

/* --- 制作フローセクションのスタイル --- */
.flow-section {
    padding: 80px 5%;
    background-color: var(--bg-light);
}

.container-flow {
    display: flex;
    justify-content: space-between;
    max-width: 1100px;
    margin: 0 auto;
    gap: 20px;
}

.flow-box {
    flex: 1;
    background: var(--white);
    padding: 40px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: center;
    position: relative;
}

.flow-num {
    display: block;
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: bold;
    margin-bottom: 10px;
}

.flow-box h3 {
    font-size: 1.2rem;
    color: var(--main-color);
    margin-bottom: 15px;
}

.flow-box p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-color);
}


/* --- 4. ページヘッダー（紺色：中央で横並びにする） --- */
.page-header {
    background: var(--main-color);
    color: #fff;
    padding: 15px 5%;
    /* 修正箇所：横並びにして中央に寄せる設定 */
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 15px; /* 日本語と英語の間隔 */
}

.page-header h1 {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0;
}

.page-header p {
    opacity: 0.8;
    margin: 0; /* 上の余白を消して高さを合わせる */
    font-size: 0.9rem;
}

/* --- 5. トップページ：お知らせ見出し（センタリング＋オレンジ下線） --- */
.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h1 {
    font-size: 2rem;
    color: var(--main-color);
    display: inline-block;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--main-color);
    display: inline-block;
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 10px;
}

/* --- 6. お知らせリスト（日付・タイトルを1行表示） --- */
.news-section { padding: 60px 5%; }
.news-list { max-width: 850px; margin: 0 auto; }

.news-item {
    display: block; 
    padding: 18px 0;
    text-decoration: none;
    color: #333;
    border-bottom: 1px dotted #bbb;
}

.news-content-row {
    display: flex;
    align-items: center;
    gap: 30px; 
}

.news-date { font-size: 0.95rem; color: #888; flex-shrink: 0; }
.news-title { font-size: 1.05rem; font-weight: 500; }

.post-content {
    padding: 60px 12%; 
    background: #ffffff;
}

/* 本文内のタイトルエリアを中央寄せにする修正 */
.entry-header {
    text-align: center; 
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

/* 詳細ページの日付だけを中央にする */
.entry-header .news-meta {
    justify-content: center; 
    margin-bottom: 10px;
}

/* 詳細ページのタイトルを中央にする */
.entry-title {
    font-size: 1.8rem;
    color: var(--main-color);
    line-height: 1.4;
    text-align: center;
    width: 100%;
    display: block;
}

.entry-content { line-height: 2.0; color: #333; }

.entry-content h2 {
    font-size: 1.5rem;
    color: var(--main-color);
    border-left: 5px solid var(--accent-color);
    padding: 5px 15px;
    margin: 40px 0 20px;
}

.entry-content p { margin-bottom: 1.5em; }
.entry-content img { max-width: 100%; height: auto; display: block; margin: 20px auto; }

/* 記事下のナビゲーション */
.post-navigation {
    padding: 40px 5%;
    background: var(--bg-light);
    border-top: 1px solid #eee;
}

.back-to-list { text-align: center; }
.back-to-list a { color: var(--main-color); font-weight: bold; text-decoration: none; }

/* --- 8. フッター --- */
footer {
    background: var(--main-color);
    color: var(--white);
    padding: 50px 5% 20px;
    text-align: center;
    margin-top: auto;
}

/* --- 会社概要・テーブル用のスタイル --- */
.company-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    margin-bottom: 40px;
}

.company-table th,
.company-table td {
    padding: 15px 20px;
    border: 1px solid #ddd;
    text-align: left;
    vertical-align: top;
}

.company-table th {
    width: 25%;
    background-color: var(--bg-light);
    color: var(--main-color);
    font-weight: bold;
    white-space: nowrap;
}

.company-table td {
    background-color: var(--white);
    color: var(--text-color);
    line-height: 1.8;
}



/* デスクトップ表示での矢印風デザイン（スマホ時は非表示） */
@media (min-width: 993px) {
    .flow-box:not(:last-child)::after {
        content: "▶";
        position: absolute;
        right: -15px;
        top: 50%;
        transform: translateY(-50%);
        color: #d1d5db;
        font-size: 1.2rem;
        z-index: 1;
    }
}

/* スマホ表示での調整 */
@media (max-width: 992px) {
    .container-flow {
        flex-direction: column;
        gap: 30px;
    }
    .flow-box {
        padding: 30px 20px;
    }
}

/* --- 9. スマホ対応 --- */
@media (max-width: 992px) {
    .hero h1 { font-size: 1.8rem; }
    .page-header h1 { font-size: 1.5rem; }
    .news-content-row { gap: 15px; }
    .post-content { padding: 40px 8%; }
    
    .hamburger {
        display: block; position: relative; width: 30px; height: 24px; z-index: 1001;
    }
    .hamburger span {
        display: block; position: absolute; width: 100%; height: 2px;
        background-color: var(--main-color); transition: 0.3s;
    }
    .hamburger span:nth-child(2) { top: 11px; }
    .hamburger span:nth-child(3) { bottom: 0; }

    .nav {
        position: fixed; top: 0; right: -75%; width: 75%; height: 100vh;
        background: var(--white); box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: 0.4s; z-index: 1000; padding-top: 80px;
    }
    .nav.is-active { right: 0; }
    .nav ul { flex-direction: column; padding-left: 15%; gap: 25px; }
}

/* テーブルのスマホ表示調整（設備一覧・会社概要・採用情報 すべて対応版） */
@media (max-width: 768px) {
    .company-table thead {
        display: none !important;
    }

    .company-table tr {
        display: block;
        margin-bottom: 25px;
        border: 1px solid #ddd;
        background: #fff;
    }

    /* ▼ 全テーブル共通：基本は縦積みにして「左揃え」にする ▼ */
    .company-table th,
    .company-table td {
        display: block;
        width: 100% !important;
        padding: 12px 15px;
        border: none;
        border-bottom: 1px solid #eee;
        text-align: left; /* ここで左揃えに修正しました */
    }

    .company-table td:last-child {
        border-bottom: none;
    }

    /* 会社概要・採用情報のような th + td の2列テーブル用 */
    .company-table th {
        background-color: var(--bg-light);
        font-weight: bold;
    }

    /* ▼ 設備一覧（data-labelがある場合）専用のスタイル ▼ */
    .company-table td[data-label] {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right; /* データ部分のみ右揃え */
    }

    .company-table td[data-label]::before {
        content: attr(data-label);
        font-weight: bold;
        color: var(--main-color);
        font-size: 0.85rem;
        margin-right: 15px;
        text-align: left;
        flex-shrink: 0;
    }
}