/* ===== NEWS PAGE ===== */

/* --- Page Header --- */
.news-page-header {
  position: relative;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #00c8a0 100%);
  padding: 56px 0 40px;
  overflow: hidden;
}

.news-page-header-bg {
  display: none;
}

.news-page-header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}

.news-page-header-icon {
  width: 60px;
  height: 60px;
  background: rgba(255,255,255,0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.6rem;
  backdrop-filter: blur(6px);
  flex-shrink: 0;
}

.news-page-title {
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  margin: 0 0 4px;
}

.news-page-sub {
  font-family: var(--font-en);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.75);
  margin: 0;
}

/* Breadcrumb */
.news-breadcrumb {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.8);
}

.news-breadcrumb a {
  color: rgba(255,255,255,0.9);
  transition: color 0.2s;
}
.news-breadcrumb a:hover { color: #fff; }
.news-breadcrumb i.fa-chevron-right { font-size: 0.65rem; opacity: 0.6; }

/* --- Layout --- */
.news-page-body {
  padding-top: 40px;
  padding-bottom: 60px;
}

.news-page-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

/* --- Filter Bar --- */
.news-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.news-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 50px;
  border: 2px solid rgba(0,170,221,0.25);
  background: var(--white);
  color: var(--mid);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s ease;
}

.news-filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(0,170,221,0.06);
}

.news-filter-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0,170,221,0.35);
}

/* --- Card List --- */
.news-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* --- Pagination --- */
.news-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.pg-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 2px solid rgba(0,170,221,0.25);
  background: var(--white);
  color: var(--mid);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pg-btn:hover:not(.disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.pg-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(0,170,221,0.35);
}

.pg-btn.disabled {
  opacity: 0.35;
  cursor: default;
}

/* --- Sidebar Widgets --- */
.news-side {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.news-widget {
  
  overflow: hidden;
}

.news-widget {
  margin-bottom: 30px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.06);
  overflow: hidden;
}

.news-widget-title {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    margin: 0;
    padding: 12px 18px;
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- Sidebar Widgets General --- */


.news-widget-content {
    padding: 15px;
}

.search-input-group .search-field {
  border: 1px solid rgba(0,0,0,0.12);
  padding: 10px;
  border-radius: 8px;
}

/* --- Category List (WordPress specific) --- */
.news-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-cat-list li {
    border-bottom: 1px solid #f0f0f0;
}

.news-cat-list li:last-child {
    border-bottom: none;
}

/* 親のli自体をフレックスボックスにして、中身を横並びにする */
.news-cat-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
}

/* リンク自体のパディングは解除して、位置を整える */
.news-cat-list li a {
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
    flex-grow: 1; /* テキスト部分を広げる */
}

.news-cat-list li a:hover {
    color: #00aadd;
}

/* 記事数のカウント部分 (WordPressが自動生成する.children) */
.news-cat-list li .count {
    background: #f0f0f0;
    color: #666;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-family: var(--font-en);
}

/* --- Pickup List (Related & Sticky) --- */
.news-pickup-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-pickup-list li {
    margin-bottom: 15px;
    padding: 16px;
}

.news-pickup-list li:last-child {
    margin-bottom: 0;
}

.news-pickup-list li a {
    display: flex;
    gap: 12px;
    text-decoration: none;
}

.pickup-img {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 5px;
    overflow: hidden;
}

.pickup-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pickup-body time {
    display: block;
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 4px;
}

.pickup-body h4 {
    margin: 0;
    font-size: 0.85rem;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; /* 以前からの設定 */
    line-clamp: 2;         /* これを追記して標準プロパティに対応 */
    overflow: hidden;
}

/* リスト全体に少し動きの準備 */
.news-pickup-list li {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px; 
}

/* ホバーした時のリスト項目の動き */
.news-pickup-list li:hover {
    background-color: #f9fbfd; /* ほんのり青みがかった背景色 */
    transform: translateY(-3px); /* 3pxだけ上に浮かす */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1); /* 影を少し強くして浮遊感を出す */
}

/* ホバー時の画像の演出 */
.news-pickup-list li:hover .pickup-img img {
    opacity: 0.8; /* 少し明るく（透過）させる */
    transform: scale(1.05); /* 画像を少しだけ大きくする */
}

/* 画像の動きを滑らかにするための設定 */
.pickup-img {
    overflow: hidden; /* 拡大した時にはみ出さないように */
}

.pickup-img img {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ホバー時にタイトル色を変える */
.news-pickup-list li:hover h4 {
    color: #00aadd; /* タイトルバーのグラデーションに合わせた色 */
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .news-page-layout {
    grid-template-columns: 1fr 260px;
    gap: 28px;
  }
}

@media (max-width: 900px) {
  .news-page-header { margin-left: 0; }

  .news-page-layout {
    grid-template-columns: 1fr;
  }

  .news-side {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .news-list {
    grid-template-columns: 1fr;
  }

  .nl-card-featured {
    grid-column: span 1;
    display: flex !important;
    flex-direction: column;
  }

  .nl-card-featured .nl-card-img {
    height: 220px !important;
  }
}

@media (max-width: 640px) {
  .news-page-title { font-size: 1.4rem; }

  .news-side {
    grid-template-columns: 1fr;
  }

  .news-filter-bar {
    gap: 6px;
  }

  .news-filter-btn {
    padding: 6px 14px;
    font-size: 0.78rem;
  }
}
