/* ===== HERO ===== */
.sec-hero {
  position: relative;
  padding-block: 0;
  min-height: 50vh; /* デフォルト：スマホ用に小さく */
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-bg);
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  overflow: hidden;
  border-radius: var(--r-marubi);
  /* デバイスサイズごとにヘッダーの高さ分のpadding-topを設定 */
  /* インラインスタイルを上書きするため!importantを使用 */
  padding-top: var(--header-height-mobile) !important; /* デフォルト（400px以下）: ヘッダー高さ80px */
  padding-bottom: 0 !important;
}

/* WordPressのconstrainedレイアウトの影響を無効化 */
.sec-hero.is-layout-constrained,
.sec-hero.wp-block-group.is-layout-constrained {
  max-width: none !important;
}

.sec-mission.is-layout-constrained,
.sec-mission.wp-block-group.is-layout-constrained {
  max-width: none !important;
  width: 100% !important;
}

.sec-top-news.is-layout-constrained,
.sec-top-news.wp-block-group.is-layout-constrained {
  max-width: none !important;
  width: 100% !important;
}

.sec-hero .wp-block-cover {
  min-height: 50vh; /* デフォルト：スマホ用に小さく */
  width: 100% !important;
  max-width: none !important;
  position: relative;
  margin: 0 !important;
  padding-top: var(--space-4) !important; /* スマホ用のパディング */
  padding-bottom: var(--space-4) !important; /* スマホ用のパディング */
}

/* ヒーローアニメーション */
.hero-logo-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 2;
  overflow: visible;
  margin: 0;
  padding: 0;
}

.hero-animation-canvas {
  display: block;
  width: 100vw;
  height: 100vh;
}

/* 背景要素をロゴの下に配置 */
.sec-hero .wp-block-cover__background {
  position: relative;
  z-index: 0;
}

.sec-hero .wp-block-cover__inner-container {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  text-align: center;
}

.sec-hero .hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1.1;
  font-weight: 400;
  letter-spacing: -0.02em;
  text-align: center;
  margin: 0;
  padding: 0 var(--gutter);
}

/* デバイスサイズごとにヘッダーの高さを固定し、ヒーローセクションをその下に配置 */
/* インラインスタイルを上書きするため!importantを使用 */
/* 400px以下: ヘッダー高さ80px（小さいスマホ） */
@media (max-width: 400px) {
  .sec-hero,
  .sec-hero.wp-block-group {
    padding-top: var(--header-height-mobile) !important;
    padding-bottom: 0 !important;
    min-height: calc(100vh - var(--header-height-mobile)) !important; /* 画面全体からヘッダー分を引く */
    height: calc(100vh - var(--header-height-mobile)) !important;
  }

  .sec-hero .wp-block-cover {
    min-height: calc(100vh - var(--header-height-mobile)) !important;
    height: calc(100vh - var(--header-height-mobile)) !important;
    padding-top: var(--space-3) !important;
    padding-bottom: var(--space-3) !important;
  }
}

/* 401px - 640px: ヘッダー高さ85px（スマホ） */
@media (min-width: 401px) and (max-width: 640px) {
  .sec-hero,
  .sec-hero.wp-block-group {
    padding-top: var(--header-height-small) !important;
    padding-bottom: 0 !important;
    min-height: calc(100vh - var(--header-height-small)) !important; /* 画面全体からヘッダー分を引く */
    height: calc(100vh - var(--header-height-small)) !important;
  }

  .sec-hero .wp-block-cover {
    min-height: calc(100vh - var(--header-height-small)) !important;
    height: calc(100vh - var(--header-height-small)) !important;
    padding-top: var(--space-4) !important;
    padding-bottom: var(--space-4) !important;
  }
}

/* 641px - 1024px: ヘッダー高さ95px（タブレット） */
@media (min-width: 641px) and (max-width: 1024px) {
  .sec-hero,
  .sec-hero.wp-block-group {
    padding-top: var(--header-height-medium) !important;
    padding-bottom: 0 !important;
    min-height: 65vh !important; /* タブレット用の高さ */
  }

  .sec-hero .wp-block-cover {
    min-height: 65vh !important;
    padding-top: var(--space-6) !important;
    padding-bottom: var(--space-6) !important;
  }
}

/* 1025px以上: ヘッダー高さ105px（PC） */
@media (min-width: 1025px) {
  .sec-hero,
  .sec-hero.wp-block-group {
    padding-top: var(--header-height-large) !important;
    padding-bottom: 0 !important;
    min-height: 80vh !important; /* PC用の高さ */
  }

  .sec-hero .wp-block-cover {
    min-height: 80vh !important;
    padding-top: var(--wp--preset--spacing--20) !important;
    padding-bottom: var(--wp--preset--spacing--120) !important;
  }
}

/* aboutページの最初のセクションも同様にデバイスサイズごとにヘッダーの高さを設定 */
/* 400px以下: ヘッダー高さ80px */
@media (max-width: 400px) {
  .tpl-company .sec-company-mission,
  .tpl-company .sec-company-mission.wp-block-group {
    padding-top: var(--header-height-mobile) !important;
  }
}

/* 401px - 640px: ヘッダー高さ85px */
@media (min-width: 401px) and (max-width: 640px) {
  .tpl-company .sec-company-mission,
  .tpl-company .sec-company-mission.wp-block-group {
    padding-top: var(--header-height-small) !important;
  }
}

/* 641px - 1024px: ヘッダー高さ95px */
@media (min-width: 641px) and (max-width: 1024px) {
  .tpl-company .sec-company-mission,
  .tpl-company .sec-company-mission.wp-block-group {
    padding-top: var(--header-height-medium) !important;
  }
}

/* 1025px以上: ヘッダー高さ105px */
@media (min-width: 1025px) {
  .tpl-company .sec-company-mission,
  .tpl-company .sec-company-mission.wp-block-group {
    padding-top: var(--header-height-large) !important;
  }
}

/* ===== MISSION ===== */
.sec-mission {
  text-align: center;
  padding-block: calc(var(--space-9) * 1.5) !important;
  padding-top: calc(var(--wp--preset--spacing--80) * 1.5) !important;
  padding-bottom: calc(var(--wp--preset--spacing--80) * 1.5) !important;
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  background: var(--c-bg);
  border-radius: var(--r-marubi);
  padding-inline: var(--gutter);
}

.sec-mission .section-label {
  margin-bottom: var(--space-6);
  opacity: 0.6;
}

.sec-mission .mission-text {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  line-height: 1.8;
  letter-spacing: 0.05em;
  margin: 0;
  padding: 0;
  max-width: 95%;
  margin-left: auto;
  margin-right: auto;
}

/* スマホサイズの時のみ改行を表示 */
.sec-mission .mission-text .mobile-break {
  display: block;
}

@media (min-width: 641px) {
  .sec-mission .mission-text .mobile-break {
    display: none;
  }
}

/* 小さなフォントサイズのmission-textのマージン調整 */
.sec-mission .mission-text-small {
  margin-top: var(--space-4);
}

/* ===== TOP: Projects セクション ===== */
.tpl-front .sec-top-projects {
  position: relative;
  background: var(--c-bg);
  padding-top: var(--space-9);
  padding-bottom: calc(var(--space-9) + var(--space-6) + 520px); /* 4段目分の余白を追加（gap + card高さ） */
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding-inline: 0;
  overflow: visible;
  border-radius: var(--r-marubi);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* WordPressのconstrainedレイアウトの影響を無効化 */
.tpl-front .sec-top-projects.is-layout-constrained,
.tpl-front .sec-top-projects.wp-block-group.is-layout-constrained {
  max-width: none !important;
  width: 100% !important;
}

/* constrainedレイアウト内のalignwide要素を中央揃え */
.tpl-front .sec-top-projects.is-layout-constrained > .alignwide,
.tpl-front .sec-top-projects.wp-block-group.is-layout-constrained > .alignwide {
  margin-left: auto !important;
  margin-right: auto !important;
}

/* 背景ロゴ（Oの集合体）- 白背景の上に黒で塗りつぶし表示 */
.tpl-front .sec-top-projects::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 520 444'%3E%3Cg fill='%23000000'%3E%3C!-- 1段目 (y=148) --%3E%3Cellipse cx='325' cy='370' rx='65' ry='74'/%3E%3Cellipse cx='195' cy='370' rx='65' ry='74'/%3E%3C!-- 2段目 (y=74) --%3E%3Cellipse cx='390' cy='296' rx='65' ry='74'/%3E%3Cellipse cx='260' cy='296' rx='65' ry='74'/%3E%3Cellipse cx='130' cy='296' rx='65' ry='74'/%3E%3C!-- 3段目 (y=0) --%3E%3Cellipse cx='455' cy='222' rx='65' ry='74'/%3E%3Cellipse cx='325' cy='222' rx='65' ry='74'/%3E%3Cellipse cx='195' cy='222' rx='65' ry='74'/%3E%3Cellipse cx='65' cy='222' rx='65' ry='74'/%3E%3C!-- 4段目 (y=-74) --%3E%3Cellipse cx='390' cy='148' rx='65' ry='74'/%3E%3Cellipse cx='260' cy='148' rx='65' ry='74'/%3E%3Cellipse cx='130' cy='148' rx='65' ry='74'/%3E%3C!-- 5段目 (y=-148) --%3E%3Cellipse cx='325' cy='74' rx='65' ry='74'/%3E%3Cellipse cx='195' cy='74' rx='65' ry='74'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: 70% center;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
}

.tpl-front .sec-top-projects .header {
  margin-bottom: var(--space-8);
  align-items: center;
  position: relative;
  z-index: 2;
  /* 白背景を追加してロゴの上に重ねる */
  background: rgba(255, 255, 255, 0.95);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--r-marubi-inner);
  max-width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.tpl-front .sec-top-projects .header .h2 {
  color: var(--c-fg);
  margin: 0;
}

.tpl-front .sec-top-projects .header .all-link {
  color: var(--c-fg);
}

.tpl-front .sec-top-projects .wp-block-query {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  position: relative;
  z-index: 2;
  max-width: 80%;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100%;
}

/* alignwideクラスが影響している場合の対策 */
.tpl-front .sec-top-projects .wp-block-query.alignwide {
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 80% !important;
}

/* post-template内のproject-cardをグリッドで制御 */
.tpl-front .sec-top-projects .wp-block-post-template {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

/* リストアイテム（wp-block-post）内でproject-cardを中央寄せ */
.tpl-front .sec-top-projects .wp-block-post-template > li.wp-block-post {
  display: flex !important;
  justify-content: center !important;
  align-items: flex-start !important;
  width: 100%;
}

.tpl-front .sec-top-projects .wp-block-post-template > li.wp-block-post > .project-card,
.tpl-front .sec-top-projects .wp-block-post-template > li.wp-block-post > .wp-block-group.project-card {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}


@media (max-width: 640px) {
  .tpl-front .sec-top-projects {
    padding-block: var(--space-7);
  }

  .tpl-front .sec-top-projects .wp-block-query {
    gap: var(--space-5);
  }

  .tpl-front .sec-top-projects .header {
    margin-bottom: var(--space-6);
    margin-left: auto;
    margin-right: auto;
    padding: var(--space-3) var(--space-4);
  }
}

/* ===== NEWS SUMMARY ===== */
.sec-top-news {
  padding-block: var(--space-9);
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding-inline: var(--gutter);
  background: var(--c-bg);
  border-radius: var(--r-marubi);
}

.sec-top-news .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: var(--space-8);
}

.sec-top-news .header .h2 {
  margin: 0;
  color: var(--c-fg);
}

.sec-top-news .header .all-link {
  color: var(--c-fg);
}

.sec-top-news .wp-block-query {
  max-width: 100%;
}

@media (max-width: 640px) {
  .sec-top-news {
    padding-block: var(--space-7);
  }

  .sec-top-news .header {
    margin-bottom: var(--space-6);
  }
}

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--c-border);
  padding-block: var(--space-8);
  color: var(--c-muted);
  font-size: clamp(14px, 1.5vw, 16px);
  max-width: var(--max-w);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.site-footer .foot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
}

@media (max-width: 640px) {
  .site-footer {
    padding-block: var(--space-6);
  }

  .site-footer .foot-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* ===== グローバルスタイル調整 ===== */
.tpl-front {
  overflow-x: hidden;
  background: var(--c-gray);
  padding: 0;
}

/* projectsセクションの背景ロゴがはみ出すように、このセクションのみoverflowを許可 */
.tpl-front .sec-top-projects {
  overflow-x: visible;
}

.tpl-front .wp-block-group {
  width: 100%;
}

.tpl-front .alignwide {
  max-width: 100%;
  padding-inline: 0;
}

/* ===== ARCHIVE: Projects ページ ===== */
.tpl-archive-project {
  overflow-x: hidden;
  background: var(--c-bg);
  min-height: 100vh;
}

.tpl-archive-project .sec-archive-projects {
  position: relative;
  background: var(--c-bg);
  padding-top: var(--space-9);
  padding-bottom: var(--space-9);
  max-width: none;
  width: 100%;
  margin: 0;
  padding-inline: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* WordPressのconstrainedレイアウトの影響を無効化 */
.tpl-archive-project .sec-archive-projects.is-layout-constrained,
.tpl-archive-project .sec-archive-projects.wp-block-group.is-layout-constrained {
  max-width: none !important;
  width: 100% !important;
}

/* constrainedレイアウト内のalignwide要素を中央揃え */
.tpl-archive-project .sec-archive-projects.is-layout-constrained > .alignwide,
.tpl-archive-project .sec-archive-projects.wp-block-group.is-layout-constrained > .alignwide {
  margin-left: auto !important;
  margin-right: auto !important;
}

/* 背景ロゴ（Oの集合体）- 白背景の上に黒で塗りつぶし表示 */
.tpl-archive-project .sec-archive-projects::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 520 444'%3E%3Cg fill='%23000000'%3E%3C!-- 1段目 (y=148) --%3E%3Cellipse cx='325' cy='370' rx='65' ry='74'/%3E%3Cellipse cx='195' cy='370' rx='65' ry='74'/%3E%3C!-- 2段目 (y=74) --%3E%3Cellipse cx='390' cy='296' rx='65' ry='74'/%3E%3Cellipse cx='260' cy='296' rx='65' ry='74'/%3E%3Cellipse cx='130' cy='296' rx='65' ry='74'/%3E%3C!-- 3段目 (y=0) --%3E%3Cellipse cx='455' cy='222' rx='65' ry='74'/%3E%3Cellipse cx='325' cy='222' rx='65' ry='74'/%3E%3Cellipse cx='195' cy='222' rx='65' ry='74'/%3E%3Cellipse cx='65' cy='222' rx='65' ry='74'/%3E%3C!-- 4段目 (y=-74) --%3E%3Cellipse cx='390' cy='148' rx='65' ry='74'/%3E%3Cellipse cx='260' cy='148' rx='65' ry='74'/%3E%3Cellipse cx='130' cy='148' rx='65' ry='74'/%3E%3C!-- 5段目 (y=-148) --%3E%3Cellipse cx='325' cy='74' rx='65' ry='74'/%3E%3Cellipse cx='195' cy='74' rx='65' ry='74'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: 70% center;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
}

.tpl-archive-project .sec-archive-projects .header {
  margin-bottom: var(--space-8);
  align-items: center;
  position: relative;
  z-index: 2;
  /* 白背景を追加してロゴの上に重ねる */
  background: rgba(255, 255, 255, 0.95);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--r-marubi-inner);
  max-width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.tpl-archive-project .sec-archive-projects .header .h2,
.tpl-archive-project .sec-archive-projects .header .page-title {
  color: var(--c-fg);
  margin: 0;
}

.tpl-archive-project .wp-block-query {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  position: relative;
  z-index: 2;
  max-width: 80%;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100%;
}

/* alignwideクラスが影響している場合の対策 */
.tpl-archive-project .wp-block-query.alignwide {
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 80% !important;
}

/* post-template内のproject-cardをグリッドで制御 */
.tpl-archive-project .wp-block-post-template {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.tpl-archive-project .wp-block-post-template {
  margin: 0 !important;
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
}

.tpl-archive-project .wp-block-post-template > * {
  margin: 0 !important;
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
}

/* プロジェクトアイテム */
.tpl-archive-project .project-item,
.tpl-archive-project .wp-block-group.project-item {
  display: flex;
  gap: var(--space-5);
  align-items: flex-start;
  padding: var(--space-6);
  margin: 0 !important;
  margin-bottom: 0 !important;
  margin-top: 0 !important;
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
  background: #ffffff;
  border-radius: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tpl-archive-project .project-item:first-child {
  border-top-left-radius: var(--r-marubi);
  border-top-right-radius: var(--r-marubi);
}

.tpl-archive-project .project-item:last-child {
  border-bottom-left-radius: var(--r-marubi);
  border-bottom-right-radius: var(--r-marubi);
  border-bottom: none;
}

.tpl-archive-project .project-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* プロジェクトサムネイル */
.tpl-archive-project .project-thumb {
  flex-shrink: 0;
  width: 150px;
  height: 150px;
  aspect-ratio: 1/1;
  overflow: hidden;
  border-radius: var(--r-marubi-inner);
  border: 1px solid var(--c-border);
  background: var(--c-gray);
}

.tpl-archive-project .project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.tpl-archive-project .project-item:hover .project-thumb img {
  transform: scale(1.05);
}

/* プロジェクトコンテンツ */
.tpl-archive-project .project-content {
  flex: 1;
  min-width: 0;
}

/* プロジェクトタイトル */
.tpl-archive-project .project-title {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.02em;
  margin: 0 0 var(--space-2) 0;
}

.tpl-archive-project .project-title a {
  color: var(--c-fg);
  text-decoration: none;
}

.tpl-archive-project .project-title a:hover {
  opacity: 0.7;
}

/* プロジェクト説明文 */
.tpl-archive-project .project-excerpt,
.tpl-archive-project .wp-block-post-excerpt.project-excerpt,
.tpl-archive-project .project-excerpt p,
.tpl-archive-project .wp-block-post-excerpt.project-excerpt p {
  font-size: clamp(14px, 1.5vw, 16px);
  line-height: 1.8;
  letter-spacing: 0.02em;
  color: var(--c-muted);
  margin: 0 0 var(--space-3) 0 !important;
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* プロジェクトアクション */
.tpl-archive-project .project-actions {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  margin-top: var(--space-2);
}

.tpl-archive-project .project-instagram-link {
  margin: 0;
}

.tpl-archive-project .project-instagram-link a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 40px;
  height: 40px;
  padding: 0;
  background: #E4405F;
  color: #ffffff;
  text-decoration: none;
  border-radius: 50%;
  font-size: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.tpl-archive-project .project-instagram-link a:hover {
  opacity: 0.9;
  transform: translateY(-1px) scale(1.05);
}

.tpl-archive-project .project-instagram-link a svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.tpl-archive-project .project-instagram-link:empty {
  display: none;
}

/* 追加説明文のトグル */
.tpl-archive-project .project-toggle-desc {
  margin: 0;
}

.tpl-archive-project .project-toggle-desc button {
  background: transparent;
  border: 1px solid var(--c-border);
  color: var(--c-fg);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  font-size: clamp(12px, 1.3vw, 14px);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tpl-archive-project .project-toggle-desc button:hover {
  background: var(--c-gray);
  border-color: var(--c-fg);
}

.tpl-archive-project .project-toggle-desc:empty {
  display: none;
}

/* 追加説明文 */
.tpl-archive-project .project-additional-desc {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--c-border);
}

.tpl-archive-project .project-additional-text {
  font-size: clamp(14px, 1.5vw, 16px);
  line-height: 1.8;
  letter-spacing: 0.02em;
  color: var(--c-muted);
  margin: 0;
}

/* ページネーション */
.tpl-archive-project .wp-block-query-pagination {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.tpl-archive-project .wp-block-query-pagination a {
  color: #ffffff;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.tpl-archive-project .wp-block-query-pagination a:hover {
  opacity: 0.7;
}

.tpl-archive-project .wp-block-query-pagination .wp-block-query-pagination-numbers {
  color: #ffffff;
}

/* PC表示時：カードを大きく、存在感を出す */
@media (min-width: 641px) {
  .tpl-archive-project .project-item {
    padding: var(--space-8);
    gap: var(--space-6);
  }

  .tpl-archive-project .project-thumb {
    width: 400px;
    height: 400px;
  }

  .tpl-archive-project .project-title {
    font-size: clamp(24px, 2.5vw, 32px);
    font-weight: 500;
  }
}

/* より大きな画面ではさらに大きく */
@media (min-width: 1024px) {
  .tpl-archive-project .project-thumb {
    width: 480px;
    height: 480px;
  }
}

/* レスポンシブ */
@media (max-width: 768px) {
  .tpl-archive-project .project-thumb {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 640px) {
  .tpl-archive-project .sec-archive-projects {
    padding-block: var(--space-7);
  }

  .tpl-archive-project .page-title {
    margin-bottom: var(--space-6);
  }

  .tpl-archive-project .project-item {
    padding: var(--space-5);
    gap: var(--space-4);
  }
}

/* ===== COMPANY ページ ===== */
.tpl-company {
  overflow-x: hidden;
  background: var(--c-gray);
  min-height: 100vh;
  padding: 0;
}

/* Mission セクション */
.tpl-company .sec-company-mission {
  padding-block: var(--space-9);
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding-inline: var(--gutter);
  background: var(--c-bg);
  border-radius: var(--r-marubi);
  /* デバイスサイズごとにヘッダーの高さ分のpadding-topを設定 */
  /* インラインスタイルを上書きするため!importantを使用 */
  padding-top: var(--header-height-mobile) !important; /* デフォルト（400px以下）: ヘッダー高さ80px */
}

.tpl-company .sec-company-mission .wp-block-columns {
  align-items: flex-start;
  gap: var(--space-8);
}

.tpl-company .sec-company-mission .section-label {
  opacity: 0.6;
  margin: 0;
  text-align: left;
  font-size: clamp(1.05rem, 2.1vw, 1.4rem) !important; /* 70%に縮小 */
}

/* PC表示：カラム内のコンテンツを左揃え */
@media (min-width: 641px) {
  .tpl-company .sec-company-mission .wp-block-column:last-child {
    text-align: left;
  }
}

.tpl-company .sec-company-mission .mission-content {
  display: flex;
  flex-direction: column;
  gap: 0 !important; /* gapを無効化して個別のマージンで制御 */
}

/* 各段落のマージンを個別に設定 */
.tpl-company .sec-company-mission .mission-content .mission-text:nth-child(1) {
  margin-bottom: var(--space-5) !important;
}

.tpl-company .sec-company-mission .mission-content .mission-text:nth-child(2) {
  margin-bottom: var(--space-2) !important;
  margin-top: 0 !important;
}

.tpl-company .sec-company-mission .mission-content .mission-text:nth-child(3) {
  margin-top: 0 !important;
}

/* is-layout-constrainedによる中央揃えを無効化 */
.tpl-company .sec-company-mission .mission-content.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* PC表示：左揃え */
@media (min-width: 641px) {
  .tpl-company .sec-company-mission .mission-content {
    text-align: left;
  }

  .tpl-company .sec-company-mission .mission-content.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .tpl-company .sec-company-mission .mission-text {
    text-align: left !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

.tpl-company .sec-company-mission .mission-text {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  line-height: 1.8;
  letter-spacing: 0.05em;
  margin: 0;
  padding: 0;
  text-align: left;
}

/* 2番目と3番目のmission-textのフォントサイズを小さくする（「代表取締役社長」と同じサイズ） */
.tpl-company .sec-company-mission .mission-content .mission-text:nth-child(2),
.tpl-company .sec-company-mission .mission-content .mission-text:nth-child(3) {
  font-size: clamp(0.9rem, 1.5vw, 1.1rem) !important;
}

/* 2番目と3番目のmission-textの間のマージンを狭くする */
.tpl-company .sec-company-mission .mission-content .mission-text:nth-child(2) {
  margin-bottom: var(--space-2) !important;
}

.tpl-company .sec-company-mission .mission-content .mission-text:nth-child(3) {
  margin-top: 0 !important;
}

/* WordPressのconstrainedレイアウトの影響を無効化 */
.tpl-company .sec-company-mission.is-layout-constrained,
.tpl-company .sec-company-mission.wp-block-group.is-layout-constrained,
.tpl-company .sec-company-profile.is-layout-constrained,
.tpl-company .sec-company-profile.wp-block-group.is-layout-constrained,
.tpl-company .sec-company-message.is-layout-constrained,
.tpl-company .sec-company-message.wp-block-group.is-layout-constrained {
  max-width: none !important;
  width: 100% !important;
}

/* 3つのセクション（mission-content、company-profile-list、message-content）の左右を揃える */
/* CEO PROFILEの右側に合わせて、MISSIONとCOMPANYの右側を揃える */
.tpl-company .sec-company-mission .mission-content,
.tpl-company .sec-company-mission .mission-content.is-layout-constrained,
.tpl-company .sec-company-profile .company-profile-list,
.tpl-company .sec-company-profile .company-profile-list.is-layout-constrained,
.tpl-company .sec-company-message .message-content,
.tpl-company .sec-company-message .message-content.is-layout-constrained {
  max-width: 100% !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* constrainedレイアウトの子要素（段落など）のmax-widthとmarginを無効化 */
.tpl-company .sec-company-mission .mission-content.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)),
.tpl-company .sec-company-profile .company-profile-list.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)),
.tpl-company .sec-company-message .message-content.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100% !important;
}

/* 75%カラム内のコンテンツの左右を揃える */
.tpl-company .wp-block-column[style*="flex-basis:75%"] > .wp-block-group {
  max-width: 100% !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* mission-textのパディングとマージンをリセット */
.tpl-company .sec-company-mission .mission-text {
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}

/* profile-itemの左側のパディングをリセット */
.tpl-company .sec-company-profile .profile-item {
  padding-left: 0 !important;
  margin-left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* message-textのパディングとマージンをリセット */
.tpl-company .sec-company-message .message-text {
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}

/* Company Profile セクション */
.tpl-company .sec-company-profile {
  padding-block: var(--space-9);
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding-inline: var(--gutter);
  background: var(--c-bg);
  border-radius: var(--r-marubi);
}

.tpl-company .sec-company-profile .wp-block-columns {
  align-items: flex-start;
  gap: var(--space-8);
}

.tpl-company .sec-company-profile .section-label {
  opacity: 0.6;
  margin: 0;
  text-align: left;
  font-size: clamp(1.05rem, 2.1vw, 1.4rem) !important; /* 70%に縮小 */
}

.tpl-company .company-profile-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  width: 100%;
}

.tpl-company .profile-item {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1.5px dashed var(--c-border);
  width: 100%;
}

.tpl-company .profile-label {
  font-size: clamp(14px, 1.5vw, 16px);
  letter-spacing: 0.05em;
  font-weight: 400;
  margin: 0;
  width: 150px;
  flex-shrink: 0;
  color: var(--c-muted);
  text-align: left;
}

.tpl-company .profile-value {
  font-size: clamp(16px, 1.8vw, 18px);
  letter-spacing: 0.02em;
  font-weight: 400;
  margin: 0;
  flex: 1;
  min-width: 0;
  color: var(--c-fg);
  text-align: left;
}

/* 代表挨拶 セクション */
.tpl-company .sec-company-message {
  padding-block: var(--space-9);
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding-inline: var(--gutter);
  background: var(--c-bg);
  border-radius: var(--r-marubi);
}

.tpl-company .sec-company-message .wp-block-columns {
  align-items: flex-start;
  gap: var(--space-8);
}

.tpl-company .sec-company-message .section-label {
  opacity: 0.6;
  margin: 0;
  text-align: left;
  font-size: clamp(1.05rem, 2.1vw, 1.4rem) !important; /* 70%に縮小 */
}

.tpl-company .message-content {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: left !important;
}

/* is-layout-constrainedによる中央揃えを無効化 */
.tpl-company .message-content.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: 100% !important;
}

.tpl-company .message-text {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  line-height: 1.8;
  letter-spacing: 0.05em;
  margin: 0;
  color: var(--c-fg);
  text-align: left !important;
}

.tpl-company .message-text.has-text-align-left {
  text-align: left !important;
}

/* 「代表取締役社長」と「岡本啓太郎」の間のスペースを短くする */
.tpl-company .message-content .message-text:first-child {
  margin-bottom: 0 !important;
  font-size: clamp(0.9rem, 1.5vw, 1.1rem) !important;
  color: var(--c-muted) !important;
  line-height: 1.4 !important;
}

.tpl-company .message-content .message-text:nth-child(2) {
  margin-top: 0 !important;
  margin-bottom: var(--space-5) !important;
}

.tpl-company .message-content .message-text:nth-child(3) {
  margin-top: 0 !important;
  font-size: clamp(0.9rem, 1.5vw, 1.1rem) !important;
}

.tpl-company .message-signature {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  line-height: 1.8;
  letter-spacing: 0.05em;
  margin: var(--space-6) 0 0 0;
  text-align: right;
  color: var(--c-fg);
}

/* レスポンシブ */
@media (max-width: 640px) {
  .tpl-company .sec-company-mission,
  .tpl-company .sec-company-profile,
  .tpl-company .sec-company-message {
    padding-block: var(--space-7);
  }

  .tpl-company .sec-company-mission .wp-block-columns,
  .tpl-company .sec-company-profile .wp-block-columns,
  .tpl-company .sec-company-message .wp-block-columns {
    flex-direction: column;
    gap: var(--space-6);
  }

  .tpl-company .sec-company-mission .section-label,
  .tpl-company .sec-company-profile .section-label,
  .tpl-company .sec-company-message .section-label {
    text-align: center;
    margin-bottom: var(--space-2) !important; /* スマホサイズでは小さく */
  }

  .tpl-company .sec-company-mission .mission-content {
    text-align: center;
  }

  .tpl-company .sec-company-mission .mission-text {
    text-align: center;
  }

  .tpl-company .profile-item {
    flex-direction: column;
    gap: var(--space-1);
    padding: var(--space-2) 0;
  }

  .tpl-company .profile-label {
    min-width: auto;
    margin-bottom: 0;
  }

  .tpl-company .profile-value {
    margin-top: 0;
  }

  .tpl-company .message-signature {
    text-align: left;
    margin-top: var(--space-5);
  }
}

/* ===== ARCHIVE: News ページ ===== */
.tpl-archive-news {
  overflow-x: hidden;
  background: var(--c-bg);
  min-height: 100vh;
}

.tpl-archive-news .sec-archive-news {
  padding-top: var(--space-9);
  padding-bottom: var(--space-9);
  max-width: var(--max-w);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.tpl-archive-news .sec-archive-news .header {
  margin-bottom: var(--space-8);
  align-items: center;
}

.tpl-archive-news .sec-archive-news .header .h2,
.tpl-archive-news .sec-archive-news .header .page-title {
  color: var(--c-fg);
  margin: 0;
}

.tpl-archive-news .wp-block-query {
  max-width: 100%;
}

/* ニュースアイテム */
.tpl-archive-news .news-item {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: var(--space-6);
  align-items: flex-start;
  padding: calc(var(--space-6) * 0.578) calc(var(--space-5) * 0.578);
  border: 1px solid var(--c-border);
  border-radius: var(--r-marubi-inner);
  background: var(--c-bg);
  transition: all 0.2s ease;
  margin-bottom: var(--space-4);
  position: relative;
  cursor: pointer;
}

.tpl-archive-news .news-item:hover {
  opacity: 0.8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tpl-archive-news .news-item:last-child {
  margin-bottom: 0;
}

/* ニュースサムネイル */
.tpl-archive-news .news-thumb {
  flex-shrink: 0;
  width: 170px;
  height: 170px;
  aspect-ratio: 1/1;
  overflow: hidden; /* パディングを設けるためhiddenに変更 */
  border-radius: var(--r-marubi-inner);
  border: 1px solid var(--c-border);
  background: #fff;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2); /* 角丸枠と画像の間にパディング */
  box-sizing: border-box; /* パディングを含めたサイズ計算 */
}

.tpl-archive-news .news-thumb figure,
.tpl-archive-news .news-thumb .wp-block-post-featured-image,
.tpl-archive-news .news-thumb .wp-block-post-featured-image figure {
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

.tpl-archive-news .news-thumb img,
.tpl-archive-news .news-thumb figure img,
.tpl-archive-news .news-thumb .wp-block-post-featured-image img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
  border-radius: 0;
  transition: transform 0.5s ease;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

.tpl-archive-news .news-item:hover .news-thumb img {
  transform: scale(1.05);
}

/* ニュースコンテンツ */
.tpl-archive-news .news-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* メタ情報グループ（日付とタグ） */
.tpl-archive-news .news-meta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

/* 日付 */
.tpl-archive-news .news-date {
  font-size: clamp(12px, 1.3vw, 14px);
  color: var(--c-muted);
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
  margin: 0;
}

/* タグ */
.tpl-archive-news .news-tag {
  font-size: clamp(12px, 1.3vw, 14px);
  color: var(--c-fg);
  letter-spacing: 0.05em;
  margin: 0;
}

.tpl-archive-news .news-tag a {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-pill);
  text-decoration: none;
  color: var(--c-fg);
  transition: all 0.2s ease;
}

.tpl-archive-news .news-tag a:hover {
  background: var(--c-fg);
  color: var(--c-bg);
}

/* ニュースタイトル */
.tpl-archive-news .news-title {
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 0.02em;
  margin: 0;
}

.tpl-archive-news .news-title a {
  color: var(--c-fg);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.tpl-archive-news .news-title a:hover {
  opacity: 0.7;
}

/* 画像がない場合のレイアウト調整 */
.tpl-archive-news .news-item:not(:has(.news-thumb img)) {
  grid-template-columns: 1fr;
}

.tpl-archive-news .news-item:not(:has(.news-thumb img)) .news-thumb {
  display: none;
}

/* ページネーション */
.tpl-archive-news .wp-block-query-pagination {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--c-border);
}

.tpl-archive-news .wp-block-query-pagination a {
  color: var(--c-fg);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.tpl-archive-news .wp-block-query-pagination a:hover {
  opacity: 0.7;
}

/* PC表示時：サムネイルを大きく */
@media (min-width: 641px) {
  .tpl-archive-news .news-item {
    grid-template-columns: 238px 1fr;
    gap: var(--space-8);
    padding: calc(var(--space-8) * 0.578) calc(var(--space-6) * 0.578);
  }

  .tpl-archive-news .news-thumb {
    width: 238px;
    height: 238px;
    aspect-ratio: 1/1;
    padding: var(--space-2); /* 角丸枠と画像の間にパディング */
    overflow: hidden; /* パディングを設けるためhiddenに変更 */
  }

  .tpl-archive-news .news-title {
    font-size: clamp(18px, 2vw, 24px);
  }
}

/* レスポンシブ */
@media (max-width: 640px) {
  .tpl-archive-news .sec-archive-news {
    padding-block: var(--space-7);
  }

  .tpl-archive-news .news-item {
    grid-template-columns: 1fr;
    gap: var(--space-4);
    padding: calc(var(--space-5) * 0.578) calc(var(--space-4) * 0.578);
  }

  .tpl-archive-news .news-thumb {
    width: 50% !important; /* スマホで画像サイズを半分に */
    height: auto !important;
    aspect-ratio: 1/1 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: var(--space-2) !important; /* 角丸枠と画像の間にパディング */
    overflow: hidden !important; /* パディングを設けるためhiddenに変更 */
    box-sizing: border-box !important;
  }
  
  .tpl-archive-news .news-thumb figure,
  .tpl-archive-news .news-thumb .wp-block-post-featured-image,
  .tpl-archive-news .news-thumb .wp-block-post-featured-image figure {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }
  
  .tpl-archive-news .news-thumb img,
  .tpl-archive-news .news-thumb figure img,
  .tpl-archive-news .news-thumb .wp-block-post-featured-image img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  .tpl-archive-news .news-meta-group {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }
}

/* ===== ニュース詳細ページ ===== */
.tpl-single-news .sec-single-news {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.tpl-single-news .sec-single-news .header {
  margin-bottom: var(--space-8);
}

/* メタ情報 */
.tpl-single-news .news-single-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.tpl-single-news .news-single-meta .news-date {
  font-size: clamp(14px, 1.5vw, 16px);
  color: var(--c-muted);
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
  margin: 0;
}

.tpl-single-news .news-single-meta .news-tag {
  font-size: clamp(14px, 1.5vw, 16px);
  color: var(--c-fg);
  letter-spacing: 0.05em;
  margin: 0;
}

.tpl-single-news .news-single-meta .news-tag a {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-pill);
  text-decoration: none;
  color: var(--c-fg);
  transition: all 0.2s ease;
}

.tpl-single-news .news-single-meta .news-tag a:hover {
  background: var(--c-fg);
  color: var(--c-bg);
}

/* コンテンツエリア */
.tpl-single-news .news-single-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* タイトル */
.tpl-single-news .news-single-title {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  line-height: 1.6;
  letter-spacing: 0.05em;
  font-weight: 400;
  margin: 0 0 var(--space-6) 0;
  color: var(--c-fg);
}

/* 画像 */
.tpl-single-news .news-single-image {
  width: 50% !important;
  max-width: 50% !important;
  margin: 0 auto var(--space-6) auto !important;
  aspect-ratio: 16/9 !important;
  overflow: hidden !important;
  border-radius: var(--r-marubi-inner) !important;
  border: 1px solid var(--c-border) !important;
  background: #fff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: var(--space-2) !important;
  box-sizing: border-box !important; /* パディングを含めたサイズ計算 */
}

.tpl-single-news .news-single-image figure,
.tpl-single-news .news-single-image .wp-block-post-featured-image,
.tpl-single-news .news-single-image .wp-block-post-featured-image figure {
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

.tpl-single-news .news-single-image img,
.tpl-single-news .news-single-image figure img,
.tpl-single-news .news-single-image .wp-block-post-featured-image img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
  border-radius: 0 !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 本文コンテンツ */
.tpl-single-news .news-single-content .wp-block-post-content {
  font-size: clamp(16px, 1.8vw, 18px);
  line-height: 1.8;
  letter-spacing: 0.02em;
  color: var(--c-fg);
}

.tpl-single-news .news-single-content .wp-block-post-content p {
  margin-bottom: var(--space-5);
}

.tpl-single-news .news-single-content .wp-block-post-content h2,
.tpl-single-news .news-single-content .wp-block-post-content h3,
.tpl-single-news .news-single-content .wp-block-post-content h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  line-height: 1.6;
  letter-spacing: 0.05em;
  font-weight: 400;
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
  color: var(--c-fg);
}

.tpl-single-news .news-single-content .wp-block-post-content a {
  color: var(--c-fg);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: opacity 0.2s ease;
}

.tpl-single-news .news-single-content .wp-block-post-content a:hover {
  opacity: 0.7;
}

/* レスポンシブ */
@media (max-width: 1024px) {
  .tpl-single-news .sec-single-news .wp-block-columns {
    flex-direction: column;
  }
  
  .tpl-single-news .sec-single-news .wp-block-column[style*="flex-basis:30%"] {
    flex-basis: 100% !important;
  }
  
  .tpl-single-news .sec-single-news .wp-block-column[style*="flex-basis:70%"] {
    flex-basis: 100% !important;
  }
  
  .tpl-single-news .news-single-meta {
    flex-direction: row;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
  }
}

@media (max-width: 640px) {
  .tpl-single-news .sec-single-news {
    padding-top: var(--space-7) !important;
    padding-bottom: var(--space-7) !important;
  }
  
  .tpl-single-news .sec-single-news .header {
    margin-bottom: var(--space-6);
  }
  
  .tpl-single-news .news-single-title {
    font-size: clamp(1.25rem, 4vw, 1.75rem);
    margin-bottom: var(--space-5);
  }
  
  .tpl-single-news .news-single-image {
    width: 50% !important;
    max-width: 50% !important;
    margin-bottom: var(--space-5) !important;
    padding: var(--space-2) !important; /* 角丸枠と画像の間にパディング */
    box-sizing: border-box !important;
  }
  
  .tpl-single-news .news-single-image figure,
  .tpl-single-news .news-single-image .wp-block-post-featured-image,
  .tpl-single-news .news-single-image .wp-block-post-featured-image figure {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }
  
  .tpl-single-news .news-single-image img,
  .tpl-single-news .news-single-image figure img,
  .tpl-single-news .news-single-image .wp-block-post-featured-image img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }
  
  .tpl-single-news .news-single-content {
    gap: var(--space-5);
  }
  
  .tpl-single-news .news-single-content .wp-block-post-content {
    font-size: clamp(15px, 2vw, 17px);
  }
  
  .tpl-single-news .news-single-content .wp-block-post-content p {
    margin-bottom: var(--space-4);
  }
}