/* =============================================
   マッチングアプリ婚活教科書 - メインスタイル
   ============================================= */

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

:root {
  --primary:        #F5C438;
  --primary-light:  #FFF9C4;
  --hero-bg-from:   #FFFDE7;
  --hero-bg-to:     #FFF8DC;
  --page-bg:        #F8F7F4;
  --white:          #FFFFFF;
  --text:           #1A1A2E;
  --text-muted:     #777788;
  --border:         #EBEBEB;
  --shadow-sm:      0 2px 10px rgba(0,0,0,0.07);
  --shadow-md:      0 6px 24px rgba(0,0,0,0.12);
  --radius:         12px;
  --radius-sm:      6px;
  --radius-pill:    100px;

  /* カテゴリカラー */
  --cat-profile:    #4A90D9;
  --cat-message:    #2ECC71;
  --cat-date:       #E8963C;
  --cat-app:        #9B59B6;
  --cat-exp:        #E74C3C;
  --cat-default:    #95A5A6;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'メイリオ', sans-serif;
  background: var(--page-bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 15px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* =============================================
   HEADER
   ============================================= */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 200;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.site-logo {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.logo-icon { font-size: 26px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-main { font-size: 15px; font-weight: 900; letter-spacing: -0.3px; }
.logo-sub  { font-size: 10px; color: var(--text-muted); }

.site-nav { display: flex; gap: 2px; }
.nav-link {
  padding: 6px 13px; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 700; white-space: nowrap;
  transition: background 0.2s;
}
.nav-link:hover { background: var(--primary-light); }

/* =============================================
   HERO
   ============================================= */
.hero {
  background: linear-gradient(135deg, var(--hero-bg-from) 0%, var(--hero-bg-to) 100%);
  position: relative; overflow: hidden;
}
.hero-inner {
  max-width: 1100px; margin: 0 auto; padding: 48px 24px;
  display: flex; align-items: center; gap: 32px; min-height: 380px;
}
.hero-text { flex: 1; z-index: 1; }
.hero-tagline {
  font-size: 14px; font-weight: 700; color: #B8860B;
  margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}
.hero-title {
  font-size: 30px; font-weight: 900; line-height: 1.45;
  color: var(--text); margin-bottom: 14px;
}
.hero-title .hl {
  display: inline; background: linear-gradient(transparent 60%, rgba(245,196,56,0.5) 60%);
}
.hero-desc { font-size: 13px; color: var(--text-muted); line-height: 1.9; }

.hero-visual {
  flex: 0 0 380px; position: relative;
  display: flex; justify-content: center; align-items: flex-end; height: 380px;
}
.hero-chara { max-height: 370px; max-width: 360px; width: 100%; height: auto; object-fit: contain; }
.hero-placeholder {
  width: 180px; height: 240px;
  background: rgba(255,255,255,0.65); border: 2px dashed rgba(245,196,56,0.7);
  border-radius: var(--radius); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  color: #B8860B; font-size: 13px; font-weight: 700; text-align: center;
}
.hero-placeholder-icon { font-size: 44px; }
.speech-bubble {
  position: absolute; top: 18%; left: -20px;
  background: var(--white); border: 2.5px solid var(--primary);
  border-radius: 14px; padding: 10px 16px;
  font-size: 13px; font-weight: 700; text-align: center; line-height: 1.6;
  box-shadow: var(--shadow-sm); white-space: nowrap; z-index: 2;
}
.speech-bubble::after {
  content: ''; position: absolute; bottom: -13px; right: 28px;
  border: 11px solid transparent; border-top-color: var(--primary); border-bottom: 0;
}
.speech-bubble::before {
  content: ''; position: absolute; bottom: -9px; right: 29px;
  border: 9px solid transparent; border-top-color: var(--white); border-bottom: 0; z-index: 1;
}

/* デコレーション */
.deco { position: absolute; pointer-events: none; user-select: none; }
.deco-1 { top: 12%; left: 6%;  font-size: 22px; opacity: .45; animation: dfloat 3s ease-in-out infinite; }
.deco-2 { top: 55%; left: 44%; font-size: 14px; opacity: .35; animation: dfloat 4s ease-in-out infinite reverse; }
.deco-3 { bottom: 18%; right: 18%; font-size: 18px; opacity: .4; animation: dfloat 3.5s ease-in-out infinite; }
.deco-4 { top: 8%;  right: 32%; font-size: 10px; opacity: .4; animation: dfloat 2.8s ease-in-out infinite .5s; }
@keyframes dfloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* =============================================
   PAGE LAYOUT  (ホーム / 記事ページ共通)
   ============================================= */
.page-wrap {
  max-width: 1100px; margin: 0 auto; padding: 32px 24px;
  display: grid; grid-template-columns: 1fr 300px; gap: 28px;
}
.main-col {}
.side-col { display: flex; flex-direction: column; gap: 24px; }

/* Section ヘッダー */
.sec-title {
  font-size: 17px; font-weight: 900;
  padding-bottom: 10px; margin-bottom: 18px;
  border-bottom: 2.5px solid var(--primary);
  display: flex; align-items: center; gap: 8px;
}

/* =============================================
   ARTICLE CARD (横並び)
   ============================================= */
.cards { display: flex; flex-direction: column; gap: 14px; }

.article-card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  overflow: hidden; transition: transform .22s, box-shadow .22s;
}
.article-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.card-link { display: flex; text-decoration: none; color: inherit; }

.card-thumb {
  flex: 0 0 116px; position: relative; overflow: hidden;
  background: #F0F0EE;
}
.card-thumb img { width: 116px; height: 90px; object-fit: cover; }
.thumb-ph {
  width: 116px; height: 90px;
  background: linear-gradient(135deg, #FFF9C4, #FFE082);
  display: flex; align-items: center; justify-content: center;
  font-size: 34px;
}
.new-badge {
  position: absolute; top: 5px; left: 5px;
  background: #FF4757; color: #fff;
  font-size: 9px; font-weight: 900; padding: 2px 7px;
  border-radius: var(--radius-pill); letter-spacing: .5px;
}

.card-body {
  flex: 1; padding: 12px 15px;
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
}
.card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-date { font-size: 11px; color: var(--text-muted); }
.card-title {
  font-size: 14px; font-weight: 700; line-height: 1.55;
  transition: color .2s;
}
.article-card:hover .card-title { color: var(--cat-profile); }
.card-excerpt {
  font-size: 12px; color: var(--text-muted); line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

/* =============================================
   CATEGORY BADGE
   ============================================= */
.cat-badge {
  display: inline-block; font-size: 10px; font-weight: 900;
  padding: 2px 9px; border-radius: var(--radius-pill); color: #fff;
  white-space: nowrap;
}
.cat-プロフィール { background: var(--cat-profile); }
.cat-メッセージ   { background: var(--cat-message); }
.cat-デート       { background: var(--cat-date); }
.cat-アプリ比較   { background: var(--cat-app); }
.cat-体験談       { background: var(--cat-exp); }
.cat-default      { background: var(--cat-default); }

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar-card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); border: 1px solid var(--border); overflow: hidden;
}
.sidebar-head {
  padding: 11px 16px; font-size: 13px; font-weight: 900; color: #fff;
  background: linear-gradient(135deg, #4A90D9, #6BB8F5);
  display: flex; align-items: center; gap: 7px;
}
.sidebar-body { padding: 14px 16px; }

/* Profile card */
.prof-card { text-align: center; padding: 20px 16px; }
.prof-avatar {
  width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 10px;
  background: linear-gradient(135deg, #FFF9C4, #FFE082);
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; border: 3px solid var(--primary);
}
.prof-name { font-size: 15px; font-weight: 900; margin-bottom: 6px; }
.prof-desc { font-size: 12px; color: var(--text-muted); line-height: 1.75; }

/* App recommendation */
.app-item {
  padding: 11px 0; border-bottom: 1px solid var(--border);
}
.app-item:last-child { border-bottom: none; padding-bottom: 4px; }
.app-name { font-size: 13px; font-weight: 900; margin-bottom: 3px; }
.app-desc { font-size: 11px; color: var(--text-muted); line-height: 1.6; margin-bottom: 8px; }
.app-btn {
  display: inline-block; background: #4AABDB; color: #fff;
  font-size: 11px; font-weight: 900; padding: 5px 18px;
  border-radius: var(--radius-pill); transition: background .2s, transform .2s;
}
.app-btn:hover { background: #3A8BBB; transform: translateY(-1px); }

/* Popular articles in sidebar */
.popular-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.popular-item:last-child { border-bottom: none; }
.popular-num {
  flex: 0 0 24px; height: 24px; border-radius: 50%;
  background: var(--primary); color: var(--text);
  font-size: 12px; font-weight: 900; display: flex; align-items: center; justify-content: center;
}
.popular-title { font-size: 12px; font-weight: 700; line-height: 1.55; }
.popular-title a:hover { color: var(--cat-profile); }

/* =============================================
   ARTICLE PAGE
   ============================================= */
.article-wrap {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 36px 40px;
}
.article-header { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 2px solid var(--border); }
.article-cats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.article-title { font-size: 24px; font-weight: 900; line-height: 1.5; margin-bottom: 10px; }
.article-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 12px; }
.article-feat-img { border-radius: var(--radius-sm); margin-bottom: 28px; width: 100%; }

/* 記事本文スタイル */
.article-body { font-size: 15px; line-height: 1.9; }
.article-body h2 {
  font-size: 19px; font-weight: 900; margin: 36px 0 14px;
  padding: 10px 16px; border-left: 4px solid var(--primary);
  background: var(--hero-bg-from); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.article-body h3 {
  font-size: 16px; font-weight: 700; margin: 28px 0 12px;
  padding-left: 12px; border-left: 3px solid var(--cat-profile);
}
.article-body p { margin-bottom: 20px; }
.article-body ul, .article-body ol { padding-left: 24px; margin-bottom: 20px; }
.article-body li { margin-bottom: 7px; }
.article-body a { color: var(--cat-profile); text-decoration: underline; }
.article-body blockquote {
  background: var(--hero-bg-from); border-left: 4px solid var(--primary);
  padding: 14px 20px; margin: 22px 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
}
.article-body img { border-radius: var(--radius-sm); margin: 20px auto; }
.article-body strong { font-weight: 900; }
.article-body code {
  background: #F4F4F4; padding: 2px 6px; border-radius: 4px; font-size: 13px;
}

/* 記事ナビ */
.article-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 36px;
}
.article-nav-btn {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; font-size: 12px; transition: box-shadow .2s;
}
.article-nav-btn:hover { box-shadow: var(--shadow-md); }
.nav-btn-label { font-size: 10px; color: var(--text-muted); margin-bottom: 4px; }
.nav-btn-title { font-size: 13px; font-weight: 700; }

/* =============================================
   LIST PAGE (カテゴリ一覧など)
   ============================================= */
.list-wrap { max-width: 1100px; margin: 0 auto; padding: 32px 24px; }
.list-header { margin-bottom: 24px; }
.list-page-title { font-size: 22px; font-weight: 900; display: flex; align-items: center; gap: 10px; }
.list-page-title .cat-badge { font-size: 13px; padding: 4px 14px; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: #1A1A2E; color: rgba(255,255,255,.75);
  padding: 40px 24px; margin-top: 56px;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.footer-logo {
  font-size: 18px; font-weight: 900; color: #fff;
  display: flex; align-items: center; gap: 8px;
}
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: 12px; color: rgba(255,255,255,.55); transition: color .2s; }
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: 11px; color: rgba(255,255,255,.35); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 820px) {
  .header-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  .site-nav { flex-wrap: wrap; justify-content: center; }
  .nav-link { font-size: 12px; padding: 5px 10px; }
  .hero-inner { flex-direction: column; padding: 28px 16px; }
  .hero-title { font-size: 24px; }
  .hero-visual { display: none; }
  .page-wrap { grid-template-columns: 1fr; padding: 20px 16px; }
  .article-wrap { padding: 24px 18px; }
  .card-thumb { flex: 0 0 96px; }
  .card-thumb img, .thumb-ph { width: 96px; height: 76px; }
  .article-nav { grid-template-columns: 1fr; }
}
