/* Critical CSS for above-the-fold content */
:root {
    --nz-flag-blue: #699a96;
    --logo-bg: #F5F9F9;
    --primary-color: #2c61b8;
    --secondary-color: #059669;
    --financial-gold: #9a7000;
    --gold-hover: #DAA520;
    --gold-dark: #9A7209;
    --text-light: #e2e8f0;
    --text-white: #f8fafc;
    --text-dark: #1e293b;
    --text-muted: #1e293b;
    --bg-dark: #0f172a;
    --card-bg: #b4ccca;
    --card-border: rgba(184, 134, 11, 0.6);
    --nz-green: #0c8b61;
    --gradient: linear-gradient(135deg, #012169 0%, #1e40af 100%);
    --mountain-wash: url('/static/images/top1.jpg');
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #d9e5e4;
    background-image: radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
                      radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
    overflow-x: hidden;
    scroll-behavior: smooth;
    padding-top: 0;
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header Styles - Critical for initial render - Always sticky */
.header {
    background: var(--logo-bg);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    border-bottom: 4px solid rgba(184, 134, 11, 0.4);
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1000 !important;
    padding: 0.05rem 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.nav-link:hover {
    color: var(--nz-flag-blue);
    background: rgba(184, 134, 11, 0.2);
}

/* Mobile menu styles */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--logo-bg);
    border-top: 2px solid rgba(184, 134, 11, 0.4);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    z-index: 999;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu ul {
    list-style: none;
    padding: 1rem 0;
}

.mobile-menu li {
    border-bottom: 1px solid rgba(184, 134, 11, 0.2);
}

.mobile-menu li:last-child {
    border-bottom: none;
}

.mobile-menu a {
    display: block;
    padding: 1rem 2rem;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s ease;
}

.mobile-menu a:hover {
    background: rgba(184, 134, 11, 0.2);
}

.mobile-menu a.broker-login {
    color: var(--nz-green);
    font-weight: bold;
}

.page {
    padding: 0.5rem 0;
}
