@charset "UTF-8";
/*
    Template: swell
    Theme Name: SWELL CHILD
    Theme URI: https://swell-theme.com/
    Description: SWELLの子テーマ
    Version: 1.0.0
    Author: LOOS WEB STUDIO
    Author URI: https://loos-web-studio.com/

    License: GNU General Public License
    License URI: http://www.gnu.org/licenses/gpl.html
*/

.p-post__img__img,
.p-post__link--internal--1__img{
    display:block;
    max-width:400px;
    margin:20px auto;
    padding:10px 0;
}

#post-link-2{
    background:#f5f5f5;
    padding:10px;
}

.p-post__wrap .p-post__link--internal--1__img{
       display:block;
    max-width:150px;
    margin:20px auto;
    padding:10px 0; 
}


.post_content > h2:first-child,
.post_content div > h2:first-child {
  margin-top: 40px !important;
  margin-bottom: 10px !important;
}

.post_content > h3:first-child,
.post_content div > h3:first-child {
  margin-top: 30px !important;
margin-bottom: 10px !important;
}


/* 全体レイアウト */
.c-posts.c-posts--1 {
  margin-top: 1.25rem;
}

.c-posts--1__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--gap);
  padding: 0;
  margin: 0;
  list-style: none;
}

/* カード */
.c-posts--1__list__item {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
  position: relative;
}

/* 既存の odd/even スタイルを無効化（もしテーマ側で色が付いていたら） */
.c-posts--1__item--even,
.c-posts--1__list--odd {
  background: var(--c-bg) !important;
}

/* クリック領域を広げる */
.c-posts--1__link,
.c-posts--1__link--title {
  text-decoration: none;
  color: inherit;
}

/* サムネイル */
.c-posts--1__thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9; /* 画像の比率が不揃いでも綺麗に見せる */
  background: #f3f4f6;
}

.c-posts--1__thumb__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}

/* テキスト領域 */
.c-posts--1__header {
  padding: 12px 14px 14px;
  color: var(--c-text);
}

/* カテゴリバッジ */
.c-posts--1__category {
  display: inline-block;
  font-size: 12px;
  line-height: 1;
  color: var(--c-accent);
  background: var(--c-accent-weak);
  border: 1px solid rgba(37,99,235,.15);
  border-radius: 999px;
  padding: 6px 10px;
  margin-bottom: 8px;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.c-posts--1__category:hover {
  background: #dbeafe;
  border-color: rgba(37,99,235,.25);
}

/* タイトル */
.c-posts--1__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  margin: 4px 0 6px;
}
.c-posts--1__title a {
  display: -webkit-box;
  -webkit-line-clamp: 2; /* 2行で省略 */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 説明文 */
.c-posts--1__description {
  font-size: 13px;
  line-height: 1.6;
  color: var(--c-muted);
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* 必要なら 3 に */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 日付 */
.c-posts--1__date {
  font-size: 12px;
  color: var(--c-muted);
}

/* ホバー効果（カード全体） */
.c-posts--1__list__item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: rgba(0,0,0,.06);
}
.c-posts--1__list__item:hover .c-posts--1__thumb__img {
  transform: scale(1.05);
}

/* 画像だけの<p><a>空タグ対策（テーマの出力癖で混入してるので潰す） */
.c-posts--1__list__item p:empty,
.c-posts--1__list__item p > a:empty {
  display: none !important;
}

/* コンテナ幅が狭い時は2列→1列に自動で落ちるが、最小幅をちょい広げたい場合 */
@media (max-width: 420px) {
  .c-posts--1__list {
    grid-template-columns: 1fr;
  }
}

/* ダークモード（任意） */
@media (prefers-color-scheme: dark) {
  :root {
    --c-bg: #0b0c0f;
    --c-text: #e5e7eb;
    --c-muted: #9ca3af;
    --c-border: #1f2937;
    --c-accent-weak: rgba(37,99,235,.15);
    --shadow: 0 8px 24px rgba(0,0,0,.35);
  }
}