/*
 * Fund Detail Page - Premium Fintech Design
 * Matching main site's premium aesthetic
 */

/* ===== DESIGN TOKENS ===== */
:root {
    /* Brand - Deep Navy with Magenta accent */
    --navy-900: #030712;
    --navy-800: #0B1E3D;
    --navy-700: #0F2847;
    --navy-600: #1a3a5c;
    --brand-primary: #0B1E3D;
    --brand-primary-hover: #132D54;
    --brand-primary-light: #E8EDF4;
    --brand-gradient: linear-gradient(135deg, #0B1E3D 0%, #1a3a5c 50%, #0f2847 100%);

    /* Accent */
    --accent-gold: #F59E0B;
    --accent-gold-light: #FFFAEB;
    --magenta: #FF2B83;
    --magenta-hover: #E61F6F;
    --magenta-glow: rgba(255, 43, 131, 0.5);

    /* Semantic - WCAG AA contrast compliant (min 4.5:1 on white) */
    --positive: #047857;
    --positive-light: #ECFDF3;
    --positive-glow: rgba(4, 120, 87, 0.4);
    --negative: #b91c1c;
    --negative-light: #FEF3F2;
    --negative-glow: rgba(185, 28, 28, 0.4);

    /* Neutrals */
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-tertiary: #64748b;
    --text-muted: #64748b;
    --text-placeholder: #94a3b8;

    /* Surfaces */
    --surface-page: #f8fafc;
    --surface-card: #ffffff;
    --surface-elevated: #ffffff;
    --surface-sunken: #f1f5f9;
    --surface-overlay: rgba(255, 255, 255, 0.97);

    /* Borders */
    --border-default: #e2e8f0;
    --border-light: #f1f5f9;
    --border-strong: #cbd5e1;

    /* Shadows */
    --shadow-xs: 0px 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04);
    --shadow-card-hover: 0 20px 40px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04);
    --shadow-focus: 0px 0px 0px 4px rgba(255, 43, 131, 0.12);
    --shadow-glow-magenta: 0 0 40px var(--magenta-glow);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'SF Mono', 'Roboto Mono', 'Fira Code', monospace;

    /* Spacing - 4px base */
    --space-0: 0;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
    --space-20: 80px;
    --space-24: 96px;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-2xl: 28px;
    --radius-full: 9999px;

    /* Transitions */
    --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 0.15s;
    --duration-normal: 0.25s;
    --duration-slow: 0.4s;

    /* Z-index scale */
    --z-base: 0;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 300;
    --z-tooltip: 400;
}

/* ===== BASE RESET ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
    overscroll-behavior-x: none;
}

body {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--surface-page);
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ===== BREADCRUMB ===== */
.breadcrumb-section {
    background: transparent;
    padding: var(--space-4) var(--space-6);
}

.breadcrumb-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 13px;
}

.breadcrumb-link {
    color: var(--text-tertiary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--duration-fast) var(--ease-out);
}

.breadcrumb-link:hover {
    color: var(--text-primary);
}

.breadcrumb-chevron {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.breadcrumb-current {
    color: var(--text-muted);
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== FUND HEADER - Clean & Light ===== */
.fund-header {
    background: var(--surface-card);
    padding: 0 var(--space-6) var(--space-8);
    border-bottom: 1px solid var(--border-default);
}

.fund-header-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    gap: var(--space-6);
    padding-top: var(--space-4);
}

.fund-header-icon {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-full);
    background: var(--surface-sunken);
    border: 1px solid var(--border-default);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.fund-header-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
}

.fund-header-icon span {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: -0.02em;
}

.fund-header-info {
    flex: 1;
    min-width: 0;
    padding-top: var(--space-1);
}

.fund-header-badge {
    margin-bottom: var(--space-3);
}

.fund-header-badge .badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: 11px;
    font-weight: 600;
    padding: 6px 14px;
    background: var(--surface-sunken);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.fund-header-name {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin: 0 0 var(--space-2) 0;
    letter-spacing: -0.02em;
}

.fund-header-category {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0 0 var(--space-1) 0;
    font-weight: 500;
}

.fund-header-isin {
    font-size: 13px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    margin: 0;
    letter-spacing: 0.02em;
}

/* ===== HEADER CTA - Same style as table ===== */
.fund-header-cta-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: auto;
    flex-shrink: 0;
}

.fund-header-cta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.cta-ad-label {
    font-size: 9px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: var(--space-1);
}

.cta-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--space-2) 0;
}

.cta-risk-notice {
    font-size: 11px;
    color: var(--text-tertiary);
    line-height: 1.4;
    margin-top: var(--space-3);
    text-align: right;
    max-width: 300px;
}

.fund-header-cta .btn {
    padding: 12px 20px;
    font-size: 14px;
    white-space: nowrap;
}

.fund-header-cta .btn-logo {
    width: 18px;
    height: 18px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .fund-header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .fund-header-cta-wrapper {
        width: 100%;
        margin-top: var(--space-4);
        margin-left: 0;
        align-items: stretch;
    }

    .cta-ad-label,
    .cta-title {
        text-align: center;
    }

    .fund-header-cta {
        width: 100%;
    }

    .fund-header-cta .btn {
        flex: 1;
        justify-content: center;
    }

    .cta-risk-notice {
        text-align: center;
        max-width: 100%;
    }
}

/* ===== STICKY SUMMARY BAR ===== */
.fund-summary-bar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: var(--space-4) var(--space-6);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    transition: all var(--duration-normal) var(--ease-out);
    border-bottom: 1px solid var(--border-default);
}

.fund-summary-bar.scrolled {
    box-shadow: var(--shadow-md);
}

.summary-bar-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.summary-bar-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 320px;
    letter-spacing: -0.01em;
}

.fund-summary-bar.scrolled .summary-bar-name {
    opacity: 1;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.summary-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.summary-value {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum", "ss01", "zero";
    letter-spacing: -0.01em;
}

.summary-value.positive {
    color: var(--positive);
    text-shadow: 0 0 12px rgba(4, 120, 87, 0.1);
}

.summary-value.negative {
    color: var(--negative);
    text-shadow: 0 0 12px rgba(185, 28, 28, 0.1);
}

.summary-divider {
    width: 1px;
    height: 24px;
    background: var(--border-default);
}

/* ===== KEY STATS GRID - Card Treatment ===== */
.fund-stats-section {
    background: var(--surface-card);
    padding: var(--space-8) var(--space-6);
    position: relative;
}

.fund-stats-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0;
    background: var(--surface-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border-default);
    box-shadow: var(--shadow-sm);
}

.fund-stat-card {
    background: transparent;
    padding: var(--space-5) var(--space-4);
    text-align: center;
    position: relative;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: var(--radius-md);
}

.fund-stat-card:hover {
    background: linear-gradient(135deg, var(--surface-sunken) 0%, transparent 100%);
    transform: translateY(-2px);
}

.fund-stat-card:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 32px;
    width: 1px;
    background: linear-gradient(180deg, transparent, var(--border-default), transparent);
}

.fund-stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--space-3);
}

.fund-stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--positive);
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum", "ss01", "zero";
    line-height: 1;
    letter-spacing: -0.03em;
    text-shadow: 0 0 20px rgba(4, 120, 87, 0.12);
}

.fund-stat-value.negative {
    color: var(--negative);
    text-shadow: 0 0 20px rgba(185, 28, 28, 0.12);
}

.fund-stat-value.cost,
.fund-stat-value.neutral {
    color: var(--text-primary);
    text-shadow: none;
}

.fund-stat-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: var(--space-1);
    font-weight: 450;
}

/* Morningstar Stars */
.stars {
    display: flex;
    justify-content: center;
    gap: 3px;
}

.stars svg {
    width: 20px;
    height: 20px;
    fill: var(--border-default);
    transition: fill var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-spring);
}

.stars svg.filled {
    fill: var(--accent-gold);
}

.fund-stat-card:hover .stars svg.filled {
    transform: scale(1.1);
}

/* ===== SECTION HEADERS - Asymmetric ===== */
.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: var(--space-8);
}

.section-header-left {
    max-width: 600px;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 15px;
    color: var(--text-tertiary);
    margin: var(--space-2) 0 0 0;
    line-height: 1.5;
}

.section-action {
    font-size: 14px;
    font-weight: 500;
    color: var(--brand-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--space-1);
    transition: gap var(--duration-fast) var(--ease-out);
}

.section-action:hover {
    gap: var(--space-2);
}

/* ===== PERFORMANCE SECTION - TradingView Inspired ===== */
.fund-performance-section {
    background: var(--surface-page);
    padding: var(--space-12) var(--space-6);
    position: relative;
}

.performance-header {
    max-width: 1280px;
    margin: 0 auto var(--space-8);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-6);
    flex-wrap: wrap;
}

.performance-header-left {
    flex: 1;
    min-width: 240px;
}

.fund-performance-section .section-title {
    margin-bottom: var(--space-1);
}

.fund-performance-section .section-subtitle {
    margin-bottom: 0;
}

/* Chart Stats - Floating Card */
.chart-stats {
    display: flex;
    gap: var(--space-8);
    padding: var(--space-5) var(--space-6);
    background: var(--surface-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
}

.chart-stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chart-stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.chart-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

.chart-stat-value.positive { color: var(--positive); }
.chart-stat-value.negative { color: var(--negative); }

/* Period Selector - Pill Style */
.chart-period-selector {
    max-width: 1280px;
    margin: 0 auto var(--space-5);
    display: inline-flex;
    gap: var(--space-1);
    padding: var(--space-1);
    background: var(--surface-sunken);
    border-radius: var(--radius-md);
}

.period-btn {
    padding: var(--space-2) var(--space-4);
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-sans);
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.period-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.5);
}

.period-btn.active {
    background: var(--surface-card);
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* Chart Wrapper */
.tv-chart-wrapper {
    max-width: 1280px;
    margin: 0 auto var(--space-8);
    position: relative;
    background: var(--surface-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.tv-chart-container {
    width: 100%;
    height: 420px;
}

.tv-chart-tooltip {
    position: absolute;
    top: var(--space-5);
    left: var(--space-5);
    padding: var(--space-3) var(--space-4);
    background: var(--text-primary);
    border-radius: var(--radius-md);
    opacity: 0;
    transition: opacity var(--duration-fast) var(--ease-out);
    pointer-events: none;
    z-index: 10;
}

.tv-tooltip-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 2px;
}

.tv-tooltip-value {
    font-size: 15px;
    font-weight: 700;
    color: white;
    font-variant-numeric: tabular-nums;
}

/* Performance Stats Grid */
.performance-stats-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
}

.perf-stat-card {
    background: var(--surface-card);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all var(--duration-normal) cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.perf-stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--surface-sunken) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.perf-stat-card:hover::before {
    opacity: 1;
}

.perf-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-strong);
}

.perf-stat-period {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--space-3);
}

.perf-stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum", "ss01", "zero";
    letter-spacing: -0.03em;
    line-height: 1;
}

.perf-stat-value.positive {
    color: var(--positive);
    text-shadow: 0 0 20px rgba(4, 120, 87, 0.15);
}

.perf-stat-value.negative {
    color: var(--negative);
    text-shadow: 0 0 20px rgba(185, 28, 28, 0.15);
}

.perf-stat-annual {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 450;
}

/* ===== RISK SECTION - Split Layout ===== */
.fund-risk-section {
    background: var(--surface-card);
    padding: var(--space-16) var(--space-6);
    position: relative;
    overflow: hidden;
}

.fund-risk-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: var(--surface-sunken);
    z-index: 0;
}

.risk-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--space-12);
    position: relative;
    z-index: 1;
}

.risk-main {
    padding-right: var(--space-8);
}

.risk-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--space-2) 0;
    letter-spacing: -0.02em;
}

.risk-subtitle {
    font-size: 16px;
    color: var(--text-tertiary);
    margin: 0 0 var(--space-10) 0;
    max-width: 480px;
}

.risk-meter {
    margin-bottom: var(--space-8);
}

.risk-scale {
    display: flex;
    gap: 6px;
    margin-bottom: var(--space-4);
}

.risk-level {
    flex: 1;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.4);
    border-radius: var(--radius-md);
    transition: all var(--duration-normal) var(--ease-spring);
    cursor: default;
}

.risk-level[data-level="1"] { background: #D1FAE5; }
.risk-level[data-level="2"] { background: #A7F3D0; }
.risk-level[data-level="3"] { background: #FEF3C7; }
.risk-level[data-level="4"] { background: #FDE68A; }
.risk-level[data-level="5"] { background: #FED7AA; }
.risk-level[data-level="6"] { background: #FECACA; }
.risk-level[data-level="7"] { background: #FCA5A5; }

.risk-level.active {
    background: var(--text-primary) !important;
    color: white;
    transform: scale(1.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.risk-labels {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.risk-description {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

.risk-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.risk-info-card {
    background: var(--surface-sunken);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
}

.risk-info-card h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--space-3) 0;
}

.risk-info-card p {
    font-size: 14px;
    color: var(--text-tertiary);
    line-height: 1.6;
    margin: 0 0 var(--space-4) 0;
}

.risk-info-card ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.risk-info-card li {
    font-size: 13px;
    color: var(--text-secondary);
    padding: var(--space-3) 0;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
}

.risk-info-card li strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ===== ESG SECTION - Centered Cards ===== */
.fund-esg-section {
    background: linear-gradient(180deg, var(--surface-page) 0%, var(--surface-card) 100%);
    padding: var(--space-16) var(--space-6);
}

.esg-container {
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
}

.esg-container .section-title {
    margin-bottom: var(--space-2);
}

.esg-container .section-subtitle {
    margin-bottom: var(--space-10);
}

.esg-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
    margin-bottom: var(--space-8);
}

.esg-score-card {
    background: var(--surface-card);
    border-radius: var(--radius-xl);
    padding: var(--space-8) var(--space-6);
    text-align: center;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-default);
    position: relative;
    overflow: hidden;
    transition: all var(--duration-normal) var(--ease-out);
}

.esg-score-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.esg-score-card.environmental::before { background: linear-gradient(90deg, #059669 0%, #10B981 100%); }
.esg-score-card.social::before { background: var(--brand-gradient); }
.esg-score-card.governance::before { background: linear-gradient(90deg, #7C3AED 0%, #8B5CF6 100%); }

.esg-score-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.esg-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-4);
    opacity: 0.2;
}

.esg-icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 1.5;
}

.esg-score-card.environmental .esg-icon svg { stroke: var(--positive); }
.esg-score-card.social .esg-icon svg { stroke: var(--brand-primary); }
.esg-score-card.governance .esg-icon svg { stroke: #7C3AED; }

.esg-score {
    font-size: 40px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: var(--space-2);
    letter-spacing: -0.02em;
}

.esg-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.esg-summary {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    background: var(--positive-light);
    border-radius: var(--radius-xl);
    padding: var(--space-5) var(--space-6);
    border: 1px solid rgba(5, 150, 105, 0.15);
    text-align: left;
}

.esg-badge {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-shrink: 0;
}

.esg-badge-icon {
    width: 28px;
    height: 28px;
}

.esg-badge-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--positive);
}

.esg-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ===== BUY SECTION - CTA Focus ===== */
.fund-buy-section {
    background: var(--surface-sunken);
    padding: var(--space-16) var(--space-6);
    position: relative;
}

.fund-buy-section .section-title,
.fund-buy-section .section-subtitle {
    text-align: center;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
}

.fund-buy-section .section-title {
    margin-bottom: var(--space-2);
}

.fund-buy-section .section-subtitle {
    margin-bottom: var(--space-10);
}

.fund-platforms {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.platforms-ad-notice {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: center;
    margin-bottom: -8px;
}

.platforms-risk-notice {
    font-size: 11px;
    color: var(--text-tertiary);
    line-height: 1.4;
    text-align: center;
    margin-top: var(--space-4);
    padding: 0 var(--space-4);
}

.platform-card {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    background: var(--surface-card);
    border-radius: var(--radius-xl);
    padding: var(--space-5) var(--space-6);
    border: 2px solid var(--border-light);
    text-decoration: none;
    transition: all var(--duration-normal) var(--ease-out);
}

.platform-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.platform-logo-wrapper {
    width: 56px;
    height: 56px;
    background: white;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 8px;
    box-shadow: var(--shadow-sm);
}

.platform-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.platform-info {
    flex: 1;
    min-width: 0;
}

.platform-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    letter-spacing: -0.01em;
}

.platform-desc {
    font-size: 14px;
    color: var(--text-tertiary);
    line-height: 1.4;
}

.platform-arrow {
    width: 24px;
    height: 24px;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: all var(--duration-normal) var(--ease-out);
}

.platform-card:hover .platform-arrow {
    transform: translateX(6px);
    color: var(--brand-primary);
}

/* Platform Brand Variants */
.platform-card.nordnet {
    background: linear-gradient(135deg, #0B1E3D 0%, #132D54 100%);
    border-color: transparent;
}

.platform-card.nordnet .platform-name { color: #FFFFFF; }
.platform-card.nordnet .platform-desc { color: rgba(255, 255, 255, 0.65); }
.platform-card.nordnet .platform-arrow { color: #FF2B83; }

.platform-card.nordnet:hover {
    box-shadow: 0 20px 40px rgba(11, 30, 61, 0.4);
}

.platform-card.nordnet:hover .platform-arrow {
    color: #FF2B83;
}

.platform-card.kron {
    background: linear-gradient(135deg, #FF6B9D 0%, #C44569 100%);
    border-color: transparent;
}

.platform-card.kron .platform-name { color: #FFFFFF; }
.platform-card.kron .platform-desc { color: rgba(255, 255, 255, 0.8); }
.platform-card.kron .platform-arrow { color: #FFFFFF; }

.platform-card.kron:hover {
    box-shadow: 0 20px 40px rgba(196, 69, 105, 0.4);
}

/* ===== CALCULATOR SECTION - Premium Design ===== */
.fund-calculator-section {
    background: linear-gradient(180deg, var(--surface-page) 0%, var(--surface-card) 100%);
    padding: var(--space-16) var(--space-6);
    position: relative;
    overflow: hidden;
}

.fund-calculator-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1200px;
    height: 600px;
    background: radial-gradient(ellipse at center, rgba(34, 197, 94, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.calculator-container {
    max-width: 1100px;
    margin: 0 auto;
    background: var(--surface-card);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(0,0,0,0.03);
    overflow: hidden;
    position: relative;
}

.calculator-main {
    padding: var(--space-10);
}

.calculator-main .section-title {
    margin-bottom: var(--space-2);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.calculator-main .section-title::before {
    content: '📈';
    font-size: 28px;
}

.calculator-main .section-subtitle {
    margin-bottom: var(--space-8);
    max-width: 500px;
}

.calculator-inputs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
    margin-bottom: var(--space-8);
}

.calc-input-group {
    position: relative;
}

.calc-input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
    letter-spacing: 0;
}

.calc-input-wrapper {
    position: relative;
}

.calc-input-wrapper input {
    width: 100%;
    padding: var(--space-5) var(--space-5);
    padding-right: 52px;
    font-size: 22px;
    font-weight: 700;
    font-family: var(--font-sans);
    color: var(--text-primary);
    background: var(--surface-card);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-xl);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-variant-numeric: tabular-nums;
}

.calc-input-wrapper input:hover {
    border-color: var(--border-strong);
}

.calc-input-wrapper input:focus {
    outline: none;
    border-color: #22c55e;
    background: var(--surface-card);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12), 0 4px 12px rgba(34, 197, 94, 0.08);
    transform: translateY(-2px);
}

.calc-suffix {
    position: absolute;
    right: var(--space-5);
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 600;
    background: var(--surface-sunken);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
}

.calculator-chart {
    height: 320px;
    background: linear-gradient(135deg, var(--surface-sunken) 0%, rgba(34, 197, 94, 0.03) 100%);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    border: 1px solid var(--border-light);
    position: relative;
}

.calculator-chart::before {
    content: 'Utviklingen av investeringen din';
    position: absolute;
    top: var(--space-4);
    left: var(--space-5);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.calculator-results {
    background: linear-gradient(135deg, #0B1E3D 0%, #1a3a5c 100%);
    padding: var(--space-8);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
    position: relative;
}

.calculator-results::before {
    content: '';
    position: absolute;
    inset: 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;
}

.calc-result-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 1;
}

.calc-result-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.calc-result-card.highlight {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.1) 100%);
    border-color: rgba(34, 197, 94, 0.3);
    grid-column: 1 / -1;
}

.calc-result-card.highlight::before {
    display: none;
}

.calc-result-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--space-2);
}

.calc-result-card.highlight .calc-result-label {
    color: rgba(34, 197, 94, 0.9);
}

.calc-result-value {
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    line-height: 1;
}

.calc-result-card.highlight .calc-result-value {
    font-size: 42px;
    color: #22c55e;
    text-shadow: 0 0 30px rgba(34, 197, 94, 0.4);
}

.calc-disclaimer {
    grid-column: 1 / -1;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
    text-align: center;
    margin-top: var(--space-2);
    padding-top: var(--space-4);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Calculator */
@media (max-width: 768px) {
    .calculator-inputs {
        grid-template-columns: 1fr;
    }

    .calculator-results {
        grid-template-columns: 1fr;
    }

    .calc-result-card.highlight {
        grid-column: 1;
    }

    .calc-result-card.highlight .calc-result-value {
        font-size: 32px;
    }

    .calc-disclaimer {
        grid-column: 1;
    }
}

/* ===== ARTICLE SECTION ===== */
.fund-article-section {
    background: var(--surface-page);
    padding: var(--space-16) var(--space-6);
}

.article-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: var(--space-10);
}

.article-main {
    background: var(--surface-card);
    border-radius: var(--radius-xl);
    padding: var(--space-10);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
}

.article-main h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--space-5) 0;
    letter-spacing: -0.02em;
}

.article-main h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: var(--space-10) 0 var(--space-4) 0;
}

.article-main p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.75;
    margin: 0 0 var(--space-5) 0;
}

.article-main strong {
    color: var(--text-primary);
    font-weight: 600;
}

.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.sidebar-card {
    background: var(--surface-card);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.sidebar-card h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 var(--space-5) 0;
}

.sidebar-fact {
    display: flex;
    justify-content: space-between;
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-fact:last-child {
    border-bottom: none;
}

.sidebar-fact dt {
    font-size: 14px;
    color: var(--text-tertiary);
}

.sidebar-fact dd {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    padding: var(--space-1) var(--space-3);
    background: var(--surface-sunken);
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    transition: background var(--duration-fast) var(--ease-out);
}

.tag:hover {
    background: var(--border-default);
}

/* ===== HOLDINGS SECTION - Premium Table ===== */
.fund-holdings-section {
    background: linear-gradient(180deg, var(--surface-card) 0%, var(--surface-page) 100%);
    padding: var(--space-16) var(--space-6);
}

.holdings-container {
    max-width: 1280px;
    margin: 0 auto;
}

.holdings-container .section-title {
    text-align: center;
    margin-bottom: var(--space-2);
}

.holdings-container .section-subtitle {
    text-align: center;
    margin-bottom: var(--space-10);
}

.holdings-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: var(--space-8);
    align-items: start;
}

.holdings-table-wrapper {
    background: var(--surface-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
}

.holdings-list {
    display: flex;
    flex-direction: column;
}

.holding-row {
    display: grid;
    grid-template-columns: 48px 1fr 100px 110px;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-6);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.holding-row::after {
    content: '';
    position: absolute;
    left: var(--space-6);
    right: var(--space-6);
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}

.holding-row:last-child::after {
    display: none;
}

.holding-row:hover {
    background: linear-gradient(90deg, var(--surface-sunken) 0%, transparent 50%, var(--surface-sunken) 100%);
    transform: translateX(4px);
}

/* Rank Badge - Medal Style */
.holding-rank {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--surface-sunken);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.holding-row:nth-child(1) .holding-rank {
    background: linear-gradient(135deg, #FCD34D 0%, #F59E0B 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.holding-row:nth-child(2) .holding-rank {
    background: linear-gradient(135deg, #E5E7EB 0%, #9CA3AF 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(156, 163, 175, 0.35);
}

.holding-row:nth-child(3) .holding-rank {
    background: linear-gradient(135deg, #D97706 0%, #92400E 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
}

.holding-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.holding-company {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.holding-meta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.holding-ticker {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-tertiary);
    letter-spacing: 0.04em;
    background: var(--surface-sunken);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.holding-sector {
    font-size: 12px;
    color: var(--text-muted);
}

.holding-weight-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.holding-weight {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum", "ss01", "zero";
    letter-spacing: -0.01em;
}

.holding-weight-bar {
    width: 64px;
    height: 4px;
    background: var(--surface-sunken);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.holding-weight-fill {
    height: 100%;
    background: var(--brand-gradient);
    border-radius: var(--radius-full);
    transition: width var(--duration-slow) var(--ease-out);
}

.holding-change {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.holding-change.positive { color: var(--positive); }
.holding-change.negative { color: var(--negative); }

.holding-change svg {
    width: 16px;
    height: 16px;
}

.holdings-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-5) var(--space-6);
    background: var(--surface-sunken);
    font-size: 14px;
}

.holdings-total-label {
    font-weight: 600;
    color: var(--text-tertiary);
}

.holdings-total-value {
    font-weight: 700;
    color: var(--text-primary);
}

/* Sector Breakdown Card */
.holdings-breakdown {
    background: var(--surface-card);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
}

.holdings-breakdown h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--space-6) 0;
    padding-left: var(--space-4);
    border-left: 3px solid var(--brand-primary);
}

.sector-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.sector-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

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

.sector-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.sector-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.sector-bar {
    height: 8px;
    background: var(--surface-sunken);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.sector-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width var(--duration-slow) var(--ease-out);
}

.sector-item:nth-child(1) .sector-bar-fill { background: linear-gradient(90deg, #0046FF 0%, #4D9FFF 100%); }
.sector-item:nth-child(2) .sector-bar-fill { background: linear-gradient(90deg, #059669 0%, #10B981 100%); }
.sector-item:nth-child(3) .sector-bar-fill { background: linear-gradient(90deg, #7C3AED 0%, #8B5CF6 100%); }
.sector-item:nth-child(4) .sector-bar-fill { background: linear-gradient(90deg, #F59E0B 0%, #FBBF24 100%); }
.sector-item:nth-child(5) .sector-bar-fill { background: linear-gradient(90deg, #DC2626 0%, #EF4444 100%); }
.sector-item:nth-child(6) .sector-bar-fill { background: linear-gradient(90deg, #0891B2 0%, #22D3EE 100%); }
.sector-item:nth-child(7) .sector-bar-fill { background: linear-gradient(90deg, #DB2777 0%, #F472B6 100%); }

.holdings-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: var(--space-6);
    padding-top: var(--space-5);
    border-top: 1px solid var(--border-light);
    line-height: 1.6;
}

/* ===== PROS/CONS SECTION ===== */
.fund-proscons-section {
    background: var(--surface-card);
    padding: var(--space-16) var(--space-6);
}

.proscons-container {
    max-width: 960px;
    margin: 0 auto;
}

.proscons-container .section-title,
.proscons-container .section-subtitle {
    text-align: center;
}

.proscons-container .section-title {
    margin-bottom: var(--space-2);
}

.proscons-container .section-subtitle {
    margin-bottom: var(--space-10);
}

.proscons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
}

.proscons-card {
    background: var(--surface-sunken);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    position: relative;
    overflow: hidden;
}

.proscons-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.proscons-card.pros::before { background: linear-gradient(90deg, #059669 0%, #10B981 100%); }
.proscons-card.cons::before { background: linear-gradient(90deg, #DC2626 0%, #EF4444 100%); }

.proscons-card h3 {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 var(--space-5) 0;
}

.proscons-card h3 svg {
    width: 22px;
    height: 22px;
}

.proscons-card.pros h3 { color: var(--positive); }
.proscons-card.cons h3 { color: var(--negative); }

.proscons-card ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.proscons-card li {
    position: relative;
    padding: var(--space-3) 0 var(--space-3) var(--space-6);
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.proscons-card li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
}

.proscons-card.pros li::before { background: var(--positive); }
.proscons-card.cons li::before { background: var(--negative); }

/* ===== FAQ SECTION ===== */
.fund-faq-section {
    background: var(--surface-page);
    padding: var(--space-16) var(--space-6);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-container .section-title,
.faq-container .section-subtitle {
    text-align: center;
}

.faq-container .section-title {
    margin-bottom: var(--space-2);
}

.faq-container .section-subtitle {
    margin-bottom: var(--space-10);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.faq-item {
    background: var(--surface-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: box-shadow var(--duration-normal) var(--ease-out);
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-item.open {
    box-shadow: var(--shadow-md);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-5) var(--space-6);
    background: none;
    border: none;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease-out);
}

.faq-question:hover {
    background: var(--surface-sunken);
}

.faq-chevron {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform var(--duration-normal) var(--ease-out);
}

.faq-item.open .faq-chevron {
    transform: rotate(180deg);
}

.faq-answer {
    display: none;
    padding: 0 var(--space-6) var(--space-6);
}

.faq-item.open .faq-answer {
    display: block;
}

.faq-answer p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* ===== ABOUT SECTION ===== */
.fund-about-section {
    background: var(--surface-card);
    padding: var(--space-16) var(--space-6);
}

.fund-about-section .section-title {
    max-width: 1280px;
    margin: 0 auto var(--space-8);
}

.about-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-5);
}

.about-card {
    background: var(--surface-sunken);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
}

.about-card-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 var(--space-5) 0;
}

.about-list {
    margin: 0;
}

.about-item {
    display: flex;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--border-light);
}

.about-item:last-child {
    border-bottom: none;
}

.about-item dt {
    font-size: 14px;
    color: var(--text-tertiary);
}

.about-item dd {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
    text-align: right;
}

.about-note {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-top: var(--space-5);
}

/* ===== RELATED FUNDS ===== */
.fund-related-section {
    background: var(--surface-page);
    padding: var(--space-16) var(--space-6);
}

.related-container {
    max-width: 1280px;
    margin: 0 auto;
}

.related-container .section-title,
.related-container .section-subtitle {
    text-align: center;
}

.related-container .section-title {
    margin-bottom: var(--space-2);
}

.related-container .section-subtitle {
    margin-bottom: var(--space-10);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-5);
}

.related-card {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    background: var(--surface-card);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    border: 1px solid var(--border-light);
    text-decoration: none;
    transition: all var(--duration-normal) var(--ease-out);
}

.related-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-primary);
}

.related-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--surface-sunken);
    border: 1px solid var(--border-default);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.related-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.related-icon span {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
}

.related-info {
    flex: 1;
    min-width: 0;
}

.related-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.related-meta {
    display: flex;
    gap: var(--space-4);
    font-size: 14px;
}

.related-return {
    font-weight: 600;
}

.related-return.positive { color: var(--positive); }
.related-return.negative { color: var(--negative); }

.related-cost {
    color: var(--text-muted);
}

/* ===== DISCLAIMER ===== */
.fund-disclaimer-section {
    background: var(--surface-sunken);
    padding: var(--space-10) var(--space-6);
}

.disclaimer-container {
    max-width: 960px;
    margin: 0 auto;
}

.disclaimer-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 var(--space-4) 0;
}

.disclaimer-text {
    font-size: 14px;
    color: var(--text-tertiary);
    line-height: 1.7;
    margin: 0 0 var(--space-3) 0;
}

.disclaimer-text:last-child {
    margin-bottom: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .fund-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .risk-container {
        grid-template-columns: 1fr;
    }

    .fund-risk-section::before {
        display: none;
    }

    .risk-main {
        padding-right: 0;
    }

    .calculator-container {
        grid-template-columns: 1fr;
    }

    .article-container {
        grid-template-columns: 1fr;
    }

    .holdings-grid {
        grid-template-columns: 1fr;
    }

    .about-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .performance-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --space-16: 48px;
        --space-6: 16px; /* Reduce padding on mobile */
    }

    .fund-header {
        padding: var(--space-8) var(--space-4) var(--space-10);
    }

    /* Prevent overflow on all sections */
    .section,
    .breadcrumb-section,
    .fund-summary-bar,
    .article-main {
        max-width: 100%;
        box-sizing: border-box;
    }

    .fund-header-icon {
        width: 60px;
        height: 60px;
    }

    .fund-header-name {
        font-size: 24px;
    }

    .fund-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .fund-stat-value {
        font-size: 20px;
    }

    .summary-bar-name {
        display: none;
    }

    .summary-divider {
        display: none;
    }

    .calculator-inputs {
        grid-template-columns: 1fr;
    }

    .esg-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .proscons-grid {
        grid-template-columns: 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .performance-header {
        flex-direction: column;
        gap: var(--space-5);
    }

    .chart-stats {
        width: 100%;
        justify-content: space-between;
    }

    .chart-period-selector {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tv-chart-container {
        height: 320px;
    }

    .section-title {
        font-size: 20px;
    }

    .article-main {
        padding: var(--space-6);
    }

    .risk-title {
        font-size: 24px;
    }

    .risk-level {
        height: 48px;
        font-size: 14px;
    }

    .holding-row {
        grid-template-columns: 40px 1fr 80px;
        gap: var(--space-3);
        padding: var(--space-4);
    }

    .holding-change {
        display: none;
    }
}

@media (max-width: 480px) {
    .fund-stats-grid {
        grid-template-columns: 1fr;
    }

    .chart-stats {
        flex-wrap: wrap;
        gap: var(--space-4);
    }

    .perf-stat-value {
        font-size: 22px;
    }

    .fund-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-4);
    }

    .esg-score {
        font-size: 32px;
    }

    /* Ensure touch-friendly buttons */
    .btn {
        min-height: 44px;
        padding: 12px 16px;
    }

    /* Prevent any overflow */
    .breadcrumb-section,
    .fund-header,
    .section,
    .article-main {
        padding-left: var(--space-4);
        padding-right: var(--space-4);
    }

    /* Ensure text doesn't overflow */
    .fund-header-name {
        font-size: 20px;
        word-break: break-word;
    }

    .fund-header-category {
        font-size: 13px;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: translateX(0); }
}

.holding-row {
    animation: fadeIn 0.4s var(--ease-out) backwards;
}

.holding-row:nth-child(1) { animation-delay: 0.05s; }
.holding-row:nth-child(2) { animation-delay: 0.1s; }
.holding-row:nth-child(3) { animation-delay: 0.15s; }
.holding-row:nth-child(4) { animation-delay: 0.2s; }
.holding-row:nth-child(5) { animation-delay: 0.25s; }
.holding-row:nth-child(6) { animation-delay: 0.3s; }
.holding-row:nth-child(7) { animation-delay: 0.35s; }
.holding-row:nth-child(8) { animation-delay: 0.4s; }
.holding-row:nth-child(9) { animation-delay: 0.45s; }
.holding-row:nth-child(10) { animation-delay: 0.5s; }

.sector-item {
    animation: slideIn 0.4s var(--ease-out) backwards;
}

.sector-item:nth-child(1) { animation-delay: 0.1s; }
.sector-item:nth-child(2) { animation-delay: 0.15s; }
.sector-item:nth-child(3) { animation-delay: 0.2s; }
.sector-item:nth-child(4) { animation-delay: 0.25s; }
.sector-item:nth-child(5) { animation-delay: 0.3s; }
.sector-item:nth-child(6) { animation-delay: 0.35s; }
.sector-item:nth-child(7) { animation-delay: 0.4s; }

/* Skeleton Loading States */
.skeleton {
    background: linear-gradient(90deg, var(--surface-sunken) 25%, var(--border-light) 50%, var(--surface-sunken) 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s infinite;
}

@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
