:root {
    --color-main: #005630;
    --color-main-rgb: 0, 86, 48;
    --color-sub: #f8f0e3;
    --color-sub-rgb: 248, 240, 227;
    --color-accent: #f4e414;
    --color-accent-rgb: 244, 228, 20;
    --color-gray: #e2e2e1;
    --color-gray-rgb: 226, 226, 225;
    --font-en: 'Futura PT- Book', 'Futura', sans-serif;
    --font-jp-main: '砧 丸丸ゴシックBSr StdN R', 'Kinuta Marumaru Gothic BSr StdN', sans-serif;
    --font-jp-sub: '游ゴシックPr6N-M', 'Yu Gothic Pr6N', 'Yu Gothic', sans-serif;
    --stagger: 0.12s;
    /* 項目の遅延間隔を変数化 */
}

html {
    font-size: clamp(10px, 2vw, 16px);
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-en), var(--font-jp-sub);
    background-color: var(--color-sub);
    color: var(--color-main);
    line-height: 1.8;
    overflow-x: hidden;
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

h1,
h2,
h3,
.logo-text {
    font-family: var(--font-en), var(--font-jp-main);
    font-size: 1.2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.2rem;
    color: var(--color-main);
    display: inline-block;
    position: relative;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80vw;
    height: 0.1rem;
    background-color: var(--color-accent);
}

.link-text {
    text-decoration: underline;
    text-underline-offset: 0.2rem;
    color: var(--color-main);
    font-weight: 500;
    transition: all 0.3s ease;
}

.link-text:hover {
    color: var(--color-main);
    background-color: var(--color-accent);
    padding: 0.2rem 0.5rem;
    border-radius: 2px;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.border-underline-yellow {
    text-decoration: underline;
    text-underline-offset: 0.2rem;
    text-decoration-color: var(--color-accent);
    text-decoration-thickness: 0.15rem;
}

.img-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.img-container img {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.img-container img:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* ========== HEADER ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(248, 240, 227, 0.90);
    backdrop-filter: blur(5px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.header.scrolled {
    background-color: rgba(248, 240, 227, 1);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.15);
    padding: 0.6rem 0;
}

.header-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    max-width: clamp(120px, 12vw, 180px);
    width: 100%;
    height: auto;
}

/* ナビゲーション */
.nav-category {
    margin-left: 2rem;
    opacity: 1;
    transform: none
}

.nav.active .nav-category {
    opacity: 1;
    transform: translateY(0);
}

.nav.closing .nav-category {
    opacity: 0;
    transform: translateY(10px);
    transition-delay: 0.1s;
}

.nav-category h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-main);
    margin: 3rem 2rem 0rem 0.5rem;
    border-bottom: 0.1rem solid var(--color-accent);
    display: block;
    padding-bottom: 0.3rem;
}

.nav-category ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-category ul li {
    margin: 0;
    opacity: 1;
    transform: none;
}

.nav-category ul li a {
    text-decoration: none;
    color: var(--color-main);
    font-size: 1rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    transition: transform 0.24s ease, box-shadow 0.24s ease, background-color 0.24s ease, color 0.24s ease;
    display: inline-block;
}

.nav-category ul li a:hover {
    color: var(--color-main);
    background-color: var(--color-accent);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.header-link-icon {
    margin-top: 4rem;
    margin-left: 2.5rem;
    display: flex;
    gap: 1.5rem;
}

.link-icon {
    width: auto;
    height: 2.5rem;
    overflow: hidden;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.link-icon:hover {
    transform: scale(1.1);
}

.link-icon-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mobile-menu-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 1001;
}

.line {
    fill: none;
    stroke: var(--color-main);
    stroke-width: 6;
    stroke-linecap: round;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55), opacity 0.4s ease;
    transform-origin: 50% 50%;
    /* 中心を基準に回転 */
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
}

/* 初期状態：描画されるように */
.mobile-menu-btn svg .line {
    animation: draw 0.6s forwards;
}

@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

/* アクティブ時のクロス変形 */
.mobile-menu-btn.active .top {
    transform: translateY(11.5px) rotate(45deg);
}

.mobile-menu-btn.active .middle {
    opacity: 0;
}

.mobile-menu-btn.active .bottom {
    transform: translateY(-11.5px) rotate(-45deg);
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 70%;
        height: 100vh;
        flex-direction: column;
        overflow-y: auto;
        background: linear-gradient(135deg, rgba(var(--color-sub-rgb), 0.95), rgba(var(--color-sub-rgb), 0.8));
        backdrop-filter: blur(16px) saturate(180%);
        box-shadow: -6px 0 25px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        transform: translateX(100%);
        opacity: 0;
        padding: 2rem;
        pointer-events: none;
    }

    /* 開く：右からバウンスして入る */
    .nav.active {
        pointer-events: auto;
        animation: slideBounceIn 0.9s ease forwards;
    }


    /* 閉じる：右へ滑らかに戻る（別クラスを付与） */
    .nav.closing {
        pointer-events: none;
        animation: slideOut 0.5s ease forwards;
    }

    /* バウンスイン */
    @keyframes slideBounceIn {
        0% {
            transform: translateX(100%);
            opacity: 0;
        }

        60% {
            transform: translateX(-10px);
            opacity: 1;
        }

        /* 少し行き過ぎる */
        80% {
            transform: translateX(5px);
        }

        /* 戻る */
        100% {
            transform: translateX(0);
            opacity: 1;
        }
    }

    /* スライドアウト */
    @keyframes slideOut {
        0% {
            transform: translateX(0);
            opacity: 1;
        }

        100% {
            transform: translateX(100%);
            opacity: 0;
        }
    }

    /* 開くとき：順番にフェードイン */
    .nav.active .nav-category ul li {
        opacity: 1;
        transform: translateY(0);
        transition-delay: calc(var(--stagger) * var(--child-index) + 0.2s);
    }

    /* 閉じるとき：逆順にフェードアウト */
    .nav.closing .nav-category ul li {
        opacity: 0;
        transform: translateY(10px);
        transition-delay: calc(var(--stagger) * var(--reverse-index));
    }

    .nav-category ul {
        display: block;
    }

    .nav-category ul li {
        margin: 1rem 0;
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }

    .header-link-icon .link-icon {
        opacity: 0;
        transform: translateX(30px);
        transition: opacity 0.5s ease, transform 0.5s ease;
    }

    .nav.active .header-link-icon .link-icon {
        opacity: 1;
        transform: translateX(0);
        transition-delay: calc(var(--stagger) * var(--child-index) + 0.2s);
    }

    .nav.closing .header-link-icon .link-icon {
        opacity: 0;
        transform: translateX(10px);
        transition-delay: calc(var(--stagger) * var(--reverse-index));
    }
}

@media (min-width: 769px) {
    .nav {
        position: static;
        /* 固定解除 */
        height: auto;
        transform: none;
        opacity: 1;
        pointer-events: auto;
        display: grid;
        grid-template-columns: 1fr auto;
        /* 1fr for categories area, auto for icons */
        grid-template-rows: auto auto;
        column-gap: 1rem;
        row-gap: 0.3rem;
        align-items: center;
        flex: 1;
        /* Occupy available space between logo and right edge */
        margin-left: 1rem;
        /* Distance from logo */
    }

    /* MAIN category (1st child) */
    .nav-category:nth-of-type(1) {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
        /* Explicitly align to left */
    }

    /* SUB category (2nd child) */
    .nav-category:nth-of-type(2) {
        grid-column: 1;
        grid-row: 2;
        justify-self: start;
        /* Explicitly align to left */
    }

    .nav-category ul {
        display: flex;
        gap: 1.5rem;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .nav-category ul li {
        opacity: 1;
        /* PCでは常時表示 */
        transform: none;
    }

    .nav-category ul li.index {
        display: none;
    }

    .nav-category h4 {
        display: none;
    }

    .nav-category ul li a {
        padding: 0.2rem;
        font-size: clamp(0.5rem, 1.3vw, 0.8rem);
    }

    .header-link-icon {
        grid-column: 2;
        grid-row: 1 / span 2;
        /* Span both category rows */
        display: flex;
        gap: 1.2rem;
        align-items: center;
        justify-self: end;
        /* Push to far right */
        margin: 0;
    }

    .mobile-menu-btn {
        display: none;
        /* Ensure button is hidden on desktop */
    }
}


/* ========== HERO SECTION ========== */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
}

.hero-content {
    z-index: 2;
    letter-spacing: 0.3rem;
    line-height: 2;
    animation: fadeIn 2s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.hero h1 {
    font-size: clamp(2.5rem, 7vw, 4rem);
    letter-spacing: 0.4rem;
    color: white;
    text-shadow: 0.1rem 0.1rem 0rem rgba(0, 0, 0, 1);
    padding: 0.5rem 2rem;
    display: block;
    width: fit-content;
    margin-inline: auto;
    margin-bottom: 5rem;
}

/* Ruby (furigana) styling */
.hero h1 ruby {
    ruby-position: under;
}

.hero h1 rt {
    font-size: clamp(1rem, 2vw, 1.2rem);
    padding-left: 1.5rem;
    padding-right: 0.3rem;
    padding-bottom: 1rem;
    letter-spacing: 0.2rem;
    text-shadow: 0.1rem 0.1rem 0rem rgba(0, 0, 0, 0.6);
    font-weight: 400;
    opacity: 0.9;
    margin-top: 0.5rem;
    /* 読み仮名と漢字の間隔 */
}

.subtitle-wrapper {
    margin-bottom: 2rem;
}

.subtitle {
    display: inline;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    font-size: 1.2rem;
    letter-spacing: 0.2rem;
    text-shadow: 0.1rem 0.1rem 0rem rgba(0, 0, 0, 0.6);
    padding: 0.3rem 1.2rem;
    background: linear-gradient(150deg, rgba(var(--color-sub-rgb), 0.4), rgba(var(--color-accent-rgb), 0.7));
    border-radius: 0.4rem;
    backdrop-filter: blur(0.4rem);
}

.hero-btn {
    display: inline-block;
    margin-top: 5rem;
    padding: 1.2rem 4rem;
    background: linear-gradient(135deg, #005630, #008f50);
    color: white;
    text-decoration: none;
    border-radius: 100px;
    font-weight: 600;
    letter-spacing: 0.1em;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    box-shadow: 0 6px 0 #00331a, 0 15px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(0);
    font-size: 1.1rem;
    overflow: hidden;
}

.hero-btn:hover {
    background: #006b3c;
    transform: translateY(2px);
    box-shadow: 0 4px 0 #00331a, 0 10px 15px rgba(0, 0, 0, 0.2);
}

.hero-btn:active {
    transform: translateY(6px);
    box-shadow: 0 0 0 #00331a, 0 5px 10px rgba(0, 0, 0, 0.2);
}

/* Ripple effect for buttons */
.hero-btn::after,
.btn::after,
.price-btn::after,
.campaign-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    transform: translate(-50%, -50%);
    transition: width 0.8s ease-out, height 0.8s ease-out;
    /* 時間を延ばす */
    pointer-events: none;
    /* クリックを妨げない */
}

.hero-btn:active::after,
.btn:active::after,
.price-btn:active::after,
.campaign-btn:active::after {
    width: 400px;
    /* サイズを大きく */
    height: 400px;
    opacity: 0;
    /* フェードアウト */
    transition: width 0.6s ease-out, height 0.6s ease-out, opacity 0.6s ease-out;
}

/* Bamboo background - static */
.bamboo-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/hero-bg.webp');
    background-size: cover;
    background-position: center;
    opacity: 1;
    z-index: 0;
}



/* ========== ABOUT SECTION ========== */
.about-section {
    padding: 6rem 4rem;
    background: linear-gradient(135deg, var(--color-sub) 0%, #fff 100%);
    border-bottom: 1px solid var(--color-gray);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.about-content h2 {
    font-size: 2rem;
    color: var(--color-main);
    margin-bottom: 1rem;
    font-weight: 700;
}

.about-instruction {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.about-text {
    padding: 1rem;
    font-size: 1.1rem;
    line-height: 2.5;
    color: #333;
}

.about-keyword {
    position: relative;
    color: var(--color-main);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    animation: pulse-keyword 2.5s ease-in-out infinite;
}

@keyframes pulse-keyword {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-0.1rem) scale(1.03);
    }
}

/* 疑似要素で下線を作成 */
.about-keyword::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 110%;
    height: 0.18rem;
    background-color: var(--color-accent);
    transition: all 0.3s ease;
}

.about-keyword:hover::after {
    background-color: var(--color-main);
}

.about-keyword:hover {
    color: var(--color-accent);
    border-bottom-color: var(--color-main);
    transform: translateY(-1px);
    animation: none;
}

/* Popup Overlay */
.about-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.about-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Popup Content */
.about-popup-content {
    position: relative;
    background: var(--color-sub);
    background-image: url('assets/washi_paper.webp');
    background-size: cover;
    background-position: center;
    padding: 3rem 1.5rem 3rem 2.5rem;
    border-radius: 1rem;
    max-width: 800px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.about-popup-overlay.active .about-popup-content {
    transform: scale(1);
}

.about-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.about-popup-close:hover {
    background: var(--color-gray);
    color: var(--color-main);
    transform: rotate(90deg);
}

.about-popup-content h3 {
    font-size: 1.8rem;
    color: var(--color-main);
    font-weight: 700;
    border-bottom: 0.2rem solid var(--color-accent);
    padding-bottom: 0.5rem;
}

.about-popup-content p {
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.8;
    color: var(--color-main);
    letter-spacing: 0.05rem;
    white-space: pre-line;
}



/* ========== PRICE CALCULATOR ========== */
.price-calculator-content {
    max-width: 1200px;
    margin: 3rem auto;
    background-color: var(--color-main);
    color: white;
    text-align: center;
    padding: 6rem 3rem;
}

.price-calculator-content h2 {
    font-size: 2rem;
    margin-bottom: 1.6rem;
    padding-bottom: 0.3rem;
    border-bottom: 0.1rem solid var(--color-accent);
}

.calculator-instruction {
    font-size: 1rem;
    color: var(--color-sub);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.price-sentence {
    font-size: 1.5rem;
    line-height: 2.5;
    margin: 1rem;
}

.price-input {
    vertical-align: top;
    width: 3.5rem;
    height: 2.7rem;
    line-height: 2.5;
    text-align: center;
    background-color: var(--color-sub);
    font-size: 1.2rem;
    margin: 0 0.2rem;
    border: none;
    border-radius: 0.4rem;
    border-bottom: 0.1rem solid var(--color-accent);
    padding: 0.5rem;
}

.price-output {
    font-weight: bold;
    font-size: 2rem;
}



/* ========== TREE SECTION ========== */
.tree-section {
    margin: 4rem 0rem;
    padding: 6rem 1rem;
    background-color: var(--color-main);
    text-align: center;
}

.tree-section h2 {
    font-size: 2.2rem;
    color: var(--color-sub);
    margin-bottom: 1.6rem;
    padding-bottom: 0.3rem;
    border-bottom: 0.1rem solid var(--color-accent);
}

.tree-instruction {
    font-size: 1rem;
    color: var(--color-sub);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.tree-container {
    width: 100%;
    height: 50rem;
    overflow: auto;
    background-color: var(--color-sub);
    border-radius: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    cursor: grab;
}

.tree-container::before {
    content: "ドラッグしてスクロール";
    position: absolute;
    bottom: 1rem;
    left: 1.5rem;
    color: rgba(0, 86, 48, 0.3);
    font-size: 2rem;
    font-weight: 700;
    pointer-events: none;
    z-index: 0;
}

.tree-container.dragging {
    cursor: grabbing;
    /* ドラッグ中のカーソル */
    user-select: none;
    /* ドラッグ中のテキスト選択を防止 */
}

.zoom-control {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    align-items: center;
    color: white;
    background: rgba(0, 0, 0, 0.4);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    z-index: 10;
}

.zoom-control input[type="range"] {
    width: 10rem;
    accent-color: var(--color-main);
}

.canvas {
    width: 80rem;
    height: 50rem;
    position: relative;
    transform-origin: 0 0;
}

.node {
    position: absolute;
    background: var(--color-main);
    opacity: 0.9;
    backdrop-filter: blur(10px);
    border-radius: 1.2rem;
    padding: 0.8em 1.2em;
    color: white;
    box-shadow: 0.3rem 0.3rem 0.2rem 0 rgba(var(--color-accent-rgb), 1.0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.node:hover {
    transform: scale(1.05);
    box-shadow: 0rem 0rem 2rem 1rem rgba(var(--color-accent-rgb), 0.8);
}

.node-pre-label {
    position: absolute;
    top: -1.4rem;
    transform: translateX(-10%);
    font-size: 0.7rem;
    color: var(--color-main);
    font-weight: bold;
    white-space: nowrap;
}

.toggle {
    margin-left: 0.5em;
    cursor: pointer;
    background: var(--color-accent);
    color: var(--color-main);
    border-radius: 50%;
    padding: 0.2em 0.6em;
    font-weight: bold;
}

.toggle.open {
    background: var(--color-gray);
    color: var(--color-main);
}

.connections {
    position: absolute;
    top: 0;
    left: 0;
    width: 80rem;
    height: 50rem;
    pointer-events: none;
}

.connections path {
    stroke: var(--color-main);
    stroke-width: 0.2rem;
    fill: none;
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    opacity: 0;
}

.connections path.animate {
    animation: drawLine 1.5s forwards;
    opacity: 1;
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

.hidden {
    display: none;
}

.want-to-do-tree-btn {
    display: inline-block;
    margin-top: 4rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--color-sub), var(--color-accent));
    color: var(--color-main);
    text-decoration: none;
    border-radius: 5rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    box-shadow: 0 0.6rem 0 #00331a, 0 1.5rem 2rem rgba(0, 0, 0, 0.2);
    transform: translateY(0);
    font-size: 1.1rem;
    overflow: hidden;
}

.want-to-do-tree-btn:hover {
    background: var(--color-sub);
    transform: translateY(0.2rem);
    box-shadow: 0 0.4rem 0 #00331a, 0 1rem 1.5rem rgba(0, 0, 0, 0.2);
}


/* ========== EDUCATOR SECTION ========== */
.educator-intro {
    padding: 6rem 0rem;
    border-bottom: 1px solid var(--color-gray);
    position: relative;
    overflow: hidden;
}

.educator-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.educator-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/majestic_building_A.webp');
    background-size: cover;
    background-position: center;
    opacity: 0.8;
    z-index: -1;
}

@media (max-width: 768px) {
    .educator-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
}

.educator-portrait-wrapper {
    flex-shrink: 0;
}

.educator-portrait {
    position: relative;
    width: 14rem;
    height: 14rem;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.educator-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 60% 25%;
    border-radius: 12px;
    border: 0.2rem solid rgba(var(--color-sub-rgb), 0.8);
    background-color: var(--color-sub);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(var(--color-sub-rgb), 0.8);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.educator-portrait img:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(var(--color-sub-rgb), 0.8);
}

.educator-text {
    flex: 1;
}

.educator-text h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    color: var(--color-sub);
    border-bottom: 0.15rem solid var(--color-sub);
}

.educator-text p {
    font-size: 1.2rem;
    line-height: 2.5;
    letter-spacing: 0.1rem;
    color: var(--color-sub);
}

.educator-btn {
    display: inline-block;
    padding: 1rem 3rem;
    background: linear-gradient(135deg, #005630, #008f50);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 2rem;
}

.educator-btn:hover {
    background: white;
    color: var(--color-main);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}


/* ========== NEWS SECTION ========== */
.news-section {
    padding: 6rem 2rem;
    background-color: white;
}

.news-list {
    list-style: none;
    padding: 0rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.news-item {
    padding: 1.6rem;
    border-bottom: 1px solid var(--color-gray);
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 0.2rem solid var(--color-main);
}

.news-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.news-content {
    text-align: left;
    color: var(--color-main);
}

.news-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.news-content p {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9のアスペクト比 */
    height: 0;
    overflow: hidden;
    margin-top: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 8px;
}

.campaign-banner {
    background: linear-gradient(135deg, var(--color-main), #007a42);
    margin-top: 2rem;
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 86, 48, 0.2);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(0, 86, 48, 0.2);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 15px 40px rgba(0, 86, 48, 0.3);
    }
}

.campaign-banner h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.campaign-banner p {
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.campaign-btn {
    display: inline-block;
    padding: 1rem 3rem;
    background-color: var(--color-accent);
    color: var(--color-main);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.campaign-btn:hover {
    background-color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}



/* ========== VOICE SECTION ========== */
.voice-carousel {
    max-width: 800px;
    margin: 0 auto;
    padding: 6rem 0rem;
    text-align: center;
}

.carousel-container {
    overflow: hidden;
    position: relative;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.voice-card {
    flex: 0 0 65%;
    /* 1枚の幅を60%にして隣が少し見える */
    margin: 0 5px;
    /* 両端に余白を入れる */
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.voice-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.voice-card.active {
    transform: scale(1.0);
    /* 中央カードは等倍 */
    opacity: 1;
}

.voice-card.side {
    transform: scale(0.8);
    /* 隣のカードは縮小 */
    opacity: 0.7;
    /* 少し薄くして奥行きを演出 */
}

.voice-logo {
    width: 100%;
    height: auto;
    margin: 5rem auto;
}

.voice-photo {
    max-width: 100%;
    max-height: 20rem;
    width: auto;
    height: auto;
    border-radius: 1rem;
    object-fit: contain;
    display: block;
    margin: 0 auto 1rem;
}

.voice-text {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: #374151;
}

.voice-author {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6b7280;
}

/* ========== VOICE ITEM (Voice Section内の折り畳み) ========== */
.voice-item {
    margin-top: 1rem;
    border: none;
    background: transparent;
}

.voice-item summary {
    position: relative;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-main);
    cursor: pointer;
    list-style: none;
    padding: 0.5rem 2rem 0.5rem 0;
    border-bottom: 0.1rem solid rgba(0, 86, 48, 0.2);
    transition: color 0.3s ease;
}

.voice-item summary::-webkit-details-marker {
    display: none;
}

.voice-item summary::after {
    content: "";
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.2rem;
    height: 1.2rem;
    background: var(--color-accent);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23005630' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'%3E%3C/line%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3C/svg%3E");
    background-size: 0.9rem;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.voice-item[open] summary::after {
    background-color: #fff;
    transform: translateY(-50%) rotate(45deg);
}

.voice-item summary:hover {
    color: var(--color-accent);
}

.voice-item-content {
    padding: 1rem 0;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #374151;
    text-align: left;
    text-indent: 1rem;
}

.carousel-controls {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.carousel-controls .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d1d5db;
    border: 2px solid var(--color-main);
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-controls .dot.active {
    background: var(--color-main);
    transform: scale(1.2);
}

.carousel-controls .dot:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
}


/* ========== FEATURES SECTION ========== */
.features-section {
    padding: 6rem 1rem;
    background-color: #fff;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.feature-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    padding: 1rem;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, opacity 0.6s ease;
    opacity: 0;
    transform: translateY(30px);
}

.feature-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-accent);
}

.feature-text h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--color-main);
}

.feature-text p {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
}

/* ========== PRICE SECTION ========== */
.price-reference-section {
    padding: 6rem 1rem;
    background-color: #f9f9f9;
}

.price-comparison {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    max-width: 1000px;
}

.price-comparison-instruction {
    text-align: center;
    margin-bottom: 3rem;
}

.price-card {
    background: white;
    padding: 1rem;
    border: 0.1rem solid var(--color-gray);
    border-radius: 1rem;
    width: 16rem;
    text-align: center;
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: translateY(30px);
    transition: transform 0.3s ease, opacity 0.6s ease;
}

/* 月額表示 */
.price-amount {
    position: relative;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-main);
    margin: 1rem 0 0.5rem 0;
    padding-bottom: 0.3rem;
}

.price-amount::before {
    content: "月額";
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-main);
    margin-right: 0.5rem;
    vertical-align: middle;
}

.price-amount::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 110%;
    height: 0.1rem;
    background: var(--color-main);
}

/* 目的表示 */
.price-purpose {
    position: relative;
    font-size: 1rem;
    color: #555;
    font-weight: 500;
    margin: 0.5rem 0 1rem 0;
    padding-bottom: 0.2rem;
}

.price-purpose::before {
    content: "目的";
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-main);
    margin-right: 0.5rem;
    vertical-align: middle;
}

.price-purpose::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 110%;
    height: 0.1rem;
    background: var(--color-gray);
}

.price-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.price-card h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #666;
}

.price-card .price-note,
.price-card .note {
    font-size: 0.9rem;
    color: #888;
}

/* 識季私塾カードの特別スタイル */
.price-card.shiki {
    border: 0.2rem solid var(--color-main);
    transform: scale(1.05);
    background-color: var(--color-sub);
    box-shadow: 0 10px 30px rgba(0, 86, 48, 0.15);
    position: relative;
    z-index: 1;
}

.price-card.shiki .price-amount {
    color: var(--color-main);
    font-size: 1.5rem;
    padding-bottom: 0.2rem;
}

.price-card.shiki .price-amount::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 110%;
    height: 0.1rem;
    background: var(--color-main);
}

.price-card.shiki .price-purpose::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 110%;
    height: 0.1rem;
    background: var(--color-gray);
}

.price-card.shiki h3 {
    color: var(--color-main);
    font-weight: bold;
}

.price-btn {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.8rem 2rem;
    background-color: var(--color-main);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.9rem;
    transition: background-color 0.3s;
    position: relative;
    overflow: hidden;
}

.price-btn:hover {
    background-color: #004023;
}


/* ========== CORE SECTION ========== */
.core-section {
    padding: 6rem 0;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid var(--color-gray);
}

.core-image-container {
    position: relative;
    width: 80%;
    max-width: 800px;
    aspect-ratio: 16/6;
    overflow: hidden;
    border-radius: 1rem;
}

.core-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(40%);
    box-shadow: 0 0.4rem 1.5rem rgba(0, 0, 0, 0.1);
    transition: transform 0.8s ease, filter 0.8s ease;
}

.core-image-container:hover img {
    transform: scale(1.05);
    filter: grayscale(50%) brightness(0.5);
}

.core-text {
    position: absolute;
    inset: 0;
    /* 上下左右0で中央配置の基準を作る */
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    color: white;
    text-shadow: 0 0.2rem 1rem rgba(0, 0, 0, 0.8);
    pointer-events: none;
    /* 文字がホバーを邪魔しない */
}

.core-text h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.core-text p {
    font-size: 1rem;
}



/* ========== CONTENT SECTIONS (01-04) ========== */
.content-section {
    padding: 6rem 3rem;
    background-color: var(--color-sub);
    border-bottom: 1px solid var(--color-gray);
}

.content-section:last-child {
    border-bottom: none;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

.section-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 2rem;
}

.content-section.reverse .section-content {
    flex-direction: row-reverse;
}

.section-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 1rem;
}

.section-image img {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 0.4rem 1.5rem rgba(0, 0, 0, 0.1);
    max-height: 400px;
    object-fit: cover;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    display: block;
}

.section-image img:hover {
    transform: scale(1.05);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.15);
}

.section-text {
    flex: 1;
    text-align: left;
}

.section-text h2 {
    position: relative;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    color: var(--color-main);
    text-decoration: none;
    border-bottom: none;
    padding-left: 4rem;
}


@media (max-width: 768px) {

    .section-content,
    .content-section.reverse .section-content {
        flex-direction: column;
        gap: 2rem;
    }

    .section-image {
        width: 60vw;
    }

    .section-text {
        text-align: center;
    }

    .section-text h2 {
        text-align: center;
        margin: 0 auto 1.5rem;
    }
}

/* Section number animation */
.section-number {
    position: absolute;
    bottom: 0rem;
    left: -1.5rem;
    font-size: clamp(3rem, 10vw, 5rem);
    font-family: var(--font-en);
    color: rgba(0, 86, 48, 0.1);
    font-weight: bold;
    z-index: -1;
    line-height: 1;
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-number.visible {
    opacity: 1;
    transform: translateX(0);
}

.section-title-text {
    position: relative;
    z-index: 1;
}

.section-text a {
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s ease;
}

.section-text a:hover {
    transform: translateX(10px);
}

.section-text p {
    font-size: 1.1rem;
    line-height: 1.8;
}


/* ========== Q&A SECTION ========== */
/* 全体 */
.qa-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 6rem 1rem;
}

/* 見出し */
.qa-section h2 {
    position: relative;
    margin-bottom: 3rem;
    color: var(--color-main);
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
}

.qa-section h2::after {
    content: "";
    display: block;
    width: 80px;
    height: 4px;
    margin: 1rem auto 0;
    background: linear-gradient(90deg, var(--color-main), var(--color-accent));
    border-radius: 2px;
}

/* Q&Aグループ */
.qa-group {
    position: relative;
    margin-bottom: 4rem;
    padding-left: 1.5rem;
    border-left: 0.2rem solid var(--color-accent);
}

.qa-group-title {
    position: relative;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-main);
    margin-bottom: 1rem;
    padding-left: 0.5rem;
}

.qa-group .qa-item {
    margin-bottom: 1rem;
}

.qa-group:last-child {
    margin-bottom: 0;
}

/* Q&Aカード */
.qa-item {
    position: relative;
    margin-bottom: 1.2rem;
    border: none;
    border-radius: 1rem;
    background: transparent;
    box-shadow: 0 0.3rem 1rem rgba(0, 86, 48, 0.15);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* フェードイン用の初期状態 */
    opacity: 0;
    transform: translateY(30px);
}

/* フェードイン後の状態 */
.qa-item.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.qa-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--color-accent);
    transform: scaleY(0);
    transition: transform 0.4s ease;
}

.qa-item:hover {
    box-shadow: 0 8px 25px rgba(0, 86, 48, 0.25);
    transform: translateY(-2px);
}

.qa-item[open] {
    box-shadow: 0 8px 30px rgba(0, 86, 48, 0.3);
}

.qa-item[open]::before {
    transform: scaleY(1);
}

/* 質問部分 */
.qa-item summary {
    position: relative;
    display: flex;
    align-items: center;
    padding: 1rem 4rem 1rem 1rem;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    text-shadow: 0.1rem 0.1rem 0.3rem rgba(0, 0, 0, 0.3);
    list-style: none;
    cursor: pointer;
    /* 竹の背景画像 */
    background-image:
        linear-gradient(rgba(0, 86, 48, 0.85), rgba(0, 74, 47, 0.85)),
        url('assets/bamboo_horizontal.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: padding-left 0.3s ease;
}

.qa-item summary::-webkit-details-marker {
    display: none;
}

.qa-item summary::before {
    content: "Q";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    margin-right: 1rem;
    background: var(--color-sub);
    color: var(--color-main);
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 700;
    transition: transform 0.3s ease;
}

.qa-item summary::after {
    content: "";
    position: absolute;
    right: 1.5rem;
    width: 1.4rem;
    height: 1.4rem;
    background: var(--color-accent);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23005630' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'%3E%3C/line%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3C/svg%3E");
    background-size: 1rem;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ホバー時 */
.qa-item summary:hover {
    padding-left: 2rem;
    background-image:
        linear-gradient(rgba(0, 86, 48, 0.8), rgba(0, 74, 47, 0.8)),
        url('assets/bamboo_horizontal.webp');
}

.qa-item summary:hover::before {
    transform: scale(1.15);
}

/* 開いた状態 */
.qa-item[open] summary {
    background-image:
        linear-gradient(rgba(0, 74, 47, 0.9), rgba(0, 61, 34, 0.9)),
        url('assets/bamboo_horizontal.webp');
}

.qa-item[open] summary::before {
    transform: scale(1.1);
}

.qa-item[open] summary::after {
    background-color: #fff;
    transform: rotate(45deg);
}

/* 回答部分 */
.qa-item-content {
    position: relative;
    padding: 1rem 1.5rem 1.5rem 4rem;
    border-top: 0.3rem solid rgba(0, 86, 48, 0.2);
    /* 和紙の背景画像 */
    background-image: url('assets/washi_paper.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--color-sub);
    /* フォールバック色 */
    box-shadow: inset 0 0.2rem 0.4rem rgba(0, 0, 0, 0.05);
    color: var(--color-main);
    font-size: 0.98rem;
    line-height: 1.8;
    animation: QAfadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.qa-item-content::before {
    content: "A";
    position: absolute;
    left: 1rem;
    top: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 0.1rem solid var(--color-main);
    background: rgba(0, 86, 48, 0.15);
    /* 和紙に馴染む半透明 */
    color: var(--color-main);
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 700;
}

/* 開閉アニメーション */
@keyframes QAfadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* フォーカス状態（アクセシビリティ） */
.qa-item summary:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.qa-item summary:focus:not(:focus-visible) {
    outline: none;
}


/* ========== SUBPAGE STYLES ========== */
.page-header {
    position: relative;
    height: 20vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 74px;
}

.page-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 20vh;
    object-fit: cover;
    z-index: 0;
}

.page-header h1 {
    position: relative;
    z-index: 2;
    color: white;
    font-size: clamp(2rem, 10vw, 3rem);
    letter-spacing: 0.2em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.page-number {
    font-size: clamp(3rem, 10vw, 5rem);
    font-weight: 900;
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-en);
    line-height: 1;
    letter-spacing: -0.05em;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(244, 228, 20, 0.2);
}

.subpage-abstract-section {
    padding: 2rem 1rem;
    border-bottom: 1px solid var(--color-gray);
    text-align: center;
}

.subpage-abstract-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    background-color: var(--color-gray);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.subpage-abstract-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-main);
    letter-spacing: 0.1em;
}

.subpage-abstract-content p {
    font-size: 1rem;
    line-height: 2.2;
    color: black;
}

.subpage-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 3rem;
}

.simple-subpage-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

@media (max-width: 768px) {
    .subpage-content {
        grid-template-columns: 1fr;
    }
}

/* ========== TABLE OF CONTENTS ========== */
.toc {
    position: sticky;
    top: 100px;
    height: fit-content;
    background-color: var(--color-sub);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .toc {
        position: static;
    }
}

.toc h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--color-main);
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: 0.5rem;
}

.toc ul {
    list-style: none;
}

.toc li {
    margin-bottom: 0.8rem;
}

.toc a {
    color: var(--color-main);
    text-decoration: none;
    transition: color 0.3s;
}

.toc a:hover {
    color: var(--color-accent);
}

.content-body {
    background-color: white;
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.content-body h2 {
    font-size: 1.8rem;
    color: var(--color-main);
    scroll-margin-top: 7rem;
    /* 目次から飛ぶときにヘッダーに隠れないように */
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    border-left: 0.3rem solid var(--color-accent);
    padding-left: 1rem;
}

.content-body h3 {
    font-size: 1.2rem;
    margin-top: 1rem;
    padding-left: 0.5rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.content-body h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0.1rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, var(--color-accent), var(--color-sub), transparent);
}

.content-body p {
    font-size: 1rem;
    padding-left: 1rem;
    line-height: 1.8;
    color: #444;
}


/* ========== EDUCATOR PAGE ========== */
.educator-page-portrait-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 3rem;
    padding: 1rem;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.4)),
        url('assets/educator-page-portrait-bg.webp');
    background-size: cover;
    background-position: center;
    border-radius: 2rem;
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.3);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.educator-page-portrait-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 30%, rgba(0, 0, 0, 0.5) 100%);
    pointer-events: none;
    z-index: 1;
}

.educator-page-portrait {
    position: relative;
    z-index: 2;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(0.1rem);
    background: rgba(255, 255, 255, 0.05);
    border: 0.1rem solid white;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.5);
}

.educator-page-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: all 0.3s ease;
    /* シルエットをなぞる白線（透過画像の場合に効果的） */
    filter: drop-shadow(2px 0 0 white) drop-shadow(-2px 0 0 white) drop-shadow(0 2px 0 white) drop-shadow(0 -2px 0 white) drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.educator-page-portrait:hover img {
    opacity: 1;
}

@keyframes backgroundSlowRotate {
    0% {
        background-position: 0% 50%;
        background-size: 110%;
    }

    50% {
        background-position: 100% 50%;
        background-size: 120%;
    }

    100% {
        background-position: 0% 50%;
        background-size: 110%;
    }
}

.educator-image-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.educator-image-container img {
    width: 100%;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.05);
}


/* ========== ACTIVITY PAGE ========== */
.activity-btn-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 2rem;
    margin-bottom: 2rem;
    gap: 2rem;
}

.activity-btn {
    display: inline-block;
    padding: 1rem 3rem;
    background: linear-gradient(135deg, #00a05a, var(--color-main));
    color: white;
    text-decoration: none;
    border-radius: 5rem;
    box-shadow: 0 0.3rem 0 #00331a, 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.activity-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.3rem 0 #00331a, 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
}

/* ========== FOOTER ========== */
.footer {
    background-color: var(--color-main);
    color: white;
    padding: 5rem 2rem 2rem;
}

.footer-inner {
    max-width: 1000px;
    margin: 0 auto 3rem;
    display: grid;
    grid-template-columns: 3fr 4fr 4fr;
    gap: 1.5rem;
}

.footer-column h3 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--color-accent);
    font-family: var(--font-en);
    letter-spacing: 0.1em;
}

.footer-logo {
    height: 3rem;
    width: auto;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: left;
    }

    .footer-logo {
        margin: 0 auto 1.5rem;
    }
}

.footer-tagline {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.8;
}

.footer-link-icon {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
}

/* フッターナビゲーションのグリッドレイアウト */
.footer-nav-grid {
    display: grid;
    grid-template-columns: 3fr 4fr;
    gap: 2rem;
    margin-top: 1rem;
}

.footer-nav-category h4 {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-nav-category ul {
    list-style: none;
    padding: 0;
}

.footer-nav-category ul li {
    margin-bottom: 0.5rem;
}

.footer-nav-category ul li a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-nav-category ul li a:hover {
    color: var(--color-accent);
}


.footer-contact {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.footer-contact p {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    opacity: 0.9;
}

.footer-contact-button {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    width: fit-content;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
    font-family: var(--font-en);
    letter-spacing: 0.1em;
    border: 0.1rem solid rgba(255, 255, 255, 0.3);
    padding: 0.8rem 2rem;
    border-radius: 3rem;
}

.footer-contact-button:hover {
    color: var(--color-main);
    background-color: var(--color-accent);
    border-color: var(--color-accent);
}

.footer-contact-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.footer-contact-triangle {
    width: 0.8rem;
    height: 0.8rem;
}

.version {
    font-size: 0.7rem;
    opacity: 0.8;
    text-align: right;
}

.copyright {
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.6;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    font-family: var(--font-en);
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}


/* ========== CUSTOM LIST ========== */
.custom-bullet-list {
    margin-top: 1.5rem;
    list-style: none;
    /* デフォルトの点を消す */
    padding-left: 0;
}

.custom-bullet-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.custom-bullet-list li::before {
    content: "▶";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--color-accent);
    font-weight: bold;
    font-size: 1rem;
}

/* ========== CONTACT FORM ========== */
.contact-form {
    max-width: 700px;
    margin: 3rem auto;
    padding: 3rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 86, 48, 0.1);
    border: 1px solid var(--color-gray);
}

.form-group {
    margin-bottom: 2rem;
}

.form-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-main);
    margin-bottom: 0.5rem;
    font-family: var(--font-jp-sub);
}

.required-label {
    color: #d32f2f;
    font-weight: 700;
    margin-left: 0.2rem;
}

.optional-label {
    color: #666;
    font-weight: 400;
    font-size: 0.85rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.9rem 1.2rem;
    font-size: 1rem;
    font-family: var(--font-jp-sub);
    color: var(--color-main);
    background-color: var(--color-sub);
    border: 2px solid var(--color-gray);
    border-radius: 8px;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--color-main);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(0, 86, 48, 0.1);
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
    border-color: var(--color-main);
}

.form-textarea {
    resize: vertical;
    min-height: 150px;
    line-height: 1.6;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23005630' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    padding-right: 3rem;
}

.form-submit-wrapper {
    text-align: center;
    margin-top: 2.5rem;
}

.form-submit-btn {
    display: inline-block;
    padding: 1.2rem 4rem;
    background: linear-gradient(135deg, var(--color-main), #008f50);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: var(--font-jp-sub);
    border: none;
    border-radius: 100px;
    cursor: pointer;
    letter-spacing: 0.1em;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    box-shadow: 0 0.4rem 0 #00331a, 0 1rem 2rem rgba(0, 0, 0, 0.2);
    transform: translateY(0);
    overflow: hidden;
}

.form-submit-btn:hover {
    background: linear-gradient(135deg, #006b3c, #00a05a);
    transform: translateY(2px);
    box-shadow: 0 0.4rem 0 #00331a, 0 1rem 2rem rgba(0, 0, 0, 0.2);
}

.form-submit-btn:active {
    transform: translateY(6px);
    box-shadow: 0 0.2rem 0 #00331a, 0 1rem 2rem rgba(0, 0, 0, 0.2);
}

/* Ripple effect for submit button */
.form-submit-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    transform: translate(-50%, -50%);
    transition: width 0.8s ease-out, height 0.8s ease-out;
    pointer-events: none;
}

.form-submit-btn:active::after {
    width: 400px;
    height: 400px;
    opacity: 0;
    transition: width 0.6s ease-out, height 0.6s ease-out, opacity 0.6s ease-out;
}

/* Success Message */
.form-success-message {
    max-width: 600px;
    margin: 3rem auto;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #f0f9f4, white);
    border: 2px solid var(--color-main);
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 86, 48, 0.15);
    animation: successFadeIn 0.6s ease-out;
}

@keyframes successFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: var(--color-main);
    color: white;
    font-size: 3rem;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    animation: successIconPop 0.5s ease-out 0.2s backwards;
}

@keyframes successIconPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.form-success-message h3 {
    font-size: 1.8rem;
    color: var(--color-main);
    margin-bottom: 1rem;
    font-weight: 700;
}

.form-success-message p {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.8;
}

/* ========== TABBED FORM INTERFACE ========== */
.form-container {
    max-width: 700px;
    margin: 3rem auto;
    position: relative;
}

/* Tab Navigation */
.form-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    position: relative;
    z-index: 2;
}

.form-tab {
    flex: 1;
    padding: 1rem 1rem;
    background: var(--color-gray);
    color: #666;
    border: 2px solid var(--color-gray);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-jp-sub);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    transform: translateY(2px);
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
}

.form-tab:hover {
    background: #d8d8d7;
    color: var(--color-main);
}

.form-tab.active {
    background: var(--color-main);
    color: white;
    border-color: var(--color-gray);
    transform: translateY(0);
    box-shadow: 0 -4px 10px rgba(0, 86, 48, 0.1);
    z-index: 3;
}

/* 紙が重なっているような効果 */
.form-tab:not(.active) {
    opacity: 0.8;
}

.form-tab:first-child {
    margin-right: -2px;
}

/* Form Panels */
.form-panel {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.form-panel.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: panelFadeIn 0.4s ease-out;
}

@keyframes panelFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form styling within panels */
.form-panel .contact-form {
    margin: 0;
    border-radius: 0 12px 12px 12px;
    border-top: 2px solid var(--color-gray);
    position: relative;
    z-index: 1;
}

/* ========== SUCCESS MODAL ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 2.5rem 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-btn {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover,
.close-btn:focus {
    color: var(--color-main);
}

.success-icon-modal {
    width: 80px;
    height: 80px;
    background: var(--color-main);
    color: white;
    border-radius: 50%;
    font-size: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    position: relative;
}

/* Checkmark using pseudo-element */
.success-icon-modal::after {
    content: '';
    width: 25px;
    height: 45px;
    border: solid white;
    border-width: 0 5px 5px 0;
    transform: rotate(45deg);
    position: absolute;
    top: 12px;
}

.modal-content h3 {
    color: var(--color-main);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.modal-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.modal-close-btn {
    background: var(--color-main);
    color: white;
    border: none;
    padding: 0.8rem 3rem;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.modal-close-btn:hover {
    background: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}