/*
Theme Name: MediaWave
Theme URI:
Author:
Author URI:
Description: MediaWaveニュースメディアテーマ。エンタメ・ビジネス・ライフ・グルメ・トレンドの5カテゴリに対応したニュースポータルテーマです。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mediawave
Tags: news, blog, custom-menu, featured-images, responsive-layout, two-columns, three-columns, grid-layout
*/

/* =============================
   リセット & ベーススタイル
   ============================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: #1a1a1a;
  background: #fff;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

ul {
  list-style: none;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =============================
   ヘッダー
   ============================= */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 2px solid #f0f0f0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

/* ロゴ */
.logo a {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #1a1a1a;
}
.logo a span {
  color: #e74c3c;
}

/* ナビ */
.nav-list {
  display: flex;
  gap: 4px;
}

.nav-link {
  display: block;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.nav-entame  { color: #e74c3c; }
.nav-business{ color: #2980b9; }
.nav-life    { color: #27ae60; }
.nav-gourmet { color: #e67e22; }
.nav-trend   { color: #8e44ad; }

.nav-entame:hover  { background: #e74c3c; color: #fff; }
.nav-business:hover{ background: #2980b9; color: #fff; }
.nav-life:hover    { background: #27ae60; color: #fff; }
.nav-gourmet:hover { background: #e67e22; color: #fff; }
.nav-trend:hover   { background: #8e44ad; color: #fff; }

/* ハンバーガー（スマホ用） */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #1a1a1a;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =============================
   バッジ
   ============================= */
.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #e74c3c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  border-radius: 3px;
}

.badge-cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 3px;
  color: #fff;
}

/* メインビジュアルのカテゴリバッジ（絶対配置） */
.pickup-img-wrap .badge-cat {
  position: absolute;
  bottom: 12px;
  left: 12px;
}

.badge-entame  { background: #e74c3c; }
.badge-business{ background: #2980b9; }
.badge-life    { background: #27ae60; }
.badge-gourmet { background: #e67e22; }
.badge-trend   { background: #8e44ad; }

/* =============================
   PICKUP セクション
   ============================= */
.pickup {
  padding: 32px 0 40px;
}

.pickup-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 16px;
}

.pickup-main a,
.pickup-sub-item a {
  display: block;
}

.pickup-img-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.pickup-img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.pickup-main a:hover .pickup-img {
  transform: scale(1.03);
}

.pickup-body {
  padding: 16px 4px 0;
}

.pickup-title {
  font-size: 22px;
  font-weight: 900;
  line-height: 1.5;
  margin: 6px 0 10px;
  color: #1a1a1a;
}

.pickup-excerpt {
  font-size: 14px;
  color: #555;
  line-height: 1.8;
}

/* サブ記事 */
.pickup-sub {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pickup-sub-item {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #eee;
  transition: box-shadow 0.2s;
}
.pickup-sub-item:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.pickup-sub-item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  transition: transform 0.4s;
}
.pickup-sub-item a:hover img {
  transform: scale(1.03);
}

.pickup-sub-body {
  padding: 12px 14px 14px;
}

.pickup-sub-body h3 {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
  color: #1a1a1a;
}

/* =============================
   日付
   ============================= */
.article-date {
  font-size: 12px;
  color: #999;
  letter-spacing: 0.05em;
}

/* =============================
   新着記事
   ============================= */
.latest {
  padding: 48px 0;
  background: #fafafa;
  border-top: 1px solid #f0f0f0;
}

.section-title {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 3px solid #1a1a1a;
  display: flex;
  align-items: center;
  gap: 12px;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.article-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #eee;
  transition: box-shadow 0.25s, transform 0.25s;
}
.article-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  transform: translateY(-3px);
}

.card-img-wrap {
  position: relative;
  overflow: hidden;
}

.card-img-wrap img {
  height: 180px;
  transition: transform 0.4s;
}
.article-card:hover .card-img-wrap img {
  transform: scale(1.05);
}

.card-img-wrap .badge-cat {
  position: absolute;
  top: 10px;
  left: 10px;
}

.card-body {
  padding: 14px 16px 18px;
}

.card-title {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
  color: #1a1a1a;
}

.more-wrap {
  text-align: center;
  margin-top: 32px;
}

.btn-more {
  display: inline-block;
  padding: 12px 40px;
  border: 2px solid #1a1a1a;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: 0.05em;
  transition: background 0.2s, color 0.2s;
}
.btn-more:hover {
  background: #1a1a1a;
  color: #fff;
}

/* =============================
   カテゴリ別セクション
   ============================= */
.category-section {
  padding: 48px 0;
  border-top: 1px solid #f0f0f0;
}

.bg-light {
  background: #fafafa;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 3px solid #1a1a1a;
}

.section-header .section-title {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.cat-label {
  display: inline-block;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  padding: 4px 16px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.cat-entame  { background: #e74c3c; }
.cat-business{ background: #2980b9; }
.cat-life    { background: #27ae60; }
.cat-gourmet { background: #e67e22; }
.cat-trend   { background: #8e44ad; }

.section-more {
  font-size: 13px;
  color: #888;
  font-weight: 600;
  transition: color 0.2s;
}
.section-more:hover {
  color: #1a1a1a;
}

/* 記事リスト */
.list-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.list-item {
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #eee;
  transition: box-shadow 0.2s, transform 0.2s;
}
.list-item:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.09);
  transform: translateY(-2px);
}

.list-item a {
  display: flex;
  gap: 0;
}

.list-item img {
  width: 130px;
  min-width: 130px;
  height: 90px;
  object-fit: cover;
  flex-shrink: 0;
}

.list-body {
  padding: 10px 14px;
  flex: 1;
}

.list-body h3 {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
  color: #1a1a1a;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =============================
   フッター
   ============================= */
.footer {
  background: #1a1a1a;
  color: #ccc;
  padding: 48px 0 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-logo a {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.05em;
}
.footer-logo a span {
  color: #e74c3c;
}
.footer-logo p {
  font-size: 12px;
  color: #888;
  margin-top: 6px;
}

.footer-nav {
  display: flex;
  gap: 48px;
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav a {
  font-size: 13px;
  color: #aaa;
  transition: color 0.2s;
}
.footer-nav a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid #333;
  padding: 18px 0;
  text-align: center;
  font-size: 12px;
  color: #666;
}

/* =============================
   個別記事 (single)
   ============================= */
.single-layout {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 0 60px;
}

.single-category {
  margin-bottom: 12px;
}

.single-title {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.5;
  margin-bottom: 12px;
  color: #1a1a1a;
}

.single-meta {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.single-thumbnail {
  margin-bottom: 32px;
  border-radius: 8px;
  overflow: hidden;
}

.single-thumbnail img {
  width: 100%;
  height: auto;
}

.single-content {
  font-size: 15px;
  line-height: 1.9;
  color: #333;
  margin-bottom: 48px;
}

.single-content h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f0f0f0;
}

.single-content h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 24px 0 12px;
}

.single-content p {
  margin-bottom: 20px;
}

.single-content img {
  border-radius: 4px;
  margin: 20px 0;
}

.single-nav {
  display: flex;
  justify-content: space-between;
  padding: 24px 0;
  border-top: 1px solid #f0f0f0;
  margin-bottom: 40px;
  font-size: 14px;
}

.single-nav a {
  color: #555;
  transition: color 0.2s;
}
.single-nav a:hover {
  color: #1a1a1a;
}

/* ページネーション */
.nav-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}

.nav-links a,
.nav-links span {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  color: #555;
  transition: background 0.2s, color 0.2s;
}

.nav-links a:hover {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}

.nav-links .current {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}

/* カテゴリアーカイブ */
.category-archive {
  min-height: 60vh;
  padding-top: 40px;
}

/* =============================
   トップページ RSS セクション
   ============================= */
.rss-section {
  border-top: 1px solid #f0f0f0;
}

.rss-section .section-header {
  margin-bottom: 24px;
}

/* =============================
   WP RSS Aggregator グリッド
   ============================= */

/* --- カスタムショートコード [mediawave_rss_grid] --- */
.mw-rss-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 0 0 40px;
}

.mw-rss-grid--col2 {
  grid-template-columns: repeat(2, 1fr);
}

/* カード */
.mw-rss-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #eee;
  transition: box-shadow 0.25s, transform 0.25s;
}

.mw-rss-card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.13);
  transform: translateY(-4px);
}

.mw-rss-card > a {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* サムネイル */
.mw-rss-card__img-wrap {
  position: relative;
  overflow: hidden;
  height: 180px;
  background: var(--source-color, #888);
}

.mw-rss-card__img-wrap img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.mw-rss-card:hover .mw-rss-card__img-wrap img {
  transform: scale(1.05);
}

/* 画像なし時のプレースホルダー */
.mw-rss-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--source-color, #888);
}

.mw-rss-card__placeholder span {
  color: rgba(255,255,255,0.9);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

/* ソースバッジ */
.mw-rss-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 3px;
  letter-spacing: 0.06em;
  z-index: 1;
  white-space: nowrap;
}

/* カード本文 */
.mw-rss-card__body {
  padding: 14px 16px 18px;
}

.mw-rss-card__date {
  font-size: 12px;
  color: #999;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.mw-rss-card__title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
  color: #1a1a1a;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mw-rss-card__source {
  font-size: 12px;
  color: #aaa;
}

.mw-rss-empty {
  color: #999;
  text-align: center;
  padding: 48px 0;
  font-size: 14px;
}

/* =============================
   固定ページ (page.php)
   ============================= */
.page-content {
  padding: 40px 0 64px;
}

.page-title {
  font-size: 26px;
  font-weight: 900;
  color: #1a1a1a;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 3px solid #1a1a1a;
}

.page-body {
  font-size: 15px;
  line-height: 1.9;
  color: #333;
}

.page-body p {
  margin-bottom: 20px;
}

.page-body h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f0f0f0;
}

/* ソースフィルターバー */
.mw-rss-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.mw-rss-filter__btn {
  display: inline-block;
  padding: 5px 14px;
  border: 2px solid #ddd;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: #888;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.mw-rss-filter__btn:hover {
  border-color: #1a1a1a;
  color: #1a1a1a;
}

.mw-rss-filter__btn.is-active {
  background: #1a1a1a;
  border-color: #1a1a1a;
  color: #fff;
}

/* --- 標準 [wprss] ショートコードのスタイル上書き --- */
.mw-wprss-wrap .wprss-feed-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0 0 40px;
}

.mw-wprss-wrap .wprss-feed-item {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #eee;
  padding: 16px 18px 20px;
  transition: box-shadow 0.25s, transform 0.25s;
}

.mw-wprss-wrap .wprss-feed-item:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  transform: translateY(-3px);
}

.mw-wprss-wrap .wprss-item-title {
  display: block;
  margin-bottom: 10px;
}

.mw-wprss-wrap .wprss-item-title a {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
  color: #1a1a1a;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mw-wprss-wrap .wprss-item-title a:hover {
  color: #e74c3c;
}

.mw-wprss-wrap .wprss-item-source a,
.mw-wprss-wrap .wprss-item-date {
  font-size: 12px;
  color: #aaa;
  text-decoration: none;
}

.mw-wprss-wrap .wprss-item-source a:hover {
  color: #555;
}

/* =============================
   レスポンシブ
   ============================= */

/* タブレット */
@media (max-width: 900px) {
  .pickup-grid {
    grid-template-columns: 1fr;
  }
  .pickup-sub {
    flex-direction: row;
  }
  .pickup-sub-item {
    flex: 1;
  }
  .pickup-img {
    height: 260px;
  }
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-inner {
    flex-direction: column;
  }
  .footer-nav {
    gap: 32px;
  }
  .mw-rss-grid,
  .mw-rss-grid--col2,
  .mw-wprss-wrap .wprss-feed-items {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* スマホ */
@media (max-width: 600px) {
  .hamburger {
    display: flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #eee;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    z-index: 99;
    padding: 12px 0;
  }
  .nav.open {
    display: block;
  }
  .nav-list {
    flex-direction: column;
    gap: 0;
  }
  .nav-link {
    padding: 12px 20px;
    font-size: 15px;
    border-radius: 0;
  }

  .pickup-img {
    height: 200px;
  }
  .pickup-sub {
    flex-direction: column;
  }
  .pickup-title {
    font-size: 17px;
  }

  .article-grid {
    grid-template-columns: 1fr;
  }

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

  .footer-nav {
    flex-direction: column;
    gap: 24px;
  }
  .footer-nav ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 20px;
  }

  .single-title {
    font-size: 20px;
  }
  .mw-rss-grid,
  .mw-rss-grid--col2,
  .mw-wprss-wrap .wprss-feed-items {
    grid-template-columns: 1fr;
  }
}
