/* ==========================================
   Mobile Optimization - Professional Setup
   ========================================== */

/* Base Mobile Styles */
@media (max-width: 768px) {
    /* Body基本設定 */
    body {
        font-size: 16px; /* 最低16pxでズーム防止 */
        line-height: 1.6;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    /* タッチターゲット最適化 */
    a, button, .btn, .service-tab, .medimatch-btn {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 12px 20px;
    }

    /* テキストの読みやすさ向上 */
    p {
        font-size: 16px;
        line-height: 1.7;
        margin-bottom: 1.25rem;
    }

    h1 {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
        line-height: 1.3;
        margin-bottom: 1rem;
    }

    h2 {
        font-size: clamp(1.5rem, 4vw, 2rem);
        line-height: 1.4;
        margin-bottom: 0.875rem;
    }

    h3 {
        font-size: clamp(1.25rem, 3.5vw, 1.75rem);
        line-height: 1.4;
        margin-bottom: 0.75rem;
    }

    /* 画像レスポンシブ対応 */
    img {
        max-width: 100%;
        height: auto;
        display: block;
    }

    /* コンテナの余白最適化 */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
        max-width: 100%;
    }

    /* セクションの余白調整 */
    section {
        padding: 3rem 0;
    }

    /* フォーム要素の最適化 */
    input, textarea, select {
        font-size: 16px; /* iOSズーム防止 */
        padding: 12px 16px;
        min-height: 44px;
    }
}

/* Small Mobile (iPhone SE, 375px) */
@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    p {
        font-size: 15px;
        line-height: 1.65;
    }

    h1 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    h2 {
        font-size: clamp(1.25rem, 5vw, 1.75rem);
    }

    h3 {
        font-size: clamp(1.1rem, 4vw, 1.5rem);
    }

    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    section {
        padding: 2.5rem 0;
    }
}

/* タッチデバイス向け最適化 */
@media (hover: none) and (pointer: coarse) {
    /* タッチフィードバック */
    a, button {
        -webkit-tap-highlight-color: rgba(26, 108, 191, 0.2);
    }

    /* スクロールパフォーマンス向上 */
    * {
        -webkit-overflow-scrolling: touch;
    }

    /* ホバー効果を無効化 */
    .service-card:hover,
    .showcase-card:hover {
        transform: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
}

/* アクセシビリティ: 大きめのテキストを優先 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
