/*
Theme Name: 害獣駆除の解決ナビ
Theme URI: https://gaiju-kaiketsu.com
Author: gaiju-kaiketsu
Description: 害獣駆除アフィリエイトブログ専用オリジナルテーマ
Version: 1.0.0
Text Domain: gaiju-theme
*/

/* ==============================
   Reset & Base
   ============================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif;
  color: #333;
  background: #f5f7fa;
  line-height: 1.8;
  word-break: break-word;
  overflow-wrap: break-word;
}

a {
  color: #1a5276;
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: #2e86c1;
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==============================
   Layout
   ============================== */
.site-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.content-area {
  display: flex;
  gap: 30px;
  padding: 30px 0;
}

.main-content {
  flex: 1;
  min-width: 0;
}

.sidebar {
  width: 300px;
  flex-shrink: 0;
}

/* ==============================
   Header
   ============================== */
.site-header {
  background: linear-gradient(135deg, #1a3a5c 0%, #1a5276 100%);
  color: #fff;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo-icon {
  width: 36px;
  height: 36px;
  background: #27ae60;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.site-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.site-title a {
  color: #fff;
  text-decoration: none;
}

.site-title a:hover {
  color: #a3d9a5;
  text-decoration: none;
}

/* Navigation */
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 0;
}

.main-nav a {
  color: rgba(255,255,255,0.85);
  padding: 20px 16px;
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s;
  border-bottom: 3px solid transparent;
}

.main-nav a:hover,
.main-nav .current-menu-item a {
  color: #fff;
  background: rgba(255,255,255,0.08);
  border-bottom-color: #27ae60;
  text-decoration: none;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
}

/* ==============================
   Breadcrumb
   ============================== */
.breadcrumb {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 20px;
  font-size: 0.82rem;
  color: #888;
}

.breadcrumb a {
  color: #888;
}

.breadcrumb a:hover {
  color: #1a5276;
}

.breadcrumb-separator {
  margin: 0 6px;
  color: #ccc;
}

/* ==============================
   Article Card
   ============================== */
.article-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  margin-bottom: 24px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.article-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.article-card-inner {
  display: flex;
  gap: 0;
}

.article-card-thumb {
  width: 260px;
  flex-shrink: 0;
  background: #e8ecf0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 0.85rem;
}

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

.article-card-body {
  padding: 20px 24px;
  flex: 1;
}

.article-card-category {
  display: inline-block;
  background: #1a5276;
  color: #fff;
  font-size: 0.72rem;
  padding: 2px 10px;
  border-radius: 3px;
  margin-bottom: 8px;
  font-weight: 600;
}

.article-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 8px;
}

.article-card-title a {
  color: #222;
}

.article-card-title a:hover {
  color: #1a5276;
  text-decoration: none;
}

.article-card-meta {
  font-size: 0.78rem;
  color: #999;
}

.article-card-excerpt {
  font-size: 0.88rem;
  color: #666;
  margin-top: 8px;
  line-height: 1.6;
}

/* ==============================
   Single Post
   ============================== */
.single-post-container {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  padding: 40px 48px;
  margin-bottom: 30px;
}

.entry-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #eee;
}

.entry-category {
  display: inline-block;
  background: #1a5276;
  color: #fff;
  font-size: 0.75rem;
  padding: 3px 12px;
  border-radius: 3px;
  margin-bottom: 12px;
  font-weight: 600;
}

.entry-title {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.45;
  color: #1a1a1a;
  margin-bottom: 12px;
}

.entry-meta {
  font-size: 0.82rem;
  color: #999;
  display: flex;
  gap: 16px;
}

.entry-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Post Content */
.entry-content {
  font-size: 1rem;
  line-height: 1.9;
  color: #444;
}

.entry-content p {
  margin-bottom: 1.6em;
}

.entry-content h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #1a3a5c;
  margin: 2.5em 0 1em;
  padding: 12px 16px;
  border-left: 5px solid #27ae60;
  background: #f0f7f0;
  border-radius: 0 6px 6px 0;
  line-height: 1.45;
}

.entry-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a3a5c;
  margin: 2em 0 0.8em;
  padding-bottom: 8px;
  border-bottom: 2px solid #dde8d6;
}

.entry-content h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #333;
  margin: 1.5em 0 0.6em;
}

.entry-content ul,
.entry-content ol {
  margin: 1em 0 1.6em 1.5em;
}

.entry-content li {
  margin-bottom: 0.5em;
  line-height: 1.7;
}

.entry-content ul li {
  list-style: disc;
}

.entry-content strong {
  color: #222;
  font-weight: 700;
}

.entry-content blockquote {
  border-left: 4px solid #1a5276;
  background: #f8f9fa;
  padding: 16px 20px;
  margin: 1.5em 0;
  font-style: italic;
  color: #555;
  border-radius: 0 6px 6px 0;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.9rem;
}

.entry-content table th,
.entry-content table td {
  border: 1px solid #ddd;
  padding: 10px 14px;
  text-align: left;
}

.entry-content table th {
  background: #1a5276;
  color: #fff;
  font-weight: 600;
}

.entry-content table tr:nth-child(even) {
  background: #f8f9fa;
}

.entry-content table tr:hover {
  background: #eef4f8;
}

/* CTA Box */
.cta-box {
  background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
  border: 2px solid #f0c040;
  border-radius: 10px;
  padding: 24px 28px;
  margin: 2em 0;
  text-align: center;
}

.cta-box-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #856404;
  margin-bottom: 12px;
}

.cta-box p {
  font-size: 0.92rem;
  color: #666;
  margin-bottom: 16px;
}

.cta-button {
  display: inline-block;
  background: #e67e22;
  color: #fff;
  padding: 12px 36px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 3px 8px rgba(230,126,34,0.3);
}

.cta-button:hover {
  background: #d35400;
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(230,126,34,0.4);
}

/* ==============================
   Sidebar
   ============================== */
.sidebar-widget {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  margin-bottom: 24px;
  overflow: hidden;
}

.sidebar-widget-title {
  background: #1a3a5c;
  color: #fff;
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 700;
}

.sidebar-widget-content {
  padding: 16px;
}

.sidebar-widget-content ul {
  list-style: none;
}

.sidebar-widget-content li {
  border-bottom: 1px solid #f0f0f0;
}

.sidebar-widget-content li:last-child {
  border-bottom: none;
}

.sidebar-widget-content li a {
  display: block;
  padding: 10px 4px;
  font-size: 0.88rem;
  color: #444;
  transition: all 0.2s;
}

.sidebar-widget-content li a:hover {
  color: #1a5276;
  background: #f8f9fa;
  text-decoration: none;
  padding-left: 8px;
}

/* ==============================
   Pagination
   ============================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 32px 0;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
}

.pagination a {
  background: #fff;
  color: #1a5276;
  border: 1px solid #ddd;
}

.pagination a:hover {
  background: #1a5276;
  color: #fff;
  text-decoration: none;
  border-color: #1a5276;
}

.pagination .current {
  background: #1a5276;
  color: #fff;
  border: 1px solid #1a5276;
}

/* ==============================
   Footer
   ============================== */
.site-footer {
  background: #1a2a3a;
  color: rgba(255,255,255,0.7);
  padding: 40px 0 0;
  margin-top: 40px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-widget-title {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #27ae60;
  display: inline-block;
}

.footer-widget ul {
  list-style: none;
}

.footer-widget li {
  margin-bottom: 6px;
}

.footer-widget a {
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-widget a:hover {
  color: #a3d9a5;
  text-decoration: none;
}

.footer-bottom {
  text-align: center;
  padding: 20px 0;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

/* ==============================
   Page / 404
   ============================== */
.page-header-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1a3a5c;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 3px solid #27ae60;
}

.not-found-content {
  text-align: center;
  padding: 60px 20px;
}

.not-found-content h1 {
  font-size: 3rem;
  color: #1a5276;
  margin-bottom: 16px;
}

/* ==============================
   TOC (Table of Contents) - placeholder
   ============================== */
.toc-box {
  background: #f8fafb;
  border: 1px solid #dde8f0;
  border-radius: 8px;
  padding: 20px 24px;
  margin: 1.5em 0 2em;
}

.toc-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a3a5c;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.toc-box ol {
  margin: 0;
  padding-left: 1.2em;
  counter-reset: toc;
}

.toc-box li {
  margin-bottom: 6px;
  font-size: 0.88rem;
  line-height: 1.5;
}

/* ==============================
   Responsive
   ============================== */
@media (max-width: 768px) {
  .content-area {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
  }

  .single-post-container {
    padding: 24px 20px;
  }

  .entry-title {
    font-size: 1.3rem;
  }

  .entry-content h2 {
    font-size: 1.15rem;
  }

  .article-card-inner {
    flex-direction: column;
  }

  .article-card-thumb {
    width: 100%;
    height: 180px;
  }

  .footer-widgets {
    grid-template-columns: 1fr;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #1a3a5c;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  }

  .main-nav.active {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
  }

  .main-nav a {
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
}

@media (max-width: 480px) {
  html {
    font-size: 15px;
  }

  .site-title {
    font-size: 1rem;
  }

  .header-inner {
    height: 56px;
  }

  .entry-content h2 {
    font-size: 1.08rem;
    padding: 10px 12px;
  }
}

/* ==============================
   WordPress Core Styles
   ============================== */
.wp-block-table {
  margin: 1.5em 0;
}

.wp-block-table table {
  width: 100%;
  border-collapse: collapse;
}

.alignleft {
  float: left;
  margin-right: 1.5em;
  margin-bottom: 1em;
}

.alignright {
  float: right;
  margin-left: 1.5em;
  margin-bottom: 1em;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute;
  height: 1px;
  width: 1px;
  overflow: hidden;
}


/* ==============================
   Sidebar - Redesigned
   ============================== */
.sidebar-widget {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border: 1px solid #eee;
}

.sidebar-widget-title {
  font-size: 1rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #1a5276;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar-icon {
  font-size: 1.1em;
}

/* おすすめ記事 */
.sidebar-recommend-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-recommend-list li {
  margin-bottom: 0;
  border-bottom: 1px solid #f0f0f0;
}

.sidebar-recommend-list li:last-child {
  border-bottom: none;
}

.sidebar-recommend-list li a {
  display: block;
  padding: 10px 8px;
  color: #333;
  text-decoration: none;
  font-size: 0.88rem;
  line-height: 1.6;
  transition: background 0.2s, color 0.2s;
  border-radius: 6px;
}

.sidebar-recommend-list li a:hover {
  background: #f0f7fb;
  color: #1a5276;
}

.recommend-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: middle;
}

.recommend-label-popular {
  background: #e74c3c;
  color: #fff;
}

/* カテゴリー */
.sidebar-category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-category-list li {
  margin-bottom: 0;
  border-bottom: none;
}

.sidebar-category-list li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  color: #333;
  text-decoration: none;
  font-size: 0.88rem;
  border-radius: 8px;
  transition: background 0.2s;
}

.sidebar-category-list li a:hover {
  background: #f0f7fb;
}

.cat-icon {
  font-size: 1.15em;
  flex-shrink: 0;
}

.cat-count {
  margin-left: auto;
  font-size: 0.75rem;
  color: #999;
  background: #f5f5f5;
  padding: 1px 8px;
  border-radius: 10px;
}

/* プロフィール */
.sidebar-profile-content {
  text-align: center;
}

.sidebar-profile-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #333;
  margin-bottom: 8px;
}

.sidebar-profile-desc {
  font-size: 0.82rem;
  color: #666;
  line-height: 1.7;
  margin-bottom: 12px;
}

.sidebar-profile-link {
  display: inline-block;
  font-size: 0.82rem;
  color: #1a5276;
  text-decoration: none;
  font-weight: 600;
}

.sidebar-profile-link:hover {
  text-decoration: underline;
}

/* CTA */
.sidebar-cta {
  background: linear-gradient(135deg, #1a5276, #27ae60) !important;
  border: none !important;
  padding: 0 !important;
}

.sidebar-cta-inner {
  padding: 24px 20px;
  text-align: center;
  color: #fff;
}

.sidebar-cta-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: #fff;
}

.sidebar-cta-text {
  font-size: 0.82rem;
  line-height: 1.7;
  margin-bottom: 16px;
  opacity: 0.92;
  color: #fff;
}

.sidebar-cta-button {
  display: inline-block;
  background: #fff;
  color: #1a5276;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 28px;
  border-radius: 30px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.sidebar-cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

/* サイドバーウィジェット内のリスト初期化 */
.sidebar-widget-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-widget-content li {
  border-bottom: none;
  padding: 0;
  margin: 0;
}

.sidebar-widget-content li:last-child {
  border-bottom: none;
}

/* ==============================
   Footer Navigation Menu
   ============================== */
.footer-nav {
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 20px;
}

.footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer-menu li a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.2s;
}

.footer-menu li a:hover {
  color: rgba(255,255,255,0.9);
}