/* Color Scheme 2: Navy & Gold - Professional Corporate */

:root {
    --primary-dark: #1a237e;
    --primary: #283593;
    --primary-light: #3949ab;
    --accent: #ffc107;
    --accent-light: #ffd54f;
    
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a5a;
    --text-muted: #7a7a8a;
    --bg-white: #ffffff;
    --bg-light: #f5f5fa;
    --bg-warm: #fffbf0;
    --border-light: #e0e0e8;
    --border-medium: #c0c0d0;
    
    --font-heading: 'Georgia', 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --max-width: 900px;
    --line-height: 1.75;
    
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.12);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

[data-theme="dark"] {
    --primary-dark: #5c6bc0;
    --primary: #7986cb;
    --primary-light: #9fa8da;
    --accent: #ffd54f;
    --accent-light: #ffe082;
    
    --text-primary: #f0f0f5;
    --text-secondary: #c0c0d0;
    --text-muted: #9090a0;
    --bg-white: #1a1a2e;
    --bg-light: #252538;
    --bg-warm: #2a2a40;
    --border-light: #3a3a50;
    --border-medium: #4a4a60;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.5);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: var(--line-height);
    color: var(--text-primary);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme Toggle - Now in Header (see nav section) */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    color: var(--primary-dark);
    margin-bottom: var(--space-sm);
    transition: color 0.3s ease;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.9rem; margin-top: var(--space-lg); }
h3 { font-size: 1.5rem; margin-top: var(--space-md); }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: var(--space-md);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

a:hover {
    color: var(--primary-light);
    border-bottom-color: var(--primary-light);
}

header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

header.hidden {
    transform: translateY(-100%);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-sm) var(--space-md);
}

.nav-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
    filter: brightness(0) invert(1);
}

/* Theme Toggle in Header */
.theme-toggle {
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    margin-left: 1rem;
}

.theme-toggle:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.1);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--bg-white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.mega-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    justify-content: center;
    align-items: center;
    padding-top: var(--space-xs);
    border-top: 1px solid rgba(255,255,255,0.15);
}

.mega-menu a {
    color: rgba(255,255,255,0.95);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    border-radius: 0;
    border-bottom: none;
    transition: all 0.2s ease;
    display: block;
    position: relative;
}

.mega-menu a:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: rgba(255,255,255,0.4);
    border-radius: 50%;
}

.mega-menu a:hover {
    color: #ffffff;
    background: rgba(255,255,255,0.12);
    border-radius: var(--radius-sm);
}

.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    color: var(--bg-white);
    padding: var(--space-xl) var(--space-md);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    color: var(--bg-white);
    font-size: 3rem;
    margin-bottom: var(--space-sm);
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.tagline {
    font-size: 1.25rem;
    opacity: 0.95;
    font-weight: 300;
}

main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-xl) var(--space-md);
}

.content {
    background: var(--bg-white);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: background-color 0.3s ease;
}

.content h2 {
    color: var(--primary-dark);
    padding-bottom: var(--space-xs);
    border-bottom: 3px solid var(--accent);
    margin-bottom: var(--space-md);
}

.content h3 {
    color: var(--primary);
    margin-top: var(--space-lg);
}

.content p {
    text-align: left;
    color: var(--text-secondary);
}

.content a {
    color: var(--primary);
    font-weight: 500;
    border-bottom: 2px solid var(--primary-light);
}

.content a:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary-dark);
}

.content ul, .content ol {
    margin-left: var(--space-md);
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

.content li {
    margin-bottom: var(--space-xs);
}

.content ul li::marker {
    color: var(--primary-light);
}

.article-links {
    background: linear-gradient(135deg, var(--bg-warm) 0%, #fff8e1 100%);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    margin-top: var(--space-xl);
    border-left: 5px solid var(--accent);
    box-shadow: var(--shadow-sm);
    transition: background-color 0.3s ease;
}

[data-theme="dark"] .article-links {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
}

.article-links h3 {
    margin-top: 0;
    color: var(--primary-dark);
    font-size: 1.3rem;
}

.article-links ul {
    margin-left: 0;
    list-style: none;
}

.article-links li {
    padding: var(--space-xs) 0;
    padding-left: 1.5rem;
    position: relative;
}

.article-links li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.article-links a {
    border-bottom: none;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: var(--space-lg) 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

th, td {
    padding: var(--space-sm);
    text-align: left;
}

th {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--bg-white);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.3s ease;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: var(--bg-light);
}

blockquote {
    background: var(--bg-light);
    border-left: 4px solid var(--accent);
    padding: var(--space-md) var(--space-lg);
    margin: var(--space-lg) 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--text-secondary);
    transition: background-color 0.3s ease;
}

blockquote p:last-child {
    margin-bottom: 0;
}

.warning-box {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border: 1px solid var(--accent-light);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin: var(--space-lg) 0;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.3s ease;
}

[data-theme="dark"] .warning-box {
    background: linear-gradient(135deg, #742a2a 0%, #9b2c2c 100%);
}

.warning-box h4 {
    color: #c53030;
    margin-bottom: var(--space-xs);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.warning-box h4::before {
    content: '⚠️';
}

.info-box {
    background: linear-gradient(135deg, #e8eaf6 0%, #c5cae9 100%);
    border: 1px solid var(--primary-light);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin: var(--space-lg) 0;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.3s ease;
}

[data-theme="dark"] .info-box {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
}

.info-box h4 {
    color: var(--primary-dark);
    margin-bottom: var(--space-xs);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-box h4::before {
    content: 'ℹ️';
}

.tip-box {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border: 1px solid var(--accent);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin: var(--space-lg) 0;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.3s ease;
}

[data-theme="dark"] .tip-box {
    background: linear-gradient(135deg, #f57f17 0%, #ff8f00 100%);
}

.tip-box h4 {
    color: #f57f17;
    margin-bottom: var(--space-xs);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tip-box h4::before {
    content: '💡';
}

footer {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: rgba(255,255,255,0.8);
    text-align: center;
    padding: var(--space-xl) var(--space-md);
    margin-top: var(--space-xl);
}

footer p {
    margin-bottom: var(--space-sm);
}

footer a {
    color: var(--accent);
    border-bottom: none;
}

footer a:hover {
    color: var(--bg-white);
    border-bottom: 1px solid var(--bg-white);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.footer-links a {
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    :root {
        --space-xl: 2.5rem;
        --space-lg: 1.5rem;
    }
    
    .theme-toggle {
        top: 0.5rem;
        right: 0.5rem;
        width: 40px;
        height: 40px;
    }
    
    .hamburger {
        display: none !important;
    }
    
    .nav-top {
        flex-direction: row;
        gap: var(--space-xs);
        margin-bottom: 0;
    }
    
    .mega-menu {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.25rem !important;
        padding: 0.5rem 0 !important;
        margin-top: 0.5rem !important;
        border-top: 1px solid rgba(255,255,255,0.15);
        overflow-x: visible !important;
        -webkit-overflow-scrolling: auto;
        scrollbar-width: auto;
    }
    
    .mega-menu::-webkit-scrollbar {
        display: none;
    }
    
    .mega-menu a {
        flex-shrink: 0 !important;
        width: auto !important;
        text-align: center !important;
        border-bottom: none !important;
        padding: 0.35rem 0.6rem !important;
        font-size: 0.8rem !important;
        white-space: nowrap !important;
        background: transparent !important;
        border-radius: 0 !important;
        color: rgba(255,255,255,0.95) !important;
        position: relative;
    }
    
    .mega-menu a:not(:last-child)::after {
        content: '';
        position: absolute;
        right: -0.125rem;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 3px;
        background: rgba(255,255,255,0.4);
        border-radius: 50%;
    }
    
    .mega-menu a:hover {
        background: rgba(255,255,255,0.12) !important;
        border-radius: 4px !important;
    }
    
    .hero {
        padding: var(--space-lg) var(--space-sm);
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    main {
        padding: var(--space-md) var(--space-sm);
    }
    
    .content {
        padding: var(--space-md);
    }
    
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    body {
        font-size: 16px;
    }
}

@media print {
    header, footer, .back-to-top, .reading-progress, .theme-toggle, .hamburger {
        display: none;
    }
    
    .content {
        padding: 0;
        box-shadow: none;
    }
    
    body {
        background: white;
    }
    
    a {
        border-bottom: none;
        color: var(--text-primary);
    }
    
    a::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: var(--text-muted);
    }
}
