@charset "utf-8";

/* mv */
#mv {
    padding-top: 1px;
    padding-bottom: 0!important;
}

.mv {
  position: relative;
  /* aspect-ratio: 1920 / 1050; 各CSSファイルで調整すること*/
  background: #eee;
  overflow: hidden;
  width: 100%;
}

/* 画像を領域いっぱいに */
.mv img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* 2. 読み込み完了クラスがついたら画像を表示する */
.mv.is-loaded img {
  opacity: 1;
}


#safety_product_grid_section {
    padding: 50px 0 70px;
    background-color: white;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
}

.safety_product_grid_wrapper {
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
    max-width: 1400px!important;
}

.product_card_title {
    color: #333;
    font-size: 2.0rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 20px;
    text-align: center;
}

.safety_grid_wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.safety_product_item {
    width: calc((100% - 45px) / 4); /* 4列表示 */
    box-sizing: border-box;
    border: 1px solid #ddd;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s ease;
    border-radius: 0;
    overflow: hidden;
    position: relative;
}

.safety_product_item:hover {
    border-color: var(--main-color);
    z-index: 2;
}

.safety_link_overlay {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.safety_item_header {
    background-color: var(--main-color);
    color: #fff;
    padding: 10px 8px;
    font-size: 0.9rem;
    font-weight: bold;
    text-align: center;
    min-height: 3.6em;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
}

.safety_item_body {
    padding: 15px 12px 12px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.safety_item_image_box {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
    margin: 0 0 10px;
    overflow: hidden;
}

.safety_item_image_box img {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    width: auto;
    transition: transform 0.5s ease;
}

.safety_product_item:hover .safety_item_image_box img {
    transform: scale(1.1);
}

.safety_item_name {
    font-size: 0.95rem;
    font-weight: bold;
    color: #0056b3;
    margin: 0 0 5px 0;
    line-height: 1.4;
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
    transition: text-decoration 0.2s;
}

.safety_product_item:hover .safety_item_name {
    text-decoration: underline;
}

/* 会社名・日付：左寄せに変更 */
.safety_item_meta {
    font-size: 0.75rem;
    color: #666;
    text-align: left; /* 左寄せ */
    margin-bottom: 8px;
    border-bottom: 1px dotted #ddd;
    padding-bottom: 8px;
}

.safety_company_name {
    font-weight: bold;
    display: block;
    margin-bottom: 2px;
}

.safety_item_desc {
    font-size: 0.8rem;
    line-height: 1.5;
    color: #333;
    margin: 0;
    text-align: left;
    flex-grow: 1;
}

@media screen and (max-width: 768px) {
    .safety_product_item {
        width: calc((100% - 15px) / 2);
    }
    .safety_item_image_box {
        height: 140px;
    }
    .product_card_title {
        font-size: 1.6rem;
    }
}

@media screen and (max-width: 480px) {
    .safety_product_item {
        width: 100%;
        margin-bottom: 10px;
    }
    .safety_grid_wrapper {
        gap: 20px;
    }
    .safety_item_header {
        min-height: auto;
        padding: 12px;
    }
}

/*  */
.risk_map_section {
    margin: 0 0 3em;
    padding: 24px 0;
    background-color: #f4f6f9; /* 淡いグレー背景で区別 */
    border-radius: 8px;
}

.risk_map_title {
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    width: 95%;
}

.risk_map_grid {
    display: grid;
    /* PC時は横幅に応じて2〜3列、スマホ時は1列に自動可変 */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin: 0 auto;
    width: 95%;
}

/* ▼ 各カードのデザイン ▼ */
.risk_map_card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 16px 40px 16px 16px; /* 右側に矢印用の余白を確保 */
    text-decoration: none;
    position: relative;
    transition: all 0.2s ease-in-out;
}
/* ホバー時のアクション */
.risk_map_card:hover {
    border-color: var(--main-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* 右端の矢印アイコン（CSSで描画） */
.risk_map_card::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    border-top: 2px solid var(--main-color);;
    border-right: 2px solid var(--main-color);;
    transition: right 0.2s ease;
}
.risk_map_card:hover::after {
    right: 12px; /* ホバー時に矢印が少し右へ動く */
}

/* ▼ テキストのデザイン ▼ */
.risk_card_heading {
    color: var(--main-color);
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 6px;
    line-height: 1.4;
}
.risk_card_text {
    color: #555;
    font-size: 0.85rem;
    line-height: 1.5;
}