/* Market Insights Page Styles */

/* Hero Section */
.insights-hero {
    background: url("../img/bg/banner-bg.webp") bottom center no-repeat;
    background-size: cover;
    margin: 110px 5% 0;
    padding: 80px 0 60px;
    position: relative;
    z-index: 1;
    border-radius: 20px;
}



.hero-header {
    text-align: center;
    margin-bottom: 50px;
}

.hero-header h1 {
    font-size: 56px;
    color: #fff;
    margin-bottom: 12px;
}

.hero-header .subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 16px;
}

.data-freshness {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.data-freshness i {
    font-size: 16px;
    color: #00b894;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.stat-card {
    background: rgba(47, 49, 66, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    gap: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon i {
    font-size: 24px;
    color: #fff;
}

.sip-card .stat-icon {
    background: linear-gradient(135deg, #FFD500 0%, #FFA500 100%);
}

.equity-card .stat-icon {
    background: linear-gradient(135deg, #9a20bc 0%, #5a136d 100%);
}

.debt-card .stat-icon {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
}

.aum-card .stat-icon {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .stat-value {
    font-size: 21px;
    font-weight: 700;
    color: #fff;
    font-family: "Poppins", sans-serif;
    white-space: nowrap;
    /* Prevent Cr wrapping */
    letter-spacing: 0;

    /* Override main.css leak */
    background: none;
    -webkit-text-fill-color: initial;
    background-clip: initial;
    -webkit-background-clip: initial;
}

.sip-card .stat-value {
    background: linear-gradient(135deg, #FFD500, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.equity-card .stat-value {
    background: linear-gradient(135deg, #e056fd, #be2edd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.debt-card .stat-value {
    background: linear-gradient(135deg, #00cec9, #55efc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.aum-card .stat-value {
    background: linear-gradient(135deg, #a29bfe, #74b9ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
}

.stat-change i {
    font-size: 14px;
}

.stat-change.positive {
    color: #00b894;
}

.stat-change.negative {
    color: #ff7675;
}

/* Charts Section */
.charts-section {
    padding: 60px 0;
}

/* Period Selector */
.period-selector {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
    justify-content: center;
}

.selector-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.period-buttons {
    display: flex;
    gap: 8px;
    background: rgba(47, 49, 66, 0.8);
    padding: 6px;
    border-radius: 12px;
}

.period-btn {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.period-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.period-btn.active {
    background: linear-gradient(135deg, #9a20bc 0%, #5a136d 100%);
    color: #fff;
}

/* Chart Cards */
.chart-card {
    background: #2F3142;
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 32px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.chart-card .triangle,
.chart-card .ractangle,
.chart-card .half-circle-right {
    position: absolute;
    z-index: -1;
    opacity: 0.3;
    /* Softer opacity for chart backgrounds */
    pointer-events: none;
}

.chart-card .triangle {
    left: -5%;
    top: -10%;
    max-width: 250px;
}

.chart-card .ractangle {
    right: -10%;
    bottom: -10%;
    max-width: 250px;
}

.chart-card .half-circle-right {
    right: -5%;
    top: 20%;
    max-width: 250px;
}

.chart-header {
    margin-bottom: 24px;
}

.chart-header h2 {
    font-size: 24px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.chart-header h2 i {
    color: #FFD500;
    font-size: 28px;
}

.chart-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

/* Chart Title Row with Period Selector */
.chart-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

.chart-title-row h2 {
    margin-bottom: 0;
}

.chart-period-selector {
    display: flex;
    gap: 4px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 8px;
}

.chart-period-selector .period-btn {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

.chart-period-selector .period-btn.active {
    background: linear-gradient(135deg, #9a20bc 0%, #5a136d 100%);
}

/* View Toggle */
.chart-view-toggle {
    display: flex;
    gap: 4px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 8px;
}

.view-btn {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.view-btn.active {
    background: linear-gradient(135deg, #FFD500 0%, #FFA500 100%);
    color: #181B2E;
}

/* Category Selector */
.category-selector {
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 12px;
}

.selector-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 12px;
    display: block;
}

.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.category-chip {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-chip:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.category-chip.active {
    background: linear-gradient(135deg, #9a20bc 0%, #5a136d 100%);
    color: #fff;
    border-color: transparent;
}

.chip-info {
    font-size: 14px;
    vertical-align: middle;
    margin-left: 2px;
    opacity: 0.7;
}

.chart-container {
    height: 350px;
    position: relative;
}

.chart-container-horizontal {
    height: 400px;
}

/* Chart Insights */
.chart-insights {
    display: flex;
    gap: 40px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.insight-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.insight-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.insight-value {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.insight-value.positive {
    color: #00b894;
}

.insight-value.negative {
    color: #ff7675;
}

/* Chart Legend */
.chart-legend-custom {
    display: flex;
    gap: 24px;
    margin-top: 20px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

/* AUM Breakdown */
.aum-breakdown {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.aum-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 16px;
    border-radius: 12px;
}

.aum-color {
    width: 8px;
    height: 40px;
    border-radius: 4px;
}

.aum-color.equity {
    background: linear-gradient(135deg, #9a20bc 0%, #5a136d 100%);
}

.aum-color.debt {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
}

.aum-color.hybrid {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
}

.aum-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    flex: 1;
}

.aum-value {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.aum-percent {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 6px;
}

/* Data Source Section */
.data-source-section {
    padding: 40px 0;
}

.source-card {
    background: rgba(47, 49, 66, 0.6);
    border-radius: 16px;
    padding: 32px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.source-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.source-icon i {
    font-size: 28px;
    color: #fff;
}

.source-content h3 {
    font-size: 20px;
    color: #fff;
    margin-bottom: 8px;
}

.source-content p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 16px;
}

.source-content a {
    color: #FFD500;
}

.source-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #FFD500 !important;
    font-weight: 600;
    transition: gap 0.2s ease;
}

.source-link:hover {
    gap: 10px;
}

.source-link i {
    font-size: 18px;
}

/* CTA Section */
.cta-section-insights {
    padding: 60px 0 80px;
}

.cta-content {
    text-align: center;
    background: linear-gradient(135deg, rgba(154, 32, 188, 0.2) 0%, rgba(90, 19, 109, 0.2) 100%);
    border: 1px solid rgba(154, 32, 188, 0.3);
    border-radius: 24px;
    padding: 60px 40px;
}

.cta-content h2 {
    font-size: 36px;
    color: #fff;
    margin-bottom: 12px;
}

.cta-content p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cta-btn i {
    font-size: 20px;
}

.cta-btn.primary {
    background: linear-gradient(135deg, #FFD500 0%, #FFA500 100%);
    color: #181B2E;
}

.cta-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 213, 0, 0.3);
}

.cta-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cta-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .insights-hero {
        margin: 100px 3% 0;
        padding: 60px 0 40px;
    }

    .hero-header h1 {
        font-size: 42px;
    }

    .aum-breakdown {
        grid-template-columns: 1fr;
    }

    .chart-container {
        height: 280px;
    }
}

@media (max-width: 768px) {
    .insights-hero {
        margin: 90px 2% 0;
        padding: 40px 0 30px;
    }

    .hero-header h1 {
        font-size: 32px;
    }

    .hero-header .subtitle {
        font-size: 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 20px;
    }

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

    .period-selector {
        flex-direction: column;
        gap: 12px;
    }

    .period-buttons {
        width: 100%;
        justify-content: center;
    }

    .chart-card {
        padding: 20px;
        margin-bottom: 20px;
    }

    .chart-header h2 {
        font-size: 20px;
    }

    .chart-insights {
        flex-direction: column;
        gap: 16px;
    }

    .source-card {
        flex-direction: column;
        text-align: center;
    }

    .cta-content {
        padding: 40px 20px;
    }

    .cta-content h2 {
        font-size: 28px;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-header h1 {
        font-size: 28px;
    }

    .stat-icon {
        width: 48px;
        height: 48px;
    }

    .stat-icon i {
        font-size: 24px;
    }

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

    .chart-container {
        height: 250px;
    }

    .chart-container-horizontal {
        height: 350px;
    }
}