/* --- START OF FILE hero-common.css --- */
/* css/hero-common.css - ヒーローセクション共通のスタイル */

/* --- 基本設定 --- */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    /* SVG背景をCSSグラデーションに置き換え */
    background-image: linear-gradient(to bottom, #fff 15.7%, #a4d5eb 15.7%, #a4d5eb 70%, #e9ecef 93%);
    background-size: 100% 600px; /* グラデーションの高さを300pxに固定 */
    background-repeat: no-repeat; /* 縦方向の繰り返しを無効化 */
    background-color: #e9ecef; /* グラデーションより下の背景色 */
    color: #333;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
}

body.modal-open {
    overflow: hidden;
}

/* --- メインコンテンツ --- */
#study-container {
    position: relative;
}


/* --- ページナビゲーション --- */
.study-page-navigation {
    max-width: 500px;
    margin: -50px auto 0;
    padding: 0px 20px 0;
}
@media (min-width: 501px) {
    .study-page-navigation {
        padding: 0px;
    }
}

.nav-buttons-wrapper {
    display: flex;
    justify-content: flex-end; 
    align-items: center;
    gap: 20px;
}

.hero-wrapper > .nav-button-group {
    margin-top: 25px; /* 上のカードとの間隔 */
    width: fit-content; /* 中身のサイズに合わせる */
    
	background:rgba(0, 0, 0, 0.1);
	padding:8px 10px 8px;
	border-radius:44px;
	box-shadow: 0 3px 0px rgba(0, 0, 0, 0.15) inset;
}

.nav-button-group {
    display: flex;
    gap: 8px;
}

.btn-nav {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(to bottom, #ccc, #aaa);
    color: #111;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 0px rgba(0, 0, 0, 0.15);
    line-height: 1;
    border: 4px solid #fff;
    position: relative;
    overflow: hidden;
}

.btn-nav.prev {
    background-repeat: no-repeat, no-repeat;
    background-position: left 4px center, center;
    background-size: auto 35%, cover;
	background-image: url(../images/btn_arrowL.svg), linear-gradient(to bottom, #94d0eb, #94d0eb);
}

.btn-nav.next {
    background-repeat: no-repeat, no-repeat;
    background-position: right 4px center, center;
    background-size: auto 35%, cover;
	background-image: url(../images/btn_arrowR.svg), linear-gradient(to bottom, #94d0eb, #94d0eb);
}

.btn-nav-subtext {
    font-size: 0.5em;
    font-weight: bold;
    margin-top: 2px;
}

.btn-nav:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-nav.disabled {
    opacity: 0;
    pointer-events: none;
    cursor: default;
    background-color: #bbb;
}

.info-btn {
    padding: 4px 16px;
    padding-left: 4px;
    font-size: 12px;
    font-weight: bold;
    color: #555;
    background-color: #fff;
    border: 2px solid #ccc;
    border-radius: 35px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 0px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
	z-index:2;
}

.info-btn::before {
    content: '';
    display: inline-block;
    width: 32px;
    height: 32px;
    margin-right: 4px;
    background-image: url('../images/menuPage_icon_question.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* --- ヒーローセクション --- */
.hero-wrapper {
    position: relative;
    max-width: 500px;
    margin: 0px auto 0px;
    z-index: 1; 
	padding-top:80px;
}

#hero-card-stack {
    position: relative;
    z-index: 1;
}

.hero-section {
    background-image: none;
    background-color: #373a3d;
    text-align: center;
    position: relative;
    color: #fff;
	border-radius: 35px;
    transition: transform 0.5s cubic-bezier(0.7, 0, 0.3, 1), opacity 0.4s ease;
    will-change: transform, opacity;
    box-shadow: 0 5px 0px rgba(0, 0, 0, 0.2);
    transform-origin: center center;
}

.hero-section.is-back-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; 
    transform: scale(0.88); 
    pointer-events: none;
    will-change: transform, opacity;
}

.hero-section-inner {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: inherit; 
    overflow: hidden;      
    z-index: 1;            
}

.hero-section.is-sliding-out-left {
    transform: translateX(-120%) rotate(-5deg);
    opacity: 0;
}

.hero-section.is-sliding-out-right {
    transform: translateX(120%) rotate(5deg);
    opacity: 0;
}

.hero-section.is-sliding-in {
    transform: scale(1);
}


.hero-character {
    position: absolute;
    right: -20px;
    bottom: 65px;
    width: 200px;
    height: 250px;
    background: url(../images/hero-sectionVispo_listPage.svg) no-repeat bottom;
    background-size: contain;
    z-index: 5;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.hero-phrase-container {
    position: absolute;
    top: 20px;
    right: 0px;
    z-index: 4;
    pointer-events: none;
    color: #000;
    font-weight: bold;
    font-size: 12px;
    text-align: right;
}

.hero-phrase-container::before {
    content: '';
    display: block;
    width: 160px;
    height: 24px;
    background: url(../images/hero-section_phrase_listPage.svg) no-repeat center;
    background-size: contain;
    margin-bottom: 5px;
    margin-left: auto; /* ロゴ画像を右に寄せる */
}

.hero-title-logo {
    position: absolute;
    top: 0px;
    left: -15px;
    width: 125px;
    height: 125px;
    background-color: #fff;
    background-image: url(../images/hero-sectionTitleLogo_listPage-new.svg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 50%;
    box-shadow: 0 6px 0px rgba(0, 0, 0, 0.3);
    z-index: 6; /* aタグより手前に表示 */
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
    will-change: transform, opacity;
}

.hero-title-logo::before,
.hero-title-logo::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 40px;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

.hero-title-logo::before {
    left: 0px;
    background-image: url(../images/arrow_hero-section_left.svg);
}

.hero-title-logo::after {
    right: 0px;
    background-image: url(../images/arrow_hero-section_right.svg);
}

.hero-logo-link {
    position: absolute;
    top: 0px;
    width: 62.5px;
    height: 125px;
    z-index: 5;
    border-radius: 50%;
    pointer-events: none;
}

.hero-logo-link.left {
    left: -15px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.hero-logo-link.right {
    left: 47.5px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.hero-section::before,
.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    width: 45px;
    height: 100%;
    z-index: 2;
    pointer-events: none; 
    transition: width 0.3s ease; 
}

.hero-section::before {
    left: 0;
    background-image: 
        url(../images/swipeIcon_Left.svg),
        linear-gradient(to right, rgba(6, 38, 69, 0.5), transparent);
    background-repeat: no-repeat, no-repeat;
    background-position: top 95px left 10px, center;
    background-size: 20px 38px, auto;
	border-radius: 35px 0 0 35px;
}

.hero-section::after {
    right: 0;
    background-image: 
        url(../images/swipeIcon_Right.svg),
        linear-gradient(to left, rgba(6, 38, 69, 0.5), transparent);
    background-repeat: no-repeat, no-repeat;
    background-position: top 95px right 10px, center;
    background-size: 20px 38px, auto;
	border-radius: 0 35px 35px 0;
}

.hero-inner-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    padding: 40px 20px 190px;
}



/* 背景画像とぼかしオーバーレイのスタイルを新規追加 */
.hero-bg-image,
.hero-bg-overlay {
    position: absolute;
    bottom: 15px;
    left: 15px;
    width: calc(100% - 30px);
    height: 160px;
    border-radius: 25px; /* お好みの角丸サイズに調整してください */
}

.hero-bg-image {
    background-size: cover;
    background-position: center;
    z-index: 1; /* オーバーレイより下 */
}

.hero-bg-overlay {
    z-index: 2; /* 背景画像より上 */
    background-color: rgba(0, 0, 0, 0.2);
	box-shadow:  0 0px 16px rgba(0, 0, 0, 0.35) inset, 0 5px 0px rgba(0, 0, 0, 0.25) inset;
}

.hero-overlay::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    z-index: 1;
}

.hero-card-identifier {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    z-index: 1;
    white-space: nowrap;
}

.hero-card-identifier .card-number {
    font-size: 1.7em;
    font-weight: 700;
    vertical-align: middle;
    color: #fff; /* 親の半透明色を上書きして不透明な白にする */
}

.hero-content {
    position: relative;
    z-index: 4; /* hero-overlayより手前に表示 */
}

.hero-unit-label {
    display: block;
    width: fit-content;
    margin: 6px auto 3px;
    color: #ddd;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.1;
    -webkit-text-stroke: 3px #000;
    paint-order: stroke fill;
}

.hero-content.has-unit-label #set-title,
.hero-content.has-unit-label .set-title {
    margin-top: 4px;
}

.character-image {
    width: 150px;
    height: 80px;
    background: url(../images/commentImg_vispoStartPage.svg) top/100px no-repeat;
    margin: -20px auto 0;
    pointer-events: none;
}

#set-title,
.set-title {
    font-size: 28px;
	line-height:1.15em;
    font-weight: bold;
    color: #fff;
    margin-bottom: 3px;
    position: relative; 
    margin-top: 15px; /* ::before削除に伴い調整 */
    text-shadow: 0 6px 8px rgba(0, 0, 0, 0); /* 外枠に合わせてドロップシャドウを調整 */
    -webkit-text-stroke: 8px #000; /* 文字に5pxの黒い外枠を追加 */
    paint-order: stroke fill; /* 枠線を文字の背面に描画し、文字が潰れるのを防ぐ */
}

#subject-title,
.subject-title {
    font-size: 14px;
    font-weight: bold;
	color: #bec4cc;
    display: inline-block;
    padding: 6px 25px;
    background: #000;
    border-radius: 25px;
    line-height: 1em;
	margin:5px 0 0;
}

/* --- レスポンシブ (ページ固有) --- */
@media (max-width: 540px) {
    .hero-wrapper {
        margin-left: 20px;
        margin-right: 20px;
    }
}

/* ▼▼▼ 追加：画面幅500px以下のレイアウト調整 ▼▼▼ */
@media (max-width: 500px) {
    .hero-wrapper > .nav-button-group {
        display: none;
    }
    .study-page-navigation {
        margin: 15px auto 0;
    }
    .nav-buttons-wrapper {
        justify-content: flex-start;
    }
    .hero-character {
        bottom: -45px;
    }
}
/* ▲▲▲ 追加ここまで ▲▲▲ */

@media (min-width: 501px) {
    #set-title,
    .set-title {
        font-size: 32px;
        margin-bottom: 3px;
    }
    #subject-title,
    .subject-title {
        font-size: 15px;
        padding: 8px 25px;
    }

}

@media (max-width: 768px) {
    .hero-character {
        right: -10px;
        bottom: 55px;
        width: 220px;
        height: 275px;
    }
}

@media (max-width: 480px) {
    .hero-wrapper {
        margin-bottom: 0px;
    }
    .hero-character {
        right: -15px;
        /* 500px以下の設定に合わせる */
        bottom: -60px; 
    }
}

/* --- スワイプ機能拡張のためのスタイル --- */

.hero-section-inner.is-swiping {
    cursor: grabbing;
    user-select: none;
    -webkit-user-select: none;
}

.hero-section:not(.is-back-card) {
    transition: transform 0.5s cubic-bezier(0.7, 0, 0.3, 1), opacity 0.5s ease;
}

.hero-section.no-swipe::before,
.hero-section.no-swipe::after {
    display: none;
}

/* 前後の単元が存在しない側だけ、移動アイコンとグラデーションを隠す */
.hero-section.no-prev::before {
    display: none;
}

.hero-section.no-next::after {
    display: none;
}

/* --- ヒーローセクション内円グラフ --- */
.list-progress-chart-container {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 4;
    width: 120px;
    height: 120px;
    transition: transform 0.3s ease;
    cursor: help;
	background:rgba(0, 0, 0, 0.85);
	padding:0px;
	border-radius:50%;
	box-shadow: 0 0px 4px rgba(0, 0, 0, 0.55) inset;
}

.list-progress-chart-container .progress-circle-svg {
    transform: rotate(-90deg);
}

.list-progress-chart-container .progress-circle-bg,
.list-progress-chart-container .progress-circle-segment {
    fill: none;
    stroke-width: 12;
    stroke-linecap: butt;
}

.list-progress-chart-container .progress-circle-bg {
    stroke: rgba(0, 0, 0, 0.9);
}

.list-progress-chart-container #progress-circle-perfect {
    stroke: url(#progress-gradient);
}

.list-progress-chart-container #progress-circle-soso,
.list-progress-chart-container #progress-circle-difficult {
    display: none;
}

.list-progress-chart-container #circle-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
    gap: 2px;
}

.list-progress-chart-container #circle-progress-label {
    font-size: 11px;
	color:#bbb;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.list-progress-chart-container #circle-progress-value {
    display: flex;
    align-items: baseline;
    line-height: 1;
}

.list-progress-chart-container #circle-progress-number {
    font-size: 1.8rem;
    font-weight: 700;
}

.list-progress-chart-container #circle-progress-symbol {
    font-size: 1rem;
    font-weight: 600;
    margin-left: 2px;
}

/* --- ヒーローセクション 円グラフのグラデーション色定義 --- */
.list-progress-chart-container .grad-start {
    stop-color: #12d8fa; /* グラデーションの開始色 */
}
.list-progress-chart-container .grad-end {
    stop-color: #1fa2ff; /* グラデーションの終了色 */
}
.list-progress-chart-container #progress-circle-perfect {
    stroke: url(#progress-gradient);
}



/* --- カードのダークオーバーレイ --- */
.hero-card-dark-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 暗さや色味はここで調整できます */
    background-color: rgba(0, 0, 0, 0.7); 
    opacity: 0; /* 通常は透明 */
    pointer-events: none; /* スワイプ操作を妨げないようにする */
    transition: opacity 0.5s ease; /* ページ遷移時のアニメーション用 */
    will-change: opacity;
    border-radius: inherit; /* 親要素の角丸を引き継ぐ */
}

/* 背面カードの時だけオーバーレイを表示（不透明にする） */
.hero-section.is-back-card .hero-card-dark-overlay {
    opacity: 1;
}

/* ページ遷移で前面に出てくる際にオーバーレイを透明にする */
.hero-section.is-sliding-in .hero-card-dark-overlay {
    opacity: 0;
}

/* ヒーローセクション（単元学習ページの上部タイトル）用 */
#set-title .title-subtext,
.set-title .title-subtext {
    display: block;      /* 改行させる */
    font-size: 14px;
    line-height: 1.3;
    margin-top: 4px;
    text-wrap: balance;
    word-break: keep-all;
    overflow-wrap: normal;
    /* 親要素の黒い縁取り（8px）が太すぎるため、小文字用に細く調整 */
    -webkit-text-stroke: 0px #000; 
    font-weight: 700;
}

@media (max-width: 480px) {
    #set-title .title-subtext,
    .set-title .title-subtext {
        /* 画面が狭いほど少しだけ縮め、極端な縮小より読みやすさを優先する */
        font-size: clamp(12px, 3.5vw, 14px);
    }
}
/* --- END OF FILE hero-common.css --- */
