/******************************************/
/********** Style sheet for       *********/
/********** Core Competency pages *********/
/********** accordion-top/tab-button ******/
/******************************************/
/******************************************/


        /* hero-background部分 */
        .hero-background{
            /* background-image:url('/src/images/backg/cc-bg12.png'),url('/src/images/top-images/MP541cutimage.png');
            background-size: 100% 50%,100% 100%;
            background-repeat: no-repeat,no-repeat;
            background-position: center top 5rem,top -165px right -80px; */
            background: #fff url('/src/images/nw_contents/corecompetency/cc-bg12.png') top 0.5rem center/100% 70% no-repeat;
        }

        /* バナー画像 (PC) */
        .core-banner {
            width: 100%;
            position: relative;
            z-index: 1;
        }        
        .core-banner img {
            width: 100%;
            height: auto;
            display: block;
        }

        /* バナー画像 (smart-phone) */
        .core-banner-sm {
            display:none;
            width: 100%;
            position: relative;
            z-index: 1;
            justify-content: center;
        }        
        .core-banner-sm img {
            width: 100%;
            height: auto;
            display: block;            
        }

        /* アコーディオンパネル */
        #accordionPanel-top {
            position: absolute;
            top: -70px;
            left: 7.5%;
            margin-left: 0;
            width: 85%;
            max-width: 1300px;
            padding: 3rem 3.5rem 3.5rem 3.5rem;
            z-index: 200;
            transition: all 0.3s ease;
            border: 1px solid transparent;
        }

        /* 展開時の背景変更 */
        #accordionPanel-top.expanded {
            background: #fff url('/src/images/backg/cc-bg6.png') center top / 100% 100% no-repeat ;
            min-height: 400px;
            max-height: 80vh;
            border-radius:20px;
            border:1px solid white;
            transition: all 0.8s ease-in;
            z-index: 10002;         
        }

        .accordion-content-wrapper-top{
            height: 60vh;
            overflow-y: auto;
            padding-right: 35px; /* スクロールバー用の余白を追加 */
            margin-right: -35px; /* コンテナ幅を維持 */    
        }
        .cc-main-title {
            border-radius: 10px;
            background-color: rgba(255,255,255,0.7);
            padding: 5px 0px 0px 0px;

        }

        /* H1タイトルのスタイル - Read moreリンク含む */
        .cc-main-title h1{
            font-size: 1.4rem; /* 初期サイズ（ちら見せ用） */
            font-weight: 700;
            color: #1a1a1a;
            margin: 0 0 15px 0;
            line-height: 1.2;
            letter-spacing: -0.02em;
            padding-bottom: 3px;
            transition: font-size 0.6s cubic-bezier(0.4, 0, 0.2, 1);
            transform-origin: left top;
            font-family: Georgia, 'Times New Roman', serif;
            align-items: baseline;
            gap: 10px;
            display: inline-block;    /* 文字数に合わせて幅調整 */
            border-bottom: 8px solid #e73cc5;  /* 赤ライン */
            margin-bottom: -2px; /* <br/>による余分なスペースを相殺 */
            min-width: 100%;
            box-sizing: border-box;
        }
        /* Line-break at PC media */
        .line-break-desktop::before {
            content: "\A"; /* Line break character */
            white-space: pre; /* Preserve the line break */
        }

        .cc-main-title h1 .readmore-toggle {
            white-space: nowrap; /* Prevent the link text from wrapping */
            margin-left: 8px; /* Add some space before the link */
        }

        /* Accordion展開時のH1タイトル */
        #accordionPanel-top.expanded .cc-main-title h1,
        #accordionPanel.expanded .cc-main-title h1
         {
            font-size: 1.8rem; /* 展開時のサイズ */
            margin-bottom: 25px;
            padding-bottom: 8px;
            animation: titleExpand 0.8s cubic-bezier(0.4, 0, 0.2, 1);
            margin-bottom: -3px; /* 展開時も<br/>スペースを相殺 */
        }

        /* 展開時のH1タイトルスタイル */
        #accordionPanel-top.expanded .cc-main-title {
            margin-bottom: 25px;
        }

        #accordionPanel-top.expanded .cc-main-title .readmore-toggle {
            font-size: 1.1rem;
            margin-top: 4px; /* 展開時も<br/>スペースを相殺 */
        }

        .cc-main-title .readmore-toggle {
            display: inline;
            color: #e74c3c;
            font-weight: bold;
            text-decoration: none;
            font-size: 1.0rem;
            cursor: pointer;
            transition: color 0.3s ease;
            margin-top: 2px; /* マイナスマージンで<br/>のスペースを相殺 */
            line-height: 1.0;    /* 行間も最小に設定 */        
        }

        .accordion-header {
            display: flex;
            justify-content: left;
            align-items: left;
            margin-bottom: 1rem;
            gap: 20px;
        }

        .accordion-header h2 {
            font-size: 1.8rem;
            font-weight: bold;
            color: #2c3e50;
            margin: 0;
            flex-shrink: 1;
        }

        .readmore-toggle {
            color: #e74c3c;
            font-weight: bold;
            text-decoration: none;
            font-size: 1.1rem;
            cursor: pointer;
            transition: color 0.3s ease;
            margin-top:0.5rem;
        }

        .readmore-toggle:hover {
            color: #c0392b;
            text-decoration: none;
        }

        .accordion-visible {
            color: #34495e;
            font-size: 1.1rem;
            line-height: 1.0;
            margin-top: 1.0rem;
            padding-top: 0;
            text-align:left;
        }

        .accordion-hidden {
            display: none;
            margin-top: 1rem;
            padding-top: 0.5rem;
            color: #2c3e50;
            font-family: Georgia, 'Times New Roman', serif;
            line-height: 1.2;/* 1.65 */
            font-size: 1.1rem;
            text-align:justify;
        }

        .accordion-hidden h4 {
            font-family: Arial, sans-serif;
            font-weight: 600;
            color: #1a1a1a;
            margin: 20px 0 8px 0;
        }

        .closing-note {
            margin-top: 20px;
            padding-top: 15px;
            border-top: 1px solid #ddd;
            font-style: italic;
            color: #666;
            text-align: center;
        }

        .accordion-close-btn {
            position: absolute;
            top: -5px;
            right: 15px;
            background: none;
            border: none;
            font-size: 3rem;
            cursor: pointer;
            color: #000;
            z-index: 10;
        }

        .accordion-close-btn:hover {
            color: #333;
        }

        .accordion-spacer{
            height: 2rem;
        }

        .accordion-hidden:first-of-type {
            padding-top: 50px; /* 調整値：例 2rem（必要に応じて調整） */
        }

        .accordion-hidden ul {
            margin: 0;
            padding-left: 1.5rem;
        }

        .accordion-hidden li {
            margin-bottom: 0.8rem;
            line-height: 1.6;
        }

        .accordion-hidden li strong {
            color: #e74c3c;
        }

        #accordionPanel-top.expanded .accordion-hidden {
            display: block;
            animation: slideDown 0.3s ease;
        }

        @keyframes slideDown {
            from {
                opacity: 0;
                transform: translateY(-20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* タブセクション */
        .tabs-container {
            margin-top: 70px;
            position: relative;
            z-index: 500;            
        }


        .nav-tabs {
            border: none;
            justify-content: center;            
        }

        .nav-tabs .nav-item {
            margin: 0 1rem;
            text-align:center;
            width: 22vw;
            height: 60px;
        }

        .nav-tabs .nav-link {
            border-top: 3px solid #47388C;
            border-right: 3px solid #47388C;
            border-left: 3px solid #47388C;
            border-top-left-radius: 25px;
            border-top-right-radius: 25px;
            border-bottom-left-radius: 0px;
            border-bottom-right-radius: 0px;
            padding: 12px 15px;
            font-weight: bold;
            font-size: 1.1rem;
            color: #fff;
            background: #47388C;
            text-decoration: none;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            line-height: 1.2rem;
        }

        .nav-tabs .nav-link:hover {
            background: #3498db;
            color: #fff;
            transform: translateY(0px);
            box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
        }

        .nav-tabs .nav-link.active {
            /*background: linear-gradient(135deg, #3498db, #2980b9);*/
            background-color:#ffffff !important;
            color: #2980b9;
            border-color: #2980b9;
            box-shadow: 0 5px 20px rgba(52, 152, 219, 0.4);
        }

        .nav-tabs .nav-link::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
            transition: left 0.5s;
        }

        .nav-tabs .nav-link:hover::before {
            left: 100%;
        }

        .nav-link{
            width: 100%;
            height: 80px;
        }

        /* ホバー画像のスタイル */
        .tab-hover-images {
            position: relative;
            width: 100%;
            height: 0;
            z-index: 1001; /* 親コンテナのz-indexを高く設定 */
        }

        /* ホバー画像のスタイル */
        .tab-hover-image {
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            width: 180px;
            height: auto;
            display: none;
            z-index: 400;
            border-radius: 10px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
            opacity: 0;
            transform: translateY(-30px); /* 初期状態：上に30px移動 */
            transition: all 0.4s ease-out; /* スムーズなアニメーション */

        }

        /* アニメーション表示状態 */
        .tab-hover-image.show {
            opacity: 1;
            transform: translateY(0); /* 最終状態：元の位置 */
        }

        #hover-image-1,#hover-image-2,#hover-image-3{
            z-index: 1003;
        }


        @media (min-width:300px) and (max-width: 576px) {
            .cc-main-title h1{
                font-size: 1.0rem; /* 初期サイズ（ちら見せ用） */
            }
            #accordionPanel-top.expanded .cc-main-title h1 {
            font-size: 1.1rem; /* 展開時のサイズ */
            }

            .hero-background{
                background-size:100% 100%;
            }
            .core-banner{
                display:none;
            }
            .core-banner-sm{
                display:flex;
            }
            #accordionPanel-top {
                padding: 1.2rem;
                top: 0px;
            }    
            .tabs-container {
                margin-top: 150px;
            }

            .nav-tabs {
                flex-direction: column;
                align-items: center;
            }

            .nav-tabs .nav-item {
                margin: 0.5rem 0;
                width: 100%;
                text-align: center;
            }

            .nav-tabs .nav-link {
                width: 100%;
                text-align: center;
            }

            .tab-hover-image {
                width: 150px; /* モバイルでは少し小さく */
            }
        }




        /* レスポンシブ対応 */
        @media (max-width: 649px) {
            .cc-main-title {
                width: 100%;
                max-width: 100%;
                margin: 0;
                padding: 0;
            }
            
            .cc-main-title h1 {
                width: 100%;
                max-width: 100%;
                display: block !important;
                min-width: 100%;
                box-sizing: border-box;
                word-wrap: break-word;
                overflow-wrap: break-word;
            }
            .line-break-desktop::before {
                content: " "; /* Just a space instead of line break */
            }
    
            .line-break-desktop {
                margin-left: 0; /* Remove indentation on mobile */
            }
            
            /* Ensure the parent container also takes full width */
            #accordionPanel-top {
                width: 100%;
                left: 0;
                right: 0;
                margin-left: 0;
                margin-right: 0;
                padding-left: 1rem;
                padding-right: 1rem;
            }
        }

        @media (min-width:577px) and (max-width: 768px) {
            .cc-main-title h1{
                font-size: 1.1rem; /* 初期サイズ（ちら見せ用） */
            }

            .hero-background{
                background-size: 100% 100%;
            }
            #accordionPanel-top {
                
                padding: 1.8rem;
                top: -25px;
            }

            .accordion-header h2 {
                font-size: 1.4rem;
            }

            .nav-tabs .nav-item {
                margin: 0.5rem;
            }

            .nav-tabs .nav-link {
                padding: 10px 10px;
                font-size: 1rem;
            }

            .tabs-container {
                margin-top: 100px;
            }
        }

        @media (min-width:769px) and (max-width:1053px){
            .cc-main-title h1{
                font-size: 1.2rem; /* 初期サイズ（ちら見せ用） */
            }

            .hero-background{
                background-size: 100% 100%;
            }

            #accordionPanel-top {
                top:-40px;
            }
            .tabs-container {
                margin-top: 90px;
            }        
        }