/* ========================================
   TOP専用CSS / A案 V9仮実装（V8を継承）
======================================== */
.hero {
    position: relative;
    height: 440px;
    overflow: hidden;
    border-radius: 24px;
    isolation: isolate;
    background: #fcece5;
}

.hero__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.hero__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.91) 0%, rgba(255, 255, 255, 0.68) 30%, rgba(255, 255, 255, 0) 62%);
}

.hero__copy {
    position: relative;
    z-index: 2;
    display: flex;
    width: 50%;
    height: 100%;
    flex-direction: column;
    justify-content: center;
    padding: 26px clamp(28px, 5vw, 85px);
}

.hero__copy h1 {
    position: relative;
    z-index: 1;
    margin: 0 0 20px;
    color: #203a5a;
    font-size: clamp(25px, 3.1vw, 47px);
    font-weight: 800;
    letter-spacing: 0.05em;
    line-height: 1.55;
    transform: none;
    transform-origin: left center;
}


/* V7：1・2行目は水平、「できる！」だけに角度を持たせる */
.hero__line {
    display: block;
    width: max-content;
    max-width: 100%;
    transform-origin: left center;
    white-space: nowrap;
}

.hero__line--first {
    transform: translateX(2px);
}

.hero__line--second {
    transform: translateX(9px);
}

.hero__line--third {
    transform: translateX(16px);
}

/* 「できる！」は各文字の色と軽い傾きを指定 */
.hero__can {
    display: inline-block;
    white-space: nowrap;
}

.hero__can > span {
    display: inline-block;
    transform-origin: 50% 80%;
}

.hero__can-de {
    color: #f64886;
    transform: rotate(-8deg) translateY(2px);
}

.hero__can-ki {
    color: #55bd63;
    transform: rotate(6deg) translateY(-1px);
}

.hero__can-ru {
    color: #278fd8;
    transform: rotate(-5deg) translateY(1px);
}

.hero__can-mark {
    color: #f64886;
    transform: rotate(8deg) translateY(-2px);
}

.hero__copy p {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: clamp(12px, 1.1vw, 16px);
    font-weight: 700;
}

/* V7：雲をコピーコンテナ基準で配置し、画面幅が変わっても追従させる */
.hero__cloud {
    position: absolute;
    z-index: 0;
    top: 50%;
    left: 0;
    width: 110%;
    height: auto;
    max-width: none;
    opacity: 0.45;
    transform: translateY(-50%);
    pointer-events: none;
}

.quick-links {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
    margin-top: -28px;
}

.quick-link {
    display: flex;
    min-height: 126px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 6px;
    border: 4px solid #ffffff;
    border-radius: 20px;
    box-shadow: 0 7px 20px rgba(23, 56, 85, 0.07);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.5;
    text-align: center;
    transition: transform 0.2s ease;
}

.quick-link:hover {
    transform: translateY(-5px);
}

.quick-link__icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 50%;
    color: currentColor;
    font-size: 31px;
    font-weight: 800;
}

.quick-link__icon svg {
    width: 28px;
    height: 28px;
    display: block;
}

.quick-link--pink {
    color: #e8457c;
    background-color: #fff0f5;
}

.quick-link--yellow {
    color: #e6a400;
    background-color: #fff8df;
}

.quick-link--green {
    color: #35a66d;
    background-color: #e9f9ef;
}

.quick-link--blue {
    color: #238ed1;
    background-color: #eaf6fe;
}

.quick-link--violet {
    color: #875bd3;
    background-color: #f4efff;
}

.quick-link--orange {
    color: #e9784c;
    background-color: #fff1e5;
}

.activities__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.activities__grid figure {
    margin: 0;
    overflow: hidden;
    border-radius: 18px;
    aspect-ratio: 4 / 3;
    background: #f5f8fb;
}

.activities__grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.services {
    background-color: #fffbfc;
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    max-width: 1130px;
    margin-inline: auto;
}

.service-card {
    display: flex;
    min-height: 176px;
    align-items: center;
    gap: 18px;
    padding: 25px;
    border: 1px solid #f0e7eb;
    border-radius: 22px;
}

.service-card--pink {
    background: #fff0f4;
}

.service-card--blue {
    background: #eaf7ff;
}

/* サービスアイコン：白い円の中に余白を確保 */
.service-card__icon {
    display: grid;
    width: 112px;
    height: 112px;
    flex: 0 0 112px;
    place-items: center;
    border-radius: 50%;
    background-color: #ffffff;
}

.service-card img {
    width: 82px;
    height: 82px;
    flex-shrink: 0;
    object-fit: contain;
}

.service-card h3 {
    margin: 0 0 9px;
    color: #e94783;
    font-size: 22px;
}

.service-card--blue h3 {
    color: #208fdb;
}

.service-card p {
    margin: 0;
    font-size: 13px;
}

.service-card > span {
    margin-left: auto;
    font-size: 23px;
}


/* PCお知らせ：文章エリアとは離した右側にパステル円を3つ */
.news {
    position: relative;
    isolation: isolate;
}

.news::before {
    position: absolute;
    z-index: -1;
    top: 62px;
    right: 5%;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background-color: rgba(255, 211, 227, 0.36);
    content: "";
    pointer-events: none;
}

.news::after {
    position: absolute;
    z-index: -1;
    top: 175px;
    right: 1%;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: rgba(196, 232, 255, 0.46);
    box-shadow: -175px 48px 0 -31px rgba(251, 230, 163, 0.54);
    content: "";
    pointer-events: none;
}

.news__list {
    max-width: 1050px;
    border-top: 1px solid #dfe8ee;
}

/* お知らせ：日付・タグ・本文。本文の長文は折り返す。 */
.news__row {
    display: grid;
    grid-template-columns: 112px 100px minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    padding: 18px 16px;
    border-bottom: 1px solid #dfe8ee;
}

.news__row time {
    color: #60758c;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.news__tag {
    display: inline-block;
    justify-self: start;
    min-width: 76px;
    padding: 3px 10px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
}

.news__tag--notice {
    color: #d83772;
    background: #ffedf4;
}

.news__tag--event {
    color: #a95d00;
    background: #fff0d9;
}

.news__row p {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    line-height: 1.85;
}

.visit__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 17px;
}

.step {
    min-height: 165px;
    padding: 25px 20px;
    border: 1px solid #e5edf3;
    border-radius: 20px;
    background: #ffffff;
}

/* PC：番号と見出しを横並びに配置 */
.step__heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 13px;
}

.step__heading span {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background-color: var(--color-pink);
    flex-shrink: 0;
    font-weight: 800;
}

.step:nth-child(2) .step__heading span {
    background: #f6aa32;
}

.step:nth-child(3) .step__heading span {
    background: #55bb73;
}

.step:nth-child(4) .step__heading span {
    background: #389ee4;
}

.step h3 {
    margin: 0;
    font-size: 16px;
}

.step p {
    margin: 0;
    font-size: 12px;
}


/* FAQ見出し：青丸に白い太字の？ */
.faq__heading-icon {
    display: inline-grid;
    width: 38px;
    height: 38px;
    margin-right: 12px;
    place-items: center;
    vertical-align: middle;
    border-radius: 50%;
    color: #ffffff;
    background-color: #2498de;
    font-size: 25px;
    font-weight: 900;
    line-height: 1;
}

.faq__list {
    display: grid;
    gap: 12px;
    max-width: 1050px;
}

.faq__list details {
    padding: 16px 20px;
    border: 1px solid #e4edf5;
    border-radius: 14px;
}

.faq__list summary {
    cursor: pointer;
    font-weight: 700;
}

.faq__list details p {
    margin-bottom: 0;
    padding-left: 10px;
    color: #4c647b;
}

.access__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
}

.access__grid > img {
    width: 100%;
    max-height: 300px;
    border-radius: 20px;
    object-fit: cover;
}

.access__info h3 {
    font-size: 23px;
}

.access__info p {
    color: #536a81;
}

.cta {
    padding-block: 30px;
    background: #ffffff;
}

.cta__inner {
    display: flex;
    align-items: center;
    gap: 25px;
}

.cta__inner img {
    width: 135px;
    max-height: 128px;
    object-fit: contain;
}

.cta__inner h2 {
    margin: 0 0 6px;
    font-size: 22px;
}

.cta__inner p {
    margin: 0;
    font-size: 12px;
}

.cta__inner .button {
    margin-left: auto;
}

@media screen and (max-width: 1100px) {
    .quick-links {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .hero__copy {
        width: 60%;
    }
}

@media screen and (max-width: 767px) {
    .hero {
        height: 420px;
        border-radius: 18px;
    }

    .hero__photo {
        height: 64%;
        object-position: 65% center;
    }

    .hero__shade {
        background: linear-gradient(0deg, #ffffff 3%, rgba(255, 255, 255, 0.96) 24%, rgba(255, 255, 255, 0) 71%);
    }

    .hero__copy {
        width: 100%;
        justify-content: flex-end;
        padding: 15px 18px 46px;
        text-align: center;
    }

    .hero__line {
        max-width: 100%;
    }

    .hero__line--first {
        transform: translateX(0);
    }

    .hero__line--second {
        transform: translateX(0);
    }

    .hero__line--third {
        transform: translateX(0);
    }

    .hero__copy h1 {
        transform: none;
        transform-origin: center center;
        margin-bottom: 9px;
        font-size: clamp(22px, 6vw, 30px);
        line-height: 1.42;
    }

    .hero__copy p {
        font-size: 11px;
    }

    .hero__cloud {
        top: auto;
        bottom: 27px;
        left: 50%;
        right: auto;
        width: 110%;
        opacity: 0.34;
        transform: translateX(-50%);
    }

    .quick-links {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        margin-top: -16px;
    }

    .quick-link {
        min-height: 94px;
        gap: 6px;
        padding: 12px 3px;
        border-width: 2px;
        border-radius: 15px;
        font-size: 10px;
    }

    .quick-link__icon {
        width: 26px;
        height: 26px;
        font-size: 23px;
    }

    .quick-link__icon svg {
        width: 20px;
        height: 20px;
    }

    .activities__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .services__grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .service-card {
        min-height: 130px;
        padding: 17px;
    }

    .service-card__icon {
        width: 82px;
        height: 82px;
        flex-basis: 82px;
    }

    .service-card img {
        width: 66px;
        height: 66px;
    }

    .service-card h3 {
        font-size: 18px;
    }

    .service-card p {
        font-size: 11px;
    }

    .visit__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .step {
        min-height: 160px;
        padding: 17px;
    }

    .access__grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .cta__inner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .cta__inner img {
        width: 100px;
    }

    .cta__inner h2 {
        font-size: 18px;
    }

    .cta__inner .button {
        width: 100%;
        margin-left: 0;
    }
}

/* お知らせのスマホ表示：日付・タグは一段目、本文は二段目 */
@media screen and (max-width: 767px) {
    .news__row {
        grid-template-columns: auto 1fr;
        gap: 8px 12px;
        padding: 16px 8px;
    }

    .news__row p {
        grid-column: 1 / -1;
        font-size: 13px;
    }

    .news__tag {
        justify-self: start;
    }

    .step__heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
}

/* モバイル：お知らせ装飾を非表示にして文字の視認性を優先 */
@media screen and (max-width: 767px) {
    .news::before,
    .news::after {
        display: none;
    }

    .faq__heading-icon {
        width: 30px;
        height: 30px;
        margin-right: 8px;
        font-size: 21px;
    }
}


/* ========================================
   V5：セクション見出し・日付
======================================== */
.section-title-with-icon {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title-icon {
    display: inline-grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
}

.section-title-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

/* V7：活動風景のカメラアイコン（共通見出しと統一） */
.section-title-icon--activities {
    background-color: #2f9fdf;
}

.section-title-icon--activities svg {
    display: block;
}

.section-title-icon--news {
    background-color: #57be76;
}

.section-title-icon--visit {
    background-color: #f5a43d;
}

.section-title-icon--access {
    background-color: #f46b7c;
}

.section-title-icon--access svg {
    width: 22px;
    height: 22px;
}

.news__row time {
    font-weight: 800;
}

/* ========================================
   V5：見学・体験利用（画面幅いっぱいの淡い背景）
======================================== */
.visit {
    background-color: #f0faf5;
}

.visit .step {
    background-color: #ffffff;
    border-color: #d5e8df;
}

.visit .step h3 {
    color: #167bb2;
}

/* ========================================
   V5：FAQ右側の装飾（PCのみ）
   コンテンツの背面に重ならず、可変幅でも安定するように配置
======================================== */
.faq {
    position: relative;
    isolation: isolate;
}

.faq::before {
    position: absolute;
    z-index: -1;
    top: 95px;
    right: 6%;
    width: 170px;
    height: 130px;
    border-radius: 46% 54% 59% 41%;
    background-color: rgba(227, 219, 255, 0.43);
    transform: rotate(-16deg);
    content: "";
    pointer-events: none;
}

.faq::after {
    position: absolute;
    z-index: -1;
    top: 205px;
    right: 2%;
    width: 108px;
    height: 108px;
    border-radius: 39% 61% 48% 52%;
    background-color: rgba(254, 223, 187, 0.48);
    box-shadow: -155px 32px 0 -28px rgba(211, 242, 218, 0.75);
    transform: rotate(17deg);
    content: "";
    pointer-events: none;
}

/* ========================================
   V5：アクセス（画面幅いっぱいの淡い背景）
======================================== */
.access {
    background-color: #eef8ff;
}

/* ========================================
   V5：スマートフォンの追尾お問い合わせ
======================================== */
.mobile-sticky-cta {
    display: none;
}

@media screen and (max-width: 767px) {
    /* 案内ボタンの7件目は追尾CTAへ移す */
    .quick-link--contact {
        display: none;
    }

    .section-title-with-icon {
        gap: 9px;
    }

    .section-title-icon {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
        font-size: 19px;
    }

    .section-title-icon svg {
        width: 18px;
        height: 18px;
    }

    .news__row time {
        font-weight: 800;
    }

    /* 装飾を非表示にしてスマホの可読性を確保 */
    .faq::before,
    .faq::after {
        display: none;
    }

    .mobile-sticky-cta {
        position: fixed;
        z-index: 50;
        right: 16px;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        left: 16px;
        display: flex;
        min-height: 52px;
        align-items: center;
        justify-content: center;
        gap: 9px;
        border-radius: 999px;
        color: #ffffff;
        background-color: #f64886;
        box-shadow: 0 6px 22px rgba(140, 45, 81, 0.24);
        font-size: 15px;
        font-weight: 800;
        transition: opacity 0.2s ease, visibility 0.2s ease;
    }

    .mobile-sticky-cta.is-hidden {
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
    }

}

/* ========================================
   V6：CTAとスマートフォンの見学ステップ
   PCは従来の4列表示を維持します
======================================== */

.cta {
    background-color: #ffffff;
}

@media screen and (max-width: 767px) {

    /* 01 → 02 → 03 → 04 を縦に表示 */
    .visit__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 30px;
    }

    .visit .step {
        position: relative;
        min-height: auto;
        padding: 19px 20px;
    }

    /* 最後以外に、下向きの三角形を挿入 */
    .visit .step:not(:last-child)::after {
        position: absolute;
        top: calc(100% + 8px);
        left: 50%;
        width: 0;
        height: 0;
        border-top: 13px solid #f64886;
        border-right: 12px solid transparent;
        border-left: 12px solid transparent;
        content: "";
        transform: translateX(-50%);
        pointer-events: none;
    }

    .visit .step:nth-child(2)::after {
        border-top-color: #f6aa32;
    }

    .visit .step:nth-child(3)::after {
        border-top-color: #55bb73;
    }
}

/* ========================================
   V9仮実装：新しいキャッチコピー専用スタイル
   V8の他のレイアウト・装飾・CTAは維持
======================================== */
.hero__copy .hero__title-v9 {
    font-size: clamp(22px, 2.65vw, 40px);
    line-height: 1.55;
    letter-spacing: 0.015em;
}

.hero__title-v9-line {
    display: block;
    white-space: nowrap;
}

@media screen and (max-width: 767px) {
    .hero__copy .hero__title-v9 {
        font-size: clamp(17px, 4.8vw, 24px);
        line-height: 1.5;
        letter-spacing: 0;
    }
}


/* ========================================
   TOPお知らせ：先頭3件を表示し、4件目以降は縦スクロール
   各項目の文章量や画面幅で高さが変わるため、
   top-news.js が先頭3件の実測値を --news-visible-height に設定します。
   ======================================== */
.news__list {
    max-height: var(--news-visible-height, 420px);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #b8cbdc #f5f9fc;
}

.news__list:focus-visible {
    outline: 2px solid #188fd6;
    outline-offset: 3px;
}

.news__list::-webkit-scrollbar {
    width: 8px;
}

.news__list::-webkit-scrollbar-thumb {
    border-radius: 8px;
    background-color: #b8cbdc;
}

.news__list::-webkit-scrollbar-track {
    background-color: #f5f9fc;
}
