/* WordPress記事コンテンツ用スタイル */
/* 汎用的に使用可能なモダンなデザイン */

.article-content {
  position: relative;
  padding: 3.5rem 2.5rem;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
}

/* 活動セクション内のarticle-contentは背景なし */
.activity-section-grid .article-content {
  background: transparent;
  border: none;
  padding: 0;
}

.article-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(90deg, #facc15 0%, #10b981 100%);
  z-index: 1;
}

/* コンテンツ内の要素スタイル */
.article-content > * {
  position: relative;
  z-index: 1;
}

.article-content > *:first-child {
  margin-top: 0;
}

.article-content > *:last-child {
  margin-bottom: 0;
}

/* 段落 */
.article-content p {
  font-size: 1.125rem;
  line-height: 1.875;
  color: #334155;
  margin-bottom: 1.5rem;
}

/* 見出し */
.article-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e2e8f0;
}

.article-content h1:not(:first-child) {
  margin-top: 4.5rem;
}

.article-content h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e2e8f0;
}

.article-content h2:not(:first-child) {
  margin-top: 4.5rem;
}

.article-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.article-content h3:not(:first-child) {
  margin-top: 4rem;
}

.article-content h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.article-content h4:not(:first-child) {
  margin-top: 3.5rem;
}

.article-content h5 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.article-content h5:not(:first-child) {
  margin-top: 3rem;
}

.article-content h6 {
  font-size: 1rem;
  font-weight: 600;
  color: #334155;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.article-content h6:not(:first-child) {
  margin-top: 3rem;
}

/* リスト */
.article-content ul,
.article-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
  color: #475569;
}

.article-content li {
  font-size: 1.125rem;
  line-height: 1.875;
  margin-bottom: 0.75rem;
}

.article-content ul li {
  list-style-type: disc;
}

.article-content ol li {
  list-style-type: decimal;
}

.article-content ul ul,
.article-content ol ol,
.article-content ul ol,
.article-content ol ul {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

/* 定義リスト */
.article-content dl {
  margin: 1.5rem 0;
  color: #475569;
}

.article-content dt {
  font-weight: 600;
  color: #0f172a;
  margin-top: 1rem;
  margin-bottom: 0.25rem;
}

.article-content dd {
  margin-left: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
  line-height: 1.875;
}

/* 画像 */
.article-content img {
  max-width: 100%;
  height: auto;
  margin: 2rem 0;
  display: block;
}

.article-content figure {
  margin: 2rem 0;
}

.article-content figure img {
  margin: 0;
}

.article-content figcaption {
  font-size: 0.875rem;
  color: #64748b;
  text-align: center;
  margin-top: 0.5rem;
  font-style: italic;
}

/* リンク */
.article-content a {
  color: #10b981;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.article-content a:hover {
  color: #059669;
  text-decoration-thickness: 2px;
}

/* 外部リンクアイコン（別ドメインのリンク末尾に自動付与） */
.article-content .clnet-link-external .clnet-ext-icon,
.clnet-link-external .clnet-ext-icon {
  display: inline-block;
  margin-left: 0.2em;
  vertical-align: -0.2em;
  color: currentColor;
  opacity: 0.75;
}
.clnet-link-external .clnet-ext-icon svg {
  display: block;
  width: 1em;
  height: 1em;
}

/* 引用 */
.article-content blockquote {
  border-left: 4px solid #10b981;
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: #64748b;
  background: #f8fafc;
  padding: 1.5rem;
  position: relative;
}

.article-content blockquote p {
  margin-bottom: 0.5rem;
}

.article-content blockquote p:last-child {
  margin-bottom: 0;
}

/* コード */
.article-content code {
  background-color: #f1f5f9;
  padding: 0.125rem 0.375rem;
  font-size: 0.875em;
  color: #e11d48;
  font-family: 'Courier New', Courier, monospace;
}

.article-content pre {
  background-color: #1e293b;
  color: #e2e8f0;
  padding: 1.5rem;
  overflow-x: auto;
  margin: 2rem 0;
  border-left: 4px solid #10b981;
}

.article-content pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

/* テーブル */
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  border: 1px solid #e2e8f0;
}

.article-content th,
.article-content td {
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  text-align: left;
}

.article-content th {
  background-color: #f8fafc;
  font-weight: 600;
  color: #0f172a;
}

.article-content tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

.article-content tbody tr:hover {
  background-color: #f1f5f9;
}

/* 水平線 */
.article-content hr {
  border: none;
  border-top: 2px solid #e2e8f0;
  margin: 2.5rem 0;
}

/* 強調 */
.article-content strong {
  font-weight: 700;
  color: #0f172a;
}

.article-content em {
  font-style: italic;
}

.article-content mark {
  background-color: #fef08a;
  padding: 0.125rem 0.25rem;
  color: #0f172a;
}

/* 削除・挿入 */
.article-content del {
  text-decoration: line-through;
  color: #94a3b8;
}

.article-content ins {
  text-decoration: underline;
  color: #10b981;
}

/* 小さい・大きいテキスト */
.article-content small {
  font-size: 0.875em;
  color: #64748b;
}

.article-content big {
  font-size: 1.125em;
}

/* 上付き・下付き */
.article-content sup {
  font-size: 0.75em;
  vertical-align: super;
  line-height: 0;
}

.article-content sub {
  font-size: 0.75em;
  vertical-align: sub;
  line-height: 0;
}

/* 区切り要素 */
.article-content address {
  font-style: normal;
  margin: 1.5rem 0;
  color: #475569;
}

.article-content time {
  color: #64748b;
}

/* レスポンシブ */
@media (min-width: 768px) {
  .article-content {
    padding: 4.5rem 3.5rem;
  }
  
  .article-content h1 {
    font-size: 3rem;
  }
  
  .article-content h2 {
    font-size: 2.5rem;
  }
  
  .article-content h3 {
    font-size: 1.75rem;
  }
}

/* 活動についてセクション用グリッド背景 */
.activity-section-grid {
  position: relative;
  background: rgba(248, 250, 252, 0.6);
  border: 1px solid rgba(226, 232, 240, 0.5);
  border-left: none;
  border-right: none;
  overflow: visible;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background-image: 
    linear-gradient(rgba(148, 163, 184, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px),
    linear-gradient(45deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(-45deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 
    40px 40px,
    40px 40px,
    28px 28px,
    28px 28px;
  background-position: 
    0 0,
    0 0,
    0 0,
    0 0;
}

.activity-section-grid::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(16, 185, 129, 0.02) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(250, 204, 21, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.activity-section-grid > * {
  position: relative;
  z-index: 1;
}

/* 活動セクション内のコンテンツエリア（白背景・余白あり・最大幅指定） */
.activity-content-white {
  background: #ffffff !important;
  padding: 3.5rem 2.5rem !important;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.08), 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  box-sizing: border-box;
}

/* 上部グラデーションボーダー（太さを倍に） */
.activity-content-white::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(90deg, #facc15 0%, #10b981 100%);
  z-index: 1;
  border-radius: 0.5rem 0.5rem 0 0;
}

@media (min-width: 768px) {
  .activity-content-white {
    padding: 4.5rem 3.5rem !important;
  }
}

@media (min-width: 1024px) {
  .activity-content-white {
    padding: 5rem 4rem !important;
    max-width: 1000px;
  }
}

@media (min-width: 1280px) {
  .activity-content-white {
    max-width: 1200px;
  }
}

/* 製品詳細：枠＋余白＋上部グラデーションのみ（中身は .post_content で SWELL スタイル） */
.product-content-frame {
  position: relative;
  background: #fff;
  padding: 3.5rem 2.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.08), 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.product-content-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(90deg, #facc15 0%, #10b981 100%);
  z-index: 1;
  border-radius: 0.5rem 0.5rem 0 0;
}

.product-content-frame > .post_content {
  position: relative;
  z-index: 1;
}

/* 参加高校・活動について：段落を少し大きく */
.school-activity-content .post_content p {
  font-size: 1.125rem;
  line-height: 1.85;
}

@media (min-width: 768px) {
  .school-activity-content .post_content p {
    font-size: 1.25rem;
  }
}

/* 製品詳細・製品概要：段落を少し大きく */
.product-overview-content .post_content p {
  font-size: 1.125rem;
  line-height: 1.85;
}

@media (min-width: 768px) {
  .product-overview-content .post_content p {
    font-size: 1.25rem;
  }
}

@media (min-width: 768px) {
  .product-content-frame {
    padding: 4.5rem 3.5rem;
  }
}

@media (min-width: 1024px) {
  .product-content-frame {
    padding: 5rem 4rem;
  }
}

@media (min-width: 1280px) {
  .product-content-frame {
    max-width: 1200px;
  }
}

/* ========================================
   固定ページ・ブロックエディタ用コンテンツ
   .page-body はレイアウトのみ（幅・余白）
   見出し等のスタイルは SWELL の .post_content に任せる
   ======================================== */
.page-body {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 0.5rem;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .page-body {
    padding: 0 1rem;
  }
}

@media (min-width: 1024px) {
  .page-body {
    max-width: 58rem;
  }
}

/* 固定ページ・ブロックエディタ：段落を少し大きく（.page-body と .post_content は同一要素） */
.page-body.post_content p {
  font-size: 1.125rem;
  line-height: 1.85;
}

@media (min-width: 768px) {
  .page-body.post_content p {
    font-size: 1.25rem;
  }
}

/* 固定ページ：タイトル背景（ヘッダー下まで・スクロールで消える） */
.page-hero-wrap {
  min-height: max(70vh, 320px);
  margin-top: -7rem;
  padding-top: 7rem;
  display: flex;
  flex-direction: column;
}

.page-title-bg-overlay {
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.35) 0%, rgba(15, 23, 42, 0.5) 100%);
}

/* ヒーロー内：パンくずはヘッダー直下＋6〜7px、タイトルは背景下端より少し上 */
.page-hero-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
}

.page-hero-inner > nav {
  margin-top: 7px;
}

.page-hero-inner .page-hero-title-section {
  margin-top: auto;
  padding-bottom: 6rem;
  padding-top: 0;
}

.page-has-hero .header-hero-tint {
  background: rgba(255, 255, 255, 0.96);
}

/* 白タイトル用：うっすら黒シャドウ（可読性・下品にならない程度） */
.page-title-shadow {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.15);
}

.sub-page main {
  background: #fff;
}

/* 製作セクション用背景（白） */
.production-section-bg {
  position: relative;
  border: none;
  overflow: hidden;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: #ffffff;
}

.production-section-bg > * {
  position: relative;
  z-index: 1;
}

/* 最近の活動セクション用グレー背景（グリッドなし） */
.activity-section-bg-gray {
  position: relative;
  background: rgba(248, 250, 252, 0.6);
  border: 1px solid rgba(226, 232, 240, 0.5);
  border-left: none;
  border-right: none;
  overflow: visible;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.activity-section-bg-gray > * {
  position: relative;
  z-index: 1;
}

/* ライトボックス（画像・ギャラリー拡大）を縦横中央表示（オーバーレイは触らず内側のみ） */
/* WordPress コア: コンテナ内で画像を中央寄せ */
.wp-lightbox-overlay .lightbox-image-container {
  display: flex;
  align-items: center;
  justify-content: center;
}
.wp-lightbox-overlay .lightbox-image-container .wp-block-image {
  display: flex;
  align-items: center;
  justify-content: center;
}
.wp-lightbox-overlay .lightbox-image-container .wp-block-image img {
  object-fit: contain;
}
/* SWELL Luminous: 実DOMは .lum-lightbox-image-wrapper > span.lum-lightbox-position-helper > img */
.lum-lightbox-image-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}
.lum-lightbox-image-wrapper .lum-lightbox-position-helper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.lum-lightbox-image-wrapper .lum-lightbox-position-helper img.lum-img {
  display: block;
  object-fit: contain;
}

/* トップヒーロー風アウトラインボタン（index.php の ABOUT THE PROJECT と同一スタイル） */
/* ブロックエディタ「ボタン」のブロックに「追加クラス」で btn-hero-outline を指定 */
.wp-block-buttons.btn-hero-outline .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0; /* 矢印は ::before/::after の margin で間隔を指定 */
  padding: 2rem 2.5rem;
  border: 1px solid #0f172a;
  background: transparent;
  color: #0f172a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  transition: background-color 0.2s, color 0.2s;
  border-radius: 0;
}
.wp-block-buttons.btn-hero-outline .wp-block-button__link:hover {
  background-color: #0f172a;
  color: #fff;
}
/* 矢印（::before＝横線、::after＝三角）。order で「テキスト→線→三角」の順に表示 */
.wp-block-buttons.btn-hero-outline .wp-block-button__link::before {
  content: "";
  order: 1;
  display: inline-block;
  width: 14px;
  height: 2px;
  background: currentColor;
  margin-left: 1rem; /* テキストと矢印の間 */
  transition: transform 0.2s;
}
.wp-block-buttons.btn-hero-outline .wp-block-button__link::after {
  content: "";
  order: 2;
  display: inline-block;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid currentColor;
  margin-left: 0;
  transition: transform 0.2s;
}
.wp-block-buttons.btn-hero-outline .wp-block-button__link:hover::before,
.wp-block-buttons.btn-hero-outline .wp-block-button__link:hover::after {
  transform: translate(4px, 4px);
}
@media (min-width: 768px) {
  .wp-block-buttons.btn-hero-outline .wp-block-button__link {
    padding-left: 4rem;
    padding-right: 4rem;
  }
}

