/* === レスポンシブスタイル === */

/* Large Devices (デスクトップ, 1200px未満) */
@media (max-width: 1199.98px) {
    .hero-content h2 {
        font-size: 3rem;
    }
    
    .section-header h2 {
        font-size: 2.2rem;
    }
    
    .expertise-container {
        padding: 0 var(--spacing-md);
    }
}

/* Medium Devices (タブレット, 992px未満) */
@media (max-width: 991.98px) {
    .hero-content h2 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .expertise-container {
        flex-direction: column-reverse;
    }
    
    .expertise-image {
        margin-bottom: var(--spacing-lg);
    }
    
    .services-container {
        padding: 0 var(--spacing-sm);
    }
}

/* Small Devices (モバイル横向き, 768px未満) */
@media (max-width: 767.98px) {
    html {
        font-size: 14px;
    }
    
    .section {
        padding: var(--spacing-lg) var(--spacing-sm);
    }
    
    .header {
        padding: var(--spacing-sm);
    }
    
    .logo h1 {
        font-size: 1.3rem;
    }
    
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        background-color: var(--color-bg-primary);
        padding: var(--spacing-xl) var(--spacing-md);
        transition: right 0.3s ease;
        z-index: 99;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    }
    
    .nav ul {
        flex-direction: column;
    }
    
    .nav ul li {
        margin-left: 0;
        margin-bottom: var(--spacing-md);
    }
    
    .nav ul li a {
        font-size: 1.2rem;
    }
    
    .menu-toggle {
        display: flex;
        z-index: 100;
    }
    
    .hero-content h2 {
        font-size: 2.2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .services-container {
        flex-direction: column;
        align-items: center;
    }
    
    .service-card {
        max-width: 100%;
        margin-bottom: var(--spacing-md);
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .visit-counter {
        text-align: left;
        margin-top: var(--spacing-md);
    }
}

/* Extra Small Devices (モバイル縦向き, 576px未満) */
@media (max-width: 575.98px) {
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .section-header h2 {
        font-size: 1.6rem;
    }
    
    .cta-button {
        font-size: 1rem;
        padding: var(--spacing-xs) var(--spacing-md);
    }
    
    .qualifications h3, 
    .case-studies h3 {
        font-size: 1.5rem;
    }
    
    .form-container {
        padding: var(--spacing-sm);
    }
    
    .submit-button {
        width: 100%;
    }
    
    .case-study {
        padding: var(--spacing-xs);
    }
}

/* TikTok風の縦スクロール仕様のためのスタイル（すべてのデバイス） */
@media (min-aspect-ratio: 2/3) {
    .section {
        min-height: 100vh;
        height: 100vh;
        overflow: hidden;
    }
}

/* モバイルデバイスでの縦スクロール最適化 */
@media (max-width: 767.98px) and (orientation: portrait) {
    .section {
        min-height: 100vh;
        height: auto;
        padding-top: 80px;
        padding-bottom: var(--spacing-xl);
    }
    
    .hero-section {
        height: 100vh;
        min-height: 100vh;
    }
}

/* スクロールスナップ */
html.snapping {
    scroll-snap-type: y mandatory;
}

html.snapping .section {
    scroll-snap-align: start;
}