/* ========================================= */
/* --- 1. 基本リセットとグローバル設定 --- */
/* ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* CSS変数 (カラーパレット) - フォーム部分の変数定義をここに移動することを推奨 */
    --color-primary: #007bff; /* 知的な青 (アクセント) */
    --color-accent: #fbaa06; /* フォームの必須タグ色など */
    --color-text: #333;
    --color-light: #ffffff;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.7;
    color: var(--color-text); /* 濃いグレーで読みやすく */
    background-color: #f8f8f8; /* オフホワイトの背景 */
    padding-top: 80px;
}

a {
    text-decoration: none;
    color: var(--color-primary); /* 知的な青をアクセントカラーに (グローバル定義を統一) */
    transition: opacity 0.3s;
}

a:hover {
    opacity: 0.7;
}

/* ★★★ 画像タグのグローバル装飾 (元のまま) ★★★ */
img {
    /* border-radius: 5px; 角丸を設定 */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* 薄いドロップシャドーを設定 */
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================= */
/* --- 2. ヘッダーとナビゲーション --- */
/* ========================================= */
.site-header {
    position: fixed;   /* 画面上部に固定 */
    top: 0;            /* 画面の最上部に配置 */
    left: 0;           /* 画面の左端に配置 */
    width: 100%;       /* 横幅を画面いっぱいに */
    z-index: 100;      /* 他のコンテンツより手前に表示 */
    background-color: var(--color-light);
    border-bottom: 1px solid #eee;
    padding: 20px 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo a {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text); /* ロゴのテキストカラーは変えず */
}

/* フッター */
.site-footer {
    background-color: #333;
    color: #ccc;
    text-align: center;
    padding: 20px 0;
    font-size: 14px;
}

.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav li {
    margin-left: 30px;
}

.main-nav a {
    color: #555; /* ナビゲーションのリンクカラー */
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.05em;
}

/* ========================================= */
/* --- 3. ヒーローセクション --- */
/* ========================================= */
.hero {
    background-color: var(--color-light);
    padding: 100px 0;
    text-align: center;
    border-bottom: 5px solid var(--color-primary);
    background-image: url('../img/top_image.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    color: #fff;
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

.hero h2 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
    color: inherit;
}

.hero p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
}

/* 画像表示エリア全体のスタイル（黒枠の代替） */
.hero-image-box {
    position: absolute; /* 親要素(.hero)を基準に配置 */
    right: 5%;    /* 右端から5%の位置 */
    bottom: -60px; /* 下端より少しはみ出す位置（デザインに応じて調整）*/
    width: 300px; /* 幅の指定 */
    height: 180px; /* 高さの指定 */
    
    background-color: #fff; /* 背景色を白に（画像が読み込めない場合の対策） */
    border: 5px solid #ffffff; /* 画像の枠線 */
    overflow: hidden; /* 画像がボックスからはみ出さないように */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* 浮き出た感じを出す影 */
    z-index: 10; /* 他の要素より手前に表示 */
}

/* 内部の画像スタイル */
.designated-img {
    width: 100%;  /* ボックス幅いっぱいに広げる */
    height: 100%; /* ボックス高さっぱいに広げる */
    object-fit: cover; /* 画像をボックスに合わせてトリミング（黒枠と同じ比率で表示）*/
    display: block;
}

/* ========================================= */
/* --- 4. 共通セクションスタイル --- */
/* ========================================= */
section {
    padding: 80px 0;
}

/* ★★★ タイトル共通スタイルをまとめる ★★★ */
.section-title,
.section-sub-title {
    font-weight: 300;
    text-align: center;
    margin-bottom: 60px;
    letter-spacing: 0.1em;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after,
.section-sub-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background-color: var(--color-primary);
    margin: 10px auto 0;
}

.section-title {
    font-size: 32px;
}

.section-sub-title {
    font-size: 20px;
}
/* ★★★ 共通スタイルここまで ★★★ */

/* ========================================= */
/* --- 5. お知らせセクション (News) --- */
/* ========================================= */
.news {
    background-color: var(--color-light);
}

.news-list {
    list-style: none;
    max-width: 800px;
    margin: 0 auto 40px;
    text-align: left;
}

.news-list li {
    display: flex;
    align-items: baseline;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.news-list li:first-child {
    border-top: 1px solid #eee;
}

.news-list time {
    flex-shrink: 0;
    width: 100px;
    font-size: 14px;
    color: #888;
}

.news-list span {
    flex-shrink: 0;
    display: inline-block;
    background-color: #ddd;
    color: var(--color-text);
    font-size: 12px;
    padding: 3px 8px;
    margin-right: 20px;
    border-radius: 3px;
}

.news-list p {
    color: var(--color-text);
    font-size: 16px;
}

.news-title {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--color-text);
    margin-top: 5px;
}

.btn-more {
    display: block;
    width: 200px;
    text-align: center;
    margin: 0 auto;
    padding: 10px;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    border-radius: 4px;
}

/* ========================================= */
/* --- 6. 事業概要セクション (Business) --- */
/* ========================================= */
.business-summary {
    background-color: #f8f8f8;
}

.summary-cards {
    display: flex;
    gap: 10px;
}

/* ★★★ 基本カードスタイル ★★★ */
.card {
    flex: 1;
    background-color: var(--color-light);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); /* 控えめな影 */
    /* ★★★ ここから追加/修正: アニメーションの初期状態設定 ★★★ */
    /* 1. 初期状態：非表示と少し下への移動 */
    /* opacity: 0;
    transform: translateY(20px);  */
    
    /* 2. トランジション設定：アニメーションの滑らかさと速さ */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    /* ★★★ ここまで追加/修正 ★★★ */
}

.card h4 {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 15px;
}

.card p {
    font-size: 14px;
    color: #555;
}

/* ★★★ ここから追加: 出現時のアクティブ状態を定義 ★★★ */
.business-summary .card.is-active {
    opacity: 1; 
    transform: translateY(0); /* 元の位置に戻すことで、下から飛び出てくるように見える */
}

/* ★★★ オプション: 順番にアニメーションさせるための遅延設定 ★★★ */
.business-summary .summary-cards .card:nth-child(2) {
    transition-delay: 0.3s;
}

.business-summary .summary-cards .card:nth-child(3) {
    transition-delay: 0.5s;
}
/* ★★★ ここまで追加 ★★★ */

/* ★★★ レイアウト用カードスタイル (card_02, card_03の代替) ★★★ */

/* 元 .card_02 のレイアウト調整に相当 */
.card--minimal-padding {
    /* 装飾（背景、影、角丸）は削除。レイアウト調整のみ */
    flex: 1;
    padding: 10px;
    margin: 10px 20px 30px 40px;
}

.summary-cards--center-wrap {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 元 .card_03 の固定幅に相当 */
.card--fixed-width {
    flex: 0 0 300px;
}

.map-placeholder {
    flex: 1;
    padding: 10px;
}
/* style.css: 新しく追記する部分 */

/* ★★★ ここから新規追加: アニメーションを適用したいカードにのみ初期状態を適用 ★★★ */
.business-summary .card {
    /* 1. 初期状態：非表示と少し下への移動 */
    opacity: 0; 
    transform: translateY(20px); 
}

/* ★★★ 元の is-active の定義はそのまま残します ★★★ */
.business-summary .card.is-active {
    opacity: 1; 
    transform: translateY(0); /* 元の位置に戻すことで、下から飛び出てくるように見える */
}

/* ★★★ オプション: 順番にアニメーションさせるための遅延設定も、念のため親クラスを付けておく ★★★ */
.business-summary .summary-cards .card:nth-child(2) {
    transition-delay: 0.3s;
}

.business-summary .summary-cards .card:nth-child(3) {
    transition-delay: 0.5s;
}
/* ========================================= */
/* --- 7. 会社概要テーブル (Outline Table) --- */
/* ========================================= */
.outline-table {
    width: 100%; 
    border-collapse: collapse;
    table-layout: auto;
    text-align: left;
    margin: 20px 0; 
    font-family: 'Inter', sans-serif;
    border: none;
}

.outline-table th, 
.outline-table td {
    border: none;
    padding: 2px 0;
    padding-right: 20px;
    vertical-align: top;
    text-align: left;
}

.outline-table th {
    width: 120px; 
    font-weight: 500;
    color: #6b7280;
}

.outline-table td {
    font-weight: 400; 
    color: #1f2937;
}

.history-image-container {
    text-align: center;
    margin-bottom: 30px;
}

/* ========================================= */
/* --- 8. パンくずリスト --- */
/* ========================================= */
.breadcrumb {
    padding: 10px 0;
    margin-bottom: 20px;
    background-color: #f0f0f0;
}

.breadcrumb ol {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 1100px;
    padding: 0 20px;
    font-size: 14px;
}

.breadcrumb li {
    white-space: nowrap;
}

.breadcrumb li:not(:last-child)::after {
    content: " > ";
    margin: 0 8px;
    color: #666;
}

.breadcrumb li:last-child {
    color: var(--color-text);
    font-weight: bold;
}

.breadcrumb li a {
    color: var(--color-primary);
}

.breadcrumb li a:hover {
    text-decoration: underline;
}

/* ========================================= */
/* --- 9. 問い合わせフォーム専用スタイル --- */
/* ========================================= */

.contact-form {
    flex-grow: 1;
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px;
    background-color: var(--color-light);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    text-align: left;
}

.contact-form h2 {
    font-size: 1.6rem;
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: 10px;
    margin-bottom: 30px;
    display: block;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--color-text);
    font-size: 0.95rem;
}

.required-tag {
    background-color: var(--color-accent);
    color: black;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 10px;
    font-weight: normal;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--color-primary);
    outline: none;
}

.contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

.error-message {
    color: #E74C3C;
    font-size: 0.9rem;
    margin-top: 5px;
    font-weight: bold;
}

.char-counter {
    text-align: right;
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
}

.submit-button {
    width: 100%;
    margin-top: 30px;
}

.form-status {
    text-align: center;
    padding: 10px;
    border-radius: 5px;
    margin-top: 15px;
}

/* --- Buttons --- */
.button {
    display: inline-block;
    padding: 12px 15px;
    border-radius: 5px;
    font-weight: bold;
    margin-top: 20px;
    font-size: 1.1rem;
    text-transform: uppercase;
}

.primary-button {
    background-color: var(--color-primary);
    color: #ffffff;
    border: 2px solid var(--color-primary);
}

.primary-button:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    text-decoration: none;
}

.secondary-button {
    background-color: var(--color-accent);
    color: var(--color-light);
    border: 2px solid var(--color-accent);
}

.secondary-button:hover {
    background-color: #8c7857;
    border-color: #8c7857;
    text-decoration: none;
}

/* ========================================= */
/* --- 10. レスポンシブ対応 (Max Width: 768px) --- */
/* ========================================= */
@media (max-width: 768px) {
    /* --- 共通調整 --- */
    .container {
        padding: 0 15px;
    }
    body {
        padding-top: 130px; /* モバイルではヘッダーが2行になることを想定し、パディングを増やす */
    }

    section {
        padding: 60px 0;
    }

    /* --- ヘッダー/ナビゲーション --- */
    .site-header .container {
        flex-direction: column;
        text-align: center;
    }

    .logo {
        margin-bottom: 15px;
    }

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .main-nav li {
        margin: 0 10px 10px;
    }

    .main-nav a {
        font-size: 13px;
    }

    .hero {
        padding: 80px 0;
        border-bottom: 3px solid var(--color-primary);
    }
    
    .hero h2 {
        font-size: 36px;
    }

    .hero p {
        font-size: 16px;
    }

    .hero-image-box {
        position: static; /* 絶対配置を解除し、通常フローに戻す */
        width: 50%;
        margin: 20px auto; /* 左右中央寄せ */
        height: auto;
        bottom: auto;
        border-radius: 0%;
    }

    .section-title,
    .section-sub-title { /* まとめたクラスもレスポンシブで扱う */
        font-size: 28px;
        margin-bottom: 40px;
    }

    /* --- お知らせセクション --- */
    .news-list {
        max-width: 100%;
        margin-bottom: 30px;
    }
    
    .news-list li {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 0;
    }

    .news-list time {
        width: auto;
        margin-bottom: 5px;
        font-size: 13px;
    }

    .news-list span {
        font-size: 11px;
        margin-right: 10px;
    }
    
    .news-list a { 
        display: block;
        margin-top: 5px;
        font-size: 15px;
    }
    .news-list .news-item {
        width: 100%;
    }
    .news-list p {
        font-size: 16px; 
    }

    /* --- 事業概要セクション --- */
    .summary-cards {
        flex-direction: column;
        gap: 20px;
    }

    .card {
        padding: 25px;
    }

    .card h4 {
        font-size: 18px;
    }

    /* --- フッター --- */
    .site-footer {
        font-size: 12px;
    }
}