/* ========================================
   モバイル最適化CSS（追加スタイル）
   2026-01-12 作成
======================================== */

/* 緊急告知バーのモバイル最適化 */
@media (max-width: 768px) {
    /* 緊急告知バーを1列表示に */
    .emergency-bar .container {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    .emergency-bar a {
        font-size: 1.3rem !important;
    }
}

/* ヒーローセクションのモバイル最適化 */
@media (max-width: 768px) {
    /* 信頼バッジを2列表示 */
    .hero-badges {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
    
    /* ヒーロータイトル */
    .hero-title {
        font-size: 1.6rem !important;
        line-height: 1.4 !important;
    }
    
    /* ヒーローサブタイトル */
    .hero-subtitle {
        font-size: 1rem !important;
    }
    
    /* 実績数字カード */
    .hero-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
    
    .hero-stats .stat-number {
        font-size: 2rem !important;
    }
    
    .hero-stats .stat-label {
        font-size: 0.85rem !important;
    }
    
    /* CTAボタン */
    .hero-buttons {
        flex-direction: column !important;
        gap: 1rem !important;
        width: 100%;
    }
    
    .hero-buttons a {
        width: 100% !important;
        justify-content: center !important;
        padding: 1.1rem 1.5rem !important;
        font-size: 1.1rem !important;
    }
    
    /* 電話番号ボックス */
    .hero-phone-box {
        padding: 1.25rem !important;
    }
    
    .hero-phone-box a {
        font-size: 1.6rem !important;
    }
}

@media (max-width: 480px) {
    /* 超小型スマホ対応 */
    .hero-title {
        font-size: 1.4rem !important;
    }
    
    .hero-badges {
        grid-template-columns: 1fr !important;
    }
    
    .hero-stats {
        grid-template-columns: 1fr !important;
    }
    
    .hero-stats .stat-number {
        font-size: 2.5rem !important;
    }
    
    .hero-phone-box a {
        font-size: 1.8rem !important;
    }
}

/* タップ領域の最適化 */
@media (max-width: 768px) {
    /* すべてのリンクとボタンのタップ領域を確保 */
    a, button {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* 電話番号リンク */
    a[href^="tel:"] {
        padding: 0.75rem 1.5rem;
        font-weight: 700;
    }
    
    /* CTAボタン */
    .btn {
        padding: 1rem 2rem !important;
        font-size: 1.05rem !important;
    }
    
    .btn-large {
        padding: 1.25rem 2.5rem !important;
        font-size: 1.2rem !important;
    }
}

/* フォントサイズの最適化 */
@media (max-width: 768px) {
    body {
        font-size: 15px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    p {
        font-size: 1rem;
        line-height: 1.7;
    }
}

/* テーブルのモバイル最適化 */
@media (max-width: 768px) {
    .comparison-table {
        font-size: 0.85rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.5rem 0.25rem;
    }
    
    /* テーブルを横スクロール可能に */
    .comparison-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* カードレイアウトの最適化 */
@media (max-width: 768px) {
    .product-card,
    .benefit-card,
    .case-card,
    .industry-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .product-card h3,
    .case-card h3 {
        font-size: 1.2rem;
    }
}

/* 余白の調整 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    section {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
}

/* フローティングCTAのモバイル最適化（改善版） */
@media (max-width: 768px) {
    .floating-cta {
        bottom: 80px; /* 下部ナビゲーションと被らないように */
        right: 15px;
    }
    
    .floating-cta-button {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .floating-cta-button span {
        display: none; /* テキストを非表示 */
    }
    
    .floating-cta-button i {
        font-size: 1.8rem;
        margin: 0;
    }
}

/* お問い合わせフォームのモバイル最適化 */
@media (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        font-size: 16px; /* iOSのズームを防ぐ */
        padding: 0.875rem;
    }
    
    textarea {
        min-height: 150px;
    }
}

/* ヘッダーのモバイル最適化 */
@media (max-width: 768px) {
    .header {
        position: sticky;
        top: 0;
    }
    
    .logo h1 a {
        font-size: 1.4rem;
    }
    
    .logo-subtitle {
        font-size: 0.7rem;
    }
    
    /* ヘッダー電話番号は非表示 */
    .header-phone {
        display: none !important;
    }
}

/* モバイルメニューの改善 */
@media (max-width: 768px) {
    .nav.active {
        background: white;
        padding: 1rem;
        border-top: 1px solid #e2e8f0;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    
    .nav.active ul {
        gap: 0;
    }
    
    .nav.active li {
        border-bottom: 1px solid #e2e8f0;
    }
    
    .nav.active li:last-child {
        border-bottom: none;
    }
    
    .nav.active a {
        display: block;
        padding: 1rem;
        font-size: 1.05rem;
    }
}

/* 必須要件セクションのスタイル */
.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.requirement-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.requirement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.requirement-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-size: 1.8rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 1.5rem auto;
}

.requirement-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
    text-align: center;
}

.requirement-card p {
    font-size: 1rem;
    color: #64748b;
    line-height: 1.7;
    text-align: center;
}

/* ブログ記事のモバイル最適化 */
@media (max-width: 768px) {
    /* 必須要件セクションのモバイル対応 */
    .requirements-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .requirement-card {
        padding: 1.5rem;
    }
    
    .requirement-number {
        width: 45px;
        height: 45px;
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }
    
    .requirement-card h3 {
        font-size: 1.15rem;
    }
    
    .requirement-card p {
        font-size: 0.95rem;
    }
    
    /* 記事タイトル */
    .post-header h1 {
        font-size: 1.6rem !important;
        line-height: 1.4 !important;
        margin-bottom: 1.5rem !important;
    }
    
    /* 見出しを大きく */
    .post-content h2 {
        font-size: 1.5rem !important;
        font-weight: 700 !important;
        margin-top: 2.5rem !important;
        margin-bottom: 1.5rem !important;
        padding: 1rem 1.25rem !important;
        background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
        border-left: 6px solid #3b82f6 !important;
        border-radius: 8px !important;
    }
    
    .post-content h3 {
        font-size: 1.25rem !important;
        font-weight: 700 !important;
        margin-top: 2rem !important;
        margin-bottom: 1rem !important;
        padding: 0.75rem 1rem !important;
        background: #fef3c7 !important;
        border-left: 4px solid #f59e0b !important;
        border-radius: 6px !important;
    }
    
    /* 箇条書きの行間を広く */
    .post-content ul,
    .post-content ol {
        line-height: 2 !important;
        margin: 1.5rem 0 !important;
        padding-left: 1.5rem !important;
    }
    
    .post-content li {
        margin-bottom: 1rem !important;
        font-size: 1.05rem !important;
    }
    
    /* 段落の余白 */
    .post-content p {
        margin-bottom: 1.5rem !important;
        line-height: 1.8 !important;
        font-size: 1.05rem !important;
    }
    
    /* 数字を強調 */
    .post-content strong {
        color: #dc2626 !important;
        font-size: 1.15em !important;
    }
    
    /* ボックススタイル */
    .warning-box,
    .info-box,
    .highlight-box,
    .success-box {
        margin: 2rem 0 !important;
        padding: 1.5rem !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
    }
    
    .warning-box {
        background: #fef2f2 !important;
        border-left: 6px solid #dc2626 !important;
    }
    
    .info-box {
        background: #eff6ff !important;
        border-left: 6px solid #3b82f6 !important;
    }
    
    .highlight-box {
        background: #f0fdf4 !important;
        border-left: 6px solid #10b981 !important;
    }
    
    /* 課題セクションの強調 */
    section#challenges .post-content > p,
    section#challenges .post-content > ul,
    section#challenges .post-content > div {
        background: #fef2f2 !important;
        border-left: 6px solid #dc2626 !important;
        padding: 1.25rem !important;
        border-radius: 10px !important;
        margin: 1.5rem 0 !important;
    }
    
    section#challenges h3 {
        background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%) !important;
        border-left: 6px solid #dc2626 !important;
        color: #991b1b !important;
        padding: 1rem 1.25rem !important;
        font-size: 1.3rem !important;
        margin: 2rem 0 1rem 0 !important;
    }
    
    section#challenges h3 i {
        color: #dc2626 !important;
        font-size: 1.4rem !important;
    }
    
    /* 数字の強調 - 課題セクション専用 */
    section#challenges strong,
    section#challenges em {
        background: linear-gradient(135deg, #fef08a 0%, #fde047 100%) !important;
        padding: 0.15rem 0.5rem !important;
        border-radius: 6px !important;
        color: #991b1b !important;
        font-size: 1.2em !important;
        font-weight: 900 !important;
        font-style: normal !important;
        display: inline-block !important;
    }
    
    /* アイコンを大きく */
    .post-content i.fas {
        font-size: 1.3rem !important;
        margin-right: 0.5rem !important;
    }
    
    /* 結論ボックスのモバイル対応（インラインスタイルを上書き） */
    .conclusion-first {
        margin-bottom: 2rem !important;
        padding: 1.5rem !important;
    }
    
    .conclusion-first h2 {
        font-size: 1.3rem !important;
        margin-bottom: 1rem !important;
    }
    
    .conclusion-first h2 i {
        font-size: 1.3rem !important;
    }
    
    /* 結論ボックス内の白いカード */
    .conclusion-first > div[style*="background: white"] {
        padding: 1.25rem !important;
        margin-bottom: 1.25rem !important;
    }
    
    .conclusion-first > div[style*="background: white"] p {
        font-size: 1rem !important;
        line-height: 1.7 !important;
        margin-bottom: 0.75rem !important;
    }
    
    .conclusion-first > div[style*="background: white"] p span {
        font-size: 1.15rem !important;
    }
    
    /* 実績カードグリッド */
    .conclusion-first > div[style*="display: grid"] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        margin-bottom: 1.25rem !important;
    }
    
    .conclusion-first > div[style*="display: grid"] > div {
        padding: 1.25rem !important;
    }
    
    .conclusion-first .stat-number,
    .conclusion-first > div[style*="display: grid"] > div > div:first-child {
        font-size: 2.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* おすすめの人ボックス */
    .conclusion-first > div[style*="background: #fffbeb"] {
        padding: 1.25rem !important;
        border-radius: 10px !important;
    }
    
    .conclusion-first > div[style*="background: #fffbeb"] h3 {
        font-size: 1.05rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .conclusion-first > div[style*="background: #fffbeb"] ul {
        padding-left: 1.25rem !important;
        line-height: 1.8 !important;
    }
    
    .conclusion-first > div[style*="background: #fffbeb"] li {
        font-size: 0.95rem !important;
        margin-bottom: 0.5rem !important;
    }
}

/* 超小型スマホ */
@media (max-width: 480px) {
    .post-content h2 {
        font-size: 1.3rem !important;
        padding: 0.875rem 1rem !important;
    }
    
    .post-content h3 {
        font-size: 1.15rem !important;
        padding: 0.625rem 0.875rem !important;
    }
    
    .post-content li {
        font-size: 1rem !important;
    }
    
    /* 結論ボックスの超小型対応 */
    .conclusion-first {
        padding: 1.25rem !important;
    }
    
    .conclusion-first h2 {
        font-size: 1.2rem !important;
    }
    
    .conclusion-first > div[style*="background: white"] p {
        font-size: 0.95rem !important;
    }
    
    .conclusion-first > div[style*="background: white"] p span {
        font-size: 1.1rem !important;
    }
    
    .conclusion-first .stat-number,
    .conclusion-first > div[style*="display: grid"] > div > div:first-child {
        font-size: 2.2rem !important;
    }
}


/* タッチデバイス用の調整 */
@media (hover: none) and (pointer: coarse) {
    /* ホバーエフェクトを削除 */
    a:hover,
    button:hover {
        transform: none;
    }
    
    /* タップ時のハイライト色 */
    a, button {
        -webkit-tap-highlight-color: rgba(16, 185, 129, 0.3);
    }
}

/* 横向き表示の最適化 */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 1.4rem !important;
    }
    
    .hero-stats {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* ダークモード対応（オプション） */
@media (prefers-color-scheme: dark) {
    /* 必要に応じてダークモードスタイルを追加 */
}

/* 高コントラストモード対応 */
@media (prefers-contrast: high) {
    body {
        color: #000;
        background: #fff;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* 縮小モーション対応（アクセシビリティ） */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
