/* カスタム調整用CSS */
/* このファイルは既存のCSSを上書きするための微調整用CSSです */

/* サイドバナー設定 */
[class*="side_left"],
[class*="side_right"] {
    position: absolute;
    height: auto;
    left: 50%;
    z-index: -1;
    transform: translateX(-50%);
}

.side_left_1 {
    width: 70%;
    max-width: 430px;
    top: 35%;
}

.side_left_2 {
    width: 100%;
    max-width: 550px;
    bottom: 0%;
}

.side_right.logo {
    width: 70%;
    max-width: 500px;
    height: fit-content;
    top: 15%;
}

.side_right_2 {
    width: 100%;
    height: fit-content;
    bottom: 0%;
}

.button_box {
    display: flex;
    flex-direction: column;
    gap: 3px;
    position: absolute;
    right: 15px;
    bottom: 10%;
    width: 47%;
    max-width: 500px;
}

.button_box a[class*="_button"] {
    display: block;
    aspect-ratio: 489.0266 / 226.592;
    border-radius: 5px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

[class^="side_box_"] {
    position: fixed;
    width: calc(calc(100vw - 660px) * 0.5);
    height: 100%;
}

.side_box_left {
    left: 0;
    top: 0;
}

.side_box_right {
    right: 0;
    bottom: 0px;
}

.line_button {
    background-image: url(../image/side_line.png);
}

.form_button {
    background-image: url(../image/side_mail.png);
}

.tel_button {
    background-image: url(../image/side_tel.png);
}

.tel-header {
    background-color: var(--header-tel-color-bg);
}

.tel-number {
    color: var(--header-tel-color-number);
}

.tel-container {
    width: 100%;
}

.tel-header {
    text-align: center;
    padding-top: 2px;
    padding-bottom: 1px;
    border-radius: 2px;
    margin-bottom: 0px;
}

.tel-header-text {
    display: block;
    color: var(--header-tel-color-text);
    font-size: 60%;
    line-height: 1em;
}

.tel-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: bold;
    font-size: 1.125rem;
}

.tel-icon {
    width: 9%;
}

.tel-number {
    font-size: clamp(0px, 2.3vw, 22px);
    font-weight: 700;
    font-family: "Roboto Condensed", sans-serif;
    line-height: 1em;
    letter-spacing: -0.05em;
    white-space: nowrap;
    font-feature-settings: "palt";
}

.tel-icon-svg {
    fill: var(--header-tel-color-icon);
}

@media (max-width: 660px) {
    .tel-container {
        display: none;
    }
}

@media screen and (min-width: 661px) {
    .tel_sp {
        display: none;
    }
}

@media (max-width: 1080px) {
    [class^="side_"] {
        display: none;
    }
}

/* YouTube動画のスタイル */
.youtube-section {
    background-color: var(--youtube-color-bg);
}

.section-title {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

/* 全体のフォントサイズ調整 */
body::before {
    background-size: 50%;
}

/* メインコンテンツ調整 */
main:not(#Confirm) {
    width: 100%;
    margin: 0 auto;
    max-width: 660px;
    position: relative;
    z-index: 1;
}

main#top {
    background-color: var(--main-color);
}

@media screen and (min-width: 1081px) {
    #header {
        display: none;
    }
}

header h1 {
    /* 最大高さを制限 */
    width: 20%;
    max-height: 90px;
}

@media (max-width: 660px) {
    header h1 {
        width: 50%;
    }
}

header h1 img {
    max-height: 70px;
}

header nav {
    max-width: 630px;
    width: 70%;
}

@media (max-width: 660px) {
    header nav {
        width: 50%;
    }
}

header nav ul {
    column-gap: 5%;
}

header nav ul li {
    width: 20%;
}

header nav ul li a {
    width: 100%;
}

@media (max-width: 660px) {
    header nav ul li a {
        max-width: 40px;
        max-height: 100%;
    }
}

.form_title {
    width: 100%;
    margin: 0px auto 20px;
}

/* フッター調整 */
#top+.footer_wapper {
    width: 100%;
    max-width: 660px;
    margin: 0 auto;
    overflow: hidden;
}

.footer_inner {
    height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.footer_link a:hover {
    color: var(--footer-text-color-hover);
}

.footer-divider {
    color: var(--footer-text-color);
    margin: 0 5px;
}

.copy {
    color: var(--footer-text-color);
    font-size: 12px;
}

/* メディアクエリ - タブレット表示調整 */
@media screen and (min-width: 781px) and (max-width: 1024px) {

    /* タブレット表示の調整 */
    header h1 {
        max-height: 70px;
    }

    header nav ul li a img {
        max-height: 35px;
    }
}

/* プライバシーポリシーと会社概要のスタイル */
body.privacy main {
    padding: 50px 0;
}

body.privacy main section.contact {
    width: 80%;
    max-width: 660px;
    background-color: #fff;
}

body.company main {
    padding: 50px 0;
}

body.company main table {
    width: 100%;
    margin: 0;
}

body.company main th {
    background-color: var(--main-color);
    border-color: #333;
    color: #fff;
}

body.company main td {
    padding: 5px;
    border-color: #333;
}

/* YouTube動画セクションのスタイル */
.youtube-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 56.25%;
    /* 16:9のアスペクト比 */
    height: 0;
    overflow: hidden;
}

.youtube-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: var(--shadow);
    border-radius: 5px;
}

/* スクロールのスムーズな動き */
html {
    scroll-behavior: smooth;
}

/* 全体のフォントサイズ調整 */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
}

.youtube-section {
    padding: 4% 4.5% 3%;
    text-align: center;
}

.section-title {
    font-weight: bold;
    text-align: center;
    padding-top: 2rem;
}

/* メインコンテンツ調整 */

body.top main:not(#Confirm) {
    box-shadow: var(--shadow);
}

body.top main:not(#Confirm) .left_box tr:not(:first-child) td {
    border-top: none;
}

body.top main:not(#Confirm) .add_wapper {
    flex-direction: column;
}

body.top main:not(#Confirm) .right_box {
    width: 100%;
}

body.top main:not(#Confirm) .left_box {
    width: 100%;
}

@media (max-width: 780px) {
    body.top main:not(#Confirm) table th {
        border: none;
    }
}

body.privacy main:not(#Confirm) {
    width: 45%;
    max-width: 100%;
    height: 100%;
    background-color: transparent;
    padding: 50px 0;
}

body.privacy main:not(#Confirm) section.contact {
    width: 80%;
    max-width: 660px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

@media screen and (max-width: 1080px) {
    body.privacy main:not(#Confirm) {
        width: 100%;
    }
}

body.company main:not(#Confirm) .bosyu {
    width: 100%;
}

body.company main:not(#Confirm) table {
    width: 100%;
    margin: 0;
}

body.company main:not(#Confirm) .tbody {
    width: 100%;
}

body.company main:not(#Confirm) th {
    font-weight: 700;
}

body.company main:not(#Confirm) td {
    background-color: #fff;
    text-align: center;
}

/* 会社情報ページのコンテナ */
body.company main:not(#Confirm) .company-container {
    background-color: #fff;
}

body:where(.company, .privacy) main {
    display: grid;
    place-items: center;
}

body:where(.company, .privacy) main .section__ttl {
    font-weight: 700;
}

body:where(.company, .privacy) main .form__txt {
    line-height: 1.75em;
}


header h1 {
    /* 最大高さを制限 */
    display: flex;
    align-items: center;
}

@media (max-width: 660px) {
    header h1 {
        width: 45%;
    }
}

header h1 a {
    display: block;
    width: 100%;
}

header h1 img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

header nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

header nav ul {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
}

header nav ul li {
    display: flex;
    align-items: center;
}

header nav ul li a {
    width: 100%;
    display: block;
    transition: all 0.2s ease;
}


/* 会社情報テーブルのスタイル */
.company_tb table,
.bosyu table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.company_tb th,
.company_tb td,
.bosyu th,
.bosyu td {
    padding: 15px;
    border: 1px solid #ddd;
    background-color: #fff;
    position: relative;
}

.company_tb th {
    width: 30%;
    background-color: #f5f5f5;
    font-weight: bold;
    border-right: none;
}

.bosyu table td {
    border: 1px solid #222;
    background-color: #f0f4f9;
}

/* セル内のコンテンツを縦横中央揃え */
.cell-content {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%;
    width: 100%;
    line-height: 1.5em;
}

/* レスポンシブ対応 */
@media screen and (max-width: 767px) {

    .company_tb th,
    .company_tb td,
    .bosyu th,
    .bosyu td {
        padding: 10px;
    }

    .company_tb th,
    .bosyu th {
        width: 40%;
    }
}

/* 会社情報ページのコンテナ */
.company-container {
    width: 100%;
    max-width: 800px;
    border-radius: 5px;
    box-shadow: var(--shadow);
    margin-top: 130px;
    padding: 20px;
    background: var(--background-left-bg-company);
}

@media screen and (max-width: 660px) {
    .company-container {
        box-shadow: none;
    }
}

.company-container .section-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
    border-bottom: 2px solid #f5f5f5;
    padding-bottom: 10px;
}

#background_wapper {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -100;
    width: 100%;
    height: 100%;
    display: flex;
}

.bosyu table th {
    border: 1px solid var(--table-title-border-color);
    background: var(--table-title-bg);
    color: var(--table-title-text-color);
}

.bosyu table td {
    border: 1px solid var(--table-data-border-color);
    background: var(--table-data-bg);
    color: var(--table-data-text-color);
}

#background_wapper [class^="bg_object_"] {
    position: relative;
    width: 50%;
    height: 100%;
    overflow: hidden;
}

/* トップページの背景 ここから */
body:not(#Company, #Privacy) #background_wapper .bg_object_1 {
    background: var(--background-left-bg);
    /* background: #fff; */
}

body:not(#Company, #Privacy) #background_wapper .bg_object_2 {
    background: var(--background-right-bg);
    /* background-color: #ffffff; */
}

/* トップページの背景 ここまで */

/* 会社概要ページの背景 ここから */
body#Company #background_wapper .bg_object_1 {
    background: var(--background-left-bg-company);
}

body#Company #background_wapper .bg_object_2 {
    background: var(--background-right-bg-company);
}

/* 会社概要ページの背景 ここまで */

/* プライバシーポリシーページの背景 ここから */
body#Privacy #background_wapper .bg_object_1 {
    background: var(--background-left-bg-privacy);
}

body#Privacy #background_wapper .bg_object_2 {
    background: var(--background-right-bg-privacy);
}

/* プライバシーポリシーページの背景 ここまで */


/* レスポンシブ対応 */
@media screen and (max-width: 767px) {
    .company-container {
        margin: 130px auto 20px;
        padding: 15px;
    }

    .company-container .section-title {
        font-size: 20px;
    }
}

@media screen and (max-width: 660px) {
    .company-container {
        width: fit-content;
        padding: 0 20px 10px;
        margin: 0 auto;
    }
}

body#Company main.page__main:not(#Confirm) {
    margin-top: 100px;
    margin-bottom: 100px;
    background: var(--background-left-bg-privacy);
}

body#Privacy main.page__main:not(#Confirm) {
    margin-top: 100px;
    margin-bottom: 100px;
}

@media screen and (max-width: 767px) {
    body#Company main.page__main:not(#Confirm) {
        margin-top: 65px;
        margin-bottom: 100px;
    }

    body#Privacy main.page__main:not(#Confirm) {
        margin-top: 65px;
        margin-bottom: 100px;
    }
}

body#Company {
    height: calc(100dvh - 135px);
}

body#Privacy {
    height: calc(100dvh - 300px);
}

@media screen and (max-width: 767px) {
    body#Company {
        height: calc(100dvh - 70px);
    }

    body#Privacy {
        height: calc(100dvh - 310px);
    }
}

@media screen and (max-width: 660px) {
    body#Company {
        height: calc(100dvh - 90px);
    }

    body#Privacy {
        height: calc(100dvh - 540px);
    }
}

body:is(#Company, #Privacy) footer {
    min-height: 155px;
    height: calc(100% - 490px);
    background-color: var(--footer-bg);
}

@media screen and (max-width: 660px) {
    body:is(#Company, #Privacy) footer {
        height: calc(100% - 320px);
    }
}

body:is(#Company, #Privacy) .footer_inner {
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

@media screen and (min-width: 661px) {
    body#Privacy #entry {
        padding: 35px 15px 15px 15px;
        box-shadow: var(--shadow);
        background: var(--background-left-bg-privacy);
    }
}

body#Privacy .inner1 :is(.form__text, .form__title) {
    line-height: 1.75em;
}


/* ============================== 変数 ============================== */
:root {
    --cta-h: 64px;
    /* 固定CTAの想定高さ（JSで上書き推奨） */
    --safe-bottom: 0px;
    /* iOS等の安全域（SPでenv()に差し替え） */
    --cta-pulse-scale: 1.03;
    /* CTAボタンの鼓動アニメ倍率 */
}


/* ========================= first-view のCTA ========================= */
.first-view {
    position: relative;
}


/* 共通：ボタンを中央基準で絶対配置 + パルスアニメ */
.first-view .cta_button {
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    animation: cta-button-animation 1.5s ease infinite;
    -webkit-animation: cta-button-animation 1.5s ease infinite;
    /* Safari用 */
}


/* セクション別の微調整（必要箇所のみ上書き） */
.first-view.control_1 .cta_button {
    bottom: -2.5%;
    left: 50.5%;
    width: 92%;
}


.first-view.control_2 .cta_button {
    bottom: -1.5%;
    left: 50.5%;
    width: 92%;
}


.first-view.control_3 .cta_button {
    bottom: -1.5%;
    left: 50.5%;
    width: 92%;
}


.first-view.control_4 .cta_button {
    bottom: -1.5%;
    left: 50.5%;
    width: 92%;
}

.first-view.control_5 .cta_button {
    bottom: -0.9%;
    left: 50.5%;
    width: 92%;
}

/* 装飾（右下の画像など） */
.cta {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.cta::before {
    content: "";
    position: absolute;
    bottom: 3%;
    right: 7%;
    width: 48px;
    height: 50px;
    background-image: url(../image/CTA_item.png);
    background-size: contain;
    background-repeat: no-repeat;
}


/* パルスアニメ（標準） */
@keyframes cta-button-animation {
    0% {
        transform: translate(-50%, -50%) scale(1);
    }

    15% {
        transform: translate(-50%, -50%) scale(var(--cta-pulse-scale));
    }

    30% {
        transform: translate(-50%, -50%) scale(1);
    }

    45% {
        transform: translate(-50%, -50%) scale(var(--cta-pulse-scale));
    }

    70% {
        transform: translate(-50%, -50%) scale(1);
    }

    90% {
        transform: translate(-50%, -50%) scale(var(--cta-pulse-scale));
    }
}

/* パルスアニメ（Safari） */
@-webkit-keyframes cta-button-animation {
    0% {
        -webkit-transform: translate(-50%, -50%) scale(1);
    }

    15% {
        -webkit-transform: translate(-50%, -50%) scale(var(--cta-pulse-scale));
    }

    30% {
        -webkit-transform: translate(-50%, -50%) scale(1);
    }

    45% {
        -webkit-transform: translate(-50%, -50%) scale(var(--cta-pulse-scale));
    }

    70% {
        -webkit-transform: translate(-50%, -50%) scale(1);
    }

    90% {
        -webkit-transform: translate(-50%, -50%) scale(var(--cta-pulse-scale));
    }
}


/* ========================= 画面下 固定CTAバー ========================= */
/* PC幅では非表示（SPでdisplay:flexに） */
.fixed-cta {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2147483000;
    /* 最前面に出したい場合は調整 */
    padding-bottom: var(--safe-bottom);
    background: transparent;
    /* 表示トグル用の初期状態（隠す） */
    pointer-events: none;
    /* 背景誤クリック防止（子要素で解除） */
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform .28s ease, opacity .28s ease, visibility .28s linear;
}

.fixed-cta>* {
    pointer-events: auto;
}

/* 子ボタンは操作可 */
.fixed-cta .cta-img {
    flex: 1 1 0;
    display: block;
}

.fixed-cta .cta-img img {
    display: block;
    width: 100%;
    height: auto;
}


/* 表示状態 */
.fixed-cta.is-visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* 緊急確認用（HTMLに data-debug="show" で強制表示） */
.fixed-cta[data-debug="show"] {
    transform: none;
    opacity: 1;
    visibility: visible;
}


/* SPのみ：本文下余白の確保 + 安全域適用 + 表示 */
@media (max-width: 767px) {
    :root {
        --safe-bottom: env(safe-area-inset-bottom);
    }

    body {
        padding-bottom: calc(var(--cta-h) + var(--safe-bottom));
    }

    .fixed-cta {
        display: flex;
    }
}