/**
 * NextHiveMedia 本番追加分（テーマ NHM_LP_202601）
 * 動画ヒーロー / ヘッダー・ハンバーガー / SERVICEグリッド / スマホ調整
 *
 * 読み込み方法（いずれか）:
 * A) このファイルを css/wp-addon.css としてアップロードし functions.php で enqueue
 * B) style.css の末尾にこの内容を追記
 */

:root {
    --header-height: 110px;
}

body {
    padding-top: 0;
    overflow-x: hidden;
}

/* --- ヘッダー・ハンバーガー --- */
.header {
    height: var(--header-height);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    padding: 0;
    background: rgba(255, 255, 255, 0.97);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10002;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 30px;
    box-sizing: border-box;
}

.hamburger-btn {
    display: none;
    position: relative;
    z-index: 10003;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #333;
    position: absolute;
    left: 0;
    transition: 0.3s;
    border-radius: 3px;
}

.hamburger-btn span:nth-of-type(1) { top: 10px; }
.hamburger-btn span:nth-of-type(2) { top: 19px; }
.hamburger-btn span:nth-of-type(3) { top: 28px; }

.hamburger-btn.active span:nth-of-type(1) {
    top: 19px;
    transform: rotate(45deg);
}

.hamburger-btn.active span:nth-of-type(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-of-type(3) {
    top: 19px;
    transform: rotate(-45deg);
}

.mobile-drawer {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background-color: rgba(51, 51, 51, 0.98);
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s, visibility 0.3s;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.mobile-drawer.active {
    display: flex;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body.menu-open {
    overflow: hidden;
}

section[id] {
    scroll-margin-top: var(--header-height);
}

/* --- 動画ヒーロー --- */
.hero-v2.hero-v2--video {
    position: relative;
    margin-top: 0 !important;
    width: 100%;
    min-height: max(560px, 85vh);
    max-height: none;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    padding: 0;
    background: #0a1628;
}

.hero-v2--video .hero-v2-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    display: block;
}

.hero-v2--video .hero-bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    pointer-events: none;
}

/* スマホで出るネイティブ再生UIを非表示（背景動画のため） */
.hero-v2--video .hero-bg-video::-webkit-media-controls {
    display: none !important;
}

.hero-v2--video .hero-bg-video::-webkit-media-controls-start-playback-button {
    display: none !important;
}

.hero-v2--video .hero-v2-scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        105deg,
        rgba(255, 255, 255, 0.92) 0%,
        rgba(253, 251, 251, 0.78) 38%,
        rgba(245, 249, 255, 0.55) 62%,
        rgba(0, 102, 204, 0.22) 100%
    );
    pointer-events: none;
}

.hero-v2--video .hero-v2-container {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    flex: 1;
    width: 100%;
    max-width: none;
    min-height: inherit;
    padding: calc(var(--header-height) + 28px) 5vw 48px;
    box-sizing: border-box;
}

.hero-v2--video .hero-content {
    width: 100%;
    max-width: 580px;
    text-align: left;
}

.hero-v2--video .hero-eyebrow {
    font-weight: bold;
    color: #0066cc;
    margin: 0 0 10px;
    letter-spacing: 0.08em;
}

.hero-v2--video .hero-v2-title {
    font-size: clamp(1.75rem, 4.5vw, 2.8rem);
    line-height: 1.35;
    margin: 0 0 20px;
    font-weight: 900;
    text-shadow: 0 0 24px rgba(255, 255, 255, 0.95);
}

.hero-v2--video .hero-lead {
    margin: 0;
    font-size: clamp(1rem, 2vw, 1.1rem);
    line-height: 1.8;
    font-weight: 500;
    text-shadow: 0 0 16px rgba(255, 255, 255, 0.9);
}

.hero-v2--video .hero-cta {
    margin-top: 40px;
}

.hero-v2--video .hero-cta .btn-v2-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35em;
    width: auto;
    max-width: 100%;
    padding: 18px 36px;
    background: #436ceb;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.05rem;
    line-height: 1.4;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(67, 108, 235, 0.4);
    transition: transform 0.2s, background-color 0.2s;
    box-sizing: border-box;
}

.hero-v2--video .hero-cta .btn-v2-cta:hover {
    transform: translateY(-3px);
    background-color: #325ad1;
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .hero-v2--video .hero-bg-video {
        display: none;
    }

    .hero-v2--video .hero-v2-scrim {
        background: linear-gradient(135deg, #fdfbfb 0%, #f5f9ff 100%);
    }
}

/* --- TOP SERVICE 4カード --- */
.service-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 8px;
}

.service-card {
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #eef2f7;
    height: 100%;
    box-sizing: border-box;
}

.service-num {
    font-size: 1.1rem;
    font-weight: 900;
    color: #0066cc;
    margin-bottom: 12px;
    line-height: 1;
}

.service-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #333;
    margin: 0 0 12px;
    line-height: 1.4;
}

.service-desc {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.75;
    color: #555;
}

/* --- ABOUT 会社概要テーブル（追加分） --- */
.company-table-wrap {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #eef2f7;
}

.company-table th,
.company-table td {
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    text-align: left;
    vertical-align: top;
    line-height: 1.7;
}

.company-table tr:last-child th,
.company-table tr:last-child td {
    border-bottom: none;
}

.company-table th {
    width: 30%;
    background: #fafafa;
    font-weight: bold;
    color: #333;
}

@media (max-width: 991px) {
    .header-nav {
        display: none;
    }

    .hamburger-btn {
        display: block;
        flex-shrink: 0;
    }

    .hero-v2--video .hero-v2-container {
        padding: calc(var(--header-height) + 20px) 20px 40px;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .hero-v2--video .hero-v2-scrim {
        background: linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.94) 0%,
            rgba(255, 255, 255, 0.82) 55%,
            rgba(245, 249, 255, 0.7) 100%
        );
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    /* page-lp.php 内の旧スタイル上書き（動画が暗くなるのを防ぐ） */
    .hero-v2--video .hero-v2-bg {
        opacity: 1 !important;
    }

    .header {
        height: var(--header-height);
    }

    .header-container {
        padding: 0 15px;
    }

    .logo img {
        height: 50px;
    }

    .hero-v2.hero-v2--video {
        min-height: max(480px, 75vh);
    }

    .hero-v2--video .hero-v2-container {
        align-items: center;
        justify-content: center;
        padding: calc(var(--header-height) + 16px) 20px 40px;
        text-align: center;
    }

    .hero-v2--video .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        max-width: 100%;
        text-align: center;
    }

    .hero-v2--video .hero-eyebrow,
    .hero-v2--video .hero-v2-title,
    .hero-v2--video .hero-lead {
        text-align: center;
        width: 100%;
    }

    .hero-v2--video .hero-v2-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .hero-v2--video .hero-cta {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        margin-top: 28px;
    }

    .hero-v2--video .hero-cta .btn-v2-cta {
        display: inline-flex !important;
        width: auto !important;
        max-width: min(100%, 320px);
        margin: 0 auto;
        padding: 16px 28px;
        font-size: 0.95rem;
        white-space: normal;
        text-align: center;
        line-height: 1.5;
    }

    .section-title,
    .section-desc {
        text-align: center;
    }

    .service-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .service-card {
        padding: 24px 20px;
    }

    .company-table th,
    .company-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .company-table th {
        border-bottom: none;
        padding-bottom: 8px;
    }

    .company-table td {
        padding-top: 0;
    }
}
