@charset "UTF-8";
/*
    Template: swell
    Theme Name: SWELL CHILD
    Theme URI: https://swell-theme.com/
    Description: SWELLの子テーマ
    Version: 1.0.0
    Author: LOOS WEB STUDIO
    Author URI: https://loos-web-studio.com/

    License: GNU General Public License
    License URI: http://www.gnu.org/licenses/gpl.html
*/

/*メインキャッチフレーズ設定*/
.p-mainVisual__slideTitle {
    font-size: 2.5em;
}

.swell-block-fullWide img, .alignfull img{
  margin: 0 auto;
}

/*グローバルメニューの設定*/
ul.c-gnav {
    padding: 30px 0px;
}
.c-gnav li{
	padding: 0px 15px;
}

/*強みのフォントカラー設定*/
figcaption.wp-element-caption {
    color: #fff;
}
/*施工事例　フォントカラー設定*/
.swell-block-column.swl-has-mb--s.works-font {
    color: #fff;
}
/*追従ボタン1*/
.follow-banner {
  position: fixed;
  top: 45%;
  right: 0;
  transform: translateY(-50%);
  z-index: 100;
}

.follow-banner a {
  display: flex;
  align-items: center;
  gap: 0.5em;
  writing-mode: vertical-rl;
  color: #fff;
  background-color: var(--color_main);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 1.5em 1em;
  border-radius: 10px 0 0 10px;
  transition: opacity 0.25s;
}

.follow-banner a:hover {
  opacity: 0.7;
}

.follow-banner .swl-inline-icon::after {
  left: 50%;
  transform: translateX(-50%);
}

/* スマホでは非表示に */
@media screen and (max-width: 599px) {
  .follow-banner {
    display: none;
  }
}
/*追従ボタン2*/
.follow-banner2 {
  position: fixed;
  top: 65%;
  right: 0;
  transform: translateY(-50%);
  z-index: 100;
}

.follow-banner2 a {
  display: flex;
  align-items: center;
  gap: 0.5em;
  writing-mode: vertical-rl;
  color: #fff;
  background-color: #5f0907;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 1.5em 1em;
  border-radius: 10px 0 0 10px;
  transition: opacity 0.25s;
}

.follow-banner2 a:hover {
  opacity: 0.7;
}

.follow-banner2 .swl-inline-icon::after {
  left: 50%;
  transform: translateX(-50%);
}

/* スマホでは非表示に */
@media screen and (max-width: 599px) {
  .follow-banner2 {
    display: none;
  }
}

/* ページ全体ローディング画面 */
.page-loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out;
}

.page-loading__content {
  text-align: center;
  color: #ffffff;
}

.page-loading__spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #ffffff;
  border-radius: 50%;
  animation: pageSpinLoading 1.2s linear infinite;
  margin: 0 auto 20px;
}

.page-loading__text {
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 0.1em;
  opacity: 0.8;
  animation: pageTextPulse 2s ease-in-out infinite;
}

@keyframes pageSpinLoading {
  0% { 
    transform: rotate(0deg); 
  }
  100% { 
    transform: rotate(360deg); 
  }
}

@keyframes pageTextPulse {
  0%, 100% { 
    opacity: 0.8; 
  }
  50% { 
    opacity: 0.4; 
  }
}

/* メインビジュアル 3分割画像レイアウト */
.p-mainVisual__slideImages {
  display: flex;
  width: 100%;
  height: 100vh; /* 画面いっぱいの高さに設定 */
  min-height: 100vh;
  align-items: stretch;
}

.p-mainVisual__slideImage {
  flex: 1 1 calc(33.333% - 1px); /* 自動で3分割、境界線分を差し引く */
  width: calc(33.333% - 1px);
  max-width: calc(33.333% - 1px);
  height: 100%; /* 親要素の高さに合わせる */
  position: relative;
  overflow: hidden; /* はみ出た部分をトリミング */
}

.p-mainVisual__slideImage img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 縦横比を保ったまま、コンテナ全体を覆うようにトリミング */
  object-position: center; /* トリミング位置を中央に設定 */
  display: block;
}

/* 2つの画像のみの場合は50%ずつ */
.p-mainVisual__slideImages:has(.p-mainVisual__slideImage:nth-child(2):last-child) .p-mainVisual__slideImage {
  flex: 1 1 calc(50% - 0.5px);
  width: calc(50% - 0.5px);
  max-width: calc(50% - 0.5px);
}

/* 1つの画像のみの場合は100% */
.p-mainVisual__slideImages:has(.p-mainVisual__slideImage:first-child:last-child) .p-mainVisual__slideImage {
  flex: 1 1 100%;
  width: 100%;
  max-width: 100%;
}

.p-mainVisual__slideImage.-left {
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.p-mainVisual__slideImage.-center {
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

/* カーテンアニメーション */
.p-mainVisual__curtain {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background-color: #000000;
  z-index: 1;
  transform: translateX(0);
  animation: curtainSlide 0.4s ease-out forwards;
}

.p-mainVisual__curtain.-delay-1 {
  animation-delay: 0.05s;
}

.p-mainVisual__curtain.-delay-2 {
  animation-delay: 0.1s;
}

.p-mainVisual__curtain.-delay-3 {
  animation-delay: 0.15s;
}

/* カーテンアニメーションのキーフレーム */
@keyframes curtainSlide {
  0% {
    transform: translateX(0);
  }
  10% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* 画像の初期状態（アニメーション開始前は非表示） */
.p-mainVisual__slideImage img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 縦横比を保ったまま、コンテナ全体を覆うようにトリミング */
  object-position: center; /* トリミング位置を中央に設定 */
  display: block;
  opacity: 0;
  animation: imageReveal 0.2s ease-out forwards;
}

/* 画像表示アニメーション（カーテンの後に実行） */
.p-mainVisual__slideImage.-left img {
  animation-delay: 0.4s;
}

.p-mainVisual__slideImage.-center img {
  animation-delay: 0.45s;
}

.p-mainVisual__slideImage.-right img {
  animation-delay: 0.5s;
}

@keyframes imageReveal {
  0% {
    opacity: 0;
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* メインビジュアル テキストオーバーレイ */
.p-mainVisual__textOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3); /* 半透明の黒いオーバーレイ */
  z-index: 2;
}

.p-mainVisual__textContent {
  text-align: center;
  color: #ffffff;
  max-width: 100%;
  padding: 0 20px;
}

.p-mainVisual__mainText {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  letter-spacing: 0.05em;
}

.p-mainVisual__subText {
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.6;
  margin: 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  opacity: 0.9;
}

/* ローディングスピナー */
.p-mainVisual__loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: opacity 0.5s ease-out;
}

.p-mainVisual__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { 
    transform: rotate(0deg); 
  }
  100% { 
    transform: rotate(360deg); 
  }
}

/* ローディング完了後のアニメーション制御 */
.p-mainVisual__slideImages:not(.-loaded) .p-mainVisual__curtain,
.p-mainVisual__slideImages:not(.-loaded) .p-mainVisual__slideImage img {
  animation-play-state: paused;
}

.p-mainVisual__slideImages.-loaded .p-mainVisual__curtain,
.p-mainVisual__slideImages.-loaded .p-mainVisual__slideImage img {
  animation-play-state: running;
}

/* タブレット・スマホでの調整 */
@media screen and (max-width: 768px) {
  .p-mainVisual__slideImages {
    height: 70vh; /* タブレットでは70vh */
    min-height: 70vh;
    flex-direction: column;
  }
  
  .p-mainVisual__slideImage {
    flex: 1 1 calc(33.333% - 1px);
    height: calc(33.333% - 1px); /* 縦積みの場合は高さを3分割 */
    width: 100%;
    max-width: 100%;
  }
  
  .p-mainVisual__slideImage.-left,
  .p-mainVisual__slideImage.-center {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }
  
  /* 2つの画像のみの場合 */
  .p-mainVisual__slideImages:has(.p-mainVisual__slideImage:nth-child(2):last-child) .p-mainVisual__slideImage {
    height: calc(50% - 0.5px);
  }
  
  /* 1つの画像のみの場合 */
  .p-mainVisual__slideImages:has(.p-mainVisual__slideImage:first-child:last-child) .p-mainVisual__slideImage {
    height: 100%;
  }
  
  /* タブレット用テキストスタイル調整 */
  .p-mainVisual__mainText {
    font-size: 2rem;
  }
  
  .p-mainVisual__subText {
    font-size: 1rem;
  }
}

@media screen and (max-width: 480px) {
  .p-mainVisual__slideImages {
    height: 60vh; /* スマホでは60vh */
    min-height: 60vh;
  }
  
  /* スマホ用テキストスタイル調整 */
  .p-mainVisual__textContent {
    padding: 0 15px;
    max-width: 100%;
  }
  
  .p-mainVisual__mainText {
    font-size: 1.5rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
  }
  
  .p-mainVisual__subText {
    font-size: 0.9rem;
    line-height: 1.5;
  }
}

/* swell-block-fullWide / alignfull 要素のアニメーション */
.swell-block-fullWide img,
.alignfull img {
  animation-play-state: paused;
  opacity: 0;
}

/* 基本的な画像スタイル - 全ての画像を確実に表示 */
img {
  opacity: 1 !important;
  display: block;
  max-width: 100%;
  height: auto;
}

/* 記事・投稿リスト・アーカイブコンテンツ内の画像は絶対に隠さない */
.p-entryContent img,
.c-postList img, 
.p-archiveContent img,
.single img,
article img,
.post img,
.page img {
  opacity: 1 !important;
  animation: none !important;
  animation-play-state: running !important;
  visibility: visible !important;
}

/* 特定の要素のみアニメーション適用（記事コンテンツ外） */
body > .swell-block-fullWide img,
body > .alignfull img,
.wp-block-group > .swell-block-fullWide img,
.wp-block-group > .alignfull img {
  opacity: 0;
  animation-play-state: paused;
}

/* カーテンアニメーション要素 */
.fullwide-curtain {
  animation-play-state: paused;
}

/* アニメーション開始状態 */
.animation-started .fullwide-curtain {
  animation-play-state: running;
}

.animation-started > .swell-block-fullWide img,
.animation-started > .alignfull img {
  animation-play-state: running;
}

/* fullWide カーテンアニメーションのキーフレーム */
@keyframes fullwideCurtainSlide {
  0% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* fullWide 画像表示アニメーション */
@keyframes fullwideImageReveal {
  0% {
    opacity: 0;
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* 高速バージョンの追加スタイル */
.swell-block-fullWide,
.alignfull {
  overflow: hidden;
}

.swell-block-fullWide img,
.alignfull img {
  transition: transform 0.3s ease-out;
}

.swell-block-fullWide img:hover,
.alignfull img:hover {
  transform: scale(1.02);
}