/* ============================================================
   原神風フルページスクロール（ライブラリ不要版）
   JS制御 + CSS
   for 賢威7 WordPress Theme
   ============================================================ */

/* ============================================================
   1. コンテナ
   ============================================================ */
html.fp-enabled,
html.fp-enabled body {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    height: 100%;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

html.fp-enabled #wpadminbar {
    display: none !important;
}

.fp-wrapper {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    position: relative;
}

.fp-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    box-sizing: border-box;
    will-change: transform;
}

/* フェードイン */
.fp-section .fp-section-content,
.fp-section .fp-article-inner,
.fp-section .fp-rinen-content,
.fp-section .fp-gallery-content {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.645, 0.045, 0.355, 1) 0.2s,
                transform 0.6s cubic-bezier(0.645, 0.045, 0.355, 1) 0.2s;
}

.fp-section.is-visible .fp-section-content,
.fp-section.is-visible .fp-article-inner,
.fp-section.is-visible .fp-rinen-content,
.fp-section.is-visible .fp-gallery-content {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   2. スライド1：記事セクション
   ============================================================ */
.fp-section--article {
    background: #fafafa;
}

.fp-article-inner {
    max-width: 820px;
    width: 100%;
    margin: 0 auto;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 0 20px;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

.fp-article-header {
    flex-shrink: 0;
    padding: 30px 0 20px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.fp-article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 12px;
}

.fp-article-cat a {
    background: #1a1a2e;
    color: #fff;
    padding: 2px 10px;
    border-radius: 3px;
    font-size: 0.75rem;
    text-decoration: none;
}

.fp-article-title {
    font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.4;
    color: #1a1a2e;
    margin: 0;
}

.fp-article-body {
    flex: 1;
    min-height: 0;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 0;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.fp-article-body::-webkit-scrollbar { width: 5px; }
.fp-article-body::-webkit-scrollbar-track { background: transparent; }
.fp-article-body::-webkit-scrollbar-thumb { background-color: #ccc; border-radius: 3px; }

.fp-article-body img { max-width: 100%; height: auto; }
.fp-article-body iframe,
.fp-article-body video,
.fp-article-body embed,
.fp-article-body object { max-width: 100%; }
.fp-article-body table { max-width: 100%; overflow-x: auto; display: block; }
.fp-article-body pre { max-width: 100%; overflow-x: auto; }

/* スクロールヒント（absoluteで浮かせる） */
.fp-scroll-hint {
    position: absolute;
    bottom: 6px;
    left: 0;
    right: 0;
    text-align: center;
    padding: 0;
    color: #aaa;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 10;
}

.fp-scroll-hint.is-visible { opacity: 1; }
.fp-scroll-hint svg { animation: fp-bounce 1.5s ease infinite; }

@keyframes fp-bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(6px); }
}

/* ============================================================
   3. スライド2：トップメニュー
   ============================================================ */
.fp-section--menu {
    background: linear-gradient(180deg, #0f0f23 0%, #1a1a3e 100%);
    color: #fff;
}

.fp-section--menu .fp-section-content {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.fp-menu-heading {
    text-align: center;
    margin-bottom: 20px;
}

.fp-menu-heading-en {
    display: block;
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0.06em;
}

.fp-menu-heading-ja {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.1em;
}

.fp-menu-cta {
    margin: 0 auto 18px;
    max-width: 460px;
    width: 100%;
    box-sizing: border-box;
}

.fp-menu-cta-btn {
    display: block;
    background: linear-gradient(135deg, #e8b730, #f5d245);
    color: #1a1a2e;
    text-decoration: none;
    padding: 32px 24px;
    font-size: 24px;
    font-weight: 500;
    text-align: center;
    transform: skewX(-6deg);
    letter-spacing: 0.04em;
    border-radius: 4px;
    line-height: 1.6;
    transition: filter 0.3s ease;
}

.fp-menu-cta-btn:hover { filter: brightness(1.08); }
.fp-menu-cta-inner { display: inline-block; transform: skewX(6deg); }
.fp-menu-cta-sub { font-size: 17px; font-weight: 400; }

.fp-menu-grid-wrap {
    margin-bottom: 18px;
    padding: 0 8px;
    transform: translateX(18px);
    width: 100%;
    box-sizing: border-box;
}

.fp-menu-row { display: grid; gap: 10px; margin-bottom: 10px; }
.fp-menu-row:last-child { margin-bottom: 0; }
.fp-menu-row--1, .fp-menu-row--2 { grid-template-columns: 1fr 1fr; }
.fp-menu-row--3 { grid-template-columns: 1fr 1fr 1fr 1fr; gap: 8px; }
.fp-menu-row--1 { transform: translateX(0); }
.fp-menu-row--2 { transform: translateX(-16px); }
.fp-menu-row--3 { transform: translateX(-32px); }

.fp-menu-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 20px 10px;
    text-decoration: none;
    color: #fff;
    transform: skewX(-6deg);
    border-radius: 4px;
    transition: background 0.3s ease;
    min-height: 78px;
}

.fp-menu-card:hover { background: rgba(255, 255, 255, 0.15); }

.fp-menu-card-inner {
    display: inline-block;
    transform: skewX(6deg);
    font-size: 22px;
    font-weight: 500;
    text-align: center;
}

.fp-menu-card--has-sub .fp-menu-card-inner {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}

.fp-menu-card-main { display: block; font-size: 22px; font-weight: 500; }
.fp-menu-card-sub { display: block; font-size: 11px; color: rgba(255, 255, 255, 0.4); font-weight: 400; }

/* GIF画像入りカード */
.fp-menu-card--img {
    padding: 0;
    overflow: hidden;
    position: relative;
}

.fp-menu-card--img .fp-menu-card-inner {
    position: absolute;
    inset: 0;
    font-size: 0;
}

.fp-menu-card-gif {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: skewX(-6deg);
    border-radius: 2px;
}

.fp-menu-card--sm { padding: 14px 6px; min-height: auto; }
.fp-menu-card--sm .fp-menu-card-inner { font-size: 13px; }
.fp-menu-card--sm .fp-menu-card-main { font-size: 13px; }
.fp-menu-card--sm .fp-menu-card-sub { font-size: 9px; }

.fp-menu-bottom {
    margin: 0 auto;
    max-width: 460px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    box-sizing: border-box;
}

.fp-menu-ellipse {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 16px 10px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    font-size: 14px;
    transition: background 0.3s ease;
}

.fp-menu-ellipse:hover { background: rgba(255, 255, 255, 0.12); }

/* ============================================================
   統合グリッド（行1 + 行2）
   ============================================================ */
.fp-menu-rows-12 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
    width: 100%;
    box-sizing: border-box;
}

.fp-menu-rows-12 .fp-menu-card:nth-child(1),
.fp-menu-rows-12 .fp-menu-card:nth-child(2) {
    transform: translateX(0) skewX(-6deg);
}

.fp-menu-rows-12 .fp-menu-card:nth-child(3),
.fp-menu-rows-12 .fp-menu-card:nth-child(4) {
    transform: translateX(-16px) skewX(-6deg);
}

/* ============================================================
   4. スライド3：白滝の理念
   ============================================================ */
.fp-section--rinen {
    background: linear-gradient(180deg, #1a1a3e 0%, #2d1b4e 100%);
    color: #fff;
}

.fp-rinen-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 16px;
    box-sizing: border-box;
    text-align: center;
}

.fp-rinen-heading {
    text-align: center;
    margin-bottom: 24px;
}

.fp-rinen-heading-en {
    display: block;
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0.06em;
}

.fp-rinen-heading-ja {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.1em;
}

.fp-rinen-logo-wrap {
    position: relative;
    width: 50%;
    max-width: 460px;
    margin-bottom: 20px;
}

.fp-rinen-logo { display: block; width: 100%; height: auto; }

.fp-rinen-mission {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.1em;
}

.fp-rinen-title {
    font-size: 100px;
    font-weight: 700;
    margin: 0 0 24px;
    line-height: 1.1;
    letter-spacing: 0.05em;
}

.fp-rinen-text {
    margin-bottom: 8px;
}

.fp-rinen-text p {
    font-size: 16px;
    margin: 0 0 6px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.9;
}

.fp-rinen-text p:last-child { margin-bottom: 0; }

.fp-rinen-link {
    margin: 24px 0 0;
}

.fp-rinen-link a {
    color: #f5d245;
    font-size: 15px;
}

.fp-rinen-link-strike {
    margin: 0 !important;
}

.fp-rinen-link-strike a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    text-decoration-color: rgba(255, 255, 255, 0.7);
    text-decoration-thickness: 2px;
    opacity: 0.6;
}

.fp-rinen-link-stopped {
    margin: 0 0 40px !important;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.05em;
}

.fp-rinen-link-new {
    margin: 0;
}

.fp-rinen-link-new a {
    color: #f5d245;
    text-decoration: underline;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.04em;
    transition: opacity 0.2s ease;
}

.fp-rinen-link-new a:hover {
    opacity: 0.8;
}

/* ============================================================
   スライド4：有料教材一覧
   ============================================================ */
.fp-section--kyozai {
    background: linear-gradient(180deg, #2d1b4e 0%, #1a1a3e 100%);
    color: #fff;
}

.fp-kyozai-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    box-sizing: border-box;
    overflow: hidden;
}

.fp-kyozai-inner {
    max-width: 600px;
    width: 100%;
    box-sizing: border-box;
}

/* 見出し */
.fp-kyozai-inner .p1 {
    margin: 0 0 8px;
    line-height: 1.8;
    color: #fff;
}

.fp-kyozai-inner strong { font-weight: 700; }

/* リンク色 */
.fp-kyozai-inner a {
    color: #99ccff;
    text-decoration: underline;
}

.fp-kyozai-inner a:hover { opacity: 0.8; }

/* グレーテキスト */
.fp-kyozai-inner [style*="color: #999999"],
.fp-kyozai-inner [style*="color:#999999"] {
    color: rgba(255,255,255,0.45) !important;
}

/* 余白調整 */
.fp-kyozai-spacer {
    display: block;
    height: 12px;
}

/* 下端スクロールヒント（記事スライドと同じ構造） */
.fp-kyozai-hint {
    position: absolute;
    bottom: 6px;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255,255,255,0.35);
    font-size: 0.78rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 10;
}
.fp-kyozai-hint.is-visible { opacity: 1; }
.fp-kyozai-hint svg { animation: fp-bounce 1.5s ease infinite; }

/* フェードインアニメーション対象に追加 */
.fp-section .fp-kyozai-content {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.645, 0.045, 0.355, 1) 0.2s,
                transform 0.6s cubic-bezier(0.645, 0.045, 0.355, 1) 0.2s;
}
.fp-section.is-visible .fp-kyozai-content {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   5. スライド5：ギャラリー ＋ コピーライト
   ============================================================ */
.fp-section--gallery {
    background: linear-gradient(180deg, #2d1b4e 0%, #0f0f23 100%);
    color: #fff;
}

.fp-gallery-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    box-sizing: border-box;
}

.fp-gallery-images {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 480px;
    margin-bottom: 32px;
}

.fp-gallery-item {
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
}

.fp-gallery-item img {
    display: block;
    width: 100%;
    height: auto;
}

.fp-gallery-copyright {
    text-align: center;
}

.fp-gallery-copyright p {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.05em;
}

/* ============================================================
   6. ドットナビゲーション
   ============================================================ */
.fp-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.fp-nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.fp-nav-dot:hover { transform: scale(1.3); }
.fp-nav-dot.is-active { background: #fff; border-color: #fff; }
.fp-nav.fp-nav--light .fp-nav-dot { border-color: rgba(0, 0, 0, 0.25); }
.fp-nav.fp-nav--light .fp-nav-dot.is-active { background: #1a1a2e; border-color: #1a1a2e; }

/* ============================================================
   7. レスポンシブ
   ============================================================ */
@media screen and (max-width: 768px) {
    .fp-article-title { font-size: 1.3rem; }
    .fp-article-header { padding: 20px 0 14px; }

    .fp-menu-cta-btn { font-size: 20px; padding: 26px 18px; }
    .fp-menu-cta-sub { font-size: 15px; }
    .fp-menu-card { padding: 16px 8px; min-height: 66px; }
    .fp-menu-card-inner { font-size: 18px; }
    .fp-menu-card-main { font-size: 18px; }
    .fp-menu-grid-wrap { transform: translateX(14px); }
    .fp-menu-row--2 { transform: translateX(-12px); }
    .fp-menu-row--3 { transform: translateX(-24px); grid-template-columns: 1fr 1fr 1fr 1fr; }
    .fp-menu-card--sm .fp-menu-card-inner { font-size: 11px; }
    .fp-menu-card--sm .fp-menu-card-main { font-size: 11px; }

    .fp-menu-rows-12 .fp-menu-card:nth-child(3),
    .fp-menu-rows-12 .fp-menu-card:nth-child(4) {
        transform: translateX(-12px) skewX(-6deg);
    }

    .fp-rinen-logo-wrap { width: 60%; }
    .fp-rinen-title { font-size: 56px; margin-bottom: 20px; }
    .fp-rinen-text p { font-size: 15px; }
    .fp-rinen-heading { margin-bottom: 18px; }
    .fp-rinen-link { margin-top: 20px; }

    .fp-gallery-images { max-width: 360px; gap: 12px; margin-bottom: 24px; }

    .fp-nav { right: 10px; gap: 10px; }
    .fp-nav-dot { width: 10px; height: 10px; }
}

@media screen and (max-width: 480px) {
    .fp-menu-cta-btn { font-size: 17px; padding: 22px 14px; }
    .fp-menu-cta-sub { font-size: 13px; }
    .fp-menu-card { padding: 14px 6px; min-height: 58px; }
    .fp-menu-card-inner { font-size: 15px; }
    .fp-menu-card-main { font-size: 15px; }
    .fp-menu-grid-wrap { transform: translateX(10px); }
    .fp-menu-row--2 { transform: translateX(-8px); }
    .fp-menu-row--3 { transform: translateX(-16px); grid-template-columns: 1fr 1fr 1fr 1fr; gap: 5px; }
    .fp-menu-card--sm { padding: 12px 4px; }
    .fp-menu-card--sm .fp-menu-card-inner { font-size: 10px; }
    .fp-menu-card--sm .fp-menu-card-main { font-size: 10px; }
    .fp-menu-card--sm .fp-menu-card-sub { font-size: 8px; }
    .fp-menu-bottom { gap: 10px; }
    .fp-menu-ellipse { font-size: 12px; padding: 12px 8px; }

    .fp-menu-rows-12 .fp-menu-card:nth-child(3),
    .fp-menu-rows-12 .fp-menu-card:nth-child(4) {
        transform: translateX(-8px) skewX(-6deg);
    }

    .fp-rinen-logo-wrap { width: 70%; }
    .fp-rinen-title { font-size: 44px; margin-bottom: 16px; }
    .fp-rinen-text p { font-size: 14px; }
    .fp-rinen-heading { margin-bottom: 14px; }
    .fp-rinen-link { margin-top: 16px; }

    .fp-gallery-images { max-width: 280px; gap: 10px; margin-bottom: 20px; }
}

/* ============================================================
   8. 賢威7 デフォルトスタイル上書き
   ============================================================ */
body.single-post #container,
body.single-post #main-contents,
body.single-post #main-image-in,
body.page-template-page-fullpage #container,
body.page-template-page-fullpage #main-contents,
body.page-template-page-fullpage #main-image-in {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
}

body.single-post #sub-contents,
body.page-template-page-fullpage #sub-contents { display: none !important; }

body.single-post .site-header,
body.page-template-page-fullpage .site-header {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.single-post .global-nav,
body.page-template-page-fullpage .global-nav {
    display: none !important;
}

body.single-post .container,
body.page-template-page-fullpage .container {
    padding: 0 !important;
    margin: 0 !important;
}

body.single-post .section-in,
body.single-post .article-wrap,
body.single-post .post,
body.single-post .keni-section,
body.page-template-page-fullpage .section-in,
body.page-template-page-fullpage .article-wrap,
body.page-template-page-fullpage .post,
body.page-template-page-fullpage .keni-section {
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

.fp-article-body .post,
.fp-article-body article {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* ============================================================
   ThePostGrid はみ出し修正（min-width が根本原因）
   ============================================================ */
.rt-row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* ============================================================
   ThePostGrid 新着記事 カード 金色枠
   ============================================================ */
.post-7235 [id*="rt-tpg-container"] .rt-holder {
    border: 5px solid #b8860b !important;
}
/* ============================================================
   ThePostGrid 新着記事 タイトル文字サイズ修正
   ============================================================ */
.post-7235 [id*="rt-tpg-container"] .rt-holder .rt-detail h2,
.post-7235 [id*="rt-tpg-container"] .rt-holder .rt-detail h3,
.post-7235 [id*="rt-tpg-container"] .rt-holder .rt-detail h4 {
    font-size: 20px !important;
}


/* カテゴリページ：TPGカードのタイトル文字サイズ・枠線をTPGに合わせる */
.category .rt-holder {
    border: 5px solid #b8860b !important;
}

.category .entry-title a {
    font-size: 20px !important;
}