/* Cross-Platform CSS Fixes for Ubuntu/Windows compatibility */

/* Typography fixes for different OS */
* {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Ubuntu', 'Liberation Sans', 'Helvetica Neue', Arial, sans-serif !important;
}

body {
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: optimizeLegibility !important;
    font-feature-settings: "kern" 1 !important;
}

/* Button fixes for different OS */
button, .btn, .btn-primary, .btn-secondary, .btn-large {
    font-family: inherit !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    border: none !important;
    outline: none !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

/* Input fixes for different OS */
input, select, textarea {
    font-family: inherit !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

/* CSS Variables Fallbacks for older browsers */
.hero-toggle {
    background: #f8f9fa !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
}

.hero-toggle-nav {
    background: #ffffff !important;
}

.toggle-link.active {
    background: #7B68BE !important;
    color: #ffffff !important;
}

.step-number-large {
    background: #FFE066 !important;
    color: #2c3e50 !important;
    font-weight: 800 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    font-size: 2.5rem !important;
}

.step-item:nth-child(2) .step-number-large {
    background: #FF8A6D !important;
    color: #ffffff !important;
}

.step-item:nth-child(3) .step-number-large {
    background: #6B8BC3 !important;
    color: #ffffff !important;
}

.step-item:nth-child(4) .step-number-large {
    background: #7B68BE !important;
    color: #ffffff !important;
}

.btn-primary {
    background: #7B68BE !important;
    color: #ffffff !important;
}

.btn-primary:hover {
    background: #6B5BAB !important;
}

.btn-secondary {
    background: #6B8BC3 !important;
    color: #ffffff !important;
}

/* Grid and Flexbox fixes */
.steps-grid {
    display: -webkit-flex !important;
    display: -ms-flexbox !important;
    display: flex !important;
}

.step-content-modern {
    display: -webkit-grid !important;
    display: -ms-grid !important;
    display: grid !important;
}

.safety-grid {
    display: -webkit-grid !important;
    display: -ms-grid !important;
    display: grid !important;
}

.hero-toggle-nav {
    display: -webkit-flex !important;
    display: -ms-flexbox !important;
    display: flex !important;
}

/* Transform and transition fixes */
.safety-item:hover {
    -webkit-transform: translateY(-5px) !important;
    -ms-transform: translateY(-5px) !important;
    transform: translateY(-5px) !important;
}

.step-image:hover img {
    -webkit-transform: scale(1.05) !important;
    -ms-transform: scale(1.05) !important;
    transform: scale(1.05) !important;
}

/* Box shadow fixes */
.hero-toggle-nav, .safety-item, .step-image, .cta-highlight {
    -webkit-box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
}

/* Border radius fixes */
.hero-toggle-nav {
    -webkit-border-radius: 50px !important;
    -moz-border-radius: 50px !important;
    border-radius: 50px !important;
}

.step-image, .safety-item, .cta-highlight {
    -webkit-border-radius: 20px !important;
    -moz-border-radius: 20px !important;
    border-radius: 20px !important;
}

/* Specific font rendering fixes for Ubuntu */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    h1, h2, h3, h4, h5, h6 {
        font-weight: 700 !important;
        letter-spacing: -0.01em !important;
    }
    
    .hero-large-title {
        font-weight: 900 !important;
        letter-spacing: -0.02em !important;
        line-height: 1.1 !important;
    }
}

/* Firefox specific fixes */
@-moz-document url-prefix() {
    button, .btn {
        -moz-appearance: none !important;
        background-clip: padding-box !important;
    }
}

.hero-toggle-nav {
    background: #ffffff !important;
}

.toggle-link.active {
    background: #7B68BE !important;
    color: #ffffff !important;
}

.step-number-large {
    background: #FFE066 !important;
    color: #2c3e50 !important;
}

.step-item:nth-child(2) .step-number-large {
    background: #FF8A6D !important;
    color: #ffffff !important;
}

.step-item:nth-child(3) .step-number-large {
    background: #6B8BC3 !important;
    color: #ffffff !important;
}

.btn-primary {
    background: #7B68BE !important;
    color: #ffffff !important;
    border: none !important;
}

.btn-primary:hover {
    background: #6B5BAB !important;
}

/* Flexbox Fallbacks */
.hero-toggle-nav {
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
}

.steps-grid {
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
}

/* Grid Fallbacks */
.step-content-modern {
    display: -webkit-grid;
    display: -ms-grid;
    display: grid;
}

.safety-grid {
    display: -webkit-grid;
    display: -ms-grid;
    display: grid;
}

/* Transform Fallbacks */
.safety-item:hover {
    -webkit-transform: translateY(-5px);
    -ms-transform: translateY(-5px);
    transform: translateY(-5px);
}

.step-image:hover img {
    -webkit-transform: scale(1.05);
    -ms-transform: scale(1.05);
    transform: scale(1.05);
}

/* Box Shadow Fallbacks */
.hero-toggle-nav {
    -webkit-box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.safety-item {
    -webkit-box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

/* Border Radius Fallbacks */
.hero-toggle-nav {
    -webkit-border-radius: 50px;
    -moz-border-radius: 50px;
    border-radius: 50px;
}

.step-image {
    -webkit-border-radius: 20px;
    -moz-border-radius: 20px;
    border-radius: 20px;
}

.safety-item {
    -webkit-border-radius: 20px;
    -moz-border-radius: 20px;
    border-radius: 20px;
}

/* Transition Fallbacks */
.toggle-link {
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.step-image img {
    -webkit-transition: transform 0.3s ease;
    -moz-transition: transform 0.3s ease;
    -o-transition: transform 0.3s ease;
    transition: transform 0.3s ease;
}

.safety-item {
    -webkit-transition: transform 0.3s ease, box-shadow 0.3s ease;
    -moz-transition: transform 0.3s ease, box-shadow 0.3s ease;
    -o-transition: transform 0.3s ease, box-shadow 0.3s ease;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}