/* ========================
   にわとも - 共通スタイル
======================== */

:root {
  --green:  #43A047;
  --green-dark: #2E7D32;
  --orange: #FF7043;
  --blue:   #29B6F6;
  --bg:     #FAFAFA;
  --text:   #333333;
  --text-light: #777;
  --border: #E0E0E0;
  --card-bg: #fff;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }

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

/* ========================
   ヘッダー
======================== */

.site-header {
  background: var(--green);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 16px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-logo {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  flex-shrink: 0;
}

.site-logo span { font-size: 1.3em; }

.header-search {
  flex: 1;
  max-width: 360px;
  position: relative;
}

.header-search input {
  width: 100%;
  padding: 7px 36px 7px 12px;
  border-radius: 20px;
  border: none;
  font-size: 0.88rem;
  background: rgba(255,255,255,0.2);
  color: #fff;
  outline: none;
}

.header-search input::placeholder { color: rgba(255,255,255,0.7); }

.header-search input:focus { background: rgba(255,255,255,0.3); }

.search-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  pointer-events: none;
}

.header-nav {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.header-nav a {
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s;
}

.header-nav a:hover { background: rgba(255,255,255,0.2); }

@media (max-width: 640px) {
  .header-nav { display: none; }
  .header-search { max-width: none; }
}

/* ========================
   ナビバー（スマホ用）
======================== */

.mobile-nav {
  display: none;
  background: var(--green-dark);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-nav::-webkit-scrollbar { display: none; }

.mobile-nav-inner {
  display: flex;
  padding: 0 8px;
  white-space: nowrap;
}

.mobile-nav a {
  display: inline-block;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.85);
  font-weight: 600;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  color: #fff;
  border-bottom-color: var(--orange);
}

@media (max-width: 640px) { .mobile-nav { display: block; } }

/* ========================
   メインコンテンツ
======================== */

main { max-width: 1000px; margin: 0 auto; padding: 0 16px 40px; }

/* ========================
   ヒーロー
======================== */

.hero {
  background: linear-gradient(135deg, #E8F5E9 0%, #E1F5FE 100%);
  border-radius: var(--radius);
  padding: 40px 24px;
  margin: 20px 0 32px;
  text-align: center;
}

.hero-emoji { font-size: 3rem; margin-bottom: 12px; }

.hero h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 8px;
  line-height: 1.4;
}

.hero p {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 20px;
}

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

.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 24px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}

.btn:active { transform: scale(0.97); }

.btn-green {
  background: var(--green);
  color: #fff;
  box-shadow: 0 3px 10px rgba(67,160,71,0.35);
}

.btn-green:hover { background: var(--green-dark); }

.btn-outline {
  background: #fff;
  color: var(--green);
  border: 2px solid var(--green);
}

.btn-outline:hover { background: #E8F5E9; }

/* ========================
   セクション共通
======================== */

.section { margin-bottom: 40px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-head h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.1em;
  background: var(--green);
  border-radius: 2px;
  flex-shrink: 0;
}

.see-all {
  font-size: 0.82rem;
  color: var(--green);
  font-weight: 600;
}

.see-all:hover { text-decoration: underline; }

/* ========================
   カードグリッド
======================== */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

@media (max-width: 480px) {
  .card-grid { grid-template-columns: 1fr; }
}

/* 記事カード */
.article-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.article-card-thumb {
  height: 160px;
  background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  position: relative;
}

.article-card-thumb .cat-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--green);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
}

.article-card-body { padding: 14px 16px; }

.article-card-body h3 {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 6px;
}

.article-card-meta {
  font-size: 0.78rem;
  color: var(--text-light);
}

/* ========================
   ガイドカード
======================== */

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

@media (max-width: 480px) {
  .guide-grid { grid-template-columns: repeat(2, 1fr); }
}

.guide-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 16px;
  text-align: center;
  transition: transform 0.15s;
  cursor: pointer;
}

.guide-card:hover { transform: translateY(-2px); }

.guide-card-icon { font-size: 2.2rem; margin-bottom: 8px; }

.guide-card h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 4px; }

.guide-card p { font-size: 0.78rem; color: var(--text-light); line-height: 1.5; }

/* ========================
   植物図鑑カテゴリ
======================== */

.plant-cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 500px) {
  .plant-cat-grid { grid-template-columns: repeat(4, 1fr); }
}

.plant-cat-card {
  border-radius: var(--radius);
  padding: 24px 12px;
  text-align: center;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s;
  color: #fff;
  box-shadow: var(--shadow);
}

.plant-cat-card:hover { transform: translateY(-2px); filter: brightness(1.05); }

.plant-cat-card .cat-icon { font-size: 2.4rem; margin-bottom: 8px; }

.cat-vegetable { background: linear-gradient(135deg, #66BB6A, #43A047); }
.cat-flower    { background: linear-gradient(135deg, #F06292, #E91E63); }
.cat-indoor    { background: linear-gradient(135deg, #4DB6AC, #00897B); }
.cat-herb      { background: linear-gradient(135deg, #AED581, #7CB342); }

/* ========================
   ツールカード（大）
======================== */

.tool-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: transform 0.15s;
  cursor: pointer;
}

.tool-card:hover { transform: translateY(-2px); }

.tool-card-icon {
  font-size: 3rem;
  width: 72px;
  height: 72px;
  background: #E8F5E9;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tool-card-body { flex: 1; }

.tool-card-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.tool-card-body p {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 12px;
}

.tool-badge {
  display: inline-block;
  background: var(--green);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 12px;
}

/* ========================
   フッター
======================== */

.site-footer {
  background: #333;
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 28px 16px;
  font-size: 0.82rem;
  margin-top: 40px;
}

.site-footer .footer-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.site-footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.site-footer .footer-links a {
  color: rgba(255,255,255,0.6);
  transition: color 0.15s;
}

.site-footer .footer-links a:hover { color: #fff; }
