:root {
    --primary: #004a99;
    /* Professional Blue */
    --primary-hover: #003366;
    --secondary: #333333;
    --accent: #e5e5e5;
    --text-dark: #1a1a1a;
    --text-light: #f9f9f9;
    --bg-light: #ffffff;
    --bg-muted: #f4f4f4;
    --transition: all 0.3s ease;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --border: 1px solid #e0e0e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

/* Header & Nav */
header {
    background: #fff;
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.logo img {
    height: 180px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav ul li {
    position: relative;
}

nav ul li a {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
}

nav ul li a:hover {
    color: var(--primary);
}

nav ul li a.active {
    color: var(--primary);
    font-weight: 600;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    transform: scaleX(0) rotateY(180deg);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: center;
}

nav ul li a:hover::after,
nav ul li a.active::after {
    transform: scaleX(1) rotateY(0deg);
}

nav ul li a:active::after {
    transform: scaleX(1) rotateY(360deg);
}

/* Dropdown arrow */
nav ul li.has-dropdown>a::after {
    content: '▼';
    font-size: 0.7rem;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

nav ul li.has-dropdown:hover>a::after {
    transform: rotate(180deg);
}

/* Dropdown menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 240px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    padding: 15px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 15px;
}

nav ul li.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu li a {
    display: block;
    padding: 12px 25px;
    color: var(--secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.dropdown-menu li a:hover {
    background: var(--bg-muted);
    color: var(--primary);
    border-left-color: var(--primary);
}

.dropdown-menu li a.active {
    color: var(--primary);
    font-weight: 600;
    border-left-color: var(--primary);
}

.auth-btns {
    display: flex;
    gap: 15px;
}

.cta-btn {
    padding: 10px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: pointer;
}

.cta-btn-primary {
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
}

.cta-btn-primary:hover {
    background: var(--primary-hover);
}

.cta-btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.cta-btn-secondary:hover {
    background: var(--primary);
    color: #fff;
}

/* Hero specific button overrides */
.hero .cta-btn-secondary {
    color: #fff;
    border-color: #fff;
}

.hero .cta-btn-secondary:hover {
    background: #fff;
    color: var(--primary);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 120px 5% 100px;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('assets/hero.png');
    background-size: cover;
    background-position: center;
    color: #fff;
    text-align: center;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 25px;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 40px;
    opacity: 0.95;
    font-weight: 400;
}

/* Market Data Ticker */
.ticker-wrapper {
    background: #fff;
    border-bottom: var(--border);
}

/* Sections Global */
section {
    padding: 80px 5%;
}

.section-title {
    margin-bottom: 60px;
    max-width: 800px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
    font-weight: 700;
}

.section-title p {
    font-size: 1.1rem;
    color: #666;
}

/* Grid Layouts */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    padding: 40px;
    background: #fff;
    border: var(--border);
    border-radius: 4px;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-5px);
}

.card h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

/* News Section */
.news-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.news-item {
    padding-bottom: 25px;
    margin-bottom: 25px;
    border-bottom: var(--border);
    display: flex;
    flex-direction: column;
}

.news-item .date {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.news-item h4 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    line-height: 1.3;
}

.news-item h4 a {
    color: var(--text-dark);
    text-decoration: none;
}

.news-item h4 a:hover {
    text-decoration: underline;
}

/* Sidebar Market Data */
.market-widget {
    background: var(--bg-muted);
    padding: 25px;
    border-radius: 4px;
}

/* About Section Expansion */
.about-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-content h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--secondary);
}

.principle-list {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.principle-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.principle-icon {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.principle-text h4 {
    font-size: 1.1rem;
    color: var(--secondary);
    margin-bottom: 5px;
}

.principle-text p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
}

/* Footer */
footer {
    background: var(--secondary);
    color: #fff;
    padding: 80px 5% 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-info h4 {
    margin-bottom: 25px;
    font-size: 1.1rem;
    color: #fff;
}

.footer-info p,
.footer-info a {
    color: #ccc;
    text-decoration: none;
    margin-bottom: 12px;
    font-size: 0.9rem;
    display: block;
}

.footer-info a:hover {
    color: #fff;
}

.compliance {
    border-top: 1px solid #444;
    padding-top: 40px;
    font-size: 0.8rem;
    color: #aaa;
}

.compliance a {
    color: #ccc;
}

.copyright {
    text-align: center;
    margin-top: 60px;
    font-size: 0.85rem;
    color: #888;
}

/* Auth Pages Styles */
.auth-body {
    background-color: var(--bg-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: #fff;
    padding: 50px;
    border-radius: 4px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 480px;
    border: var(--border);
}

.login-card h2 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--secondary);
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: var(--border);
    border-radius: 4px;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.login-btn:hover {
    background: var(--primary-hover);
}

/* Mobile Menu Toggle Base */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .about-split {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .logo img {
        height: 60px;
        /* Reduced for mobile */
    }

    .menu-toggle {
        display: flex;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.3s ease-in-out;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 1001;
        display: flex;
    }

    nav.active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    nav ul li a {
        font-size: 1.2rem;
    }

    .dropdown-menu {
        display: none;
        /* Hide by default */
        text-align: center;
        background: transparent;
    }

    .has-dropdown:hover .dropdown-menu {
        display: block;
        position: static;
        box-shadow: none;
        padding: 10px 0;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .auth-btns {
        display: none;
        /* Hide auth buttons in header on mobile */
    }

}