@charset "utf-8";
/* ==========================================================
   Velvet Studio – New Portfolio (Grid B + Panel C1)
   2025 / CSS Namespaced: vs-portfolio-*
   ========================================================== */

/* ----------------------------------------
   1) Base
---------------------------------------- */
#vs-portfolio {
  width: 100%;
  margin-top: 40px;
  margin-bottom: 80px;
}

.vs-portfolio * {
  box-sizing: border-box;
  font-family: inherit;
}

/* ポートフォリオ内は Averia Serif Libre を優先 */
#vs-portfolio,
#vs-portfolio * {
  font-family: 'Averia Serif Libre', cursive;
}

/* 背景パターン（既存デザイン維持） */
body.portfolio-bg {
  background: url('../../img/bg.png') repeat !important;
}

/* ----------------------------------------
   2) Category filter (UI A)
---------------------------------------- */
.vs-portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
}

.vs-portfolio-filter {
  padding: 7px 16px;
  font-size: 0.92rem;
  background: #f5f5f5;
  border-radius: 20px;
  border: 1px solid #ddd;
  cursor: pointer;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease;
}

.vs-portfolio-filter:hover {
  background: #eaeaea;
}

.vs-portfolio-filter.is-active {
  background: #000;
  border-color: #000;
  color: #fff;
}

/* ----------------------------------------
   3) Grid layout (カード一覧)
---------------------------------------- */
.vs-portfolio-grid {
  width: 100%;
}

.vs-portfolio-grid-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  padding-left: 8vw;
  padding-right: 8vw;
  justify-items: center; /* カードを中央に寄せる */
  justify-content: center;
  width: 100%;
}

.vs-portfolio-item {
  width: 300px;
  max-width: 100%;
  margin: 0 auto;
}

/* フィルターで非表示になったカード */
.vs-portfolio-item.is-hidden {
  display: none !important;
}

/* ----------------------------------------
   4) Card (サムネイルカード)
---------------------------------------- */
.vs-portfolio-card {
  position: relative;         /* オーバーレイの基準 */
  width: 300px !important;   /* ★ カードの横幅を固定 */
  max-width: 300px;
  background: #fff;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  border: none;
  cursor: pointer;
  text-align: left;
  padding: 0;
  display: block;
  transition: box-shadow 0.25s ease;
}

.vs-portfolio-card:hover {
  box-shadow: 0 4px 18px rgba(0,0,0,0.16);
}

.vs-portfolio-thumb {
  width: 100%;
  overflow: hidden;
}

.vs-portfolio-thumb img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

/* Hover 時に画像を少しズーム（ElasticGrid風） */
.vs-portfolio-item:hover .vs-portfolio-thumb img {
  transform: scale(1.05);
}

/* カードの下部テキスト領域（カテゴリのみ表示）*/
.vs-portfolio-card-body {
  padding: 0;
  text-align: center;
  width: 300px;
  max-width: 100%;
  margin: 0 auto;
}

/* タイトルは SEO のため HTML に残しつつ非表示 */
.vs-portfolio-card-title {
  display: none;
}

/* カテゴリ表示帯 */
.vs-portfolio-card-meta {
	background-color: rgba(151,142,125,0.65) !important;
	color: rgba(239,239,235,1) !important;
	padding: 14px 10px !important;
	font-size: 0.9rem !important;
	line-height: 1.3 !important;
	margin: 0 !important;
	text-align: center !important;
	border-radius: 0 0 10px 10px;
}

/* ----------------------------------------
   5) ElasticGrid風 Hover Overlay
---------------------------------------- */

/* オーバーレイ本体 */
.vs-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.2); /* 少し上品な薄めトーン */
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  border-radius: inherit;

  opacity: 0;
  transform: translate3d(0,0,0);
  transition:
  opacity 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
  transform 0.50s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* 方向つきアニメーション：入る前の位置（距離は短めで上品に） */
.vs-hover-overlay.from-top    { transform: translate3d(0, -65%, 0); opacity: 0; }
.vs-hover-overlay.from-bottom { transform: translate3d(0,  65%, 0); opacity: 0; }
.vs-hover-overlay.from-left   { transform: translate3d(-65%, 0, 0); opacity: 0; }
.vs-hover-overlay.from-right  { transform: translate3d( 65%, 0, 0); opacity: 0; }

/* 中央に入った状態 */
.vs-hover-overlay.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* 出ていく方向（残像を少し残す） */
.vs-hover-overlay.to-top    { transform: translate3d(0, -55%, 0); opacity: 0; }
.vs-hover-overlay.to-bottom { transform: translate3d(0,  55%, 0); opacity: 0; }
.vs-hover-overlay.to-left   { transform: translate3d(-55%, 0, 0); opacity: 0; }
.vs-hover-overlay.to-right  { transform: translate3d( 55%, 0, 0); opacity: 0; }

/* オーバーレイ内タイトル */
.vs-hover-title {
  color: #fff;
  font-family: 'Averia Serif Libre', cursive;
  font-size: 1.2rem;
  text-align: center;
  letter-spacing: 1px;
  padding: 0 10px;

  opacity: 0;
  transform: translateY(8px);
  transition:
  opacity 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
  transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.vs-hover-overlay.is-visible .vs-hover-title {
  opacity: 1;
  transform: translateY(0);
}

/* ----------------------------------------
   6) Detail panel (C1 layout)
---------------------------------------- */
.vs-portfolio-detail {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.vs-portfolio-detail.is-open {
  opacity: 1;
  visibility: visible;
}

/* 中央に浮かぶパネル本体 */
.vs-portfolio-detail-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(1200px, 92%);
  max-height: 85vh;
  overflow: hidden; /* ← 左右はスクロールさせない */
  background: #fff;
  border-radius: 12px;
  transform: translate(-50%, -50%) scale(0.96);
  transition: transform 0.3s ease;
  padding: 32px;
  display: flex;
  gap: 32px;
  flex-direction: row;
}

.vs-portfolio-detail.is-open .vs-portfolio-detail-inner {
  transform: translate(-50%, -50%) scale(1);
}

/* 背景スクロール禁止 */
body.vs-portfolio-detail-open {
  overflow: hidden;
}

/* ----------------------------------------
   7) 左カラム：メイン画像＋サムネイル
---------------------------------------- */
.vs-portfolio-detail-media {
  max-width: 50%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 0 0 auto;
  max-height: 85vh;
  overflow: hidden;
  align-items: center;
}

/* メイン画像コンテナ
   - 旧画像は background-image に保持
   - 新画像は <img> でフェード
*/
.vs-portfolio-detail-figure {
  position: relative;
  overflow: hidden;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1 / 1;  /* ← 正方形に固定（これが最重要） */
}

/* メイン画像（フェード用クラス付き） */
#vs-detail-main-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0 !important;
  opacity: 1;
  transition: opacity 0.45s ease;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;     /* ← 正方形画像で最も綺麗に表示される */
  object-position: center;
}

/* フェード中（0 → 1） */
#vs-detail-main-img.is-fading {
  opacity: 0;
}

/* サムネイル群 */
#vs-portfolio-detail-thumbs {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

/* サムネイルボタン（枠線なし） */
.vs-portfolio-detail-thumb {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
}

/* サムネイル画像 */
.vs-portfolio-detail-thumb img {
  width: 120px;
  height: auto;
  display: block;
  border-radius: 8px;
  transition:
  opacity 0.25s ease,
  transform 0.25s ease;
}

/* 非アクティブ（デフォルト） */
.vs-portfolio-detail-thumb:not(.is-active) img {
  opacity: 0.5;
}

/* 非アクティブ：ホバーで少し濃く＆拡大 */
.vs-portfolio-detail-thumb:not(.is-active):hover img {
  opacity: 0.9;
  transform: scale(1.03);
}

/* アクティブなサムネイルは常にはっきり */
.vs-portfolio-detail-thumb.is-active img {
  opacity: 1;
  transform: none;
}

/* ----------------------------------------
   8) 右カラム：テキスト
---------------------------------------- */
.vs-portfolio-detail-content {
  flex: 1 1 auto;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;        /* ← ここだけ縦スクロール */
  padding-right: 30px;     /* スクロールバーとの余白 */
  padding-left: 20px;
}

/* tags */
.vs-portfolio-detail-tags {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 6px;
}

/* title */
.vs-portfolio-detail-title {
  font-size: 1.55rem;
  margin-bottom: 12px;
  line-height: 1.3;
}

/* text */
.vs-portfolio-detail-text {
  font-size: 1rem;
  line-height: 1.55;
  margin-top: 20px;
  margin-bottom: 20px;
  text-align: left;
}

/* buttons */
.vs-portfolio-detail-buttons a {
  display: inline-block;
  margin-right: 0;
  margin-top: 24px;
  margin-bottom: 24px;
  padding: 8px 16px;
  background: #000;
  color: #fff;
  border-radius: 12px;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.8s ease 0s;
}
 
.vs-portfolio-detail-buttons a:hover {
  background: #333 !important;
  color: #fff !important;
}

/* ----------------------------------------
   9) Close button
---------------------------------------- */
.vs-portfolio-detail-close {
  position: absolute;
  right: 30px;
  top: 30px;
  border: none;
  background: rgba(0,0,0,0.45);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 10;
  transition: background 0.3s ease;
}

.vs-portfolio-detail-close:hover {
  background: #444;
}

/* ----------------------------------------
   10) Responsive (C1 → stacked)
---------------------------------------- */
@media (max-width: 960px) {

  .vs-portfolio-detail-media,
  .vs-portfolio-detail-content {
    max-width: 100%;
    flex: none;
  }

  .vs-portfolio-detail-close {
    right: 12px;
    top: 12px;
  }
}

@media (max-width: 767px) {
  .vs-portfolio-detail-inner {
    width: 94%;
	margin-top: 45px;
    padding: 18px;
    flex-direction: column;
    max-height: 85%;
    gap: 18px;
	text-align: center;
	/*padding-left: 9px !important;*/
  }

  .vs-portfolio-detail-title {
    font-size: 1.35rem;
  }
}

article {
	padding-top: 10px !important;
	padding-bottom: 20px!important;
}

/* 左カラム（メイン画像＋サムネイル） */
.vs-portfolio-detail-media {
  flex: 0 0 auto;
  width: 45%;           /* ← 左側の最低幅を確保 → レイアウトが再度安定する */
  max-width: 600px;     /* ← PCで崩れない最適値 */
  min-width: 380px;     /* ← これが重要（縮み過ぎ防止） */
}

/* 右カラム（文章） */
.vs-portfolio-detail-content {
  flex: 1 1 auto;
  max-height: 85vh;
  overflow-y: auto;
}




/* ここから　ポートフォリオページ　スマホで見たい際のプルダウン設定　*/


/* =========================================================
   Velvet Studio – Mobile Dropdown Styling（新ポートフォリオ対応版）
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Sawarabi+Gothic&family=Averia+Serif+Libre:wght@400;700&display=swap');

/* ▼ コンテナ：中央寄せ＋余白 */
#eg-mobile-filter-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0.6rem auto 0.3rem;
}

/* ▼ プルダウン本体 */
#eg-mobile-filter {
  position: relative;
  width: 94% !important;
  max-width: 380px;
  padding: 0.6rem 2.2rem 0.6rem 1rem;
  font-size: clamp(12px, 1vw, 13px);
  font-family: "Sawarabi Gothic", "Averia Serif Libre", cursive, sans-serif;
  color: #fff;
  background: #888; /*#d0c7b5;*/
  border: 2px solid #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  appearance: none;
  cursor: pointer;
  line-height: 1.4;
  text-align: left;
  transition: background 0.25s ease, box-shadow 0.25s ease;
  letter-spacing: 1px;
}

/* ▼ Hover */
#eg-mobile-filter:hover {
  background: #ddd4c4;
}

/* ▼ Focus */
#eg-mobile-filter:focus {
  outline: none;
  background: #888;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}

/* ▼ placeholder（disabled option） */
#eg-mobile-filter option[disabled] {
  color: #f7f4ef88;
}

/* ▼ 疑似矢印（select 自体には ::after が効かないため wrapper に描画） */
.vs-mobile-filter-wrapper {
	position: relative;
	width: 94vw;
	max-width: 380px;
	margin-top: 10px;
	margin-right: auto;
	margin-bottom: -10px;
	margin-left: auto;
}

.vs-mobile-filter-wrapper::after {
  content: "";
  position: absolute;
  top: 46%;
  right: 2rem;
  width: 8px;
  height: 8px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translateY(-50%) rotate(45deg);
  pointer-events: none;
}

@media (max-width: 767px) {
  /* PCカテゴリボタンをスマホで非表示にする */
  .vs-filter {
    display: none !important;
  }
}

/* ▼ PC では非表示、スマホでは表示 */
@media (min-width: 768px) {
  #eg-mobile-filter-wrap {
    display: none !important;
  }
}


/* =========================================================
   PC ではモバイル用プルダウンを非表示にする（最重要設定）
   ========================================================= */
@media (min-width: 768px) {
  #eg-mobile-filter-wrap,
  #eg-mobile-filter,
  .vs-mobile-filter-wrapper {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
  }
}

/* =========================================================
   ▼ スマホ閲覧時の展開パネル最適化（画像縮小 + 縦幅調整）
   ========================================================= */
@media (max-width: 767px) {

  /* 展開パネル全体の余白を減らす */
  .vs-portfolio-detail-inner {
    padding: 1.2rem;   /* ← PC では広いが、スマホはこれで十分 */
    gap: 1rem;
  }

  /* 画像エリアの幅・高さを縮小（縦長問題を解決） */
  .vs-portfolio-detail-media {
    width: 100%;
    max-width: 260px;    /* ← 画像の“横幅最大”を制限する */
	min-width: 260px;     /* ← これが重要（縮み過ぎ防止） */
    margin: 0 auto 1.2rem;
  }

  /* メイン画像の figure（背景も含む） */
  .vs-portfolio-detail-figure {
    width: 100%;
    aspect-ratio: 1 / 1;     /* ← 正方形を維持しつつ縮小 */
    max-width: 300px;
    margin: 0 auto;
  }

  /* メイン画像そのものの大きさ */
  #vs-detail-main-img {
    width: 100%;
    height: 100%;
    object-fit: contain;     /* ← はみ出し防止で綺麗に収まる */
  }

  /* サムネイルを少し小さく、間隔も調整 */
  .vs-portfolio-detail-thumbs {
    margin-top: 0.5rem;
    gap: 0.4rem;
  }

  .vs-portfolio-detail-thumb img {
    width: 60px;
    height: 60px;
  }

  /* 右側テキスト部分をスマホではスクロール可能にする */
  .vs-portfolio-detail-content {
    max-height: 45vh;     /* ← 全体の 45% の高さに収める */
    overflow-y: auto;
    padding-right: 0.5rem;
	padding-left: 0.5rem;
  }

  /* 展開パネル全体が縦に長くなりすぎるのを抑える */
  .vs-portfolio-detail {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
}




/* ここまで　ポートフォリオページ　スマホで見たい際のプルダウン設定　*/