
/* ==================================================
   1. Reset
================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body,
h1,
h2,
h3,
p,
ul,
ol,
figure {
    margin: 0;
}

ul,
ol {
    padding: 0;
    list-style: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}


/* ==================================================
   2. Base
================================================== */

html {
    font-size: 16px;
}

body {
    min-height: 100vh;
    background: #f5f6f8;
    color: #222;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "Noto Sans JP",
        "Hiragino Kaku Gothic ProN",
        "Yu Gothic",
        Meiryo,
        sans-serif;
    line-height: 1.7;
}

body.menu-open {
    overflow: hidden;
}

a {
    transition:
        opacity 0.2s ease,
        background-color 0.2s ease,
        color 0.2s ease;
}

a:hover {
    opacity: 0.8;
}

button {
    border: 0;
}


/* ==================================================
   3. Common Layout
================================================== */

.site-wrapper {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

.site-main {
    flex: 1;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 26px auto 60px;
}

.page-content {
    padding-block: 32px 56px;
}

.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 32px;
    align-items: start;
}

.main-column {
    min-width: 0;
}


/* ==================================================
   4. Header
================================================== */

.site-header {
    position: relative;
    z-index: 100;
    width: 100%;
    background: #080d13;
    color: #fff;
}


/* SEO・スクリーンリーダー用 */

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}


/* ヘッダー画像 */

.header-visual {
    width: 100%;
    overflow: hidden;
    background: #080d13;
}

.header-visual-link {
    display: block;
    width: 100%;
    opacity: 1;
}

.header-visual-link:hover {
    opacity: 1;
}

.header-picture {
    display: block;
    width: 100%;
}

.header-image {
    display: block;
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: center;
}


/* ナビゲーション操作エリア */

.header-menu-area {
    position: relative;
    width: 100%;
    background: #263442;
}

.header-inner {
    position: relative;
    display: none;
    width: min(1180px, calc(100% - 32px));
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 auto;
}

.header-menu-title {
    margin: 0;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}


/* ==================================================
   5. Navigation
================================================== */

.global-nav {
    width: 100%;
    background: #263442;
}

.global-nav-inner {
    display: flex;
    width: min(1180px, calc(100% - 32px));
    min-height: 56px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 0 auto;
}

.global-nav-menu {
    display: flex;
    flex: 0 1 auto;
    align-items: center;
    gap: 0;
}

.global-nav ul {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
}
.global-nav ul {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.global-nav li {
    flex: 0 0 auto;
}

.global-nav a {
    display: flex;
    min-height: 56px;
    align-items: center;
    justify-content: center;
    padding: 0 28px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.global-nav a:hover {
    background: rgb(255 255 255 / 8%);
    color: #fff;
    opacity: 1;
}

.global-nav a:focus-visible {
    outline: 3px solid rgb(255 255 255 / 55%);
    outline-offset: -3px;
}

/* グローバルナビゲーション内検索 */

.global-search {
    display: flex;
    width: 100%;
    max-width: 340px;
    flex: 0 1 340px;
    align-items: stretch;
    overflow: hidden;
    margin-left: auto;
    border: 1px solid rgb(255 255 255 / 30%);
    border-radius: 8px;
    background: #fff;
}

.global-search:focus-within {
    border-color: #72b7ea;
    box-shadow: 0 0 0 3px rgb(114 183 234 / 25%);
}

.global-search-label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.global-search-input {
    min-width: 0;
    min-height: 38px;
    flex: 1;
    padding: 8px 12px;
    border: 0;
    background: #fff;
    color: #222;
    font-size: 14px;
    outline: none;
}

.global-search-input::placeholder {
    color: #7b838b;
}

.global-search-input::-webkit-search-cancel-button {
    cursor: pointer;
}

.global-search-button {
    display: inline-flex;
    min-width: 58px;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    border: 0;
    background: #1d73b7;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.global-search-button:hover {
    background: #155a91;
}

.global-search-button:focus-visible {
    position: relative;
    outline: 3px solid rgb(255 255 255 / 75%);
    outline-offset: -5px;
}

/* ==================================================
   6. Hamburger Menu
================================================== */

.menu-toggle {
    display: none;
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    padding: 0;
    border: 1px solid rgb(255 255 255 / 24%);
    border-radius: 8px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease;
}

.menu-toggle:hover {
    border-color: rgb(255 255 255 / 45%);
    background: rgb(255 255 255 / 8%);
}

.menu-toggle:focus-visible {
    outline: 3px solid rgb(255 255 255 / 55%);
    outline-offset: 3px;
}

.menu-toggle-line {
    display: block;
    width: 23px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition:
        transform 0.25s ease,
        opacity 0.25s ease;
}

.menu-toggle.is-open .menu-toggle-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.is-open .menu-toggle-line:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-open .menu-toggle-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ==================================================
   7. Sidebar
================================================== */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-section {
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fff;
}

.sidebar-title {
    margin-bottom: 12px;
    font-size: 1.05rem;
}


/* ==================================================
   8. Footer
================================================== */

.site-footer {
    margin-top: auto;
    padding-block: 32px;
    background: #222;
    color: #fff;
}

.site-footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.copyright {
    color: #ccc;
    font-size: 0.875rem;
}


/* ==================================================
   9. Buttons
================================================== */

.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #222;
    color: #fff;
    font-weight: 700;
    line-height: 1.3;
    cursor: pointer;
}

.button:hover {
    opacity: 0.85;
}

.button-secondary {
    border-color: #ccc;
    background: #fff;
    color: #222;
}

.button-small {
    min-height: 36px;
    padding: 7px 12px;
    font-size: 0.875rem;
}

.button-full {
    width: 100%;
}

.button-disabled {
    border-color: #ccc;
    background: #eee;
    color: #888;
    cursor: default;
}


/* ==================================================
   10. Scroll Top Button
================================================== */

.scroll-top-button {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 200;
    display: flex;
    width: 52px;
    height: 52px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: #1d2733;
    color: #fff;
    box-shadow: 0 5px 18px rgb(0 0 0 / 24%);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition:
        opacity 0.25s ease,
        visibility 0.25s ease,
        transform 0.25s ease,
        background-color 0.2s ease;
}

.scroll-top-button[hidden] {
    display: flex;
}

.scroll-top-button.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-button:hover {
    background: #263f58;
}

.scroll-top-button:focus-visible {
    outline: 3px solid rgb(29 115 183 / 45%);
    outline-offset: 3px;
}

.scroll-top-button-icon {
    display: block;
    font-size: 25px;
    font-weight: 700;
    line-height: 1;
}


/* ==================================================
   11. Common Cards
================================================== */

.card {
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgb(0 0 0 / 5%);
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 1.1rem;
    line-height: 1.5;
}


/* ==================================================
   12. Common Headings
================================================== */

.section {
    margin-top: 32px;
}

.section:first-child {
    margin-top: 0;
}

.section-title {
    margin: 0;
    padding-left: 12px;
    border-left: 5px solid #1d73b7;
    font-size: 23px;
}

.page-header {
    padding: 26px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.page-title {
    margin: 0;
    font-size: 29px;
    line-height: 1.4;
}

.page-description {
    margin: 10px 0 0;
    color: #555;
}

.page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 14px;
    color: #666;
    font-size: 13px;
}


/* ==================================================
   13. Breadcrumb
================================================== */

.breadcrumb {
    margin-bottom: 18px;
    color: #666;
    font-size: 13px;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.breadcrumb-item:not(:last-child)::after {
    margin-left: 6px;
    color: #999;
    content: "›";
}

.breadcrumb span {
    margin: 0 6px;
    color: #999;
}


/* ==================================================
   14. Forms
================================================== */

.form-control {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #fff;
    color: #222;
}

.form-control:focus {
    border-color: #777;
    outline: 2px solid rgb(0 0 0 / 10%);
}


/* ==================================================
   15. Utilities
================================================== */

.text-center {
    text-align: center;
}

.text-muted {
    color: #777;
}

.hidden {
    display: none !important;
}

.empty-message {
    padding: 28px;
    border-radius: 10px;
    background: #fff;
    color: #666;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* ==================================================
   グローバルナビゲーション固定
================================================== */

.global-nav-placeholder {
    width: 100%;
    height: 0;
}

@media (min-width: 769px) {
    .global-nav.is-fixed {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        z-index: 1000;
        width: 100%;
        box-shadow: 0 4px 14px rgb(0 0 0 / 20%);
    }
}

@media (max-width: 768px) {
    .global-nav-placeholder {
        display: none;
    }

    .global-nav.is-fixed {
        position: absolute;
        top: 100%;
    }
}


/* ==================================================
   16. Common Responsive
================================================== */

@media (max-width: 900px) {
    .content-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 2;
    }
}


@media (max-width: 768px) {

    /* =========================================
       ヘッダー画像
    ========================================= */

    @media (max-width: 768px) {
        .header-image {
            height: 131px;
            object-fit: cover;
            object-position: center top;
        }
    }


    /* =========================================
       メニューボタン
    ========================================= */

    .header-inner {
        display: flex;
        width: min(100% - 32px, 1180px);
        min-height: 64px;
        gap: 14px;
        padding: 8px 0;
    }

    .menu-toggle {
        display: flex;
        margin-left: auto;
    }


    /* =========================================
       スマホナビゲーション
    ========================================= */

    .global-nav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        overflow: hidden;
        max-height: 0;
        background: #263442;
        opacity: 0;
        visibility: hidden;
        box-shadow: 0 8px 20px rgb(0 0 0 / 18%);
        transition:
            max-height 0.3s ease,
            opacity 0.25s ease,
            visibility 0.25s ease;
    }

    .global-nav.is-open {
        max-height: 520px;
        opacity: 1;
        visibility: visible;
    }

    .global-nav-inner {
        display: flex;
        width: 100%;
        min-height: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
    }
    .global-search {
        order: -1;
        width: min(100% - 32px, 1180px);
        max-width: none;
        flex: none;
        margin: 16px auto;
        border-color: rgb(255 255 255 / 25%);
    }
    
    .global-search-input {
        min-height: 46px;
        padding: 10px 12px;
        font-size: 16px;
    }
    
    .global-search-button {
        min-width: 72px;
        min-height: 46px;
        padding-inline: 16px;
    }
    
    .global-nav ul {
        display: block;
        width: 100%;
    }

    .global-nav li {
        width: 100%;
        border-top: 1px solid rgb(255 255 255 / 10%);
    }

    .global-nav li:first-child {
        border-top: 0;
    }

    .global-nav a {
        display: flex;
        width: min(100% - 32px, 1180px);
        min-height: 52px;
        align-items: center;
        justify-content: flex-start;
        margin: 0 auto;
        padding: 12px 0;
        font-size: 15px;
    }
}


@media (max-width: 640px) {
    .container {
        width: min(100% - 24px, 1200px);
    }

    .header-inner {
        width: min(100% - 24px, 1180px);
    }

    .site-footer-inner {
        flex-direction: column;
    }

    .page-content {
        padding-block: 24px 40px;
    }

    .card-body {
        padding: 16px;
    }

    .scroll-top-button {
        right: 16px;
        bottom: 16px;
        width: 48px;
        height: 48px;
    }

    .scroll-top-button-icon {
        font-size: 23px;
    }
}

@media (max-width: 520px) {
    .container {
        width: min(100% - 22px, 1180px);
        margin-top: 18px;
    }

    .header-inner {
        width: min(100% - 22px, 1180px);
    }

    .global-nav a {
        width: min(100% - 22px, 1180px);
    }

    .menu-toggle {
        width: 44px;
        height: 44px;
    }

    .page-header {
        padding: 20px;
    }

    .page-title {
        font-size: 24px;
    }
}


@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

