/*============================
汎用固定ページ（page.php）
2026-09-12 追加

・前半 … 見出し帯（宇宙背景）と、本文を載せる白カードのレイアウト
・後半 … ブロックエディタで入力した本文（.entry-content）のスタイル
         ここは お知らせ詳細（single.php）でも共有しています。

※ 編集画面用の css/editor.css と対で管理しています。
   後半（.entry-content）を変更したら editor.css にも同じ変更を入れてください。
============================*/

section#page {
    background-color: #000;
}

/*----------------------------
見出し帯（案3：FVと同じ宇宙背景）
背景画像は ACF「見出し帯の背景画像」で1ページずつ差し替えられます。
未設定のときはここで指定した星空が出ます。
----------------------------*/
section#page hgroup.common-cover {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 360px;
    padding: 180px 16px 60px;
    text-align: center;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
        url(../img/fv-stars.webp);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;

    @media screen and (max-width:768px){
        min-height: 280px;
        padding: 140px 16px 48px;
    }

    @media screen and (max-width:640px){
        min-height: 240px;
        padding: 120px 16px 40px;
    }
}

section#page hgroup.common-cover h1 {
    color: #fff;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.08em;

    @media screen and (max-width:768px){
        font-size: 2rem;
    }

    @media screen and (max-width:480px){
        font-size: 1.5rem;
    }
}

section#page hgroup.common-cover p {
    font-family: "Bebas Neue", sans-serif;
    color: #fff;
    font-size: 1.25rem;
    line-height: 1;
    letter-spacing: 0.2em;
    margin-top: 20px;

    @media screen and (max-width:480px){
        font-size: 1rem;
        margin-top: 16px;
    }
}

/*----------------------------
本文を載せる白カード（案2：お知らせ詳細と同じ形）
----------------------------*/
section#page div.inner {
    max-width: 1040px;
    margin-left: auto;
    margin-right: auto;

    /* 下の余白が大きいのは、フッターの「TOP」ロケットが footer.css で
       top:-352px（640px以下は -149px）とフッターの外に飛び出しているため。
       ここを詰めると白いカードの上にロケットが重なる。 */
    padding: 80px 16px 390px;

    @media screen and (max-width:640px){
        padding: 48px 16px 200px;
    }
}

section#page div.inner div.entry-content {
    background-color: #fff;
    color: #000;
    border-radius: 16px;
    padding: 56px;

    @media screen and (max-width:640px){
        padding: 28px 20px;
        border-radius: 12px;
    }
}

/*============================
本文（.entry-content）
固定ページ・お知らせ詳細で共有。
reset.css / init.css で打ち消されている余白・リスト・リンク等を
.entry-content の中だけで復元しています（既存ページには影響しません）。
============================*/

.entry-content {
    font-size: 1.05rem;
    line-height: 2.1;

    /* 画像を「左寄せ」「右寄せ」にすると WordPress 標準では float になり、
       本文枠が画像の高さを含まなくなってはみ出すため、ここで解除する */
    &::after {
        content: '';
        display: block;
        clear: both;
    }

    @media screen and (max-width:640px){
        font-size: 1rem;
        line-height: 2;
    }
}

/* いちばん上の要素の上余白は消す（カードの内側余白と二重にならないように） */
.entry-content > :first-child {
    margin-top: 0;
}

/*--- 見出し ---*/
.entry-content h2 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.5;
    margin-top: 64px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #007ec6;

    @media screen and (max-width:640px){
        font-size: 1.5rem;
        margin-top: 48px;
    }
}

.entry-content h3 {
    color: #007ec6;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.5;
    margin-top: 48px;
    margin-bottom: 16px;

    @media screen and (max-width:640px){
        font-size: 1.25rem;
        margin-top: 40px;
    }
}

.entry-content h4 {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.5;
    margin-top: 40px;
    margin-bottom: 12px;

    @media screen and (max-width:640px){
        font-size: 1.125rem;
    }
}

.entry-content h5 {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.5;
    margin-top: 32px;
    margin-bottom: 12px;

    @media screen and (max-width:640px){
        font-size: 1rem;
    }
}

.entry-content h6 {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
    margin-top: 24px;
    margin-bottom: 12px;

    @media screen and (max-width:640px){
        font-size: 0.9375rem;
    }
}

/* ブロックのスタイル「中央（下線つき）」
   選択肢の登録は functions.php の sparc_register_heading_block_styles。
   見出しレベル（h2〜h6）に関係なく、この見た目になります。 */
.entry-content .is-style-center-line {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    color: #000;
    padding-bottom: 12px;
    border-bottom: 2px solid #007ec6;

    @media screen and (max-width:640px){
        font-size: 1.5rem;
    }
}

/*--- 本文 ---*/
.entry-content p {
    margin-top: 2em;
}

.entry-content strong {
    font-weight: 700;
}

.entry-content em {
    font-style: italic;
}

.entry-content a {
    display: inline;
    color: #007ec6;
    text-decoration: underline;
}

.entry-content a:hover {
    text-decoration: none;
}

/* reset.css が sup/sub も打ち消しているため、上付き・下付き・脚注の番号を元に戻す */
.entry-content sup {
    font-size: 0.75em;
    vertical-align: super;
    line-height: 0;
}

.entry-content sub {
    font-size: 0.75em;
    vertical-align: sub;
    line-height: 0;
}

/*--- リスト ---*/
.entry-content ul,
.entry-content ol {
    margin-top: 2em;
    padding-left: 1.5em;
}

.entry-content ul {
    list-style: disc;
}

.entry-content ol {
    list-style: decimal;
}

.entry-content li {
    margin-top: 8px;
}

.entry-content li > ul,
.entry-content li > ol {
    margin-top: 8px;
}

/*--- 画像・キャプション ---*/
.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.entry-content figure {
    margin-top: 2em;
}

/* 配置を指定していない画像も、キャプションが画像の下に来るようにする
   （WordPress標準では配置を付けた画像だけ枠が画像幅に縮むため、
     配置なしだとキャプションだけ本文幅の中央に離れて表示される） */
.entry-content figure.wp-block-image {
    width: fit-content;
    max-width: 100%;
}

/* ギャラリーの中の画像は横に並べるので、上の指定を戻す */
.entry-content .wp-block-gallery figure.wp-block-image {
    width: auto;
}

.entry-content figure.aligncenter {
    margin-left: auto;
    margin-right: auto;
}

/* ブロックのスタイル「左に寄せる（1行）」「右に寄せる（1行）」
   標準の「左寄せ・右寄せ」は float で文章が横に回り込むが、こちらは1行まるごと使う。
   選択肢の登録は functions.php の sparc_register_image_block_styles。 */
.entry-content figure.is-style-align-left-row {
    margin-left: 0;
    margin-right: auto;
}

.entry-content figure.is-style-align-right-row {
    margin-left: auto;
    margin-right: 0;
}

.entry-content figcaption {
    margin-top: 8px;
    font-size: 0.875rem;
    line-height: 1.7;
    color: #666;
    text-align: center;
}

/*--- カラム・メディアとテキスト・ギャラリー ---*/
.entry-content .wp-block-columns,
.entry-content .wp-block-media-text,
.entry-content .wp-block-gallery {
    margin-top: 2em;
}

.entry-content .wp-block-media-text .wp-block-media-text__media img {
    width: 100%;
}

/* 「メディアとテキスト」が写真の下に文章を積む幅を、このサイトのスマホ表示の
   切り替え（640px）に合わせる。WordPress標準は600pxのため、600〜640px では
   本文だけスマホ表示になるのに写真と文章は横2列のまま残り、どちらも窮屈になる。 */
@media screen and (max-width:640px){

    .entry-content .wp-block-media-text.is-stacked-on-mobile {
        grid-template-columns: 100% !important;
    }

    .entry-content .wp-block-media-text.is-stacked-on-mobile .wp-block-media-text__media {
        grid-column: 1;
        grid-row: 1;
    }

    .entry-content .wp-block-media-text.is-stacked-on-mobile .wp-block-media-text__content {
        grid-column: 1;
        grid-row: 2;
    }

}

/*--- 配置（エディタの「中央揃え」等を反映） ---*/
.entry-content .has-text-align-center {
    text-align: center;
}

.entry-content .has-text-align-right {
    text-align: right;
}

.entry-content .has-text-align-left {
    text-align: left;
}

/* 引用・カラム・「メディアとテキスト」・表のセルの中では、いちばん上の要素の
   上余白を消す（入れ物自身の余白と二重になり、中身だけ下にずれて見えるため） */
.entry-content blockquote :first-child,
.entry-content .wp-block-column :first-child,
.entry-content .wp-block-media-text__content :first-child,
.entry-content td :first-child,
.entry-content th :first-child {
    margin-top: 0;
}

/*--- 表 ---*/
.entry-content table {
    margin-top: 2em;
    width: 100%;
    border-collapse: collapse;
}

.entry-content th,
.entry-content td {
    border: 1px solid #ccc;
    padding: 12px 16px;
    line-height: 1.8;
    text-align: left;

    @media screen and (max-width:640px){
        padding: 8px 12px;
    }
}

.entry-content th {
    background-color: #f1f5f8;
    font-weight: 700;
}

/* 見出し行の下線。WordPress標準は3pxの黒い太線なので、他の罫線と同じ細さに揃える */
.entry-content .wp-block-table thead {
    border-bottom: 1px solid #ccc;
}

.entry-content .wp-block-table tfoot {
    border-top: 1px solid #ccc;
}

/* 表が本文幅に収まらないときは、表だけ横スクロールさせる */
.entry-content .wp-block-table {
    margin-top: 2em;
    overflow-x: auto;
}

.entry-content .wp-block-table table {
    margin-top: 0;
}

/*--- 引用・区切り線・コード ---*/
.entry-content blockquote {
    margin-top: 2em;
    padding: 20px 28px;
    border-left: 4px solid #007ec6;
    background-color: #f5f8fa;

    @media screen and (max-width:640px){
        padding: 16px 20px;
    }
}

.entry-content hr {
    margin-top: 3em;
    border: none;
    border-top: 1px solid #ccc;
}

.entry-content code {
    font-family: "SFMono-Regular", Consolas, "Courier New", monospace;
    font-size: 0.9375em;
    background-color: #f1f1f1;
    border-radius: 4px;
    padding: 2px 6px;
}

.entry-content pre {
    margin-top: 2em;
    padding: 20px;
    background-color: #f1f1f1;
    border-radius: 8px;
    overflow-x: auto;
    line-height: 1.7;
}

/*--- ボタンブロック ---*/
.entry-content .wp-block-buttons {
    margin-top: 2em;
}

.entry-content .wp-block-button__link {
    display: inline-block;
    background-color: #007ec6;
    color: #fff;
    text-decoration: none;
    border-radius: 999px;
    padding: 16px 40px;
    font-weight: 700;
    line-height: 1;
    transition: 0.25s;
}

.entry-content .wp-block-button__link:hover {
    background-color: #005e95;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 126, 198, 0.25);
}

/*--- 埋め込み（YouTube等）---*/
.entry-content .wp-block-embed {
    margin-top: 2em;
}

.entry-content .wp-block-embed iframe {
    max-width: 100%;
}
