/* iPad and Tablet-specific fixes */

/* When is-ipad class is added via JavaScript */
body.is-ipad {
    overflow: auto !important;
    height: auto !important;
}

/* CRITICAL FIX: Force timeline to work on iPad */
body.is-ipad .timeline-wrapper,
body.is-ipad #timelineWrapper {
    display: flex !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-snap-type: x mandatory !important;
    touch-action: pan-x !important;
    transform: translateX(0) !important;
    position: relative !important;
    width: 100% !important;
    gap: 1rem !important;
    padding: 1rem 0 3rem 0 !important;
}

body.is-ipad .timeline-card {
    flex: 0 0 70vw !important;
    min-width: 70vw !important;
    scroll-snap-align: center !important;
    opacity: 1 !important;
    transform: none !important;
    position: relative !important;
    pointer-events: auto !important;
}

body.is-ipad .timeline-progress-container,
body.is-ipad .timeline-dots-container {
    display: none !important;
}

body.is-ipad html {
    overflow: auto !important;
    height: 100% !important;
}

body.is-ipad #smooth-wrapper,
body.is-ipad #smooth-content {
    transform: none !important;
    position: static !important;
    height: auto !important;
    overflow: visible !important;
}

body.is-ipad section {
    position: relative !important;
    transform: none !important;
}

body.is-ipad [data-speed],
body.is-ipad [data-lag] {
    transform: none !important;
}

/* Hide scroll indicator dots on iPad */
body.is-ipad .scroll-indicator {
    display: none !important;
}

/* Show mobile menu button on iPad */
body.is-ipad .mobile-menu-btn {
    display: flex !important;
    position: fixed !important;
    z-index: 9999 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* iPad Pro 12.9" - 2732x2048 */
@media only screen 
  and (min-device-width: 1024px) 
  and (max-device-width: 1366px) 
  and (-webkit-min-device-pixel-ratio: 2) {
    
    /* Enable native scrolling */
    html, body {
        height: 100% !important;
        overflow: auto !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-y !important;
    }
    
    #smooth-wrapper,
    #smooth-content {
        transform: none !important;
        will-change: auto !important;
        position: static !important;
        height: auto !important;
    }
    
    /* Disable GSAP ScrollSmoother effects */
    [data-speed],
    [data-lag] {
        transform: none !important;
    }
    
    /* Fix sections - remove viewport height constraint */
    section {
        position: relative !important;
        transform: none !important;
        min-height: auto !important;
        height: auto !important;
    }
    
    .section {
        min-height: auto !important;
        padding: 4rem 2rem !important;
    }
    
    /* Keep hero section at 100vh */
    .hero-section {
        min-height: 100vh !important;
        height: 100vh !important;
    }
    
    /* Remove section gradients/overlays */
    section::before,
    section::after {
        display: none !important;
    }
    
    .section-gradient,
    .section-overlay {
        display: none !important;
    }
    
    /* Hide scroll indicator */
    .scroll-indicator {
        display: none !important;
    }
    
    /* Show mobile menu */
    .mobile-menu-btn {
        display: flex !important;
    }
    
    /* About Section */
    .about-section {
        padding: 4rem 2rem !important;
        min-height: auto !important;
    }
    
    /* Stats Grid - 3 columns on iPad Pro */
    .stats-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1.5rem !important;
        padding: 2rem 1rem !important;
        max-width: 100% !important;
    }
    
    .stat-card {
        padding: 1.5rem 1rem !important;
        min-width: 0 !important;
    }
    
    .stat-number {
        font-size: 2.5rem !important;
    }
    
    .stat-label {
        font-size: 0.85rem !important;
    }
    
    /* Service Section */
    .service-section {
        padding: 3rem 2rem !important;
        min-height: auto !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .service-layout {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 1.5rem !important;
    }
    
    .service-box {
        opacity: 1 !important;
        transform: none !important;
        visibility: visible !important;
        padding: 1.25rem !important;
    }
    
    .service-box h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
        line-height: 1.3 !important;
    }
    
    .service-box p {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
        margin: 0 !important;
    }
    
    .building-center {
        position: relative !important;
        grid-column: 1 / -1 !important;
        height: 250px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        order: 10 !important;
        margin-top: 1rem !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
    }
    
    .building-3d {
        opacity: 1 !important;
        visibility: visible !important;
        position: relative !important;
        width: 100% !important;
        max-width: 350px !important;
    }
    
    /* Hide all layers except the last one (layer 4 - complete building) */
    .building-layer {
        display: none !important;
    }
    
    .building-layer[data-layer="4"] {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        position: relative !important;
        transform: none !important;
        width: 100% !important;
        height: auto !important;
        top: auto !important;
        left: auto !important;
    }
    
    /* Companies Section */
    .companies-section {
        padding: 4rem 2rem !important;
        min-height: auto !important;
    }
    
    .companies-wrapper,
    #companiesWrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-snap-type: x mandatory !important;
        touch-action: pan-x !important;
        margin-bottom: 1rem !important;
        position: relative !important;
    }
    
    /* Add swipe indicator for companies */
    .companies-wrapper::after,
    #companiesWrapper::after {
        content: "← Swipe to explore →";
        position: absolute;
        bottom: -25px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.8rem;
        color: rgba(255, 255, 255, 0.5);
        text-transform: uppercase;
        letter-spacing: 2px;
        pointer-events: none;
    }
    
    .company-card {
        flex: 0 0 70vw !important;
        scroll-snap-align: center !important;
    }
    
    /* Mission Section */
    .mission-section {
        padding: 4rem 2rem !important;
        min-height: auto !important;
    }
    
    /* Values Section */
    .values-section {
        padding: 4rem 2rem !important;
        min-height: auto !important;
    }
    
    .values-wrapper,
    #valuesWrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-snap-type: x mandatory !important;
        touch-action: pan-x !important;
        margin-bottom: 1rem !important;
        position: relative !important;
    }
    
    /* Add swipe indicator for values */
    .values-wrapper::after,
    #valuesWrapper::after {
        content: "← Swipe to explore →";
        position: absolute;
        bottom: -25px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.8rem;
        color: rgba(255, 255, 255, 0.5);
        text-transform: uppercase;
        letter-spacing: 2px;
        pointer-events: none;
    }
    
    .value-card {
        flex: 0 0 70vw !important;
        scroll-snap-align: center !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    /* Force all value cards to be visible */
    .value-card[data-state="inactive"],
    .value-card[data-state="active"],
    .value-card {
        opacity: 1 !important;
        filter: none !important;
    }
    
    /* Leadership Section - Use mobile layout */
    .leadership-section {
        padding: 4rem 2rem !important;
        min-height: auto !important;
    }
    
    .leadership-grid {
        display: block !important;
        grid-template-columns: 1fr !important;
        overflow: visible !important;
    }
    
    .leader-card {
        width: 100% !important;
        margin-bottom: 1rem !important;
        position: relative !important;
        height: auto !important;
        cursor: pointer !important;
        border-radius: 1rem !important;
    }
    
    /* Collapsed state */
    .leader-card:not(.active) {
        height: 70px !important;
        min-height: 70px !important;
        max-height: 70px !important;
        overflow: hidden !important;
        background: rgba(8, 18, 35, 0.5) !important;
        border: 1px solid rgba(24, 145, 104, 0.1) !important;
        display: flex !important;
        align-items: center !important;
        padding: 0.75rem 1rem !important;
    }
    
    .leader-card:not(.active) .leader-content,
    .leader-card:not(.active) .leader-image-section {
        display: none !important;
    }
    
    .leader-card:not(.active) .collapsed-content {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        height: 100% !important;
        flex-direction: row !important;
    }
    
    .collapsed-content {
        display: none !important;
        position: relative !important;
    }
    
    .leader-card:not(.active) .collapsed-content {
        display: flex !important;
    }
    
    /* Ensure first card shows collapsed content when inactive */
    .leader-card:first-child:not(.active) .collapsed-content {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .collapsed-text {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0.25rem !important;
        writing-mode: initial !important;
        transform: none !important;
        text-align: left !important;
    }
    
    .collapsed-name {
        font-size: 1.1rem !important;
        font-weight: 300 !important;
        color: #ffffff !important;
        margin: 0 !important;
        writing-mode: initial !important;
        transform: none !important;
    }
    
    .collapsed-title {
        font-size: 0.85rem !important;
        color: #189168 !important;
        font-weight: 400 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.05em !important;
        margin: 0 !important;
        writing-mode: initial !important;
        transform: none !important;
    }
    
    .collapsed-image {
        width: 50px !important;
        height: 50px !important;
        border-radius: 50% !important;
        background-size: cover !important;
        background-position: center !important;
        border: 1px solid rgba(24, 145, 104, 0.2) !important;
        position: static !important;
        transform: none !important;
        flex-shrink: 0 !important;
    }
    
    /* Active/expanded state - applies to ALL active cards including first */
    .leader-card.active {
        height: auto !important;
        padding: 2rem !important;
        background: rgba(8, 18, 35, 0.8) !important;
        border: 1px solid rgba(24, 145, 104, 0.2) !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .leader-card.active .collapsed-content {
        display: none !important;
    }
    
    /* Inner wrapper for flex layout */
    .leader-card.active .leader-inner {
        display: flex !important;
        flex-direction: row !important;
        gap: 2rem !important;
        align-items: center !important;
    }
    
    .leader-card.active .leader-image-section {
        display: block !important;
        flex-shrink: 0 !important;
        width: 150px !important;
    }
    
    .leader-card.active .leader-content {
        display: block !important;
        flex: 1 !important;
    }
    
    /* For cards without inner wrapper, apply flex directly */
    .leader-card.active:not(:has(.leader-inner)) {
        flex-direction: row !important;
    }
    
    .leader-card.active:not(:has(.leader-inner)) .leader-image-section {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .leader-image {
        width: 150px !important;
        height: 150px !important;
        border-radius: 50% !important;
        object-fit: cover !important;
        display: block !important;
    }
    
    /* Fix for first card specifically */
    .leader-card:first-child.active .leader-image-section {
        position: static !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
    }
    
    /* Timeline Section */
    .timeline-section {
        padding: 4rem 2rem !important;
        min-height: auto !important;
    }
    
    .timeline-section .section-header {
        margin-bottom: 2rem !important;
    }
    
    .timeline-wrapper,
    #timelineWrapper {
        display: flex !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-x !important;
        scroll-snap-type: x mandatory !important;
        padding-top: 2rem !important;
        padding-bottom: 4rem !important;
        position: relative !important;
        gap: 1rem !important;
        margin-bottom: 2.5rem !important;
        transform: none !important;
        will-change: auto !important;
    }
    
    /* Add swipe indicator for timeline */
    .timeline-wrapper::after,
    #timelineWrapper::after {
        content: "← Swipe to explore →";
        position: absolute;
        bottom: -25px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.8rem;
        color: rgba(255, 255, 255, 0.5);
        text-transform: uppercase;
        letter-spacing: 2px;
        pointer-events: none;
    }
    
    /* Hide timeline progress elements that might interfere */
    .timeline-progress-container,
    .timeline-progress,
    .timeline-dots-container {
        display: none !important;
    }
    
    .timeline-card {
        flex: 0 0 70vw !important;
        scroll-snap-align: center !important;
        width: auto !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
}

/* iPad Air, iPad Mini, and standard iPads */
@media only screen 
  and (min-device-width: 768px) 
  and (max-device-width: 1024px) 
  and (-webkit-min-device-pixel-ratio: 2) {
    
    html, body {
        height: 100% !important;
        overflow: auto !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-y !important;
    }
    
    #smooth-wrapper,
    #smooth-content {
        transform: none !important;
        will-change: auto !important;
        position: static !important;
        height: auto !important;
    }
    
    /* Disable GSAP ScrollSmoother effects */
    [data-speed],
    [data-lag] {
        transform: none !important;
    }
    
    section {
        position: relative !important;
        transform: none !important;
        min-height: auto !important;
        height: auto !important;
    }
    
    .section {
        min-height: auto !important;
        padding: 4rem 1.5rem !important;
    }
    
    /* Keep hero section at 100vh */
    .hero-section {
        min-height: 100vh !important;
        height: 100vh !important;
    }
    
    /* Remove section gradients/overlays */
    section::before,
    section::after {
        display: none !important;
    }
    
    .section-gradient,
    .section-overlay {
        display: none !important;
    }
    
    /* Hide scroll indicator */
    .scroll-indicator {
        display: none !important;
    }
    
    /* Show mobile menu */
    .mobile-menu-btn {
        display: flex !important;
    }
    
    /* About Section */
    .about-section {
        padding: 4rem 1.5rem !important;
        min-height: auto !important;
    }
    
    /* Stats Grid - 3 columns on standard iPads */
    .stats-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1rem !important;
        padding: 2rem 0.5rem !important;
        max-width: 100% !important;
    }
    
    .stat-card {
        padding: 1.25rem 0.75rem !important;
        min-width: 0 !important;
    }
    
    .stat-number {
        font-size: 2.25rem !important;
    }
    
    .stat-label {
        font-size: 0.8rem !important;
        line-height: 1.2 !important;
    }
    
    /* Service Section */
    .service-section {
        padding: 3rem 2rem !important;
        min-height: auto !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .service-layout {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 1.5rem !important;
    }
    
    .service-box {
        opacity: 1 !important;
        transform: none !important;
        visibility: visible !important;
        padding: 1.25rem !important;
    }
    
    .service-box h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
        line-height: 1.3 !important;
    }
    
    .service-box p {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
        margin: 0 !important;
    }
    
    .building-center {
        position: relative !important;
        grid-column: 1 / -1 !important;
        height: 250px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        order: 10 !important;
        margin-top: 1rem !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
    }
    
    .building-3d {
        opacity: 1 !important;
        visibility: visible !important;
        position: relative !important;
        width: 100% !important;
        max-width: 350px !important;
    }
    
    /* Hide all layers except the last one (layer 4 - complete building) */
    .building-layer {
        display: none !important;
    }
    
    .building-layer[data-layer="4"] {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        position: relative !important;
        transform: none !important;
        width: 100% !important;
        height: auto !important;
        top: auto !important;
        left: auto !important;
    }
    
    /* Companies Section */
    .companies-section {
        padding: 4rem 1.5rem !important;
        min-height: auto !important;
    }
    
    .companies-wrapper,
    #companiesWrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-snap-type: x mandatory !important;
        touch-action: pan-x !important;
        margin-bottom: 2.5rem !important;
        position: relative !important;
    }
    
    /* Add swipe indicator */
    .companies-wrapper::after,
    #companiesWrapper::after {
        content: "← Swipe to explore →";
        position: absolute;
        bottom: -20px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.75rem;
        color: rgba(255, 255, 255, 0.4);
        text-transform: uppercase;
        letter-spacing: 1.5px;
        pointer-events: none;
    }
    
    .company-card {
        flex: 0 0 75vw !important;
        scroll-snap-align: center !important;
    }
    
    /* Mission Section */
    .mission-section {
        padding: 4rem 1.5rem !important;
        min-height: auto !important;
    }
    
    /* Values Section */
    .values-section {
        padding: 4rem 1.5rem !important;
        min-height: auto !important;
    }
    
    .values-wrapper,
    #valuesWrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-snap-type: x mandatory !important;
        touch-action: pan-x !important;
        margin-bottom: 2.5rem !important;
        position: relative !important;
    }
    
    /* Add swipe indicator */
    .values-wrapper::after,
    #valuesWrapper::after {
        content: "← Swipe to explore →";
        position: absolute;
        bottom: -20px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.75rem;
        color: rgba(255, 255, 255, 0.4);
        text-transform: uppercase;
        letter-spacing: 1.5px;
        pointer-events: none;
    }
    
    .value-card {
        flex: 0 0 75vw !important;
        scroll-snap-align: center !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    /* Force value cards visible */
    .value-card[data-state="inactive"],
    .value-card[data-state="active"],
    .value-card {
        opacity: 1 !important;
        filter: none !important;
    }
    
    /* Leadership Section - Mobile layout */
    .leadership-section {
        padding: 4rem 1.5rem !important;
        min-height: auto !important;
    }
    
    .leadership-grid {
        display: block !important;
        overflow: visible !important;
    }
    
    .leader-card {
        width: 100% !important;
        margin-bottom: 1rem !important;
        position: relative !important;
        cursor: pointer !important;
        border-radius: 1rem !important;
    }
    
    .leader-card:not(.active) {
        height: 70px !important;
        min-height: 70px !important;
        max-height: 70px !important;
        overflow: hidden !important;
        background: rgba(8, 18, 35, 0.5) !important;
        border: 1px solid rgba(24, 145, 104, 0.1) !important;
        display: flex !important;
        align-items: center !important;
        padding: 0.75rem 1rem !important;
    }
    
    .leader-card:not(.active) .leader-content,
    .leader-card:not(.active) .leader-image-section {
        display: none !important;
    }
    
    .leader-card:not(.active) .collapsed-content {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        flex-direction: row !important;
    }
    
    .collapsed-content {
        display: none !important;
        position: relative !important;
    }
    
    .leader-card:not(.active) .collapsed-content {
        display: flex !important;
    }
    
    /* Ensure first card shows collapsed content when inactive */
    .leader-card:first-child:not(.active) .collapsed-content {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .collapsed-text {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0.25rem !important;
        writing-mode: initial !important;
        transform: none !important;
        text-align: left !important;
    }
    
    .collapsed-name {
        font-size: 1.1rem !important;
        font-weight: 300 !important;
        color: #ffffff !important;
        margin: 0 !important;
        writing-mode: initial !important;
        transform: none !important;
    }
    
    .collapsed-title {
        font-size: 0.85rem !important;
        color: #189168 !important;
        font-weight: 400 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.05em !important;
        margin: 0 !important;
        writing-mode: initial !important;
        transform: none !important;
    }
    
    .collapsed-image {
        width: 50px !important;
        height: 50px !important;
        border-radius: 50% !important;
        background-size: cover !important;
        background-position: center !important;
        border: 1px solid rgba(24, 145, 104, 0.2) !important;
        position: static !important;
        transform: none !important;
        flex-shrink: 0 !important;
    }
    
    .leader-card.active {
        height: auto !important;
        padding: 2rem !important;
        background: rgba(8, 18, 35, 0.8) !important;
        border: 1px solid rgba(24, 145, 104, 0.2) !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .leader-card.active .collapsed-content {
        display: none !important;
    }
    
    /* Inner wrapper for flex layout */
    .leader-card.active .leader-inner {
        display: flex !important;
        flex-direction: row !important;
        gap: 2rem !important;
        align-items: center !important;
    }
    
    .leader-card.active .leader-image-section {
        display: block !important;
        flex-shrink: 0 !important;
        width: 150px !important;
    }
    
    .leader-card.active .leader-content {
        display: block !important;
        flex: 1 !important;
    }
    
    /* For cards without inner wrapper, apply flex directly */
    .leader-card.active:not(:has(.leader-inner)) {
        flex-direction: row !important;
    }
    
    .leader-card.active:not(:has(.leader-inner)) .leader-image-section {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .leader-image {
        width: 150px !important;
        height: 150px !important;
        border-radius: 50% !important;
        object-fit: cover !important;
        display: block !important;
    }
    
    /* Fix for first card specifically */
    .leader-card:first-child.active .leader-image-section {
        position: static !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
    }
    
    /* Timeline Section */
    .timeline-section {
        padding: 4rem 1.5rem !important;
        min-height: auto !important;
    }
    
    .timeline-section .section-header {
        margin-bottom: 2rem !important;
    }
    
    .timeline-wrapper,
    #timelineWrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-snap-type: x mandatory !important;
        touch-action: pan-x !important;
        padding-top: 1.5rem !important;
        padding-bottom: 4rem !important;
        position: relative !important;
        display: flex !important;
        gap: 1rem !important;
        margin-bottom: 2.5rem !important;
        transform: none !important;
        will-change: auto !important;
    }
    
    /* Add swipe indicator for timeline */
    .timeline-wrapper::after,
    #timelineWrapper::after {
        content: "← Swipe to explore →";
        position: absolute;
        bottom: -20px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.75rem;
        color: rgba(255, 255, 255, 0.4);
        text-transform: uppercase;
        letter-spacing: 1.5px;
        pointer-events: none;
    }
    
    /* Hide timeline progress elements that might interfere */
    .timeline-progress-container,
    .timeline-progress,
    .timeline-dots-container {
        display: none !important;
    }
    
    .timeline-card {
        flex: 0 0 75vw !important;
        scroll-snap-align: center !important;
        width: auto !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
}

/* Landscape orientation for all iPads */
@media only screen 
  and (min-device-width: 768px) 
  and (max-device-width: 1366px) 
  and (orientation: landscape) 
  and (-webkit-min-device-pixel-ratio: 2) {
    
    .section {
        min-height: auto !important;
        padding: 3rem 2rem !important;
    }
    
    .hero-section {
        min-height: 100vh !important;
    }
}

/* Touch-specific fixes for all touch devices */
@supports (-webkit-touch-callout: none) {
    /* iOS-specific styles */
    html, body {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
    }
    
    /* Prevent pull-to-refresh on iOS */
    body {
        overscroll-behavior-y: contain;
    }
    
    /* Fix menu button for touch */
    .mobile-menu-btn {
        cursor: pointer;
        touch-action: manipulation;
    }
    
    /* Fix scroll indicators */
    .scroll-dot {
        touch-action: manipulation;
    }
    
    /* Horizontal scroll containers */
    .companies-wrapper,
    .values-wrapper,
    #companiesWrapper,
    #valuesWrapper {
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior-x: contain;
    }
    
    /* Prevent text selection issues */
    .menu-nav-link,
    .company-card,
    .value-card,
    .leader-card {
        -webkit-user-select: none;
        user-select: none;
    }
}

/* Force mobile layout for smaller iPads if needed */
@media only screen 
  and (min-device-width: 768px) 
  and (max-device-width: 834px) 
  and (-webkit-min-device-pixel-ratio: 2) {
    
    /* Use mobile layout */
    .mobile-only {
        display: flex !important;
    }
    
    .scroll-indicator {
        display: none !important;
    }
    
    /* Mobile menu */
    .mobile-menu-btn {
        display: flex !important;
    }
    
    /* Typography for tablet */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    p { font-size: 1rem; }
}

/* Specific iPad Pro fixes */
@media only screen 
  and (device-width: 1024px) 
  and (device-height: 1366px) 
  and (-webkit-device-pixel-ratio: 2) 
  and (orientation: portrait) {
    
    /* iPad Pro specific adjustments */
    .section {
        padding: 4rem 3rem !important;
    }
    
    .service-layout {
        grid-template-columns: 1fr 1fr !important;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Fix for iPad viewport meta tag issues */
@media screen and (min-width: 768px) and (max-width: 1366px) {
    @supports (-webkit-touch-callout: none) {
        /* This targets Safari on iPad */
        :root {
            /* Adjust these as needed */
            --viewport-adjust: 1.0;
        }
        
        body {
            zoom: var(--viewport-adjust);
        }
    }
}