/* ============================
 * 子テーマ: style.css
 * ============================*/

/* テーマ情報 */
/*
Theme Name: JIN Child (福祉ブログ用)
Template: jin
*/

@import url("../jin/style.css");

/* 全要素のボックスサイズ設定 */
*, *::before, *::after {
  box-sizing: border-box;
}

/* 基本スタイル */
body {
  margin: 0;
  padding: 0;
  font-family: 'Noto Sans JP', sans-serif;
  background-color: #f7f9fc;
  color: #333;
  line-height: 1.6;
}
h1, h2, h3, p {
  margin: 0;
  padding: 0;
}
ul {
  margin: 0;
  padding-left: 1.5em;
  list-style: disc;
}
li {
  margin-bottom: 0.5em;
}
a {
  color: #5a94ce;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* レイアウト */
.content-area {
  display: flex;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}
.content-area #main-content {
  flex: 1;
  position: relative;
  z-index: 2;
}
.content-area .sidebar {
  width: 300px;
}

/* ヒーローセクション */
.hero {
  background: linear-gradient(135deg, #C7D989 0%, #E7F2BD 25%, #F2E744 50%, #F2955E 75%, #F2F2F2 100%);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 60px 20px;
  text-align: center;
  margin: 40px auto;
  max-width: 800px;
  color: #2c3e50;
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-size: 2.75rem;
  margin-bottom: 16px;
}
.hero p {
  font-size: 1.25rem;
}

/* 最新記事一覧 */
.post-list {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 60px auto;
  position: relative;
  z-index: 3;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.post-card {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.post-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* 最新記事の画像に枠をつける */
.post-card img {
  width: 100% !important;
  height: auto !important;
  display: block !important;
  border: 4px solid #f5f5f5 !important;
  border-radius: 10px !important;
  padding: 4px !important;
  box-sizing: border-box !important;
  background-color: #fff !important;
  transition: box-shadow 0.3s ease !important;
}

.post-card img:hover {
  box-shadow: 0 6px 15px rgba(49,112,143,0.6) !important;
}

.post-card h2 {
  font-size: 1.2rem;
  margin: 16px;
  color: #2c3e50;
}
.post-card p {
  font-size: 0.95rem;
  color: #444;
  margin: 0 16px 16px;
  line-height: 1.6;
}
.post-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* サイドバーの縦書き解除 */
.sidebar,
.sidebar * {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  transform: none !important;
  white-space: normal !important;
  word-break: break-word !important;
  display: block !important;
  width: auto !important;
}

/* サイドバーリスト */
.sidebar ul {
  list-style: none;
  padding-left: 0;
}
.sidebar li {
  margin-bottom: 0.5em;
}

/* サイドバーカテゴリ */
.sidebar .widget_categories ul,
.sidebar .widget_categories li {
  width: auto !important;
  max-width: 100%;
  display: block;
  padding: 0.3em 0;
  margin: 0;
  line-height: 1.5;
  word-wrap: break-word;
}
.sidebar .widget_categories a {
  display: inline-block;
  padding: 4px 8px;
  background-color: #f0f0f0;
  border-radius: 4px;
  text-decoration: none;
  color: #333;
}
.sidebar .widget_categories a:hover {
  background-color: #e0e0e0;
  color: #000;
}

/* カテゴリーグリッド */
.categories {
  margin: 40px 0;
}
.categories h2 {
  font-size: 1.5rem;
  color: #31708f;
  margin-bottom: 16px;
}
.categories-grid-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}
.category-card {
  background: #ffffff;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  text-align: center;
}
.category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.category-card .card-name {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 4px;
}
.category-card .card-count {
  font-size: 0.875rem;
  color: #666;
}

/* フッター */
.site-footer {
  background-color: #ffffff;
  padding: 24px 0;
  text-align: center;
  color: #999;
  font-size: 0.875rem;
}

/* モバイル対応 */
@media (max-width: 767px) {
  body {
    padding: 0 12px;
  }
  .sidebar .widget_recent_entries img,
  .sidebar .widget_recommended img {
    border: 2px solid #31708f;
    border-radius: 6px;
    padding: 2px;
    box-sizing: border-box;
  }
  .sidebar img {
    border: 2px solid #31708f;
    border-radius: 6px;
    padding: 2px;
    box-sizing: border-box;
  }
}
/* ウィジェットの最新記事・おすすめ記事画像に影をつける */
.sidebar .widget_recent_entries img,
.sidebar .widget_recommended img {
  border: 2px solid #dcdcdc;
  border-radius: 6px;
  padding: 2px;
  box-sizing: border-box;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); /* 影を追加 */
  transition: box-shadow 0.3s ease;
}

.sidebar .widget_recent_entries img:hover,
.sidebar .widget_recommended img:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); /* ホバー時の影を強調 */
}
/* 最新記事・おすすめ記事の画像に影を付ける */
.sidebar .widget_recent_entries img,
.sidebar .widget_recommended img,
.sidebar .widget img {
  border: 2px solid #dcdcdc;
  border-radius: 6px;
  padding: 2px;
  box-sizing: border-box;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: box-shadow 0.3s ease;
  display: block;
  max-width: 100%;
  height: auto;
}

.sidebar .widget_recent_entries img:hover,
.sidebar .widget_recommended img:hover,
.sidebar .widget img:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}
