/*
 * Responsive Design Styles
 * レスポンシブデザイン専用CSS
 * style.cssから分離された軽量化ファイル
 */

/* ==========================================================================
   Mobile Menu Styles
   ========================================================================== */

/* Body when menu is open */
.menu-open {
    overflow: hidden;
}

/* ==========================================================================
   Tablet Design (1199px以下)
   ========================================================================== */

@media (max-width: 1199px) {
    :root {
        --spacing-20: 4rem;
        --spacing-24: 5rem;
        --container-padding: var(--spacing-6);
    }
    
    .header-container {
        grid-template-columns: auto 1fr auto auto;
        gap: 20px;
        padding: var(--spacing-4) 20px;
    }

    .nav-wrapper {
        gap: 14px;
    }

    /* Navigation */
    .nav-menu {
        gap: var(--spacing-4);
    }
    
    .nav-menu a {
        padding: var(--spacing-2) var(--spacing-3);
        font-size: var(--font-size-sm);
    }
    
    .header-contact-btn {
        padding: var(--spacing-2) var(--spacing-4);
        font-size: var(--font-size-sm);
        margin-left: var(--spacing-4);
    }
    
    /* Typography */
    .hero-title {
        font-size: var(--font-size-6xl);
    }
    
    .section-title {
        font-size: var(--font-size-4xl);
    }
    
    /* Layout */
    .container {
        padding: 0 var(--spacing-6);
    }
    
    /* Cards */
    .card {
        padding: var(--spacing-6);
    }
    
    .card-icon {
        width: 70px;
        height: 70px;
        font-size: var(--font-size-xl);
    }
    
    /* Text effects */
    .text-giant {
        font-size: 10rem;
    }
}

/* ==========================================================================
   Tablet Navigation (1024px以下)
   ========================================================================== */

@media (max-width: 1024px) {
    .header-container {
        padding: var(--spacing-3) 20px;
        grid-template-columns: auto auto;
        gap: var(--spacing-4);
    }

    .mobile-menu-toggle {
        display: flex !important;
        justify-self: end;
    }

    .main-navigation {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        transition: var(--transition-base);
        z-index: 999;
        order: 2;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-wrapper {
        display: none;
    }

    .main-navigation.active .nav-wrapper {
        display: flex;
        flex-direction: column;
        gap: var(--spacing-6);
    }

    .main-navigation.active {
        left: 0;
    }

    .nav-menu {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        height: 100%;
        gap: var(--spacing-6);
        padding: var(--spacing-8);
    }

    .nav-menu li {
        opacity: 0;
        transform: translateY(-20px);
        transition: all 0.3s ease;
    }

    .nav-menu a {
        font-size: var(--font-size-xl);
        padding: var(--spacing-4) var(--spacing-6);
        border-radius: var(--radius-xl);
        color: var(--color-neutral-700);
        background: rgba(31, 78, 121, 0.05);
        min-width: 200px;
        text-align: center;
    }

    .nav-menu a:hover {
        background: var(--color-primary);
        color: white;
        transform: translateY(-2px);
        box-shadow: var(--shadow-3d-medium);
    }

    .nav-menu li:last-child a {
        background: var(--color-primary-gradient);
        color: white;
    }

    .nav-menu li:last-child a:hover {
        background: var(--color-primary-dark);
        transform: translateY(-3px);
    }

    .header-actions {
        display: none;
    }

    .header-contact-btn {
        display: none;
    }
}

/* ==========================================================================
   Tablet Portrait (768px以下)
   ========================================================================== */

@media (max-width: 768px) {
    :root {
        --spacing-16: 3rem;
        --spacing-20: 3.5rem;
        --spacing-24: 4rem;
        --container-padding: var(--spacing-4);
    }
    
    /* Header Mobile */
    .header-container {
        padding: var(--spacing-3) 20px;
        grid-template-columns: auto auto;
        gap: var(--spacing-4);
    }
    
    .mobile-menu-toggle {
        display: flex;
        justify-self: end;
    }
    
    .main-navigation {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        transition: var(--transition-base);
        z-index: 999;
        order: 2;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .main-navigation.active {
        left: 0;
    }
    
    .nav-menu {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        height: 100%;
        gap: var(--spacing-6);
        padding: var(--spacing-8);
    }
    
    .nav-menu li {
        opacity: 0;
        transform: translateY(-20px);
        transition: all 0.3s ease;
    }
    
    .nav-menu a {
        font-size: var(--font-size-xl);
        padding: var(--spacing-4) var(--spacing-6);
        border-radius: var(--radius-xl);
        color: var(--color-neutral-700);
        background: rgba(31, 78, 121, 0.05);
        min-width: 200px;
        text-align: center;
    }
    
    .nav-menu a:hover {
        background: var(--color-primary);
        color: white;
        transform: translateY(-2px);
        box-shadow: var(--shadow-3d-medium);
    }
    
    .nav-menu li:last-child a {
        background: var(--color-primary-gradient);
        color: white;
    }
    
    .nav-menu li:last-child a:hover {
        background: var(--color-primary-dark);
        transform: translateY(-3px);
    }
    
    .header-actions {
        display: none;
    }

    .header-contact-btn {
        display: none;
    }
    
    /* Hero Mobile */
    .hero-section {
        min-height: 80vh;
        margin-top: 70px;
    }
    
    .hero-content {
        text-align: left;
        padding: var(--spacing-12) 0;
    }
    
    .hero-title {
        font-size: var(--font-size-4xl);
        margin-bottom: var(--spacing-4);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-xl);
        margin-bottom: var(--spacing-4);
    }
    
    .hero-description {
        font-size: var(--font-size-base);
        margin: 0 0 var(--spacing-6);
        max-width: 100%;
    }

    .hero-buttons {
        justify-content: flex-start;
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-3);
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        padding: var(--spacing-4) var(--spacing-6);
        font-size: var(--font-size-base);
    }
    
    /* Grid Mobile */
    .row {
        flex-direction: column;
        margin: 0;
    }
    
    .col,
    [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0;
        margin-bottom: var(--spacing-6);
    }
    
    /* Cards Mobile */
    .card {
        padding: var(--spacing-6);
        margin-bottom: var(--spacing-6);
        border-radius: var(--radius-2xl);
    }
    
    .card:hover {
        transform: translateY(-5px);
    }
    
    .card-icon {
        width: 60px;
        height: 60px;
        font-size: var(--font-size-xl);
        margin-bottom: var(--spacing-4);
    }
    
    .card-title {
        font-size: var(--font-size-lg);
        margin-bottom: var(--spacing-3);
    }
    
    .card-content {
        font-size: var(--font-size-sm);
        margin-bottom: var(--spacing-4);
    }
    
    /* Sections Mobile */
    .section {
        padding: var(--spacing-16) 0;
    }
    
    .section-header {
        margin-bottom: var(--spacing-12);
        text-align: left;
    }
    
    .section-title {
        font-size: var(--font-size-3xl);
        margin-bottom: var(--spacing-3);
    }
    
    .section-subtitle {
        font-size: var(--font-size-xs);
        margin-bottom: var(--spacing-2);
        margin-left: 0;
        margin-right: 0;
    }

    .section-description {
        font-size: var(--font-size-base);
        padding: 0;
    }
    
    /* Footer Mobile */
    .site-footer {
        padding: var(--spacing-16) 0 var(--spacing-6);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-8);
        text-align: left;
    }
    
    .footer-section h3 {
        font-size: var(--font-size-lg);
        margin-bottom: var(--spacing-3);
        border-bottom: none !important;
        padding-bottom: 0;
    }
    
    .footer-section p,
    .footer-section li {
        font-size: var(--font-size-sm);
    }
    
    .footer-bottom {
        margin-top: var(--spacing-8);
        font-size: var(--font-size-xs);
    }
    
    /* Footer CTA Mobile */
    .footer-cta {
        flex-direction: column;
        gap: var(--spacing-3);
        margin-bottom: var(--spacing-6);
    }
    
    .footer-phone-btn,
    .footer-contact-btn {
        width: 100%;
        max-width: 280px;
        padding: var(--spacing-4) var(--spacing-6);
        font-size: var(--font-size-base);
        min-width: auto;
    }
    
    /* Contact Hours Mobile */
    .contact-hours {
        justify-content: flex-start;
        text-align: left;
    }
    
    /* 3D Effects Mobile - Reduced for Performance */
    .card:hover,
    .btn:hover {
        transform: translateY(-3px);
    }
    
    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-3d-medium);
    }
    
    .text-giant {
        display: none;
    }
    
    /* Skewed sections adjustment */
    .section-alt::before,
    .section-alt::after,
    .hero-section::after {
        height: 50px;
    }
    
    /* Page Header Mobile */
    .page-header {
        min-height: 50vh;
        margin-top: 70px;
    }
    
    .page-header-content {
        padding: var(--spacing-6) var(--spacing-4);
    }
    
    .page-header-title {
        font-size: var(--font-size-2xl);
        margin-bottom: var(--spacing-3);
    }
    
    .page-header-subtitle {
        font-size: var(--font-size-base);
        margin-bottom: var(--spacing-4);
    }
    
    .page-header-decoration {
        font-size: 6rem;
        right: -5%;
    }
}

/* ==========================================================================
   Mobile Portrait (480px以下)
   ========================================================================== */

@media (max-width: 480px) {
    :root {
        --spacing-12: 2rem;
        --spacing-16: 2.5rem;
        --spacing-20: 3rem;
        --spacing-24: 3.5rem;
        --container-padding: var(--spacing-4);
    }
    
    /* Header */
    .header-container {
        padding: var(--spacing-2) 0;
    }
    
    .site-logo img {
        height: 40px;
    }
    
    .site-logo h1 {
        font-size: var(--font-size-lg);
    }
    
    /* Navigation */
    .nav-menu {
        gap: var(--spacing-4);
        padding: var(--spacing-6);
    }
    
    .nav-menu a {
        font-size: var(--font-size-lg);
        padding: var(--spacing-3) var(--spacing-4);
        min-width: 180px;
    }
    
    /* Hero */
    .hero-section {
        min-height: 70vh;
        margin-top: 60px;
    }
    
    .hero-content {
        padding: var(--spacing-8) 0;
    }
    
    .hero-title {
        font-size: var(--font-size-3xl);
        line-height: 1.2;
        margin-bottom: var(--spacing-3);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-lg);
        margin-bottom: var(--spacing-3);
    }
    
    .hero-description {
        font-size: var(--font-size-sm);
        margin: 0 0 var(--spacing-4);
        max-width: 100%;
    }
    
    .btn {
        max-width: 240px;
        padding: var(--spacing-3) var(--spacing-4);
        font-size: var(--font-size-sm);
    }
    
    /* Typography */
    .section-title {
        font-size: var(--font-size-2xl);
        line-height: 1.3;
    }
    
    h1 {
        font-size: var(--font-size-3xl);
    }
    
    h2 {
        font-size: var(--font-size-2xl);
    }
    
    h3 {
        font-size: var(--font-size-xl);
    }
    
    /* Cards */
    .card {
        padding: var(--spacing-4);
        border-radius: var(--radius-xl);
    }
    
    .card-icon {
        width: 50px;
        height: 50px;
        font-size: var(--font-size-lg);
        margin-bottom: var(--spacing-3);
    }
    
    .card-title {
        font-size: var(--font-size-base);
        margin-bottom: var(--spacing-2);
    }
    
    .card-content {
        font-size: var(--font-size-xs);
        margin-bottom: var(--spacing-3);
        line-height: 1.6;
    }
    
    /* Sections */
    .section {
        padding: var(--spacing-12) 0;
    }
    
    .section-header {
        margin-bottom: var(--spacing-8);
        text-align: left;
    }
    
    .section-subtitle {
        letter-spacing: 1px;
    }
    
    .section-description {
        font-size: var(--font-size-sm);
        line-height: 1.7;
    }
    
    /* Page Header */
    .page-header {
        min-height: 40vh;
        margin-top: 60px;
    }
    
    .page-header-content {
        padding: var(--spacing-4);
    }
    
    .page-header-title {
        font-size: var(--font-size-xl);
        line-height: 1.3;
    }
    
    .page-header-subtitle {
        font-size: var(--font-size-sm);
        margin-bottom: var(--spacing-3);
    }
    
    .page-header-decoration {
        display: none;
    }
    

    
    /* Simplify 3D effects on small screens */
    .card:hover,
    .btn:hover {
        transform: translateY(-2px);
    }
    
    /* Reduce animation complexity */
    .page-header::after,
    .section-alt::before,
    .section-alt::after,
    .hero-section::after {
        height: 30px;
        transform: skewY(-1deg);
    }
    
    /* Container adjustments */
    .container {
        padding: 0 var(--spacing-4);
    }
    
    /* Footer */
    .footer-content {
        gap: var(--spacing-6);
    }
    
    .footer-section h3 {
        font-size: var(--font-size-base);
        border-bottom: none !important;
        padding-bottom: 0;
        text-align: left;
    }
    
    .footer-section p,
    .footer-section li {
        font-size: var(--font-size-xs);
    }
    
    .footer-bottom {
        font-size: var(--font-size-xs);
    }
    
    /* Footer CTA Small Screens */
    .footer-cta {
        gap: var(--spacing-2);
        margin-bottom: var(--spacing-4);
    }
    
    .footer-phone-btn,
    .footer-contact-btn {
        max-width: 100%;
        padding: var(--spacing-3) var(--spacing-4);
        font-size: var(--font-size-sm);
    }
    
    /* Contact Hours Small Screens */
    .contact-hours {
        justify-content: flex-start;
        text-align: left;
        font-size: var(--font-size-xs);
        margin-bottom: var(--spacing-3);
    }
}

/* ==========================================================================
   Ultra-wide Screens (1400px以上)
   ========================================================================== */

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-title {
        font-size: var(--font-size-7xl);
    }
    
    .section-title {
        font-size: var(--font-size-5xl);
    }
    
    .text-giant {
        font-size: 14rem;
    }
    
    .card {
        padding: var(--spacing-10);
    }
    
    .card-icon {
        width: 90px;
        height: 90px;
        font-size: var(--font-size-3xl);
    }
}

/* ==========================================================================
   High DPI / Retina Displays
   ========================================================================== */

@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
    /* Optimize for high DPI displays */
    .card-icon,
    .btn {
        border-radius: calc(var(--radius-xl) + 1px);
    }
    
    .page-header-decoration,
    .text-giant {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .mobile-menu-toggle,
    .main-navigation,
    .page-header-decoration,
    .page-header-float,
    .hero-buttons,
    .scroll-indicator {
        display: none !important;
    }
    
    .page-header {
        min-height: auto;
        padding: 2rem 0;
        background: white !important;
        color: black !important;
        margin-top: 0;
    }
    
    .page-header::before,
    .page-header::after {
        display: none;
    }
    
    .page-header-title {
        color: black !important;
        text-shadow: none !important;
        font-size: 2rem !important;
    }}
