@charset "UTF-8";


.env-activity {
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px 20px;
  box-sizing: border-box;
  color: #000000;
  font-size: 16px;
  line-height: 1.6;
}

.env-nav {
  font-size: 16px;
}



.env-nav a {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
  transition: color 0.3s ease;
}

.env-nav li.active a::after,
.env-nav a:hover::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 2px;
  background-color: #0075B5;
}

.env-activity a {
  color: inherit;
  text-decoration: none;
}


.env-header {
  text-align: center;
  margin-bottom: 60px;
}


.env-description {
  font-weight: bold;
}

/* メインコンテンツ レイアウト（PC） */
.env-content {
  display: flex;
  gap: 60px;
  align-items: flex-start;
}

/* 左側サイドバー（スクロール追従） */
.env-sidebar {
  width: 140px;
  flex-shrink: 0;
  position: sticky;
  top: 40px; /* 画面上部からの固定位置 */
}

.env-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.env-nav li {
  margin-bottom: 16px;
  font-weight: bold;
}

/* 記事一覧（右側） */
.env-main {
  flex: 1;
}

.env-post-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid #A7A7A7;
}

.env-post-item {
  border-bottom: 1px solid #A7A7A7;
}

.env-post-link {
  display: flex;
  align-items: center;
  padding: 20px 0;
  transition: opacity 0.3s;
}

.env-post-link:hover {
  opacity: 0.7;
}

.env-post-thumb {
  width: 130px;
  height: 90px;
  flex-shrink: 0;
  margin-right: 24px;
}

.env-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.env-post-body {
  flex: 1;
}

.env-post-date {
  display: block;
  font-size: 14px;
  color: #A7A7A7;
  margin-bottom: 6px;
}

.env-post-title {
  font-size: 16px;
  font-weight: bold;
  margin: 0;
}

.env-post-icon {
  font-size: 24px;
  color: #0075B5;
  margin-left: 16px;
}

/* ページネーション */
.env-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
}

.env-pagination a,
.env-pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid #ECECEC;
  font-size: 14px;
  color: #000000;
}

.env-pagination .current {
  background-color: #0075B5;
  color: #ffffff;
  border-color: #0075B5;
}

.pagination_co {
  transition: color 0.3s ease;
}
.pagination_co:hover {
  color: #0075B5;
}

/* ==========================================
レスポンシブ設定 (768px以下)
   ========================================== */
@media screen and (max-width: 768px) {
  .env-content {
    flex-direction: column;
    gap: 80px;
  }

  /* サイドバー解除＆上部中央配置 */
  .env-sidebar {
    width: 100%;
    position: static;
  }

  .env-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
  }

  /* 「全ての記事」を上部真ん中に100%幅で配置 */
  .env-nav li:first-child {
    width: 100%;
    text-align: center;
    margin-bottom: 4px;
  }

  .env-nav li:first-child {
    width: 100%;
    text-align: center;
    margin-bottom: 8px;
    border-bottom: 1px solid #ECECEC;
  }


  /* 西暦を2列並びに設定 */
  .env-nav li:not(:first-child) {
    width: calc(50% - 6px); /* 2列配置（gap分の調整） */
    text-align: center;
    margin-bottom: 0;
    border-bottom: 1px solid #ECECEC;
  }

  .env-description {
    font-size: 18px; /* スマホ用に軽く調整 */
  }

  .env-post-thumb {
    width: 100px;
    height: 70px;
    margin-right: 12px;
  }


  .env-main {
    width: 100%;
    margin: 0 auto;
  }

  /* サムネイルとテキストを含む記事リンクを中央揃えにする場合（任意） */
  .env-post-link {
    justify-content: center;
    gap: 10px;
  }
}


/* ======環境活動詳細ページ====== */

/* ベース設定 */
.env-detail-activity {
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px 20px;
  box-sizing: border-box;
  color: #000000;
  font-size: 16px;
  line-height: 1.8;
}

.env-detail-activity a {
  color: inherit;
  text-decoration: none;
}

/* ヘッダーエリア */
.env-detail-header {
  text-align: center;
  margin-bottom: 50px;
}

/* メインコンテンツ レイアウト（PC） */
.env-detail-content {
  display: flex;
  gap: 60px;
  align-items: flex-start;
}

/* メイン記事領域 */
.env-detail-main {
  flex: 1;
}

.env-detail-date {
  display: block;
  font-size: 15px;
  color: #888888;
  margin-bottom: 8px;
}

.env-detail-title {
  font-size: 22px;
  font-weight: bold;
  margin: 0 0 30px 0;
  line-height: 1.4;
}

.env-detail-body {
  margin-bottom: 40px;
  font-size: 15px;
}

/* ------------------------------------------
   最大10枚対応 画像ギャラリー（CSS Grid）
------------------------------------------ */
.env-detail-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 横2列 */
  grid-template-rows: repeat(5, auto);    /* 最大5行 */
  gap: 16px;                            /* 画像同士の間隔 */
  margin-bottom: 50px;
  grid-template-areas:
    "slot1  slot2"
    "slot3  slot4"
    "slot5  slot6"
    "slot7  slot8"
    "slot9  slot10";
}

/* 各スロットのグリッド位置指定（1〜10） */
.gallery-slot.slot-1  { grid-area: slot1; }
.gallery-slot.slot-2  { grid-area: slot2; }
.gallery-slot.slot-3  { grid-area: slot3; }
.gallery-slot.slot-4  { grid-area: slot4; }
.gallery-slot.slot-5  { grid-area: slot5; }
.gallery-slot.slot-6  { grid-area: slot6; }
.gallery-slot.slot-7  { grid-area: slot7; }
.gallery-slot.slot-8  { grid-area: slot8; }
.gallery-slot.slot-9  { grid-area: slot9; }
.gallery-slot.slot-10 { grid-area: slot10; }

.gallery-slot {
  width: 100%;
  aspect-ratio: 4 / 3; /* 画像比率を保持して、画像がなくても枠を確保 */
  background-color: transparent;
}

.gallery-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ------------------------------------------
   一覧に戻るボタン
------------------------------------------ */
.env-detail-back {
  margin-top: 40px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 200px;
  padding: 12px 20px;
  background-color: #0075B5;
  color: #ffffff !important;
  font-weight: bold;
  font-size: 14px;
  border-radius: 0;
  transition: opacity 0.3s ease;
}

.btn-back:hover {
  opacity: 0.8;
}

/* ------------------------------------------
   右側サイドバー
------------------------------------------ */
.env-detail-sidebar {
  width: 140px;
  flex-shrink: 0;
  position: sticky;
  top: 40px;
}

.env-detail-nav {
  font-size: 15px;
}

.env-detail-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.env-detail-nav li {
  margin-bottom: 16px;
  font-weight: bold;
}

.env-detail-nav a {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
  transition: color 0.3s ease;
}

.env-detail-nav li.active a::after,
.env-detail-nav a:hover::after{
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 2px;
  background-color: #0075B5;
}

/* ==========================================
   レスポンシブ設定 (768px以下)
========================================== */
@media screen and (max-width: 768px) {
  .env-detail-content {
    flex-direction: column-reverse;
    gap: 40px;
  }

  .env-detail-sidebar {
    width: 100%;
    position: static;
  }

  .env-detail-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
  }

  .env-detail-nav li:first-child {
    width: 100%;
    text-align: center;
    margin-bottom: 8px;
    border-bottom: 1px solid #ECECEC;
  }

  .env-detail-nav li:not(:first-child) {
    width: calc(50% - 6px);
    text-align: center;
    margin-bottom: 0;
    border-bottom: 1px solid #ECECEC;
  }

  .env-detail-gallery {
    gap: 8px; /* スマホでは間隔を少し詰める */
  }

  .env-detail-title {
    font-size: 18px;
  }
}

/* ==========================================
   印刷用設定（@media print）
========================================== */
@media print {
  /* 1. 印刷に不要なナビゲーションやボタンを非表示にする（必要に応じて） */
  .env-detail-sidebar,
  .env-detail-back {
    display: none !important;
  }

  /* 2. メイン領域の幅を紙に合わせて100%にする */
  .env-detail-content {
    display: block !important;
  }
  .env-detail-main {
    width: 100% !important;
  }

  /* 3. Grid領域のサイズ指定を明確なピクセル/パーセントに固定する */
  .env-detail-gallery {
    display: grid !important;
    grid-template-columns: 48% 48% !important; /* frではなく%で固定 */
    gap: 10px !important;
    page-break-inside: avoid; /* ガリッド全体が途中で切れないようにする */
  }

  /* 4. 画像枠と画像の挙動を安定させる */
  .gallery-slot {
    aspect-ratio: auto !important; /* 印刷時のバグを防ぐため解除 */
    height: 180px !important;       /* 高さを固定値で指定 */
    overflow: hidden !important;   /* はみ出しを防止 */
    page-break-inside: avoid !important; /* 途中で改ページされるのを防ぐ */
  }

  .gallery-slot img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
}