
/* フロントページ_の画面幅が1200ピクセル以下の場合にスタイルを適用する条件 */
@media screen and ( max-width:1200px){






    .company .bottom_carousel .bottom_scroll li {
        flex: 0 0 200px;
    }

    .company #section3::before {
        bottom: 0;
        background-size: cover;
    }

    .company #section4 .inner_contents {
        align-items: end;
    }

    .company .section4 .image_box_wrapper {
        flex: 0 0 40%;
    }

    .company .section4 .image_box img {
        transform: translateX(-5em);
    }

    .company #section4 .text_contents {
        padding-left: 0;
    }

    .company .section4 .image_box .nema_box {
        padding: 0.75em;
    }




    .company .section7 .link_box {
        margin: 18em 3em 0 3em;
    }

    .company .section7 .csr_thumbnail {
        width: 100px;
        right: -0.5em;
        bottom: -2.5em;
    }
   




  
}

/* 画面幅が1000ピクセル以下の場合にスタイルを適用する条件 */
@media screen and ( max-width:1000px){

    .company .inner_contents{
        width: 100%;
    }

    .company #section2 {
        padding: 3em;
    }

    .company .section2 .company_name_first {
        margin-top: 1em !important;
    }

    


    .company #section6 .tab_btn_wrapper .inner_contents {
        max-width: unset;
    }





}




/* 画面幅が900ピクセル以下の場合にスタイルを適用する条件 */
@media screen and ( max-width:900px){

    /* ********************************** 会社概要_文字大きさ ********************************** */
    .company .company_font_4em{
        font-size: 57.5px;
    }

    .company .company_font_3em{
        font-size: 43px;
    }

    .company .company_font_2ten5em{
        font-size: 36px;
    }

    .company .company_font_1ten5em{
        font-size: 21.5px;
    }

    .company .company_font_2em{
        font-size: 29px;
    }

    .company .inner_contents{
        width: 90%;
    }

    .company #section1,
    .company #section2,
    .company #section3,
    .company #section5,
    .company #section6,
    .company #section7,
    .company #section8{
        width: 100vw;
        overflow: hidden;
    }



    .company .top_header > li:nth-child(2) {
        width: 100%;
        top: 1.5em;
    }


    .company .header_btn_wrapper {
        margin: 0 auto;
    }
    

    .company .header_btn_wrapper > li {
        margin-right: 2em;
    }
    

    .company .header_btn_wrapper > li:last-of-type{
        display: none;
    }




    .company #section1 .ttl {
        margin: 0.5em 0 1em 0;
        color: var(--accentcolor);
    }


    .company #section1 .ttl span{
        display: none;
    }

    .company #section1 .ttl br{
        display: block;
    }

    .company #section1 .ttl .equal{
        display: block;
        transform: rotate(90deg);
        padding: 0.2em 0;
    }

    .company #section1 .text {
        line-height: 2em;
        padding: 0 1em;
        text-align: left;
    }

    .company #section1 .text br{
        display: none;
    }

    .company #section1 .animation_box {
        margin: 3em auto;
    }

    .company #section1 .bottom_carousel_swiper .swiper-slide{
        width: calc(100vw / 3) !important;
    }


    .company #section2 {
        padding: 3.5em 0;
    }

    .company .section2 .company_profile_table th {
        width: calc();
        min-width: 120px;
    }

    .company .section2 .company_profile_table th,
    .company .section2 .company_profile_table td {
        border-bottom: 1px solid #ccc;
    }
    
    .company .section2 .tab_contents_box.tab1 {
        padding: 2em;
    }

    .company .section2 #close-chart_modal {
        right: unset;
        left: -1em;
    }


    .company .section3 .text_cloud {
        top: unset;
        transform: unset;
        bottom: 20%;
    }



    

    .company .section4 .inner_contents,
    .company #section6 .inner_contents{
        width: 100%;
    }

    .company .section5 .business_list {
        display: block;
    }

    .company .section5 .business_list > li:first-of-type{
        margin-bottom: 3em;
    }

    .company .section5 .business_list > li:last-of-type{
        padding-bottom: 4em;
    }

    .company .section5 .business_list_box {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }








    

    .company .section6 .tab_btn_wrapper {
        background-color: black;
        padding-top: 2em;
    }

    .company .section6 .section_ttl_boarder {
        display: none;
    }

    .company .section6 .tab_btn_wrapper .section_ttl p {
        padding-bottom: 1em;
    }

 

    .company .section6 .history_wrapper > li:nth-child(odd) .history_list,
    .company .section6 .history_wrapper > li:nth-child(even) .history_list {
        padding-left: 2em;
        padding-right: 2em;
    }

    .company .section6 .history_wrapper::before {
        top: 0 !important;
        left: 2.8em;
    }

    .company .section6 .tab_contents_box.tab2 .tab_menu {
        padding: 1em 0;
    }

    .company .section6 .history_wrapper .tabB_message{
        font-size: 1.5em;
        background-color: var(--maincolor);
        color: white;
        margin-top: unset;
        text-align: left;
        padding: 2em;
    }

    .company .section6 .history_wrapper .tabB_message br{
        display: none;
    }

    /* 代表作（tab2_b）：1行3列レイアウト */
    .company .section6 #tab2_b_content .history_list{
        padding: 2.4em 2em;
    }

    


    

    .company .section7 .csr_wrapper {
        padding-top: 3em;
    }

    .company .section7 .csr_figure{
        width: 90%;
        max-width: 600px;
    }

    .company .section7 .csr_list {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        gap: 2em;
        padding: 4em 3em 3em 3em;
        max-width: 1200px;
        margin: 0 auto;
    }

    .company .section7 .earth {
        top: -14em;
        width: 70%;
    }

    .company .section7 .csr_thumbnail {
        width: 80px;
        right: -1em;
        bottom: -2em;
    }

    .company .section7 .link_title{
        border: 6px solid #437235;
        position: unset;
        transform: unset;
    }

    .company .section7 .link_box {
        border-radius: 2em;
        border: 6px solid #437235;
        padding: 2em;
    }


    















}















/* 画面幅が600ピクセル以下の場合にスタイルを適用する条件 */
@media screen and ( max-width:600px){

    .company .inner_contents {
        width: 90%;
    }




    




    .company .slide-grid{
        grid-template-columns: 1fr;
    }

    .company .slide-grid li:nth-child(n+3){
        display: none;
    }

    .company .pv_contents video {
        width: 85%;
    }




    



    .company .dot-menu-button {
        border-radius: 25%;
    }

    .company .dot-menu-panel .dot-menu-header-wrapper {
        padding: 1em;
    }

    .company .dot-menu-panel .dot-menu-header-wrapper li:nth-child(2){
        margin-left: 0;
    }

    .company .dot-menu-panel .dot-menu-header-wrapper .logo {
        width: 100%;
        max-width: 150px;
        padding: 0.5em;
    }




   .company .top_header{
        position: fixed;
        bottom: 0;
        z-index: 3;

        width: auto;
        background-color: rgba(231, 176, 0, 0.9);
    }

    .company .header_btn_wrapper {
        width: 100%;              /* fit-content をやめる */
        align-items: stretch;   /* 全liの高さを揃える */
        justify-content: center;   /* ← これを追加 */
    }

    .company .header_btn_wrapper li {
        display: flex;          /* 中の a を高さ100% にしやすくする */
        flex: 1;
    }

    .company .top_header > li:nth-child(2) {
        position: unset;
        transform: unset;
        width: 100vw;
    }

    .company .header_btn_wrapper .link_btn{
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0; /* JAとENの間隔 */
    }


    .company .header_btn_wrapper > li {
        margin-right: unset;
    }

    .company .header_btn_wrapper li a{
        width: 100%;
        padding: 1em 2em 0.75em 2em;
        display: flex;               /* block → flex */
        align-items: center;         /* 上下中央 */
        justify-content: center;     /* 左右も中央（不要なら消す） */
        border-right: 1px solid #fff;
        height: 100%;                /* li の高さに追従 */
    }

    .company .header_btn_wrapper > li:nth-child(4) a{
        border-right: none;
    }

    .company .link_btn .ja {
        color: yellow;
    }

    .company .header_btn_wrapper li br{
        display: block;
    }

    .company .return_btn{
        display: none;
    }

    .company #page-top {
        bottom: 4.5em;
        right: 3%;
    }

    .company #page-top a {
        width: 100px;
    }

    .company .dot-menu-wrapper {
        right: 1em;
        top: 1em;
    }

    .company .top_header > li:nth-child(3) {
        display: none;
    }






    .company #section1 .ttl {
        margin: 0.5em 0;
    }

    .company #section1 .text {
        padding: 0;
        font-size: 1.1em;
    }

    .company #section1 .animation_box {
        margin: 1.5em auto 3em auto;
    }




    /* 白目 */
    .company .eye {
        width: 10%;
        height: 20%;
    }

    /* 黒目 */
    .company .pupil {
        width: 60%;
        height: 60%;
        top: 60%;
    }

    .company .section2 .tab_contents_box.tab1 {
        padding: 1.5em;
    }

    .company .section2 .tab_contents_box.tab1 .tab_menu {
        padding: 0.75em 0 1.5em 0;
    }

    .company .section2 .company_chart_box {
        width: 90vw;
        height: auto;
        padding: 1em;
    }

     .company #section3 {
        min-height: 600px;
        margin-bottom: 4em;
    }

    .company .section3 .text_cloud::before {
        inset: -50px;
    }


    .company #section3::before {
        background-position: -150px 0;
        background-size: 230%;
        min-height: 900px;
    }

   
    .company .section3 .wave_lines{
        display: none;
    }

    .company .section3 .text_cloud {
        padding: 0em;
    }

    .company .section3 .text_cloud {
        left: 50%;
        transform: translateX(-50%);
        top: 40%;
        width: 80%;
    }

    .company .section3 .corporate_message .ttl br{
        display: block;
    }

   .company .section3 .corporate_message .txt{
        line-height: 2em;
        text-align: left;
    }

    .company .section3 .corporate_message .txt br{
        display: none;
    }

   .company #section4 .inner_contents{
        flex-direction: column;  /* ← 縦に並ぶ */
        margin-top: 4em;
   }

   .company .section4 .image_box_wrapper{
        order: 1;
    }

    .company #section4 .text_contents {
        padding: 2em;
    }

    .company .section4 .image_box img {
        width: 60%;
        transform: translateX(40%) scaleX(-1);
    }

    .company .section4 .image_box .nema_box{
        left: 1.5em;
        bottom: -0.5em;
        transform: unset;
        padding-bottom: 1em;
        border: 1px solid var(--maincolor);
        background-color: rgba(255, 255, 255, 0.7);
    }








    .company #section5 {
        padding: 3em 0 0 0;
    }

    .company .section5 .movie_box {
        border: 4px solid white;
        margin-bottom: 3em;
    }

    .company .section5 .movie_box .play-button {
        width: 80px;
        height: 80px;
        border: 4px solid white;
    }

    .company .section5 .movie_box .play-button::before {
        border-left: 30px solid white;
        border-top: 17px solid transparent;
        border-bottom: 17px solid transparent;
    }
    

    .company .section5 .business_list > li:first-of-type {
        margin-bottom: 2em;
    }

    .company .section5 .business_list > li:last-of-type {
        padding-bottom: 2em;
    }

    .company .section5 .business_list_box {
        border: 4px solid #eca52b;
        max-width: none;
    }

    .company .section5 .montagna {
        border: 4px solid #34906a;
    }

    .company .section6 .tab_btn_wrapper {
        padding-top: 1.5em;
    }

    .company .section6 .tab_btn_wrapper .section_ttl p {
        padding-bottom: 0.75em;
    }










    .company .section6 .tab_contents_box.tab2 .tab_menu {
        padding: 0.5em 0 0.6em 0;
        font-size: 1.75em;
    }

    .company .section6 .tab_contents_box.tab2 .tab_menu span{
        display: none;
    }

    .company .section6 .history_wrapper::before,
    .company .section6 #tab2_b_content .history_wrapper::before {
        left: 2.5em;
        top: 3.5em;
        bottom: 2em;
    }

    .company .section6 #tab2_b_content .history_wrapper::before{
        top: 0;
        bottom: 0;
    }

    .company .section6 .history_list > li:nth-child(1) {
        font-size: 1.25em;
    }

    .company .section6 .history_list {
        grid-template-columns: 100px 1fr;  /* 2列：画像 / 本文 */
        padding: 1.5em 0;
    }


    .company .section6 .history_list > li:nth-child(2) br{
        display: none;
    }

    .company .section6 #tab2_b_content .history_wrapper .toku_syoukai {
        display: block;
        margin-top: 2em;
        text-align: -webkit-center;
    }

    .company .section6 #tab2_b_content .history_wrapper .toku_syoukai > li:first-of-type {
        width: fit-content;
    }

    .company .section6 #tab2_b_content .history_wrapper > li:last-of-type .history_list {
        display: block;
        height: 450px;
        padding: unset;
    }

    .company .section6 #tab2_b_content .history_wrapper > li:last-of-type .history_list > li:nth-child(2),
    .company .section6 #tab2_b_content .history_wrapper > li:last-of-type .history_list > li:nth-child(3){
        margin-left: 1em;
    }

    .company .section6 #tab2_b_content .history_wrapper > li:last-of-type .history_list br{
        display: block;
    }










    .company .section6 .tabB_message {
        font-size: 1.75em;
        text-align: left;
        padding: 1em 1em 1em 2.75em;
        background-color: antiquewhite;
    }

    .company .section6 .tabB_message br{
        display: none;
    }

    .company .section6 #tab2_b_content .history_list {
        grid-template-columns: minmax(8em, auto) 1fr;
        column-gap: unset;
        padding-top: 0;
        padding-left: 0;
    }

    .company .section6 #tab2_b_content .history_list > li{
        width: 100%;
    }

    .company .section6 #tab2_b_content .history_list > li:nth-child(1)::before {
        display: none;
    }

    /* 1つ目のli（日付）を1段目で全幅に */
    .company .section6 #tab2_b_content .history_list > li:nth-child(1){
        grid-column: 1 / -1;
        grid-row: 1;
        background-color: var(--maincolor);
        color: white;
        width: fit-content;
        padding: 0.75em 2em 0.75em 2em;
        border-radius: 0 2em 2em 0;
        margin-top: 2em;
    }

    /* 3つ目（本文）を2段目 右 */
    .company .section6 #tab2_b_content .history_list > li:nth-child(3){
        grid-column: 1;
        grid-row: 2;
        padding: 1em;
        margin-left: 4em;
        width: 80%;
    }

    /* 2つ目（画像）を3段目に変更 左 */
    .company .section6 #tab2_b_content .history_list > li:nth-child(2){
        grid-column: 1;
        grid-row: 3;
        margin: 0 auto 0 5em;
        width: 70%;
        border-radius: 2em;
    }

    .company .section6 #tab2_b_content .history_list > li:nth-child(2) img {
        height: 90%;
        width: auto;
        object-fit: contain;
    }

    .company .section6 #tab2_b_content .history_list .castella_img_box img {
        height: 60% !important;
    }

    .company .section6 #tab2_b_content .history_wrapper .toku_syoukai > li:first-of-type {
        margin-bottom: 1em;
    }

    .company .section6 #tab2_b_content .babyCastella img{
        height: 60% !important;
    }

    .company .section6 .history_list .img7 {
        max-width: unset !important;
    }

    .company .section6 .img_container img {
        width: 80px;
        left: 48%;
        top: -30px;
    }

















    .company .section7 .csr_list {
        padding: 2em;
    }

    .company .section7 .link_box {
        margin: 16em 2em 2em 2em;
        border: unset;
        border-radius: unset;
        border: unset;
        padding: unset;
    }

    .company .section7 .link_title{
        padding: 0.5em;
        border-radius: 1em;
        border: unset;
        margin-bottom: 1.5em;
    }

    .company .section7 .link_title br{
        display: block;
    }

    .company .section7 .csr_thumbnail{
        display: none;
    }

    .company .section8 .link_list_title {
        margin-top: 0;
    }

    .company .section7 .csr_list .csr_imageBox {
        padding: 2em 2em 1em 2em;
        max-width: 400px;
        margin: 0 auto;
    }

    .company .section7 .csr_list .csr_text{
        max-width: 400px;
        margin: 1em auto 0 auto;
    }

    .company .section8 .link_list {
        gap: 1em;
        padding: 1em;
    }

    .company .section8 .company_copyright {
        padding-bottom: 7.5em;
    }

    .company .section8 .company_copyright br{
        display: block;
    }

    .company .section8 .company_copyright span{
        display: none;
    }




    














}









/* 画面幅が400ピクセル以下の場合にスタイルを適用する条件 */
@media screen and ( max-width:400px){
    
    /* ********************************** 会社概要_文字大きさ ********************************** */
    .company .company_font_4em{
        font-size: 52px;
    }

    .company .company_font_3em{
        font-size: 38px;
    }

    .company .company_font_2ten5em{
        font-size: 32px;
    }

    .company .company_font_2em{
        font-size: 25px;
    }

    .company .company_font_1ten5em{
        font-size: 19px;
    }








    .company .header_btn_wrapper li a {
        padding: 0.75em 0;
    }

    .company .header_btn_wrapper .en {
        padding-bottom: 0.25em;
    }

    .company .dot-menu-panel .dot-menu-header-wrapper .logo {
        width: 90%;
    }

    .company .dot-menu-panel .dot-menu-header-wrapper > li:nth-child(2){
        width: 50%;
    }

    .company .dot-menu-panel .dot-menu-header-wrapper #dot-menu-close-btn {
        width: 2.5em;
        height: 2.5em;
        border-radius: 0.5em;
    }
    .company .dot-menu-panel .dot-menu-header-wrapper .language_box .selected {
        padding: 0.5em;
    }









    .company .section2 .company_profile_table th,
    .company .section2 .company_profile_table td{
        display: block;
    }

    .company .section2 .company_profile_table th{
        border: unset;
        padding: 1em 0 0 0;
        font-size: 0.8em;
        font-weight: 500;
    }

    .company .section2 .company_profile_table td{
        padding: 0 0 1em 0;
    }







    .company .section7 .csr_list .csr_imageBox {
        padding: 1em;
    }












    














}







