/* =========================================
  Reset
========================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
ul li{
  list-style: none;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

/* =========================================
  CSS Variables
========================================= */
:root {
  /* Brand Colors */
  --blue: #0047BA;
  --black: #000;
  --yellow: #F2E800;

  /* Typography */
  --font-sans: '游ゴシック体', YuGothic, '游ゴシック', 'Yu Gothic', 'メイリオ', sans-serif;
  --font-serif: 'A1 Mincho', 'Yu Mincho', 'ヒラギノ明朝 ProN W3', serif;
  --sbw: 320px;
  
}
/* =========================================
  Base
========================================= */
html,
body {
  height: 100%;
  font-family: var(--font-sans);
}

body {
  background: none !important;
}

/* ② 疑似要素で背景を丸ごと固定 */
body::before {
  content: "";
  position: fixed;
  top: 0; 
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #eee;
  background-image: url('img/fvBG.webp');
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: 88vw 100vh;
  z-index:0;
}

a {
  color: var(--blue);
  text-decoration: none;
}

p {
  margin-bottom: 1em;
}

img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
}
.tbBlock{
  display: none;
}
.spNone{
  display: block;
}


#campus-life .campus-header h2,#stories .stories-header h2,#seminar .seminar-header h2{
  font-size: 5.75rem;
}

.modal-text .profilePh{
  display: block;
  width: auto;
  max-width: 200px;
  height: auto;
  margin: 16px auto;
  border-radius: 50%;
}
/* =========================================
  Layout
========================================= */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0; 
  width: var(--sbw);
  height: 100svh;
  padding: 32px 24px;
  overflow: visible;

  display: flex;
  flex-direction: column;
  justify-content: center;  
}

.content {
  position: relative;
  margin-left: calc(var(--sbw) + 2rem);
}

section {
  padding: 45px 0;
}
section div p span{
  font-size: .875rem;
}

/* Container Width (2 patterns) */
.container-lg {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px;
  border-radius: 16px;
  padding: 60px;
}

.container-md {
  max-width: 890px;
  margin: 0 auto;
  padding: 0 24px;
  background: #fff;
  border-radius: 16px;
  padding: 0;
}
/* ──────────────────────────────────────
   ゲンホウNEWS
────────────────────────────────────── */
#news .container-md{
  padding: 60px;
}

.news-list {
  list-style: none;
  margin: 0;
  padding: 0;

}
.news-list li {
  margin-top: 20px;
}

.news-list li a {
  display: flex;
  align-items: center;
  gap: 0px;
}


.news-item {
  margin-bottom: 1em;
}
.news-date {
  flex: 0 0 auto;
  width: 7em;
  font-size: 0.9rem;
  color: #000;
}
.news-title {
  font-size: 1rem;
  margin-left: 0.5em;
  text-decoration: underline;
  color: var(--blue);
  font-weight: 600;
  flex: 1 1 auto;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.news-item a {
  color: var(--blue)!important;
}
.news-item a:hover .news-title {
  text-decoration: underline;
}

/* ──────────────────────────────────────
   About セクションの2カラム分割
────────────────────────────────────── */
.about-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  padding: 60px 60px 0;
}

/* 画像側 */
.about-img img {
  display: block;
  flex-shrink: 0;
  width: 210px;
  margin-top: -30px;
  height: auto;
  border-radius: 16px;
}

/* テキスト側 */
.about-text {
  flex: 1;
}

/* テキスト要素の間隔 */
.about-text > * + * {
  margin-top: 1em;
}


/* 「続きを読む」リンクの前に矢印アイコンを表示 */
.arrowAdd {
  position: relative;
  display: inline-block;
  padding-left: 18px;
  color: var(--blue);
  text-decoration: underline;
  font-weight: 700;
}
.arrowAdd::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 10px;
  background: url("img/arrow.svg") no-repeat center/contain;
}
.arrowAdd:hover::before {
  transition: transform 0.3s ease;
  transform: translateX(30%)  translateY(-50%);
}
/* ================================
   「私が考える『現代』」レイアウト
================================ */
.about-extra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--yellow);
  padding: 24px 60px;
  border-radius: 0 0 16px 16px;
}

/* 見出しテキスト */
.about-extra > p {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: 1rem;
  color: var(--blue);
}

/* サムネイルリストを横並び */
.about-extra ul {
  display: flex;
  gap: 40px;
  margin: 0;
  padding: 0;
}

/* 各人物ブロック */
.about-extra ul li {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  line-height: 0.7rem;
  font-size: .875rem;
}

/* 円形サムネイル */
.about-extra ul li img {
  width: 105px;
  height: 105px;
  border-radius: 50%;
  object-fit: cover;
  transition: .25s;
}
/* 円形サムネイル */
.about-extra ul li img:hover {
  scale: .9;
}

/* 名前（strong）と肩書き間の余白 */
.about-extra ul li strong {
  margin-top: 14px;
  font-size: 1rem;
  font-weight: 700;
  display: block;
}
.about-extra ul li a {
  color: var(--black);
}

/* ──────────────────────────────────────
   「現代」を示す６つのコース
────────────────────────────────────── */

.courses-wrapper{
  padding: 60px;
}
.courses-wrapper h2{
  text-align: center;
}
.courses-wrapper img{
  padding: 30px 0 0 0;
}

/* ── 下段：６つのコースリスト ── */
.courses-about-wrapper{
  border-radius: 0 0 16px 16px;
  overflow: hidden;
}
#courses ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  list-style: none;
  margin: 0;
}
#courses ul li {
  background: #fff;
}
#courses ul li h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
}
#courses ul li h3 img {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}
#courses ul li p {
  margin: 0 0 12px;
  font-size: 1rem;
}
#courses ul li:nth-child(1),
#courses ul li:nth-child(2),
#courses ul li:nth-child(5),
#courses ul li:nth-child(6) {
  background-color: #eee;
}

/* 奇数番目（1,3,5…）の li */
#courses ul li:nth-child(odd) {
  padding: 35px 30px 35px 60px;
}

/* 偶数番目（2,4,6…）の li */
#courses ul li:nth-child(even) {
  padding: 35px 60px 35px 30px;
}


/* =========================================
   Campus Life セクション
========================================= */
#campus-life{
  padding: 60px 0 45px;
}
#campus-life .container-lg,#stories .container-lg{
  padding-top: 15px;
  padding-bottom: 15px;
  padding-left: 0;
  padding-right: 0;
}

/* 見出し＋サブタイトル */
#campus-life .campus-header {
  margin-bottom: -270px;
  margin-left: 290px;
  text-align: left;
}

#campus-life .campus-header h2 {
  position: relative;
  display: inline-block;
  z-index: 1;
  color: var(--blue);
  font-family: var(--font-serif);
  letter-spacing: -7px !important;
  line-height: 1em !important;
}

#campus-life .campus-header .highlight {
  color: var(--yellow);
}

#campus-life .campus-subtitle {
  display: inline-block;
  margin-left: 16px;
  background: #fff;
  padding: 4px 8px;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 55px;
  margin-left: -50px;
  vertical-align: middle;
}

/* ──────────────────────────────────────
   カードグリッド
────────────────────────────────────── */
.campus-card.tall{
  aspect-ratio: 342 / 567;
}
#campus-life .campus-grid {
  display: grid;
  grid-template-columns: 342px 342px 342px;
  grid-auto-rows: auto;
  gap: 16px;
  justify-content: center;
  align-items: end;
}

/* 1行目（3枚） */
#campus-life .campus-grid > .campus-card:nth-child(1) {
  grid-column: 1; grid-row: 1;
}
#campus-life .campus-grid > .campus-card:nth-child(2) {
  grid-column: 2; grid-row: 1;
}
#campus-life .campus-grid > .campus-card:nth-child(3) {
  grid-column: 3; grid-row: 1;
}
/* 2行目（2枚：左詰め） */
#campus-life .campus-grid > .campus-card:nth-child(4) {
  grid-column: 1; grid-row: 2;
}
#campus-life .campus-grid > .campus-card:nth-child(5) {
  grid-column: 2; grid-row: 2;
}
/* 3行目（2枚：右詰め） */
#campus-life .campus-grid > .campus-card:nth-child(6) {
  grid-column: 2; grid-row: 3;
}
#campus-life .campus-grid > .campus-card:nth-child(7) {
  grid-column: 3; grid-row: 3;
}



/* ── カード共通 ── */
.campus-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease-out;
}
.campus-card:hover {
  transform: translateY(-8px);
}
.campus-card img {
  display: block;
  width: 100%;
  height: auto;
}

/* ── オーバーレイテキスト ── */
.campus-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  background:rgba(255, 255, 255, 0.9);
  text-align: center;
}

.campus-label {
  font-size: 0.875rem;
  font-family: var(--font-serif);
  color: #000;
  margin-bottom: 0;
}

.campus-text {
  margin-top: 4px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 0;
  letter-spacing: -0.05rem;
}
.gridPallaxmargin,.gridPallaxmarginTall{
  margin-bottom:0;
}
/* =========================================
   Stories セクション
========================================= */
/* ── 見出し／サブタイトル ── */
#stories{
  padding: 60px 0;
}
#stories .stories-header {
  margin-bottom: -220px;
  text-align: center;
  margin-left: -33%;
}

#stories .stories-header h2 {
  position: inherit;
  font-family: var(--font-serif);
  font-weight: 700;
  margin: 0;
  z-index: 1;
  color: var(--blue);
  letter-spacing: -3px !important;
  line-height: 1em !important;
}
#stories .stories-header .highlight {
  color: var(--yellow);
}

#stories .stories-header .subtitle {
  display: inline-block;
  margin-left: 16px;
  background: #fff;
  padding: 4px 8px;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 55px;
  margin-left: 5%;
  vertical-align: middle;
  position: relative;
  z-index: 1;
}

/* ── グリッドレイアウト ── */

/* Stories セクション：1 枚目だけ上にオフセット */
#stories .stories-grid .story-card.tall:first-child {
  position: relative;
  top: 200px;
}


/* ── 共通カードスタイル ── */
.story-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease-out;
}
.story-card:hover {
  transform: translateY(-8px);
}
.story-card img {
  display: block;
  width: 100%;
  height: auto;
}

/* 縦長カード */
.story-card.tall {
  width: 520px;
  aspect-ratio: 520 / 646;
}

/* ── オーバーレイテキスト ── */
.story-content {
  position: absolute;
  top: 16px;
  left: 16px;
}

/* 引用文ボックス */
.story-quote {
  position: static;
  background: var(--blue);
  color: #fff;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 2.6rem;
  padding: 18px 24px;
}

/* メタ情報ボックス */
.story-meta {
  position: static;
  background: var(--yellow);
  color: var(--black);
  font-size: 0.875rem;
  line-height: 1.2rem;
  padding: 24px;
}
.story-quote,
.story-meta {
  display: table;
  width: auto;
}
#stories .container-lg{
  padding-bottom: 185px;
}
/* =========================================
   Seminar セクション
========================================= */

/* セクション全体は .container-md が白背景＆角丸を担う */
#seminar {
  padding: 45px 0;
}

/* ── 見出し／サブタイトル ── */
#seminar .seminar-header {
  text-align: right;
  padding: 60px 60px 32px;
}

#seminar .seminar-header h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--blue);
  letter-spacing: -7px !important;
  line-height: 1em !important;
  margin: 0;
  margin-bottom: 0.125em;
}
#seminar .seminar-header h3 {
  color: var(--blue);
}
#seminar .seminar-header .highlight {
  color: var(--yellow);
}

#seminar .seminar-header p:last-child {
  text-align: left;
}


#seminar .seminar-header .seminar-subtitle {
  display: block;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--black);
}


/* ── タイムラインコンテナ ── */
#seminar .seminar-timeline {
  position: relative;
  padding: 0 ;
}
/* 一本線を背後に */
#seminar .seminar-timeline::before {
  content: "";
  position: absolute;
  top: 125px;
  bottom: 125px;
  left: 36%;
  width: 2px;
  background: var(--blue);
  z-index: 1;
}

/* ──────────────────────────────────────
   Seminar 年次ブロック (.seminar-year)
────────────────────────────────────── */
.seminar-year {
  position: relative;
  background: #fff;
  padding: 60px; 
}
.seminar-year:nth-of-type(odd){
  background: var(--yellow);
}

.seminar-year:nth-of-type(3){
  padding-bottom: 200px;
  border-radius: 0 0 16px 16px;
}
/* 年次ラベルを右上に絶対配置 */
.seminar-year .year-label {
  position: absolute;
  top: 0.25em;
  right: 24px;
  transform: translateY(-50%);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 3.375rem;
  color: var(--blue);
  text-align: right;
  white-space: nowrap;
}
.seminar-year .year-label span {
  font-size: 6.5rem; 
}

/* 左右２カラム */
.seminar-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: start;
}

/* ── 左カラム：アイテム＋吹き出し ── */
.seminar-items {
  display: flex;
  flex-direction: column;
}

.seminar-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* 円形サムネイル */
.item-img img {
  width: 180px;
  object-fit: cover;
  margin-right: -30px;
  position: relative;
  z-index: 2;
  transition: .25s;;
}
.item-img img:hover {
  transform: scale(0.9)
}

/* 1枚目：上段 */
.item-img a:nth-child(1) {
  top: 0;
  left: 0;
  z-index: 3;
}

/* 2枚目：下段・左 */
.item-img a:nth-child(2) {
  position: absolute;
  top: 180px;
  left: 90px;
  z-index: 4;
}

/* 3枚目：下段・右 */
.item-img a:nth-child(3) {
  position: absolute;
  top: 180px;
  left: 230px;
  z-index: 5;
}
/* 吹き出し */
.item-bubble {
  position: relative;
  background: #fff;
  border: 2px solid var(--blue);
  border-radius: 8px;
  padding: 12px 12px;
  width: 200px;
  z-index: 1;
}

/* 吹き出し内の見出し */
.item-bubble h3 {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--blue);
  text-align: center;
}
.item-bubble h3 span {
  display: block;
  font-size: 1.125rem;
  font-weight: 500;
  margin-top: 4px;
}

/* ── 右カラム：説明テキスト ── */
.seminar-desc p {
  margin: 16px 0 38px;
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
}
.seminar-desc p:last-child {
  margin-bottom: 0;
}

/* =========================================
  CTA
========================================= */

/* ── CTA ボタン ── */
.links {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 0 60px 60px;

}
.links .btn {
  background: var(--blue);
  color: #fff;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  width: 285px;
  text-align: center;
}


/* =========================================
  Footery
========================================= */
/* 親にテキスト右寄せ */
footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
margin-top: 100px;

}

/* 中身を inline-flex のまま */
.footer-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px;  
  background: #FFF;
}

/* ロゴサイズ */
.footer-logo {
  height: 32px;
  width: auto;
padding: 0 16px;
}

footer p {
  font-size: 0.875rem;
  text-align: left;
  color: var(--black);
  margin: 0;
}


/* =========================================
  Typography
========================================= */
h1,
h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.5em;
}

h3,
h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 0.5em;
}

/* Font Sizes */
h1 { font-size: 6.25rem; } /* 100px */
h2 { font-size: 3.375rem; } /* 54px  */
h3 { font-size: 1.5rem; }   /* 24px  */
h4 { font-size: 1.25rem; }  /* 20px  */

/* =========================================
  Side Navigation
========================================= */
.logo {
  font-family: var(--font-serif);
  font-size: 2rem;
  line-height: 1.3;
}

nav{
  position:relative;
  margin-top: 1.75rem; /*** SNSが作られるまで ***/
}
.nav-list {
  list-style: none;
  background: #fff;
  width: 300px;
  padding: 36px;
  line-height: 1.5rem;
}

.nav-list li + li {
  margin-top: 16px;
}

.nav-list a {
  font-size: 1rem; 
  font-weight: 700;
  color: var(--black);
}

/* =========================================
  Hero Grid
========================================= */
#hero .container-lg{
  padding: 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: repeat(3, 342px);
  grid-auto-rows: auto;
  gap: 16px;
  justify-content: center;
}
.hero-grid img{
  border-radius: 16px;

}

.cardA,
.cardB {
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease-out;
  border-radius: 16px;

}

.cardA:hover,
.cardB:hover {
  transform: translateY(-8px);
}

/* Aspect Ratios */
.square { aspect-ratio: 1 / 1; }
.tall   { aspect-ratio: 342 / 476; }

.cardB.tall img:nth-of-type(2){
  display: none;
}
/* Overlay */
.card-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0;
  color: var(--blue);
  border-radius: 16px;
  z-index: 1;
  text-align: center;

}

.card-content h3 {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.2;
  letter-spacing: -0.05em;
}

.LEng {
  font-size: 5.75rem !important;
  font-family: var(--font-serif);
  letter-spacing: -3px !important;
  line-height: 0.9em !important;
  margin-bottom: 10px !important;
}

.LEng span { color: var(--yellow); }

.campus_life { text-align: left !important; }

.card-content p {
  margin-top: 4px;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--black);
  font-weight: 800;
}

/* Overlay Gradient */
.cardA::after,
.cardB::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  pointer-events: none;
}

.cardA::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 1) 86%, rgba(255, 255, 255, 1) 100%);
}

.cardB::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 72%, rgba(255, 255, 255, 1) 72%, rgba(255, 255, 255, 1) 100%);
}

/* Grid Placement */
.stories { grid-area: stories; }
.lawpro  { grid-area: lawpro;  }
.seminar { grid-area: seminar; }
.public  { grid-area: public;  }
.campus  { grid-area: campus;  }
.courses { grid-area: courses; }

.hero-grid {
  grid-template-areas:
    "stories lawpro seminar"
    "public  lawpro courses"
    "public  campus courses";
}

/* =========================================
  Accessibility
========================================= */
.cardA:focus-visible,
.cardB:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}


/* ========== Sidebar elements ========= */
.logo-box{
  width:300px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:12px;
}

#lottie-logo{
  width:100%;
}

.cl-link{
  display:block;
  width:160px;
  height:160px;
  background:#fff;
  margin-bottom:-10px;
  font-size:1.25rem;
  font-weight:700;
  line-height:1.4;
  text-align:center;
  color:var(--black);
  padding:24px;
}
.sword{
  font-size: .875rem;
}

/* ───────────────────────────────────────
   Sidebar SNS ボタン
─────────────────────────────────────── */
.social {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  background: #fff;
  padding: 20px 37px;
  width: 300px;
  border: 1px solid #000;
  display: none; /*** SNSが作られるまで ***/
}


.social .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--black);
  text-decoration: none;
}

.social .btn img {
  display: block;
  height: 24px;
}

/* ホバー時の色変化（任意） */
.social .btn:hover {
  opacity: 0.8;
}
.note img{
  height: 18px!important;
}

.cl-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 300px;
  height: 184px;
  padding: 20px 40px;
  margin-left: 100px;
}

.cl-link img {
  flex-shrink: 0;
  width: 60px;
  height: auto;
  margin-right: 10px;
}

.cl-text {
  flex: 1;
  text-align: justify;
  text-align-last: justify;
}

.cl-text::after {
  content: \"\";
  display: inline-block;
  width: 100%;
}

.cl-text {
  line-height: 1.3;
}



/* ───────────────────────────────────────
モーダル共通
─────────────────────────────────────── */

/* スクロール禁止用のクラスは overflow のみ */
body.modal-open {
  overflow: hidden;
}

.modal {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  transition: .25s;
  transform: translateY(100px) scale(0.95);
  transform-origin: center center;

}
.modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.modal .modal-overlay{
  opacity: 1;
}

/* 背後の黄色いオーバーレイ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(242, 232, 0, 0.9); 
  z-index: 0;
} 
/* モーダルの中身 */
.modal-close {
  position: fixed;
  top: 4px;
  right: 24px;
  background: none;
  border: none;
  font-size: 5rem;
  color: var(--black);
  cursor: pointer;
  z-index: 9;
}
/* 本体レイアウト */
.modal-body {
  display: flex;
  gap: 40px;
}
.modal-img {
  position: fixed;
  bottom: 0;
  left: calc(50% - (620px * 0.75));
  transform: translate(-50%, 0);
  z-index: 1;
}
.modal-img img {
  max-height: 90svh;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* モーダル全体は固定 */
.modal-text {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 60vw;
  max-width: 620px;
  max-height: 75svh;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 16px;
  padding: 60px;
  z-index: 2;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

.modal-text h2 {
  margin-top: 0;
}
.modal-text h3{
  font-family: var(--font-serif);
}
.modal-text .profile{
  margin-bottom: 2em;
}
.modal-text.modal-seminar{
  display: flex;
  flex-direction: column;
  height: 69svh;
  max-height: 75vh;
}
.modal-text.modal-seminar h2{
  line-height: 3rem;
  margin-bottom: 0;
  font-size: 2.5rem;
}
.modal-text.modal-seminar h2 span{
  font-size: 1.5rem;
  display: block;
}
.modal-text.modal-seminar p{
  text-align: left;
}
.modal-text.modal-seminar p.profile{
  text-align: center;
}
.seminar-img,.about-spPh{
  position: relative;
  width: 200px;
  margin: -120px auto 0;
  z-index: 2;
}


/* マーカーアニメーション用キーフレーム */
@keyframes marker-swipe {
  0%   { left: -100%; }
  50%  { left: 80%; }
  100% { left: 100%; }
}

/* ── マーカーを仕込む ── */
.modal-text h2,
.modal-text h3 {
  position: relative;
  display: block;
  overflow: hidden;
}

/* マーカーの擬似要素 */
.modal-text h2::before,
.modal-text h3::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -100%;
  width: 100%;
  height: 1em;
  background: var(--blue);
  transform: translateY(-50%);
}

/* モーダルが開いたらアニメ発火 */
.modal.open .modal-text h2::before,
.modal.open .modal-text h3::before {
  animation: marker-swipe 0.5s ease-out forwards;
}

/* お好みで h3 は少し遅延させても */
.modal.open .modal-text h3::before {
  animation-delay: 0.3s;
}

/* ヘッダー部分：画像がはみ出す領域 */
.modal-header {
  position: relative;
  overflow: visible;
  text-align: center;
  margin-bottom: 20px;
}
.about-spPh{
  display:none
}
.seminar-img {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  z-index: 2;
}
/* 本文スクロール領域 */
.modal-scroll {
  flex: 1;
  overflow-y: auto;
  text-align: left;
}
.modal-scroll h2{
  margin-bottom: 0.25em;
}
.modal-scroll p:last-child{
  margin-bottom: 0;
}


/* optional: スクロールバーを細くする（Webkit） */
.modal-scroll::-webkit-scrollbar {
  width: 6px;
}
.modal-scroll::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.2);
  border-radius: 3px;
}
/*--------------------------------------
  0. 変数定義（sidebar幅＆左右余白を一元管理）
---------------------------------------*/
:root {
  --sbw: 320px;
  --sb-padding: 2rem;
}

/* ── モーダル内タブ切り替え ── */
.modal-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 80px;
}
.tab-button {
  padding: 0.5rem 1rem;
  border: 1px solid #FFF;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}
.tab-button.active {
  background: var(--blue);
  color: var(--yellow);
  font-weight: 600;
  border-color: var(--blue);
}
.tab-content {
  display: none;
  flex-direction: column;
  height: 100%;
}
.tab-content.active {
  display: flex;
}
/* ヘッダー＋タブ行は高さ固定、残りをスクロールに */
.modal-tabs {
  flex: none;
}
.modal-header {
  flex: none;
}



/*======================================
  1. デフォルト（≥1600px相当）
========================================*/
/* Sidebar / Content */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sbw);
  height: 100svh;
  display: flex;
  flex-direction: column;
}
.content {
  margin-left: calc(var(--sbw) + var(--sb-padding));
}

/* Container */
.container-lg { max-width: 1100px; margin: 0 auto; }
.container-md { max-width:  890px; margin: 0 auto; }

/* グリッド */
.hero-grid,
#campus-life .campus-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px,1fr));
}
#stories .stories-grid {
  display: grid;
  gap: 60px;
  grid-template-columns: minmax(520px,35%) 1fr;
}

/* 見出しサイズ */
.hero-grid .card-content h3:not(.LEng) {
  font-size: clamp(
    1.25rem,
    calc(-0.0833rem + 2.0833vw),
    2rem
  );
}
.hero-grid .card-content h3.LEng {
  font-size: 5.75rem !important;
}

 
/*======================================
  2. ～1599px（≒1600px未満：大画面PC→ワイドPC）
========================================*/
@media (max-width: 1599px) {

.cardB::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 76%, rgba(255, 255, 255, 1) 76%, rgba(255, 255, 255, 1) 100%);
}


  /* Container を clamp で可変化 */
  .container-lg { max-width: clamp(900px, 80vw, 1100px); }
  .container-md { max-width: clamp(690px, 70vw,  890px); }

  /* 見出しサイズを一段下げる */
  .hero-grid .card-content h3:not(.LEng) { font-size: 1.6rem; }
  .hero-grid .card-content h3.LEng     { font-size: 5rem !important; }

  /* cl-link のマージンを可変に */
  .cl-link { margin-left: 3vw; }

  /* Container 自体の幅は clamp() で制御 */
  .container-lg {
    max-width: clamp(900px, 80vw, 1100px);
  }

  /* ３列を等幅フラクションで分割 */
  #campus-life .campus-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, 1fr);
    justify-content: center;
    align-items: end;
  }

  /* カードはセルいっぱいに広げる */
  .campus-card {
    width: 100%;
    max-width: 100%;
  }
  /* 縦長カードはアスペクト比を維持 */
  .campus-card.tall {
    aspect-ratio: 342 / 567;
  }
  .campus-text{
    font-size: 1rem;
  }
  #stories .stories-grid {
    grid-template-columns: repeat(
      2,
      clamp(260px, 40vw, 520px)
    );
    gap: 32px;
    justify-content: center;
    align-items: end;
  }

  .story-card {
    width: 100% !important;
  }
  .story-card.tall {
    aspect-ratio: 520 / 646;
  }
}

/*======================================
  3. ～1536px（タブレット～小ラップトップ）
========================================*/
@media (max-width: 1536px) {

  #campus-life .campus-header {
  margin-bottom: -220px;
  margin-left: 220px;

}
  /* sidebar 幅をクリップ＆可変 */
  :root { --sbw: 16vw; }
  .sidebar {
    width: var(--sbw);
    min-width: 220px;
    padding: 0;
    z-index: 9;
  }
  .content {
    margin-left: calc(var(--sbw) + var(--sb-padding));
  }

  /* ロゴ／リンク／SNS ボタンをモバイル寄せに縮小 */
  .logo-box     { width:100%; margin-bottom:0; }
  .cl-link      {
    width:100%; margin:0 0 0 0;
    padding:15px; font-size:1rem;
    height: 80px;
  }
  .cl-link img  { margin-right:5px; }
  .social       { width:100%; padding:10px 15px; }
  .social .btn img,
  .note img     { height:12px !important; }

  /* nav-list を縦並び調整 */
  .nav-list {
    width:100%; padding:8px; margin-top:0;
  }
  .nav-list li + li { margin-top:10px; }
  .nav-list a {
    font-size:0.875rem; letter-spacing:-1px;
  }

.about-wrapper {
  gap: 2vw;
  padding: 60px 3vw 0;
}

  /* Container を可変化 */
  .container-lg {
    max-width: clamp(
      720px,
      calc(100vw - var(--sbw) - 6vw),
      1060px
    );
    margin: 0 auto;
  }
  .container-md {
    max-width: clamp(
      560px,
      calc(100vw - var(--sbw) - 20vw),
      890px
    );
    margin: 0 auto;
  }

  /* グリッドは3→自動2列へ */
  .hero-grid,
  #campus-life .campus-grid {
    grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
    gap: 20px;
  }

  #campus-life .campus-grid {
    grid-template-columns: repeat(
      3,
      clamp(240px, 25vw, 342px)
    );
  }
  .campus-text{
    font-size: 0.875rem;
  }

  #campus-life .campus-grid {
    grid-template-columns: repeat(
      3,
      clamp(240px, 25vw, 342px)
    );
  }
  /* カード幅の固定指定を解除し、親セルにフィット */
  .campus-card {
    width: 100%;
    max-width: 100%;
  }
  /* 高さ比はそのまま維持 */
  .campus-card.tall {
    aspect-ratio: 342 / 567; 
  }

  #stories .stories-grid {
    grid-template-columns: repeat(2, clamp(260px, 39vw, 520px));
    gap: 16px;
  }

  .seminar-row {
    grid-template-columns:50% 50%;
    gap: 24px; /* カラム間を少し詰める */
  }  
  .item-img{
    width: 180px;
  }
  .item-img img {
    width: 100%;
    height: auto;
  }
  .item-img a:nth-child(2) img,.item-img a:nth-child(3) img {
    width: 36%;
  }
  .item-img a:nth-child(2){
    top: 150px;
  }
  .item-img a:nth-child(3){
    top: 150px;
    left: 28%;
  }
  .item-bubble {
    width: 100%;
    min-width: 170px;
    padding: 8px 12px;
    margin-left: -30px;
  }
  .item-bubble h3 {
    font-size: 1.25rem;
  }
  .seminar-year:nth-of-type(3){
    padding-bottom: 100px;
  }
  #seminar .seminar-timeline::before{
    bottom: 200px;
  }
  .social {
    margin-bottom: 7px;
  }
  .seminar-item-society_intro{
    margin-top: 80px;
  }
}
/*======================================
  4. ～1080px
========================================*/
@media (max-width: 1079px) {
  h2{
      font-size: 2.5rem;
  }
  .about-wrapper{
      gap: 20px;
  }
  #seminar .seminar-timeline::before{
    bottom: 220px;
  }
  .modal-img{
    left: calc(50% - (620px * 0.675));
  }
  .seminar-item-society_intro{
    margin-top: 0;
  }
}


/* ============================================
   iPad Air 縦向き想定：960px 以下の調整
============================================ */

@media (max-width: 1024px) {
body::before {
  background-size: cover;
  background-position: center bottom;
}
#campus-life{
  margin-top: 24vw;
  padding: 45px 0;
}

  .sidebar{
    justify-content: start;
  }
  .content {
    margin-left: 200px;
  }
  .cl-link{
    height: auto;
    margin-top: 8px;
  }
  .social{
    margin-bottom: 10px;
  }
  h3{
    font-size: 1.2rem;
  }
  .tbBlock{
    display: block;
  }

  /* container-lg を container-md と同じに */
  .container-lg,.container-md {
    max-width: clamp(55vw, calc(100vw - var(--sbw) - 20vw), 890px);
    margin: 0 3.5vw 0 auto;
  }
  /* hero-grid を強制的に 2 列 */
  .hero-grid {
    grid-template-areas:
      "stories lawpro"
      "seminar public"
      "campus courses";
    grid-template-columns: repeat(2, 1fr) !important;    
  }

  /* cardB（.lawpro）のアスペクト比を 1:1 に強制 */
  .cardB.tall {
    aspect-ratio: 1 / 1 !important;
  }
  .cardB.tall img:nth-of-type(1){
  display: none;
}
  .cardB.tall img:nth-of-type(2){
  display:block;
}
.cardB::after{
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 60%, rgba(255, 255, 255, 1) 60%, rgba(255, 255, 255, 1) 100%);
}
  .hero-grid .card-content h3.LEng {
      font-size: 4rem !important;
  }
  .hero-grid .card-content h3:not(.LEng){
    font-size: 1.2rem;
  }

  /* ① wrapper を縦積みレイアウトに */
  .about-wrapper {
    flex-direction: column;
    align-items: stretch;
    padding: 30px 30px 0;
  }

  /* ② テキストを先に、画像を後ろに並べ替え */
  .about-text {
    order: 1;
  }
  .about-text h2, .about-text p:nth-of-type(1), .about-text h3 {
    text-align: center;
  }
  .about-img {
    order: 2;
    margin-top: 24px;
    align-self: center;
  }

  /* ③ 画像サイズを調整（任意） */
  .about-img img {
    width: 100%;
    max-width: 180px;
    height: auto;
  }
  .about-extra{
    flex-direction: column;
  }
  .about-extra > p{
    font-size: 1.8rem;
    letter-spacing: 0.5rem;
    margin: 0 auto 15px auto;
  }
  .courses-wrapper{
    padding: 30px;
  }
  #courses ul li:nth-child(odd){
    padding: 35px 15px 35px 30px;
  }
  #courses ul li:nth-child(even) {
      padding: 35px 30px 35px 15px;
  }
  #campus-life .campus-header{
    margin: 0;
    margin-bottom: -200px;
    text-align: right;
  }
  #campus-life .campus-header h2{
    margin-bottom: 0;
  }
  #campus-life .campus-subtitle{
    position: relative;
    z-index: 1;
    margin-left: 0;
  }
    /* ① グリッドを 2 列に切り替え */
  #campus-life .campus-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    grid-auto-rows: auto !important;
    gap: 16px !important;
    justify-content: center !important;
  }

  /* ② 既存の明示的な grid-placement（nth-child 指定）を解除 */
  #campus-life .campus-grid > .campus-card {
    grid-column: auto !important;
    grid-row: auto !important;
  }
  #stories .stories-header{
    text-align: right;
    margin-right: 52%;
  }
  #stories .stories-grid{
    grid-template-columns: repeat(2, 1fr) !important;    
  }
  .story-card.tall{
    overflow: visible;
  }
  .story-content{
    left: 0;
    top: 100%;
  }
  .story-quote{
    font-size: 1.25rem;
  }

  #seminar .seminar-header{
    padding: 30px 30px 16px;
  }
  #seminar .seminar-timeline::before{
    top: 70px;
    bottom: 200px;
  }
  .seminar-year .year-label span{
    font-size: 5rem;
  }
  .seminar-year .year-label{
    font-size: 2.5rem;
    padding-bottom: 20px;
  }
  .seminar-year{
    padding: 30px 30px 60px;
  }
  .item-bubble h3{
    font-size: 1rem;
  }
  .item-bubble h3 span{
    font-size: 0.875rem;
  }
  .item-bubble{
    min-width: 150px;
  }
  .seminar-row{
    gap: 10px;
  }
  .item-img a:nth-child(2) img, .item-img a:nth-child(3) img {
    width: 30%;
  }
  .seminar-year:nth-of-type(3){
    padding-bottom: 30px;
  }
  .item-img a:nth-child(2){
    top: 100px;
    left: 11%;
  }
  .item-img a:nth-child(3){
    top:100px;
    left: 26.75%;
  }
  #news .container-md{
    padding: 30px;
  }

  .footer-logo{
height: 24px;
}
footer p{
  font-size: 0.7rem;
}
.seminar-img {
  top: -70px;
}
.modal-text {
  padding: 40px;
}
.gridPallaxmargin{
  margin-bottom: 40px;
}
.gridPallaxmarginTall{
  margin-bottom: 60px;
}

}

/* ============================================
   スマホ（≤600px）レイアウト：ヘッダー化＋固定要素
============================================ */
@media (max-width: 600px) {
  html{
    font-size: 14px;
  }
  h1, h2{
    margin-bottom: 0.15em;
  }
  h3{
    font-size: 1.2rem;
  }
  #stories{
    padding: 45px 0;
  }
  #campus-life{
    margin-top: 130px;
  }
  .nav-list a{
    font-size: 1rem;
  }
    .hero-grid .card-content h3.LEng {
      font-size: 3rem !important;
  }
  .hero-grid .card-content h3:not(.LEng){
    font-size: 1.2rem;
  }

  /* Sidebar をヘッダー的に扱う */
  .sidebar {
    position: relative !important;
    width: 60vw        !important;
    height: auto       !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 0;
    margin: 0 auto;
  }

  /* メインコンテンツを左余白なしに */
  .content {
    margin: 0 !important;
  }

  /* Lottie ロゴを中央 */
  #lottie-logo {
    margin: 0 auto;
  }
  /* cl-link をロゴ下に */
  .cl-link {
    margin: 12px 0 0 0;
  }

  /* SNS は左下に固定 */
  .social {
    position: fixed;
    bottom: 6px;
    left: 16px;
    width: auto;
    min-width: 220px;
  }

  /* ナビをハンバーガー化して右下に */
  nav {
    position: fixed;
    bottom: 16px;
    right: 16px;
  }
  /* 1) nav-list を off‐canvas メニュー化 */
  nav .nav-list {
    display: block;
    position: fixed;
    bottom: 0; right: 0;
    width: 80vw;
    height: 360px;
    background: #fff;
    padding: 2rem;
    box-shadow: -4px 0 12px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1002;
  }
  nav.open .nav-list {
    transform: translateX(0);
  }

  /* ハンバーガーアイコン */
nav::before {
  content: "☰";
  display: inline-block;
  background: #fff;
  padding: 7px 14px;
  border:1px solid #000;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  font-size: 1.5rem;
  color: var(--black);
}
  /* 3) ハンバーガー ⇄ × の切り替え */
  nav::before {
    content: "☰";
    display: inline-block;
    background: #fff;
    padding: 7px 14px;
    border:1px solid #000;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    font-size: 1.5rem;
    color: var(--black);
    transition: transform 0.3s ease, content 0.3s ease;
    cursor: pointer;
    z-index: 1003;
    position: fixed;
    bottom: 16px;
    right: 16px;
  }
  nav.open::before {
    content: "✕";
    transform: rotate(90deg);
  }

  .container-lg, .container-md{
    max-width: none;
    margin: 0 3vw;
  }
  #hero{
    padding-top: 0;
  }
  .hero-grid{
    gap: 3vw;
  }
  .hero-grid img{
    border-radius: 16px 16px 0 0;
  }
  .cardB.tall,.square{
    aspect-ratio: 1 / 1.2!important;
  }
  .card-content p{
    font-size: 0.75rem;
    overflow: hidden;
    height: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .cardA::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 1) 86%, rgba(255, 255, 255, 1) 100%);
  }
  .cardB::after{
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 62%, rgba(255, 255, 255, 1) 62%, rgba(255, 255, 255, 1) 100%);
  }
  .campus_life{
    text-align: center!important;
  }
  .about-wrapper{
    padding: 30px 30px 0;
  }
  .about-img img{
    max-width: 50%;
    margin: 0 auto;
  }
  .about-extra{
    padding:24px 20px;
  }
  .courses-wrapper{
    padding: 30px;;
  }
  #courses ul li:nth-child(odd){
    padding: 30px 15px 30px 30px;
  }
  #courses ul li:nth-child(even) {
      padding: 30px 30px 30px 15px;
  }
  #courses ul li h3 img {
  width: 45px;
  height: 45px;
}
  #campus-life .campus-header{
    margin-bottom: -150px;
  }
  #campus-life .campus-grid,#stories .stories-grid {
      grid-template-columns: repeat(1, 1fr) !important;
      padding: 0 15vw;
  }
  #campus-life .campus-grid > .campus-card:nth-child(odd) ,#stories .stories-grid > .story-card:nth-child(even) {
    margin-left: -15vw;
  }  
  #campus-life .campus-grid > .campus-card:nth-child(even) ,#stories .stories-grid > .story-card:nth-child(odd) {
    margin-left: 15vw;
  }  
  .campus-text {
          font-size: 1rem;
  }
  #stories .stories-header{
    text-align: left;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: -120px;
    position: relative;
    z-index: 1;
  }
  #stories .stories-grid .story-card.tall:first-child{
    top: 0;
    margin-bottom: 80%;
  }
  .story-content{
    top: 80%;
  }
  .seminar-row{
      grid-template-columns: repeat(1, 1fr) !important;
  }
  #seminar .seminar-timeline::before{
    display: none;
  }
  .item-img a:nth-child(2){
    top: 110px;
    left: 21vw;
  }
  .item-img a:nth-child(3){
    top: 110px;
    left: 46vw;
  } 
  .item-img a:nth-child(2) img, .item-img a:nth-child(3) img{
    width:30vw;
  }
  .seminar-year:nth-of-type(3)  .seminar-desc p{
    margin-top: 90px;
  }
  .links{
    display: grid;
  }

  #campus-life .container-lg, #stories .container-lg{
    padding: 0;
  }
  .modal-text{
    width: 100vw;
    max-width: none;
    padding: 30px;
  }
  .modal-text h2{
    text-align: center;
    position: relative ;
    z-index: 3;
  }
  .modal-text .profile {
    text-align: center;
  }

  .modal-img{
    display: none;
  }
  .seminar-img{
    width: 120px;
  }
  #news .container-md{
    padding: 30px;
  }

  /* ニュースアイテムを縦並びに */
  .news-list li a {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 0em;
  }

  /* 日付は１行表示のまま */
  .news-date {
    width: auto !important;
    white-space: nowrap;
    margin: 0;
  }

  /* タイトルを２行目に */
  .news-title {
    display: block;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
  }
.footer-inner{
  padding-bottom: 84px;
}
.seminar-img {
  top: 0;
}
.about-spPh{
  display:block;
  position:absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  z-index: 2;
  margin: -100px auto 0;
}
.modal-tabs {
  margin-top: 44px;
}
.modal-text.modal-seminar{
  height: 65svh;
}
.nav-list{
  line-height: 2rem;
}

.spNone{
  display: none;
}

.modal-text.modal-seminar{
  height: 75svh;
  max-height: 75svh;
}
.modal-text.fresher{
  height: 70svh;
  max-height: 70svh;
}

}

/* ①初期状態 */
.hero-grid > * {
  opacity: 0;
  margin-top: 40px;
}

/* ②animate で段階的に引き上げ＋フェードイン */
.hero-grid.animate > * {
  animation: slideUpIn 0.6s forwards ease-out;
}

/* ③遅延 */
.hero-grid.animate > *:nth-child(1) { animation-delay: 0.1s; }
.hero-grid.animate > *:nth-child(2) { animation-delay: 0.2s; }
/* … */

@keyframes slideUpIn {
  to {
    opacity: 1;
    margin-top: 0;
  }
}
