/* Market Insights Specific Styles */

/* Insights Hero */
.insights-hero {
    padding: 6rem 0 3rem;
    background: var(--gradient-hero);
    color: var(--white);
    text-align: center;
}

.insights-hero-content .section-title {
    color: var(--white);
    background: none;
    -webkit-text-fill-color: var(--white);
}

.insights-hero-content .section-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.last-update {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Market Overview */
.market-overview {
    padding: 3rem 0;
    background: var(--white);
}

.section-subtitle {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 2rem;
}

.market-status-value {
    font-weight: 700;
    text-transform: uppercase;
}

.market-status-value[data-status="bullish"] {
    color: #10B981;
}

.market-status-value[data-status="bearish"] {
    color: var(--accent-coral);
}

.market-status-value[data-status="neutral"] {
    color: var(--medium-gray);
}

.kpi-change {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
}

.kpi-change.positive {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.kpi-change.negative {
    background: rgba(244, 63, 94, 0.1);
    color: var(--accent-coral);
}

.kpi-change.neutral {
    background: rgba(100, 116, 139, 0.1);
    color: var(--medium-gray);
}

/* Risk & Sentiment */
.risk-sentiment {
    padding: 3rem 0;
    background: var(--light-gray);
}

.risk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.risk-card {
    padding: 2rem;
}

.risk-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.risk-header h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
}

.risk-badge {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.risk-badge.extreme-fear {
    background: #DC2626;
    color: var(--white);
}

.risk-badge.fear {
    background: #F59E0B;
    color: var(--white);
}

.risk-badge.neutral {
    background: var(--medium-gray);
    color: var(--white);
}

.risk-badge.greed {
    background: #10B981;
    color: var(--white);
}

.risk-badge.extreme-greed {
    background: #059669;
    color: var(--white);
}

/* Simple Fear & Greed Gauge */
.simple-gauge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
}

.gauge-circle {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        #dc2626 0%,
        #f59e0b 25%,
        #fbbf24 35%,
        #84cc16 65%,
        #10b981 85%,
        #059669 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.gauge-circle::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    background: white;
    border-radius: 50%;
    z-index: 1;
}

.gauge-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.gauge-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-gray);
    line-height: 1;
}

.gauge-label {
    display: block;
    font-size: 0.875rem;
    color: var(--medium-gray);
    font-weight: 500;
    margin-top: 0.5rem;
}

.gauge-scale {
    display: flex;
    justify-content: space-between;
    width: 150px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Risk Indicators */

.risk-indicator {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.indicator-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
    font-size: 0.875rem;
    font-weight: 500;
}

.indicator-bar {
    flex: 1;
    height: 8px;
    background: rgba(100, 116, 139, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.indicator-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.indicator-fill.low {
    background: #10B981;
}

.indicator-fill.medium {
    background: #F59E0B;
}

.indicator-fill.high {
    background: #DC2626;
}

.indicator-value {
    min-width: 40px;
    text-align: right;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Market Sentiment */
.sentiment-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.sentiment-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
}

.sentiment-icon {
    width: 32px;
    height: 32px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
}

.sentiment-text h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.sentiment-value {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
}

.sentiment-value.bullish {
    background: rgba(16, 185, 129, 0.2);
    color: #10B981;
}

.sentiment-value.bearish {
    background: rgba(244, 63, 94, 0.2);
    color: var(--accent-coral);
}

.sentiment-value.neutral {
    background: rgba(100, 116, 139, 0.2);
    color: var(--medium-gray);
}

/* Sectoral Analysis */
.sectoral-analysis {
    padding: 3rem 0;
    background: var(--white);
}

.sectors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.sector-card {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.sector-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.sector-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.sector-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
}

.sector-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.sector-performance {
    font-size: 0.875rem;
    font-weight: 600;
}

.sector-metrics {
    display: flex;
    justify-content: space-between;
}

.metric {
    text-align: center;
}

.metric-label {
    display: block;
    font-size: 0.75rem;
    color: var(--medium-gray);
    margin-bottom: 0.25rem;
}

.metric-value {
    font-weight: 600;
    font-size: 0.875rem;
}

/* News & Analysis */
.market-news {
    padding: 3rem 0;
    background: var(--light-gray);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 2rem;
}

@media (max-width: 1200px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, auto);
    }
}

@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(6, auto);
    }
}

.news-column {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: fit-content;
    max-height: 800px;
    overflow-y: auto;
}

.news-category-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-blue);
}



.news-item {
    padding: 1.5rem;
    background: rgba(243, 244, 246, 0.5);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-blue);
    margin-bottom: 1.5rem;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.news-source {
    font-size: 0.75rem;
    color: var(--medium-gray);
    font-weight: 500;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-time {
    font-size: 0.75rem;
    color: var(--medium-gray);
}

.news-impact {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    text-transform: uppercase;
}

.news-impact.high {
    background: rgba(244, 63, 94, 0.2);
    color: var(--accent-coral);
}

.news-impact.medium {
    background: rgba(245, 158, 11, 0.2);
    color: #F59E0B;
}

.news-impact.low {
    background: rgba(100, 116, 139, 0.2);
    color: var(--medium-gray);
}

.news-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.news-summary {
    font-size: 0.875rem;
    color: var(--medium-gray);
    line-height: 1.5;
    margin-bottom: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.news-tags .chip {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-blue);
}

/* Economic Indicators */
.economic-indicators {
    padding: 3rem 0;
    background: var(--white);
}

.indicators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.indicator-card {
    padding: 2rem;
}

.indicator-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.indicator-header h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
}



.indicator-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.indicator-name {
    font-weight: 500;
    color: var(--dark-gray);
}

.indicator-value {
    font-weight: 600;
    color: var(--dark-gray);
}

.indicator-trend {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    margin-left: 0.5rem;
}

.indicator-trend.up {
    background: rgba(16, 185, 129, 0.2);
    color: #10B981;
}

.indicator-trend.down {
    background: rgba(244, 63, 94, 0.2);
    color: var(--accent-coral);
}

.indicator-trend.stable {
    background: rgba(100, 116, 139, 0.2);
    color: var(--medium-gray);
}

/* News Modal Styles */
.news-modal-box {
    width: 95vw;
    max-width: 1400px;
    max-height: 95vh;
    overflow: hidden;
    padding: 1.5rem;
}

.news-modal-iframe-container {
    width: 100%;
    height: 70vh;
    margin: 1rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    background: var(--light-gray);
}

.news-modal-iframe-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid var(--light-gray);
    border-top: 3px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}

.news-modal-iframe-container.loaded::before {
    display: none;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

#news-modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

.news-modal-fallback {
    padding: 2rem;
    text-align: center;
    background: var(--light-gray);
    border-radius: 8px;
    margin: 1rem 0;
}

.news-modal-fallback h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 1rem;
}

.news-modal-fallback p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--medium-gray);
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .news-modal-box {
        width: 98vw;
        max-height: 98vh;
        padding: 1rem;
    }
    
    .news-modal-iframe-container {
        height: 65vh;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-header h3 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--dark-gray);
    flex: 1;
    margin-right: 1rem;
}

.news-modal-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.news-modal-content {
    margin-bottom: 2rem;
}

.news-modal-text {
    margin-bottom: 1.5rem;
}

.news-modal-content p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--medium-gray);
    margin-bottom: 1rem;
    white-space: pre-line;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.news-modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.news-modal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
}

#news-modal-read-more {
    background: var(--primary-blue);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

#news-modal-read-more:hover {
    background: var(--dark-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

#news-modal-read-more:active {
    transform: translateY(0);
}

#news-modal-close-btn {
    background: transparent;
    color: var(--medium-gray);
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

#news-modal-close-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--dark-gray);
}

@media (max-width: 480px) {
    .news-modal-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    #news-modal-read-more,
    #news-modal-close-btn {
        width: 100%;
        justify-content: center;
    }
}

.news-item {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.news-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.news-item::after {
    content: '';
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 20px;
    height: 20px;
    background: var(--primary-blue);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-item:hover::after {
    opacity: 1;
}

.news-item::before {
    content: '👁';
    position: absolute;
    top: 1.2rem;
    right: 1.4rem;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.news-item:hover::before {
    opacity: 1;
}
@media (max-width: 768px) {
    .insights-hero {
        padding: 4rem 0 2rem;
    }
    
    .risk-grid {
        grid-template-columns: 1fr;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .indicators-grid {
        grid-template-columns: 1fr;
    }
    
    .sectors-grid {
        grid-template-columns: 1fr;
    }
    
    .sentiment-grid {
        grid-template-columns: 1fr;
    }
    
    .gauge-circle {
        width: 120px;
        height: 120px;
    }
    
    .gauge-circle::before {
        width: 95px;
        height: 95px;
    }
    
    .gauge-number {
        font-size: 2rem;
    }
    
    .gauge-scale {
        width: 120px;
    }
}