/* ===================================
   é»æ°ä»£ç¯ç´.site - Energy Savings Blog
   Mobile-first responsive design
   =================================== */

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

:root {
  --primary: #10b981;
  --primary-dark: #059669;
  --primary-light: #ecfdf5;
  --accent: #f59e0b;
  --accent-light: #fffbeb;
  --cta: #7c3aed;
  --cta-dark: #6d28d9;
  --cta-light: #f5f3ff;
  --bg: #f0fdf4;
  --bg-white: #ffffff;
  --text: #1a1a2e;
  --text-light: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --radius: 8px;
  --radius-lg: 12px;
  --max-w-article: 800px;
  --max-w-index: 1000px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Header --- */
.site-header {
  background: var(--text);
  color: #fff;
  padding: 0.75rem 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-inner {
  max-width: var(--max-w-index);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-logo:hover { text-decoration: none; }

.logo-icon {
  width: 28px;
  height: 28px;
  background: var(--primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.header-nav a {
  color: rgba(255,255,255,0.8);
  font-size: 0.85rem;
  margin-left: 1.25rem;
}
.header-nav a:hover { color: #fff; text-decoration: none; }

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #059669 50%, #047857 100%);
  color: #fff;
  padding: 2.5rem 1rem;
  text-align: center;
}

.hero h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.hero p {
  font-size: 0.95rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* --- Breadcrumb --- */
.breadcrumb {
  max-width: var(--max-w-article);
  margin: 1rem auto;
  padding: 0 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--text-light); }
.breadcrumb span { margin: 0 0.4rem; }

/* --- Main Content --- */
.main-content {
  max-width: var(--max-w-article);
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.index-content {
  max-width: var(--max-w-index);
}

/* --- Article Card (Index) --- */
.article-list {
  display: grid;
  gap: 1.25rem;
}

.article-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.article-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.article-card a { color: inherit; }
.article-card a:hover { text-decoration: none; }

.card-thumb {
  height: 160px;
  background: linear-gradient(135deg, var(--primary-light), #d1fae5);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

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

.card-thumb-placeholder {
  font-size: 3rem;
  opacity: 0.3;
}

.card-tag {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--cta);
  color: #fff;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
}

.card-body {
  padding: 1rem 1.25rem 1.25rem;
}

.card-body h2 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-light);
}

/* --- Article Page --- */
.article-header {
  margin-bottom: 2rem;
}

.article-header h1 {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-light);
  align-items: center;
}

.update-badge {
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.75rem;
}

/* --- Article Body --- */
.article-body h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--primary);
}

.article-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
}

.article-body p {
  margin-bottom: 1rem;
}

.article-body ul, .article-body ol {
  margin: 0.5rem 0 1rem 1.5rem;
}

.article-body li {
  margin-bottom: 0.3rem;
}

/* --- CTA Box (Octopus Energy) --- */
.cta-box {
  background: linear-gradient(135deg, var(--cta-light), #ede9fe);
  border: 2px solid var(--cta);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.1;
}

.cta-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.25rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.cta-box h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--cta);
  margin-bottom: 0.5rem;
}

.cta-box p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.cta-btn {
  display: inline-block;
  background: var(--cta);
  color: #fff;
  padding: 0.75rem 2rem;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 700;
  transition: background 0.2s, transform 0.1s;
  box-shadow: 0 4px 12px rgba(124,58,237,0.3);
}

.cta-btn:hover {
  background: var(--cta-dark);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.cta-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* --- Info Box --- */
.info-box {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.warning-box {
  background: var(--accent-light);
  border-left-color: var(--accent);
}

/* --- Benefit Cards --- */
.benefit-grid {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}

.benefit-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.benefit-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
}

.benefit-icon-green { background: var(--primary-light); color: var(--primary); }
.benefit-icon-amber { background: var(--accent-light); color: var(--accent); }
.benefit-icon-purple { background: var(--cta-light); color: var(--cta); }

.benefit-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.benefit-card p {
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0;
}

/* --- Step List --- */
.step-list {
  counter-reset: step;
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
}

.step-list li {
  counter-increment: step;
  position: relative;
  padding: 1rem 1rem 1rem 3.5rem;
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 0.75rem;
}

.step-list li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
}

.step-list li strong {
  display: block;
  margin-bottom: 0.25rem;
}

/* --- Comparison Table --- */
.comparison-table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-white);
  font-size: 0.9rem;
}

.comparison-table thead {
  background: var(--text);
  color: #fff;
}

.comparison-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  white-space: nowrap;
}

.comparison-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.comparison-table tbody tr:hover {
  background: #f8fafc;
}

.comparison-table .recommended {
  background: var(--primary-light);
}

.comparison-table .recommended td {
  font-weight: 600;
}

/* --- Related Articles --- */
.related-articles {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.related-articles h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  border-bottom: none;
}

.related-grid {
  display: grid;
  gap: 1rem;
}

.related-card {
  display: flex;
  gap: 1rem;
  background: var(--bg-white);
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.related-card:hover { text-decoration: none; box-shadow: var(--shadow-md); }

/* --- Footer --- */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,0.6);
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.8rem;
  margin-top: 3rem;
}

.site-footer a { color: rgba(255,255,255,0.8); }
.footer-links { margin-bottom: 0.75rem; }
.footer-links a { margin: 0 0.75rem; }

/* --- Responsive --- */
@media (min-width: 640px) {
  .hero h1 { font-size: 1.8rem; }
  .hero { padding: 3rem 1.5rem; }
  .article-header h1 { font-size: 1.6rem; }
  .article-list { grid-template-columns: repeat(2, 1fr); }
  .benefit-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .hero h1 { font-size: 2.2rem; }
  .article-list { grid-template-columns: repeat(3, 1fr); }
  .benefit-grid { grid-template-columns: repeat(3, 1fr); }
}

/* --- Mobile sticky CTA --- */
.sticky-cta {
  display: none;
}

@media (max-width: 639px) {
  .sticky-cta {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    padding: 0.75rem 1rem;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.1);
    z-index: 99;
    text-align: center;
  }

  .sticky-cta .cta-btn {
    width: 100%;
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }

  .site-footer {
    padding-bottom: 5rem;
  }
}

/* --- Utility --- */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
