/* タブレット対応 (768px - 1024px) */
@media screen and (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

/* スマートフォン対応 (max-width: 767px) */
@media screen and (max-width: 767px) {
    /* ヘッダー - モバイルメニュー */
    .header-content {
        padding: 0.8rem 0;
    }
    
    .logo a {
        font-size: 1.6rem;
    }
    
    .nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        transition: left 0.3s ease;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        z-index: 999;
    }
    
    .nav.active {
        left: 0;
    }
    
    .nav-list {
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
    }
    
    .nav-link {
        display: block;
        padding: 1rem;
        font-size: 1.1rem;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .mobile-menu-toggle.active .hamburger {
        background: transparent;
    }
    
    .mobile-menu-toggle.active .hamburger::before {
        transform: rotate(45deg);
        top: 0;
    }
    
    .mobile-menu-toggle.active .hamburger::after {
        transform: rotate(-45deg);
        top: 0;
    }
    
    /* ヒーローセクション */
    .hero {
        padding: 80px 0 50px;
    }
    
    .hero-title {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }
    
    .hero-description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .cta-button {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
    
    /* セクション共通 */
    .section {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    
    /* 会社概要 */
    .about-text h3 {
        font-size: 1.3rem;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-item {
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    /* サービス */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 2rem;
    }
    
    .service-icon {
        font-size: 2.5rem;
    }
    
    .service-card h3 {
        font-size: 1.3rem;
    }
    
    /* お問い合わせ */
    .contact-form {
        padding: 1.5rem;
    }
    
    .form-group {
        margin-bottom: 1.2rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.8rem;
        font-size: 1rem;
    }
    
    .submit-button {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
    
    /* フッター */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .footer-section h3,
    .footer-section h4 {
        margin-bottom: 0.8rem;
    }
    
    .footer-bottom {
        padding-top: 1.5rem;
    }
}

/* 小さなスマートフォン対応 (max-width: 480px) */
@media screen and (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .about-stats {
        gap: 0.8rem;
    }
    
    .stat-item {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .contact-form {
        padding: 1.2rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.7rem;
    }
}

/* 横向きスマートフォン対応 */
@media screen and (max-width: 767px) and (orientation: landscape) {
    .hero {
        padding: 70px 0 40px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .nav {
        height: calc(100vh - 60px);
        top: 60px;
    }
    
    .nav-list {
        padding: 1rem;
        gap: 0.8rem;
    }
    
    .nav-link {
        padding: 0.8rem;
        font-size: 1rem;
    }
}

/* タッチデバイス対応 */
@media (hover: none) {
    .cta-button:hover,
    .submit-button:hover,
    .service-card:hover {
        transform: none;
    }
    
    .nav-link:hover {
        color: inherit;
    }
    
    .footer-section a:hover {
        color: #94a3b8;
    }
}

/* 高解像度ディスプレイ対応 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }
    
    .service-card {
        border: 1px solid rgba(226, 232, 240, 0.8);
    }
}

/* ダークモード対応（オプション） */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a202c;
        color: #e2e8f0;
    }

    .header {
        background: #2d3748;
        box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    }

    .logo a {
        color: #63b3ed;
    }

    /* モバイルナビゲーションのダークモード対応 */
    .nav {
        background: #2d3748;
    }

    .nav-link {
        color: #e2e8f0;
        border-bottom-color: #4a5568;
    }

    .nav-link:hover {
        color: #63b3ed;
    }

    .hamburger,
    .hamburger::before,
    .hamburger::after {
        background: #e2e8f0;
    }
    
    .section-title {
        color: #e2e8f0;
    }
    
    .about,
    .contact {
        background: #2d3748;
    }
    
    .service-card {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .service-card:hover {
        border-color: #63b3ed;
    }
    
    .service-card h3 {
        color: #e2e8f0;
    }
    
    .service-card p {
        color: #a0aec0;
    }
    
    .contact-form {
        background: #2d3748;
    }

    /* フォームラベルの色 - 白色で見やすく */
    .form-group label {
        color: #ffffff;
    }

    /* 連絡先情報の色 - 白色で見やすく */
    .contact-info h3 {
        color: #ffffff;
    }

    .info-item span {
        color: #ffffff;
    }

    /* 会社概要セクションのテキスト */
    .about-text h3 {
        color: #ffffff;
    }

    .about-text p {
        color: #ffffff;
    }

    .stat-item {
        background: #1a202c;
    }

    .stat-number {
        color: #63b3ed;
    }

    .stat-label {
        color: #ffffff;
    }

    .form-group input,
    .form-group textarea {
        background: #1a202c;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .form-group input:focus,
    .form-group textarea:focus {
        border-color: #63b3ed;
    }
    
    .footer {
        background: #1a202c;
    }
    
    .footer-section h3,
    .footer-section h4 {
        color: #e2e8f0;
    }
    
    .footer-section a {
        color: #a0aec0;
    }
    
    .footer-section a:hover {
        color: #63b3ed;
    }
}