/* タブレット対応 (1100px以下) */
@media screen and (max-width: 1100px) {
    /* ヘッダー調整 */
    .logo-img {
        width: 300px;
    }

    .main-nav ul {
        gap: 24px;
    }

    .main-nav a {
        font-size: 1.45rem;
        white-space: nowrap;
    }
}

/* タブレット対応 (950px以下) */
@media screen and (max-width: 950px) {
    /* ヘッダー調整 */
    .logo-img {
        width: 280px;
    }

    .main-nav ul {
        gap: 20px;
    }

    .main-nav a {
        font-size: 1.4rem;
        white-space: nowrap;
    }
}

/* タブレット小 (850px以下) */
@media screen and (max-width: 850px) {
    /* ヘッダー調整 */
    .logo-img {
        width: 260px;
    }

    .main-nav ul {
        gap: 16px;
    }

    .main-nav a {
        font-size: 1.3rem;
        white-space: nowrap;
    }

    /* ヒーローセクション */
    .hero-title {
        font-size: 4.2rem;
    }

    .hero-lead {
        font-size: 1.8rem;
    }

    /* About */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Services */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    /* Works */
    .works-grid {
        grid-template-columns: 1fr;
    }

    /* Price */
    .price-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .price-card.featured {
        transform: scale(1);
    }

    /* History */
    .history-timeline::before {
        left: 100px;
    }

    .history-year {
        width: 80px;
        font-size: 2rem;
    }

    .history-year::after {
        left: 95px;
    }

    .history-content {
        padding: 20px;
    }

    /* Flow */
    .flow-timeline::before {
        left: 40px;
    }

    .flow-item {
        flex-direction: row !important;
        margin-left: 60px;
    }

    .flow-number {
        left: 40px;
    }

    .flow-content {
        width: calc(100% - 80px);
        margin-left: 40px !important;
    }

    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-nav {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* スマートフォン対応 (768px以下) */
@media screen and (max-width: 768px) {
    /* ヘッダー */
    .logo-img {
        width: 250px;
    }

    .main-nav,
    .header-cta .tel-btn {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .header-cta .contact-btn {
        padding: 8px 16px;
        font-size: 1.4rem;
    }

    /* モバイルメニュー */
    .mobile-nav {
        display: block;
        position: fixed;
        top: calc(var(--header-height) - 20px);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height) + 20px);
        background: white;
        transform: translateX(100%);
        transition: transform 0.3s;
        z-index: 999;
        overflow-y: auto;
    }

    .mobile-nav.active {
        transform: translateX(0);
    }

    .mobile-nav ul {
        padding: 20px;
    }

    .mobile-nav li {
        border-bottom: 1px solid var(--color-border);
    }

    .mobile-nav a {
        display: block;
        padding: 16px 0;
        font-size: 1.6rem;
        color: var(--color-text);
    }

    /* ヒーローセクション */
    .hero {
        min-height: 100vh;
    }

    .hero-title {
        font-size: 3.2rem;
    }

    .hero-title .text-line {
        margin-bottom: 8px;
    }

    .hero-lead {
        font-size: 1.6rem;
        padding: 0 20px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    .hero-cta .btn {
        width: 200px;
    }

    /* セクション共通 */
    .section {
        padding: 60px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

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

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-content {
        padding: 24px;
    }

    /* Works */
    .works-filter {
        flex-wrap: wrap;
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 1.4rem;
    }

    .work-image {
        height: 240px;
    }

    /* Price */
    .price-card {
        padding: 30px 20px;
    }

    .price-amount .number {
        font-size: 3.2rem;
    }

    /* History */
    .history-timeline::before {
        left: 60px;
    }

    .history-item {
        flex-direction: column;
        gap: 16px;
        margin: 30px 0;
    }

    .history-year {
        width: auto;
        text-align: left;
        font-size: 2rem;
        padding-left: 80px;
        padding-top: 0;
    }

    .history-year::after {
        left: 55px;
        top: 8px;
    }

    .history-content {
        padding: 20px;
        margin-left: 0;
    }

    .history-image img {
        max-width: 260px;
        margin: 0 auto;
    }

    /* Flow */
    .flow-timeline::before {
        left: 20px;
    }

    .flow-item {
        margin-left: 40px;
    }

    .flow-number {
        left: 20px;
        width: 48px;
        height: 48px;
        font-size: 1.6rem;
    }

    .flow-content {
        width: calc(100% - 60px);
        margin-left: 20px !important;
        padding: 20px;
    }

    .flow-content h3 {
        font-size: 1.8rem;
    }

    /* CTA */
    .cta {
        padding: 60px 0;
    }

    .cta-content h2 {
        font-size: 3rem;
    }

    .cta-content p {
        font-size: 1.6rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons .btn {
        width: 200px;
    }

    /* Contact */
    .contact-form {
        padding: 24px;
    }

    /* Footer */
    .footer-nav {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* ページトップボタン */
    .page-top {
        bottom: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
    }
}

/* 小型スマートフォン対応 (480px以下) */
@media screen and (max-width: 480px) {
    /* 基本設定 */
    .container {
        padding: 0 16px;
    }

    /* ヘッダー */
    .logo-img {
        width: 200px;
    }

    /* ヒーロー */
    .hero-title {
        font-size: 2.4rem;
    }

    .hero-lead {
        font-size: 1.4rem;
    }

    .hero-lead br {
        display: none;
    }

    /* セクション */
    .section {
        padding: 40px 0;
    }

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

    /* About */
    .about-item {
        padding: 24px 16px;
    }

    .about-item h3 {
        font-size: 2rem;
    }

    /* Services */
    .service-image {
        height: 200px;
    }

    .service-content h3 {
        font-size: 2rem;
    }

    /* Works */
    .work-image {
        height: 200px;
    }

    /* Price */
    .price-header h3 {
        font-size: 2rem;
    }

    .price-amount .number {
        font-size: 2.8rem;
    }

    /* History */
    .history-timeline::before {
        left: 40px;
    }

    .history-year {
        font-size: 1.8rem;
        padding-left: 60px;
    }

    .history-year::after {
        left: 35px;
        width: 10px;
        height: 10px;
    }

    .history-content {
        padding: 16px;
    }

    .history-content p {
        font-size: 1.4rem;
    }

    /* Flow */
    .flow-content h3 {
        font-size: 1.6rem;
    }

    .flow-content p {
        font-size: 1.4rem;
    }

    /* CTA */
    .cta-content h2 {
        font-size: 2.4rem;
    }

    .cta-content p {
        font-size: 1.4rem;
    }

    /* Contact */
    .contact-info h3 {
        font-size: 2rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 10px 12px;
    }

    /* Footer */
    .footer {
        padding: 40px 0 20px;
    }

    .footer-nav h4 {
        font-size: 1.6rem;
    }
}

/* プリント対応 */
@media print {
    .header,
    .hero-bg,
    .scroll-indicator,
    .page-top,
    .hamburger,
    .cta {
        display: none !important;
    }

    .section {
        page-break-inside: avoid;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    .container {
        max-width: 100%;
    }

    a {
        text-decoration: underline;
    }

    a[href^="http"]:after {
        content: " (" attr(href) ")";
    }
}

/* ダークモード対応（OSの設定に従う） */
@media (prefers-color-scheme: dark) {
    /* 必要に応じてダークモード用のスタイルを追加 */
}

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

    .form-group input,
    .form-group textarea {
        border-width: 2px;
    }
}

/* アニメーション無効化（ユーザー設定に従う） */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-bg-item {
        transition: none;
    }

    [data-aos] {
        opacity: 1;
        transform: none;
    }
}