/*
Theme Name: AI Lab Bright
Theme URI: https://syanhuro-kgame.com
Author: AI研究所
Description: AIで飯食う研究所 レビューブログ - 明るくカジュアルなバージョン
Version: 2.0.0
License: GNU General Public License v2 or later
Text Domain: ai-lab-theme
*/

/* =====================================================================
   CUSTOM PROPERTIES
===================================================================== */
:root {
  /* Backgrounds */
  --bg-primary:    #FAFAFA;
  --bg-secondary:  #F0F2F5;
  --bg-card:       #FFFFFF;
  --bg-card-hover: #FFFBF9;

  /* Borders */
  --border:        rgba(0, 0, 0, 0.09);
  --border-hover:  rgba(255, 107, 71, 0.4);

  /* Accents — 変数名は既存テンプレートと互換性を保つ */
  --accent-purple:  #FF6B47;   /* コーラルオレンジ */
  --accent-cyan:    #3B9EE0;   /* スカイブルー    */
  --accent-amber:   #FFD43B;   /* イエロー         */
  --accent-green:   #52B788;   /* セージグリーン   */
  --amazon-orange:  #FF9900;

  /* Gradients */
  --grad-main:  linear-gradient(135deg, #FF6B47 0%, #FF8E53 100%);
  --grad-card:  linear-gradient(135deg, rgba(255,107,71,.05) 0%, rgba(59,158,224,.04) 100%);
  --grad-glow:  0 6px 20px rgba(255,107,71,.14), 0 2px 6px rgba(0,0,0,.05);

  /* Text */
  --text-primary:   #1A202C;
  --text-secondary: #4A5568;
  --text-muted:     #A0AEC0;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  /* Fonts */
  --font-sans: 'Noto Sans JP', 'Poppins', sans-serif;
  --font-mono: 'Courier New', monospace;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.75;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-purple); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-cyan); }
img { max-width: 100%; height: auto; display: block; }

/* =====================================================================
   SITE LAYOUT
===================================================================== */
.site-wrapper { min-height: 100vh; display: flex; flex-direction: column; }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

.content-area {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  padding: 40px 0 80px;
}

@media (max-width: 900px) {
  .content-area { grid-template-columns: 1fr; }
}

/* =====================================================================
   HEADER
===================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #FFFFFF;
  border-bottom: 2px solid #ECEEF1;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }

.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--grad-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(255,107,71,.3);
}

.logo-text { display: flex; flex-direction: column; line-height: 1.2; }

.logo-text .label {
  font-size: .6rem;
  letter-spacing: .1em;
  color: var(--accent-purple);
  font-weight: 700;
  text-transform: uppercase;
}

.logo-text .name {
  font-size: 1rem;
  font-weight: 900;
  color: var(--text-primary);
}

/* ナビゲーション */
.site-nav ul { display: flex; list-style: none; gap: 4px; }

.site-nav a {
  display: block;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: all .2s;
}

.site-nav a:hover {
  color: var(--accent-purple);
  background: rgba(255,107,71,.08);
}

.site-nav .nav-cta a {
  background: var(--grad-main);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255,107,71,.3);
}

.site-nav .nav-cta a:hover { opacity: .88; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  border-radius: 2px;
  transition: .3s;
}

@media (max-width: 720px) {
  .menu-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; }
}

/* =====================================================================
   HERO BANNER
===================================================================== */
.site-hero {
  background: linear-gradient(135deg, #FFF5F0 0%, #FFF9EC 50%, #EFF8FF 100%);
  border-bottom: 1px solid var(--border);
  padding: 52px 0 44px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,107,71,.1);
  border: 1.5px solid rgba(255,107,71,.3);
  border-radius: 999px;
  padding: 5px 18px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--accent-purple);
  letter-spacing: .04em;
  margin-bottom: 18px;
}

.hero-badge::before { content: '✦'; font-size: .75em; }

.site-hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.site-hero p {
  font-size: .97rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.85;
}

/* =====================================================================
   SECTION HEADINGS
===================================================================== */
.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.section-heading h2 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
}

.section-heading .line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, #ECEEF1 0%, transparent 100%);
  border-radius: 2px;
}

.section-heading .badge {
  font-size: .7rem;
  font-weight: 700;
  color: var(--accent-purple);
  background: rgba(255,107,71,.1);
  border: 1px solid rgba(255,107,71,.25);
  padding: 2px 9px;
  border-radius: 6px;
}

/* =====================================================================
   ARTICLE GRID
===================================================================== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}

/* =====================================================================
   ARTICLE CARD
===================================================================== */
.post-card {
  background: var(--bg-card);
  border: 1px solid rgba(0,0,0,.07);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  transition: transform .25s, box-shadow .25s;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(0,0,0,.10);
}

.card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-secondary);
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}

.post-card:hover .card-thumb img { transform: scale(1.04); }

.card-type-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .05em;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
}

.badge-review  { background: #FF6B47; color: #fff; }
.badge-compare { background: #3B9EE0; color: #fff; }
.badge-news    { background: #FFD43B; color: #1A202C; }

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

.card-category {
  font-size: .72rem;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: .04em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.card-title {
  font-size: .98rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.45;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-title a { color: inherit; }
.card-title a:hover { color: var(--accent-purple); }

.card-excerpt {
  font-size: .83rem;
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: auto;
}

.card-rating { display: flex; align-items: center; gap: 4px; color: var(--amazon-orange); font-weight: 700; }

/* =====================================================================
   SIDEBAR
===================================================================== */
.sidebar { display: flex; flex-direction: column; gap: 22px; }

.widget-box {
  background: var(--bg-card);
  border: 1px solid rgba(0,0,0,.07);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.widget-title {
  background: linear-gradient(135deg, rgba(255,107,71,.07) 0%, rgba(59,158,224,.05) 100%);
  border-bottom: 1px solid var(--border);
  padding: 12px 18px;
  font-size: .82rem;
  font-weight: 800;
  color: var(--accent-purple);
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-content { padding: 14px 18px; }

.widget-posts { list-style: none; }

.widget-posts li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

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

.widget-posts .wp-thumb {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-secondary);
}

.widget-posts .wp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.widget-posts .wp-title { font-size: .8rem; font-weight: 700; line-height: 1.45; color: var(--text-primary); }
.widget-posts .wp-title a { color: inherit; }
.widget-posts .wp-title a:hover { color: var(--accent-purple); }
.widget-posts .wp-date { font-size: .7rem; color: var(--text-muted); margin-top: 3px; }

.widget-cats { list-style: none; }
.widget-cats li { border-bottom: 1px solid var(--border); }
.widget-cats li:last-child { border-bottom: none; }

.widget-cats a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: .85rem;
  color: var(--text-secondary);
  transition: color .2s;
}

.widget-cats a:hover { color: var(--accent-purple); }

.widget-cats .count {
  background: rgba(255,107,71,.1);
  color: var(--accent-purple);
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}

/* AIバナー */
.ai-banner {
  background: linear-gradient(135deg, #FFF5F0 0%, #FFFAEC 100%);
  border: 1.5px solid rgba(255,107,71,.2);
  border-radius: var(--radius-md);
  padding: 22px 18px;
  text-align: center;
}

.ai-banner .ai-icon { font-size: 2.4rem; margin-bottom: 10px; }

.ai-banner strong {
  display: block;
  font-size: .95rem;
  color: var(--accent-purple);
  margin-bottom: 8px;
  font-weight: 800;
}

.ai-banner p { font-size: .8rem; color: var(--text-secondary); line-height: 1.7; }

/* =====================================================================
   SINGLE ARTICLE
===================================================================== */
.single-header {
  padding: 36px 0 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.single-cat {
  display: inline-block;
  font-size: .72rem;
  font-weight: 800;
  color: var(--accent-cyan);
  background: rgba(59,158,224,.1);
  border: 1.5px solid rgba(59,158,224,.3);
  padding: 4px 12px;
  border-radius: 6px;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.single-title {
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 18px;
  color: var(--text-primary);
}

.single-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: .78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.single-meta span { display: flex; align-items: center; gap: 5px; }

.single-thumbnail {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 36px;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
}

.single-thumbnail img { width: 100%; height: auto; }

/* 本文 */
.entry-content { font-size: .97rem; line-height: 1.9; color: var(--text-secondary); }

.entry-content h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  border-left: 4px solid var(--accent-purple);
  padding-left: 14px;
  margin: 36px 0 14px;
}

.entry-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 28px 0 10px;
  padding-left: 10px;
  border-left: 3px solid var(--accent-cyan);
}

.entry-content p { margin-bottom: 18px; }

.entry-content a {
  color: var(--accent-purple);
  text-decoration: underline;
  text-decoration-color: rgba(255,107,71,.3);
}

.entry-content ul, .entry-content ol { padding-left: 22px; margin-bottom: 18px; }
.entry-content li { margin-bottom: 6px; }

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: .88rem;
}

.entry-content th {
  background: rgba(255,107,71,.07);
  color: var(--text-primary);
  padding: 10px 14px;
  border: 1px solid var(--border);
  font-weight: 700;
  text-align: left;
}

.entry-content td {
  padding: 9px 14px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.entry-content tr:nth-child(even) td { background: rgba(0,0,0,.02); }

/* =====================================================================
   BREADCRUMB
===================================================================== */
.breadcrumb {
  padding: 12px 0;
  font-size: .76rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent-purple); }
.breadcrumb .sep { opacity: .4; }

/* =====================================================================
   PAGINATION
===================================================================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.pagination a,
.pagination .current {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: all .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.pagination a:hover {
  background: rgba(255,107,71,.08);
  border-color: rgba(255,107,71,.3);
  color: var(--accent-purple);
}

.pagination .current {
  background: var(--grad-main);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 3px 10px rgba(255,107,71,.35);
}

/* =====================================================================
   FOOTER
===================================================================== */
.site-footer {
  margin-top: auto;
  background: #1A202C;
  padding: 48px 0 24px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}

@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
}

.footer-brand .logo-text .name { font-size: 1.1rem; color: #F7FAFC; }
.footer-brand .logo-text .label { color: rgba(255,107,71,.85); }
.footer-brand p { font-size: .8rem; color: #718096; margin-top: 10px; line-height: 1.75; }

.footer-col h4 {
  font-size: .75rem;
  font-weight: 800;
  color: rgba(255,107,71,.9);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.footer-col ul { list-style: none; }
.footer-col li { font-size: .83rem; margin-bottom: 8px; }
.footer-col a { color: #718096; transition: color .2s; }
.footer-col a:hover { color: #FF6B47; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-copyright { font-size: .75rem; color: #4A5568; }
.footer-disclaimer { font-size: .72rem; color: #4A5568; opacity: .7; }

/* =====================================================================
   UTILITIES
===================================================================== */
.gradient-text {
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ai-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .68rem;
  font-weight: 700;
  background: rgba(255,107,71,.1);
  border: 1px solid rgba(255,107,71,.25);
  color: var(--accent-purple);
  padding: 3px 8px;
  border-radius: 6px;
}

.no-posts {
  text-align: center;
  padding: 64px 20px;
  color: var(--text-muted);
}

/* =====================================================================
   RESPONSIVE
===================================================================== */
@media (max-width: 600px) {
  .posts-grid { grid-template-columns: 1fr; }
  .single-header { padding: 24px 0 20px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
