@charset "UTF-8";

/* ============================================
   トップページ専用スタイル (top.css)
   ============================================ */

/* --- 1. メインビジュアル (Hero) --- */
.hero {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 50vh;
    min-height: 300px;
    background: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), transparent 70%, rgba(0,0,0,0.2));
}

.hero-text {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    z-index: 2;
    width: 90%;
    max-width: 800px;
}

.hero-text h1 {
    font-size: clamp(1.6rem, 5vw, 3.2rem);
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(0,0,0,0.8), 2px 2px 4px #006400;
}

/* ============================================
   1-2. 会社からのメッセージ + 理念 (single-image-section)
   ============================================ */
.single-image-section {
    padding-top: 60px;
    padding-bottom: 0; /* 下の余白を消す */
}

/* お問い合わせフォームやニュースと同様の白ボックスデザイン */
.single-image-section .container {
	background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px 20px 0 0; /* 上だけ丸く */
    padding: 40px 40px 20px 40px; /* 下側の内側余白を詰める */
    box-shadow: 0 -15px 35px rgba(0,0,0,0.05); /* 影を上方向メインに */
    margin-bottom: 0;
}

/* picture/img の共通スタイル */
.single-image-section picture,
.single-image-section .single-image {
    display: block;
    margin: 0 auto;
    width: 100%;
    height: auto;
}

/* 中の画像自体の設定 */
.single-image {
    max-width: 100%;               /* コンテナ内でいっぱいに表示 */
    border-radius: 8px;            /* 画像の角も少し丸く */
    object-fit: contain;
    /* 影は親のcontainerにあるので、ここでは最小限に */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* --- モバイル対応（768px以下） --- */
@media (max-width: 768px) {
    .single-image-section { padding-top: 40px; }
    .message-section { padding-bottom: 40px; }

    .single-image-section .container {
        padding: 20px 15px 10px 15px;
    }

    .single-image {
        min-width: 100%;           /* スマホでは画像を横いっぱいに */
    }
}

/* --- 2. メッセージセクション --- */
.message-section {
    padding-top: 0;    /* 上の余白を消す */
    padding-bottom: 60px;
}

/* 白ボックスの設定（他のセクションと統一） */
.message-section .container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 0 0 20px 20px; /* 下だけ丸く */
    padding: 0 40px 50px 40px;    /* 上側の内側余白を詰める */
    box-shadow: 0 15px 35px rgba(0,0,0,0.08); /* 影を下方向メインに */
    margin-top: 0;
}

.message-grid {
    display: grid;
    grid-template-columns: 7fr 3fr;
    gap: 40px;
    align-items: center; /* 縦方向を中央揃えにするとバランスが良くなります */
}

/* テキスト部分の設定（背景がcontainerについたので、ここはシンプルに） */
.message-text {
    padding: 0; 
    background: transparent; /* 重二重の背景を避けるため透明に */
    box-shadow: none;        /* container側に影をつけたので不要 */
}

.message-text h2 {
	padding: 8px 15px 8px 25px; /* 左側（最後）の余白を多めに25px確保 */
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: var(--main-green);
    border-left: 5px solid var(--main-green);  /* 左側の太い縦線 */
    border-bottom: 1px solid #ddd;              /* 下は薄いグレーの細線 */
    display: block;                             /* 横幅いっぱいに広げる */
}
/* スマホ用の微調整 */
@media (max-width: 768px) {
    .message-text h2 {
        font-size: 1.3rem;        /* 文字を少し小さく */
        padding: 8px 10px 2px 15px; /* 余白をスマホ向けに最適化 */
        border-left-width: 8px;     
    }
}

.message-text h2::before {
    content: "";
    position: absolute;
    left: 0; 
    top: 0; 
    bottom: 2px; 
    width: 20px;
    background: var(--dark-green);
	border-radius: 0 0 0px 20px; /* 下だけ丸く */
}

.message-text p {
    font-size: 1rem;
    line-height: 1.8;
	padding: 0px 5px 2px 20px; 
}

/* 右側カラム：リンク + キャラクター */
.message-right {
    display: flex;
    flex-direction: column;
    gap: 32px;
    align-items: center; /* 中央寄せ */
    justify-content: center;
}

/* 会社リンク（ボタン） */
.company-link {
    width: 100%;
    text-align: center;
}

/* キャラクター画像 */
.message-character img {
    max-width: 100%;
    height: auto;
}

/* --- レスポンシブ対応 --- */
@media (max-width: 768px) {
    .message-section {
        padding: 40px 15px;
    }

    .message-section .container {
        padding: 0 15px 30px 15px;
    }

    .message-grid {
        grid-template-columns: 1fr; /* 1列にする */
        gap: 30px;
    }

    .message-right {
        order: 2; /* スマホではテキストの後にキャラクターが来るように */
    }

    .message-text h2::before {
        width: 10px;
    }
}


/* --- 3. 新着情報 (News) --- */
.news-section {
    padding: 60px 0;
}

.news-container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 40px 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    position: relative;
    z-index: 10; /* 背景固定より手前に出す */
}

/* タイトル部分 */
.news-title {
    text-align: center; /* タイトルは中央に */
    margin-bottom: 30px;
}

.news-title .main {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    color: #333;
}

.news-title .sub {
    display: block;
    font-size: 1rem;
    color: #666;
    margin-top: 4px;
}

/* リスト部分の整理 */
.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-list li {
    display: flex;             /* 横並び */
    align-items: flex-start;   /* 上揃え */
    padding: 18px 10px;
    border-bottom: 1px solid #eee;
    transition: background 0.3s;
    text-align: left;
}

.news-list li:hover {
    background: rgba(0, 100, 0, 0.03);
}

/* 日付の幅を固定してガタつきを防止 */
.news-list .date {
    color: var(--main-green);
    font-weight: 600;
    min-width: 120px;          /* 幅を120pxで固定 */
    flex-shrink: 0;
}

.news-list li a {
    color: #333;
    text-decoration: none;
    line-height: 1.6;
    flex-grow: 1;              /* 残りの幅をすべて使う */
}

.news-list li a:hover {
    color: var(--main-green);
}

/* --- スマホ対応（768px以下） --- */
@media (max-width: 768px) {
    .news-container {
        padding: 25px 15px;
        width: 95%;
    }

    .news-list li {
        flex-direction: column; /* 縦並び */
        padding: 15px 5px;
    }

    .news-list .date {
        min-width: auto;
        margin-bottom: 4px;      /* タイトルとの隙間を少し開ける */
        font-size: 0.85rem;
    }

    .news-list li a {
        font-size: 0.95rem;
    }
}


/* --- 4. 製品ラインナップ (Featured Products) --- */
.featured-products {
    padding: 60px 0;
    background: var(--light-green);
}

.title-white-bg {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 40px;
    text-align: center;
}

/* タイトルの枠線制御 */
.h2-green-border {
    border: none !important; /* 枠線を消去 */
    padding: 0 !important;
    margin-bottom: 10px;
}

.h2-green-border h2 {
    color: var(--main-green);
    font-size: 1.8rem;
    font-weight: 700;
}

/* グリッドレイアウト */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* カード全体の制御 */
.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* aタグがカード全体を覆う場合の文字色と配置 */
.product-card a {
    display: block;
    text-decoration: none;
    color: #333; /* 文字色を強制的に黒系に */
    text-align: center;
    height: 100%;
}

/* 画像の制御：高さを固定して、比率を維持したまま切り抜く */
.product-card img {
    width: 100%;
    height: 200px; /* ここの数値で高さを統一します */
    object-fit: cover; /* 画像の比率を崩さず枠いっぱいに表示 */
    border-bottom: 1px solid #eee;
}

/* カード内のテキスト余白 */
.product-card h3 {
    font-size: 1.2rem;
    margin: 15px 0 5px;
    color: var(--main-green);
}

.product-card p {
    font-size: 0.9rem;
    color: #666;
    padding: 0 15px 20px;
    margin: 0;
}

/* ホバー時の動き */
.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* --- 5. Instagram --- */
/* --- 5. Instagram --- */
.instagram-section {
    padding: 60px 20px;
    text-align: center;
}

/* 白ボックスの設定（他のセクションと統一） */
.instagram-section .container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 50px 40px;
    background: rgba(255, 255, 255, 0.9); /* 透ける白 */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    position: relative;
    z-index: 10;
}

/* タイトルの装飾（製品ラインナップなどと合わせる場合） */
.instagram-section h2 {
    color: var(--main-green);
    margin-bottom: 30px;
    font-size: 1.6rem;
}

.instagram-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    max-width: 100%; /* container内に収める */
    margin: 0 auto;
}

/* --- レスポンシブ対応 --- */
@media (max-width: 768px) {
    .instagram-section {
        padding: 40px 15px;
    }

    .instagram-section .container {
        padding: 30px 15px;
        width: 95%;
    }

    .instagram-grid {
        grid-template-columns: 1fr; /* スマホでは1列 */
        gap: 20px;
    }
}

/* --- 6. トップページ用レスポンシブ --- */
@media (max-width: 768px) {
    .message-grid { grid-template-columns: 1fr; }
    .message-right { order: 2; gap: 20px; }
    .company-link { margin-top: 0; }
    .instagram-grid { grid-template-columns: 1fr; }
    .hero { height: 40vh; }
}

/* --- 新着情報のスマホ表示を強制修正 --- */
@media (max-width: 768px) {
    /* リスト項目自体の高さをリセット */
    .news-list li {
        display: block !important;    /* 横並びを解除して縦に */
        min-height: 0 !important;      /* 高さを強制リセット */
        padding: 10px 15px !important; /* 余白を最小限に */
        margin: 0 !important;
    }

    /* 日付の余白を消してタイトルに密着させる */
    .date {
        display: block !important;
        margin-bottom: 2px !important; /* タイトルとの隙間を2pxに */
        margin-right: 0 !important;
        padding: 0 !important;
        line-height: 1.2 !important;
        font-size: 0.85rem !important;
    }

    /* タイトル（リンク）の余白を消す */
    .news-list li a {
        display: inline-block !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1.4 !important;
        vertical-align: top !important;
    }
}

/* ============================================
   共通ボタンデザイン (btn-standard)
   ============================================ */
.btn-standard {
    display: inline-block;
    padding: 12px 40px;
    background-color: var(--main-green); /* 村岡食品様のコーポレートカラー */
    color: #fff !important;              /* 文字は白 */
    text-decoration: none;
    font-weight: bold;
    border-radius: 50px;                 /* 丸みのあるボタン */
    transition: all 0.3s ease;
    border: 2px solid var(--main-green);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.btn-standard:hover {
    background-color: #fff;              /* ホバーで白抜きに */
    color: var(--main-green) !important;
    transform: translateY(-2px);         /* 少し浮き上がる */
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* 各セクションでのボタン配置調整 */
.more-btn-wrapper, 
.company-link, 
.instagram-btn-wrapper {
    margin-top: 30px;
    text-align: center;
}