/* =========================================================
   Fujimotors トップページ（Index）専用の手書きCSS
   WordPress/Elementor のマークアップを脱却した版。
   ヘッダー/フッターは fm-layout.css、本ページは fm- 名前空間で
   独立してスタイリングする（Elementor CSS には依存しない）。
   ========================================================= */

/* ===== 共通パーツ ===== */
.fm-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}
#content img {
    max-width: 100%;
}

/* セクション見出し（日本語タイトル＋英字ライン） */
.fm-sec-head {
    text-align: center;
    margin-bottom: 36px;
}
.fm-sec-title {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--fm-text);
}
.fm-eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 12px 0 0;
    color: var(--fm-primary);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .2em;
}
.fm-eyebrow::before,
.fm-eyebrow::after {
    content: "";
    flex: 0 0 44px;
    height: 1px;
    background: var(--fm-primary);
    opacity: .45;
}
.fm-sec-lead {
    max-width: 760px;
    margin: 20px auto 0;
    line-height: 1.9;
    color: var(--fm-text);
}

/* 共通ボタン */
.fm-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 26px;
    border-radius: 4px;
    background: var(--fm-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background .2s, transform .2s;
}
.fm-btn:hover {
    background: var(--fm-primary-dark);
    color: #fff;
    transform: translateY(-1px);
}
.fm-btn .fa-chevron-right {
    font-size: .78em;
}
.fm-btn-wrap {
    text-align: center;
    margin-top: 18px;
}

/* ===== ヒーロー（背景動画） ===== */
.fm-hero {
    position: relative;
    min-height: calc(100vh - var(--fm-header-height, 64px));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: #0a2233 url("/wp-content/uploads/2020/07/index_service03.jpg") center center / cover no-repeat;
}
.fm-hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.fm-hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 1;
}
.fm-hero__inner {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 80px 20px;
    color: #fff;
}
.fm-hero__title {
    margin: 0;
    font-size: clamp(22px, 4vw, 34px);
    font-weight: 700;
    letter-spacing: .06em;
    color: #fff;
}
.fm-hero__img {
    display: block;
    width: 270px;          /* 元サイト: PC=270px / タブレット=250px / モバイル=180px */
    max-width: 80%;
    height: auto;
    margin: 18px auto 24px;
}
.fm-hero__lead {
    margin: 0;
    font-size: clamp(14px, 2.2vw, 17px);
    line-height: 2;
    color: #fff;
}
/* 元サイト: chevron→SCROLL の横並びグレーボタン（#54595F）／下端／hoverで青 */
.fm-hero__scroll {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    z-index: 2;
    display: inline-flex;
    flex-direction: row-reverse; /* マークアップは SCROLL→chevron 順。表示は ⌄ SCROLL に */
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #54595F;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    letter-spacing: 1px;
    transition: background .2s;
}
.fm-hero__scroll:hover {
    background: var(--fm-primary);
    color: #fff;
}

/* 読み込み時のフェードイン */
.fm-fade {
    opacity: 0;
    animation: fm-fadein .9s ease forwards;
}
.fm-fade--d1 { animation-delay: .3s; }
.fm-fade--d2 { animation-delay: .7s; }
@keyframes fm-fadein {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== 経営方針（元サイト準拠：見出し中央/本文左寄せ全幅/バナー全幅）===== */
.fm-policy {
    padding: 64px 0;
}
.fm-policy__title {
    margin: 0 0 22px;
    font-size: 24px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    color: var(--fm-text);
}
.fm-policy__text {
    margin: 0;
    font-size: 18px;
    line-height: 1.7;
    text-align: left;
    color: var(--fm-text);
}
.fm-banner {
    width: 100%;
    margin: 28px 0 0;
}
.fm-banner a {
    display: block;
    text-align: center;
    padding: .6em 0;
    background: #5cb85c;
    border: 2px solid #5cb85c;
    color: #fff;
    font-size: 1.2em;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s, color .2s;
}
.fm-banner a:hover {
    background: #fff;
    color: #5cb85c;
}

/* ===== 3カラム（お知らせ / YouTube / Facebook） ===== */
.fm-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
}
.fm-cols__col {
    padding: 50px 30px; /* 元サイト準拠（縦50px） */
    min-width: 0; /* 中の固定幅要素(FB埋め込み等)に列幅を引っ張られないよう等幅を維持 */
}
.fm-cols__col--tint {
    background: var(--fm-light);
}
.fm-cols__head {
    text-align: center;
    margin-bottom: 18px;
}
.fm-cols__title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--fm-text);
}

/* お知らせリスト */
.fm-news-list {
    background: #fff;
    border: 1px solid #DDE8F2;
    border-radius: 6px;
    padding: 6px 14px;
    margin-top: 12px;
}
.fm-news-ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.fm-news-item {
    border-bottom: 1px solid #eef1f5;
}
.fm-news-item:last-child {
    border-bottom: none;
}
.fm-news-linkblock {
    display: flex;
    gap: 12px;
    align-items: baseline;
    flex-wrap: wrap;
    padding: 11px 2px;
    color: inherit;
    text-decoration: none;
}
.fm-news-dateblock {
    min-width: 7em;
    white-space: nowrap;
    color: #888;
    font-size: .9em;
}
.fm-news-subjectblock {
    flex: 1;
    min-width: 12em;
    color: var(--fm-text);
}
.fm-news-linkblock:hover .fm-news-subjectblock {
    color: var(--fm-primary);
    text-decoration: underline;
}
.fm-news-empty {
    padding: 11px 2px;
    color: #888;
}

/* YouTube カルーセル（CSSスクロールスナップ／ライブラリ不使用）
   ※ヘッダーSNSの .fm-yt と衝突しないよう専用クラス名にする */
.fm-yt-carousel {
    margin-top: 12px;
}
.fm-yt-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
}
.fm-yt-track::-webkit-scrollbar {
    height: 6px;
}
.fm-yt-track::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, .2);
    border-radius: 3px;
}
.fm-yt-slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
}
.fm-yt-link {
    display: block;
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: hidden;
    background: #000 center center / cover no-repeat;
}
.fm-yt-play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    border-radius: 50%;
    font-size: 18px;
    transition: background .2s;
}
.fm-yt-play i {
    margin-left: 3px; /* 三角形の視覚的センタリング */
}
.fm-yt-link:hover .fm-yt-play {
    background: var(--fm-primary);
}
/* カルーセルのページネーションドット（元サイトのSwiper相当） */
.fm-yt-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}
.fm-yt-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .2);
    cursor: pointer;
    transition: background .2s, transform .2s;
}
.fm-yt-dot.is-active {
    background: var(--fm-primary);
    transform: scale(1.25);
}

/* Facebook 埋め込み（コンテナ幅に追従させる。※ヘッダーSNSの .fm-fb と衝突しないよう専用クラス） */
.fm-fb-embed {
    margin-top: 12px;
    width: 100%;
    overflow: hidden; /* 再パース前の一時的なはみ出しをクリップ */
}
.fm-fb-embed .fb-page,
.fm-fb-embed .fb-page span,
.fm-fb-embed .fb-page iframe {
    max-width: 100% !important;
}

/* ===== 事業内容（元サイト準拠：青帯＋SERVICE透かし画像を左上に敷き、見出しは白）=====
   レスポンシブ挙動（元サイト実測）:
     ≥1025px  … h2左/SERVICE左/リード左、画像 contain
     768-1024 … h2左/SERVICE左/リード中央、画像 1300px
     ≤767px   … h2中央/SERVICE中央/リード justify・1列、画像 1100px         */
.fm-service-sec {
    padding: 60px 0;
    /* 画像はフルワイドのセクションに敷く（左から青帯→右にSERVICE透かし） */
    background: #fff url("/wp-content/uploads/2020/07/index_service_bg.png") top left / contain no-repeat;
}
/* このセクションだけ見出しを白・左寄せに上書き */
.fm-service-sec .fm-sec-head {
    text-align: left;
    max-width: 600px;
    margin-bottom: 56px;
}
.fm-service-sec .fm-sec-title {
    color: #fff;
}
.fm-service-sec .fm-eyebrow {
    color: #fff;
    justify-content: flex-start;
}
.fm-service-sec .fm-eyebrow::before,
.fm-service-sec .fm-eyebrow::after {
    background: #fff;
    opacity: .8;
}
.fm-service-sec .fm-sec-lead {
    margin: 16px 0 0;
    text-align: left;
    font-size: 16px;
    color: #DDE8F2;
}
.fm-service-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 28px;
}
.fm-service-card {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    background: #fff;
    border: 1.5px solid #DDE8F2;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.fm-service-card:hover {
    transform: translateY(-4px);
    border-color: var(--fm-primary);
    box-shadow: 0 8px 24px rgba(0, 99, 177, .12);
}
.fm-service-card-inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 36px 24px;
    min-height: 200px;
    text-align: center;
}
.fm-service-card-icon {
    font-size: 2em;
    margin-bottom: 14px;
    color: var(--fm-primary);
}
.fm-service-card-title {
    margin: 0 0 10px;
    font-size: 1.2em;
    font-weight: 700;
    letter-spacing: .04em;
    color: #333;
}
.fm-service-card-desc {
    margin: 0 0 16px;
    font-size: .88em;
    line-height: 1.7;
    color: #666;
}
.fm-service-card-more {
    display: inline-block;
    font-size: .85em;
    font-weight: 600;
    color: var(--fm-primary);
    transition: color .2s;
}
.fm-service-card:hover .fm-service-card-more {
    color: var(--fm-accent);
}

/* ===== 会社案内（元サイト準拠：車画像＋水色面の上に白カードがふわっと乗る）===== */
.fm-profile-sec {
    padding: 200px 0 60px;
    text-align: center;
    background: #B1D0E9 url("/wp-content/uploads/2020/07/index_company_bg.jpg") top center / 100% auto no-repeat;
}
/* 内容を白カードに（背景95%＝下の車画像がうっすら透ける／ふわっと浮く影） */
.fm-profile-sec .fm-container {
    max-width: 1200px;
    padding: 50px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.08);
}

/* ===== 採用情報（左テキスト / 右写真） ===== */
.fm-recruit {
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.fm-recruit__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 50px;
    background: #fff;
    text-align: center;
}
/* 元サイト準拠：リード文は両端揃え */
.fm-recruit .fm-sec-lead {
    text-align: justify;
}
.fm-recruit__photo {
    display: none; /* モバイルのみ表示 */
    width: 100%;
    height: auto;
    margin-bottom: 24px;
}
.fm-recruit__img {
    background: url("/wp-content/uploads/2020/10/index_recruit_img.jpg") center center / cover no-repeat;
    min-height: 420px;
}

/* ===== レスポンシブ ===== */
/* 768〜1024px：お知らせ＝1行目(全幅)／YouTube・FB＝2行目(2列) */
@media (max-width: 1024px) {
    .fm-hero__img { width: 250px; } /* 元サイト タブレット幅 */
    .fm-cols {
        grid-template-columns: repeat(2, 1fr);
    }
    .fm-cols__col:first-child {
        grid-column: 1 / -1;
    }
    /* 事業内容：リードのみ中央寄せ（h2/SERVICEは左のまま）・画像1300px */
    .fm-service-sec {
        background-size: 1300px;
    }
    .fm-service-sec .fm-sec-head {
        max-width: none;
    }
    .fm-service-sec .fm-sec-lead {
        text-align: center;
    }
}
@media (max-width: 920px) {
    .fm-recruit {
        grid-template-columns: 1fr;
    }
    .fm-recruit__img {
        display: none;
    }
    .fm-recruit__photo {
        display: block;
    }
    .fm-recruit__body {
        padding: 48px 24px;
    }
    .fm-profile-sec {
        padding: 80px 0 56px;
    }
}
@media (max-width: 767px) {
    .fm-hero__video {
        display: none;
    }
    .fm-hero {
        min-height: 70vh;
    }
    .fm-hero__img { width: 180px; } /* 元サイト モバイル幅 */
    /* 767px以下：3カラムを1列に（お知らせ全幅指定もリセット） */
    .fm-cols {
        grid-template-columns: 1fr;
    }
    .fm-cols__col:first-child {
        grid-column: auto;
    }
    .fm-hero__scroll {
        font-size: 13px;
        padding: 10px 22px;
    }
    /* 会社案内：白カードのpaddingをモバイル向けに縮小 */
    .fm-profile-sec .fm-container {
        padding: 32px 22px;
    }
    .fm-service-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .fm-service-card-inner {
        min-height: 170px;
        padding: 28px 18px;
    }
    /* 事業内容：h2/SERVICE中央・リードjustify・画像1100px */
    .fm-service-sec {
        padding: 40px 0;
        background-size: 1100px;
    }
    .fm-service-sec .fm-sec-head {
        text-align: center;
    }
    .fm-service-sec .fm-eyebrow {
        justify-content: center;
    }
    .fm-service-sec .fm-sec-lead {
        text-align: justify;
    }
}
@media (max-width: 600px) {
    .fm-sec-title {
        font-size: 24px;
    }
    .fm-policy__text {
        font-size: 16px;
    }
}
