/*
Theme Name: CampNavi
Theme URI: https://camp-gear-navi.com
Description: キャンプ道具ナビ オリジナルテーマ
Author: CampNavi
Version: 1.0.0
*/

/* =============================================
   CSS VARIABLES
============================================= */
:root {
  --green-900: #0F2D18;
  --green-800: #1A4526;
  --green-700: #1E4D2B;
  --green-600: #2C6E3F;
  --green-500: #3A8C52;
  --green-400: #4FA86A;
  --green-100: #E8F5EC;
  --green-50:  #F2FAF4;
  --brown-600: #7A4F2A;
  --brown-400: #A67C52;
  --amazon:    #FF9900;
  --amazon-dk: #E68A00;
  --white:     #FFFFFF;
  --gray-50:   #FAFAF7;
  --gray-100:  #F3F3EE;
  --gray-200:  #E8E8E2;
  --gray-400:  #B0B0A8;
  --gray-600:  #6B6B63;
  --gray-800:  #2C2C28;
  --text:      #1A1A16;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.07);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.14);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
  --max-width:  1100px;
  --font-ja: 'Hiragino Kaku Gothic ProN','Hiragino Sans','Noto Sans JP','Yu Gothic',sans-serif;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-ja);
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text);
  background: var(--gray-50);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-600); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--green-800); }
ul { list-style: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* =============================================
   HEADER
============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 100%);
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

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

.site-logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.site-logo .logo-icon { font-size: 1.5rem; }
.site-logo .logo-sub {
  font-size: 0.7rem;
  font-weight: 400;
  color: rgba(255,255,255,0.65);
  display: block;
  line-height: 1.2;
}

/* Global Nav */
.global-nav { display: flex; gap: 2px; }
.global-nav a {
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.global-nav a:hover {
  background: rgba(255,255,255,0.12);
  color: var(--white);
}

/* Hamburger */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}

/* =============================================
   HERO SECTION
============================================= */
.hero {
  background: linear-gradient(160deg, var(--green-900) 0%, var(--green-700) 50%, var(--green-500) 100%);
  padding: 72px 20px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20'%3E%3Cpath d='M0 20 L50 0 L100 20' fill='rgba(255,255,255,0.03)'/%3E%3C/svg%3E") bottom/cover no-repeat;
}

.hero-emoji { font-size: 3.5rem; margin-bottom: 16px; display: block; }

.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.hero p {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: rgba(255,255,255,0.75);
  margin-bottom: 36px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.hero-cats a {
  background: rgba(255,255,255,0.15);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 7px 18px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
  transition: background var(--transition);
}
.hero-cats a:hover {
  background: rgba(255,255,255,0.28);
  color: var(--white);
}

/* =============================================
   SECTION TITLES
============================================= */
.section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--green-800);
  margin-bottom: 24px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--green-500);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* =============================================
   CARD GRID
============================================= */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.post-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.post-card-thumb {
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--gray-100);
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.post-card:hover .post-card-thumb img { transform: scale(1.06); }

.post-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card-cat {
  display: inline-block;
  background: var(--green-600);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}

.post-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 10px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-title a { color: inherit; }
.post-card:hover .post-card-title a { color: var(--green-700); }

.post-card-meta {
  font-size: 0.78rem;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 8px;
}
.post-card-meta time::before { content: '🗓 '; }

/* =============================================
   LAYOUT (main + sidebar)
============================================= */
.content-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 20px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

.content-wrap.full-width {
  grid-template-columns: 1fr;
  max-width: 800px;
}

/* =============================================
   SIDEBAR
============================================= */
.sidebar { position: sticky; top: 80px; }

.sidebar-widget {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 24px;
}

.sidebar-widget-title {
  background: linear-gradient(90deg, var(--green-800), var(--green-600));
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 12px 18px;
  letter-spacing: 0.03em;
}

.sidebar-widget-body { padding: 16px 18px; }

.sidebar-cat-list li {
  border-bottom: 1px solid var(--gray-100);
}
.sidebar-cat-list li:last-child { border-bottom: none; }
.sidebar-cat-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 0.88rem;
  color: var(--gray-800);
  font-weight: 500;
  transition: color var(--transition), padding-left var(--transition);
}
.sidebar-cat-list a:hover { color: var(--green-600); padding-left: 4px; }
.sidebar-cat-list .count {
  background: var(--green-100);
  color: var(--green-700);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
}

.sidebar-recent li {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}
.sidebar-recent li:last-child { border-bottom: none; }
.sidebar-recent img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.sidebar-recent .rec-title {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sidebar-recent .rec-title:hover { color: var(--green-600); }

/* =============================================
   SINGLE POST
============================================= */
.single-hero {
  width: 100%;
  max-height: 460px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
}
.single-hero img {
  width: 100%;
  height: 460px;
  object-fit: cover;
}

.single-cat {
  display: inline-block;
  background: var(--green-600);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 14px;
}

.single-title {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 900;
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 16px;
  border-left: 5px solid var(--green-500);
  padding-left: 16px;
}

.single-meta {
  display: flex;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--gray-600);
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gray-200);
}

/* TOC */
.toc-box {
  background: var(--green-50);
  border: 1px solid #C8E6D0;
  border-radius: var(--radius-md);
  padding: 22px 26px;
  margin: 32px 0;
}
.toc-box h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--green-800);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.toc-box ol {
  list-style: decimal;
  padding-left: 20px;
}
.toc-box li { margin-bottom: 6px; }
.toc-box a {
  font-size: 0.88rem;
  color: var(--green-700);
  font-weight: 500;
}
.toc-box a:hover { color: var(--green-900); text-decoration: underline; }

/* Article Body */
.article-body { font-size: 1rem; line-height: 1.9; color: var(--text); }

.article-body h2 {
  background: linear-gradient(90deg, var(--green-800), var(--green-600));
  color: var(--white);
  padding: 13px 22px;
  border-radius: var(--radius-md);
  font-size: 1.15rem;
  font-weight: 800;
  margin: 44px 0 20px;
  letter-spacing: 0.02em;
}

.article-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--green-800);
  padding: 9px 14px;
  border-left: 4px solid var(--green-500);
  border-bottom: 1px solid var(--gray-200);
  margin: 30px 0 14px;
}

.article-body p { margin-bottom: 1.4em; }

.article-body ul, .article-body ol {
  padding-left: 24px;
  margin-bottom: 1.4em;
}
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: 6px; }

.article-body strong { color: var(--green-800); }

/* Amazon Button */
.article-body a[href*="amazon.co.jp"] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--amazon), var(--amazon-dk));
  color: var(--white) !important;
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 3px 10px rgba(255,153,0,0.4);
  transition: transform var(--transition), box-shadow var(--transition);
  margin: 6px 0;
}
.article-body a[href*="amazon.co.jp"]::before { content: '🛒'; }
.article-body a[href*="amazon.co.jp"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255,153,0,0.5);
}

/* =============================================
   SHARE BUTTONS
============================================= */
.share-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 36px 0;
  padding-top: 28px;
  border-top: 2px dashed var(--gray-200);
}
.share-btn {
  flex: 1;
  min-width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--white) !important;
  transition: opacity var(--transition), transform var(--transition);
}
.share-btn:hover { opacity: 0.88; transform: translateY(-2px); color: var(--white) !important; }
.share-btn.x     { background: #000; }
.share-btn.line  { background: #06C755; }
.share-btn.copy  { background: var(--gray-600); cursor: pointer; }

/* =============================================
   RELATED POSTS
============================================= */
.related-posts { margin-top: 48px; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.related-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.related-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.related-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.related-card-body { padding: 12px 14px; }
.related-card-title {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-card:hover .related-card-title { color: var(--green-600); }

/* =============================================
   BREADCRUMB
============================================= */
.breadcrumb {
  padding: 12px 0;
  font-size: 0.8rem;
  color: var(--gray-600);
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--gray-600); }
.breadcrumb a:hover { color: var(--green-600); }
.breadcrumb .sep { color: var(--gray-400); }

/* =============================================
   PAGINATION
============================================= */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 40px 0;
}
.pagination a, .pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid var(--gray-200);
  color: var(--text);
  transition: background var(--transition), color var(--transition);
}
.pagination a:hover { background: var(--green-100); color: var(--green-700); border-color: var(--green-400); }
.pagination .current { background: var(--green-600); color: var(--white); border-color: var(--green-600); }

/* =============================================
   FOOTER
============================================= */
.site-footer {
  background: var(--green-900);
  color: rgba(255,255,255,0.75);
  margin-top: 80px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 20px 32px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
}

.footer-brand .brand-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.6);
}

.footer-nav h4 {
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.footer-nav ul li { margin-bottom: 8px; }
.footer-nav ul a {
  font-size: 0.83rem;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}
.footer-nav ul a:hover { color: var(--white); }

.footer-copy {
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
  padding: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* =============================================
   BACK TO TOP
============================================= */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 46px;
  height: 46px;
  background: var(--green-600);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--transition), transform var(--transition);
  cursor: pointer;
  z-index: 50;
  text-decoration: none;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--green-800); color: var(--white); }

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 900px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .content-wrap { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .posts-grid { grid-template-columns: 1fr; }
  .global-nav { display: none; }
  .menu-toggle { display: flex; }
  .global-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--green-900);
    padding: 12px;
    gap: 4px;
    z-index: 99;
  }
  .hero { padding: 48px 16px 40px; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .related-grid { grid-template-columns: 1fr; }
  .single-title { font-size: 1.3rem; }
  .share-buttons { flex-direction: column; }
}
