/*
 Theme Name: CardPress v1.7
 Theme URI: https://example.com/
 Description: カード型一覧＋注目キーワード＋記事下に新着・人気記事ブロック、フッターに最新・カテゴリ・タグリンクを備えたシンプルブログテーマ（サムネ拡大＆フッター見出し装飾版）。
 Author: KENJI & ChatGPT
 Version: 1.7
 License: GNU General Public License v2 or later
 License URI: https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain: cardpress-v17
*/

html, body { margin:0; padding:0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, "Yu Gothic", "游ゴシック体", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #333;
  background-color: #f5f5f7;
}
a { color:#0070c9; text-decoration:none; }
a:hover { text-decoration:underline; }

.site {
  max-width:1120px;
  margin:0 auto;
  padding:0 16px 40px;
  background:#fff;
}

.site-header,
.site-footer {
  padding:16px 0;
  border-bottom:1px solid #eee;
}
.site-footer {
  border-top:1px solid #eee;
  border-bottom:none;
  margin-top:24px;
  font-size:0.8rem;
  color:#999;
}

/* header main */
.site-header-main {
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:flex-end;
}
.site-header-branding { flex:1 1 auto; }
.site-title { margin:0; font-size:1.4rem; font-weight:700; }
.site-title a { color:#222; }
.site-description { margin:4px 0 0; font-size:0.8rem; color:#777; }
.site-header-search { flex:0 0 260px; }

/* search */
.search-form { display:flex; gap:6px; align-items:center; }
.search-field {
  flex:1 1 auto;
  padding:6px 10px;
  font-size:0.9rem;
  border-radius:999px;
  border:1px solid #ddd;
}
.search-field:focus {
  outline:none;
  border-color:#0070c9;
  box-shadow:0 0 0 2px rgba(0,112,201,0.15);
}
.search-submit {
  flex:0 0 auto;
  padding:6px 10px;
  font-size:0.85rem;
  border-radius:999px;
  border:none;
  background:#0070c9;
  color:#fff;
  cursor:pointer;
}
.search-submit:hover { opacity:.9; }

/* header keywords */
.site-header-keywords { margin-top:10px; }
.top-keywords {
  padding:10px 12px 8px;
  border-radius:8px;
  border:1px solid #eee;
  background:#fafafa;
}
.top-keywords-title {
  margin:0 0 6px;
  font-size:0.9rem;
  font-weight:700;
}
.top-keywords-list {
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.top-keywords-list li { margin:0; padding:0; }
.top-keywords-list a {
  display:inline-block;
  font-size:0.8rem;
  padding:4px 10px;
  border-radius:999px;
  background:#f2f2f2;
  color:#555;
}
.top-keywords-list a:hover { background:#e0e0e0; }

/* nav */
.site-navigation { margin-top:10px; font-size:0.9rem; }
.site-navigation .menu {
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-wrap:wrap;
  gap:10px 18px;
}
.site-navigation .menu li { margin:0; padding:0; }
.site-navigation .menu a { color:#555; }
.site-navigation .menu a:hover { color:#0070c9; }

.site-main { padding-top:10px; }

/* card grid */
.card-list-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(260px,1fr));
  gap:20px;
  margin:16px 0 24px;
}
.card-style-post {
  position:relative;
  border-radius:10px;
  border:1px solid #e3e3e3;
  background:#fff;
  box-shadow:0 1px 2px rgba(15,15,15,0.05);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.card-style-post-image { position:relative; height:170px; overflow:hidden; }
.card-style-post-image a img {
  display:block;
  width:100%;
  height:170px;
  object-fit:cover;
  transition:transform .3s ease, opacity .3s ease;
}
.card-style-post-image a img:hover { opacity:.9; transform:scale(1.02); }

.card-style-post-category {
  position:absolute;
  top:10px;
  left:10px;
  padding:2px 10px;
  border-radius:999px;
  font-size:0.7rem;
  background:#ff5c7a;
  color:#fff;
  z-index:2;
}
.card-style-post-category a { color:#fff; }

.card-style-post-date {
  position:absolute;
  right:10px;
  bottom:8px;
  font-size:0.75rem;
  color:#f5f5f5;
  text-shadow:0 0 4px rgba(0,0,0,0.5);
}

.card-style-post-content { padding:12px 14px 10px; }
.card-style-post-title { margin:0 0 6px; font-size:0.95rem; font-weight:700; }
.card-style-post-title a { color:#222; }
.card-style-post-title a:hover { text-decoration:underline; }
.card-style-post-text { margin:0 0 8px; font-size:0.85rem; color:#666; }

.card-style-post-tags { margin-top:4px; }
.card-style-post-tags-list {
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  font-size:0.7rem;
}
.card-style-post-tags-list li { margin:0; padding:0; }
.card-style-post-tags-list a {
  display:inline-block;
  padding:2px 8px;
  border-radius:999px;
  background:#f5f5f5;
  color:#555;
}
.card-style-post-tags-list a:hover { background:#e5e5e5; }

/* pagination */
.pagination-wrapper { margin:10px 0 30px; text-align:center; }
.pagination-wrapper .page-numbers {
  display:inline-block;
  margin:0 4px;
  padding:6px 10px;
  font-size:0.85rem;
  border-radius:4px;
  border:1px solid #ddd;
  color:#555;
}
.pagination-wrapper .page-numbers.current {
  background:#0070c9;
  border-color:#0070c9;
  color:#fff;
}
.pagination-wrapper .page-numbers:hover { background:#f0f0f0; }

/* single */
.post-inner { padding:16px 0 24px; }
.post-title { margin:0 0 8px; font-size:1.6rem; }
.post-meta { margin:0 0 16px; font-size:0.8rem; color:#888; }
.post-meta a { color:#888; }
.post-content h2 {
  margin:26px 0 12px;
  padding:8px 12px;
  border-left:4px solid #ff5c7a;
  border-bottom:1px solid #ffe0ea;
  background:#fff8fb;
  font-size:1.1rem;
}
.post-content h3 {
  margin:22px 0 8px;
  padding:4px 10px;
  border-left:3px solid #0070c9;
  background:#f5f9ff;
  font-size:1rem;
}
.post-content img { max-width:100%; height:auto; }

/* under post */
.post-bottom {
  border-top:1px solid #eee;
  padding-top:18px;
  margin-top:22px;
}
.post-bottom-section { margin-bottom:24px; }
.post-bottom-section-title {
  margin:0 0 10px;
  padding:6px 10px;
  border-radius:4px;
  border-left:4px solid #0070c9;
  background:#f5f9ff;
  font-size:1rem;
  font-weight:700;
}
.post-bottom-recent .post-bottom-section-title {
  border-left-color:#28a745;
  background:#f3fff6;
}
.post-bottom-popular .post-bottom-section-title {
  border-left-color:#ff9800;
  background:#fff7e5;
}

.post-list-horizontal {
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(260px,1fr));
  gap:16px;
}
.post-list-item {
  display:flex;
  gap:10px;
  text-decoration:none;
  color:inherit;
}
.post-list-thumb {
  flex:0 0 140px;
  height:100px;
  border-radius:8px;
  overflow:hidden;
  background:#eee;
}
.post-list-thumb img {
  width:100%;
  height:100%;
  object-fit:cover;
}
.post-list-text { flex:1 1 auto; }
.post-list-title {
  margin:0 0 6px;
  font-size:0.9rem;
  font-weight:600;
}
.post-list-meta {
  margin:0;
  font-size:0.78rem;
  color:#999;
}

/* footer columns */
.footer-cols {
  display:flex;
  flex-wrap:wrap;
  gap:20px;
  margin-bottom:12px;
}
.footer-col {
  flex:1 1 220px;
}
.footer-col-title {
  margin:0 0 8px;
  padding:6px 10px;
  font-size:0.85rem;
  font-weight:700;
  border-radius:16px;
  border-left:4px solid #0070c9;
  background:#f5f9ff;
}
.footer-col-latest .footer-col-title {
  border-left-color:#28a745;
  background:#f3fff6;
}
.footer-col-cats .footer-col-title {
  border-left-color:#ff9800;
  background:#fff7e5;
}
.footer-col-tags .footer-col-title {
  border-left-color:#e91e63;
  background:#ffe7f1;
}

.footer-link-list {
  list-style:none;
  margin:0;
  padding:0;
}
.footer-link-list li {
  margin:0 0 4px;
  padding:0;
}
.footer-link-list a {
  font-size:0.8rem;
  color:#555;
}
.footer-link-list a:hover { text-decoration:underline; }

.footer-tag-list {
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.footer-tag-list li { margin:0; padding:0; }
.footer-tag-list a {
  display:inline-block;
  padding:2px 8px;
  font-size:0.75rem;
  border-radius:999px;
  background:#f5f5f5;
  color:#555;
}
.footer-tag-list a:hover { background:#e5e5e5; }

.footer-copy {
  margin:6px 0 0;
  font-size:0.75rem;
  color:#aaa;
}

/* back to top */
.back-to-top {
  position:fixed;
  right:16px;
  bottom:20px;
  width:44px;
  height:44px;
  border-radius:50%;
  border:none;
  background:#0070c9;
  color:#fff;
  font-size:20px;
  line-height:44px;
  text-align:center;
  cursor:pointer;
  box-shadow:0 4px 10px rgba(0,0,0,0.18);
  opacity:0;
  visibility:hidden;
  transform:translateY(8px);
  transition:opacity .25s ease, visibility .25s ease, transform .1s ease;
  z-index:999;
}
.back-to-top.is-visible {
  opacity:1;
  visibility:visible;
  transform:translateY(0);
}
.back-to-top:hover { transform:translateY(-1px); }
.back-to-top:active { transform:translateY(1px); }

/* responsive */
@media (max-width:767px) {
  .site { padding:0 10px 32px; }
  .site-header-main { flex-direction:column; align-items:stretch; }
  .site-header-search { flex:1 1 auto; }
  .card-style-post-image,
  .card-style-post-image a img { height:150px; }
  .card-list-grid { grid-template-columns:minmax(0,1fr); }
  .post-list-horizontal { grid-template-columns:minmax(0,1fr); }
  .post-list-thumb {
    flex:0 0 120px;
    height:86px;
  }
}
