/* =====================================================
   アポロ電気 技術コラム - 共通スタイルシート
   =====================================================
   更新時のポイント：
   --red: メインの赤色（変更で全体に反映）
   ===================================================== */

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

/* ===== CSS変数 ===== */
:root {
  --red:        #cc0000;
  --red-dark:   #990000;
  --red-light:  #ff3333;
  --red-pale:   #fff0f0;
  --white:      #ffffff;
  --gray-light: #f7f7f7;
  --gray:       #e8e8e8;
  --gray-mid:   #cccccc;
  --text:       #2d2d2d;
  --text-mid:   #555555;
  --text-light: #888888;
  --font:       'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'メイリオ', sans-serif;
  --max-w:      1100px;
  --article-w:  740px;
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.08);
  --shadow:     0 4px 20px rgba(0,0,0,0.12);
  --radius:     10px;
  --radius-sm:  6px;
}

/* ===== リセット・ベース ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .75; }

/* ===== ユーティリティ ===== */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* =====================================================
   ヘッダー
   ===================================================== */
.site-header {
  background: var(--red);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.site-logo img {
  height: 38px;
  width: auto;
  filter: brightness(0) invert(1);
}
.logo-text {
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.02em;
}
.logo-text span {
  display: block;
  font-size: 0.68rem;
  font-weight: 400;
  opacity: 0.85;
  letter-spacing: 0.05em;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-nav a {
  color: rgba(255,255,255,0.9);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.35);
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.header-nav a:hover {
  background: rgba(255,255,255,0.2);
  opacity: 1;
}
.header-nav .btn-contact {
  background: var(--white);
  color: var(--red) !important;
  border-color: var(--white);
  font-weight: 700;
}
.header-nav .btn-contact:hover { background: #ffe0e0; }

/* ハンバーガー（モバイル） */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: .3s;
}

/* =====================================================
   ヒーローセクション（一覧ページ用）
   ===================================================== */
.hero {
  background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 50%, #e63333 100%);
  color: var(--white);
  padding: 60px 24px 70px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -5%;
  width: 480px;
  height: 480px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -5%;
  width: 320px;
  height: 320px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
  pointer-events: none;
}
.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 40px;
  position: relative;
  z-index: 1;
}
.hero-text { flex: 1; }
.hero-label {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.4);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.hero p {
  font-size: 0.95rem;
  opacity: 0.9;
  max-width: 480px;
  line-height: 1.8;
}
.hero-chara {
  width: 280px;
  flex-shrink: 0;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.3));
  animation: float 3.5s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* =====================================================
   記事ヒーロー（記事ページ用）
   ===================================================== */
.article-hero {
  background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 100%);
  color: var(--white);
  padding: 48px 24px 56px;
}
.article-hero-inner {
  max-width: var(--article-w);
  margin: 0 auto;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  opacity: 0.8;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--white); }
.breadcrumb span { opacity: 0.6; }
.article-cat-badge {
  display: inline-block;
  background: rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.4);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.article-hero h1 {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 900;
  line-height: 1.4;
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  opacity: 0.85;
  flex-wrap: wrap;
}
.article-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* =====================================================
   記事カード（一覧）
   ===================================================== */
.articles-section {
  padding: 56px 24px 80px;
  background: var(--gray-light);
}
.section-heading {
  max-width: var(--max-w);
  margin: 0 auto 36px;
}
.section-heading h2 {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-heading h2::before {
  content: '';
  display: block;
  width: 4px;
  height: 22px;
  background: var(--red);
  border-radius: 2px;
}
.cards-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.card-thumb {
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}
.card-thumb-cat1 { background: linear-gradient(135deg, #cc0000, #ff6666); }
.card-thumb-cat2 { background: linear-gradient(135deg, #c00060, #ff4499); }
.card-thumb-cat3 { background: linear-gradient(135deg, #900090, #dd44dd); }
.card-thumb-cat4 { background: linear-gradient(135deg, #004499, #3388ff); }
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-body { padding: 20px 22px 22px; flex: 1; display: flex; flex-direction: column; }
.card-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}
.badge-cat {
  background: var(--red-pale);
  color: var(--red);
  border: 1px solid #ffcccc;
}
.badge-no {
  background: var(--gray-light);
  color: var(--text-light);
  border: 1px solid var(--gray);
}
.card h3 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 10px;
  color: var(--text);
}
.card-excerpt {
  font-size: 0.85rem;
  color: var(--text-mid);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--gray);
}
.card-date { font-size: 0.75rem; color: var(--text-light); }
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--red);
  padding: 6px 14px;
  border: 1.5px solid var(--red);
  border-radius: 20px;
  transition: background .2s, color .2s;
}
.card-link:hover {
  background: var(--red);
  color: var(--white);
  opacity: 1;
}

/* =====================================================
   記事本文
   ===================================================== */
.article-layout {
  max-width: var(--article-w);
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.article-body { font-size: 1rem; line-height: 2; color: var(--text); }
.article-body h2 {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--text);
  margin: 2.5em 0 0.9em;
  padding: 14px 18px;
  background: var(--red-pale);
  border-left: 4px solid var(--red);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  line-height: 1.5;
}
.article-body h3 {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--red-dark);
  margin: 2em 0 0.7em;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--gray);
  position: relative;
}
.article-body h3::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--red);
}
.article-body p { margin-bottom: 1.3em; }
.article-body ul, .article-body ol {
  padding-left: 1.5em;
  margin-bottom: 1.4em;
}
.article-body li { margin-bottom: 0.5em; }
.article-body ul li::marker { color: var(--red); }
.article-body strong { color: var(--red-dark); font-weight: 700; }
.article-body blockquote {
  margin: 1.8em 0;
  padding: 18px 22px;
  background: var(--gray-light);
  border-left: 4px solid var(--red);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 1.05rem;
  color: var(--text-mid);
}
.article-body blockquote strong { color: var(--text); }
.article-body .lead {
  font-size: 1.08rem;
  color: var(--text-mid);
  border-bottom: 1px solid var(--gray);
  padding-bottom: 1.4em;
  margin-bottom: 1.8em;
  line-height: 2;
}

/* ポイントボックス */
.point-box {
  background: var(--red-pale);
  border: 1px solid #ffcccc;
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 1.8em 0;
}
.point-box-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.point-box ul { margin-bottom: 0; }

/* アポルンの吹き出し */
.aporun-box {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: var(--gray-light);
  border: 1px solid var(--gray);
  border-radius: var(--radius);
  padding: 22px;
  margin: 2.5em 0;
}
.aporun-box img {
  width: 185px;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}
.aporun-speech {
  flex: 1;
}
.aporun-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 6px;
  letter-spacing: 0.06em;
}
.aporun-speech p {
  font-size: 0.92rem;
  color: var(--text-mid);
  margin-bottom: 0;
  line-height: 1.8;
}

/* =====================================================
   記事ナビ・CTA
   ===================================================== */
.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid var(--gray);
}
.article-nav a {
  flex: 1;
  padding: 16px 20px;
  background: var(--white);
  border: 1.5px solid var(--gray);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--text);
  transition: border-color .2s, box-shadow .2s;
  text-decoration: none;
}
.article-nav a:hover {
  border-color: var(--red);
  box-shadow: 0 2px 12px rgba(204,0,0,0.12);
  opacity: 1;
}
.article-nav .nav-label {
  font-size: 0.7rem;
  color: var(--red);
  font-weight: 700;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 4px;
}
.article-nav .nav-next { text-align: right; }
.article-nav-back {
  text-align: center;
  margin-top: 24px;
}
.article-nav-back a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-mid);
  font-size: 0.85rem;
  padding: 10px 20px;
  border-radius: 20px;
  border: 1px solid var(--gray);
  transition: .2s;
}
.article-nav-back a:hover { border-color: var(--red); color: var(--red); opacity: 1; }

/* CTA セクション */
.cta-section {
  background: linear-gradient(135deg, var(--red-dark), var(--red));
  color: var(--white);
  padding: 60px 24px;
  text-align: center;
}
.cta-section h2 {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 900;
  margin-bottom: 14px;
  line-height: 1.4;
}
.cta-section p {
  font-size: 0.95rem;
  opacity: 0.9;
  margin-bottom: 30px;
  line-height: 1.8;
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  color: var(--red);
  font-size: 1rem;
  font-weight: 700;
  padding: 16px 36px;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  transition: transform .2s, box-shadow .2s;
}
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,0.25); opacity: 1; }

/* =====================================================
   フッター
   ===================================================== */
.site-footer {
  background: #1a1a1a;
  color: rgba(255,255,255,0.7);
  padding: 40px 24px 24px;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-logo img {
  height: 32px;
  width: auto;
  filter: brightness(0) invert(0.6);
  margin-bottom: 10px;
}
.footer-company {
  font-size: 0.8rem;
  line-height: 1.9;
}
.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-links a {
  color: rgba(255,255,255,0.65);
  font-size: 0.8rem;
}
.footer-links a:hover { color: var(--white); opacity: 1; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  font-size: 0.75rem;
  text-align: center;
  color: rgba(255,255,255,0.4);
}

/* =====================================================
   レスポンシブ
   ===================================================== */
@media (max-width: 900px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-chara { width: 200px; }
}
@media (max-width: 640px) {
  .cards-grid { grid-template-columns: 1fr; }
  .header-nav { display: none; }
  .header-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--red-dark);
    padding: 16px 24px;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    z-index: 99;
  }
  .menu-toggle { display: flex; }
  .hero-inner { flex-direction: column-reverse; text-align: center; gap: 24px; }
  .hero-chara { width: 160px; margin: 0 auto; }
  .hero p { margin: 0 auto; }
  .article-nav { flex-direction: column; }
  .aporun-box { flex-direction: column; align-items: center; text-align: center; }
}
