.project-main{

  .iframe-wrap{
    position: relative;
    width: 100%;
    padding: 56% 0 0 0;
    iframe{
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
    }
  }
      
  .project-tab-section {
    margin-bottom: 5%;
  }

  .tab-container {
    display: flex;
    border-bottom: 3px solid var(--colorLightBase);
  }

  .tab {
    width: 32%;
    padding: 15px 10px;
    margin-right: 15px;
    text-align: center;
    background-color: #EAEAEA;
    cursor: pointer;
    border-radius: 10px 10px 0 0;
    transition: background-color 0.3s ease;
    font-size: clamp(15px, 2.5vw, 18px);
    font-weight: bold;
    white-space: nowrap;
  }
  
  @media (max-width: 768px) {
    .tab {
      width: 47%;
    }
  }

  .tab:hover,
  .tab.active {
    background-color: var(--colorLightBase);
    color: white;
  }

  .tab-content {
    margin-top: 5%;
  }


  .tab-pane {
    display: none;
  }

  .tab-pane.active {
    display: block;
  }

  .ul-bg{
    background: #f5f5f5;
    padding: 20px;
    border-radius: 10px;
  }
  
} /* project-main*/


.main__wrapper.project-detail-bg{
  background: var(--colorLightGray);
  overflow: visible;
}
@media (max-width: 1024px) {
  .main__wrapper.project-detail-bg{
    overflow: hidden;
  }
}


.project-detai-container{
  padding-bottom: 5%;
  position: relative;
}

@media (max-width: 1024px) {
  .project-detai-container{
    padding-bottom: 8%;
  }
}
.project-detail-title-block{
  /* padding: 3em 0; */
  padding: 1em 0 3em;
}

@media (max-width: 768px) {
  .project-detail-title-block {
    padding: 0 0 20px;
  }
}

.project-detail-title{
  font-size: clamp(18px, 3vw, 30px);
  font-weight: bold;
  background: #fff;
  padding: 10px 1em;
}


.project-main {
  width: 60%;
  padding-right: 3%;
}

@media (max-width: 1024px) {
  .project-main {
    width: 100%;
  }
}
.project-content{
  display: flex;
  justify-content: space-between;
}

@media (max-width: 1024px) {
  .project-content {
    flex-direction: column;
  }
}

.project-content-block{
  margin-bottom: 8%;
}
.content-box{
  background: #fff;
  border-radius: 10px;
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.10);
}
.content-box__obi{
  border-radius: 10px 10px 0px 0px;
  background: var(--colorLightBase);
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.10);  
  color: #FFF;
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 700;
  line-height: normal;
  padding: 0.7em 1em;
}

.project-action-list{
  /* margin-bottom: 5%; */
}
.project-action-list__item{
  margin-bottom: 1%;
}
.project-action-list__item a{
  font-size: clamp(16px, 2vw, 20px);
  font-weight: bold;
}
.project-action-list__item a:hover{
  text-decoration: underline;
}

.content-box__inner{
  padding: 30px;
}
.project-img-box{
  margin-bottom: 4%;
}

.project-img-box img{
  max-height:600px;
  object-fit: contain;
}

.project-text-box p{
  font-size: clamp(14px, 2.5vw, 18px);
  margin-bottom: 1em;
  line-height: 2em;
}
.project-text-box a{
  font-size: clamp(14px, 2.5vw, 18px);
  text-decoration: underline;
  color:var(--colorLightBase);
}
.project-text-box a:hover{
  text-decoration: none;  
}
.project-text-box h2{
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: bold;
  margin-bottom: 1em;
}
.project-text-box h3{
  font-size:24px;
  font-size: clamp(18px, 2.3vw, 24px);
  font-weight: bold;
  margin-bottom: 1em;
}
.project-text-box h4{
  /* font-size:20px; */
  font-size: clamp(14px, 2.3vw, 20px);
  font-weight: bold;
  margin-bottom: 1em;
}

.project-text-box h1 + br,
.project-text-box h2 + br,
.project-text-box h3 + br,
.project-text-box h4 + br,
.project-text-box h5 + br,
.project-text-box h6 + br {
    display: none;
}


.project-index-list__link{
  font-size: clamp(16px, 2.5vw, 18px);
  text-decoration: underline;
  padding-left: 10px;
}
.project-index-list__item{
  margin-bottom: 1%;
}
/**/

.project-sidebar {
  width: 38%;
  box-sizing: border-box;
  /* min-width: 500px; */
  background-color: #fff;
  padding: 0;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  border-radius: 6px;
  align-self: flex-start;
}





.project-sidebar--sticky {
  position: sticky;
  top: 80px;
  right:3%;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}

@media (max-width: 1024px) {
  .project-sidebar {
    width: 100%;
    min-width: auto;
    position: static;
    margin-bottom:8%;
  }
}


/* @media (max-width: 768px) {
  .project-sidebar--sticky  {
      position: static;
      height: auto;
      overflow-y: visible;
  }
} */


.project-sidebar__inner {
  padding: 20px;
}


.project-sidebar__location {
  background-color: var(--colorLightBase);
  padding: 5px 10px;
  border-radius: 6px 0 0 0;
  display: inline-block;
  margin-bottom: 15px;
}
.project-sidebar__location-text{
  color: #fff;
  font-size: clamp(20px, 2vw, 26px);
  transition: opacity 0.3s ease;
}

.project-sidebar__location-text:hover {
  opacity: 1;
  text-decoration: underline;
}

.project-sidebar__donation {
  margin-bottom: 5%;
}

.project-sidebar__donation-current {
  margin-bottom: 10px;
}
.project-sidebar__donation-current-label{
  font-size: 16px;
  font-weight: bold;
  display: block;
  margin-bottom: 3%;
}
.project-sidebar__donation-current-label::before {
  content: '';
  display: inline-block;
  width: 26px;
  height: 26px;
  background-image: url('../img/common/icon-yen.svg');
  background-size: 26px;
  background-repeat: no-repeat;
  background-position: center;
  margin-right: 0.5em;
  vertical-align: middle;
  transform: translateY(-3px);
}
.project-sidebar__donation-current-amount{
  font-size: 50px;
  font-weight:900;
  line-height: 1;
}
.project-sidebar__donation-current-amount .yen{
  font-size: 20px;
  font-weight:900;
  padding-left: 5px;
}
.project-sidebar__donation-current-amount.type-hide{
  font-size: 18px;
  font-weight:bold;
  line-height: 1;
}

.project-sidebar__donation-goal{
  margin-bottom: 10px;
}
.project-sidebar__donation-goal-label{
  font-size: 16px;
  font-weight: bold;
}
.project-sidebar__donation-goal-amount{
  font-size: 16px;
  font-weight: bold;
}
.project-sidebar__donation-notice{
  font-size: 14px;
  color:var(--colorLightBlack);
}

.project-sidebar__progress-bar {
  background-color: #e0e0e0;
  height: 20px;
  border-radius: 5px;
  overflow: hidden;
  margin-top: 10px;
}

.project-sidebar__progress {
  background-color: #FF6B6B;
  height: 100%;
}

.project-sidebar__stats {
  display: flex;
  justify-content: flex-start;
  gap:5%;
  margin-bottom: 20px;
}

.project-sidebar__stat-item {
  text-align: center;
}

.project-sidebar__stat-label {
  font-size: 16px;
  font-weight: bold;
  margin-right: 10px;
}

.project-sidebar__stat-value {
  font-size: 36px;
  font-weight: 900;
  line-height: 1;
}
.project-sidebar__stat-value .min{
  font-size: 16px;
  font-weight: bold;
  margin-left: 2px;
}

.project-sidebar__tags {
  margin-bottom: 20px;
}

.project-sidebar__tag {
  display: inline-block;
  color: var(--colorLightBase);
  margin-right: 5px;
  text-decoration: underline;
  font-size: 16px;
}
.project-sidebar__tag:hover {
  text-decoration: none;
}

.project-sidebar__donate-button-wrap {
  margin-bottom: 10%;
}

.project-sidebar__donate-button {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background-size: 200% auto;
  background-image: linear-gradient(91deg, #FF724D 0%, #EB0139 50%, #FF724D 100%);
  width: 254px;
  height: 64px;
  color: #FFF;
  font-size: clamp(18px, 2.5vw, 24px);
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  text-align: center;
  transition: background-position 0.2s ease;
}

.project-sidebar__donate-button:hover {
  background-position: 100% 0;
}

@media (max-width: 1024px) {
  .project-sidebar__donate-button-wrap {
    position: fixed;
    bottom: 30px;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 80%;
    z-index: 100;
  }
  .project-sidebar__donate-button{
    max-width: 160px;
    height:55px;
  }
}
@media (max-width: 650px) {
  .project-sidebar__donate-button-wrap {
    width: 60%;
  }
  .project-sidebar__donate-button{
    max-width: 180px;
  }
}




.project-sidebar__donate-button--disabled {
  background: #eee;
  color: #888;
  cursor: default;
}

.project-sidebar__payment-methods {
  margin-bottom: 20px;
  display: flex;
  justify-content: flex-start;
}

.project-sidebar__payment-label {
  margin-bottom: 5px;
  width: 6em;
  white-space: nowrap;
  font-weight: bold;
  font-size: 15px;
}

.project-sidebar__payment-options {
  font-size: 15px;
  line-height: 1.4;
  font-weight: bold;
}

.project-sidebar__supporting-companies {
}

.project-sidebar__companies-title {
  border-radius: 30px;
  background: var(--colorGold);
  color:#fff;
  text-align: center;
  border-radius: 30px;
  padding:0.5em 1em;
  margin-bottom: 3%;
}

.project-sidebar__companies-notice {
  font-size:12px;
  color:#777;
  margin-bottom: 3%;
  padding:0 0 0 20px;
}

.project-sidebar__companies-list {
  list-style: none;
  padding: 0;
  display: grid; 
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(min-content, max-content);
  gap: 20px 2%; 
}

.project-sidebar__companies-item__link {
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  text-align: center; 
  height:100%;
}

.project-sidebar__company-logo-wrap {
  display: flex; 
  justify-content: center; 
  align-items: center; 
  height: 60px; 
  max-height: 60px; 
  overflow: hidden; 
  margin-bottom: 10px;
}

.project-sidebar__company-logo {
  max-height: 100%; 
  object-fit: contain; 
}

.project-sidebar__company-name {
  display: block; 
  text-align: center; 
  font-size: 12px;
  line-height: 1.2;
  padding:0 1.5em;
}


/**/






/**/

.lg-project__info-header{
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding-bottom: 1%;
}

.lg-project__info-header__logo {
  width: 136px;
  height: 136px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 20px;
}

@media (max-width: 768px) {
  .lg-project__info-header__logo {
    width: 100px;
    height: 100px;
  }
}

.lg-project__info-header__logo img {
  max-width: 100%;
  max-height: 80px;
  object-fit: contain;
}

.lg-project__info-header__name-block {
  flex: 1;
  display: flex;
}

.lg-project__info-header__name-kana {
   font-size: clamp(10px, 2vw, 14px);
}

.lg-project__info-header__name {
  font-size: clamp(16px, 2vw, 26px);
  font-weight: bold;
}

.featured-project-wrapper {
    position: relative;
    background-color: #fff;
    padding-top: 30px;
    margin-bottom: 30px;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: calc(50vw - 50%);
    padding-right: calc(50vw - 50%);
    min-height: 40vw;  /* 比率で指定 - 三角形サイズに合わせて十分な高さを確保 */
    overflow: visible; /* 三角形が切れないように変更 */
}

@media (max-width: 768px) {
  .featured-project-wrapper {
    padding: 3%;
    min-height: 50vw; /* モバイル用の高さを比率で指定 */
    overflow: visible;
  }
}

/* triangle-fixクラスのスタイル */
.triangle-fix {
  position: relative;
  overflow: visible !important; /* 三角形が切れないようにする */
}

.triangle-fix::after {
  content: '';
  display: block;
  clear: both;
}

/* 基本の三角形スタイル */
.feature-triangle,
.featured-project-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0; /* ウィンドウの左端から始まる */
    width: 0;
    height: 0;
    border-style: solid;    
    border-color: var(--colorLightBase) transparent transparent transparent;
    z-index: 0;
    border-width: 630px 48vw 0 0; /* 基本サイズ統一 */
}

/* 内側の三角形は少し小さめに */
.front_page .feature-triangle {
    border-width: 600px 43vw 0 0;
}


@media screen and (max-width: 960px) {
  .feature-triangle,
  .featured-project-wrapper::before {
    border-width: 630px 68vw 0 0; /* 基本サイズ統一 */
  }
}

@media screen and (max-width: 767px) {
  .featured-project-header__title {
      font-size: clamp(18px, 3vw, 24px);
      min-width: 250px;
  }    
  .featured-project-header__text {
      padding-left: 10px;
  }

  .feature-triangle,
  .featured-project-wrapper::before {
      border-width: 500px 100vw 0 0;
  }
  
  .front_page .feature-triangle {
      border-width: 480px 95vw 0 0;
  }

}

.featured-project-content {
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.featured-project-header {
    position: relative;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0;
}

.featured-project-header__text {
    display: flex;
    flex-direction: column;
}

.project_detail .featured-project-header__text{
  width: 200px;
}

@media screen and (max-width: 768px) {
  .featured-project-header {
    margin-bottom: 20px;
  }

  .project-detai-container:not(.type-support-detail) .featured-project-header__text{
    display: none;
  }
}

.featured-project-header__feature {
    display: block;
    color: #FFE100;
    font-weight: bold;
    font-size: 12px;
    margin-bottom: 0px;
}

.featured-project-header__title {
    color: #fff;
    font-size: clamp(20px, 4vw, 28px);
    font-weight: bold;
    margin: 0;
    line-height: 1.5;
    white-space: nowrap;
    padding-right:1em;
}
.featured-project-header__title-sub {
    background:#fff;
    font-size: 14px;
    padding:5px 10px;
    margin-top: 10px;
}

.featured-project-header__buttons {
    display: flex;
    align-items: center;
    padding-top: 45px;
}

.featured-project-header__buttons .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5em 1.5em;
    min-width: 12em;  /* 約206px */
    background: #fff;
    border-radius: 30px;
    border: 1px solid var(--colorLightBase);
    color: var(--colorLightBase);
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.featured-project-header__buttons .button:hover {
    background: var(--colorLightBase);
    color: #fff;
    opacity:1;
}

@media screen and (max-width: 600px) {
  .featured-project-header__buttons {
    margin-bottom: 10px;
  }
  .featured-project-header__buttons .button {
    padding: 0.5em 0.2em;
    transition: none;
    right: inherit;
  }
  .featured-project-header__buttons .button:hover {
    opacity: 1;
  }
}


.featured-project-header__buttons .button.arrow::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 7px solid currentColor;
    margin-left: 8px;
}

.featured-project-and-grid {
    position: relative;
    z-index: 1;
}


.trend-section {
    position: relative;
    margin: 0 calc(50% - 50vw);
    padding: 0 calc(50vw - 50%);
    margin-bottom: 11%;
    margin-top: 4%;
}

.trend-section__inner {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.trend-section__header {
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
}

.trend-section__background {
    position: absolute;
    left: -50vw;
    right: -50vw;
    width: 150vw;
    /* top: 380px; */
    top: 480px;
    
    height: calc(100% + 200px);
    background: var(--colorLightBase);
    transform: skewY(-10deg);
    transform-origin: 0 0;
    z-index: -1;
}

.trend-cards {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.trend-card {
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    /* 個別にトランジションを設定 */
    transition-property: opacity, transform, box-shadow;
    transition-duration: 0.6s, 0.6s, 0.3s;
    transition-timing-function: ease-out, ease-out, ease;
    /* box-shadowのdelayは常に0s */
    transition-delay: 0s, 0s, 0s;
    opacity: 0;
    transform: translateY(40px);
}

.trend-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* カードの位置を調整（元の高さ比率を保持） */
.trend-card:nth-child(1) {
    transform: translateY(70px);
    transition-delay: 0s, 0s, 0s;
}

.trend-card:nth-child(2) {
    transform: translateY(-20px);
    transition-delay: 0.2s, 0.2s, 0s;
}

.trend-card:nth-child(3) {
    transform: translateY(-110px);
    transition-delay: 0.4s, 0.4s, 0s;
}

.trend-card.is-visible:nth-child(1) {
    transform: translateY(40px);
}

.trend-card.is-visible:nth-child(2) {
    transform: translateY(-50px);
}

.trend-card.is-visible:nth-child(3) {
    transform: translateY(-140px);
}

.trend-card:hover {
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .trend-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* モバイル時は通常の配置に戻す */
    .trend-card:nth-child(1),
    .trend-card:nth-child(2),
    .trend-card:nth-child(3) {
        transform: translateY(40px);
        /* モバイル時もbox-shadowのdelayは0sに */
        transition-delay: 0s, 0s, 0s;
    }
    
    .trend-card.is-visible:nth-child(1),
    .trend-card.is-visible:nth-child(2),
    .trend-card.is-visible:nth-child(3) {
        transform: translateY(0);
    }
    
    .trend-card:hover {
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
}

.trend-section__title-en {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--colorLightBase);
}

.trend-section__title-ja {
    font-size: clamp(28px, 4vw, 38px);
    font-weight: bold;
    margin-bottom: 18px;
    color: var(--colorLightBase);
    line-height: 1.2;
}

.trend-section__description {
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 20px;
    display: inline-block;
    background: #fff;
}

.trend-section__button {
    display: inline-flex;
    align-items: center;
    padding: 12px 30px;
    background: #fff;
    border-radius: 30px;
    color: var(--colorLightBase);
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    transition: opacity 0.3s;
}

.trend-section__button:hover {
    opacity: 0.8;
}

.trend-section__button::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 7px solid currentColor;
    margin-left: 8px;
}

.trend-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.trend-card__image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.trend-card__content {
    padding: 20px;
}

.trend-card__title {
    font-size: 16px;
    font-weight: bold;
    line-height: 1.6;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trend-card__description {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trend-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.trend-card__tag {
    font-size: 12px;
    color: var(--colorLightBase);
    text-decoration: underline;
}

.trend-card__tag:hover {
    text-decoration: none;
}


.project-news-section {
  background-color: #fff;
  padding: 3%;
  border-radius: 10px;
}

@media screen and (max-width: 600px) {
  .project-news-section {
    padding: 5%;
    border-radius: 0px;
  }
}

/* トレンドページ専用のスタイル */
.project-detai-container .trend-section__inner {
    max-width: inherit;
}

.project-detai-container .trend-card {
    transform: translateY(0) !important; /* 位置を強制的に揃える */
    transition: box-shadow 0.3s;
}

.project-detai-container .trend-card.is-visible {
    transform: translateY(0) !important;
}

/* front-page用の段差のあるスタイルはそのまま残す *//* .trend-card:nth-child(1),
.trend-card:nth-child(2),
.trend-card:nth-child(3),
.trend-card.is-visible:nth-child(1),
.trend-card.is-visible:nth-child(2),
.trend-card.is-visible:nth-child(3) {
    // ... existing transform styles ...
} */
