/* 
 * financehealthlaw.com - Core Stylesheet
 * Workspace path: /Users/jon/Documents/TheForge/financehealthlaw.com/www/style.css
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Merriweather:wght@300;400;700&family=Noto+Sans+SC:wght@400;500;700&display=swap');

:root {
    /* Color Palette - Financial Trust & Premium Feel */
    --color-primary: #0A2540; /* Deep trust blue */
    --color-primary-light: #1A3B5C;
    --color-primary-dark: #051626;
    --color-secondary: #00D4FF; /* Vibrant cyan accent for modern tech feel */
    --color-accent: #FFB800; /* Gold/yellow for financial wealth/alerts */
    
    --color-bg: #F8FAFC;
    --color-surface: #FFFFFF;
    --color-surface-alt: #F1F5F9;
    
    --color-text: #0F172A;
    --color-text-light: #475569;
    --color-text-inverse: #FFFFFF;
    
    --color-border: #E2E8F0;
    --color-success: #10B981;
    --color-error: #EF4444;

    /* Typography */
    --font-heading: 'Merriweather', serif;
    --font-body: 'Inter', 'Noto Sans SC', sans-serif;
    
    /* Fluid Scale */
    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --text-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
    --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1.05rem + 0.375vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
    --text-3xl: clamp(1.875rem, 1.5rem + 1.875vw, 2.5rem);
    --text-4xl: clamp(2.25rem, 1.75rem + 2.5vw, 3.5rem);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Elevation */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Borders */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* RTL Support - Placeholder */
html[dir="rtl"] {
    --text-align: right;
}

/* Reset & Basics */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
html:focus-within { scroll-behavior: smooth; }

body {
    min-height: 100vh;
    text-rendering: optimizeSpeed;
    line-height: 1.6;
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    overflow-x: hidden;
    opacity: 0; /* JS will fade in */
    transition: opacity var(--transition-normal);
}

body.loaded {
    opacity: 1;
}

/* Ensure CJK line height is slightly larger for readability */
html[lang="zh"] body { line-height: 1.8; }
html[lang="de"] { word-break: break-word; hyphens: auto; }

/* Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: white;
    padding: 8px;
    z-index: 1000;
    transition: top var(--transition-fast);
}
.skip-link:focus { top: 0; }
*:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
}

/* Typography elements */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    line-height: 1.2;
    color: var(--color-primary);
    margin-bottom: var(--space-md);
}
h1 { font-size: var(--text-4xl); font-weight: 700; }
h2 { font-size: var(--text-3xl); font-weight: 700; }
h3 { font-size: var(--text-2xl); font-weight: 600; }
p { margin-bottom: var(--space-md); color: var(--color-text-light); }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--color-secondary); }
img, svg { max-width: 100%; display: block; }

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}
.grid { display: grid; gap: var(--space-xl); }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.text-center { text-align: center; }
.mt-xl { margin-top: var(--space-xl); }
.mb-xl { margin-bottom: var(--space-xl); }
.py-xl { padding: var(--space-xl) 0; }
.py-2xl { padding: var(--space-2xl) 0; }
.py-3xl { padding: var(--space-3xl) 0; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    font-size: var(--text-base);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-text-inverse);
    box-shadow: var(--shadow-md);
}
.btn-primary:hover {
    filter: brightness(1.1);
    transform: scale(1.03);
    color: var(--color-text-inverse);
}
.btn-secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}
.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 100%;
    background-color: var(--color-primary);
    transition: right var(--transition-normal);
    z-index: -1;
}
.btn-secondary:hover {
    color: var(--color-text-inverse);
}
.btn-secondary:hover::before {
    right: 0;
}

/* Header & Nav */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    z-index: 100;
    transition: all var(--transition-normal);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}
.header.scrolled {
    padding: 0.5rem 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}
.header:not(.scrolled) {
    padding: 1rem 0;
}
.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-primary);
    font-family: var(--font-heading);
}
.nav-links {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}
.nav-link {
    color: var(--color-text);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background-color: var(--color-secondary);
    transition: width var(--transition-normal);
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* Language Selector */
.lang-selector {
    position: relative;
}
.lang-btn {
    background: transparent;
    border: 1px solid var(--color-border);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: var(--text-sm);
    font-family: var(--font-body);
}
.lang-dropdown {
    position: absolute;
    top: 100%; right: 0;
    background: var(--color-surface);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    min-width: 150px;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all var(--transition-fast);
    z-index: 101;
    overflow: hidden;
}
.lang-selector:hover .lang-dropdown,
.lang-selector:focus-within .lang-dropdown {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.lang-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 1rem;
    color: var(--color-text);
    font-size: var(--text-sm);
}
.lang-dropdown a:hover {
    background: var(--color-surface-alt);
    color: var(--color-primary);
}

/* Hamburger */
.hamburger {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px; height: 20px;
    position: relative;
    z-index: 1000;
}
.hamburger span {
    display: block;
    width: 100%; height: 2px;
    background-color: var(--color-primary);
    position: absolute; left: 0;
    transition: all var(--transition-normal);
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 9px; }
.hamburger span:nth-child(3) { top: 18px; }
.nav-open .hamburger span:nth-child(1) { transform: rotate(45deg); top: 9px; }
.nav-open .hamburger span:nth-child(2) { opacity: 0; }
.nav-open .hamburger span:nth-child(3) { transform: rotate(-45deg); top: 9px; }

/* Hero Sections */
.hero {
    min-height: 80vh;
    padding-top: 120px;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    color: var(--color-text-inverse);
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top:0; left:0; right:0; bottom:0;
    background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M0 0l100 100M100 0L0 100" stroke="rgba(255,255,255,0.03)" stroke-width="2"/></svg>');
    background-size: 100px 100px;
    opacity: 0.5;
    animation: gradient-move 30s linear infinite;
}
@keyframes gradient-move {
    0% { background-position: 0 0; }
    100% { background-position: 100px 100px; }
}
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}
.hero h1 { color: var(--color-text-inverse); }
.hero p { color: rgba(255,255,255,0.8); font-size: var(--text-lg); }
.hero-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    margin-bottom: var(--space-md);
    color: var(--color-secondary);
}
.hero-ctas {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    margin-top: var(--space-xl);
}

.hero-internal {
    min-height: 40vh;
    padding-top: 120px;
    display: flex;
    align-items: center;
    background: var(--color-primary-dark);
    color: var(--color-text-inverse);
    text-align: center;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    color: rgba(255,255,255,0.5);
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-20px) translateX(-50%); }
    60% { transform: translateY(-10px) translateX(-50%); }
}

/* Animations & Reveal System */
.reveal-up { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal-left { opacity: 0; transform: translateX(-40px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal-right { opacity: 0; transform: translateX(40px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal-scale { opacity: 0; transform: scale(0.85); transition: opacity 0.8s ease, transform 0.8s ease; }
.is-visible { opacity: 1; transform: translate(0) scale(1); }

/* Stagger logic via JS inline delay or fixed classes */
.reveal-stagger > * { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }

/* Stats Counter Section */
.stats {
    background: var(--color-primary);
    color: white;
    padding: var(--space-2xl) 0;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-xl);
    text-align: center;
}
.stat-item h3 {
    font-size: var(--text-4xl);
    color: var(--color-secondary);
    margin-bottom: var(--space-xs);
}
.stat-item p { color: rgba(255,255,255,0.8); font-size: var(--text-sm); margin:0;}

/* Cards */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    height: 100%;
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.card-icon {
    width: 48px; height: 48px;
    background: var(--color-surface-alt);
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    color: var(--color-primary);
    margin-bottom: var(--space-md);
}

/* Pricing Cards */
.pricing-card { text-align: center; position: relative; }
.pricing-card.recommended {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
    transform: scale(1.02);
}
.pricing-card.recommended:hover {
    transform: scale(1.05) translateY(-6px);
}
.badge-rec {
    position: absolute;
    top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--color-accent);
    color: var(--color-primary-dark);
    font-weight: 700;
    font-size: var(--text-xs);
    padding: 4px 12px;
    border-radius: var(--radius-full);
}
.price { font-size: var(--text-3xl); font-weight: 700; color: var(--color-primary); margin: var(--space-md) 0; }
.pricing-card ul { margin-bottom: var(--space-xl); text-align: left; }
.pricing-card li { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pricing-card li svg { color: var(--color-success); flex-shrink: 0; }

/* Floating Labels Form */
.form-group {
    position: relative;
    margin-bottom: var(--space-lg);
}
.form-control {
    width: 100%;
    padding: 1rem 0.5rem 0.25rem 0.5rem;
    border: none;
    border-bottom: 2px solid var(--color-border);
    background: transparent;
    font-size: var(--text-base);
    font-family: var(--font-body);
    transition: border-color var(--transition-fast);
}
.form-control:focus {
    outline: none;
    border-bottom-color: var(--color-primary);
}
.form-label {
    position: absolute;
    top: 1rem; left: 0.5rem;
    color: var(--color-text-light);
    pointer-events: none;
    transition: all var(--transition-fast);
}
.form-control:focus ~ .form-label,
.form-control:not(:placeholder-shown) ~ .form-label {
    top: -0.25rem;
    font-size: var(--text-xs);
    color: var(--color-primary);
}
textarea.form-control { resize: vertical; min-height: 120px; }

/* FAQ Accordion */
.accordion {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    background: var(--color-surface);
    overflow: hidden;
}
.accordion-btn {
    width: 100%;
    text-align: left;
    padding: var(--space-md);
    background: transparent;
    border: none;
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.accordion-icon {
    transition: transform var(--transition-normal);
}
.accordion-btn[aria-expanded="true"] .accordion-icon {
    transform: rotate(45deg);
}
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
}
.accordion-inner {
    padding: 0 var(--space-md) var(--space-md);
    color: var(--color-text-light);
}

/* Timeline */
.timeline {
    position: relative;
    border-left: 2px solid var(--color-border);
    padding-left: var(--space-xl);
    margin-left: var(--space-md);
}
.timeline-item { position: relative; margin-bottom: var(--space-xl); }
.timeline-item::before {
    content: '';
    position: absolute;
    left: calc(var(--space-xl) * -1 - 9px);
    top: 5px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--color-primary);
    border: 3px solid var(--color-surface);
    box-shadow: 0 0 0 2px var(--color-primary-light);
}
.timeline-year {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: var(--space-xs);
}

/* Blog Article Preview & Expand */
.blog-card { cursor: pointer; }
.blog-img-container { overflow: hidden; border-radius: var(--radius-md) var(--radius-md) 0 0; margin: calc(var(--space-xl) * -1) calc(var(--space-xl) * -1) var(--space-md); }
.blog-card img { transition: transform var(--transition-normal); width: 100%; height: 200px; object-fit: cover; }
.blog-card:hover img { transform: scale(1.08); }
.blog-meta { font-size: var(--text-xs); color: var(--color-text-light); display: flex; gap: 8px; margin-bottom: var(--space-xs); }
.blog-tag { background: var(--color-surface-alt); padding: 2px 8px; border-radius: var(--radius-full); color: var(--color-primary); font-weight: 600;}
.blog-content-full {
    display: none;
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
    margin-top: var(--space-md);
}
.blog-card.expanded .blog-content-full { display: block; animation: slideDown 0.3s ease; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* Team Grid */
.team-card { text-align: center; position: relative; overflow: hidden; border-radius: var(--radius-lg); }
.team-img { width: 120px; height: 120px; border-radius: 50%; margin: 0 auto var(--space-md); background: linear-gradient(135deg, var(--color-primary), var(--color-secondary)); display: flex; align-items:center; justify-content:center; color:white; font-size: 2rem;}
.team-overlay { position: absolute; inset: 0; background: rgba(10,37,64,0.9); display: flex; align-items:center; justify-content:center; gap: 16px; opacity: 0; transition: opacity var(--transition-normal); border-radius: var(--radius-lg);}
.team-card:hover .team-overlay { opacity: 1; }
.team-overlay a { color: white; transition: transform var(--transition-fast); }
.team-overlay a:hover { transform: scale(1.2); color: var(--color-secondary); }

/* Footer */
.footer {
    background: var(--color-primary-dark);
    color: rgba(255,255,255,0.7);
    padding: var(--space-3xl) 0 var(--space-xl);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}
.footer-col h4 { color: var(--color-text-inverse); font-size: var(--text-lg); margin-bottom: var(--space-md); }
.footer-col a { color: rgba(255,255,255,0.7); display: block; margin-bottom: 8px; }
.footer-col a:hover { color: var(--color-secondary); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: var(--space-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--text-sm);
}

/* Newsletter Input Group */
.input-group { display: flex; }
.input-group input { flex: 1; padding: 0.5rem 1rem; border: none; border-radius: var(--radius-sm) 0 0 var(--radius-sm); outline:none;}
.input-group button { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--color-surface);
    box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
    padding: var(--space-md);
    z-index: 1000;
    transform: translateY(100%);
    transition: transform var(--transition-normal);
}
.cookie-banner.show { transform: translateY(0); }

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px; right: 30px;
    width: 50px; height: 50px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: 0; visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    z-index: 99;
}
.back-to-top.visible {
    opacity: 1; visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    background: var(--color-primary-light);
    transform: translateY(-5px);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px; left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--color-success);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: all var(--transition-normal);
    z-index: 10000;
}
.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.toast.error { background: var(--color-error); }

/* Breadcrumbs */
.breadcrumbs {
    font-size: var(--text-sm);
    color: rgba(255,255,255,0.7);
    margin-bottom: var(--space-md);
}
.breadcrumbs a { color: var(--color-secondary); }

/* Portal / Login specific */
.portal-layout {
    display: flex;
    min-height: 100vh;
}
.portal-left {
    flex: 1;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    background-size: 200% 200%;
    animation: gradient-move 6s ease infinite;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: var(--space-2xl);
    position: relative;
    overflow: hidden;
}
.portal-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface);
    padding: var(--space-2xl);
}
.portal-form-container {
    width: 100%;
    max-width: 400px;
    animation: fadeSlideUp 0.6s ease forwards;
    opacity: 0;
}
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.shake { animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* Loader */
.loader {
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top: 3px solid white;
    width: 20px; height: 20px;
    animation: spin 1s linear infinite;
    display: none;
}
.btn.loading .loader { display: block; }
.btn.loading span { display: none; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Legal Content Tables */
.legal-content table {
    width: 100%; border-collapse: collapse; margin-bottom: var(--space-xl);
}
.legal-content th, .legal-content td {
    border: 1px solid var(--color-border); padding: 12px; text-align: left;
}
.legal-content th { background: var(--color-surface-alt); }

/* Responsive */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .portal-layout { flex-direction: column; }
    .portal-left { padding: var(--space-xl); min-height: 30vh; flex: none; }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0; right: -100%;
        width: 80%; max-width: 300px;
        height: 100vh;
        background: var(--color-surface);
        flex-direction: column;
        padding: 80px 20px 20px;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: right var(--transition-normal);
        z-index: 99;
    }
    .nav-open .nav-links { right: 0; }
    .hamburger { display: block; }
    
    .grid { grid-template-columns: 1fr !important; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: var(--space-md); text-align: center; }
    
    .hero { padding-top: 100px; }
    .hero-ctas { flex-direction: column; }
}

/* Accessibility: Reduced Motion */
@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;
    }
}

/* FORUM CUSTOM STYLES */
.forum-list {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.forum-thread {
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.forum-thread:hover {
    background-color: var(--color-surface-alt);
    transform: translateX(4px);
    cursor: pointer;
}

.forum-thread a:hover {
    color: var(--color-primary);
}
