/*
Theme Name:   Digital Century
Theme URI:    https://digitalcentury.co.jp/
Author:       Digital Century Inc.
Author URI:   https://digitalcentury.co.jp/
Description:  Digital Century 公式コーポレートサイトテーマ。明るく清潔感のあるデザイン。
Version:      1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License:      GNU General Public License v2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  digital-century
Tags:         corporate, light, responsive, custom-colors, custom-logo, custom-menu
*/

:root {
  --red:        #e8341a;
  --red-dark:   #c42a12;
  --orange:     #f07920;
  --bg:         #ffffff;
  --bg-off:     #fafaf8;
  --bg-light:   #f5f7fa;
  --text:       #3a3a3a;
  --text-mid:   #666666;
  --text-light: #999999;
  --border:     #e8e8e8;
  --border-lt:  #f0f0f0;
  --shadow-sm:  0 2px 12px rgba(0,0,0,.06);
  --shadow-md:  0 6px 32px rgba(0,0,0,.10);
  --shadow-lg:  0 16px 60px rgba(0,0,0,.12);
  --radius:     12px;
  --radius-lg:  20px;
  --radius-xl:  32px;
  --header-h:   68px;
  --topbar-h:   34px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  line-height: 1.7;
  padding-top: calc(var(--header-h) + var(--topbar-h) + 1px);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ===== UTILITY ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.section { padding: 88px 0; }
.section-sm { padding: 60px 0; }
.text-center { text-align: center; }

.dc-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
}
.dc-title {
  font-size: clamp(24px, 2.8vw, 40px);
  font-weight: 700;
  color: var(--text);
  line-height: 1.45;
  letter-spacing: .02em;
  margin-bottom: 16px;
}
.dc-body { font-size: 15px; color: var(--text-mid); line-height: 2; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 700;
  transition: all .25s ease;
  cursor: pointer;
  white-space: nowrap;
  border: none;
  text-decoration: none;
}
.btn-primary { background: linear-gradient(135deg, var(--red) 0%, var(--orange) 100%); color: white !important; box-shadow: 0 4px 20px rgba(232,52,26,.22); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(232,52,26,.35); color: white !important; }
.btn-outline { background: white; color: var(--red) !important; border: 2px solid var(--red); }
.btn-outline:hover { background: var(--red); color: white !important; }
.btn-arrow::after { content: '→'; font-size: 15px; }

/* ===== HEADER ===== */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  background: white;
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s;
}
#site-header.shadow { box-shadow: 0 2px 20px rgba(0,0,0,.08); }
.header-top {
  background: var(--bg-off);
  border-bottom: 1px solid var(--border-lt);
  height: var(--topbar-h);
  display: flex;
  align-items: center;
}
.header-top-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 32px;
  display: flex; align-items: center; justify-content: flex-end; gap: 20px; width: 100%;
}
.header-top-link { font-size: 12px; color: var(--text-mid); transition: color .2s; display: flex; align-items: center; gap: 4px; white-space: nowrap; text-decoration: none; }
.header-top-link:hover { color: var(--red); }
.header-main {
  max-width: 1200px; margin: 0 auto; padding: 0 32px;
  height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.site-logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; text-decoration: none; }
.logo-icon-wrap {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--red) 0%, var(--orange) 100%);
  border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.logo-icon-wrap svg { width: 22px; height: 22px; fill: none; stroke: white; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.logo-texts { line-height: 1.2; }
.logo-name { font-weight: 800; font-size: 17px; color: var(--text); letter-spacing: -.3px; }
.logo-catch { font-size: 10px; color: var(--text-light); letter-spacing: .3px; }

/* WordPress カスタムロゴ */
.custom-logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}
.custom-logo-link img,
.site-logo img.custom-logo {
  height: 44px !important;
  width: auto !important;
  max-height: 44px !important;
  max-width: 220px !important;
  object-fit: contain;
  display: block;
}

/* グローバルナビ（WPカスタムメニュー） */
.gnav { display: flex; align-items: stretch; flex: 1; justify-content: center; }
.gnav > .menu { display: flex; align-items: stretch; list-style: none; margin: 0; padding: 0; }
.gnav > .menu > .menu-item > a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 14px; height: var(--header-h); font-size: 13px; font-weight: 500;
  color: var(--text); gap: 2px; position: relative; transition: color .2s; white-space: nowrap; text-decoration: none;
}
.gnav > .menu > .menu-item > a:hover { color: var(--red); }
.gnav > .menu > .menu-item > a::after {
  content: ''; position: absolute; bottom: 0; left: 10px; right: 10px;
  height: 3px; background: var(--red); border-radius: 2px 2px 0 0;
  transform: scaleX(0); transition: transform .2s;
}
.gnav > .menu > .menu-item > a:hover::after,
.gnav > .menu > .menu-item.current-menu-item > a::after { transform: scaleX(1); }
.gnav > .menu > .menu-item.current-menu-item > a { color: var(--red); }
.nav-en { font-size: 9px; font-weight: 700; letter-spacing: 1px; color: var(--red); opacity: .7; line-height: 1; }

/* スマホハンバーガー */
.menu-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all .3s; }

.header-cta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ===== PAGE HERO ===== */
.page-hero {
  background: linear-gradient(135deg, #fff4f2 0%, #fff9f5 50%, #f2f7ff 100%);
  padding: 64px 0 52px; position: relative; overflow: hidden;
}
.page-hero::after {
  content: ''; position: absolute; right: -100px; top: -100px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(232,52,26,.07) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none;
}
.page-hero-inner { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.page-hero-title { font-size: clamp(26px, 2.8vw, 40px); font-weight: 700; color: var(--text); margin-bottom: 12px; line-height: 1.4; }
.page-hero-desc { font-size: 15px; color: var(--text-mid); line-height: 1.9; }

/* ===== BREADCRUMB ===== */
.breadcrumb { background: var(--bg-light); padding: 11px 0; border-bottom: 1px solid var(--border-lt); }
.breadcrumb-inner { max-width: 1200px; margin: 0 auto; padding: 0 32px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-light); flex-wrap: wrap; }
.breadcrumb a { color: var(--text-mid); transition: color .2s; }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb-sep { color: var(--border); }

/* ===== ACCORDION ===== */
.accordion-item { border-bottom: 1px solid var(--border-lt); }
.accordion-btn { width: 100%; padding: 20px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 15px; font-weight: 700; color: var(--text); background: none; border: none; cursor: pointer; text-align: left; }
.accordion-q { display: flex; align-items: flex-start; gap: 12px; line-height: 1.5; }
.accordion-q::before { content: 'Q'; font-weight: 800; font-size: 18px; color: var(--red); flex-shrink: 0; line-height: 1.3; }
.accordion-icon { width: 28px; height: 28px; border-radius: 50%; background: var(--bg-light); display: flex; align-items: center; justify-content: center; color: var(--red); font-size: 20px; flex-shrink: 0; transition: transform .3s, background .2s; }
.accordion-item.open .accordion-icon { transform: rotate(45deg); background: rgba(232,52,26,.1); }
.accordion-body { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.accordion-body-inner { padding: 4px 0 24px 30px; font-size: 14px; color: var(--text-mid); line-height: 2; display: flex; gap: 8px; }
.accordion-body-inner::before { content: 'A.'; font-weight: 800; color: var(--orange); flex-shrink: 0; }

/* ===== LINK ===== */
.link-arrow { font-size: 13px; font-weight: 700; color: var(--red); display: inline-flex; align-items: center; gap: 6px; transition: gap .2s; text-decoration: none; }
.link-arrow::after { content: '→'; }
.link-arrow:hover { gap: 10px; }
.view-more { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--red); text-decoration: none; padding-bottom: 4px; border-bottom: 1.5px solid var(--red); transition: gap .2s, opacity .2s; }
.view-more:hover { gap: 14px; opacity: .75; }
.view-more::after { content: '→'; }
.view-more-w { color: white; border-color: white; }

/* ===== TWO-COL ===== */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.two-col.reverse .two-col-img { order: -1; }
.two-col-img { border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4/3; }
.two-col-img img { width: 100%; height: 100%; object-fit: cover; }

/* ===== FADE IN ===== */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
.fade-in-delay-1 { transition-delay: .1s; }
.fade-in-delay-2 { transition-delay: .2s; }
.fade-in-delay-3 { transition-delay: .3s; }

/* ===== POST CARDS ===== */
.post-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.post-card { background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--border-lt); transition: all .3s; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.post-card-thumb { width: 100%; aspect-ratio: 16/10; overflow: hidden; }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post-card:hover .post-card-thumb img { transform: scale(1.05); }
.post-card-body { padding: 20px; }
.post-card-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.post-card-date { font-size: 12px; color: var(--text-light); }
.post-card-cat a { padding: 3px 10px; background: rgba(232,52,26,.08); color: var(--red); border-radius: 100px; font-size: 11px; font-weight: 700; text-decoration: none; }
.post-card-title { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.6; }
.post-card-title a { color: inherit; text-decoration: none; }
.post-card-title a:hover { color: var(--red); }

/* ===== ENTRY CONTENT ===== */
.entry-wrap { max-width: 1200px; margin: 0 auto; padding: 60px 32px; display: grid; grid-template-columns: 1fr 300px; gap: 60px; align-items: start; }
.entry-content h2 { font-size: 24px; font-weight: 700; margin: 40px 0 16px; padding-left: 16px; border-left: 4px solid var(--red); line-height: 1.4; }
.entry-content h3 { font-size: 20px; font-weight: 700; margin: 32px 0 12px; color: var(--text); }
.entry-content p { margin-bottom: 20px; line-height: 2; color: var(--text-mid); }
.entry-content img { border-radius: var(--radius); margin: 24px 0; }
.entry-content ul { padding-left: 20px; margin-bottom: 20px; list-style: disc; }
.entry-content ol { padding-left: 20px; margin-bottom: 20px; list-style: decimal; }
.entry-content ul li, .entry-content ol li { margin-bottom: 8px; color: var(--text-mid); line-height: 1.8; }
.entry-sidebar { position: sticky; top: calc(var(--header-h) + var(--topbar-h) + 24px); }
.entry-sidebar .widget { margin-bottom: 28px; background: var(--bg-light); border-radius: var(--radius); padding: 20px; }
.entry-sidebar .widget-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 14px; padding-bottom: 8px; border-bottom: 2px solid rgba(232,52,26,.2); }

/* ===== PAGINATION ===== */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 48px; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; font-size: 14px; font-weight: 700; border: 1.5px solid var(--border); color: var(--text-mid); transition: all .2s; text-decoration: none; }
.pagination .page-numbers:hover { border-color: var(--red); color: var(--red); }
.pagination .page-numbers.current { background: var(--red); border-color: var(--red); color: white; }
.pagination .page-numbers.dots { border: none; }

/* ===== FOOTER ===== */
footer { background: #fff8f5; border-top: 3px solid var(--red); padding: 60px 0 32px; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.footer-top { display: grid; grid-template-columns: 260px 1fr 1fr 1fr; gap: 48px; padding-bottom: 48px; border-bottom: 1px solid var(--border); margin-bottom: 32px; }
.footer-tagline { font-size: 13px; color: var(--text-mid); line-height: 1.9; margin-top: 14px; }
.footer-col h4 { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid rgba(232,52,26,.2); }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: 13px; color: var(--text-mid); transition: color .2s; display: flex; align-items: center; gap: 6px; text-decoration: none; }
.footer-links a::before { content: '›'; color: var(--red); font-size: 16px; line-height: 1; flex-shrink: 0; }
.footer-links a:hover { color: var(--red); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--text-light); flex-wrap: wrap; gap: 12px; }
.footer-policy { display: flex; gap: 20px; }
.footer-policy a { color: var(--text-light); transition: color .2s; text-decoration: none; }
.footer-policy a:hover { color: var(--red); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 768px) {
  :root { --topbar-h: 0px; }
  .header-top { display: none; }
  .gnav { display: none; position: fixed; top: calc(var(--header-h) + 1px); left: 0; right: 0; background: white; flex-direction: column; border-top: 1px solid var(--border-lt); box-shadow: var(--shadow-md); z-index: 9998; }
  .gnav.open { display: flex; }
  .gnav > .menu { flex-direction: column; width: 100%; }
  .gnav > .menu > .menu-item > a { height: auto; padding: 14px 24px; justify-content: flex-start; border-bottom: 1px solid var(--border-lt); }
  .gnav > .menu > .menu-item > a::after { display: none; }
  .menu-toggle { display: flex; }
  .container { padding: 0 20px; }
  .section { padding: 60px 0; }
  .page-hero { padding: 40px 0 32px; }
  .two-col { grid-template-columns: 1fr; gap: 36px; }
  .two-col.reverse .two-col-img { order: 0; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .header-main { padding: 0 20px; }
  .footer-inner { padding: 0 20px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .post-list { grid-template-columns: 1fr; }
  .entry-wrap { grid-template-columns: 1fr; padding: 40px 20px; }
  .entry-sidebar { position: static; }
  .header-cta .btn { display: none; }
}
