/*
 Theme Name: Cocoon Child
 Template:   cocoon-master
 Version:    1.0.3
 Description: Custom child theme for Tkahiro's Portfolio - Fixed Version 2
*/

@charset "UTF-8";

/* =========================================== */
/* スクロール問題対策（修正版） */
/* =========================================== */
html {
    overflow-y: scroll !important;
    height: auto !important;
}
body {
    overflow-x: hidden;
    overflow-y: visible !important;
}

/* =========================================== */
/* トップページ専用スタイル（ヒーローセクション） */
/* =========================================== */
body.home #container,
body.home .wrap,
body.home .content {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
}

body.home .hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* スマホ・タブレット用のタイトル画像を疑似要素で用意（デフォルトでは非表示） */
.hero::before {
    display: none;
    content: '';
    position: absolute;
    background-image: url('http://www.takahiro-portfolio.jp/wp-content/uploads/2025/10/Takahiros-Portfolio-e1760927883165.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    z-index: 4;
}

/* 背景画像 */
.hero .background {
  background: url('http://www.takahiro-portfolio.jp/wp-content/uploads/2025/09/yosakoi_back.png') no-repeat center center;
  background-size: cover;
  width: 100%;
  height: 100%;
  opacity: 0;
  animation: fadeIn 1.5s forwards;
}

/* 人物画像 */
.hero .character {
  position: absolute;
  top: 0;
  left: -50%;
  height: 100%;
  width: auto;
  opacity: 0;
  animation: slideIn 1.5s forwards;
  animation-delay: 1.5s;
  z-index: 2;
  object-fit: cover;
  object-position: top left;
}

/* サイトタイトル画像（人物の腰位置に配置・修正版） */
.hero .site-title {
  position: absolute;
  bottom: 38%;
  left: 5%;
  
  /* 画像表示のための設定 */
  width: 70vw;  /* 画面幅の50%程度の幅に設定 */
  max-width: 768px; /* 横幅が大きくなりすぎないように最大幅を指定 */
  height: 10vw;   /* 高さを幅に合わせて調整 */
  max-height: 128px; /* 高さが大きくなりすぎないように最大高さを指定 */

	
	 background-image: url('http://www.takahiro-portfolio.jp/wp-content/uploads/2025/10/Takahiros-Portfolio-e1760927883165.png');
　
  /* 背景画像として表示（PHPから動的に設定） */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: left center;
  
  /* テキストを非表示（画像のみ表示） */
  text-indent: -9999px;
  overflow: hidden;
  white-space: nowrap;
  
  /* アニメーション設定（人物の後に表示） */
  animation: fadeInText 1.2s forwards;
  animation-delay: 3.5s;
  opacity: 0;
  
  /* その他のリセット */
  margin: 0;
  padding: 0;
  border: none;
  background-color: transparent;
  
  z-index: 4;
}

/* スクリーンリーダー用テキスト（SEO対策） */
.hero .site-title .screen-reader-text {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ナビゲーション - 右側縦並び */
.hero .main-nav {
  position: absolute;
  top: 50%;
  right: 8%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.85);
  padding: 40px 30px;
  border-radius: 0;
  opacity: 0;
  animation: popUp 1s forwards;
  animation-delay: 4.5s;
  z-index: 3;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.hero .main-nav .nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.hero .main-nav li {
  margin: 0;
  text-align: center;
}

.hero .main-nav a {
  font-size: 1.8rem;
  font-weight: 900;
  color: #333;
  text-decoration: none;
  display: block;
  transition: transform 0.3s ease, color 0.3s ease;
  padding: 10px 15px;
  border-radius: 10px;
  border-bottom: 3px solid #ffde59;
  padding-bottom: 5px;
}

.hero .main-nav a:hover {
  transform: scale(1.15);
  color: #e60000;
  background: rgba(230, 0, 0, 0.1);
}

/* アニメーション定義 */
@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes slideIn {
  to {
    left: 5%;
    opacity: 1;
  }
}

@keyframes fadeInText {
  from { 
    opacity: 0;
    transform: translateY(30px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes popUp {
  to {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}

/* フッター調整 */
footer#footer {
  background: transparent !important;
  text-align: center;
  padding: 20px 0;
  position: fixed;
  bottom: 0;
  width: 100%;
  z-index: 10;
}

footer#footer .footer-content {
  display: none;
}

footer#footer .footer-bottom {
  color: #fff;
  font-size: 0.9rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* =========================================== */
/* 「私について」ページ専用スタイル */
/* =========================================== */
.page .entry-content > .profile-container {
    max-width: 1000px;
    margin: 40px auto !important;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 40px;
    font-family: 'Zen Kaku Gothic New', sans-serif;
}

.profile-slideshow {
    flex: 0 0 45%;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.slideshow-wrapper {
    width: 100%;
    padding-top: 133.33%;
    position: relative;
    background-color: #f0f0f0;
}

.profile-slideshow .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.profile-slideshow .slide.active {
    opacity: 1;
}

.profile-slideshow .prev-btn,
.profile-slideshow .next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.profile-slideshow .prev-btn:hover,
.profile-slideshow .next-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.profile-slideshow .prev-btn {
    left: 10px;
}

.profile-slideshow .next-btn {
    right: 10px;
}

.profile-details {
    flex: 1;
}

.profile-details .name-kana {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
}

.profile-details .name-kanji {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    line-height: 1.2;
}

.profile-details .birthdate {
    font-size: 1.3rem;
    margin: 0 0 30px 0;
}

.skill-block {
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
}

.skill-block .skill-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.skill-block ul {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 15px;
}

.quote-block {
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
}

.quote-block .quote-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.quote-block .quote-body {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 15px;
}

.quote-block .quote-source {
    text-align: right;
    font-size: 0.9rem;
    color: #777;
}

@media (max-width: 768px) {
    .page .entry-content > .profile-container {
        flex-direction: column;
        gap: 30px;
        margin: 20px auto !important;
        padding: 15px;
    }

    .profile-slideshow {
        width: 100%;
        max-width: 400px;
        flex-basis: auto;
    }

    .profile-details {
        text-align: center;
    }
    
    .profile-details .name-kanji {
        font-size: 2.8rem;
    }

    .quote-block {
        text-align: left;
    }
    
    .quote-block .quote-source {
        text-align: right;
    }
}

/* =========================================== */
/* ポートフォリオサイト向け追加カスタマイズ */
/* =========================================== */
#header, #header-in, #header-container {
    background-color: #ff2525 !important;
}

.header-container .logo-text a {
    color: #ffffff !important;
    font-weight: bold;
    text-decoration: none !important;
    font-size: 1.5rem;
}

.page .main {
    color: #270000;
}

.page .entry-title {
    font-size: 204%;
    text-align: center;
}

.detail-text-column {
    font-size: 130%;
    font-family: 'Zen Kaku Gothic New', sans-serif;
}

.detail-text-column p,
.detail-text-column li {
    color: #270000;
    font-family: 'Zen Kaku Gothic New', sans-serif;
}

.vertical-center-columns {
    display: flex;
    align-items: center;
}

/* =========================================== */
/* ポートフォリオ一覧ページ 共通スタイル */
/* =========================================== */
.portfolio-page-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
    box-sizing: border-box;
}

.portfolio-page-title h1 {
    font-family: "Yuji Mai", serif !important;
    font-size: 4.7em;
    color: #ff5757;
    text-align: center;
    margin-bottom: 10px;
}

.portfolio-page-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #ff5757;
    margin-bottom: 50px;
}

.portfolio-image-link {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.portfolio-image-link:hover img {
    transform: scale(1.05);
}

.portfolio-image-link:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.portfolio-image-link img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.4s ease-in-out;
}

/* =========================================== */
/* 「Webサイト一覧」ページ専用スタイル */
/* =========================================== */
.website-list-item {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 60px;
}

.website-list-item:nth-child(even) {
    flex-direction: row-reverse;
}

.website-list-item .image-column {
    flex: 1;
}

.website-list-item .text-column {
    flex: 1;
    text-align: center;
}

.website-list-item .text-column h2 {
    font-size: 2.2rem;
    font-weight: bold;
    margin: 0;
}

/* =========================================== */
/* 「デザイン一覧」ページ専用スタイル */
/* =========================================== */
.design-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.design-grid .portfolio-image-link {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.design-grid .portfolio-image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 各デザイン（画像+タイトル）をまとめるコンテナ */
.design-item {
    display: flex;
    flex-direction: column; /* 画像とタイトルを縦に並べる */
    align-items: center;    /* 中央揃えにする */
    text-decoration: none;
}

/* 画像とタイトルの間のスペースを調整 */
.design-item .portfolio-image-link {
    margin-bottom: 15px;
}

/* デザインタイトルのスタイル */
.design-title {
    font-size: 1.1rem;      /* 文字の大きさ */
    font-weight: bold;      /* 太字にする */
    color: #444;           /* 文字色 */
    text-align: center;     /* 中央揃え */
    margin: 0;
    line-height: 1.4;
    transition: color 0.3s ease; /* ホバー時の色変化を滑らかに */
}

/* リンクにマウスを乗せた時にタイトルの色も変わるようにする */
.design-item a:hover + .design-title {
    color: #ff5757; /* テーマカラーに合わせる */
}

/* =========================================== */
/* レスポンシブ対応 */
/* =========================================== */
@media screen and (max-width: 768px) {
    .portfolio-page-title h1 {
        font-size: 2.7em;
    }

    .website-list-item,
    .website-list-item:nth-child(even) {
        flex-direction: column;
        gap: 20px;
    }

    .design-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* =========================================== */
/* 作品詳細ページ */
/* =========================================== */
.page-title {
    text-align: center;
    padding: 20px 20px 10px;
    color: #ff5757;
    margin-top: 20px;
}

.page-title h1 {
    font-size: 4.7rem;
    margin-bottom: 8px;
    color: #4366ff;
    font-weight: bold;
}

.page-title p {
    font-size: 1.1rem;
    color: #4366ff;
}

.work-title h2 {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.2;
}



.detail-text-column p,
.detail-text-column li {
    line-height: 1.65;
}

.detail-text-column p {
    margin-top: 0;
    margin-bottom: 12px; 
}

.detail-text-column ul {
    list-style-position: outside;
    padding-left: 1.5em;
    margin-top: -5px;
    margin-bottom: 0;
}

.detail-text-column ul li {
    margin-bottom: 6px;
}

/* =========================================== */
/* 画像スライダー */
/* =========================================== */
#image-slider-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: auto;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    max-height: 75vh;
}

#image-slider-container .slide {
    display: none;
    width: 100%;
}

#image-slider-container .slide.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

#image-slider-container .slide img {
    width: auto;
    height: 100%;
    max-height: 75vh;
    max-width: 100%;
    object-fit: contain;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 20px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.slider-arrow:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.slider-arrow.prev {
    left: 15px;
}

.slider-arrow.next {
    right: 15px;
}

.vertical-center-columns .wp-block-column:first-child .wp-block-image img,
#image-slider-container .slide img {
    width: auto;
    height: 100%;
    max-height: 75vh;
    max-width: 100%;
    object-fit: contain;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================== */
/* お問い合わせページ */
/* =========================================== */
.page-id-257 .wpcf7 {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 60px;
}

/* =========================================== */
/* モバイル対応（768px以下） */
/* =========================================== */
@media screen and (max-width: 768px) {
    body.home #header-container {
        position: fixed;
        width: 100%;
        background-color: #e2a9f1 !important;
        z-index: 1000;
    }
    
    .vertical-center-columns {
        flex-direction: column;
    }

    .vertical-center-columns .wp-block-column:not(:last-child) {
        margin-bottom: 30px;
    }
    
    .vertical-center-columns .wp-block-column:first-child .wp-block-image img,
    #image-slider-container .slide img {
        max-height: 50vh;
    }
}

/* =========================================== */
/* PCグローバルナビをスマホ・タブレットで非表示 */
/* =========================================== */
@media screen and (max-width: 1024px) {
    .navi-in {
        display: none !important;
    }
}

/* =========================================== */
/* スマホ表示時の左右マージン調整 */
/* =========================================== */
@media screen and (max-width: 600px) {
    .main,
    .page .entry-content {
        padding-left: 20px !important;
        padding-right: 20px !important;
        box-sizing: border-box;
    }
}

/* =========================================== */
/* トップページ モバイル対応 */
/* =========================================== */
@media screen and (max-width: 1080px) {
  /* PC用のタイトルを非表示にする */
  .hero .site-title {
    display: none;
  }
  
  /* === ▼▼▼ ここから修正 ▼▼▼ === */
  /* スマホ・タブレット用のタイトル画像を表示し、スタイリング（サイズを約20%拡大） */
  .hero::before {
      display: block;
      width: 98vw; /* 画面幅の98% */
      max-width: 600px; /* 最大幅を指定 (500pxから20%UP) */
      height: 19.6vw; /* 幅に合わせて高さを調整（アスペクト比5:1を維持） */
      max-height: 120px; /* 最大の高さを指定 (100pxから20%UP) */
      bottom: 58%;
      left: 50%;
      transform: translateX(-50%);
      animation: fadeInText 1.2s forwards; /* アニメーションを適用 */
      animation-delay: 1.5s; /* 表示タイミングを調整 */
      opacity: 0;
  }
  /* === ▲▲▲ ここまで修正 ▲▲▲ === */
  
  .hero .main-nav {
    top: auto;
    bottom: 100px;
    right: 50%;
    transform: translateX(50%);
    padding: 20px;
  }
  
  .hero .main-nav .nav-list {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }
  
  .hero .main-nav a {
    font-size: 1.2rem;
    padding: 8px 12px;
  }
  
  @keyframes popUp {
    to { 
      opacity: 1; 
      transform: translateX(50%) scale(1); 
    }
  }
  
  /* スマホ表示時のアニメーションの基準点を修正 */
  @keyframes fadeInText {
    from { 
      opacity: 0;
      transform: translateX(-50%) translateY(30px);
    }
    to { 
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }
  }
}

/* =========================================== */
/* Webサイト一覧スライダー中央寄せ */
/* =========================================== */
@media screen and (max-width: 768px) {
  .website-slider-wrapper {
    justify-content: center;
  }

  .website-slider {
    position: relative;
    left: auto;
  }
}

/* =========================================== */
/* 全ページフォント統一 */
/* =========================================== */
body,
h1, h2, h3, h4, h5, h6,
p, a, li, span, div,
input, textarea, button, select,
.entry-title,
.page-title h1,
.detail-text-column,
.profile-details,
.hero .main-nav a,
.header-container .logo-text a {
    font-family: "Yuji Mai", serif !important;
}

.page .entry-title,
.page-title h1,  {
    font-family: "Yuji Mai", serif !important;
    font-size: 4.7em;
    color: #ff2525;
}