/* 基本設定 */
/* ボックスモデルの統一 */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    line-height: 1.6;
    font-family: "Noto Sans JP", sans-serif;
    color: var(--clr-blk);
    -webkit-text-size-adjust: 100%;
    /* iOSでのフォントサイズ自動調整防止 */
    font-feature-settings: "palt";
    letter-spacing: 0.05em;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--clr-wht);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 本文 */
p {
    font-size: 1rem;
    margin-bottom: 1em;
}

/* h1 */
h1 {
    font-size: 2.6rem;
    font-weight: 500;
    margin-bottom: 1em;
}

/* h2 */
h2 {
    font-size: 1.6rem;
    font-weight: 500;
    margin-bottom: 0.4em;
}

/* h3 */
h3 {
    font-size: 1.4rem;
    font-weight: 300;
}

/* h4 */
h4 {
    font-size: 1.25rem;
}

section {
    &.ttl {
        font-size: max(4rem, 10px);
    }
}

/* 画像やメディアの最大幅制限 */
img,
picture,
video,
canvas,
svg {
    max-width: 100%;
    height: auto;
    display: block;
    /* 余計な下マージン防止 */
}

/* リンクのスタイル初期化（必要に応じてカスタマイズ） */
a {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

a:hover,
a:focus {}

a:focus-visible {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
}

/* フォーム要素のフォント継承 */
input,
button,
textarea,
select {
    font: inherit;
}

/* 強制的にウェブフォントのスムージングを有効化（macOSなど） */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 不要なリストのマージン・パディング削除 */
ul,
ol {
    margin: 0;
}

/* テーブルの基本スタイル */
table {
    border-collapse: collapse;
    width: 100%;
}

/* ユーザーセレクト禁止例（必要な場合のみ） */
/* .no-select {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
} */

/* SECTION基本設定 */
.outer {
    padding: 80px 0;
}

.inner {
    width: 70%;
    /*文字量多い場合は80％*/
    margin: 0 auto;
}

/*表示管理*/
.flex {
    display: flex;
}

.pc-only {
    display: block;
}

.tb-only {
    display: none;
}

.sp-only {
    display: none;
}

.pc-none {
    display: none !important;
}

.tb-none {
    display: block;
}

.sp-none {
    display: block;
}

.none {
    display: none !important;
}

.logo {
    height: 3rem;
}

#header {
    position: fixed;
    width: 100%;
    z-index: 999;
    top: 0;

    & .outer {
        width: 100%;
        padding: 20px 0;
    }

    & .inner {
        display: flex;
        justify-content: space-between;

        & .header-menu ul {
            height: 100%;
            justify-content: right;
            align-items: center;
            gap: 1.6em;
            font-size: 1.1em;
            font-weight: 500;
            color: var(--clr-blk);
        }
    }

    .scrolled {
        background-color: #fff;
        filter: drop-shadow(2px 2px 4px #555);
    }
}

#footer {
    background: var(--clr-footer);

    & .inner {}

    & .logo {
        margin-bottom: 1em;
    }

    & .left {
        width: 25%;
    }

    & .right {
        width: fit-content;
        margin-left: 10%;
    }

    & #copyright {
        background: var(--clr-copyright);
        color: var(--clr-copyright-txt);
        text-align: center;
        padding: 0.6em 0 0.4em 0;
    }
}

#mainview {
    height: 100vh;

    & .outer {
        padding-top: 0;
    }

    & .single-mv {
        position: fixed;
        width: 100%;
        height: 100vh;
        object-fit: cover;
        z-index: 0;
    }

    & .mv-ttl {
        position: absolute;
        width: 35rem;
        top: 50%;
        left: 14%;
        filter: drop-shadow(3px 3px 2px #014b7a);
    }
}

#bread {
    margin-top: calc(5rem + 8px);
    font-size: 0.9em;
    color: var(--clr-dark-gray);
    width: 100%;
    overflow-x: auto;
    background: var(--clr-light-gray);

    & .outer {
        padding: 8px 0 10px 0;
    }

    & .breadcrumb {
        display: flex;
        flex-wrap: wrap;
        list-style: none;
        padding: 0;
        margin: 0;
        align-items: center;

        & .breadcrumb-item {
            display: flex;
            align-items: center;
            white-space: nowrap;

            &+&::before {
                content: ">";
                display: inline-block;
                padding-left: 0.5em;
                padding-right: 0.5em;
                color: var(--clr-dark-gray);
            }

            & a {
                color: var(--clr-dark-gray);
                text-decoration: none;

                &:hover {
                    color: var(--clr-primary);
                }
            }

            &.active {
                color: var(--clr-dark-gray);

                a {
                    color: var(--clr-dark-gray);
                    cursor: default;
                    text-decoration: none;
                }
            }

            & meta {
                display: none;
            }
        }
    }
}

#pagetop {
    & .is-active {
        opacity: 1;
        visibility: visible;
    }

    & button {
        position: fixed;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 60px;
        height: 80px;
        right: -80px;
        bottom: 10%;
        color: var(--clr-wht);
        cursor: pointer;
        opacity: 0;
        visibility: hidden;
        border: 0;
        background: var(--clr-primary);
        transition: .2s;
        letter-spacing: 3px;
        font-weight: bold;
        border-radius: 10px 0 0 10px;

        & i {
            position: absolute;
            font-size: 30px;
            color: var(--clr-wht);
            top: 15px;
        }

        & p {
            margin: 0;
            font-size: 15px;
            bottom: 13px;
            position: absolute;

        }

        &.is-active {
            right: -2px;
        }
    }
}

#content {

    & h1 {
        text-align: center;
    }
}

#archive,
#search {
    padding: 60px 0;

    & h1 {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
        padding-bottom: 0.75rem;
        border-bottom: 2px solid #333;
    }

    & .post-list {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    & .post-item {
        background: #fff;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        overflow: hidden;
        transition: box-shadow 0.3s ease;

        &:hover {
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        &>a {
            display: flex;
            text-decoration: none;
            color: inherit;
        }
    }

    & .post-thumbnail {
        flex-shrink: 0;
        width: 200px;

        & img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
    }

    & .post-info {
        padding: 1rem 1.5rem;
        display: flex;
        flex-direction: column;
        justify-content: center;

        time {
            font-size: 0.85rem;
            color: #888;
            margin-bottom: 0.5rem;
        }

        & h2 {
            font-size: 1.125rem;
            margin-bottom: 0.5rem;
            line-height: 1.5;
        }
    }

    & .post-excerpt {
        font-size: 0.9rem;
        color: #666;
        line-height: 1.6;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .pagination {
        margin-top: 3rem;
        text-align: center;

        & .nav-links {
            display: flex;
            justify-content: center;
            gap: 0.5rem;
        }

        & .page-numbers {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 40px;
            height: 40px;
            padding: 0 0.75rem;
            border: 1px solid #ddd;
            border-radius: 4px;
            text-decoration: none;
            color: #333;
            transition: all 0.3s ease;

            &:hover {
                background: #333;
                color: #fff;
                border-color: #333;
            }

            &.current {
                background: #333;
                color: #fff;
                border-color: #333;
            }
        }
    }
}

#search {
    & .search-result-count {
        margin-bottom: 1.5rem;
        color: #666;
    }

    & .no-results {
        text-align: center;
        padding: 3rem 0;
        color: #666;

        .search-form {
            margin-top: 2rem;
        }
    }
}

#archive {
    p:only-child {
        text-align: center;
        padding: 3rem 0;
        color: #666;
    }
}


#error-404 {
    padding: 80px 0;

    & .error-content {
        text-align: center;
        max-width: 600px;
        margin: 0 auto;
    }

    & h1 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
        color: #333;
    }

    & .error-content>p {
        font-size: 1rem;
        color: #666;
        line-height: 1.8;
        margin-bottom: 0.5rem;
    }

    & .error-search {
        margin-top: 3rem;
        padding: 2rem;
        background: #f9f9f9;
        border-radius: 8px;

        & h2 {
            font-size: 1.125rem;
            margin-bottom: 1rem;
        }
    }

    & .error-links {
        margin-top: 2rem;

        & a {
            display: inline-block;
            padding: 0.875rem 2rem;
            background: #333;
            color: #fff;
            text-decoration: none;
            border-radius: 4px;
            transition: background 0.3s ease;
        }

        & a:hover {
            background: #555;
        }
    }

}

#contact {

    & input[type="text"],
    input[type="password"],
    input[type="datetime"],
    input[type="date"],
    input[type="month"],
    input[type="time"],
    input[type="week"],
    input[type="number"],
    input[type="email"],
    input[type="url"],
    input[type="search"],
    input[type="tel"],
    input[type="color"],
    select,
    textarea {
        display: block;
        width: 100%;
        height: 45px;
        margin-bottom: 0;
        padding: 0 12px;
        border: 1px solid #d8d8d8;
        border-radius: 3px;
        box-shadow: none;
        background-color: #F6F8F8;
        color: #5c6b80;
        font-size: 1em;
        vertical-align: middle;
        line-height: 45px;
        transition: background-color 0.24s ease-in-out;
    }

    & textarea {
        resize: vertical;
        max-width: 100%;
        min-height: 300px;
        line-height: 1.5em;
        padding: 0.5em;
        overflow: auto;
    }

    & table.cf7-table {
        display: table;
        width: 100%;
        margin: 0 auto;

        & tr {
            border-top: 1px solid #e5e5e5;
        }

        & th {
            width: 30%;
            background-color: #F6F8F8;
            font-size: 15px;
            vertical-align: middle;
        }

        & tr,
        th,
        td {
            padding: 0.75rem 0.75rem !important;
        }

        & ::placeholder {
            color: #797979;
        }
    }

    & .cf7-req {
        font-size: .9em;
        padding: 2px 7px 4px;
        background: #B00000;
        color: #fff;
        border-radius: 3px;
        margin-right: 1em;
    }

    & .cf7-unreq {
        font-size: .9em;
        padding: 4px 7px;
        background: #bdbdbd;
        color: #fff;
        border-radius: 3px;
        margin-right: 1em;
    }

    & p {
        margin: 0;
    }


    & input.wpcf7-submit {
        background-color: #0b3f84;
        border: 2px solid #0b3f84;
        color: #fff;
        font-size: 1.2em;
        font-weight: bold;
        margin: 0 auto;
        padding: 15px 30px;
        transition: all 0.5s 0s ease;
        border-radius: 15px;

        &:hover {
            background: #fff;
            color: #0b3f84;
        }
    }

    & .cf7-btn {
        text-align: center;
        margin: 20px;
    }

    & .wpcf7-spinner {
        width: 0;
        margin: 0;
    }
}

@media (max-width: 1024px) {
    .inner {
        width: 85%;
    }

    .pc-only {
        display: none;
    }

    .tb-only {
        display: block;
    }

    .sp-only {
        display: none;
    }

    .pc-none {
        display: block;
    }

    .tb-none {
        display: none !important;
    }

    .sp-none {
        display: block;
    }

    .none {
        display: none !important;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .outer {
        padding: 50px 0;
    }

    .inner {
        width: 90%;
    }

    .pc-only {
        display: none;
    }

    .tb-only {
        display: none;
    }

    .sp-only {
        display: block;
    }

    .pc-none {
        display: block;
    }

    .tb-none {
        display: block;
    }

    .sp-none {
        display: none !important;
    }

    .none {
        display: none !important;
    }

    #archive,
    #search {
        & .post-item>a {
            flex-direction: column;
        }

        & .post-thumbnail {
            width: 100%;
            height: 200px;
        }

        & .post-info {
            padding: 1rem;
        }
    }

    #error-404 {
        & h1 {
            font-size: 1.5rem;
        }

        & .error-search {
            padding: 1.5rem;
        }
    }

    #contact {
        & table.cf7-table {
            width: 90%;

            & tr,
            td,
            th {
                display: block;
                width: 100% !important;
                line-height: 2.5em;
            }

            & th {
                background-color: #F6F8F8;
            }
        }
    }

}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .outer {
        padding: 30px 0;
    }

    .inner {
        width: 95%;
    }
}