/* Critical CSS - Inline in HTML head for above-the-fold content */
/* Performance Optimizations */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

* {
    will-change: auto;
}

/* Optimize fonts */
body {
    font-display: swap;
    text-rendering: optimizeSpeed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Optimize animations */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Reset and Base Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles - Critical for above-the-fold */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
    transform: translateZ(0);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    position: relative;
}

/* Left Navigation */
.nav-left {
    display: flex;
    align-items: center;
    flex: 1;
}

/* Center Brand */
.nav-brand-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
}

.brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: all 0.3s ease;
}

.brand-link:hover {
    color: #667eea;
    transform: translateY(-2px);
}

.nav-logo {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.brand-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

/* Right Navigation */
.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
    padding: 8px 0;
}

.nav-link:hover,
.nav-link.active {
    color: #667eea;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #667eea;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-buttons {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.btn-login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-register {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-register:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
}

/* Mobile Menu - Hidden by default on desktop */
.mobile-menu {
    display: none;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Hero Section - Critical for above-the-fold */
.hero {
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    z-index: -1;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-image {
    margin-top: 40px;
}

.hero-logo {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    transform: translateZ(0);
}

.hero-logo:hover {
    transform: translateY(-10px) translateZ(0);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
}

.hero-logo-img {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    margin-right: 20px;
    transition: all 0.3s ease;
}

.hero-logo:hover .hero-logo-img {
    transform: scale(1.1);
}

.hero-logo-text h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    text-align: left;
}

.hero-logo-text p {
    font-size: 1rem;
    color: #666;
    margin: 0;
    text-align: left;
}

/* Mobile Responsive - Critical */
@media (max-width: 768px) {
    .nav-left {
        display: none;
    }
    
    .nav-right {
        display: none;
    }
    
    .nav-container {
        justify-content: center;
    }
    
    .mobile-menu {
        display: flex;
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 40px;
        transition: left 0.3s ease;
        z-index: 1000;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }
    
    .mobile-menu.active {
        left: 0;
    }
    
    .mobile-menu .nav-menu {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 30px;
        text-align: center;
    }
    
    .nav-menu li {
        list-style: none;
    }
    
    .nav-menu .nav-link {
        font-size: 1.2rem;
        padding: 15px 30px;
        display: block;
        border-radius: 10px;
        transition: all 0.3s ease;
    }
    
    .nav-menu .nav-link:hover,
    .nav-menu .nav-link.active {
        background: rgba(102, 126, 234, 0.1);
        color: #667eea;
    }
    
    .nav-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        padding: 0 30px;
    }
    
    .nav-buttons .btn {
        width: 100%;
        padding: 15px;
        font-size: 1.1rem;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    .nav-brand-center {
        position: relative;
        left: auto;
        transform: none;
    }
    
    .brand-title {
        font-size: 1rem;
    }
    
    .nav-logo {
        width: 35px;
        height: 35px;
    }
    
    .hamburger {
        display: flex;
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1001;
    }
    
    .hero-container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-logo {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .hero-logo-img {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .hero-logo-text h3 {
        text-align: center;
        font-size: 1.5rem;
    }
    
    .hero-logo-text p {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-logo {
        padding: 15px;
    }
    
    .hero-logo-img {
        width: 60px;
        height: 60px;
    }
    
    .hero-logo-text h3 {
        font-size: 1.3rem;
    }
    
    .hero-logo-text p {
        font-size: 0.9rem;
    }
}

/* Loading animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content,
.hero-title,
.hero-subtitle,
.hero-buttons {
    animation: fadeInUp 0.8s ease-out;
}

/* Optimize images */
img {
    max-width: 100%;
    height: auto;
    display: block;
} 