/* ===== HEIPI JAPAN - RESPONSIVE ENHANCEMENTS ===== */

/* ===== MOBILE OPTIMIZATIONS ===== */
@media (max-width: 767px) {
    /* Navigation Mobile Enhancements */
    .nav-container {
        padding: 0 0.5rem;
        height: 60px;
    }
    
    .nav-logo .logo-main {
        font-size: 1.5rem;
    }
    
    .nav-logo .logo-sub {
        font-size: 0.8rem;
    }
    
    .nav-menu {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        border-top: 1px solid var(--gray-200);
    }
    
    .nav-link {
        font-size: 1.1rem;
        padding: 0.5rem 0;
        border-bottom: 1px solid var(--gray-100);
    }
    
    .nav-cta {
        width: 100%;
        margin-top: 1rem;
        justify-content: center;
    }
    
    /* Hero Mobile Optimizations */
    .hero {
        min-height: 90vh;
        padding: 40px 0 40px;
    }
    
    .hero-container {
        padding-top: 0;
    }
    
    .hero-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        margin-bottom: 0.1rem;
        margin-top: -9rem;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 8rem;
    }
    
    .title-line {
        font-size: 1.2rem;
    }
    
    .title-main {
        font-size: 2rem;
    }
    
    .title-sub {
        font-size: 1rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
        line-height: 1.6;
        margin-bottom: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 0.8rem;
        align-items: center;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
        padding: 0.9rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Hero Visual Mobile */
    .hero-visual {
        gap: 1.5rem;
    }
    
    .visual-main-card {
        transform: rotate(0deg);
        padding: 1.2rem;
    }
    
    .main-visual-image {
        height: 250px;
    }
    
    .image-overlay-badge {
        top: 1.5rem;
        right: 1.5rem;
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }
    
    .visual-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.8rem;
        margin-top: 0.8rem;
    }
    
    .gallery-item {
        aspect-ratio: 1;
    }
    
    .gallery-overlay i {
        font-size: 1.2rem;
    }
    
    .visual-stats-enhanced {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        margin-top: 1.5rem;
    }
    
    .stat-card {
        padding: 1.2rem;
        gap: 0.8rem;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .hero-scroll {
        bottom: 1rem;
    }
    
    /* Section Headers Mobile */
    .section-header {
        margin-bottom: 2.5rem;
    }
    
    .section-badge {
        font-size: 0.8rem;
        padding: 0.4rem 1rem;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 0.8rem;
    }
    
    .section-subtitle {
        font-size: 1.1rem;
        line-height: 1.5;
    }
    
    /* About Section Mobile */
    .about {
        padding: 50px 0;
    }
    
    .about-content {
        gap: 2.5rem;
    }
    
    .about-text h3 {
        font-size: 1.5rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }
    
    .about-text p {
        font-size: 1.1rem;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .value-card {
        padding: 2rem 1.5rem;
        min-height: 240px;
        width: 100%;
    }
    
    .value-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .value-card h4 {
        font-size: 1.2rem;
        margin-bottom: 1.2rem;
    }
    
    .value-card p {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    /* Business Section Mobile */
    .business {
        padding: 50px 0;
    }
    
    .business-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .business-card {
        margin-bottom: 0;
        min-height: auto;
        width: 100%;
    }
    
    .business-content {
        padding: 1.5rem;
    }
    
    .business-content h3 {
        font-size: 1.4rem;
        margin-bottom: 0.8rem;
    }
    
    .business-content p {
        font-size: 1.05rem;
        line-height: 1.6;
        margin-bottom: 1rem;
    }
    
    .business-features {
        gap: 0.4rem;
    }
    
    .feature-tag {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
    }
    
    /* Products Section Mobile */
    .products {
        padding: 50px 0;
    }
    
    .products-content {
        gap: 2.5rem;
    }
    
    .featured-brand {
        grid-template-columns: 1fr;
        padding: 2rem;
        gap: 2rem;
    }
    
    .brand-content h3 {
        font-size: 2rem;
        margin-bottom: 0.8rem;
    }
    
    .brand-content p {
        font-size: 1.05rem;
        margin-bottom: 1.5rem;
        line-height: 1.6;
    }
    
    .btn-outline {
        width: 100%;
        justify-content: center;
        padding: 0.9rem 1.5rem;
    }
    
    .brand-visual > img {
        height: 250px;
        margin-bottom: 0.8rem;
    }
    
    .product-gallery {
        gap: 0.4rem;
    }
    
    .product-gallery img {
        height: 60px;
    }
    
    .brands-section h4,
    .unique-products h4 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .brand-item {
        padding: 1.2rem;
    }
    
    .brand-logo {
        width: 60px;
        height: 60px;
        margin-bottom: 0.8rem;
    }
    
    .brand-item h5 {
        font-size: 1rem;
    }
    
    .products-showcase {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .product-card {
        width: 100%;
    }
    
    .product-card img {
        aspect-ratio: 1/1;
    }
    
    .product-info {
        padding: 1.2rem;
    }
    
    .product-info h6 {
        font-size: 1.05rem;
        margin-bottom: 0.4rem;
    }
    
    .product-info p {
        font-size: 0.9rem;
    }
    
    /* History Section Mobile */
    .history {
        padding: 50px 0;
    }
    
    .history .container {
        padding: 0 0.5rem;
    }
    
    .timeline {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .timeline-item {
        margin-bottom: 1.5rem;
        width: 100%;
    }
    
    .timeline-marker {
        width: 100px;
        height: 50px;
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }
    
    .timeline-content {
        padding: 1rem;
        margin-top: 0.5rem;
        min-height: auto;
    }
    
    .timeline-image {
        height: 150px;
        margin-bottom: 1rem;
    }
    
    .timeline-content h4 {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }
    
    .timeline-content p {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 0.8rem;
    }
    
    .timeline-features {
        gap: 0.3rem;
        margin-top: 0.8rem;
    }
    
    .timeline-features .feature {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
    
    .global-stats {
        flex-direction: column;
        gap: 1rem;
        margin-top: 1rem;
    }
    
    .global-stats .stat {
        text-align: left;
    }
    
    .global-stats .stat-number {
        font-size: 1.5rem;
    }
    
    .global-stats .stat-label {
        font-size: 0.8rem;
    }
    
    /* Company Section Mobile */
    .company {
        padding: 50px 0;
    }
    
    .company-content {
        gap: 2.5rem;
    }
    
    .company-main {
        justify-content: stretch;
    }
    
    .company-details-section {
        padding: 2rem;
        max-width: none;
    }
    
    .company-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        text-align: left;
    }
    
    .company-label {
        font-size: 1rem;
    }
    
    .company-value {
        font-size: 1rem;
    }
    
    .overseas-offices h3 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .office-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .office-item {
        padding: 1rem;
    }
    
    .office-item img {
        height: 120px;
    }
    
    .office-item p {
        font-size: 0.9rem;
    }

    /* Contact Section Mobile */
    .contact {
        padding: 50px 0;
    }
    
    .contact-content {
        justify-content: stretch;
    }
    
    
    /* Contact Form Mobile */
    .contact-form-section {
        padding: 2rem;
        max-width: none;
    }
    
    .contact-form {
        gap: 1.2rem;
    }
    
    .form-group label {
        font-size: 0.95rem;
        margin-bottom: 0.3rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.8rem;
        font-size: 1rem;
    }
    
    .btn-submit {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        margin-top: 0.5rem;
    }
    
    /* Footer Mobile */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .footer-logo .logo-main {
        font-size: 1.8rem;
    }
    
    .footer-logo .logo-sub {
        font-size: 1rem;
    }
    
    .footer-logo .logo-group {
        font-size: 0.8rem;
    }
    
    .footer-description {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-section h4 {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }
    
    .footer-section ul {
        gap: 0.4rem;
    }
    
    .footer-section a,
    .footer-section li {
        font-size: 0.9rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding-top: 1.5rem;
    }
    
    .footer-bottom p {
        font-size: 0.85rem;
        order: 2;
    }
    
    .footer-buttons {
        order: 1;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.8rem;
    }
    
    .btn-footer {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

/* ===== TABLET OPTIMIZATIONS ===== */
@media (min-width: 768px) and (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .title-main {
        font-size: 3rem;
    }
    
    .about-main {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
    
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .business-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .featured-brand {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
        padding: 2.5rem;
    }
    
    .brands-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
    
    .products-showcase {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
    
    .timeline {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .timeline-item {
        width: 100%;
    }
    
    .timeline-marker {
        width: 100px;
        height: 50px;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
}

/* ===== LARGE SCREENS OPTIMIZATIONS ===== */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 4.5rem;
    }
    
    .title-main {
        font-size: 4.5rem;
    }
    
    .section-title {
        font-size: 3.5rem;
    }
    
    .values-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
    
    .business-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
    
    .products-showcase {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    .timeline {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1200px;
        gap: 2.5rem;
    }
}

/* ===== ULTRA-WIDE SCREENS ===== */
@media (min-width: 1800px) {
    .container {
        max-width: 1600px;
    }
    
    .hero-container {
        gap: 5rem;
    }
    
    .section-padding {
        padding: 100px 0;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .loading-screen,
    .navbar,
    .nav-toggle,
    .floating-elements,
    .hero-scroll,
    .back-to-top,
    .btn-primary,
    .btn-secondary,
    .btn-outline,
    .btn-submit,
    .btn-footer,
    .contact-form {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .section-title {
        font-size: 18pt;
        margin-bottom: 1rem;
    }
    
    .value-card,
    .business-card,
    .product-card {
        break-inside: avoid;
        margin-bottom: 1rem;
        border: 1px solid #ccc;
    }
    
    .timeline-item {
        break-inside: avoid;
    }
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-element {
        animation: none;
    }
    
    .scroll-indicator {
        animation: none;
    }
    
    .loading-spinner {
        animation: none;
    }
}

@media (prefers-color-scheme: dark) {
    /* Dark mode support can be added here if needed */
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    .hero-bg,
    .business-bg,
    .history-bg {
        opacity: 0.3;
    }
    
    .navbar {
        background: rgba(255, 255, 255, 1);
        border-bottom: 2px solid #000;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-outline {
        border-width: 2px;
    }
}

/* ===== FOCUS STYLES ===== */
.nav-link:focus,
.btn-primary:focus,
.btn-secondary:focus,
.btn-outline:focus,
.btn-submit:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: 3px solid #4A90E2;
    outline-offset: 2px;
}

/* ===== LOADING STATES ===== */
.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ccc;
    border-top: 2px solid #4A90E2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ===== UTILITY CLASSES FOR RESPONSIVE ===== */
.hide-mobile {
    display: none;
}

.hide-desktop {
    display: block;
}

@media (min-width: 768px) {
    .hide-mobile {
        display: block;
    }
    
    .hide-desktop {
        display: none;
    }
}

.text-mobile-center {
    text-align: center;
}

@media (min-width: 768px) {
    .text-mobile-center {
        text-align: left;
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}
