/*
Theme Name: 胡蝶蘭ナビ
Theme URI: https://example.com/kochoran-navi
Author: 胡蝶蘭ナビ運営者
Author URI: https://example.com
Description: 胡蝶蘭メディア専用WordPressテーマ。EC運営者が運営する胡蝶蘭情報メディア向けに最適化されたデザイン。収益最大化のためのCTA配置、SEO対策済み、レスポンシブ対応。
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kochoran-navi
Tags: blog, one-column, two-columns, right-sidebar, custom-colors, custom-menu, featured-images, translation-ready
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
*/

/* ============================================
   胡蝶蘭ナビ Theme Styles
   Design: Editorial Elegance
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;500;700&family=Noto+Sans+JP:wght@400;500;700&display=swap');

:root {
  --c-primary: #1B4332;
  --c-primary-light: #2D6A4F;
  --c-primary-pale: #D8F3DC;
  --c-accent: #C9A96E;
  --c-accent-light: #E8D5A8;
  --c-accent-dark: #A07D3F;
  --c-bg: #FEFCF8;
  --c-bg-alt: #F5F1EA;
  --c-bg-card: #FFFFFF;
  --c-text: #2C2C2C;
  --c-text-light: #6B6B6B;
  --c-text-muted: #9E9E9E;
  --c-border: #E8E4DC;
  --c-border-light: #F0ECE4;
  --c-cta: #1B4332;
  --c-cta-hover: #2D6A4F;
  --font-serif: 'Noto Serif JP', 'Georgia', serif;
  --font-sans: 'Noto Sans JP', 'Helvetica Neue', sans-serif;
  --max-w: 1200px;
  --sidebar-w: 340px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
  --transition: 0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-sans); color: var(--c-text); background: var(--c-bg); line-height: 1.8; }
a { color: var(--c-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--c-accent-dark); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

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

/* --- Header --- */
.site-header { background: #fff; border-bottom: 1px solid var(--c-border); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.site-logo { font-family: var(--font-serif); font-size: 24px; font-weight: 700; color: var(--c-primary); letter-spacing: 0.02em; }
.site-logo span { color: var(--c-accent); }
.nav-main { display: flex; gap: 28px; align-items: center; }
.nav-main a { font-size: 14px; font-weight: 500; color: var(--c-text); padding: 6px 0; border-bottom: 2px solid transparent; transition: all var(--transition); }
.nav-main a:hover, .nav-main a.current-menu-item a { color: var(--c-primary); border-bottom-color: var(--c-primary); }
.nav-cta { display: inline-flex; align-items: center; gap: 6px; background: var(--c-cta); color: #fff !important; padding: 8px 20px; border-radius: 6px; font-size: 13px; font-weight: 500; border-bottom: none !important; }
.nav-cta:hover { background: var(--c-cta-hover); color: #fff !important; }
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--c-text); margin: 5px 0; transition: var(--transition); }
.mobile-menu { display: none; background: #fff; padding: 16px 24px; border-bottom: 1px solid var(--c-border); }
.mobile-menu.active { display: block; }
.mobile-menu a { display: block; padding: 10px 0; font-size: 15px; font-weight: 500; color: var(--c-text); border-bottom: 1px solid var(--c-border-light); }

/* --- Hero --- */
.hero { background: linear-gradient(135deg, var(--c-primary) 0%, #2D6A4F 100%); color: #fff; padding: 80px 0 70px; text-align: center; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -50%; right: -20%; width: 600px; height: 600px; background: radial-gradient(circle, rgba(201,169,110,0.15) 0%, transparent 70%); border-radius: 50%; }
.hero h1 { font-family: var(--font-serif); font-size: 36px; font-weight: 700; margin-bottom: 16px; letter-spacing: 0.04em; line-height: 1.5; position: relative; }
.hero p { font-size: 16px; opacity: 0.9; max-width: 560px; margin: 0 auto 32px; line-height: 1.8; position: relative; }
.hero-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; position: relative; }

/* --- Buttons --- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 32px; border-radius: 8px; font-size: 15px; font-weight: 500; cursor: pointer; border: none; transition: all var(--transition); font-family: var(--font-sans); }
.btn-white { background: #fff; color: var(--c-primary); }
.btn-white:hover { background: var(--c-primary-pale); color: var(--c-primary); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline-white { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.5); }
.btn-outline-white:hover { background: rgba(255,255,255,0.1); border-color: #fff; color: #fff; }
.btn-primary { background: var(--c-cta); color: #fff; }
.btn-primary:hover { background: var(--c-cta-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); color: #fff; }
.btn-accent { background: var(--c-accent); color: #fff; }
.btn-accent:hover { background: var(--c-accent-dark); color: #fff; }
.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-outline { background: transparent; color: var(--c-primary); border: 1.5px solid var(--c-border); }
.btn-outline:hover { border-color: var(--c-primary); background: var(--c-primary-pale); }

/* --- Sections --- */
.section { padding: 60px 0; }
.section-alt { background: var(--c-bg-alt); }
.section-title { font-family: var(--font-serif); font-size: 24px; font-weight: 700; text-align: center; margin-bottom: 12px; color: var(--c-primary); }
.section-divider { width: 40px; height: 3px; background: var(--c-accent); margin: 0 auto 40px; border-radius: 2px; }

/* --- Purpose Nav --- */
.purpose-nav { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.purpose-card { text-align: center; padding: 24px 12px; border-radius: var(--radius-lg); background: var(--c-bg-card); border: 1px solid var(--c-border-light); transition: all var(--transition); cursor: pointer; display: block; }
.purpose-card:hover { border-color: var(--c-primary); transform: translateY(-3px); box-shadow: var(--shadow-md); color: var(--c-text); }
.purpose-icon { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; font-size: 22px; font-weight: 700; }
.purpose-card .label { font-size: 13px; font-weight: 500; color: var(--c-text); }

/* --- Article Cards --- */
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.article-grid-2 { grid-template-columns: repeat(2, 1fr); }
.article-grid-1 { grid-template-columns: 1fr; }
.article-card { background: var(--c-bg-card); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--c-border-light); transition: all var(--transition); display: block; color: var(--c-text); }
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--c-text); }
.article-card-thumb { width: 100%; height: 180px; background: var(--c-bg-alt); display: flex; align-items: center; justify-content: center; color: var(--c-text-muted); font-size: 13px; overflow: hidden; position: relative; }
.article-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-card-body { padding: 20px; }
.article-card-cat { display: inline-block; font-size: 11px; font-weight: 500; padding: 3px 10px; border-radius: 4px; margin-bottom: 10px; }
.cat-tsuhan { background: #FFF0E6; color: #C0392B; }
.cat-oiwai { background: #E6F0FF; color: #2471A3; }
.cat-knowledge { background: #F0E6FF; color: #7D3C98; }
.cat-sodatekata { background: #E6FFE6; color: #1B7A1B; }
.cat-gift { background: #FFF8E6; color: #B7950B; }
.article-card-title { font-family: var(--font-serif); font-size: 16px; font-weight: 500; line-height: 1.6; margin-bottom: 8px; }
.article-card-meta { font-size: 12px; color: var(--c-text-muted); }
.article-card-rank { position: absolute; top: 12px; left: 12px; background: var(--c-accent); color: #fff; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
.article-card-row { display: grid; grid-template-columns: 240px 1fr; overflow: hidden; }
.article-card-row .article-card-thumb { height: 100%; min-height: 160px; }
.article-card-row .article-card-excerpt { font-size: 13px; color: var(--c-text-light); line-height: 1.7; margin-top: 8px; }

/* --- Budget Nav --- */
.budget-nav { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.budget-btn { padding: 12px 28px; border-radius: 30px; border: 1.5px solid var(--c-border); background: #fff; font-size: 14px; font-weight: 500; color: var(--c-text); cursor: pointer; transition: all var(--transition); font-family: var(--font-sans); }
.budget-btn:hover, .budget-btn.active { border-color: var(--c-primary); background: var(--c-primary); color: #fff; }

/* --- CTA Banner --- */
.cta-banner { background: linear-gradient(135deg, var(--c-primary) 0%, #2D6A4F 100%); border-radius: var(--radius-lg); padding: 48px 40px; text-align: center; color: #fff; position: relative; overflow: hidden; }
.cta-banner::after { content: ''; position: absolute; bottom: -30px; right: -30px; width: 200px; height: 200px; background: radial-gradient(circle, rgba(201,169,110,0.2) 0%, transparent 70%); border-radius: 50%; }
.cta-banner h3 { font-family: var(--font-serif); font-size: 22px; margin-bottom: 12px; position: relative; }
.cta-banner p { font-size: 14px; opacity: 0.9; margin-bottom: 24px; position: relative; }
.cta-banner .btn { position: relative; }

/* --- Profile Card --- */
.profile-card { display: flex; gap: 20px; align-items: flex-start; background: var(--c-bg-card); border: 1px solid var(--c-border-light); border-radius: var(--radius-lg); padding: 28px; }
.profile-avatar { width: 80px; height: 80px; border-radius: 50%; background: var(--c-primary-pale); display: flex; align-items: center; justify-content: center; font-family: var(--font-serif); font-size: 28px; color: var(--c-primary); font-weight: 700; flex-shrink: 0; overflow: hidden; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-info h4 { font-family: var(--font-serif); font-size: 16px; margin-bottom: 4px; }
.profile-info .title { font-size: 12px; color: var(--c-accent-dark); font-weight: 500; margin-bottom: 8px; }
.profile-info p { font-size: 13px; color: var(--c-text-light); line-height: 1.7; }

/* --- Two Column Layout --- */
.layout-2col { display: grid; grid-template-columns: 1fr var(--sidebar-w); gap: 48px; align-items: start; }
.main-content { min-width: 0; }

/* --- Sidebar --- */
.sidebar { position: sticky; top: 90px; }
.sidebar-widget { background: var(--c-bg-card); border: 1px solid var(--c-border-light); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 24px; }
.sidebar-title { font-family: var(--font-serif); font-size: 16px; font-weight: 700; color: var(--c-primary); margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--c-accent); }
.sidebar-cta { background: linear-gradient(135deg, var(--c-primary) 0%, #2D6A4F 100%); color: #fff; border: none; text-align: center; }
.sidebar-cta .sidebar-title { color: #fff; border-bottom-color: var(--c-accent); }
.sidebar-cta p { font-size: 13px; opacity: 0.9; margin-bottom: 16px; }
.sidebar-list li { padding: 10px 0; border-bottom: 1px solid var(--c-border-light); }
.sidebar-list li:last-child { border-bottom: none; }
.sidebar-list a { display: flex; gap: 12px; align-items: center; font-size: 13px; line-height: 1.5; color: var(--c-text); }
.sidebar-list a:hover { color: var(--c-primary); }
.sidebar-list .num { width: 24px; height: 24px; border-radius: 50%; background: var(--c-accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.sidebar-purpose a { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 6px; background: var(--c-bg-alt); margin-bottom: 8px; font-size: 13px; font-weight: 500; color: var(--c-text); transition: all var(--transition); }
.sidebar-purpose a:hover { background: var(--c-primary-pale); color: var(--c-primary); }

/* --- Article Single --- */
.article-header { padding: 48px 0 32px; }
.breadcrumb { font-size: 12px; color: var(--c-text-muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--c-text-muted); }
.breadcrumb a:hover { color: var(--c-primary); }
.pr-badge { display: inline-block; font-size: 11px; background: var(--c-bg-alt); color: var(--c-text-muted); padding: 2px 8px; border-radius: 4px; margin-bottom: 16px; }
.article-header h1 { font-family: var(--font-serif); font-size: 30px; font-weight: 700; line-height: 1.5; margin-bottom: 16px; }
.article-header .meta { display: flex; gap: 16px; align-items: center; font-size: 13px; color: var(--c-text-muted); flex-wrap: wrap; }
.article-hero-img { width: 100%; height: 400px; background: var(--c-bg-alt); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; color: var(--c-text-muted); margin-bottom: 40px; overflow: hidden; }
.article-hero-img img { width: 100%; height: 100%; object-fit: cover; }

/* --- Article Body (post content) --- */
.article-body { font-size: 16px; line-height: 2; }
.article-body h2 { font-family: var(--font-serif); font-size: 22px; font-weight: 700; color: var(--c-primary); margin: 48px 0 20px; padding: 16px 20px; background: var(--c-bg-alt); border-left: 4px solid var(--c-accent); border-radius: 0 var(--radius) var(--radius) 0; }
.article-body h3 { font-family: var(--font-serif); font-size: 18px; font-weight: 700; color: var(--c-text); margin: 32px 0 16px; padding-bottom: 8px; border-bottom: 1px solid var(--c-border); }
.article-body p { margin-bottom: 20px; }
.article-body table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 14px; }
.article-body th { background: var(--c-primary); color: #fff; padding: 12px 16px; text-align: left; font-weight: 500; font-size: 13px; }
.article-body td { padding: 12px 16px; border-bottom: 1px solid var(--c-border-light); }
.article-body tr:nth-child(even) td { background: var(--c-bg-alt); }
.article-body ul, .article-body ol { padding-left: 24px; margin-bottom: 20px; }
.article-body li { margin-bottom: 8px; list-style: disc; }
.article-body ol li { list-style: decimal; }
.article-body blockquote { border-left: 4px solid var(--c-accent); padding: 16px 20px; margin: 24px 0; background: var(--c-bg-alt); border-radius: 0 var(--radius) var(--radius) 0; font-style: italic; }
.article-body a { color: var(--c-primary); text-decoration: underline; }
.article-body a:hover { color: var(--c-accent-dark); }

/* --- Callout (EC運営者コメント) --- */
.callout { background: var(--c-bg-alt); border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: 24px; margin: 28px 0; position: relative; }
.callout::before { content: ''; position: absolute; top: -1px; left: 0; right: 0; height: 4px; background: var(--c-accent); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.callout-label { font-size: 12px; font-weight: 700; color: var(--c-accent-dark); margin-bottom: 8px; }
.callout p { font-size: 14px; line-height: 1.8; margin: 0; }

/* --- Product Card --- */
.product-card { border: 2px solid var(--c-border); border-radius: var(--radius-lg); padding: 24px; margin: 28px 0; display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: start; }
.product-card.featured { border-color: var(--c-accent); }
.product-img { width: 100%; height: 160px; background: var(--c-bg-alt); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; color: var(--c-text-muted); font-size: 13px; overflow: hidden; position: relative; }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-info h4 { font-family: var(--font-serif); font-size: 17px; margin-bottom: 8px; }
.product-info .price { font-size: 20px; font-weight: 700; color: #C0392B; margin-bottom: 8px; }
.product-info .price small { font-size: 13px; font-weight: 400; color: var(--c-text-muted); }
.product-info .features { font-size: 13px; color: var(--c-text-light); margin-bottom: 16px; line-height: 1.8; }
.product-buttons { display: flex; gap: 10px; flex-wrap: wrap; }

/* --- TOC --- */
.toc { background: var(--c-bg-alt); border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: 24px; margin: 32px 0; }
.toc-title { font-family: var(--font-serif); font-size: 15px; font-weight: 700; margin-bottom: 12px; color: var(--c-primary); }
.toc ol { padding-left: 20px; counter-reset: toc; }
.toc li { margin-bottom: 8px; font-size: 14px; counter-increment: toc; list-style: none; }
.toc li::before { content: counter(toc) '.'; color: var(--c-accent); font-weight: 700; margin-right: 6px; }
.toc a { color: var(--c-text); }
.toc a:hover { color: var(--c-primary); }

/* --- FAQ --- */
.faq-item { border: 1px solid var(--c-border-light); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.faq-q { padding: 16px 20px; font-weight: 500; font-size: 15px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; background: #fff; }
.faq-q::after { content: '+'; font-size: 20px; color: var(--c-accent); transition: var(--transition); }
.faq-a { padding: 0 20px 16px; font-size: 14px; line-height: 1.8; color: var(--c-text-light); display: none; }
.faq-item.open .faq-a { display: block; }
.faq-item.open .faq-q::after { content: '−'; }

/* --- Category Page --- */
.category-header { background: var(--c-primary); color: #fff; padding: 48px 0; text-align: center; }
.category-header h1 { font-family: var(--font-serif); font-size: 28px; margin-bottom: 8px; }
.category-header p { opacity: 0.85; font-size: 14px; }
.category-tabs { display: flex; gap: 0; background: #fff; border-bottom: 1px solid var(--c-border); justify-content: center; flex-wrap: wrap; }
.category-tab { padding: 14px 24px; font-size: 14px; font-weight: 500; color: var(--c-text-light); border-bottom: 3px solid transparent; cursor: pointer; transition: all var(--transition); }
.category-tab:hover, .category-tab.active { color: var(--c-primary); border-bottom-color: var(--c-primary); }

/* --- Pagination --- */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination a, .pagination span { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--radius); border: 1px solid var(--c-border); font-size: 14px; color: var(--c-text); transition: all var(--transition); }
.pagination a:hover { border-color: var(--c-primary); color: var(--c-primary); }
.pagination .current { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

/* --- Footer --- */
.site-footer { background: var(--c-primary); color: #fff; padding: 60px 0 32px; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand { font-family: var(--font-serif); font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.footer-brand span { color: var(--c-accent); }
.footer-desc { font-size: 13px; opacity: 0.7; line-height: 1.7; }
.footer-heading { font-size: 14px; font-weight: 700; margin-bottom: 16px; color: var(--c-accent-light); }
.footer-links a { display: block; font-size: 13px; color: rgba(255,255,255,0.7); padding: 4px 0; }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; text-align: center; font-size: 12px; opacity: 0.5; }
.footer-bottom a { color: inherit; }

/* --- Responsive --- */
@media (max-width: 1024px) {
  .layout-2col { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .purpose-nav { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .product-card { grid-template-columns: 1fr; }
  .article-card-row { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .hero h1 { font-size: 26px; }
  .nav-main { display: none; }
  .hamburger { display: block; }
  .article-grid { grid-template-columns: 1fr; }
  .purpose-nav { grid-template-columns: repeat(2, 1fr); }
  .hero-buttons { flex-direction: column; align-items: center; }
  .header-inner { height: 60px; }
  .site-logo { font-size: 20px; }
  .article-header h1 { font-size: 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .section { padding: 40px 0; }
  .category-tabs { justify-content: flex-start; overflow-x: auto; }
}
