.group figure figcaption {
    font-size: 1.25em;
    margin-top: 10px;
}
@media (max-width: 768px) {
    .side-menu {
        height: calc(100vh - 100px);
    }
}
/* メニューが開いているときはmenuiconを非表示 */
.side-menu.open ~ #modalBtn {
    display: none;
}
/* --- main-title レイアウト調整 --- */
.main-title {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    padding: 20px;
    z-index: 0;
}
.main-line {
    text-align: left;
    max-width: 500px;
    margin-right: 30px;
}
.main-title img {
    max-width: 500px;
    height: auto;
    margin: 0;
}
/* --- side-menu（ハンバーガーメニュー） --- */
.side-menu {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 240px;
    height: 100vh;
    background: linear-gradient(45deg, #D2B4DE, #B080C0);
    box-shadow: 2px 0 24px rgba(0,0,0,0.18);
    z-index: 99999 !important;
    transform: translateX(-100%);
    transition: transform 0.5s cubic-bezier(.4,0,.2,1);
    display: flex;
    flex-direction: column;
    padding: 32px 18px 24px 18px;
    backdrop-filter: blur(2px);
}
.side-menu.open {
    transform: translateX(0);
}
.side-menu .close {
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 1.5em;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
}
.side-menu .close:hover {
    color: #6c3fc5;
}
.side-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 24px 0 0 0;
    color: #f3eaff;
    font-weight: bold;
    text-decoration: none;
    font-size: 1.18em;
    border-radius: 8px;
    padding: 12px 0 12px 14px;
    transition: background 0.3s, color 0.3s, transform 0.2s;
    position: relative;
}
.side-menu a:hover {
    background: #fff;
    color: #6c3fc5;
    transform: translateX(6px) scale(1.04);
    box-shadow: 0 2px 12px rgba(108,63,197,0.10);
}

/* アイコン用のクラス */
.side-menu .menu-icon {
    font-size: 1.2em;
    margin-right: 8px;
    color: #fff;
    transition: color 0.3s;
}
.side-menu a:hover .menu-icon {
    color: #6c3fc5;
}

/* --- footer --- */
.footer {
    background: linear-gradient(135deg, #D8BFD8, #E6E6FA);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 1rem 0;
}

/* メニューボタンを画面左上に固定・最前面に */
#modalBtn {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 100000;
    width: 48px;
    height: 48px;
    background: none;
    border: none;
    cursor: pointer;
}

/* テキストグループのスタイル */
.main-line {
    /* テキスト部分が画像に比べて広がりすぎないように最大幅を設定しても良い */
    max-width: 500px;
    text-align:center; /* テキストを左揃えにする (main-titleでtext-align: center;が指定されているため、ここで上書き) */
}

/* 画像サイズをレスポンシブに調整 */
.main-title img {
    max-width: 500px; /* 画像の最大幅を調整 */
    height: auto;
/*     margin: 0 auto; はdisplay: flex; を使う場合は不要です */
        z-index: 0;
}

/* 既存のh1スタイルは維持 */
.main-title h1 {
    font-family: 'M PLUS Rounded 1c', "Hiragino Maru Gothic ProN", sans-serif;
    margin-top: 0;      /* h1の上のマージンをなくす */
    /* margin-bottom: 0.5em; タイトルと文章の間に少しスペースを空ける */
    display: flex;             /* 子要素をFlexコンテナにする */
    justify-content: center;   /* 水平方向の中央揃え */
    align-items: center; 
}

/* すべてのページに共通させるスタイルシート */
body{
    font-family: nimbus-sans, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
    /* background-color: dimgray; */
    background: linear-gradient(135deg, #F0F8FF, #D8BFD8, #D3D3D3);
    position: relative;
    z-index: 0;
}
/* 共通：画像の基本スタイル */
.group figure img, .fzgroup figure img, .profile-content img, .social-icon {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}
/* グループ画像の基本スタイル */
img{
    max-width: 100%;
    height: auto;
    display: flex;
    margin: 20px;
}

/* 共通：ボタンの基本スタイル */
.btn, .btn-umemiyu, .btn-artisthome {
    /* テキストを常に中央にするため inline-flex を使用 */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0 .9rem;
    border-radius: 999px;
    height: 40px;
    line-height: 40px;
    min-width: 180px;
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    border: 0;
    cursor: pointer;
    text-decoration: none;
    transition: background-position 0.5s ease, filter 0.2s ease;

    /* 擬似要素を外に出すためのベース */
    position: relative;
}

/* callページのcallテキストの基本スタイル */
.p1{
    color: #4149c4;
}
.call-p{
    color: #535353;
}

.btn {
    background: linear-gradient(90deg, #E6E6FA, #B090D0, #E6E6FA);
    background-size: 200% 100%;
    background-position: 100% 0;
    color: #fff;
}
.btn-umemiyu {
    background: linear-gradient(90deg, #ffb6c1, #cda8ff, #ffb6c1);
    background-size: 200% 100%;
    background-position: 100% 0;
    color: #fff;
    /* 中央寄せのため inline-flex と左右均等パディングにする */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0 .9rem;
    position: relative;
}
.btn-artisthome {
    background: linear-gradient(90deg, #E6E6FA, #C78FF0, #E6E6FA);
    background-size: 200% 100%;
    background-position: 100% 0;
    color: #fff;
    /* 中央寄せのため inline-flex と左右均等パディングにする */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0 .9rem;
    position: relative;
}
.btn:hover, .btn-umemiyu:hover, .btn-artisthome:hover {
    background-position: 0% 0;
    filter: brightness(0.9);
    color: #fff;
}
.btn:active, .btn-umemiyu:active, .btn-artisthome:active {
    transform: scale(0.98);
    filter: brightness(0.8);
}

/* ボタン右外に伸びるライン＋矢印（cs.css と同じ挙動） */
.btn::after,
.btn-umemiyu::after,
.btn-artisthome::after{
    content: "";
    position: absolute;
    top: 50%;
    left: 100%; /* ボタンの右端外側に開始位置を設定 */
    transform: translateY(-50%) translateX(8px); /* ボタンと矢印の隙間 */
    height: 2px;
    width: 0; /* ホバーで幅を伸ばす（右方向） */
    /* ほんの少し透けた黒 */
    background: rgba(0,0,0,0.75);
    /* 軽い影で矢印を浮かせる */
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.18));
    will-change: width, transform;
    transition: width 220ms ease;
    pointer-events: none;
}

.btn::before,
.btn-umemiyu::before,
.btn-artisthome::before{
    /* 矢印の頭（三角） */
    content: "";
    position: absolute;
    top: 50%;
    /* ラインの終端（ボタン右端 + gap + line-length）に置く */
    left: calc(100% + 8px + 14px);
    transform: translateY(-50%) translateX(-6px);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 6px solid rgba(0,0,0,0.75);
    /* 三角にも影を付ける */
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.18));
    will-change: transform, opacity;
    opacity: 0;
    transition: transform 220ms ease, opacity 220ms ease;
    pointer-events: none;
}

.btn:hover::after,
.btn-umemiyu:hover::after,
.btn-artisthome:hover::after{
    width: 14px; /* ラインが右に伸びる長さ */
}

.btn:hover::before,
.btn-umemiyu:hover::before,
.btn-artisthome:hover::before{
    transform: translateY(-50%) translateX(0);
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .btn::after, .btn-umemiyu::after, .btn-artisthome::after,
    .btn::before, .btn-umemiyu::before, .btn-artisthome::before {
        transition: none !important;
    }
}
/* footer */
.footer{
    /* position: static; デフォルト */
    background: linear-gradient(135deg, #D8BFD8, #E6E6FA);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 1rem 0;
}
.footer p{
    margin: 0;
}
.social-icons{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-top: 0.5rem;
}
.social-icon{
    width: 80px;
    height: auto;
    display: inline-block;
}
/* 共通：flexレイアウトの基本（profile-content, group, fzgroup） */
.profile-content, .group, .fzgroup {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin: 0 auto;
}
.profile-content {
    max-width: 1000px;
    align-items: flex-start;
}
.profile-text {
    flex: 1 1 0;
    min-width: 200px;
    text-align: left;
}
.profile-image {
    flex: 0 0 420px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}
/* 共通：h1メンバー名 */
.h1-member_name{
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

/* group */
.group{
    /* text-align: center;  */
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;

    max-width: 700px;
    margin: 0 auto;
    z-index: 0;
    /* h1と同じfadeInアニメーションのみ適用 */
    animation: fadeIn 1.5s ease-out forwards;
    opacity: 0;
}

.group figure{
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 0;
    padding: 10px;

    width: calc((100% - 20px) / 2 );
    box-sizing: border-box;
    min-width: 320px;
}

.group figure img{
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    max-width: 100%;
    height: auto;
    display: block;
}

.group figure img:hover{
    transform: scale(1.03) rotate(1deg); 
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.group img{
    /* width: 300px;  */
    height: auto;
}

/* fzgroup */
.fzgroup{
    display: flex;             
    justify-content: center;   
    gap: 15px;                
    flex-wrap: wrap;           
    align-items: flex-start;
    max-width: 1250px;
    margin: 0 auto;
    animation: fadeIn 1.5s ease-out forwards;
    opacity: 0;
}

.fzgroup figure{
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 0;
    padding: 10px;
    box-sizing: border-box;
    width: calc( (100% - 45px) / 4 ); 
    min-width: 290px;
}

.fzgroup figure img{
    max-width: 100%;
}

.fzgroup figure:hover{
    transform: translateY(-5px); 
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

.fzgroup figure figcaption {
    margin-top: 10px;
    font-size: 1.25em;
    color: #535353;
}

/* button */
.btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0 .9rem;
    border-radius: 999px;
    height: 40px;
    line-height: 40px;
    min-width: 180px;
    text-align: center;
    font-weight: 700;
    font-size: 16px;

    background: linear-gradient(90deg, #E6E6FA, #B090D0, #E6E6FA); 
    background-size: 200% 100%;
    background-position: 100% 0; 
    
    color: #fff;
    border: 0;
    cursor: pointer;
    text-decoration: none;
    
    transition: background-position 0.5s ease, filter 0.2s ease;
}

.btn:hover{
    background-position: 0% 0;
    filter: brightness(0.9);
    color: #fff;
}

.btn:active{
    transform: scale(0.98);
    filter: brightness(0.8);
}

/* 画面幅が1250px以下の場合 (3枚連ねたい) */
@media (max-width: 1250px) {
    .fzgroup figure {
        /* 3枚連ねるための幅 */
        width: calc( (100% - 30px) / 3 ); 
    }
}

/* 画面幅が850px以下の場合 (2枚連ねたい) */
@media (max-width: 850px) {
    .fzgroup figure {
        /* 2枚連ねるための幅 */
        width: calc( (100% - 15px) / 2 );
    }
}

/* 画面幅が500px以下の場合 (1枚連ねたい) */
@media (max-width: 500px) {
    .fzgroup figure {
        /* 1枚並ぶための幅 */
        width: 100%; 
    }
}

@media (max-width: 650px) {
    .group figure {
        /* 1枚並ぶための幅 */
        width: 100%; 
        min-width: auto; /* 最小幅の制約を解除し、画面幅全体に広げる */
    }
}

/* 画面幅が狭い場合の対応 (例: 縦並びにする) */
@media (max-width: 768px) {
    .main-title {
        flex-direction: column; /* 縦並びにする */
        gap: 20px;
    }
    .main-line {
        text-align: right; /* 縦並びになったらテキストを中央揃えに戻す */
    }
    .main-title img {
        /* スマホ画面に合わせて最大幅を調整 */
        max-width: 300px; /* 例: 200ピクセルに制限 */
    }
    /* タイトル (h1) の文字を小さくする */
    .main-title h1 {
        font-size: 2rem; 
    }

    /* 文章 (p) の文字を小さくする */
    .main-line p {
        font-size: 0.9em; 
    }
    
    /* ボタン (.btn) の文字を小さくする (必要に応じて) */
    .btn {
        font-size: 14px; 
    }
}

/* 1. アニメーションキーフレームの定義 */
@keyframes fadeIn {
    from {
    opacity: 0;         /* 開始時: 透明度0 (完全に透明) */
    transform: translateY(20px); /* オプション: 下から少し浮き上がる動きを追加 */
    }
    to {
    opacity: 1;         /* 終了時: 透明度1 (完全に不透明) */
    transform: translateY(0);
    }
}

/* 2. .main-title へのアニメーションの適用 */
.main-title {
    background: linear-gradient(45deg, #D2B4DE, #B080C0); /* パステルピンクから薄紫 */
    color: #FFFFF0;
    animation: fadeIn 1.5s ease-out forwards;
    opacity: 0; /* アニメーション開始まで要素を非表示にしておく（フェードインの瞬間まで見えないようにする） */
}

p {
    /* 長い英単語や記号が連続する場合に、途中で強制的に改行を挿入できるようにする */
    word-break: break-word;
    
    /* 画面端に近すぎないように左右に余白を設定する */
    padding-left: 10px;
    padding-right: 10px;
}

/* モーダルの背景 */

/* モーダル背景 */

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(30, 30, 40, 0.35);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* モーダル本体 */
.modal-content {
        background: #fff;
        border-radius: 18px;
        box-shadow: 0 8px 32px rgba(0,0,0,0.18);
        padding: 32px 28px 24px 28px;
        min-width: 260px;
        max-width: 90vw;
        min-height: 120px;
        text-align: center;
        position: relative;
        border: none;
        animation: modalIn 0.25s cubic-bezier(.4,2,.6,1) both;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
}

/* コール集ボタンを中央揃えにする */
.call-btn {
    display: flex;
    justify-content: center;
    margin: 24px 0;
}

@keyframes modalIn {
  0% { opacity: 0; transform: translateY(-30px) scale(0.95); }
  100% { opacity: 1; transform: none; }
}

.modal-content a {
    display: block;
    margin: 18px auto 0 auto;
    color: #6c3fc5;
    font-weight: bold;
    text-decoration: none;
    font-size: 1.15em;
    border-radius: 8px;
    padding: 8px 0;
    transition: background 0.2s, color 0.2s;
}
.modal-content a:hover {
    background: #f3eaff;
    color: #3a1a6a;
}

.modal-content .close {
    position: absolute;
    top: 12px;
    right: 18px;
    font-size: 1.5em;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
}
.modal-content .close:hover {
    color: #6c3fc5;
}
