/* ============================================
   POWER TRAIN - メインスタイルシート
   Bootstrap 5.3.0 ベース
   ============================================ */

/* ============================================
   メインビジュアル（ヒーローセクション）
   ============================================ */

#hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: auto;
    background-color: #f5f5f5;
    text-align: center;
    background: url(../../images/top-mv-bg-gd.png) repeat-x bottom left;
    background-size: cover;
    position: relative;
    overflow: hidden; /* はみ出し対策 */
}

#hero-section .hero-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #333;
}

/* #hero-section::before, */
.hero-floating-object {
    content: "";
    display: block;
    position: absolute;
    left: -150px;
    bottom: -100px;
    z-index: 0;
    width: 100%;
    height: 100%;
    background: url(../../images/top-mv-bg-gear@2x.png) no-repeat;
    background-position: left bottom;
    background-size: contain;
    opacity: .65;
    animation: infinityMove 22s ease-in-out infinite;
}

/* 8の字（∞）モーションの定義 */
@keyframes infinityMove {
    0% {
    transform: translate(0, 0);
    }
    25% {
    transform: translate(40px, 20px);
    }
    50% {
    transform: translate(0px, 40px);
    }
    75% {
    transform: translate(-40px, 20px);
    }
    100% {
    transform: translate(0, 0);
    }
}

/* ヒーロー内の本体コンテンツは上に重ねる */
#hero-section > * > * {
    position: relative;
    z-index: 1;
}

/* 背景：ごく薄いグラデ + 角のシャドウ感 */
.hero {
    background: radial-gradient(1200px 600px at 20% 10%, #ffffff 0%, #f7f8f9 50%, #f2f3f5 100%);
    border: 1px solid rgba(0, 0, 0, .06);
}

/* タイトルとサブタイトル */
.hero-title {
    font-size: clamp(2rem, 7vw, 3.2rem);
    /* モバイル～PCで可変 */
    letter-spacing: .06em;
}

.hero-subtitle {
    font-size: clamp(.95rem, 2.5vw, 1.05rem);
}

.hero-subtitle .dash {
    display: inline-block;
    margin: 0 .5rem;
    opacity: .6;
}



/* 右レールの幅バランス */
.right-rail {
    max-width: 420px;
}

/* アンカーリンクの見た目（画像に寄せる：薄い枠＋右山括弧） */
.rail-link {
    border: none !important;
    border-top: 1px solid var(--color-black) !important;
    border-bottom: 1px solid var(--color-black) !important;
    margin-top: -1px;
    background: transparent !important;
    border-radius: 0 !important;
    text-align: left;
    box-shadow: none !important;
}

.rail-link:hover{
    opacity: 0.8;
    border-color: var(--color-black) !important;
}


.link-icon {
    width: 25px;
    height: auto;
    object-fit: contain;
}

.link-label {
    font-weight: 500;
}

.chev {
    font-size: 1.6rem;
    line-height: 1;
    transform: translateY(-1px);
    color: rgba(0, 0, 0, .45);
}

/* CTAボタンは角丸大きめ */
.btn-cta {
    border-radius: .6rem;
}

/* RSSカード */
#rssbox {
    border: none;
    border: 1px solid var(--color-black);
    box-shadow: none;
    margin-top: -1px;
    border-radius: 0;
}
#rssbox .card-header {
    border-bottom: 1px dotted var(--color-black);
    padding: 0 .5rem .8rem;
    margin-bottom: 1rem;
}
#rssbox .card-body {
    padding: 0 .5rem 1rem;
}

.rss-icon {
    max-width: 20%;
    object-fit: contain;
}

.rss-list .rss-item+.rss-item {
    margin-top: .75rem;
}

.rss-title {
    font-size: .95rem;
}

.rss-item {
    margin-bottom: 0.75rem;
    text-align: left;
}

/* モバイル最適化：右カラムの左右余白 */
@media (max-width: 991.98px) {
    .right-rail {
        margin-inline: auto;
        max-width: 520px;
    }

    .hero {
        padding-top: .5rem;
    }
}


.home .section-label {
    position: absolute;
    left: 1%;
    top: 30px;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 22px;
    font-weight: 300;
    letter-spacing: 0.3em;
    color: var(--color-black);
    z-index: 2;
    white-space: nowrap;
}

/* ============================================
   コンセプトセクション
   ============================================ */
   
.concept-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.concept-image img {
    width: 100%;
    border-radius: 12px;
}

/* .concept-image:hover img,
.service-image:hover img,
.team-member:hover img {
    filter: grayscale(0%);
} */

.concept-text{
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ============================================
   サービスセクション
   ============================================ */
.service-section {
    background-color: var(--color-white);
}

.service-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--color-light-gray);
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
    cursor: pointer;
}

/* .service-image:hover {
    transform: translateY(-5px);
} */

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* filter: grayscale(100%); */
    /* transition: filter 0.5s ease, transform 0.5s ease; */
}

/* .service-image:hover img {
    filter: grayscale(0%);
    transform: scale(1.05);
} */

.service-name {
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    color: var(--color-black);
    margin: 0;
}

/* ============================================
   実績・事例セクション
   ============================================ */
.case-section {
    /* background-color: var(--color-light-gray); */
}

.section-title .section-description {
    margin-bottom: 60px;
}

.case-main {
    position: relative;
    margin-bottom: 30px;
}

.case-main-image {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 20px;
    /* filter: grayscale(100%); */
    /* transition: filter 0.5s ease; */
}

/* .case-main:hover .case-main-image {
    filter: grayscale(0%);
} */

.case-main-text {
    padding: 24px;
    background-color: var(--color-white);
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.case-main-text p {
    font-size: 0.9rem;
    line-height: 1.9;
    margin: 0;
    color: var(--color-gray);
}

.case-thumb {
    text-align: center;
    cursor: pointer;

}

/* .case-thumb img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 12px;
    filter: grayscale(100%);
    transition: filter 0.5s ease, transform 0.3s ease;
} */

/* .case-thumb:hover img {
    filter: grayscale(0%);
    transform: scale(1.03);
} */

.case-thumb p {
    font-size: 13px;
    font-weight: 500;
    margin: 0;
}

.case-content {
    margin-bottom: 140px;
}

/* Desktop & Tablet: Align main image bottom with thumbnail cards bottom */
@media (min-width: 768px) {
    /* Make both columns full height */
    .case-section .row {
        flex-direction: row !important;
        align-items: stretch;
    }
    
    /* Push main image to bottom */
    .case-section .case-main {
        margin-top: auto;
        margin-bottom: 0;
    }

    .case-section .case-main-image {
        margin-bottom: 0;
        width: 100%;
    }
    
    /* Keep content at top */
    .case-section .case-content {
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    /* Push thumbnails to bottom to align with main image */
    .case-section .case-thumb {
        margin-top: auto !important;
        justify-content: center !important;
    }
}

/* スマホで2カラム表示（画像右、テキスト左） */
@media (max-width: 767px) {
    p.case-card-description.text-center{
        font-size: 10px;
    }
    .case-section .row {
        flex-direction: row !important;
        /* 横並びを維持 */
    }


    /* タイトルとディスクリプションのサイズ調整 */
    /* .case-section .section-title {
        font-size: 20px;
        margin-bottom: 20px;
    } */

    /* .case-section .section-description {
        font-size: 13px;
        margin-bottom: 20px;
    } */

    /* 画像のサイズ調整 */
    .case-main-image {
        width: 100%;
        margin-bottom: 0;
    }

    .case-content {
        margin-bottom: 60px;
    }
    
    /* .hero-floating-object {
        left: -50px;
        bottom: -0px;
        z-index: 0;
        width: 150%;
        height: 150%;
    } */
}
@media (max-width: 991px) {
    .hero-floating-object {
        left: -50px;
        bottom: 50%;
        z-index: 0;
        width: 110%;
        height: 110%;
    }
}
@media (max-width: 560px) {
    .hero-floating-object {
        left: -50px;
        bottom: 50%;
        z-index: 0;
        width: 150%;
        height: 150%;
    }
    
    /* 画像を右に */
    /* .case-section .col-lg-5 {
        order: 2;
        flex: 0 0 40% !important;
        max-width: 40% !important; 
    } */

    /* テキストを左に */
    /* .case-section .col-lg-7 {
        order: 1;
        flex: 0 0 60% !important;
        max-width: 60% !important;
        margin-top: 30px;
        padding-right: 12px;
    } */
}

/* ============================================
   チーム紹介セクション
   ============================================ */
.team-section {
    /* background-color: #fff;
    padding: 80px 0; */
    position: relative;
}

.team-intro {
    margin-bottom: 40px;
}

/* .team-intro h2 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 600;
    margin-bottom: 1rem;
} */

.team-intro p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 24px;
}

/* View Moreボタンを丸く */
.btn-view-more {
    display: inline-block;
    padding: 0.9rem 36px;
    background-color: #000;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.btn-view-more:hover {
    background-color: #333;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* スライダーコンテナ */
.team-slider-container {
    position: relative;
    padding: 0 60px;
}

.team-slider-wrapper {
    overflow: hidden;
}

.team-slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.team-slide {
    min-width: 33.333%;
    padding: 0 12px;
    box-sizing: border-box;
}

.team-member {
    text-align: center;
}

.team-member img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
    /* filter: grayscale(100%); */
    /* transition: filter 0.5s ease; */
}

/* .team-member:hover img {
    filter: grayscale(0%); it makes the image colorful on hover
} */
/* update of 1/22 for members */
/* .member-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.member-role {
    font-size: 0.85rem;
    color: #666;
    white-space: nowrap;
}
} */

/* 矢印ボタン（アイコンのみ表示） */
.slider-arrow {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.8;
}

.slider-arrow:hover {
    transform: translateY(-50%) scale(1.1);
    opacity: 1;
}

.slider-arrow img {
    width: 38px;
    height: auto;
    display: block;
    filter: grayscale(0%) brightness(1);
    /*white */
    transition: filter 0.3s ease;
}

.slider-arrow:hover img {
    filter: grayscale(100%) brightness(0.5);
}

/* 左右位置 */
.slider-arrow.prev {
    left: 60px;
}

.slider-arrow.next {
    right: 60px;
}

/* 非活性時 */
.slider-arrow:disabled {
    opacity: 0.2;
    cursor: not-allowed;
    transform: translateY(-50%) scale(1);
}


/* レスポンシブ対応 */
@media (max-width: 991px) {
    .team-slide {
        min-width: 33.3333%;/* 常に3枚表示 */
        padding: 0 3px;
        box-sizing: border-box;
    }

    .slider-arrow {
        width: 44px;
        height: 44px;
    }

    .slider-arrow.prev{
        left: 40px;
    }

    .slider-arrow.next{
        right: 40px;
    }
}

@media (max-width: 767px) {
    .team-slide {
        min-width: 33.3333%; /* 常に3枚表示 */
        padding: 0 3px;
        box-sizing: border-box;
    }

    .team-slider-container {
        padding: 0 20px;
    }

    .slider-arrow {
        width: 40px;
        height: 40px;
        top: 30%;
    }

    .slider-arrow.prev{
        left: 20px;
    }

    .slider-arrow.next{
        right: 20px;
    }
}

@media (max-width: 575px) {

    .team-slide {
        min-width: 33.3333%; /* 常に3枚表示 */
        padding: 0 3px;
        box-sizing: border-box;
    }
    .team-slider-container {
        padding: 0 15px;
    }
    .slider-arrow.prev{
        left: 15px;
    }

    .slider-arrow.next{
        right: 15px;
    }
}

/* ============================================
   トピックスセクション - ライン無し版
   ============================================ */
/* .topics-section {
    background-color: var(--color-white);
    padding: 80px 0;
}

.topics-section .section-title {
    text-align: center;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 600;
    margin-bottom: 60px;
} */

.topics-list {
    max-width: 1200px;
    margin: 0 auto 60px;
    border: 1px solid var(--color-black);
    border-radius: 0;
    padding: 30px 50px;
    background-color: var(--color-white);
}

.topic-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 1rem 0;
    border-bottom: none; /* Removed border */
    transition: background-color 0.3s ease;
}

.topic-item:hover {
    background-color: rgba(0, 0, 0, 0.01);
}

/* Remove last-child rule since no borders */
.topic-item:last-child {
    border-bottom: none;
}

/* Remove the left line decoration */
.topic-line {
    display: none;
}

.topic-date {
    font-size: 13px;
    color: var(--color-black);
    min-width: 85px;
    flex-shrink: 0;
    font-weight: 500;
}

.topic-category {
    display: inline-block;
    padding: 4px 1rem;
    background-color: var(--color-black);
    color: var(--color-white);
    font-size: 10px;
    font-weight: 600;
    border-radius: 20px;
    flex-shrink: 0;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.topic-title {
    font-size: 0.9rem;
    font-weight: 400;
    margin: 0;
    flex: 1;
    line-height: 1.6;
    color: var(--color-black);
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .topics-list {
        padding: 20px 1rem;
        margin: 0 auto 40px;
    }
    
    .topic-item {
        flex-wrap: wrap;
        gap: 10px;
        padding: 0.9rem 0;
    }
    
    .topic-date {
        min-width: 75px;
        font-size: 11px;
    }
    
    .topic-category {
        font-size: 9px;
        padding: 4px 12px;
    }
    
    /* .topic-title {
        flex-basis: 100%;
        font-size: 13px;
        margin-top: 4px;
    }
    
    .topics-section .section-title {
        margin-bottom: 40px;
        font-size: 24px;
    } */
}

@media (max-width: 575px) {
    .topics-list {
        padding: 1rem 12px;
    }
    
    .topic-item {
        padding: 12px 0;
    }
}

/* ============================================
   スマホ用固定ナビゲーション
   ============================================ */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--color-white);
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--color-text);
    padding: 4px 12px;
    transition: color 0.3s;
    flex: 1;
    max-width: 120px;
}

.mobile-nav-item:hover {
    color: var(--color-primary);
    opacity: 1;
}

.mobile-nav-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
}

.mobile-nav-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mobile-nav-label {
    font-size: 10px;
    text-align: center;
    line-height: 1.2;
}

/* ============================================
   レスポンシブデザイン
   ============================================ */

/* タブレット（1200px以下） */
@media (max-width: 1200px) {

    .side-menu-fixed,
    .news-card-fixed {
        display: none;
    }

    /* .section-label {
        left: 0px;
    } */

    /* .section-line-vertical {
        left: 3%;
    } */
}

/* タブレット（991px以下） */
@media (max-width: 991px) {
    :root {
        --section-padding: 60px;
    }

    .main-nav {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .section-line-vertical {
        display: none;
    }

    .team-intro {
        padding-right: 0;
        margin-bottom: 40px;
    }

    .hero-section {
        min-height: 80vh;
    }

    .home .section-label {
        display: block !important;
        position: relative !important;
        writing-mode: horizontal-tb !important;
        transform: none !important;
        text-align: center;
        font-size: 0.9rem;
        font-weight: 400;
        letter-spacing: 0.2em;
        color: #999;
        margin-top: -0.25em;
        margin-bottom: 1rem;
        left: 0;
        top: 0;
    }

}

/* スマートフォン（767px以下） */
@media (max-width: 767px) {
    :root {
        --section-padding: 40px;
    }

    .header-content {
        padding: 12px 20px;
    }

    .hero-section {
        min-height: 70vh;
        padding-top: 60px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 13px;
    }

    .topic-item {
        /* flex-direction: column; */
        display: flex;
        align-items: center;
        gap: 10px;
        /* padding-left: 35px; */
        flex-wrap: wrap;
    }

    .topic-date,
    .topic-category {
        min-width: auto;
    }

    .topic-title {
        flex-basis: 100%;
        margin-top: 6px;
        font-size: 15px;
        line-height: 1.6;
    }

    .topic-line {
        width: 18px;
    }

    /* .btn-black {
        width: 100%;
        text-align: center;
    }

    .btn-black {
        max-width: 180px;
    } */
}

/* ============================================
   実績・事例セクション - 修正版
   ============================================ */
/* ============================================
   実績・事例セクション - 改善版
   ============================================ */
/* ============================================
   実績・事例セクション - 完全修正版
   ============================================ */

.case-main {
    position: relative;
    margin-bottom: 0;
}

.case-main-image {
    width: 100%;
    border-radius: 12px;
    /* filter: grayscale(100%); */
    /* transition: filter 0.5s ease; */
}

/* .case-main:hover .case-main-image {
    filter: grayscale(0%);
} */


.case-content {
    margin-bottom: 40px;
}

/* Cards Styling */
.case-cards-wrapper {
    margin-top: 20px;
}

/* .case-cards-row {
    display: flex;
    gap: 12px;
}

.case-cards-row > div {
    flex: 1;
} */

.case-card-image {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.case-card-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 1rem rgba(0, 0, 0, 0.15);
}

.case-card-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    /* filter: grayscale(100%); */
    /* transition: filter 0.5s ease; */
}

/* .case-card-image:hover img {
    filter: grayscale(0%);
} */

.case-card-description {
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
    text-align: center;
}

/* Desktop Layout (768px and up) */
@media (min-width: 768px) {
    /* First row with main image and content */
    .case-section .container > .row:first-of-type {
        margin-bottom: 20px;
    }
    
    /* Position cards to align with right column */
    .case-section .container > .row:last-of-type {
        position: relative;
    }
    
    .case-cards-wrapper {
        margin-left: calc(41.666667%);
        padding-left: 15px;
        margin-top: -180px; /* Adjust this value to align bottoms */
    }
    
    .case-card-image img {
        height: 140px;
    }
    
    .case-card-description {
        font-size: 13px;
    }
}

/* Large Desktop */
@media (min-width: 992px) {
    .case-cards-wrapper {
        margin-top: -230px; /* Fine tune for larger screens */
    }
    
    .case-card-image img {
        height: 160px;
    }
    
    .case-card-description {
        font-size: 0.9rem;
    }
    body > section {
        .container, .container-fluid, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
            --bs-gutter-x: 1.5rem;
            padding-left: calc(var(--bs-gutter-x) * .5 + 5%) !important;
        }
    }
}

/* Tablet Layout */
@media (max-width: 991px) and (min-width: 768px) {
    .case-cards-wrapper {
        margin-top: -150px;
    }
    
    .case-card-image img {
        height: 120px;
    }
    
    .case-card-description {
        font-size: 12px;
    }
}

/* Mobile Layout (below 768px) */
@media (max-width: 767px) {
    .case-section .container > .row:first-of-type {
        margin-bottom: 20px;
    }
    
    /* Reset desktop positioning */
    .case-cards-wrapper {
        margin-left: 0;
        margin-top: 0;
        padding-left: 0;
    }
    
    /* Keep 3 columns side by side */
    /* .case-cards-row {
        gap: 8px;
    }
    
    .case-cards-row > div {
        flex: 0 0 calc(33.333% - 6px);
        max-width: calc(33.333% - 6px);
    } */
/*     
    .case-card-image {
        margin-bottom: 8px;
    }
    
    .case-card-image img {
        height: 85px;
    }
    
    .case-card-description {
        font-size: 11px;
        line-height: 1.3;
    } */
    
    .case-content {
        margin-bottom: 20px;
    }
    
    .section-title {
        font-size: 24px;
        margin-bottom: 1rem;
    }
    
    .section-description {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }
}

/* Extra Small Mobile */
@media (max-width: 575px) {
    /* .case-cards-row {
        gap: 6px;
    }
    
    .case-cards-row > div {
        flex: 0 0 calc(33.333% - 4px);
        max-width: calc(33.333% - 4px);
    } */
/*     
    .case-card-image img {
        height: 75px;
    }
    
    .case-card-description {
        font-size: 10px;
    } */
}
/* ============================================
   updated member section 1/22
   ============================================ */
.team-member {
    text-align: center;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.team-member img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* 役職は固定高さで揃える */
.member-role {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
    min-height: 2.6em; /* 2行分の高さを確保 */
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
}

.member-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.3;
}
@media (max-width: 767px) {
    .member-role {
        font-size: 12px;
        min-height: 3em; /* スマホでは3行分確保 */
        line-height: 1.4;
    }
    
    .member-name {
        font-size: .9rem;
        line-height: 1.4;
    }
}

@media (max-width: 575px) {
    .member-role {
        font-size: 11px;
        min-height: 3.2em;
        padding: 0 2px;
    }
    
    .member-name {
        font-size: .8rem;
        line-height: 1.4;
    }
}
