.sp-only {
    display: flex;
}

.pc-only{
    display: flex;
}

@media (min-width: 769px){
    .sp-only {
        display: none !important;
    }
    

    
}
@media (max-width: 768px) { 

    .pc-only{
        display: none !important;
    }
    .sp-only .business-badge {
        margin: auto;
    }
}

.company-text-container > *{
    display:inline-block;
    vertical-align: middle;
}

.company-anniversary-logo {
    width: 65%;
}
.company-text-container .company-detail-button.sp-only {
    width: 33%;
    display: inline-block;
    
}


/* ============================================
   TOP PAGE SPECIFIC STYLES
   ============================================ */
body>section,
.main-content>section,
.main-content>.CloudBg {
    position: relative;
    z-index: 1;
}

/* Section Title (SERVICE, SOLUTION, COMPANY DATA) */
/* font-size は style.css の .Section-title で定義 */
/* .section-title { */
    /* font-size: 120px; */
    /* color: var(--navy);
    font-weight: bold;
    line-height: 1;
    transform: scaleX(0.93) scaleY(1.15) translateY(1%);
    transform-origin: left center;
} */

/* Vertical Text - Left Side */
.katsumoto-vertical-text {
    transform: rotate(270deg) translate(-125%, -24%)
} 


@media (max-width: 768px) {

    .katsumoto-vertical-text {
        font-size: 70px;
        transform: rotate(270deg) translate(calc(32vh), -24%) !important;
        opacity: 0;
        transition: opacity 1.6s ease-out;
    }

    .katsumoto-vertical-text.show {
        opacity: 1;
    }
}


/* First View */
.first-view {
    margin-top: var(--header-height);
    position: relative;
    min-height: 200vh;
    background: var(--white);
    overflow: hidden;
}

@media (min-width: 769px) {
    .first-view {
        margin-top: calc(var(--header-height) + var(--border-frame) + 120);
    }
}

/* 固定コンテナ */
.first-view-sticky {
    position: relative;
    min-height: 100vh;
}

@media (min-width: 769px) {
    .first-view-sticky {
        min-height: calc(100vh - var(--border-frame));
    }
}

/* 白いマスク（画像の周りを覆う） */
.fix_box {
    position: fixed;
    width: 100vw;
    height: 100vh;
    z-index: 10;
    pointer-events: none;
}

/* SP版ではfix_boxを非表示 */
@media (max-width: 768px) {
    .fix_box {
        display: none;
    }
}

@media (min-width: 769px) {
    .fix_box {
        top: var(--border-frame);
    }
}

.fix_box>div {
    position: fixed;
    background-color: var(--white);
    z-index: 8;
}

.fix_box .top {
    top: 50px;
    left: 0;
    width: 100%;
    height: 120px;
}

@media (min-width: 769px) {
    .fix_box .top {
        top: 0;
        height: 170px;
    }
}

.fix_box .left {
    top: 0;
    left: 0;
    height: 100%;
    width: 10vw;
}

@media (min-width: 769px) {
    .fix_box .left {
        left: var(--border-frame);
    }
}

.fix_box .bottom {
    bottom: 0;
    left: 0;
    width: 100%;
    height: 160px;
}

@media (min-width: 769px) {
    .fix_box .bottom {
        bottom: var(--border-frame);
    }
}

.fix_box .right {
    top: 0;
    right: 0;
    height: 100%;
    width: 10vw;
}

@media (min-width: 769px) {
    .fix_box .right {
        right: var(--border-frame);
    }
}

/* 背景画像エリア */
.BackGround {
    padding-bottom: 0;
    opacity: 0;
    position: absolute;
    z-index: 1;
    font-size: 0;
    transition: opacity 1.6s ease-out;
    width: 100%;
}

.BackGround.show {
    opacity: 1;
}

.BackGround img {
    width: 100%;
    display: block;
}

/* テキストコンテナ */
.fix_text_container {
    /* width: 200px;
    z-index: 20;
    display: flex;
    align-items: center;
    writing-mode: vertical-rl;
    position: fixed;
    left: 0;
    right: 0;
    margin: auto;
    bottom: 10vh; */

    z-index: 20;
    /* display: flex; */
    align-items: center;
    writing-mode: vertical-rl;
    position: fixed;
    left: 50%;
    /* right: 0; */
    /* margin: auto; */
    bottom: 10vh;
    top: 50%;
    transform: translate(-50%, calc( -50% + 81px));
    height: 614px;
}

.fix_text {
    /* font-size: 24px; */
    font-size: 42px;
    line-height: 1.2;
    font-weight: bold;
    /* line-height: 1.8; */
}

.fix_text span {
    font-size: 42px;
    line-height: 1.2;
    text-shadow: 0 0 6px #fff;
    display: inline-block;
    color: var(--black);
}

.eachTextAnime span {
    opacity: 0;
}

.eachTextAnime.appeartext span {
    animation: text_anime_on 2s ease-out forwards;
}

@keyframes text_anime_on {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.first-view-text-area {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 33.33%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    z-index: 0;
}

.katsumoto-vertical {
    position: absolute;
    left: 0;
    top: 50vh;
    transform: translateY(-50%);
    z-index: 100;
    height: 60vh;
    max-height: 600px;
}

@media (min-width: 769px) {
    .katsumoto-vertical {
        left: var(--border-frame);
    }
}

.katsumoto-vertical img {
    height: 100%;
    width: auto;
    display: block;
}

/* Service Section */
.service-section {
    padding: 100px 0;
    background: transparent;
    position: relative;
    z-index: 10;
    overflow: hidden;
}

.service-container {
    margin-left: 10%;
    margin-right: 8%;
    position: relative;
    z-index: 1;
}

.service-header-wrapper {
    position: relative;
}

.video-placeholder {
    width: 90%;
    max-width: 890px;
    aspect-ratio: 16/9;
    position: relative;
    margin-left: 0;
    margin-right: auto;
    z-index: 1;
}

.service-section h2 {
    transform: translateX(-3%) translateY(-50%);
    z-index: 2;
    position: relative;
}

.service-section h2 img {
    width: auto;
    height: 125px;
    display: block;
}

.service-main {
    display: flex;
    gap: 60px;
    align-items: flex-start;
    position: relative;
    z-index: 2;
}

.service-main-wrapper {
    position: relative;
    z-index: 2;
}

.service-main-wrapper .Section-title {
    margin-bottom: 40px;
}

.service-main-wrapper .service-description .subtitle {
    margin-bottom: 40px;
}

.service-left-content {
        flex: 1 1 50%;
}

.service-description {
    margin-bottom: 50px;
}

.service-description p:first-child {
    margin-bottom: 20px;
}

.service-section .service-icons {
    flex: 1 1 15%;
    gap: 13px;
}

/* BtoB/BtoC Section */
.btob-btoc-section {
    padding: 80px 20px 80px 5vw;
    margin-left: 5%;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.btob-btoc-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--navy);
    mix-blend-mode: overlay;
    z-index: 0;
    pointer-events: none;
}

.btob-btoc-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--navy);
    z-index: 0;
    pointer-events: none;
    opacity: 0.8;
}

.business-block {
    margin-bottom: 90px;
    position: relative;
    z-index: 1;
}

.business-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

/* font-size は style.css の .SubSection-title で定義 */
.business-title {
    /* font-size: 42px; */
    /* font-weight: bold;
     */
     
    font-family: "Roboto Condensed", sans-serif;
    font-optical-sizing: auto;
    font-weight: 700;
    color: var(--white);
    transform: scaleX(0.93) scaleY(1.25);
    transform-origin: left center;
    display: flex;
    align-items: center;
    gap: 15px;
}

.business-title::before {
    content: '';
    display: inline-block;
    width: 32px;
    height: 32px;
    background: url('../image/common/white_pen_icon.svg') no-repeat center center;
    background-size: contain;
    transform: translateY(5px) scaleY(0.8);
}

.business-title img {
    height: 43px;
    width: auto;
}

.business-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border: 1px solid var(--white);
    border-radius: 50%;
    font-size: 10px;
    text-align: center;
    line-height: 1.4;
    background: var(--navy-original);
}

.business-description {
    margin-bottom: 30px;
    line-height: 1.8;
}

.business-gallery-wrapper {
    position: relative;
}

.business-gallery {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-left: 10%;
    padding-right: 90%;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
}

.business-gallery::-webkit-scrollbar {
    display: none;
}

/* ドラッグ中のスタイル */
.business-gallery.dragging {
    scroll-behavior: auto;
    scroll-snap-type: none;
    user-select: none;
}

.business-gallery.dragging * {
    pointer-events: none;
}

@media (min-width: 769px) {
    .btob-btoc-section::before {
        background: var(--navy);
    }
    .btob-btoc-section::after {
        background: var(--navy);
    }
}

/* Solution Section */
.solution-section {
    padding: 80px 20px;
    background: transparent;
    position: relative;
    overflow: hidden;
}

.solution-container {
    margin-left: 10%;
    margin-right: 8%;
}

.solution-container h2 img {
    height: 125px;
    width: auto;
}

.solution-section h2 {
    margin-bottom: 30px;
}

.solution-intro {
    margin-bottom: 60px;
    line-height: 1.8;
}

.solution-diagram {
    margin: 0 0 60px;
    text-align: center;
    font-size: 18px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.solution-items {
    display: flex;
    flex-direction: column;
    gap: 60px;
    margin: 0 0 0 0;
}

.solution-item {
    display: flex;
    gap: 80px;
    align-items: flex-start;
    margin-bottom: 60px;
}

.solution-item:last-child {
    margin-bottom: 0;
}

#solution-mansion {
    align-items: center;
}

/* PC版: solution-mansionの子要素の順序を調整 */
@media (min-width: 769px) {
    #solution-mansion .solution-item-image {
        order: 2;
    }

    #solution-mansion .solution-item-content {
        order: 1;
        width: 38%;
    }
}

.solution-item-image {
    position: relative;
    width: calc(65% - 80px);
    flex-shrink: 0;
}

.solution-item-image img {
    width: 100%;
    height: auto;
    display: block;
}

#solution-mansion .solution-item-image {
    display: flex;
    align-items: flex-start;
    position: relative;
    min-height: 500px;
}

.solution-image-blueprint {
    width: 50%;
    height: auto;
    z-index: 2;
    flex-shrink: 0;
    margin-right: -12.5%;
    margin-top: 25%;
}

.solution-image-blueprint img {
    width: 100%;
    height: auto;
    display: block;
}

.solution-image-photo {
    width: 62.5%;
    height: auto;
    flex-shrink: 0;
    z-index: 3;
}

.solution-image-photo img {
    width: 100%;
    height: auto;
    display: block;
}

.solution-item-content {
    width: calc(35%);
    flex-shrink: 0;
}

#solution-business {
    align-items: flex-start;
}

/* font-size は style.css の .SubSection-title で定義 */
.solution-item-title {
    /* font-size: 42px; */
    font-family: "Roboto Condensed", sans-serif;
    font-optical-sizing: auto;
    font-weight: 700;
    /* font-weight: bold; */
    color: var(--navy);
    transform: scaleX(0.93) scaleY(1.25);
    transform-origin: left center;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
}

.solution-item-title::before {
    content: '';
    display: inline-block;
    width: 32px;
    height: 32px;
    background: url('../image/common/navy_pen_icon.svg') no-repeat center center;
    background-size: contain;
    transform: translateY(5px) scaleY(0.8);
}

.solution-item-description-sub {
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--gray-dark);
}

.solution-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.solution-tag {
    padding: 5px 15px;
    border: 1px solid var(--navy);
    border-radius: 15px;
    font-size: 12px;
}

@media (min-width: 769px) {
    .solution-diagram {
        max-width: 80%;
    }
}

@media (max-width: 768px) {
    .solution-item-content {
        width: 100%;
        flex-shrink: 0;
    }
}

/* Company Data Section */
.company-section {
    padding: 0;
    color: var(--white);
}

.company-header {
    background: var(--white);
    padding: 40px 20px 0;
    text-align: left;
    padding-left: 10%;
}

.company-header h2 {
    margin: 0;
    margin-bottom: -10px;
}

.company-header h2 img {
    height: 115px;
    width: auto;
}

.company-content {
    max-width: 100%;
    margin-top: -2px;
    padding: 220px 0%;
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

.company-content-container {
    margin-left: 10%;
    margin-right: 8%;
}

.company-content-innercontainer {
    background: var(--navy);
}

.company-image {
    flex: 1;
}

.company-image img {
    width: 100%;
    height: auto;
}

.company-text {
    flex: 1;
}

.company-anniversary-logo {
    margin-bottom: 30px;
}

.company-description {
    /* font-size: 14px; */
    line-height: 1.8;
    margin-bottom: 40px;
}

.company-detail-button {
    display: inline-block;
}

.company-detail-button img {
    width: 100px;
    height: auto;
}

.company-badge-circle {
    width: 100px;
    height: 100px;
    border: 1px solid var(--white);
    border-radius: 50%;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.4;
}

/* Q&A Section */
.qa-section {
    background: #2a4570;
    padding: 138px 0px 264px;
    color: var(--white);
}

.qa-container {
    margin-left: 10%;
    margin-right: 8%;
}

/* font-size は style.css の .SubSection-title で定義 */
.qa-title {
    /* font-size: 42px; */
    font-family: "Roboto Condensed", sans-serif;
    font-optical-sizing: auto;
    font-weight: 700;
    color: var(--white);
    transform: scaleX(0.93) scaleY(1.25);
    transform-origin: left center;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 80px;
}

.qa-title::before {
    content: '';
    display: inline-block;
    width: 32px;
    height: 32px;
    background: url('../image/common/white_pen_icon.svg') no-repeat center center;
    background-size: contain;
    transform: translateY(5px) scaleY(0.8);
}

.qa-list {
    width: calc(100% - 40px);
    margin: 0 0 0 auto;
}

.qa-item {
    border-bottom: 1px dotted rgba(255, 255, 255, 0.3);
}

.qa-header {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qa-header:hover {
    opacity: 0.8;
}

.qa-question {
    /* font-size: 14px; */
}

.qa-icon {
    font-size: 20px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.qa-item.active .qa-icon {
    transform: rotate(180deg);
}

.qa-answer {
    padding: 0px 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.qa-item.active .qa-answer {
    max-height: 500px;
    padding-bottom: 20px;
}

.qa-answer p {
    /* font-size: 14px; */
    /* line-height: 1.8; */
    margin: 0;
    padding-top: 10px;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.1s, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}

.qa-item.active .qa-answer p {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px ){
    .qa-title {

        margin-bottom: 30px;
    }
}

/* Gallery Slide Animation */
.business-gallery-wrapper {
    opacity: 0;
    transform: translateX(100px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.business-gallery-wrapper.slide-in {
    opacity: 1;
    transform: translateX(0);
}



/* Solution Diagram Fade Animation */
.solution-diagram {
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

.solution-diagram.fade-in {
    opacity: 1;
}

/* Solution Business Animation */
#solution-business .solution-item-image {
    opacity: 0;
    transform: translateX(-100px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

#solution-business .solution-item-image.slide-in-left {
    opacity: 1;
    transform: translateX(0);
}

#solution-business .solution-item-content {
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

#solution-business .solution-item-content.fade-in {
    opacity: 1;
}

/* Solution Mansion Animation */
#solution-mansion .solution-item-content {
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

#solution-mansion .solution-item-content.fade-in {
    opacity: 1;
}

#solution-mansion .solution-image-photo {
    opacity: 0;
    transform: translateX(100px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

#solution-mansion .solution-image-photo.slide-in-right {
    opacity: 1;
    transform: translateX(0);
}

#solution-mansion .solution-image-blueprint {
    opacity: 0;
    transform: translateX(-100px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

#solution-mansion .solution-image-blueprint.slide-in-left {
    opacity: 1;
    transform: translateX(0);
}

/* Start Logo */
p.Start_Logo {
    width: 80%;
    max-width: 500px;
    position: absolute;
    top: 50%;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    left: 0;
    right: 0;
    margin: auto;
}

/* ============================================
   RESPONSIVE - TOP PAGE
   ============================================ */
@media (max-width: 768px) {
    .first-view {
        margin-top: 0;
        height: auto;
        min-height: 150vh;
    }

    .first-view-sticky {
        position: relative;
        min-height: 150vh;
    }

    .fix_box {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        z-index: 10;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.5s ease-out;
    }

    .fix_box.show {
        opacity: 1;
    }

    .fix_box .top {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: calc(50vh - 80px);
        background: var(--white);
        border-radius: 0;
    }

    .fix_box .bottom {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: calc(50vh - 80px);
        background: var(--white);
        border-radius: 0;
    }

    .fix_box .left {
        position: fixed;
        top: 0;
        left: 0;
        width: calc(50vw - 80px);
        height: 100%;
        background: var(--white);
        border-radius: 0;
    }

    .fix_box .right {
        position: fixed;
        top: 0;
        right: 0;
        width: calc(50vw - 80px);
        height: 100%;
        background: var(--white);
        border-radius: 0;
    }

    .BackGround {
        padding-bottom: 0;
        position: relative;
        height: auto;
        margin-top: 100vh;
        opacity: 1;
    }

    .BackGround img {
        height: auto;
        max-height: 26vh;
        width: 100%;
        object-fit: cover;
    }

    .fix_text_container {
        position: fixed;
        width: auto;
        bottom: auto !important;
        left: 50%;
        right: auto;
        top: 50%;
        transform: translateX(-50%) translateY(-50%);
        margin: 0;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .fix_text {
        /* font-size: 20px; */
        font-size: 30px;
        line-height: 1.5;
        white-space: nowrap;
    }

    .fix_text br {
        display: block;
    }

    .fix_text span {
         font-size: 28px;
        line-height: 1.5;
    }

    .katsumoto-vertical {
        height: 40vh;
        max-height: 400px;
    }

    .first-view-text-area {
        display: none;
    }

    .service-section,
    .solution-section,
    .company-section,
    .qa-section {
        padding: 60px 0px !important;
    }

    .company-section {
        padding-bottom: 0px !important;
    }

    .service-container,
    .solution-container,
    .company-container,
    .company-content-container,
    .qa-container {
        /* margin-left: 2.5%;
        margin-right: 2.5%; */
        width: calc(90% - 13px);
        margin: 0 auto;
    }

    /* .service-section h2,
    .solution-section h2,
    .company-section h2 {
        transform: translateX(0%);
    } */

    /* .service-section h2 img,
    .solution-section h2 img {
        height: 70px !important;
        width: auto !important;
        max-width: none !important;
    } */

    .service-section h2 {
        font-size: 32px;
        margin-bottom: 20px;
        transform: translateY(-50%);
    }

    .video-placeholder {
        width: 100%;
    }

    .service-main {
        flex-direction: column;
        gap: 30px;
    }

    .service-main-wrapper {

    }

    .service-description {
        font-size: 13px;
        margin-bottom: 30px;
        /* width: 85%; */
    }

    .service-description p:first-child {
        font-size: 16px;
    }

    .service-icons {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
        width: 80%;
        margin: auto;
    }
    .service-section .service-icon {
        gap:0;
    }
    .solution-section,
    .qa-section,
    .company-section,
    .btob-btoc-section {
        overflow-x: hidden;
    }


    .btob-btoc-section {
        margin-left: 0;
        overflow-x: hidden;
    }

    .business-title img {
        height: 43px !important;
        width: auto !important;
        max-width: none !important;
    }

    .business-badge {
        /* margin-left: auto; */
    }

    .business-gallery {
        padding-left: 20px;
        padding-right: calc(100vw - 20px);
    }

    /* .gallery-item {
        width: calc(83.33vw - 16.67px);
        height: 200px;
        max-width: 400px;
    } */

    /* .gallery-nav {
        display: none;
    } */

    .solution-item-image {
        width: 100%;
        height: auto;
        position: relative;
    }

    #solution-business .solution-item-content {
        margin-top: 30px;
    }

    .solution-item {
        flex-direction: column;
    }

    .company-header {
        padding-left: 0;
        padding-right: 0;
        margin-left: 2.5%;
        margin-right: 2.5%;
    }

    .company-header h2 img {
        width: 100%;
        height: auto;
    }

    /* .company-content-container {
        margin-left: 2.5%;
        margin-right: 2.5%;
    } */

    .company-content {
        flex-direction: column;
        padding: 60px 0 0 0;
    }

    .company-text {
        display: flex;
        gap: 15px;
        align-items: flex-start;
        padding: 20px 0 60px 0;
    }

    .company-text-left {
        flex: 1 1 60%;
        min-width: 0;
    }

    .company-anniversary-logo {
        margin-bottom: 15px;
    }

    .company-anniversary-logo img {
        max-width: 100%;
        height: auto !important;
    }

    .company-description {
        /* font-size: 12px !important; */
        margin-bottom: 0 !important;
        margin-top: 30px;
    }

    .company-detail-button {
        flex: 4;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        min-width: 0;
    }

    .company-detail-button img {
        width: 80px;
        height: auto;
    }

    .company-badge-circle {
        width: 80px !important;
        height: 80px !important;
        font-size: 10px !important;
    }
    .qa-header {
        padding-left: 0;
        padding-right: 0;
    }
    .qa-list {
        width: 100%;
    }

    
}
