/* ==========================================================================
   IHOW - Responsive Design
   Mobile & Tablet Breakpoints
   ========================================================================== */

/* ==========================================================================
   Breakpoints
   Desktop: 1440px+
   Laptop: 1024px - 1439px
   Tablet: 768px - 1023px
   Mobile: 320px - 767px
   ========================================================================== */

/* ==========================================================================
   Laptop & Below (≤ 1439px)
   ========================================================================== */

@media (max-width: 1439px) {
    .container {
        max-width: 1200px;
    }
    
    .hero-title {
        font-size: clamp(2.25rem, 4.5vw, 3.5rem);
    }
}

/* ==========================================================================
   Tablet & Below (≤ 1023px)
   ========================================================================== */

@media (max-width: 1023px) {
    :root {
        --font-size-5xl: 2.5rem;
        --font-size-4xl: 2rem;
        --font-size-3xl: 1.75rem;
        --spacing-3xl: 4rem;
    }
    
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .section-padding {
        padding: var(--spacing-2xl) 0;
    }
    
    /* Navigation */
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(11, 28, 44, 0.98);
        backdrop-filter: blur(20px);
        border-top: 1px solid var(--color-border);
        padding: var(--spacing-lg);
        gap: var(--spacing-md);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: var(--transition-base);
    }
    
    .nav-menu.active {
        max-height: calc(100vh - 80px);
        opacity: 1;
    }
    
    .nav-dropdown .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin-top: var(--spacing-sm);
    }
    
    /* Hero */
    .hero-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .hero-visual {
        order: -1;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* Pipeline */
    .pipeline {
        padding: var(--spacing-lg);
    }
    
    .pipeline-arrow {
        transform: rotate(90deg);
    }
    
    .pipeline-arrow svg {
        width: 40px;
    }
    
    /* Solutions */
    .solutions-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    /* Technology */
    .tech-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    /* Industries */
    .industries-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Company */
    .company-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .company-visual {
        order: -1;
    }
    
    /* News */
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xl);
    }
    
    .footer-brand {
        grid-column: 1 / -1;
    }
    
    /* About Page */
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .org-middle {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .timeline::before {
        left: 40px;
    }
    
    .timeline-item {
        padding-left: 80px;
    }
}

/* ==========================================================================
   Mobile (≤ 767px)
   ========================================================================== */

@media (max-width: 767px) {
    :root {
        --font-size-5xl: 2rem;
        --font-size-4xl: 1.75rem;
        --font-size-3xl: 1.5rem;
        --font-size-2xl: 1.25rem;
        --spacing-xl: 2rem;
        --spacing-2xl: 3rem;
        --spacing-3xl: 3rem;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    /* Hero */
    .hero {
        min-height: auto;
        padding: calc(80px + var(--spacing-xl)) 0 var(--spacing-xl);
    }
    
    .hero-title {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-base);
    }
    
    .hero-cta {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-md);
        align-items: flex-start;
    }
    
    .stat-divider {
        display: none;
    }
    
    .hero-scroll {
        display: none;
    }
    
    /* Pipeline */
    .pipeline {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .pipeline-step {
        width: 100%;
    }
    
    .step-icon {
        width: 64px;
        height: 64px;
    }
    
    .step-icon svg {
        width: 32px;
        height: 32px;
    }
    
    /* Solutions */
    .solution-card {
        padding: var(--spacing-lg);
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .card-icon {
        width: 56px;
        height: 56px;
    }
    
    .card-icon svg {
        width: 32px;
        height: 32px;
    }
    
    /* Technology */
    .tech-icon {
        width: 64px;
        height: 64px;
    }
    
    .tech-icon svg {
        width: 40px;
        height: 40px;
    }
    
    /* Industries */
    .industries-grid {
        grid-template-columns: 1fr;
    }
    
    .industry-icon {
        font-size: 2.5rem;
    }
    
    /* Achievements */
    .achievements-grid {
        grid-template-columns: 1fr;
    }
    
    .achievement-icon {
        font-size: 2.5rem;
    }
    
    /* CTA */
    .cta-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }
    
    .cta-subtitle {
        font-size: var(--font-size-base);
    }
    
    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cta-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Contact */
    .contact-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .contact-form-container {
        padding: var(--spacing-lg);
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .footer-brand {
        grid-column: 1;
    }
    
    /* Back to Top */
    .back-to-top {
        bottom: var(--spacing-lg);
        right: var(--spacing-lg);
        width: 44px;
        height: 44px;
    }
    
    /* About Page - Mobile */
    .values-grid {
        grid-template-columns: 1fr;
    }
    
    .value-icon-svg {
        width: 64px;
        height: 64px;
    }
    
    .org-chart {
        padding: var(--spacing-md);
    }
    
    .org-middle {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .org-box {
        padding: var(--spacing-md);
        font-size: var(--font-size-sm);
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        padding-left: 50px;
    }
    
    .timeline-year {
        font-size: var(--font-size-2xl);
        left: -10px;
    }
    
    .timeline-content {
        padding: var(--spacing-md);
    }
}

/* ==========================================================================
   Small Mobile (≤ 480px)
   ========================================================================== */

@media (max-width: 480px) {
    :root {
        --font-size-5xl: 1.75rem;
        --font-size-4xl: 1.5rem;
        --font-size-3xl: 1.25rem;
    }
    
    .btn-large {
        padding: 1rem 1.75rem;
        font-size: var(--font-size-sm);
    }
    
    .hero-badge {
        font-size: var(--font-size-xs);
        padding: 6px var(--spacing-sm);
    }
    
    .section-badge {
        font-size: var(--font-size-xs);
        padding: 6px var(--spacing-sm);
    }
    
    .visual-card {
        padding: var(--spacing-sm);
    }
    
    .visual-content {
        aspect-ratio: 3/4;
    }
}

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

@media print {
    .nav,
    .hero-scroll,
    .back-to-top,
    .btn {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .section-padding {
        padding: 2rem 0;
    }
    
    a {
        text-decoration: underline;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Visible */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 4px;
}

/* ==========================================================================
   High Contrast Mode
   ========================================================================== */

@media (prefers-contrast: high) {
    :root {
        --color-border: rgba(56, 191, 194, 0.5);
        --color-text-secondary: #C8D8E8;
    }
}

/* ==========================================================================
   Dark Mode Support (if user has custom preferences)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    /* Already using dark theme, but we can adjust if needed */
}

/* ==========================================================================
   Landscape Mobile
   ========================================================================== */

@media (max-width: 767px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: calc(80px + var(--spacing-lg)) 0 var(--spacing-lg);
    }
    
    .hero-container {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-lg);
    }
    
    .hero-visual {
        order: 1;
    }
}

/* ==========================================================================
   Retina Display Optimization
   ========================================================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: subpixel-antialiased;
    }
}