/* ========================================
   Hero Section - 改善版
   ======================================== */

/* FV（ヘッダー＋パンくず帯＋ヒーロー＋実績バッジ帯）を1画面に収めるための基準値。
   --hero-stats-h は実績バッジ帯の高さ。.hero の高さ計算と .hero__badges の
   min-height の両方で使い、片方だけ変えて破綻するのを防ぐ。 */
:root {
    --hero-stats-h: 96px;
}

.hero {
    /* ヒーローに割り当てられる高さ = 1画面 - 実績バッジ帯 - ヘッダー - パンくず帯。
       svh 未対応ブラウザ向けに vh のフォールバックを先に置く */
    --hero-h: calc(100vh - var(--hero-stats-h) - var(--header-h) - var(--breadcrumb-h));
    --hero-h: calc(100svh - var(--hero-stats-h) - var(--header-h) - var(--breadcrumb-h));
    /* 縦の余白は「画面が高いほど従来値、低いほど詰める」で可変にする。
       文字サイズと動画サイズは一切変えず、まず余白から削ってFVに収めるための仕組み。
       画面高 1080px 以上 → 従来値 ／ 900px 以下 → 詰めた値 ／ その間は線形。
       例）上余白: 1080pxで38px、900pxで20px = clamp(20px, 10vh - 70px, 38px) */
    --hero-pad-top: clamp(20px, calc(10vh - 70px), calc(112px - var(--header-h)));
    --hero-pad-bottom: clamp(20px, calc(13.33vh - 100px), 44px);
    --hero-logo-gap: clamp(14px, calc(4.44vh - 26px), 22px);
    --hero-sub-gap-top: clamp(14px, calc(2.22vh - 6px), 18px);
    --hero-sub-gap-bottom: clamp(20px, calc(6.67vh - 40px), 32px);
    --hero-title-gap: clamp(10px, calc(4.44vh - 30px), 18px);
    --hero-showcase-gap: clamp(16px, calc(4.44vh - 24px), 24px);
    --hero-video-pad: 20px;

    /* 動画以外が積み上がる高さの合計（可変の余白＋変えない文字・ロゴの実測高さ）。
       52px = ロゴ画像48px＋行ボックス、113px = 見出し1行＋サブコピー1行、8px = 端数の保険 */
    --hero-fixed-h: calc(
        var(--hero-pad-top) + var(--hero-pad-bottom)
        + 52px + var(--hero-logo-gap)
        + 113px + var(--hero-sub-gap-top) + var(--hero-sub-gap-bottom) + var(--hero-title-gap)
        + var(--hero-showcase-gap) * 2
        + var(--hero-video-pad) * 2
        + 8px);
    /* 余白を詰めても足りない場合の最後の手段として、残った高さぶんに動画を収める。
       余裕がある間は上限が実寸を超えるので、動画はカラム幅いっぱい＝従来サイズのまま。 */
    --hero-video-h: clamp(150px, calc(var(--hero-h) - var(--hero-fixed-h)), 460px);

    background: linear-gradient(180deg, #F8FAFB 0%, #FFFFFF 100%) !important;
    /* ヘッダー逃げはパンくず帯が担うため、ここは内側の余白だけ持つ */
    padding: var(--hero-pad-top) 0 var(--hero-pad-bottom) !important;
    position: relative !important;
    overflow: hidden !important;
    min-height: var(--hero-h) !important;
    display: flex !important;
    /* 中央揃えだと子の余白追加が上下に分配されてしまうので、高さを引き伸ばす */
    align-items: stretch !important;
}

/* 背景は現場写真。その上にブランドブルーのオーバーレイを重ねる
   ※ SEO対応：背景写真は Google 画像検索でインデックスされるよう CSS の
     background-image ではなく HTML の <img class="hero__background-image"> で配信する。
     ここでは画像が読めない場合のフォールバック色のみ指定する。 */

.hero__background {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 0 !important;
    pointer-events: none !important;
    display: block !important;
    overflow: hidden !important;
    /* 画像が読めない場合のフォールバック */
    background-color: #003D7A !important;
}

/* HTML側の背景画像。従来の background-size: cover / center center と同じ見え方にする */

.hero__background-image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block !important;
}

/* オーバーレイ：ブランドブルーを高い不透明度で重ね、写真は奥にうっすら見せる */

.hero__background::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    display: block !important;
    background:
        linear-gradient(135deg,
            rgba(0, 61, 122, 0.92) 0%,
            rgba(0, 90, 163, 0.88) 50%,
            rgba(0, 61, 122, 0.95) 100%) !important;
}

.hero__container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    position: relative !important;
    z-index: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
}

.hero__content {
    text-align: center !important;
    max-width: 1100px !important;
    width: 100% !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    /* 全体は上下中央のバランスを保つ */
    justify-content: center !important;
}

.hero__title {
    font-size: 60px !important;
    font-weight: 900 !important;
    color: white !important;
    line-height: 1.2 !important;
    margin-bottom: var(--hero-title-gap, 18px) !important;
    letter-spacing: -1px !important;
}

.hero__title span {
    color: #FFD700 !important;
    display: inline-block !important;
}

.hero__subtitle {
    font-size: 22px !important;
    color: rgba(255, 255, 255, 0.95) !important;
    line-height: 1.7 !important;
    margin-bottom: var(--hero-sub-gap-bottom, 32px) !important;
    font-weight: 500 !important;
}

.hero__subtitle strong {
    color: white !important;
    font-weight: 700 !important;
    font-size: 24px !important;
}

/* SEO対応：主要キーワード（動画マニュアル作成・配信クラウドサービス）を検索エンジンに
   見出しとして認識させるため、サブコピーを <p> から <span> に変えて h1 の内側へ移動した。
   表示文言・表示位置は一切変えないための調整が以下3点。
     - display     : span をブロックに戻して改行させる
     - color       : .hero__title span（金色）の継承を打ち消す
     - letter-spacing : h1 の -1px を継承しないようにする
     - margin-top  : 旧 .hero__title の margin-bottom と同値（見出しとの間隔を維持）
   詳細度は .hero__title span (0,1,1) より高い (0,2,0) にしてある。 */
.hero__title .hero__subtitle {
    display: block !important;
    color: rgba(255, 255, 255, 0.95) !important;
    letter-spacing: normal !important;
    margin-top: var(--hero-sub-gap-top, 18px) !important;
}

.hero__logo {
    margin: 0 auto var(--hero-logo-gap, 22px) !important;
    text-align: center !important;
    display: block !important;
}

/* 白いピルをやめ、単色ロゴを白抜きで背景になじませる */

.hero__logo img {
    height: 48px !important;
    display: inline-block !important;
    width: auto !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    filter: brightness(0) invert(1) !important;
}

/* 「4つの機能」の下（右カラム内）に、2つ横並びで配置 */

.hero__cta {
    display: flex !important;
    flex-direction: row !important;
    gap: 14px !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ヒーローセクションの動画 */

.hero__video-section {
    margin: 32px 0 !important;
    width: 100% !important;
    position: relative !important;
    display: flex !important;
    justify-content: center !important;
}

.hero__video-wrapper {
    position: relative !important;
    width: 100% !important;
    max-width: 800px !important;
    margin: 0 auto !important;
    padding: var(--hero-video-pad, 20px) !important;
    background: #2c2c2c !important;
    border-radius: 24px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
}

/* 上部カメラ/スピーカー */

.hero__video-wrapper::before {
    content: '' !important;
    position: absolute !important;
    top: 8px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 80px !important;
    height: 4px !important;
    background: #1a1a1a !important;
    border-radius: 2px !important;
    z-index: 3 !important;
}

.hero__video-wrapper video {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    display: block !important;
    border-radius: 12px !important;
    position: relative !important;
    z-index: 2 !important;
}

.hero__video-control {
    position: absolute !important;
    bottom: var(--hero-video-pad, 20px) !important;
    left: var(--hero-video-pad, 20px) !important;
    width: 48px !important;
    height: 48px !important;
    background: rgba(0, 0, 0, 0.7) !important;
    border: none !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    z-index: 4 !important;
}

.hero__video-control:hover {
    background: rgba(0, 0, 0, 0.9) !important;
    transform: scale(1.1) !important;
}

.hero__video-control .material-icons {
    color: white !important;
    font-size: 28px !important;
}

/* ヒーローセクションのボタンカラー */

.hero__cta .btn--primary {
    background: #D32F2F !important;
    border-color: #D32F2F !important;
    color: white !important;
}

.hero__cta .btn--primary:hover {
    background: #B71C1C !important;
    border-color: #B71C1C !important;
}

.hero__cta .btn--outline {
    background: transparent !important;
    color: white !important;
    border: 2px solid white !important;
}

.hero__cta .btn--outline:hover {
    background: white !important;
    color: var(--primary) !important;
    border-color: white !important;
}

/* スクロールアイコン */

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* 2つを等幅に。左右パディングを詰めて、狭いカラムでも文字が収まるようにする */

.hero__cta .btn {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* ========================================
   Hero - 動画 ＋ 4つの機能（2カラム）
   ======================================== */

.hero__showcase {
    display: grid !important;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) !important;
    gap: 32px !important;
    align-items: center !important;
    width: 100% !important;
    margin: var(--hero-showcase-gap, 24px) 0 !important;
}

.hero__showcase .hero__video-section {
    margin: 0 !important;
}

/* 幅ではなく「高さの上限」で動画サイズを決める。
   16:9 を保ったまま高さ上限に収まる幅を計算し、余ったカラム幅は左右の余白にする
   （.hero__video-section が justify-content: center なので中央に残る） */
.hero__showcase .hero__video-wrapper {
    max-width: min(100%, calc(var(--hero-video-h) * 16 / 9 + var(--hero-video-pad) * 2)) !important;
}

/* 動画の右横に、機能と実績のテキスト情報をまとめる */

.hero__info {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 26px !important;
    min-width: 0 !important;
}

/* 白いカードをやめ、枠なしで背景パターンの上に直接置く */

.hero__features {
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    text-align: left !important;
}

/* 赤い丸ピル＋「！」をやめ、小さな見出し＋細い罫に（青地なので罫はゴールド） */

.hero__features-list {
    list-style: none !important;
    display: grid !important;
    gap: 14px !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
}

/* 破線の区切りは廃止。余白だけで整える */

.hero__features-list li {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 0 !important;
    border-bottom: none !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    line-height: 1.6 !important;
    color: #FFFFFF !important;
    text-shadow: 0 1px 2px rgba(0, 20, 45, 0.32) !important;
    white-space: nowrap !important;
}

/* 4つとも同じ形（丸のチェック）に統一し、シルエットのばらつきをなくす */

.hero__features-list .material-icons {
    flex-shrink: 0 !important;
    width: 26px !important;
    height: 26px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    background: #FFFFFF !important;
    color: #003D7A !important;
    font-size: 17px !important;
    text-shadow: none !important;
}

/* ========================================
   Hero - 実績バッジ
   ======================================== */

/* ========================================
   実績バッジ：ヒーロー直下の帯（FVの最下部）
   高さは --hero-stats-h（96px）に固定し、.hero の min-height と対で1画面に収める
   ======================================== */

.hero-stats {
    padding: 0 !important;
    background: #F7F9FB !important;
    border-bottom: 1px solid var(--border-light) !important;
}

.hero-stats__container {
    max-width: 1140px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

.hero__badges {
    list-style: none !important;
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    align-items: stretch !important;
    gap: 0 !important;
    width: 100% !important;
    max-width: none !important;
    /* 帯の下罫線1pxを含めて --hero-stats-h ぴったりにする */
    min-height: calc(var(--hero-stats-h) - 1px) !important;
    margin: 0 !important;
    padding: 0 !important;
}

.hero-badge {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: baseline !important;
    align-content: center !important;
    justify-content: center !important;
    gap: 0 6px !important;
    padding: 16px 14px !important;
    background: none !important;
    border: none !important;
    border-left: 1px solid var(--border-light) !important;
    border-radius: 0 !important;
    text-align: center !important;
}

.hero-badge:first-child {
    border-left: none !important;
}

.hero-badge__label {
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    color: var(--text-secondary) !important;
}

/* 白地になったのでゴールドは読めない。数字はブランドネイビーに */

.hero-badge__num {
    font-size: 30px !important;
    font-weight: 900 !important;
    line-height: 1.25 !important;
    color: var(--primary) !important;
    letter-spacing: -0.5px !important;
}

.hero-badge__unit {
    font-size: 16px !important;
    font-weight: 700 !important;
    margin-left: 1px !important;
}

/* ========================================
   Hero Section - レスポンシブ対応
   ======================================== */

@media (max-width: 768px) {
    .hero {
        padding: calc(100px - var(--header-h)) 0 60px !important;
        min-height: auto !important;
    
    }

    .hero__title {
        font-size: 36px !important;
        margin-bottom: 20px !important;
        letter-spacing: 0 !important;
    
    }

    .hero__subtitle {
        font-size: 16px !important;
        margin-bottom: 24px !important;
    
    }

    /* h1 の margin-bottom がこのブレークポイントで 20px になるため、それに合わせる */
    .hero__title .hero__subtitle {
        margin-top: 20px !important;
    }

    .hero__subtitle strong {
        font-size: 18px !important;
    
    }

    .hero__logo {
        margin: 0 auto 18px !important;
    
    }

    .hero__logo img {
        height: 34px !important;
        padding: 0 !important;
    
    }

    .hero__video-section {
        margin: 24px 0 !important;
    
    }

    .hero__video-wrapper {
        padding: 16px !important;
        border-radius: 20px !important;
    
    }

    .hero__video-wrapper::before {
        width: 60px !important;
        height: 3px !important;
        top: 6px !important;
    
    }

    .hero__video-wrapper video {
        border-radius: 10px !important;
    
    }

    .hero__video-control {
        bottom: 16px !important;
        left: 16px !important;
        width: 40px !important;
        height: 40px !important;
    
    }

    .hero__video-control .material-icons {
        font-size: 24px !important;
    
    }

    .hero__cta {
        flex-direction: column !important;
        gap: 12px !important;
        margin-bottom: 24px !important;
    
    }

    .hero__cta .btn {
        width: 100% !important;
        min-width: auto !important;
    
    }
}

@media (max-width: 480px) {
    .hero__title {
        font-size: 28px !important;
    
    }

    .hero__subtitle {
        font-size: 15px !important;
    
    }

    .hero__subtitle strong {
        font-size: 16px !important;
    
    }
}

/* ========================================
   Hero 追加要素 - レスポンシブ対応
   ======================================== */

@media (max-width: 1024px) {
    /* 1カラムになるここから下は、動画は従来どおりカラム幅いっぱい（幅基準）に戻す。
       高さ基準の上限を外すことで、タブレット・スマホの見た目は改修前と同じになる。 */
    .hero {
        --hero-video-h: 460px !important;
    }

    .hero__showcase {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    
    }

    .hero__info {
        max-width: 640px !important;
        width: 100% !important;
        margin: 0 auto !important;
    
    }

    /* 1カラムになるので、機能リストは箱ごと中央に置く。
       .hero__info が縦方向のflexなので align-self で幅が内容ぴったりに縮み、
       箱そのものが中央に寄る。各行の文字は左揃えのまま。 */
    .hero__features {
        align-self: center !important;
        max-width: 100% !important;
    }
}

/* タブレット：機能リストの右隣にCTAボタンを縦積みで並べる */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero__info {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 28px !important;
        max-width: 800px !important;
    }

    /* 機能リストは縮ませない（項目が nowrap なので折り返せない） */
    .hero__features {
        flex: 0 0 auto !important;
    }

    /* ボタンは横並びをやめて縦積みに。幅は広いボタンに合わせて揃える。
       width: 100%（style.css）が残ると箱が親幅まで広がってはみ出すため auto に戻す */
    .hero__cta {
        flex-direction: column !important;
        gap: 12px !important;
        flex: 0 0 auto !important;
        width: auto !important;
    }

    .hero__cta .btn {
        flex: 0 0 auto !important;
        width: 100% !important;
    }
}

@media (max-width: 768px) {
    .hero__showcase {
        margin: 24px 0 !important;
        gap: 20px !important;
    
    }

    /* 縦長になるので人物が写る右寄りを残す */

    .hero__background-image {
        object-position: 70% center !important;
    
    }

    .hero__features {
        padding: 0 !important;
        border-radius: 0 !important;
    
    }

    .hero__features-list {
        gap: 12px !important;
    
    }

    .hero__features-list li {
        font-size: 16px !important;
        padding: 0 !important;
        gap: 10px !important;
    
    }

    .hero__features-list .material-icons {
        width: 22px !important;
        height: 22px !important;
        font-size: 15px !important;
    
    }

    .hero__badges {
        grid-template-columns: repeat(2, 1fr) !important;
        min-height: auto !important;
        gap: 0 !important;
        margin: 0 !important;
    
    }

    .hero-badge {
        padding: 14px 10px !important;
        border-radius: 0 !important;
    
    }

    /* 2列時は左罫を2・4番目だけに、上罫で行を区切る */

    .hero-badge:nth-child(odd) {
        border-left: none !important;
    
    }

    .hero-badge:nth-child(n + 3) {
        border-top: 1px solid var(--border-light) !important;
    
    }

    .hero-badge__num {
        font-size: 24px !important;
    
    }

    .hero-badge__unit {
        font-size: 14px !important;
    
    }

    .hero-badge__label {
        font-size: 13px !important;
    
    }
}
