/* Card-style layout for posts */

/* Base typography for readability on desktop/mobile */
body {
  font-size: clamp(15px, 1.2vw + 11px, 18px);
  line-height: 1.75;
}

#main-content {
  font-size: 1em;
}

.post-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 16px 0 24px;
}

.post-card {
  background: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  padding: 16px;
  width: calc(50% - 8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.post-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.post-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #f3f3f3;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
}

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

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}


.post-card-title {
  font-size: 18px;
  margin: 0 0 6px;
}

.post-card-meta {
  font-size: 13px;
  color: #6b6b6b;
  margin-bottom: 10px;
}

.post-card-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.post-category {
  display: inline-block;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f2f2f2;
  color: #444;
  text-decoration: none;
}

.post-category:hover {
  background: #e6e6e6;
}

.post-categories {
  margin: 6px 0 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: #666;
}

.post-categories-label {
  color: #666;
}


/* Centered site navigation */
.site-nav {
  text-align: center;
  margin: 12px 0 20px;
  font-size: clamp(14px, 1vw + 10px, 17px);
}

.site-nav a {
  margin: 0 6px;
  text-decoration: none;
}

@media (max-width: 900px) {
  .post-card {
    width: 100%;
  }
}

/* アフィリエイトカードのスタイル */
.affiliate-card {
  border: 1px solid #e0e0e0;
  border-left: 5px solid #2ecc71; /* 左側に緑のアクセントライン */
  border-radius: 6px;
  padding: 18px;
  margin: 25px 0;
  background-color: #f9f9f9;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.card-label {
  font-size: 0.75rem;
  background: #2ecc71;
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: bold;
}
.card-title {
  margin: 10px 0 5px 0 !important;
  color: #333;
  font-size: 1.15rem;
}
.card-context {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 15px;
}
.card-button {
  display: inline-block;
  background: #2ecc71;
  color: white !important;
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none !important;
  font-size: 0.9rem;
  font-weight: bold;
  transition: background 0.2s;
}
.card-button:hover {
  background: #27ae60;
}

/* 画像付きカード用の追加スタイル */
.card-image-wrapper {
  background-color: #eee;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* スマホ表示の時は縦並びにする（レスポンシブ対応） */
@media (max-width: 576px) {
  .card-inner {
    flex-direction: column;
    align-items: flex-start !important;
  }
  .card-image-wrapper {
    flex: 0 0 auto !important;
    width: 100%;
    max-height: 150px;
  }
  .card-image-wrapper img {
    max-height: 150px !important;
  }
}
