/* ------------------------------
   Header
------------------------------ */

header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 8px 40px;
  box-sizing: border-box;

  background-color: transparent;
  transition: background-color 0.3s ease;
}


/* スクロール後に付与されるクラス */
header.is-scrolled {
  background-color: rgba(255, 255, 255, 0.46); /* 半透明 */
}

/* ---------Navigation base------------ */
.brand-logo {
  height: 72px;
  width: auto;
  display: block;
}

.brand-logo:hover{
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.global-nav {
  position: relative;
}

.nav-list {
  display: flex;
  gap: 40px;
  align-items: center;
}

.nav-item {
  position: relative;
}


/* サブメニューを持つリンク */
.nav-item > a {
  position: relative;
  padding-right: 24px;
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
}

.nav-item > a:hover{
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

/* ▼アイコン */
.nav-item.has-submenu > a::after {
  content: "▼";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%) scale(0.8);
  font-size: 1em;
  line-height: 1;
}

/* CONTACT メニュー本体 */
.nav-list>.nav-item--contact {
  background-color: #333333;
  font-weight: var(--font-weight-bold);
  padding: 6px 16px 8px 20px;
  border-radius: 100px;
}
.nav-list>.nav-item--contact>a{
  color: #ffffff;
  font-size: 12.8px;
}

/* ホバー時（少し明るくする） */
.nav-item--contact:hover,
.nav-item--contact:focus-visible {
  background-color: #3e3e3e;
  transition: opacity 0.3s ease;
}

/* ▼アイコン */
.nav-item--contact > a::after {
  color: #ffffff;
}



/* ---------Submenu--------- */

.submenu {
  position: absolute;
  top: 100%;
  left: 0;

  min-width: 200px;
  padding: 8px 16px;

  background-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: opacity 0.2s ease, visibility 0.2s ease;

}

.submenu a{
  font-size: var(--font-size-body);
  color: var(--color-text-primary);
  font-weight: var(--font-weight-medium);
}

.submenu li{
  padding: 8px 0px;
  font-size: var(--font-size-mini);
  color: var(--color-text-primary);
  display: flex;
  gap: 2px;
  padding: 4px 0;
}

.submenu li::before {
  content: "－";
  display: block;
  padding-top: 1px;
}


/* 表示条件 */
.nav-item.has-submenu:hover > .submenu,
.nav-item.has-submenu:focus-within > .submenu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ホバー時 サブメニュー（少し明るくする） */
.submenu a:hover{
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.right-edge {
  left: auto;    /* 左位置は無効化 */
  right: -16px;   /* 画面右端から24pxの余白 */
}

@media (max-width: 769px) {
  .brand-logo {
  height: 48px;
}
}

/* ------------------------------
   ハンバーガーメニュー
------------------------------ */
.nav-toggle {
  display: none;
  width: 32px;
  height: 24px;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #000;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 11px; }
.nav-toggle span:nth-child(3) { bottom: 0; }

@media (max-width: 769px) {
  .nav-toggle {
    top: 50%;
    display: block;
  }

  .global-nav {
    position: fixed;
    top: 8px;
    left: 16px;
    right: 16px;
    background-color: rgba(255,255,255,0.95);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    border-radius: 8px;
    max-height: calc(100vh - 16px); /* 画面内に収める */
    overflow-y: auto;               /* 縦スクロールを許可 */
  -webkit-overflow-scrolling: touch; /* iOS対策 */
  }

  .nav-list {
    flex-direction: column;
    gap: 40px;
    padding: 80px 24px;
    width: auto;
  }

  .header.is-open .has-submenu > .submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    box-shadow: none;
    padding: 8px 0 0;
    background-color: transparent;
  }

  .submenu li {
    padding-left: 16px;
  }

  .nav-list>.nav-item--contact>a {
    color: var(--color-text-primary);
  }

  .header.is-open .nav-item.has-submenu > a::after {
    content: none;
  }

  .nav-list>.nav-item--contact{
    background-color: transparent;
    padding: 0;
  }

  .has-submenu{
    text-align: center;
  }

   .nav-item > a{
    padding-right: 0;
    font-weight: var(--font-weight-black);
   }

  .has-submenu li{
    text-align: center;
    padding-left: 0;
    justify-content: center;
  }

  .submenu li::before {
  content: none;
}

  /* メニュー表示時 */
  .header.is-open .global-nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* ハンバーガー → × */
  .header.is-open .nav-toggle span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
  }

  .header.is-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .header.is-open .nav-toggle span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
  }
}


/* ------------------------------
   news-card
------------------------------ */
/* ----------カードのまとまり------------ */
.news-cards{
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  gap: 40px;
}

/* ----------カード単体------------ */
.news-card {
  width: calc(33.3333% - 26.7px);
  min-width: 240px; /* 最小幅を指定 */
  border-radius: 6px;
  border: 1px solid var(--color-text-primary);
  background-color: #fff;
  overflow: hidden;
}


.news-card__image{
  width: 100%;
  height: 196px;
}

.news-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-card__body{
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.news-card__title{
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  line-height: 1.5;
}

.news-card__tags{
  display: flex;
  gap: 8px;
}

.news-card__tag{
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-bold);
  line-height: 1;
  color: var(--color-text-secondary);
}

.news-card:hover .news-card__image{
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

 /* ==========================
   　　レスポンシブ
========================== */

@media screen and (max-width: 911px){
  .news-card {
  width: calc(50% - 20px);
}
}

@media screen and (max-width: 631px){
  .news-cards{
    justify-content: center;
  }
  .news-card {
  width: 100%;
  max-width: 320px;
}
}

/* ------------------------------
   Projectカード
------------------------------ */
.project-group-cards{
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  gap: 40px;
}

/* カード単体 */
.project-card {
  width: calc(33.3333% - 26.7px);
  min-width: 240px; /* 最小幅を指定 */
}

/* 画像エリア */
.project-card__media {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
}

/* 年号 */
.project-card__year {
  position: absolute;
  top: 6px;
  left: 2px;

  width: 90px;
  height: 23px;

  background-color: var(--color-accent);
  transform: translate(-24px, 0px) rotate(-34deg);

  z-index: 2;
  pointer-events: none;

  text-align: center;
  font-size: var(--font-size-mini);
  font-weight: var(--font-weight-bold);
}


/* 画像 */
.project-card__image {
  width: 100%;
  height: 196px;
  object-fit: cover;
  display: block;
  border-radius: 6px;
}


/* 最前面に出す枠線 */
.project-card__media::after {
  content: "";
  position: absolute;
  inset: 0;

  border: 1px solid var(--color-text-primary);
  border-radius: inherit;

  pointer-events: none;
  z-index: 10; /* 黄色タグより上 */
}




/* オーバーレイ全体（背景用） */
.project-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.9); /* 半透明の白 */
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
  border: 1px solid var(--color-text-primary);
  border-radius: 6px;
}

/* オーバーレイの中身 */
.project-card__overlay-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 24px 24px 24px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

/* ホバー時の表示制御 */
.project-card__media:hover .project-card__overlay,
.project-card__media:hover .project-card__overlay-content {
  opacity: 1;
}

/* 説明文 */
.project-card__description {
  font-size: var(--font-size-mini);
  font-weight: var(--font-weight-medium);
  line-height: 1.5;
  color: var(--color-text-primary);
  margin-bottom: 12px;
}

/* 詳細リンク */
.project-card__more {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  font-size: 11.67px;
  color: var(--color-text-primary);
  font-weight: var(--font-weight-black);
  text-decoration: none;
}

/* 詳細リンク 矢印*/
.project-card__more img{
  width: 12px;      
  height: auto;
} 

.project-card__more:hover{
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

/* リンク無しカード */
.project-card--no-link .project-card__media {
  cursor: default;
}

/* ボディ（画像の下に配置） */
.project-card__body {
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-black);
  line-height: 1.5;
  margin-top: 12px;
}

/* タイトル */
.project-card__title {
  font-size: 16px;
  margin: 0 0 4px;
}

/* メタ情報 */
.project-card__meta {
  font-size: var(--font-size-mini);
  font-weight: var(--font-weight-medium);
  color: #666;
}

 /* ==========================
   　　レスポンシブ
========================== */

@media screen and (max-width: 911px){
  .project-card {
  width: calc(50% - 20px);
}
}

@media screen and (max-width: 631px){
  .project-group-cards{
    justify-content: center;
  }
  .project-card {
  width: 100%;
  max-width: 320px;
}
}

/* ------------------------------
   btn secondary
------------------------------ */

.btn-secondary{
  display: inline-flex;
  justify-content: flex-end;
  position: relative;
  align-items: center;
  gap: 16px;
  font-size: var(--font-size-meta);
  font-weight: var(--font-weight-bold);
}

/* 右向き三角形（内角60°） */
.btn-secondary::after {
  content: "";
  display: inline-block;
  width: 10px;       /* 水平方向の長さ */
  height: 10px;      /* 垂直方向の長さ */
  border-bottom: 3px solid currentColor;
  border-right: 3px solid currentColor;

  /* 内角60°に合わせる */
  transform: rotate(-45deg); /* 回転なしでも60°に見える角度 */
  transform-origin: center;
}

.btn-secondary:hover{
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

/* ------------------------------
   もっと見るbtn
------------------------------ */
.btn-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 24px;
  font-size: var(--font-size-meta);
  font-weight: var(--font-weight-black);
  color: var(--color-text-primary);
  background-color: #fff;
  border: 1px solid var(--color-text-primary);
  border-radius: 6px;
}

.btn-more__text {
  position: relative;
  padding-right: 24px; /* ＋分の余白 */
}

/* 横線（－） */
.btn-more__text::before {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  width: 14px;
  height: 2px;
  margin-left: 16px; /* ← テキストから16px */
  background-color: currentColor;
  transform: translateY(-50%);
}

/* 縦線（｜） */
.btn-more__text::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  width: 2px;
  height: 14px;
  margin-left: 22px; /* 16px + 横線の半分 */
  background-color: currentColor;
  transform: translateY(-50%);
  transition: opacity 0.2s ease;
}

/* 開いた状態 → 「－」 */
.btn-more.is-open .btn-more__text::after {
  opacity: 0;
}

@media (max-width: 376px) {
  .btn-more{
    padding: 16px;
  }
}


/* ------------------------------
   btn
------------------------------ */

.btn{
  display: inline-block;    
  position: relative;
  width: 600px;
  font-size: var(--font-size-meta);
  font-weight: var(--font-weight-bold);
  color: #fff;
  background-color: var(--color-text-primary);
  padding: 24px;
  border-radius:6px ;
  margin-inline: auto;
  text-align: center;
  border: 1px solid var(--color-text-primary);
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.btn-icon {
  position: absolute;        /* 親に対して絶対位置 */
  right: 24px;               /* 右端から24px */
  top: 50%;                  /* 縦中央 */
  transform: translateY(-50%); /* 正確に中央揃え */
  width: 24px;               /* 必要に応じて調整 */
  height: auto;
  pointer-events: none;      /* クリックはテキストに通す場合 */
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

/* 一覧に戻るボタン */
.btn-return .btn-icon {
  position: absolute;        /* 親に対して絶対位置 */
  right: 16px;               /* 右端から24px */
  top: 52%;                  /* 縦中央 */
  transform: translateY(-50%); /* 正確に中央揃え */
  width: 36px;               /* 必要に応じて調整 */
  height: auto;
  pointer-events: none;      /* クリックはテキストに通す場合 */
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

/* 前のページを見るボタン */
.btn-pre .btn-icon {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: auto;
    pointer-events: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ボタンのまとまり */

.stacked-buttons{
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.btn:hover{
  background-color:#EEEEEE;
  color: var(--color-text-primary);
}

.btn:hover .btn-icon{
  color: var(--color-text-primary);
}

 /* ==========================
   　　レスポンシブ
========================== */
@media screen and (min-width: 631px){
  .btn-sp{
    display: none;
  }
}

@media screen and (max-width: 769px){
.stacked-buttons{
  width: 100%;
}

  .btn{
     width:100%;
  }
}
@media screen and (max-width: 376px){
.btn{
     font-size: var(--font-size-body);
  }
}


/* ------------------------------
   Footer
------------------------------ */
.footer{
  width: 100%;
  background-color: #585858;
  color: #fff;
}

.footer-inner{
  max-width: 1200px;
  margin-inline: auto;
  padding: 80px 40px;
}

.footer-message{
  font-size: var(--font-size-heading-md);
  font-weight: var(--font-weight-black);
  line-height: 1.5;
  margin-bottom: 120px;
}

.footer-main{
  width: 100%;
  display: flex;
  gap: 80px;
}

.footer-company{
  flex: 3;
}

.footer-logo{
  height: 80px;
  width: auto;
  display: block;
  margin-bottom: 32px;
}

.footer-logo img{
  height: 100%;
  object-fit: cover;
}

address {
  font-style: normal;
  font-size: var(--color-text-secondary);
  line-height: 1.5;
}

.footer-nav{
  flex: 7;
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
}

.footer-nav-group{
  width: calc(33.333% - 32px);
}

.footer-nav-title{
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-black);
  padding-bottom: 4px;
}

.footer-nav-group li{
  display: flex;
  font-size: var(--font-size-mini);
  font-weight: var(--font-weight-regular);
  padding: 4px 0;
}

.footer-nav-group li::before {
  content: "－ ";
  display: block;
}

.footer-bottom{
  text-align: center;
  padding-top: 80px;
}
/* ==========================
   　　レスポンシブ
========================== */
@media (max-width: 769px){
  .footer-inner{
  padding: 64px 40px;
}
  .footer-message{
  font-size: 25.6px;
  margin-bottom: 64px;
}
.footer-main{
  flex-direction: column-reverse;
  gap: 80px;
}
.footer-logo{
  height: 48px;
}
}

@media screen and (max-width: 631px){
  .footer-nav{
    gap: 24px;
  }
  .footer-nav-group{
  width: 100%;
}
}


/* ------------------------------
   TOPに戻る
------------------------------ */

.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  width: 56px;
  height: 56px;
  box-sizing: border-box;

  border: 1px solid var(--color-text-primary);
  border-radius: 100px;
  background-color: rgba(255, 255, 255, 0.455);

  /* 追加分：初期は非表示 */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* 表示状態 */
.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* SVG */
.to-top img {
  height: 16px;
  width: auto;
  max-width: 100%;
  display: block;
}

.to-top:hover{
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.footer a:hover{
  opacity: 0.5;
  transition: opacity 0.3s ease;
}