/* --- CORE FONTS (Self-Hosted) --- */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/inter-400.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/inter-500.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/inter-600.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/inter-700.woff2') format('woff2');
}

/* --- SHARED COMPONENT STYLES --- */
.page-section-wrapper {
    padding: 64px 24px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-section-wrapper:first-child {
    padding-top: 32px;
}

.page-section-wrapper:last-child {
    padding-bottom: 32px;
}

.highlight-text {
    font-weight: 600;
    color: var(--accent-color);
}

.component-header {
    text-align: center;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto 48px auto;
}

/* --- INTERNAL CARD HEADERS --- */
.card-header {
    text-align: center;
    margin-bottom: 32px;
}

.card-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--heading-color);
    margin: 0 0 8px 0;
}

.card-header .subtitle {
    font-size: 15px;
    color: var(--text-muted);
    margin: 0;
}

.component-header h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 16px;
}

.component-header .subtitle {
    font-size: 16px;
    color: var(--text-color);
    margin-top: -8px;
    margin-bottom: 16px;
}

/* --- CARD STYLES --- */
.cards-container-solid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .cards-container-solid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
        align-items: stretch;
    }
}

.solid-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    flex: 1;
    min-width: 280px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.solid-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.info-card {
    margin-top: 24px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-color);
    border-radius: 8px;
    padding: 32px;
}

.info-card h4 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 18px;
    color: var(--heading-color);
    font-weight: 600;
}

.info-card p {
    margin-bottom: 0;
    line-height: 1.7;
    color: #CBD5E0;
    font-size: 16px;
}

/* --- DISCLAIMER TOGGLE --- */
.disclaimer-container {
    width: 100%;
}

.disclaimer-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.disclaimer-summary-text {
    font-size: 14px;
    color: var(--text-color);
    max-width: 800px;
    line-height: 1.6;
}

.disclaimer-toggle-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--accent-color);
    font-weight: 600;
    padding: 8px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.disclaimer-toggle-btn:hover {
    background: rgba(16, 185, 129, 0.05);
    border-color: var(--accent-color);
}

.disclaimer-full-content {
    display: none;
    margin-top: 32px;
    animation: fadeIn 0.4s ease-out;
}

.disclaimer-full-content.is-visible {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- BUTTONS --- */
.contact-button {
    display: inline-block;
    text-decoration: none;
    background-color: #FFFFFF;
    color: #111827;
    padding: 16px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    margin-top: 24px;
    transition: transform 0.2s ease;
}

.contact-button:hover {
    transform: scale(1.05);
}

.whatsapp-button {
    background-color: #25D366;
    color: #FFFFFF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

/* --- UI ENHANCEMENTS --- */
#back-to-top-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: var(--accent-color);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1000;
}

#back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
}

#back-to-top-btn:hover {
    background-color: #059669;
}

.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-on-scroll.is-visible {
    opacity: 1;
    transform: none; /* 'none' is crucial to prevent creating a containing block that traps 'position: fixed' elements */
}

/* --- MOBILE RESPONSIVE BASICS --- */
@media (max-width: 768px) {
    .page-section-wrapper {
        padding: 48px 16px;
    }

    .component-header h3 {
        font-size: 24px;
    }

    .solid-card,
    .info-card {
        padding: 24px;
        max-width: 95vw;
    }
}

/* --- GLASSMOPHISM & CONTAINERS --- */
.dark-glass-container,
.glass-container {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 32px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.solid-container {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- CHART CONTAINERS --- */
.desktop-chart-container,
.fees-chart-container,
.chart-container-responsive {
    position: relative;
    height: 400px;
    width: 100%;
    margin-bottom: 24px;
}

.mobile-chart-container {
    display: none;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

/* Visibility Toggles */
.desktop-chart-view { display: block; }
.mobile-chart-view { display: none; }

@media (max-width: 768px) {
    .desktop-chart-container,
    .desktop-chart-view {
        display: none !important;
    }

    .mobile-chart-container,
    .mobile-chart-view {
        display: flex !important;
    }

    .chart-container-responsive {
        height: 300px;
    }

    .dark-glass-container,
    .glass-container,
    .solid-container {
        padding: 24px 16px;
    }
}

/* --- HOME PAGE MOBILE CHART STYLES --- */
.mobile-bar-item {
    margin-bottom: 16px;
}

.mobile-bar-header {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 6px;
}

.mobile-bar-label { color: var(--heading-color); font-weight: 600; }
.mobile-bar-percentage { color: var(--accent-color); font-weight: 700; }

.mobile-bar-wrapper {
    display: flex;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.mobile-bar-invested { background-color: #4A5568; }
.mobile-bar-growth { background-color: var(--accent-color); }

.chart-disclaimer {
    margin-top: 24px;
    font-size: 12px;
    color: var(--text-color);
    opacity: 0.8;
    line-height: 1.6;
    text-align: center;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    padding-top: 16px;
}

/* --- RISKOMETER STYLES --- */
.riskometer-legend {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.riskometer-items,
.riskometer-items-small {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 12px;
}

.riskometer-items { font-size: 14px; }
.riskometer-items-small { font-size: 12px; }

.riskometer-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
}

.riskometer-dot,
.riskometer-dot-small {
    display: inline-block;
    border-radius: 50%;
    flex-shrink: 0;
}

.riskometer-dot { width: 12px; height: 12px; }
.riskometer-dot-small { width: 10px; height: 10px; }

.dot-vhigh { background-color: #EF4444; }
.dot-high { background-color: #F97316; }
.dot-mod { background-color: #F59E0B; }
.dot-low { background-color: #10B981; }

.color-vhigh { color: #EF4444; font-weight: 700; }

/* --- UTILITIES --- */
.text-center { text-align: center; }
.full-width { width: 100%; }


/* --- COMPLIANCE TOOLTIP --- */
.compliance-info-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    vertical-align: middle;
}

.compliance-info-icon {
    width: 22px;
    height: 22px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--accent-color);
    border-radius: 50%;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-family: serif; /* Classic 'i' look */
    font-weight: 700;
    font-style: italic;
    cursor: help;
    transition: all 0.2s ease;
    position: relative; /* For pseudo-element */
}

.compliance-info-icon:hover {
    background: var(--accent-color);
    color: white;
}

/* Larger touch target for mobile */
@media (max-width: 768px) {
    .compliance-info-icon::after {
        content: '';
        position: absolute;
        top: -11px;
        left: -11px;
        right: -11px;
        bottom: -11px;
        /* Increases 22px icon to ~44px touch area */
    }
}

.compliance-tooltip {
    position: absolute;
    top: 15px;
    left: 24px;
    transform: translateY(10px);
    width: 320px;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #E2E8F0;
    padding: 16px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.6;
    text-align: left;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1100;
}

.compliance-info-wrapper:hover .compliance-tooltip,
.compliance-tooltip.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto; /* Allow clicking links inside tooltip when active */
}

/* Tooltip arrow pointing to top-left towards icon */
.compliance-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 10px;
    border-width: 8px;
    border-style: solid;
    border-color: transparent transparent rgba(15, 23, 42, 0.98) transparent;
    margin-bottom: -1px; /* Subtle overlap */
}

@media (max-width: 1024px) {
    .compliance-tooltip {
        left: auto;
        right: 0;
        top: 30px;
    }
    .compliance-tooltip::after {
        left: auto;
        right: 10px;
    }
}

@media (max-width: 768px) {
    .compliance-tooltip {
        position: fixed;
        top: auto;
        bottom: 20px;
        left: 20px;
        right: 20px;
        width: auto;
        transform: translateY(20px);
        margin: 0;
    }
    .compliance-info-wrapper:hover .compliance-tooltip,
    .compliance-tooltip.is-active {
        transform: translateY(0);
    }
    .compliance-tooltip::after {
        display: none;
    }
}



