/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Hiragino Kaku Gothic ProN","Hiragino Sans",Meiryo,"Yu Gothic",sans-serif;
  font-size: 14px; color: #333; background: #fff; line-height: 1.7;
}
a { color: #333; text-decoration: none; }
a:hover { color: #1a6dc5; }
img { max-width: 100%; height: auto; display: block; }

/* ===== Layout ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.site-wrap { display: flex; gap: 28px; padding: 20px 0 40px; }
.main-col { flex: 1; min-width: 0; }
.side-col { width: 300px; flex-shrink: 0; }

/* ===== Header ===== */
.site-header { border-bottom: 1px solid #e0e0e0; padding: 10px 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.site-logo { display: inline-flex; align-items: center; text-decoration: none; gap: 6px; }
.logo-badge {
  font-size: 20px; font-weight: 900; color: #fff;
  background: #ff4b7e; border-radius: 5px;
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1; flex-shrink: 0;
}
.logo-word {
  font-size: 22px; font-weight: 900; letter-spacing: -0.5px; color: #1a2a4a;
}
.site-footer .logo-word { color: #fff; }
.site-footer .footer-logo { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 16px; }
.site-tagline { font-size: 11px; color: #888; letter-spacing: 0.3px; }

/* ===== Global Nav ===== */
.global-nav-wrap {
  border-bottom: 2px solid #dde4ee;
  background: #fff;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.global-nav-wrap::-webkit-scrollbar { display: none; }
.global-nav {
  display: flex; max-width: 1200px; margin: 0 auto;
  padding: 0 12px;
}
.global-nav a {
  display: inline-block; padding: 9px 13px;
  font-size: 13px; color: #444; white-space: nowrap;
  border-radius: 4px; margin: 3px 1px;
}
.global-nav a:hover,
.global-nav a.current-cat,
.global-nav a.current-menu-item {
  background: #1a6dc5; color: #fff;
}

/* ===== Search Section ===== */
.search-band {
  background: #f6f7f9; border-bottom: 1px solid #e4e8ef;
  padding: 18px 0; text-align: center;
}
.search-lead { font-size: 13px; color: #555; margin-bottom: 10px; }
.search-lead .count { font-size: 22px; font-weight: 900; color: #1a6dc5; }
.search-form {
  display: flex; max-width: 580px; margin: 0 auto; gap: 8px;
}
.search-form input[type="text"] {
  flex: 1; border: 1px solid #c8cfe0; border-radius: 5px;
  padding: 10px 14px; font-size: 14px; outline: none;
  font-family: inherit;
}
.search-form input[type="text"]:focus { border-color: #1a6dc5; }
.search-form button {
  background: #1a6dc5; color: #fff; border: none;
  border-radius: 5px; padding: 10px 22px;
  font-size: 14px; font-weight: bold; cursor: pointer;
  font-family: inherit;
}
.search-form button:hover { background: #155bb5; }

/* ===== Breadcrumb ===== */
.breadcrumb {
  padding: 8px 0 12px; font-size: 12px; color: #999;
}
.breadcrumb a { color: #999; }
.breadcrumb a:hover { color: #1a6dc5; }
.breadcrumb .sep { margin: 0 5px; }

/* ===== Category Header ===== */
.cat-hero {
  position: relative; border-radius: 8px; overflow: hidden;
  margin-bottom: 14px; height: 200px;
}
.cat-hero-img {
  width: 100%; height: 200px; object-fit: cover;
}
.cat-hero-bg {
  width: 100%; height: 200px;
  background: linear-gradient(135deg, #1a4a8c 0%, #0d2f5e 100%);
}
.cat-hero-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.42);
  display: flex; align-items: center; justify-content: center;
}
.cat-hero-title {
  color: #fff; font-size: 26px; font-weight: 900;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  letter-spacing: 0.5px;
}
.cat-desc {
  font-size: 13px; color: #555; line-height: 1.9;
  margin-bottom: 16px; padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}

/* ===== Article List ===== */
.list-heading {
  font-size: 14px; font-weight: bold; color: #1a6dc5;
  border-left: 4px solid #1a6dc5;
  padding: 4px 0 4px 10px;
  margin-bottom: 14px;
}
.post-list { border-top: 1px solid #e8e8e8; }
.post-list-item {
  display: flex; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid #e8e8e8;
}
.post-list-thumb {
  flex-shrink: 0; width: 160px; height: 107px;
  border-radius: 4px; overflow: hidden; background: #f0f0f0;
}
.post-list-thumb img {
  width: 100%; height: 100%; object-fit: cover;
}
.post-list-thumb .no-img {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: #bbb; font-size: 11px;
}
.post-list-body { flex: 1; min-width: 0; }
.post-list-title {
  font-size: 16px; font-weight: bold; line-height: 1.5;
  margin-bottom: 8px;
}
.post-list-title a { color: #222; }
.post-list-title a:hover { color: #1a6dc5; }
.post-list-meta { font-size: 12px; color: #999; margin-bottom: 4px; }
.post-list-author { font-size: 12px; color: #999; }

/* ===== Pagination ===== */
.pagination, .nav-links {
  display: flex; gap: 5px; justify-content: center;
  flex-wrap: wrap; margin-top: 24px; padding-bottom: 8px;
}
.page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 6px;
  border: 1px solid #dde; border-radius: 4px;
  font-size: 13px; color: #444; text-decoration: none;
}
a.page-numbers:hover { background: #e8f0fe; border-color: #1a6dc5; color: #1a6dc5; }
.page-numbers.current {
  background: #1a6dc5; border-color: #1a6dc5;
  color: #fff; font-weight: bold;
}
.page-numbers.dots { border: none; color: #888; }

/* ===== Sidebar ===== */
.widget { margin-bottom: 28px; }
.widget-heading {
  font-size: 14px; font-weight: bold; color: #222;
  border-left: 4px solid #1a6dc5;
  padding: 4px 0 4px 10px; margin-bottom: 14px;
}
.widget-posts { list-style: none; }
.widget-post {
  display: flex; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid #f0f0f0;
  align-items: flex-start;
}
.widget-post:last-child { border-bottom: none; }
.widget-post-thumb {
  flex-shrink: 0; width: 76px; height: 52px;
  border-radius: 3px; overflow: hidden; background: #eee;
}
.widget-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.widget-post-title {
  font-size: 12px; color: #333; line-height: 1.55;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 3; -webkit-box-orient: vertical;
}
.widget-post-title a { color: #333; }
.widget-post-title a:hover { color: #1a6dc5; }
.widget-more {
  text-align: right; margin-top: 8px;
}
.widget-more a { font-size: 12px; color: #1a6dc5; }

/* ===== Single Post ===== */
.single-title {
  font-size: 22px; font-weight: 900; line-height: 1.55;
  margin-bottom: 12px;
}
.single-meta {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 12px; color: #999; margin-bottom: 14px;
}
.author-bar {
  display: flex; align-items: center; gap: 10px;
  background: #f6f7f9; border-radius: 6px;
  padding: 12px 14px; margin-bottom: 20px;
}
.author-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0;
}
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-name { font-size: 13px; font-weight: bold; }
.author-bio { font-size: 11px; color: #888; margin-top: 2px; }

.post-content { font-size: 15px; line-height: 2; }
.post-content p { margin-bottom: 18px; }
.post-content img { border-radius: 6px; margin: 20px auto; }
.post-content h2 {
  font-size: 17px; font-weight: bold;
  background: #eef3fc; border-left: 5px solid #1a6dc5;
  padding: 12px 16px; margin: 30px 0 16px;
  border-radius: 0 5px 5px 0;
}
.post-content h3 {
  font-size: 15px; font-weight: bold;
  border-bottom: 2px solid #e4e8ef;
  padding-bottom: 8px; margin: 24px 0 12px;
}
.post-content ul, .post-content ol { padding-left: 24px; margin-bottom: 16px; }
.post-content li { margin-bottom: 6px; }
.post-content blockquote {
  border-left: 4px solid #dde4ee; padding: 10px 16px;
  color: #666; margin: 16px 0; font-style: italic;
}

.toc {
  background: #f6f7f9; border: 1px solid #dde4ee;
  border-radius: 6px; padding: 16px 20px; margin: 24px 0;
}
.toc-label { font-size: 13px; font-weight: bold; margin-bottom: 10px; }
.toc ol { padding-left: 20px; font-size: 13px; }
.toc li { padding: 3px 0; border-bottom: 1px dotted #ddd; }
.toc li:last-child { border-bottom: none; }
.toc a { color: #1a6dc5; }

.share-row { display: flex; gap: 10px; margin: 24px 0; }
.share-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: 5px;
  color: #fff; font-size: 13px; font-weight: bold;
  text-decoration: none; flex: 1; justify-content: center;
}
.share-fb { background: #1877f2; }
.share-tw { background: #1da1f2; }
.share-line { background: #00c300; }

/* ===== Homepage ===== */
.home-featured { margin-bottom: 30px; border-radius: 8px; overflow: hidden; position: relative; }
.home-featured a { display: block; }
.home-featured-img {
  width: 100%; height: 300px; object-fit: cover;
}
.home-featured-bg {
  width: 100%; height: 300px;
  background: linear-gradient(135deg,#1a4a8c,#0d2f5e);
}
.home-featured-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.72));
  padding: 24px;
}
.home-featured-title {
  color: #fff; font-size: 18px; font-weight: bold;
  line-height: 1.55; text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.home-section { margin-bottom: 32px; }
.home-section-head {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 2px solid #1a6dc5; padding-bottom: 8px; margin-bottom: 14px;
}
.home-section-title {
  font-size: 17px; font-weight: bold; color: #1a6dc5;
}
.home-section-more { font-size: 12px; color: #888; }
.home-section-more a { color: #888; }
.home-section-more a:hover { color: #1a6dc5; }

.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.home-card { display: flex; gap: 10px; }
.home-card-thumb {
  flex-shrink: 0; width: 120px; height: 80px;
  border-radius: 4px; overflow: hidden; background: #eee;
}
.home-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.home-card-title {
  font-size: 13px; font-weight: bold; color: #222;
  line-height: 1.55; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
}
.home-card-title a { color: #222; }
.home-card-title a:hover { color: #1a6dc5; }

/* ===== Writers ===== */
.writers-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.writer-card { text-align: center; }
.writer-card a { display: block; text-decoration: none; }
.writer-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  overflow: hidden; margin: 0 auto 8px;
  background: #eee;
}
.writer-avatar img { width: 100%; height: 100%; object-fit: cover; }
.writer-name { font-size: 12px; font-weight: bold; color: #333; margin-bottom: 2px; }
.writer-catch { font-size: 11px; color: #888; }

/* ===== Footer ===== */
.site-footer {
  background: #1a1a1a; color: #bbb;
  padding: 36px 0 16px; margin-top: 0;
}
.footer-grid {
  display: grid; grid-template-columns: 1fr auto;
  gap: 40px; margin-bottom: 28px;
}
.footer-logo { font-size: 20px; font-weight: 900; color: #fff; margin-bottom: 16px; }
.footer-logo span { background: #1a6dc5; padding: 2px 6px; border-radius: 4px; }
.footer-col-title { font-size: 13px; color: #fff; font-weight: bold; margin-bottom: 10px; }
.footer-cats {
  display: grid; grid-template-columns: repeat(3, auto);
  gap: 6px 24px;
}
.footer-cats a { font-size: 12px; color: #999; }
.footer-cats a:hover { color: #fff; }
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-links a { font-size: 12px; color: #999; }
.footer-links a:hover { color: #fff; }
.footer-copy {
  border-top: 1px solid #333; padding-top: 14px;
  text-align: center; font-size: 12px; color: #555;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .site-wrap { flex-direction: column; }
  .side-col { width: 100%; }
  .home-grid { grid-template-columns: 1fr; }
  .writers-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 640px) {
  .post-list-thumb { width: 110px; height: 74px; }
  .header-inner { flex-direction: column; align-items: flex-start; gap: 4px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-cats { grid-template-columns: repeat(2, auto); }
  .writers-grid { grid-template-columns: repeat(3, 1fr); }
  .single-title { font-size: 18px; }
  .share-row { flex-direction: column; }
}
@media (max-width: 400px) {
  .writers-grid { grid-template-columns: repeat(2, 1fr); }
}
