/* レスポンシブデザイン */

/* タブレット (768px以下) */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    /* ヘッダー */
    .header {
        background: rgba(255, 255, 255, 0.98) !important;
    }
    
    .nav {
        display: none;
    }

    .hamburger {
        display: flex;
    }
    
    .hamburger span {
        background-color: var(--primary-color);
    }

    /* メインビジュアル */
    .hero {
        height: 100vh;
        min-height: 600px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    /* モバイルでのhero-visualとcode-output非表示 */
    .hero-visual {
        display: none;
    }

    .code-output {
        display: none;
    }

    .hero-title-main {
        font-size: 2.5rem;
    }

    .hero-title-sub {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    /* セクションタイトル */
    .section-title {
        font-size: 2rem;
    }

    /* 会社概要 */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .company-info {
        max-width: 500px;
        margin: 2rem auto 0;
    }

    .info-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .representative-info {
        margin-top: 2rem;
    }
    
    .experience-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        align-items: center;
    }
    
    .experience-item i {
        margin: 0 auto;
    }

    /* our mission */
    .mission-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .mission {
        background: url('../img/mission_sp.png');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        background-attachment: scroll;
    }

    
    .representative-message {
        padding: 1.5rem;
    }

    .profile-image {
        width: 250px;
        height: 250px;
    }

    /* お問い合わせ */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* フッター */
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }
}

/* スマートフォン (480px以下) */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    /* ヘッダー */
    .header {
        background: rgba(255, 255, 255, 0.98) !important;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }

    .logo-subtitle {
        font-size: 0.8rem;
    }

    /* メインビジュアル */
    .hero {
        height: 100vh;
        min-height: 500px;
    }

    .hero-title-main {
        font-size: 2rem;
    }

    .hero-title-sub {
        font-size: 1.5rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-highlight {
        flex-direction: column;
        gap: 1rem;
    }
    
    .highlight-item {
        padding: 0.5rem 1rem;
        color: var(--primary-color);
    }
    
    .highlight-item span {
        color: var(--primary-color);
    }
    
    .highlight-item:hover,
    .highlight-item:active {
        background: var(--primary-gradient);
        color: white;
    }
    
    .highlight-item:hover span,
    .highlight-item:active span {
        color: white;
    }
    
    .highlight-item:hover i,
    .highlight-item:active i {
        color: white;
    }

    /* スマートフォンでのhero-visualとcode-output完全非表示 */
    .hero-visual {
        display: none !important;
    }

    .code-output {
        display: none !important;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }

    /* セクションタイトル */
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    /* 強み・特徴 */
    .features {
        padding: 60px 0;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    /* 会社概要 */
    .about {
        padding: 60px 0;
    }

    .about-content {
        gap: 1.5rem;
    }

    .profile-image {
        width: 200px;
        height: 200px;
    }

    .office-image {
        width: 150px;
        height: 150px;
        font-size: 3rem;
    }

    /* サービス */
    .services {
        padding: 60px 0;
        background-color: #ffffff !important;
        color: #000000 !important;
    }
    
    .services .section-title {
        color: #000000 !important;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-card {
        padding: 1.5rem;
        color: #000000 !important;
    }
    
    .service-card h3 {
        color: #000000 !important;
    }
    
    .service-card p {
        color: #333333 !important;
    }
    
    .service-features li {
        color: #333333 !important;
    }

    /* ポートフォリオ */
    .portfolio {
        padding: 60px 0;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .portfolio-item {
        max-width: 400px;
        margin: 0 auto;
    }

    /* ニュース */
    .news {
        padding: 60px 0;
    }

    .news-item {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .news-date {
        min-width: auto;
    }

    /* 採用情報 */
    .recruit {
        padding: 60px 0;
    }

    .recruit-positions {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .position-card {
        padding: 1.5rem;
    }

    .recruit-benefits ul {
        grid-template-columns: 1fr;
    }

    /* お問い合わせ */
    .contact {
        padding: 60px 0;
    }

    .contact-content {
        gap: 1.5rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        align-items: center;
    }
    
    .contact-item i {
        margin: 0 auto;
    }

    /* フッター */
    .footer {
        padding: 2rem 0 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }

    /* 全体的な調整 */
    .features,
    .about,
    .services,
    .portfolio,
    .news,
    .clients,
    .contact {
        padding: 60px 0;
    }
    
    /* our mission - スマートフォン用 */
    .mission {
        background: url('../img/mission_sp.png');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        background-attachment: scroll;
        padding: 60px 0;
    }

    /* 主要取引先 */
    .clients-logos {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .clients-title {
        font-size: 2rem;
    }

    .clients-background {
        background-attachment: scroll;
    }
}

/* 超小型デバイス (320px以下) */
@media (max-width: 320px) {
    .hero-title-main {
        font-size: 1.8rem;
    }

    .hero-title-sub {
        font-size: 1.3rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    /* 超小型デバイスでのhero-visualとcode-output非表示 */
    .hero-visual {
        display: none !important;
    }

    .code-output {
        display: none !important;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .feature-card,
    .service-card {
        padding: 1rem;
    }

    /* 主要取引先 */
    .clients-slider-container {
        padding: 1rem 0;
    }
    
    .clients-logos {
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .client-logo-item {
        min-width: 200px;
        max-width: 200px;
        min-height: 100px;
    }
    
    .logo-placeholder {
        height: 80px;
        font-size: 0.9rem;
    }
    
    .client-logo-image {
        width: 140px;
        height: 60px;
    }

    .clients-title {
        font-size: 1.8rem;
    }
    
    /* スマホでのナビゲーション改善 */
    .clients-navigation {
        gap: 1rem;
        margin-top: 1.5rem;
    }
    
    .nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .nav-dots {
        gap: 0.3rem;
    }
    
    .dot {
        width: 6px;
        height: 6px;
    }

    .contact-form {
        padding: 1rem;
    }
}

/* 高解像度ディスプレイ対応 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero::before {
        background-size: 20px 20px;
    }
}

/* 印刷用スタイル */
@media print {
    .header,
    .hero-buttons,
    .contact-form,
    .footer {
        display: none;
    }

    .hero {
        padding: 20px 0;
    }

    .section-title {
        page-break-after: avoid;
    }

    .feature-card,
    .service-card,
    .portfolio-item {
        page-break-inside: avoid;
    }
}



/* アクセシビリティ対応 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* フォーカス表示の改善 - outlineを無効化 */
.btn:focus,
.nav-list a:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
}

/* ハイコントラストモード対応 */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0000ff;
        --text-color: #000000;
        --text-light: #333333;
        --border-color: #000000;
    }

    .btn-primary {
        background-color: #000000;
        color: #ffffff;
        border: 2px solid #000000;
    }

    .btn-secondary {
        background-color: #ffffff;
        color: #000000;
        border: 2px solid #000000;
    }
}
