/* Critical CSS for immediate rendering - Prevents FOUC */

/* Critical above-the-fold styles - Enhanced to prevent FOUC */
body { 
    margin: 0; 
    padding: 0; 
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    margin: 0;
    padding: 0;
}

/* Navigation critical styles */
.mobile-nav { 
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #242526;
    z-index: 1000;
    padding: 10px 15px;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-logo {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
}

.mobile-nav-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
}

.desktop-navigation { 
    display: block; 
    background: #242526;
    padding: 15px 0;
    border-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* Basic layout styles */
.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 15px; 
}

.container-fluid {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

.row { 
    display: flex; 
    flex-wrap: wrap; 
    margin: 0 -15px; 
}

.col { 
    flex: 1; 
    padding: 0 15px; 
}

.col-lg-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-lg-12 { flex: 0 0 100%; max-width: 100%; }

/* Essential button styles */
.btn { 
    display: inline-block; 
    padding: 8px 16px; 
    text-decoration: none; 
    border: none; 
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.custom-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
}

.custom-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

/* Essential notification styles */
#jq-notification, #notification { 
    position: fixed; 
    top: 20px; 
    right: 20px; 
    z-index: 9999;
    max-width: 300px;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Essential form styles */
.form-control {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

/* Essential link styles */
a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Essential text styles */
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 15px 0;
    font-weight: 600;
    line-height: 1.2;
}

p {
    margin: 0 0 15px 0;
}

/* Essential spacing utilities */
.mt-4 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1.5rem; }
.py-5 { padding: 3rem 0; }
.text-center { text-align: center; }
.text-dark { color: #333; }
.text-white { color: white; }
.text-light { color: #f8f9fa; }

/* Flexbox utilities */
.d-flex { display: flex; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.me-2 { margin-right: 0.5rem; }
.mx-1 { margin-left: 0.25rem; margin-right: 0.25rem; }

/* Mobile responsive */
@media (max-width: 768px) {
    .mobile-nav { display: block; }
    .desktop-navigation { display: none; }
    .col-lg-2, .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
}

/* Ensure no gap between nav and content */
.container-fluid.p-0 > .row:first-child {
    margin-top: 0 !important;
}

/* Anti-FOUC: Hide content until CSS is fully loaded */
.css-loaded {
    visibility: visible !important;
}

/* Ensure smooth transitions */
* {
    transition: none !important;
}

.css-loaded * {
    transition: all 0.3s ease;
}
