/* Critical above-the-fold styles - Optimized with Complete Font Loading */
html {
    scroll-behavior: smooth;
}

section[id] {
    scroll-margin-top: 80px; /* Height of your navbar */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.fixed {
    position: fixed;
}

.top-0 {
    top: 0;
}

.inset-x-0 {
    left: 0;
    right: 0;
}

.z-\[70\] {
    z-index: 70;
}

.bg-white\/95 {
    background-color: rgba(255, 255, 255, 0.95);
}

.backdrop-blur {
    backdrop-filter: blur(8px);
}

.shadow-sm {
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.h-16 {
    height: 4rem;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.font-bold {
    font-weight: 700;
}

.pt-28 {
    padding-top: 7rem;
}

.pb-28 {
    padding-bottom: 7rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.text-center {
    text-align: center;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.leading-tight {
    line-height: 1.25;
}

/* Complete font loading optimization with all weights */
@font-face {
    font-family: 'Shabnam';
    src: url('../assets/fonts/Shabnam-Light-FD.woff2') format('woff2');
    font-weight: 300;
    font-display: swap;
}

@font-face {
    font-family: 'Shabnam';
    src: url('../assets/fonts/Shabnam-Thin-FD.woff2') format('woff2');
    font-weight: 100;
    font-display: swap;
}

@font-face {
    font-family: 'Shabnam';
    src: url('../assets/fonts/Shabnam-FD.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Shabnam';
    src: url('../assets/fonts/Shabnam-Medium-FD.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'Shabnam';
    src: url('../assets/fonts/Shabnam-Bold-FD.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

body {
    font-family: Shabnam, system-ui, -apple-system, sans-serif;
    font-weight: 400;
}

/* Ensure bold text uses the preloaded font */
.font-bold, strong, b {
    font-weight: 700;
}

/* Ensure medium weight uses preloaded font */
.font-medium {
    font-weight: 500;
}

/* Image optimization improvements */
img[width][height] {
    height: auto;
    max-width: 100%;
}

/* Remove all lazy loading animations completely */
img {
    background: none !important;
    animation: none !important;
}

/* Hero image container optimization */
.hero-image-container {
    aspect-ratio: 16/9;
    max-width: 980px;
    contain: layout style paint;
}

/* Page loader - optimized */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease-out;
    will-change: opacity;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #494bcb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    will-change: transform;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.fade-out {
    opacity: 0;
    pointer-events: none;
}

.text-lg {
    font-size: 1.2rem !important;
    line-height: 2rem !important;
}

.text-sm {
    font-size: 1rem !important;
    line-height: 1.3rem !important;
}

/* Performance optimizations */
* {
    box-sizing: border-box;
}

/* Reduce paint complexity */
.shadow-xl {
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    will-change: box-shadow;
}

/* Optimize transforms */
.rounded-2xl {
    border-radius: 1rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

/* Critical button styles */
.bg-\[#494bcb\] {
    background-color: #494bcb;
}

.text-white {
    color: white;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.hover\:bg-\[#08093f\]:hover {
    background-color: #08093f;
}

/* Responsive design */
@media (min-width: 768px) {
    .md\:text-5xl {
        font-size: 3rem;
        line-height: 1;
    }

    .md\:max-w-3xl {
        max-width: 48rem;
    }

    .md\:max-w-7xl {
        max-width: 80rem;
    }

    .md\:flex {
        display: flex;
    }

    .md\:hidden {
        display: none;
    }
}

/* Mobile optimization */
@media (max-width: 767px) {
    .hero-image-container {
        aspect-ratio: 4/3;
    }

    /* Reduce animations on mobile for performance */
    .shadow-2xl {
        box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    }
}

/* Mobile menu control - add at the end of your critical.css */
@media (min-width: 768px) {
    .md\:block {
        display: block;
    }

    .md\:hidden {
        display: none;
    }
}

@media (max-width: 767px) {
    .hidden {
        display: none;
    }

    .block {
        display: block;
    }
}

/* Ensure mobile menu starts hidden */
.mobile-menu,
[data-mobile-menu] {
    display: none;
}

/* Desktop navigation should be visible by default on desktop */
@media (min-width: 768px) {
    .desktop-nav,
    [data-desktop-nav] {
        display: block !important;
    }

    .mobile-menu,
    [data-mobile-menu] {
        display: none !important;
    }
}

.feature-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
}
