@charset "UTF-8";

/* 全体設定：box-sizingを追加してパディングによる幅のズレを防止 */
html {
    box-sizing: border-box;
}
*, *:before, *:after {
    box-sizing: inherit;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* 画面の高さ分を最低限確保する */
    margin: 0;
    font-family: "Hiragino Kaku Gothic Pro", "Meiryo", sans-serif;
    font-size: 16px;
    border-top: 10px solid #94c674;
    line-height: 1.6;
}

h1 {
    text-align: center;
    font-size: 20px;
    margin: 30px 0;
}

/* 幅の指定を固定(width)から最大幅(max-width)に変更 */
.w_inner {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px; /* 両端に余白を確保 */
}

/* ヘッダーナビゲーション */
.header ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* 折り返しを許可 */
    margin-bottom: 30px;
    list-style: none;
    padding: 0;
}
.header ul li {
    width: 160px; /* 少し小さく調整 */
    text-align: center;
    border-right: 1px solid #ddd;
}
.header ul li:first-child {
    border-left: 1px solid #ddd;
}
.header ul li a {
    display: block;
    padding: 10px 0;
    text-decoration: none;
    color: #333;
}

/* 画像のレスポンシブ化 */
img {
    max-width: 100%;
    height: auto;
}

.header_img {
    text-align: center;
    margin-bottom: 30px;
}

/* 事業内容（トップページ） */
.container_service {
    padding: 50px 0;
}
.container_service .contentname {
    text-align: center;
}
.container_service .contentname h2 {
    display: inline-block;
    margin-bottom: 20px;
    font-size: 24px;
    padding-bottom: 10px;
    border-bottom: 4px solid #94c674;
}
.container_service p {
    text-align: center;
    font-size: 18px;
    margin-bottom: 30px;
}
.container_service .service_block {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.container_service .service_block .service {
    width: 280px;
    height: 100px;
    text-align: center;
    line-height: 100px;
    border-radius: 10px;
    background-color: #b8e0af;
}

.container_service .learn_more {
    text-align: center;
    margin-top: 30px;
}
.container_service .learn_more a {
    background: #94c674;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    padding: 12px 30px;
    display: inline-block;
    transition: 0.3s;
}

/* お知らせ */
.news {
    padding: 50px 0;
    text-align: center;
}
.news h3 {
    display: inline-block;
    margin-bottom: 30px;
    font-size: 24px;
    border-bottom: 4px solid #94c674;
}
.news ul {
    text-align: left;
    border: 2px solid #ddd;
    border-radius: 20px;
    padding: 20px;
    list-style: none;
}
.news ul li {
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}
.news .link_news {
    text-align: center; /* 親要素で中央寄せを確実に */
    margin-top: 40px;   /* リストとの間隔を広げる */
}

.news .link_news a {
    display: inline-block; /* paddingを正しく適用させるために必要 */
    padding: 12px 30px;
    border-radius: 5px;
    background-color: #94c674;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.news .link_news a:hover {
    background-color: #7ca85e;
}

.footer {
    margin-top: auto; /* これにより、上のコンテンツとの間を自動で埋めて最下部に押し下げます */
    text-align: center;
    background: #94c674;
    font-size: 12px;
    padding: 15px 0;
    width: 100%;
}

/* 会社概要テーブル */
.info table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 50px;
}
.info th, .info td {
    border: solid 1px #ddd;
    padding: 15px;
}
.info th {
    background-color: #b8e0af;
    width: 30%;
    font-weight: bold;
}

/* 事業内容（個別ページ）のグリッド */
.serve_block {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}
.serve_block .serve {
    background-color: #b8e0af;
    border-radius: 5px;
    text-align: center;
    transition: 0.3s;
}
.serve_block .serve a {
    display: block;
    padding: 20px 10px;
    text-decoration: none;
    color: #333;
    font-size: 18px;
}

/* 事例セクション */
.work_detail {
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    margin: 20px 0 40px;
}
.work_process_container {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 20px 0;
    align-items: center;
}
.work_process_item {
    flex: 0 0 200px;
}
/* 事業内容詳細を囲うカード全体 */
.work_card {
    border: 2px solid #b8e0af; /* 外枠をテーマカラーに */
    border-radius: 8px;
    overflow: hidden; /* 角丸を中身にも適用 */
    margin-bottom: 50px;
    background-color: #fff;
}

/* カード内のタイトル（事業内容名） */
.work_card_title {
    background-color: #94c674; /* 濃い緑で強調 */
    color: white;
    font-size: 22px;
    font-weight: bold;
    padding: 15px 20px;
}

/* カード内の詳細コンテンツ */
/* 元の .work_detail の背景色や枠を消して調整 */
.work_detail {
    padding: 20px;
    background-color: transparent; /* 背景を白（親に合わせる）に */
    border: none;
    margin-top: 0;
    margin-bottom: 0;
}

/* ========================================= 
   お知らせページ (news.html) の調整
   ========================================= */
   .newspage {
    max-width: 1000px; /* 固定幅ではなく最大幅にする */
    width: 100%;       /* スマホでは画面幅に合わせる */
    margin: 0 auto;
    padding: 50px 20px 100px;
    text-align: center;
}

.newspage h3 {
    display: inline-block;
    margin-bottom: 40px;
    padding-bottom: 10px;
    font-size: 24px;
    border-bottom: 4px solid #94c674;
}

.newspage ul {
    list-style: none;
    padding: 0;
    margin-bottom: 40px;
    text-align: left; /* リストの中身は左寄せ */
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.newspage ul li {
    border-bottom: 1px solid #eee;
}

.newspage ul li:last-child {
    border-bottom: none;
}

.newspage ul li a {
    display: flex;
    padding: 20px;
    text-decoration: none;
    color: #333;
    transition: background 0.3s;
    align-items: center;
}

.newspage ul li a:hover {
    background-color: #f9f9f9;
}

.newspage ul li time {
    font-family: Arial, sans-serif;
    color: #888;
    margin-right: 20px;
    font-size: 14px;
    flex-shrink: 0; /* 日付が潰れないように */
}

.contact_info {
    text-align: center;
    margin-bottom: 40px;
}
.contact_info p {
    font-size: 18px;
    margin-bottom: 10px;
}
.contact_info .tel_number {
    color: #007bff; /* 標準的なリンクの青色 */
    font-weight: bold;
    text-decoration: none; /* 下線なし */
}
.contact_info .tel_number:hover {
    text-decoration: underline; /* ホバー時に下線を表示 */
}
.contact_info p a {
    color: #007bff; /* 標準的なリンクの青色 */
    font-weight: bold;
    text-decoration: none; /* 下線なし */
}

/* ホバー時の設定（オプション：マウスを乗せたときに下線を引くなど） */
.contact_info p a:hover {
    text-decoration: underline; /* ホバー時に下線を表示 */
}
.contact_info .note {
    margin-top: 20px;
    padding: 15px;
    background-color: #fff8e1; /* 薄い黄色 */
    border: 1px solid #ffecb3;
    display: inline-block;
    text-align: left;
}
.contact_info .note p {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

/* フォームテーブル */
.contact_form table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 40px;
    background-color: #ffffff;
    border: 1px solid #ddd;
}
.contact_form th, .contact_form td {
    padding: 15px;
    border: 1px solid #ddd;
    text-align: left;
}
.contact_form th {
    width: 30%;
    background-color: #b8e0af;
    font-weight: normal;
}
.contact_form td {
    width: 70%;
}

/* 必須マーク */
.required {
    color: #e57373; /* 赤色 */
    font-size: 14px;
    background-color: #ffebee;
    padding: 3px 6px;
    margin-left: 10px;
    border-radius: 3px;
    font-weight: bold;
}

/* フォーム入力欄 */
.contact_form input[type="text"],
.contact_form input[type="email"],
.contact_form input[type="tel"],
.contact_form textarea {
    width: 95%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}
.contact_form textarea {
    resize: vertical;
}
.contact_form label {
    display: inline-block;
    margin-right: 20px;
    line-height: 2;
}

/* 送信ボタン */
.submit_wrap {
    text-align: center;
}
.submit_wrap button {
    background: #94c674;
    color: white;
    font-size: 20px;
    padding: 15px 40px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
    margin-bottom: 30px;
}
.submit_wrap button:hover {
    background: #7ca85e;
}




/* ========================================= 
   モバイル対応 (768px以下)
   ========================================= */
@media (max-width: 768px) {
    h1 {
        font-size: 18px;
    }

    /* ナビゲーションを2列または1列に */
    .header ul li {
        width: 50%;
        border: 1px solid #ddd !important;
    }

    /* テーブルを縦並びに変換 */
    .info th, .info td, 
    .contact_form th, .contact_form td {
        display: block;
        width: 100%;
        border-bottom: none;
    }
    .info th, .contact_form th {
        background-color: #e8f5e9;
        border-bottom: 1px solid #ddd;
    }

    /* お問い合わせフォームの入力欄 */
    .contact_form input[type="text"],
    .contact_form input[type="email"],
    .contact_form input[type="tel"],
    .contact_form textarea {
        width: 100%;
    }

    .serve_block {
        grid-template-columns: 1fr; /* 1列に */
    }
    
    .work_process_item {
        flex: 0 0 160px; /* 工程画像を少し小さくしてスクロールしやすく */
    }

    /* 事業内容メニューをタイル状にする */
    .serve_block {
        grid-template-columns: repeat(3, 1fr); /* 3列タイル */
        gap: 10px; /* タイル間の隙間を狭く */
        margin-bottom: 30px;
    }

    .serve_block .serve {
        width: 100%;
        height: auto; /* 高さを内容に合わせる */
        aspect-ratio: 5 / 4;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1.2;
        padding: 5px;
    }

    .serve_block .serve a {
        font-size: 13px; /* タイル内で文字が収まるよう調整 */
        word-break: break-all; /* 長い単語を折り返し */
    }

    /* タイトル文字サイズの微調整 */
    .work_card_title {
        font-size: 18px;
        padding: 10px 15px;
    }

    .newspage ul li a {
        flex-direction: column; /* 日付とタイトルを縦並びに */
        align-items: flex-start;
        padding: 15px;
    }
    
    .newspage ul li time {
        margin-bottom: 5px;
        margin-right: 0;
    }
    
    /* 余白の調整 */
    .newspage {
        padding: 30px 15px 60px;
    }

    .contact_info {
        padding: 20px;
    }

    .contact_info .tel_number {
        font-size: 20px;
    }
}
