/*
Theme Name: TT4 ITP Hybrid
Theme URI: https://example.invalid/
Description: Twenty Twenty-Four child theme for ITP site. Hybrid: Top page block-editable, other pages classic editor.
Author: GORI Style
Template: twentytwentyfour
Version: 0.1.0
Text Domain: tt4-itp-hybrid
*/

/* ここには「どうしても」な微調整だけを書く（基本は theme.json で制御） */

/* フロントのHero周り：見出しが長い時の折り返し耐性 */
.itp-hero-title {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* フロントのカード見出し：2行で揃える（見た目を整える） */
.itp-card-title a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.itp-lang-switch .wp-block-button__link{
  border-radius:999px;
  line-height:1;
}
/* -------------------------------------------------
   NEWS archive: date + vertical line list
------------------------------------------------- */
.itp-newsline{
  border-top:1px solid rgba(102,112,133,.25);
}

.itp-newsline__item{
  display:flex;
  gap:18px;
  padding:14px 0;
  border-bottom:1px solid rgba(102,112,133,.18);
}

.itp-newsline__date{
  width:140px;
  position:relative;
  color:#667085;
  font-size:.95rem;
  line-height:1.4;
  padding-top:2px;
}

/* vertical line */
.itp-newsline__date:after{
  content:"";
  position:absolute;
  right:10px;
  top:0;
  bottom:0;
  width:2px;
  background:rgba(102,112,133,.18);
  border-radius:2px;
}

/* dot */
.itp-newsline__ymd{
  display:inline-block;
  position:relative;
  padding-right:24px;
}
.itp-newsline__ymd:after{
  content:"";
  position:absolute;
  right:3px;
  top:50%;
  transform:translateY(-50%);
  width:10px;
  height:10px;
  border-radius:999px;
  background:rgba(91,73,198,.85);
}

.itp-newsline__body{
  flex:1;
  min-width:0;
}

.itp-newsline__title{
  display:flex;
  gap:10px;
  align-items:baseline;
  flex-wrap:wrap;
}

.itp-newsline__title a{
  color:#1B1E28;
  text-decoration:none;
  font-weight:700;
  line-height:1.5;
}
.itp-newsline__title a:hover{
  text-decoration:underline;
}

.itp-newsline__excerpt{
  margin-top:6px;
  color:#667085;
  line-height:1.7;
  font-size:.95rem;
}

.itp-newsline__draft{
  font-size:.85rem;
  color:#667085;
  opacity:.75;
}

/* responsive */
@media (max-width: 640px){
  .itp-newsline__item{ gap:12px; }
  .itp-newsline__date{ width:112px; font-size:.9rem; }
  .itp-newsline__date:after{ right:6px; }
  .itp-newsline__ymd{ padding-right:18px; }
  .itp-newsline__ymd:after{ width:9px;height:9px; right:0; }
}

/* Header */
.itp-header{
  border-bottom:1px solid rgba(0,0,0,.08);
  padding:18px 0;
}
.itp-header__inner{
  max-width:1100px;
  margin:0 auto;
  padding:0 16px;
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.itp-site-title{
  font-size:1.8rem;
  font-weight:700;
  text-decoration:none;
  /*color:#5B49C6;*/
  color:#333;
}
.itp-header__nav{
  display:flex;
  align-items:center;
  gap:18px;
}
.itp-menu{
  list-style:none;
  display:flex;
  gap:18px;
  margin:0;
  padding:0;
}
.itp-menu a{
  text-decoration:none;
  color:#1B1E28;
}
.itp-lang{
  display:flex;
  gap:6px;
}
.itp-lang a{
  padding:6px 12px;
  border-radius:999px;
  font-size:.85rem;
  text-decoration:none;
}
.itp-lang__jp{
  background:#5B49C6;
  color:#fff;
}
.itp-lang__en{
  border:1px solid #5B49C6;
  color:#5B49C6;
}

/* Footer */
.itp-footer{
  margin-top:60px;
  padding:24px 0;
  border-top:1px solid rgba(0,0,0,.08);
}
.itp-footer__inner{
  max-width:1100px;
  margin:0 auto;
  padding:0 16px;
}
.itp-footer__copy{
  color:#667085;
  font-size:.9rem;
}
.itp-footer__inner{
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 16px;
}

.itp-footer__nav{
  margin-bottom: 10px;
}

.itp-footer__menu{
  list-style: none;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
}

.itp-footer__menu a{
  text-decoration: none;
  font-size: 0.95rem;
}

.itp-footer__menu a:hover{
  text-decoration: underline;
}

/* =========================
   Front Page (classic)
========================= */
.itp-front .itp-container{
  max-width:1100px;
  margin:0 auto;
  padding:0 16px;
}

.itp-hero{
  position:relative;
  min-height:520px;
  display:flex;
  align-items:flex-start;
  padding:0;
  border-bottom:1px solid rgba(0,0,0,.06);
}
.itp-hero__bg{
  position:absolute;
  inset:0;
  background-color:#e9edf6;
  background-repeat:no-repeat;
  background-position:center;
  background-size:cover;
}

.itp-hero__inner{
  position:relative;
  width:100%;
  max-width:1100px;
  margin:0 auto;
  padding:18px 16px 0;
  display:flex;
  justify-content:flex-end;
}
.itp-hero__card{
  margin-top:78px;
  background:rgba(255,255,255,.92);
  border-radius:16px;
  padding:18px 18px 16px;
  max-width:520px;
  box-shadow:0 10px 30px rgba(0,0,0,.08);
  backdrop-filter:saturate(140%) blur(6px);
}
.itp-hero__kicker{
  color:#667085;
  font-size:.95rem;
  letter-spacing:.02em;
  margin-bottom:8px;
}
.itp-hero__title{
  margin:0 0 10px;
  line-height:1.15;
}
.itp-hero__desc{
  margin:0 0 14px;
  color:#667085;
  line-height:1.8;
}
.itp-hero__buttons{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.itp-btn{
  display:inline-block;
  text-decoration:none;
  border-radius:999px;
  padding:10px 16px;
  font-size:.95rem;
  line-height:1;
}
.itp-btn--primary{
  background:#5B49C6;
  color:#fff;
}
.itp-btn--outline{
  border:1px solid #5B49C6;
  color:#5B49C6;
  background:transparent;
}

.itp-section{
  padding:34px 0;
}
.itp-section--intro{
  padding-top:26px;
}

.itp-section__head{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:12px;
  margin-bottom:14px;
}
.itp-section__title{
  margin:0;
}
.itp-link{
  color:#5B49C6;
  text-decoration:none;
  border-bottom:1px dotted rgba(91,73,198,.6);
}
.itp-link:hover{ opacity:.85; }

.itp-muted{ color:#667085; }

/* Reuse the date+line style (same as category-news) */
.itp-newsline{
  border-top:1px solid rgba(102,112,133,.25);
}
.itp-newsline__item{
  display:flex;
  gap:18px;
  padding:14px 0;
  border-bottom:1px solid rgba(102,112,133,.18);
}
.itp-newsline__date{
  width:140px;
  position:relative;
  color:#667085;
  font-size:.95rem;
  line-height:1.4;
  padding-top:2px;
}
.itp-newsline__date:after{
  content:"";
  position:absolute;
  right:10px;
  top:0;
  bottom:0;
  width:2px;
  background:rgba(102,112,133,.18);
  border-radius:2px;
}
.itp-newsline__ymd{
  display:inline-block;
  position:relative;
  padding-right:24px;
}
.itp-newsline__ymd:after{
  content:"";
  position:absolute;
  right:3px;
  top:50%;
  transform:translateY(-50%);
  width:10px;
  height:10px;
  border-radius:999px;
  background:rgba(91,73,198,.85);
}
.itp-newsline__body{
  flex:1;
  min-width:0;
}
.itp-newsline__title{
  display:flex;
  gap:10px;
  align-items:baseline;
  flex-wrap:wrap;
}
.itp-newsline__title a{
  color:#1B1E28;
  text-decoration:none;
  font-weight:700;
  line-height:1.5;
}
.itp-newsline__title a:hover{ text-decoration:underline; }
.itp-newsline__excerpt{
  margin-top:6px;
  color:#667085;
  line-height:1.7;
  font-size:.95rem;
}
.itp-newsline__draft{
  font-size:.85rem;
  color:#667085;
  opacity:.75;
}
.itp-newsline__new{
  display:inline-block;
  margin-left:8px;
  padding:2px 8px;
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.06em;
  border-radius:999px;
  background: var(--wp--preset--color--itp-purple);
  color:#fff;
  vertical-align:middle;
}

@media (max-width: 640px){
  .itp-hero{ min-height:460px; }
  .itp-hero__card{ margin-top:60px; }
  .itp-newsline__item{ gap:12px; }
  .itp-newsline__date{ width:112px; font-size:.9rem; }
  .itp-newsline__date:after{ right:6px; }
  .itp-newsline__ymd{ padding-right:18px; }
  .itp-newsline__ymd:after{ width:9px;height:9px; right:0; }
}
.itp-newsline__cat{
  display:inline-block;
  font-size:.75rem;
  font-weight:600;
  letter-spacing:.02em;
  padding:4px 10px;
  border-radius:999px;
  background:rgba(91,73,198,.12);
  color:#5B49C6;
  margin-right:10px;
}
/* =========================
   Category Label Base
========================= */
.itp-newsline__cat{
  display:inline-block;
  font-size:.72rem;
  font-weight:600;
  letter-spacing:.02em;
  padding:4px 10px;
  border-radius:999px;
  margin-right:10px;
  background:#eef0ff;
  color:#5B49C6;
}

/* =========================
   Category Color Variations
   WordPress automatically adds:
   category-スラッグ
========================= */

/* 募集 */
.category-recruit .itp-newsline__cat{
  background:#e9f2ff;
  color:#3563e9;
}

/* 活動報告 */
.category-report .itp-newsline__cat{
  background:#eefaf4;
  color:#0f8f6a;
}

/* お知らせ */
.category-news .itp-newsline__cat{
  background:#f3eaff;
  color:#6d3ccf;
}
/* Label base */
.itp-newsline__cat{
  display:inline-block;
  font-size:.72rem;
  font-weight:600;
  letter-spacing:.02em;
  padding:4px 10px;
  border-radius:999px;
  margin-right:10px;
  background:#eef0ff;
  color:#5B49C6;
}

/* Category color variations */
.category-recruit .itp-newsline__cat{ background:#e9f2ff; color:#3563e9; } /* 募集 */
.category-report  .itp-newsline__cat{ background:#eefaf4; color:#0f8f6a; } /* 活動報告 */
.category-news    .itp-newsline__cat{ background:#f3eaff; color:#6d3ccf; } /* お知らせ */

.itp-hero__title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ===== Site Title Adjustment ===== */

.site-title a {
  font-size: 1.25rem;
  letter-spacing: 0.06em;
  font-weight: 600;
  text-decoration: none;
  position: relative;
}

.site-title a::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #5B49C6 0%, #3F2D9B 100%);
  margin-top: 6px;
  opacity: 0.6;
}
/* ===== HERO Title Adjustment ===== */

.itp-hero__title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.itp-hero__kicker {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}
.itp-hero__card {
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* =========================
   Page/Post Title Bar (Full width)
========================= */
.itp-pagehead{
  width: 100%;
  background: var(--wp--preset--color--light-gray);
  padding: 26px 0;
}

.itp-pagehead__inner{
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px;
}

.itp-pagehead__title{
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: var(--wp--preset--color--ink);
}

.itp-pagehead__meta{
  margin-top: 10px;
  color: var(--wp--preset--color--gray);
  font-size: 0.95rem;
}

.itp-main{
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 16px 48px;
}

/* =========================================
   Responsive Fix Pack (ITP)
   paste at end of style.css
========================================= */

/* 画像・埋め込みのはみ出し防止 */
.itp-front img,
.itp-main img,
.entry-content img,
.entry-content iframe,
.entry-content video {
  max-width: 100%;
  height: auto;
}

/* コンテナの余白をSPで確保 */
@media (max-width: 768px) {
  .itp-container,
  .itp-main,
  .itp-pagehead__inner,
  .itp-footer__inner {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* HERO：SPで高さ/余白/文字サイズを落ち着かせる */
@media (max-width: 768px) {
  .itp-hero {
    min-height: auto;
    padding: 28px 0;
  }
  .itp-hero__inner {
    padding: 0 16px;
  }
  .itp-hero__card {
    width: 100%;
    max-width: 100%;
  }
  .itp-hero__title {
    font-size: clamp(1.5rem, 6vw, 2.0rem);
    line-height: 1.25;
  }
  .itp-hero__desc {
    font-size: 0.98rem;
  }
  .itp-hero__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  .itp-hero__buttons a {
    width: 100%;
    text-align: center;
  }
}

/* NEWS縦ライン：SPでレイアウトを縦積みに */
@media (max-width: 768px) {
  .itp-newsline__item {
    display: block;
  }
  .itp-newsline__date {
    margin-bottom: 8px;
  }
  .itp-newsline__ymd {
    font-size: 0.9rem;
  }
  .itp-newsline__title a {
    display: inline;
    word-break: break-word;
  }
  .itp-newsline__excerpt {
    margin-top: 6px;
  }
}

/* 長いURL/英単語がはみ出すのを防止 */
.entry-content,
.itp-newsline__excerpt,
.itp-hero__desc {
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 768px) {
  .wp-block-navigation__container,
  .wp-block-navigation ul {
    flex-wrap: wrap !important;
    gap: 10px !important;
  }
}


/* =========================
   Hamburger Menu
========================= */

.itp-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.itp-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--wp--preset--color--ink);
  display: block;
}

/* SP表示 */
@media (max-width: 768px) {

  .itp-menu-toggle {
    display: flex;
  }

  .itp-primary-menu {
    display: none;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
  }

  .itp-primary-menu.is-open {
    display: flex;
  }

}
/* =========================
   Hamburger (ITP)
========================= */

/* button */
.itp-menu-toggle{
  display:none;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  border:0;
  background:transparent;
  cursor:pointer;
}

.itp-menu-toggle__bar{
  display:block;
  width:22px;
  height:2px;
  background: var(--wp--preset--color--ink);
  margin:4px 0;
}

/* nav default (PC) */
.itp-primary-nav .itp-primary-menu{
  display:flex;
  gap:16px;
  list-style:none;
  margin:0;
  padding:0;
}
.itp-primary-menu > li > a{
  white-space: nowrap;
}

/* SP */
@media (max-width: 768px){
  .itp-menu-toggle{ display:inline-flex; }

  /* hide menu by default */
  .itp-primary-nav .itp-primary-menu{
    display:none;
    flex-direction:column;
    gap:12px;
    margin-top:12px;
  }

  /* open */
  .itp-primary-nav.is-open .itp-primary-menu{
    display:flex;
  }
}
/* =========================================
   Header layout (PC)
========================================= */
.itp-header__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.itp-header__left{
  flex:0 0 auto;
}

.itp-header__right{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:18px;
  flex:1 1 auto;
}

/* nav menu horizontal */
.itp-primary-nav .itp-primary-menu{
  display:flex;
  align-items:center;
  gap:18px;
  list-style:none;
  margin:0;
  padding:0;
}

/* lang buttons inline */
.itp-lang{
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:4px;
}
@media (max-width: 768px){
  .itp-header__inner{
    flex-wrap:wrap;
  }

  /* 右側は右寄せのまま */
  .itp-header__right{
    width:100%;
    justify-content:flex-end;
    gap:10px;
  }

  /* SPでは nav は閉じる（開いたら表示） */
  .itp-primary-nav .itp-primary-menu{
    display:none;
    flex-direction:column;
    align-items:flex-start;
    gap:12px;
    width:100%;
    margin-top:10px;
  }
  .itp-primary-nav.is-open .itp-primary-menu{
    display:flex;
  }
}
/* =========================================
   SP Overlay Nav (no layout shift)
========================================= */
@media (max-width: 768px){
  .itp-header{ position:relative; z-index:1000; }

  /* 右側の並びは維持 */
  .itp-header__right{ position:relative; }

  /* navを“重ね表示”にする */
  .itp-primary-nav{
    position:absolute;
    top:calc(100% + 10px);
    right:0;
    width:min(92vw, 360px);
    background:#fff;
    border-radius:14px;
    box-shadow:0 16px 40px rgba(0,0,0,.12);
    padding:14px 14px;
    display:none;           /* ←閉じてる時は非表示 */
  }

  /* 開いたら表示 */
  .itp-primary-nav.is-open{
    display:block;
  }

  /* メニューは縦並び */
  .itp-primary-nav .itp-primary-menu{
    display:flex !important;
    flex-direction:column;
    align-items:stretch;
    gap:10px;
    margin:0;
    padding:0;
    list-style:none;
  }

  .itp-primary-nav .itp-primary-menu a{
    display:block;
    padding:10px 12px;
    border-radius:10px;
    text-decoration:none;
  }

  .itp-primary-nav .itp-primary-menu a:hover{
    background: var(--wp--preset--color--light-gray, #EEF1F6);
  }
}
@media (max-width: 768px){
  body.itp-nav-open::before{
    content:"";
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.35);
    z-index:900; /* header(1000)より下 */
  }
}

/* Header nav: remove underline */
.itp-header a{
  text-decoration: none;
}
.itp-header a:hover{
  text-decoration: none;
}
/* =========================
   Dropdown (Level 2)
========================= */
.itp-primary-menu{
  position: relative;
}

/* 親 li を基準にする */
.itp-primary-menu > li{
  position: relative;
}

/* 第2階層は初期は隠す */
.itp-primary-menu .sub-menu{
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 220px;
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  margin: 0;
  list-style: none;
  box-shadow: 0 16px 40px rgba(0,0,0,.12);
  z-index: 1200;
}

.itp-primary-menu .sub-menu a{
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  white-space: nowrap;
}

/* PC: ホバーでも開く（保険） */
@media (min-width: 769px){
  .itp-primary-menu > li:hover > .sub-menu{
    display: block;
  }
}

/* JSで開いたとき */
.itp-primary-menu > li.is-open > .sub-menu{
  display: block;
}

/* =========================
   Heading decorations (global)
========================= */

/* 固定ページ・投稿両方に効く */
.entry-content h2,
.page .itp-main h2,
.single .itp-main h2{
  position: relative;
  font-weight: 500;           /* ← 600 → 500 に変更 */
  letter-spacing: .01em;
  padding-left: 18px;
  margin: 2.2em 0 1.1em;
  line-height: 1.3;
}

.entry-content h2::before,
.page .itp-main h2::before,
.single .itp-main h2::before{
  content:"";
  position:absolute;
  left:0;
  top:50%;
  transform: translateY(-50%);
  width:4px;
  height:1.1em;               /* 文字高さとほぼ同じ */
  border-radius: 999px;
  background: var(--wp--preset--color--itp-purple, #5B49C6);
}

/* h3 */
.entry-content h3,
.page .itp-main h3,
.single .itp-main h3{
  position: relative;
  padding-left: 12px;
  margin-top: 1.6em;
  margin-bottom: 0.7em;
}

.entry-content h3::before,
.page .itp-main h3::before,
.single .itp-main h3::before{
  content:"";
  position:absolute;
  left:0;
  top:0.55em;
  width:6px;
  height:6px;
  border-radius: 50%;
  background: var(--wp--preset--color--itp-purple, #5B49C6);
}
/* =========================
   Global Nav underline animation
========================= */

/* ベース */
.itp-primary-menu > li > a{
  position: relative;
  display: inline-block;
  padding-bottom: 4px;
}

/* 下線（最初は0幅） */
.itp-primary-menu > li > a::after{
  content:"";
  position:absolute;
  left:0;
  bottom:0;
  width:0%;
  height:2px;
  background: var(--wp--preset--color--itp-purple, #5B49C6);
  transition: width .35s cubic-bezier(.4,0,.2,1);
}

/* ホバーでにゅる */
.itp-primary-menu > li > a:hover::after{
  width:100%;
}
.itp-primary-menu > li > a::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:0;
  width:0;
  height:2px;
  background: var(--wp--preset--color--itp-purple, #5B49C6);
  transition: all .35s cubic-bezier(.4,0,.2,1);
  transform: translateX(-50%);
}

.itp-primary-menu > li > a:hover::after{
  width:100%;
}
.itp-primary-menu > li.current-menu-item > a::after,
.itp-primary-menu > li.current-menu-ancestor > a::after{
  width:100%;
}

/* =========================
   Timeline (Classic editor / table)
========================= */

.itp-timeline-wrap{
  margin: 2.5rem 0;
}

.itp-timeline-title{
  margin: 0 0 1rem;
}

/* スマホで横スクロール許可（はみ出し事故防止） */
.itp-timeline-scroll{
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
}

/* テーブル本体 */
table.itp-timeline{
  width: 100%;
  min-width: 720px;           /* これがあるとSPで潰れない */
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 14px;
  overflow: hidden;
}

/* 月（ヘッダー） */
table.itp-timeline thead th{
  text-align: left;
  font-weight: 600;
  padding: 14px 16px;
  color: #fff;
  background: var(--wp--preset--color--deep-purple, #3F2D9B);
  border-right: 1px solid rgba(255,255,255,.18);
}

table.itp-timeline thead th:last-child{
  border-right: none;
}

/* 本文セル */
table.itp-timeline tbody td{
  vertical-align: top;
  padding: 16px;
  background: #fff;
  border-right: 1px solid rgba(0,0,0,.06);
}

table.itp-timeline tbody td:last-child{
  border-right: none;
}

/* リスト */
.itp-step-list{
  margin: 0;
  padding-left: 1.1em;
}

.itp-step-list li{
  margin: .35em 0;
}

/* 強調（派遣開始など） */
.itp-step-list strong{
  color: var(--wp--preset--color--itp-purple, #5B49C6);
}

/* =========================
   Header responsive fix
========================= */

/* ヘッダー内は折り返し許可 */
.itp-header__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
}

/* サイトタイトルははみ出さない */
.itp-site-title{
  max-width:100%;
  word-break:break-word;
}

/* ナビはスマホで横幅100%に */
@media (max-width: 768px){

  .itp-primary-nav{
    width:100%;
  }

  .itp-lang{
    margin-left:auto;
  }

}
/* =========================
   Header: site title mobile sizing
========================= */

.itp-site-title,
.itp-header .wp-block-site-title,
.itp-header__left a{
  word-break: break-word;
}

@media (max-width: 768px){
  /* サイトタイトルを縮める */
  .itp-site-title,
  .itp-header .wp-block-site-title,
  .itp-header__left a{
    font-size: 1.5rem;      /* ここは好みで 0.95〜1.15rem:1.5まで大きくした */
    line-height: 1.25;
    max-width: calc(100% - 120px); /* 右側(JP/EN等)の分を逃がす */
    display: block;
  }
}
/* =========================
   Mobile menu panel: prevent overflow
========================= */

@media (max-width: 768px){
  /* まず横スクロール事故を封じる */
  html, body{
    overflow-x: hidden;
  }

  /* ナビ全体（開いた部分） */
  .itp-primary-nav{
    width: 100%;
    max-width: 100vw;
  }

  /* 開いたときに出るパネル（クラス名は実物に合わせてどれか当たればOK） */
  .itp-primary-menu,
  .itp-primary-nav .menu,
  .itp-primary-nav ul{
    max-width: 100%;
    box-sizing: border-box;
  }

  /* “白い箱”がある場合（よくある） */
  .itp-primary-nav.is-open,
  .itp-primary-nav[aria-hidden="false"]{
    max-width: 100vw;
  }
}
/* =========================
   Mobile menu as modal (no layout shift)
========================= */

@media (max-width: 768px){
  /* トグルで開いたとき用（JSで .is-open を付けてる想定。違う場合はクラスを合わせて） */
  /* 開いたメニューの箱（nav）を中央固定にする */
  .itp-primary-nav{
    position: fixed;
    top: 86px;                 /* ヘッダー高さに合わせて微調整 */
    left: 50%;
    transform: translateX(-50%);
    width: calc(100vw - 32px); /* 画面左右16pxずつ余白 */
    max-width: 520px;          /* 大きめスマホで間延びしない上限 */
    box-sizing: border-box;

    background: #fff;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(0,0,0,.18);
    padding: 14px 16px;

    max-height: calc(100vh - 120px);
    overflow: auto;

    display: none;             /* 開いてない時 */
    z-index: 9999;
  }

  .itp-primary-nav.is-open{
    display: block;            /* 開いてる時 */
  }

  /* リストの余白を整理 */
  .itp-primary-nav .itp-primary-menu,
  .itp-primary-nav ul{
    margin: 0;
    padding: 0;
    list-style: none;
  }
  /* nav内のulが横にはみ出さない保険 */
  .itp-primary-nav *,
  .itp-primary-nav ul{
    box-sizing: border-box;
    max-width: 100%;
  }
  .itp-primary-nav a{
    display: block;
    padding: 14px 6px;
    text-decoration: none;     /* 下線やめたい件にも効く */
  }

  .itp-primary-nav li + li{
    border-top: 1px solid rgba(0,0,0,.08);
  }
}
/*Add 20260329---------*/
.itp-brand{
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.itp-site-title{
  font-weight: 700;
  text-decoration: none;
  color: var(--itp-text);
}

.itp-site-tagline{
  font-size: 1.5rem;
  color: var(--itp-muted);
  margin: 0;
  line-height: 1.3;
}
/* コンテンツ上部の余白を詰める */
.entry-content{
  margin-top: 0;
  padding-top: 0;
}

/* 最初の見出しの上余白を削る */
.entry-content > *:first-child{
  margin-top: 0;
}

.entry-content{
  margin-top: 0;
}

.entry-content > *:first-child{
  margin-top: 0;
}

.entry-content h2{
  margin-top: 20px;
}
.itp-main > .itp-wrap{
  padding-top: 0 !important;
}

.entry-content > h2:first-child{
  margin-top: 0 !important;
}

.itp-main article{
  margin-top: 0;
}

.itp-main article > *:first-child{
  margin-block-start: 0 !important;
}

/* =========================
   H3 refined (line style)
========================= */

.page .itp-main h3,
.single .itp-main h3{
  position: relative;
  padding-left: 12px;
  margin-top: 1.6em;
  margin-bottom: 0.7em;
  font-weight: 500;
  line-height: 1.3;
}

.page .itp-main h3::before,
.single .itp-main h3::before{
  content:"";
  position:absolute;
  left:0;
  top:50%;
  transform: translateY(-50%);
  width:3px;
  height:0.9em;
  border-radius: 999px;
  background: var(--wp--preset--color--itp-purple, #5B49C6);
  opacity:.6;
}
/*----------------------*/
body{
  font-family:
    "Yu Gothic",
    "Hiragino Kaku Gothic ProN",
    sans-serif;
  letter-spacing: 0.02em;
}

.itp-deadline{
  margin: 1.5em 0 2em;
  padding: 1em 1.2em;
  background: var(--wp--preset--color--light-gray);
  border-left: 4px solid var(--wp--preset--color--itp-purple);
}

.itp-deadline-note{
  display: inline-block;
  margin-top: .35em;
  color: var(--wp--preset--color--gray);
  font-size: .95rem;
}

.itp-download-list{
  list-style: none;
  margin: 1.2em 0 2em;
  padding: 0;
  border-top: 1px solid rgba(0,0,0,.08);
}

.itp-download-list li{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(0,0,0,.08);
  flex-wrap: wrap;
}

.itp-download-title{
  font-weight: 500;
  color: var(--wp--preset--color--ink);
}

.itp-filetype{
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 3px 8px;
  border-radius: 999px;
}

.itp-filetype--pdf{
  background: #f3eaff;
  color: #6d3ccf;
}

.itp-filetype--word{
  background: #e9f2ff;
  color: #3563e9;
}

.itp-download-list a{
  margin-left: auto;
  text-decoration: none;
  border-bottom: 1px dotted rgba(91,73,198,.5);
}

.itp-download-list a:hover{
  border-bottom-style: solid;
}

.itp-reference-note{
  margin-top: 1.5em;
  font-size: .92rem;
  color: var(--wp--preset--color--gray);
}

@media (max-width: 768px){
  .itp-download-list li{
    align-items: flex-start;
  }

  .itp-download-list a{
    margin-left: 0;
    width: 100%;
  }
}