/*
Theme Name: TsumuLab
Theme URI: https://tsumulab.jp
Author: TsumuLab
Author URI: https://tsumulab.jp
Description: ツムラボ オリジナルガジェットブログテーマ
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: tsumulab
Tags: blog, technology, gadget, responsive
*/

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

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

:root {
  --blue: #1a6cf6;
  --blue-dark: #0f4fcf;
  --black: #0d0d0d;
  --gray-dark: #333;
  --gray-mid: #666;
  --gray-light: #999;
  --gray-border: #e5e5e5;
  --gray-bg: #f7f7f7;
  --white: #ffffff;
  --cat-tech: #2563eb;
  --cat-review: #7c3aed;
  --cat-gaming: #16a34a;
  --cat-smartphone: #0891b2;
  --cat-audio: #ea580c;
  --cat-accessories: #64748b;
  --cat-camera: #dc2626;
  --cat-smarthome: #0d9488;
  --cat-pc: #6d28d9;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--white);
  color: var(--black);
  font-size: 14px;
  line-height: 1.6;
}

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

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-border);
  padding: 0 2rem;
}

.header-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.site-logo a {
  font-family: 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--black);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.site-nav a {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--gray-dark);
  transition: color 0.15s;
}

.site-nav a:hover { color: var(--blue); }

/* MAIN */
.site-main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 2rem;
}

/* HERO */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--gray-border);
}

.hero-thumbnail {
  height: 340px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--gray-bg);
}

.hero-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {}

.cat-badge {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 2px;
  margin-bottom: 1rem;
  color: var(--white);
  background: var(--blue);
}

.hero-title {
  font-size: 32px;
  font-weight: 900;
  line-height: 1.25;
  color: var(--black);
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.hero-excerpt {
  font-size: 14px;
  color: var(--gray-mid);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 3px;
  transition: background 0.15s;
  margin-bottom: 1.2rem;
}

.btn-primary:hover { background: var(--blue-dark); color: var(--white); }

.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 12px;
  color: var(--gray-light);
}

/* CONTENT GRID */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
}

/* SECTION HEADER */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--gray-border);
}

.section-title {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--black);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: '';
  width: 3px;
  height: 16px;
  background: var(--blue);
  border-radius: 2px;
}

.section-more {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
}

/* ARTICLES GRID */
.articles-section { margin-bottom: 3rem; }

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.article-card { cursor: pointer; }
.article-card:hover .article-card-title { color: var(--blue); }

.article-thumbnail {
  height: 170px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.8rem;
  position: relative;
  background: var(--gray-bg);
}

.article-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail-cat {
  position: absolute;
  top: 8px;
  left: 8px;
}

.article-card-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--black);
  margin-bottom: 0.5rem;
  transition: color 0.15s;
}

.article-card-meta {
  font-size: 11px;
  color: var(--gray-light);
}

/* SIDEBAR */
.sidebar {}

.ranking-section { margin-bottom: 2.5rem; }

.ranking-list { display: flex; flex-direction: column; }

.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-border);
  cursor: pointer;
}

.rank-item:first-child { border-top: 1px solid var(--gray-border); }
.rank-item:hover .rank-title { color: var(--blue); }

.rank-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  line-height: 1;
  min-width: 28px;
  text-align: center;
  color: var(--gray-border);
}

.rank-num.gold { color: #f59e0b; }
.rank-num.silver { color: #9ca3af; }
.rank-num.bronze { color: #b45309; }

.rank-thumb {
  width: 64px;
  height: 48px;
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--gray-bg);
}

.rank-thumb img { width: 100%; height: 100%; object-fit: cover; }

.rank-info { flex: 1; min-width: 0; }

.rank-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--black);
  margin-bottom: 4px;
  transition: color 0.15s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-views {
  font-size: 11px;
  color: var(--gray-light);
}

/* CATEGORY */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 4px;
  border: 1px solid var(--gray-border);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
}

.cat-item:hover { border-color: var(--blue); background: #f0f7ff; }

.cat-icon { font-size: 22px; line-height: 1; }

.cat-name {
  font-size: 10px;
  font-weight: 500;
  color: var(--gray-dark);
  line-height: 1.3;
}

/* SINGLE POST */
.single-post {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem;
}

.post-header { margin-bottom: 2rem; }

.post-title {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.3;
  margin: 1rem 0;
}

.post-thumbnail {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 2rem;
}

.post-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--gray-dark);
}

.post-content h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 2rem 0 1rem;
  padding-left: 0.8rem;
  border-left: 3px solid var(--blue);
}

.post-content h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 1.5rem 0 0.8rem;
}

.post-content p { margin-bottom: 1.2rem; }

.post-content img {
  width: 100%;
  border-radius: 4px;
  margin: 1.5rem 0;
}

/* FOOTER */
.site-footer {
  border-top: 1px solid var(--gray-border);
  padding: 1.5rem 2rem;
  margin-top: 3rem;
}

.footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--black);
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 12px;
  color: var(--gray-mid);
}

.footer-nav a:hover { color: var(--blue); }

.footer-copy {
  font-size: 11px;
  color: var(--gray-light);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero-section { grid-template-columns: 1fr; }
  .content-grid { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-inner { flex-direction: column; text-align: center; }
}

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