html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* Certificate Section Styles */
.parallax-certificate {
    will-change: transform;
    transition: transform 0.1s ease-out;
}

@keyframes pulse-certificate {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(74, 144, 226, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 15px 40px rgba(74, 144, 226, 0.6);
        transform: scale(1.05);
    }
}

.certificate-preview:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(74, 144, 226, 0.3);
}

/* Mobile Certificate Optimizations */
@media (max-width: 768px) {
    .parallax-certificate {
        width: 120px !important;
        top: 5% !important;
        left: 2% !important;
    }
}

/* Animation for Login page */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 1s ease-out;
}

/* MOBILE-FIRST RESPONSIVE IMPROVEMENTS */

/* Base Mobile Styles */
@media (max-width: 959px) {
    /* Typography adjustments for mobile */
    .mud-typography-h1 {
        font-size: 1.8rem !important;
        line-height: 1.2 !important;
    }
    
    .mud-typography-h2 {
        font-size: 1.6rem !important;
        line-height: 1.25 !important;
    }
    
    .mud-typography-h3 {
        font-size: 1.4rem !important;
        line-height: 1.3 !important;
    }
    
    .mud-typography-h4 {
        font-size: 1.2rem !important;
        line-height: 1.35 !important;
    }
    
    .mud-typography-h5 {
        font-size: 1.1rem !important;
        line-height: 1.4 !important;
    }
    
    .mud-typography-h6 {
        font-size: 1rem !important;
        line-height: 1.4 !important;
    }
    
    .mud-typography-body1 {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }
    
    .mud-typography-body2 {
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
    }

    /* Container and spacing adjustments */
    .mud-container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    
    /* Reduce section padding on mobile */
    .py-16 { 
        padding-top: 2.5rem !important; 
        padding-bottom: 2.5rem !important; 
    }
    
    .py-12 { 
        padding-top: 2rem !important; 
        padding-bottom: 2rem !important; 
    }
    
    .py-10 { 
        padding-top: 1.5rem !important; 
        padding-bottom: 1.5rem !important; 
    }

    /* Margin adjustments */
    .mb-10 { margin-bottom: 2rem !important; }
    .mb-8 { margin-bottom: 1.5rem !important; }
    .mb-6 { margin-bottom: 1rem !important; }
    .mt-10 { margin-top: 2rem !important; }
    .mt-8 { margin-top: 1.5rem !important; }
    .mt-6 { margin-top: 1rem !important; }

    /* Button improvements for mobile */
    .mud-button {
        border-radius: 12px !important;
        font-weight: 600 !important;
        transition: all 0.2s ease !important;
    }
    
    .mud-button.mud-button-size-large {
        padding: 12px 20px !important;
        font-size: 0.95rem !important;
        min-height: 44px !important; /* Apple's recommended minimum touch target */
    }
    
    .mud-button.mud-button-size-medium {
        padding: 10px 16px !important;
        font-size: 0.85rem !important;
        min-height: 40px !important;
    }
    
    .mud-button.mud-button-size-small {
        padding: 8px 12px !important;
        font-size: 0.8rem !important;
        min-height: 36px !important;
    }

    /* Card improvements */
    .mud-card {
        border-radius: 16px !important;
        margin-bottom: 16px !important;
    }
    
    .mud-card .mud-card-content {
        padding: 16px !important;
    }

    /* Input field improvements */
    .mud-input-root {
        border-radius: 12px !important;
    }
    
    .mud-input {
        font-size: 0.9rem !important;
    }

    /* Grid improvements */
    .mud-grid {
        margin: -8px !important;
    }
    
    .mud-grid .mud-grid-item {
        padding: 8px !important;
    }
}

/* Small Mobile Devices */
@media (max-width: 599px) {
    .mud-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    
    /* Even tighter spacing on small screens */
    .py-16 { 
        padding-top: 2rem !important; 
        padding-bottom: 2rem !important; 
    }
    
    .py-12 { 
        padding-top: 1.5rem !important; 
        padding-bottom: 1.5rem !important; 
    }

    /* Typography for very small screens */
    .mud-typography-h1 {
        font-size: 1.6rem !important;
    }
    
    .mud-typography-h2 {
        font-size: 1.4rem !important;
    }
    
    .mud-typography-h3 {
        font-size: 1.25rem !important;
    }

    /* Button adjustments for small screens */
    .mud-button.mud-button-size-large {
        padding: 10px 18px !important;
        font-size: 0.9rem !important;
    }
    
    .mud-button.mud-button-size-medium {
        padding: 8px 14px !important;
        font-size: 0.8rem !important;
    }

    /* Tighter grid spacing */
    .mud-grid {
        margin: -6px !important;
    }
    
    .mud-grid .mud-grid-item {
        padding: 6px !important;
    }
}

/* Video Section Mobile Optimizations */
@media (max-width: 768px) {
    #demo-video video {
        height: 40vh !important; /* Reduce video height on mobile */
        border-radius: 0 !important;
    }
    
    #demo-video .mud-container {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
}

@media (max-width: 599px) {
    #demo-video video {
        height: 35vh !important;
    }
}

/* Touch-friendly improvements */
@media (hover: none) {
    /* Remove hover effects on touch devices, add active states instead */
    .mud-button:hover {
        transform: none !important;
    }
    
    .mud-button:active {
        transform: scale(0.98) !important;
        transition: transform 0.1s ease !important;
    }
    
    .mud-card:hover {
        transform: none !important;
    }
    
    .mud-card:active {
        transform: scale(0.99) !important;
        transition: transform 0.1s ease !important;
    }
}

/* Accessibility improvements for mobile */
@media (max-width: 959px) {
    /* Ensure focus indicators are visible on mobile */
    .mud-button:focus-visible,
    .mud-input:focus-visible,
    .mud-select:focus-visible {
        outline: 2px solid #4A90E2 !important;
        outline-offset: 2px !important;
    }
    
    /* Improve text readability on mobile */
    .mud-typography {
        -webkit-text-size-adjust: 100% !important;
        text-rendering: optimizeLegibility !important;
    }
}

/* Performance optimizations for mobile */
@media (max-width: 959px) {
    /* Reduce animation complexity on mobile */
    * {
        -webkit-transform: translateZ(0) !important;
        transform: translateZ(0) !important;
    }
    
    /* Reduce backdrop-filter complexity on older mobile devices */
    .mud-paper,
    .mud-card {
        backdrop-filter: blur(5px) !important;
    }
    
    /* Simplify gradients on mobile for better performance */
    .hero {
        background-attachment: scroll !important; /* Better performance than fixed on mobile */
    }
}

/* Horizontal scrolling prevention */
body, html {
    overflow-x: hidden !important;
    width: 100% !important;
}

/*.mud-container,
.mud-container-maxwidth-false {
    max-width: 100% !important;
    overflow-x: hidden !important;
}*/

/* Safe area insets for notched devices */
@supports (padding: max(0px)) {
    .mud-appbar {
        padding-left: max(16px, env(safe-area-inset-left)) !important;
        padding-right: max(16px, env(safe-area-inset-right)) !important;
    }
    
    .mud-container {
        padding-left: max(16px, env(safe-area-inset-left)) !important;
        padding-right: max(16px, env(safe-area-inset-right)) !important;
    }
}

@media (max-width: 959px) {
    @supports (padding: max(0px)) {
        .mud-container {
            padding-left: max(12px, env(safe-area-inset-left)) !important;
            padding-right: max(12px, env(safe-area-inset-right)) !important;
        }
    }
}
