/* 修正版モバイル対応CSS - ヘッダー細く、ハンバーガーメニュー常時表示 */

/* ヘッダーを細くする */
.header {
    padding: 0.5rem 0 !important;
    min-height: 50px !important;
}

.header .container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0 1rem !important;
}

/* レスポンシブ対応：PCサイズではデスクトップナビ表示、スマホサイズではハンバーガーメニュー表示 */

/* PCサイズ（769px以上）：デスクトップナビゲーション表示 */
@media (min-width: 769px) {
    .mobile-menu-button {
        display: none !important;
    }
    
    /* デスクトップナビゲーションを表示 */
    nav,
    nav.hidden,
    nav[class*="space-x"],
    header nav,
    .desktop-nav {
        display: flex !important;
        visibility: visible !important;
    }
}

/* スマホサイズ（768px以下）：ハンバーガーメニュー表示 */
@media (max-width: 768px) {
    /* ハンバーガーメニューボタンを表示 */
    .mobile-menu-button {
        display: flex !important;
        position: relative !important;
        z-index: 1001 !important;
    }
    
    /* デスクトップナビゲーションを完全に非表示 */
    nav,
    nav.hidden,
    nav[class*="space-x"],
    header nav:not(.mobile-nav),
    .desktop-nav,
    header .flex > nav,
    header a[href="#features"],
    header a[href="#pricing"],
    header a[href="#testimonials"],
    header a[href="#contact"] {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    /* ヘッダー内のナビゲーション要素を強制非表示 */
    header .space-x-6,
    header .space-x-4,
    header div[class*="space-x"] {
        display: none !important;
    }
}

/* ヘッダーの右側部分を調整 */
header .flex:last-child {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
}

/* ハンバーガーメニューボタンを常時表示 */
.mobile-menu-button {
    display: flex !important;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
}

.mobile-menu-button span {
    width: 25px;
    height: 3px;
    background: #ffffff;
    border-radius: 3px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

.mobile-menu-button.open span:first-child {
    transform: rotate(45deg);
}

.mobile-menu-button.open span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.mobile-menu-button.open span:nth-child(3) {
    transform: rotate(-45deg);
}

/* ハンバーガーメニューボタンをヘッダーに追加 */
header::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background-image: 
        linear-gradient(to bottom, #ffffff 0%, #ffffff 20%, transparent 20%, transparent 40%, #ffffff 40%, #ffffff 60%, transparent 60%, transparent 80%, #ffffff 80%, #ffffff 100%);
    cursor: pointer;
    z-index: 1001;
}

/* モバイルメニューオーバーレイ */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.mobile-menu-overlay.show {
    display: block;
}

/* モバイルメニュー */
.mobile-menu {
    display: block;
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100%;
    background: #ffffff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.3s ease-in-out;
    overflow-y: auto;
}

.mobile-menu.show {
    right: 0;
}

.mobile-menu-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #ffffff;
}

.mobile-menu-items {
    padding: 20px 0;
}

.mobile-menu-items a {
    display: block;
    padding: 15px 20px;
    color: #374151;
    text-decoration: none;
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s;
    font-weight: 500;
}

.mobile-menu-items a:hover {
    background-color: #f3f4f6;
    color: #667eea;
}

.mobile-menu-cta {
    padding: 20px;
    border-top: 1px solid #e5e7eb;
}

.mobile-menu-cta .btn {
    width: 100%;
    text-align: center;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

/* 導入事例のC社デザイン修正 */
.case-study-card {
    margin-bottom: 2rem !important;
    padding: 1.5rem !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    background: #ffffff !important;
    overflow: hidden !important;
}

.case-study-card h3 {
    font-size: 1.25rem !important;
    margin-bottom: 1rem !important;
    color: #1f2937 !important;
    word-break: keep-all !important;
    overflow-wrap: break-word !important;
    line-height: 1.4 !important;
}

.case-study-card .company-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
    margin-bottom: 1rem !important;
}

.case-study-card .company-type {
    font-size: 0.9rem !important;
    color: #6b7280 !important;
    font-weight: 500 !important;
}

.case-study-card .employee-count {
    font-size: 0.85rem !important;
    color: #9ca3af !important;
}

.case-study-card .metrics {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
}

.case-study-card .metric {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0.75rem !important;
    background: #f9fafb !important;
    border-radius: 8px !important;
    border-left: 4px solid #10b981 !important;
}

.case-study-card .metric-label {
    font-weight: 500 !important;
    color: #374151 !important;
    font-size: 0.9rem !important;
}

.case-study-card .metric-value {
    font-weight: 700 !important;
    color: #059669 !important;
    font-size: 1.1rem !important;
}

/* 無料レポート以下のレスポンシブ対応改善 */
.free-report-section {
    padding: 3rem 1rem !important;
    background: #f8fafc !important;
}

.free-report-section h2 {
    font-size: 2rem !important;
    text-align: center !important;
    margin-bottom: 2rem !important;
    word-break: keep-all !important;
    overflow-wrap: break-word !important;
    color: #1f2937 !important;
    font-weight: 700 !important;
}

.free-report-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    gap: 2rem !important;
    margin-bottom: 3rem !important;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.free-report-card {
    padding: 2rem !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
    text-align: center !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.free-report-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

.free-report-card .icon {
    font-size: 3rem !important;
    margin-bottom: 1rem !important;
}

.free-report-card h3 {
    font-size: 1.25rem !important;
    margin-bottom: 1rem !important;
    color: #1f2937 !important;
    word-break: keep-all !important;
    overflow-wrap: break-word !important;
    font-weight: 600 !important;
}

.free-report-card p {
    font-size: 1rem !important;
    line-height: 1.6 !important;
    color: #6b7280 !important;
    word-break: keep-all !important;
    overflow-wrap: break-word !important;
}

/* フォームセクションの改善 */
.form-section {
    padding: 3rem 1rem !important;
    background: #ffffff !important;
}

.form-container {
    max-width: 600px !important;
    margin: 0 auto !important;
    background: #f9fafb !important;
    padding: 2rem !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

.form-group {
    margin-bottom: 1.5rem !important;
}

.form-group label {
    display: block !important;
    margin-bottom: 0.5rem !important;
    font-weight: 600 !important;
    color: #374151 !important;
    font-size: 0.95rem !important;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100% !important;
    padding: 0.875rem !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    background: #ffffff !important;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none !important;
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

.submit-button {
    width: 100% !important;
    padding: 1rem !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
}

.submit-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3) !important;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    /* ヘッダーの調整 */
    .header {
        padding: 0.4rem 0 !important;
        min-height: 45px !important;
    }
    
    .header .container {
        padding: 0 0.75rem !important;
    }
    
    /* メインタイトルの調整 */
    .hero h1 {
        font-size: 1.875rem !important;
        line-height: 1.3 !important;
        word-break: keep-all !important;
        overflow-wrap: break-word !important;
        padding: 0 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    /* サブタイトルの調整 */
    .hero .subtitle {
        font-size: 1rem !important;
        line-height: 1.4 !important;
        word-break: keep-all !important;
        overflow-wrap: break-word !important;
        padding: 0 1rem !important;
    }
    
    /* 説明文の調整 */
    .hero .description {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
        word-break: keep-all !important;
        overflow-wrap: break-word !important;
        padding: 0 1rem !important;
    }
    
    /* ボタンテキストの調整 */
    .btn {
        font-size: 0.9rem !important;
        padding: 0.75rem 1.5rem !important;
        word-break: keep-all !important;
        overflow-wrap: break-word !important;
    }
    
    /* コンテナの調整 */
    .container {
        padding: 0 1rem !important;
    }
    
    /* 統計セクションの調整 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
    
    /* 問題セクションの調整 */
    .problems-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    /* 特徴セクションの調整 */
    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    /* 導入事例の調整 */
    .case-study-card {
        margin-bottom: 1.5rem !important;
        padding: 1.25rem !important;
    }
    
    .case-study-card h3 {
        font-size: 1.1rem !important;
    }
    
    .case-study-card .metric {
        padding: 0.5rem !important;
    }
    
    .case-study-card .metric-label {
        font-size: 0.85rem !important;
    }
    
    .case-study-card .metric-value {
        font-size: 1rem !important;
    }
    
    /* 無料レポートセクションの調整 */
    .free-report-section {
        padding: 2rem 1rem !important;
    }
    
    .free-report-section h2 {
        font-size: 1.75rem !important;
    }
    
    .free-report-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .free-report-card {
        padding: 1.5rem !important;
    }
    
    .free-report-card h3 {
        font-size: 1.125rem !important;
    }
    
    .free-report-card p {
        font-size: 0.95rem !important;
    }
    
    /* フォームセクションの調整 */
    .form-section {
        padding: 2rem 1rem !important;
    }
    
    .form-container {
        padding: 1.5rem !important;
    }
}

/* 極小画面対応 */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.625rem !important;
    }
    
    .hero .subtitle {
        font-size: 0.95rem !important;
    }
    
    .hero .description {
        font-size: 0.85rem !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    .free-report-section h2 {
        font-size: 1.5rem !important;
    }
    
    .mobile-menu {
        width: 100% !important;
        max-width: 300px !important;
    }
}

/* 極小画面対応 */
@media (max-width: 320px) {
    .hero h1 {
        font-size: 1.4rem !important;
    }
    
    .hero .subtitle {
        font-size: 0.9rem !important;
    }
    
    .hero .description {
        font-size: 0.8rem !important;
    }
    
    .header {
        padding: 0.3rem 0 !important;
        min-height: 40px !important;
    }
}

