/* ==========================================================================
   [0.0] ドキュメント情報
   プロジェクト: 御幸建設グループ 社内ポータル (TOP)
   作成日: 2026年4月7日
   更新日: 2026年4月7日
   管理番号: Ver. 1.6.0 (PC表示を2列構成に変更)
   ========================================================================== */

/* ==========================================================================
   [1.0] レイアウト・共通コンテナ
   ========================================================================== */

/* [1.1] 共通コンテナ */
.l-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   [2.0] ヒーローエリア
   ========================================================================== */

/* --- 1. ヒーローエリア全体 --- */
.p-index-hero {
    position: relative;
    height: 400px;
    background: #000;
    overflow: hidden;
    margin-bottom: 80px; /* 以前の詰まり解消の余白を維持 */
}

/* --- 2. 背景画像へのフィルター重ね（今回の重要修正） ---
   imgタグ自体には触れず、疑似要素 (::after) を使って
   画像の上に半透明の青を重ね、文字とのコントラストを作ります。
*/
.p-index-hero::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 【工夫点】ブランドカラーの青を半透明で重ね、コントラストを確保 */
    background: rgba(0, 112, 184, 0.4); /* 透明度0.4で調整 */
    z-index: 1; /* 画像より前、文字より後ろ */
}

/* 背景画像（既存設定の確認） */
.p-index-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7; /* フィルターと合わせて暗さを調整 */
    z-index: 0;
}

/* --- 3. テキストコンテンツの配置 --- */
.p-index-hero__content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    color: #fff;
    z-index: 2; /* フィルターより前面に */
}

.p-index-hero__title {
    font-size: 2.8rem;
    font-weight: bold;
    margin-bottom: 15px;
    /* 【工夫点】文字自体にも「影」を入れ、よりはっきりと浮かび上がらせる */
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.p-index-hero__sub {
    font-size: 1.2rem;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* --- 4. レスポンシブ --- */
@media screen and (max-width: 768px) {
    .p-index-hero {
        height: 300px;
        margin-bottom: 40px;
    }
    .p-index-hero__title {
        font-size: 1.8rem;
    }
    .p-index-hero__sub {
        font-size: 1rem;
    }
}
/* ==========================================================================
   [3.0] ナビゲーションカード・レイアウト
   ========================================================================== */

/* [3.1] グリッド設定
 * grid-template-columns: repeat(2, 1fr); 
 * PC表示を3列から2列に変更し、1つ1つのカードを大きく見せます。
 */
/* --- ナビゲーションエリアのレイアウト --- */

.p-index-nav {
    display: grid;
    /* 【重要】3列均等に並べる設定 */
    grid-template-columns: repeat(3, 1fr);
    /* カード同士の余白：上下40px / 左右30px */
    gap: 40px 30px;
    /* ヒーローエリアとの詰まり解消（上部）と、ページ末尾の余白（下部） */
    padding: 40px 0 100px;
}

/* --- レスポンシブ対応 --- */

/* タブレットサイズ（960px以下）は2列にする */
@media screen and (max-width: 960px) {
    .p-index-nav {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px 20px;
    }
}

/* スマートフォンサイズ（768px以下）は1列にする */
@media screen and (max-width: 768px) {
    .p-index-nav {
        grid-template-columns: 1fr;
        padding: 20px 0 60px;
    }
}

/* --- カード自体の高さ統一（オプション） ---
   カードの中身の文章量が違っても、高さを揃えて綺麗に見せる設定です
*/
.p-index-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.p-index-card__body {
    flex-grow: 1; /* 本文エリアを伸ばしてフッター位置を揃える */
}
/* [3.2] カード全体構造 */
.p-index-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.p-index-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

/* [3.3] 画像エリア */
.p-index-card__image-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #eee;
}

.p-index-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   [4.0] カード内コンテンツ
   ========================================================================== */

.p-index-card__body {
    padding: 30px;
    flex-grow: 1;
}

.p-index-card__en {
    display: block;
    font-size: 0.8rem;
    font-weight: bold;
    color: #0070b8;
    margin-bottom: 10px;
}

.p-index-card__title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 15px;
    line-height: 1.4;
}

.p-index-card__text {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.7;
}

/* ==========================================================================
   [5.0] カードフッター・アクション
   ========================================================================== */

.p-index-card__footer {
    padding: 20px 30px 30px;
    border-top: 1px solid #f0f0f0;
    text-align: right;
}

.p-index-card__more {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: bold;
    color: #0070b8;
    padding: 8px 0;
    position: relative;
    padding-right: 25px;
}

.p-index-card__more::after {
    content: "→";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.p-index-card:hover .p-index-card__more::after {
    transform: translate(8px, -50%);
}

/* ==========================================================================
   [6.0] レスポンシブ設計
   ========================================================================== */

@media screen and (max-width: 768px) {
    /* 768px以下（モバイル）は1列に */
    .p-index-nav {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .p-index-hero {
        padding: 50px 0;
    }
    
    .p-index-hero__title {
        font-size: 1.6rem;
    }

    .p-index-card__body {
        padding: 20px;
    }
}