/*
Theme Name: SFMT100
Theme URI: https://sfmt100.com
Description: 信越五岳トレイルランニングレース公式テーマ
Author: Livethere
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sfmt100
Tags: custom-menu, custom-header, featured-images, translation-ready
*/

/* ==========================================================================
   WordPress Admin Bar Adjustment
   ========================================================================== */
body.admin-bar .site-header {
    margin-top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        margin-top: 46px;
    }
}

body.admin-bar .global-nav {
    top: 32px;
    height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar .global-nav {
        top: 46px;
        height: calc(100vh - 46px);
    }
}

/* ==========================================================================
   WordPress Alignment Classes
   ========================================================================== */
.alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1em;
}

.alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1em;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1em;
}

.alignwide {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);
    width: 100vw;
}

/* ==========================================================================
   WordPress Image Captions
   ========================================================================== */
.wp-caption {
    max-width: 100%;
    margin-bottom: 1em;
}

.wp-caption img {
    display: block;
    max-width: 100%;
    height: auto;
}

.wp-caption-text {
    font-size: 0.8rem;
    color: #666;
    margin-top: 10px;
    text-align: center;
}

/* ==========================================================================
   Screen Reader Text
   ========================================================================== */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* ==========================================================================
   Language Switcher (Polylang)
   ========================================================================== */
.lang-switcher {
    display: flex;
    align-items: center;
    margin-left: 24px;
    padding-left: 24px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    font-family: var(--font-sans, 'Roboto Condensed', sans-serif);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    gap: 0;
}

.lang-switcher a {
    text-decoration: none;
    color: inherit;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.lang-switcher a + a::before {
    content: "|";
    margin: 0 6px;
    opacity: 0.4;
}

.lang-switcher a:hover {
    opacity: 1;
}

.lang-switcher a.current-lang {
    opacity: 1;
    font-weight: 700;
}

@media screen and (max-width: 768px) {
    .lang-switcher {
        margin-left: auto;
    }
}

/* ==========================================================================
   Mobile Language Switcher (ヘッダーバー内、ハンバーガー横)
   ========================================================================== */
.mobile-lang-switcher {
    display: none;
}

@media screen and (max-width: 900px) {
    .mobile-lang-switcher {
        display: flex;
        align-items: center;
        margin-right: 12px;
        font-family: var(--font-sans, 'Roboto Condensed', sans-serif);
        font-size: 0.75rem;
        letter-spacing: 0.05em;
    }

    .mobile-lang-switcher a {
        text-decoration: none;
        color: #999;
        padding: 4px 6px;
        transition: color 0.2s;
    }

    .mobile-lang-switcher a + a::before {
        content: "|";
        margin-right: 6px;
        color: #ccc;
    }

    .mobile-lang-switcher a.current-lang {
        color: #333;
        font-weight: 700;
    }
}

/* ==========================================================================
   Content Link Styles (本文リンク色統一)
   ========================================================================== */
.page-body a:not(.wp-block-button__link):not(.local-nav a):not(.btn-map),
.content-section a:not(.wp-block-button__link):not(.btn-map) {
    color: var(--accent-color);
}

.page-body a:not(.wp-block-button__link):not(.local-nav a):not(.btn-map):hover,
.content-section a:not(.wp-block-button__link):not(.btn-map):hover {
    opacity: 0.7;
}

/* ==========================================================================
   Content List Styles (リスト標準スタイル)
   ========================================================================== */
.page-body ul:not([class]),
.page-body .wp-block-list:not(.list-check),
.content-section ul:not([class]),
.content-section .wp-block-list:not(.list-check) {
    list-style: disc;
    padding-left: 1.5em;
    margin-bottom: 1em;
}

.page-body ol:not([class]),
.content-section ol:not([class]) {
    list-style: decimal;
    padding-left: 1.5em;
    margin-bottom: 1em;
}

.page-body ul:not([class]) li,
.page-body ol:not([class]) li,
.page-body .wp-block-list:not(.list-check) li,
.content-section ul:not([class]) li,
.content-section ol:not([class]) li,
.content-section .wp-block-list:not(.list-check) li {
    margin-bottom: 0.4em;
    line-height: 1.8;
}

.page-body ul:not([class]) ul,
.page-body .wp-block-list:not(.list-check) ul,
.content-section ul:not([class]) ul,
.content-section .wp-block-list:not(.list-check) ul {
    list-style: circle;
    margin-top: 0.4em;
    margin-bottom: 0;
}

/* ==========================================================================
   Note Style — 注釈（※）ぶら下げインデント
   ========================================================================== */
.is-style-note {
    padding-left: 1em;
    text-indent: -1em;
    font-size: 0.875rem;
    line-height: 1.8;
    color: #555;
}

/* テーブル直後の注釈（テーブルに近づける） */
.table-note {
    padding-left: 1em;
    text-indent: -1em;
    font-size: 0.875rem;
    line-height: 1.8;
    color: #555;
    margin-top: -2em;
}

/* 赤文字の警告注釈 */
.table-note.is-warning {
    color: #c00;
}

/* テーブル注釈内の強調テキスト（太字・やや大きめ） */
.table-note.is-highlight {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
}
