/**
 * Quarter Results - Trends Page Styles
 *
 * Professional styling for earnings trends and historical analysis
 *
 * @version 1.0.0
 * @since 2025-01-01
 */

/* ==========================================
   TRENDS HERO SECTION
   ========================================== */

.trends-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    padding: 3rem 0 2rem;
}

.breadcrumb {
    margin-bottom: 1.5rem;
}

.breadcrumb ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: '›';
    margin-left: 0.5rem;
    opacity: 0.7;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: white;
}

.breadcrumb li[aria-current="page"] {
    color: white;
    font-weight: 600;
}

.trends-hero .hero-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.trends-hero .hero-subtitle {
    font-size: 1.125rem;
    opacity: 0.95;
    max-width: 700px;
}

/* ==========================================
   FILTER SECTION
   ========================================== */

.trends-filters {
    background: white;
    padding: 2rem 0;
    border-bottom: 1px solid #e1e8ed;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .filter-grid {
        grid-template-columns: 1fr;
    }
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group select {
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-group select:hover {
    border-color: #3b82f6;
}

.filter-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.metric-description {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.metric-description p {
    margin: 0;
    font-size: 1rem;
    color: #6c757d;
}

/* ==========================================
   TREND CHART SECTION
   ========================================== */

.trend-chart-section {
    padding: 3rem 0;
    background: white;
}

.trend-chart-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 2rem;
    text-align: center;
}

.chart-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    height: 400px;
    padding: 1rem 0;
}

@media (max-width: 768px) {
    .chart-bars {
        height: 300px;
        gap: 0.5rem;
        overflow-x: auto;
    }
}

.chart-bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.chart-bar {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 8px 8px 0 0;
    position: relative;
    transition: all 0.3s ease;
    min-height: 20px;
}

.chart-bar.positive {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.chart-bar.negative {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.chart-bar:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.bar-value {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.875rem;
    font-weight: 700;
    color: #2c3e50;
    white-space: nowrap;
}

.chart-label {
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #6c757d;
    text-align: center;
    white-space: nowrap;
}

.chart-insights {
    margin-top: 2rem;
}

.insight-card {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
}

.insight-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.trend-change {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.trend-change.positive {
    color: #86efac;
}

.trend-change.negative {
    color: #fca5a5;
}

/* ==========================================
   SECTOR COMPARISON SECTION
   ========================================== */

.sector-comparison-section {
    padding: 3rem 0;
    background: #f8f9fa;
}

.sector-comparison-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: #6c757d;
    margin-bottom: 2rem;
}

.comparison-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.comparison-table thead {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
}

.comparison-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comparison-table tbody tr {
    border-bottom: 1px solid #e1e8ed;
    transition: background 0.2s ease;
}

.comparison-table tbody tr:hover {
    background: #f8f9fa;
}

.comparison-table tbody tr:last-child {
    border-bottom: none;
}

.comparison-table td {
    padding: 1.25rem 1rem;
    font-size: 0.9375rem;
}

.rank-col {
    width: 60px;
    text-align: center;
    font-weight: 700;
    color: #1e3a8a;
}

.sector-col {
    min-width: 200px;
}

.sector-col a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.sector-col a:hover {
    color: #3b82f6;
}

.value-col {
    width: 150px;
    font-weight: 700;
    font-size: 1.125rem;
}

.value-col.positive {
    color: #10b981;
}

.value-col.negative {
    color: #dc3545;
}

.bar-col {
    min-width: 200px;
}

.comparison-bar-wrapper {
    width: 100%;
    height: 24px;
    background: #e1e8ed;
    border-radius: 4px;
    overflow: hidden;
}

.comparison-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    transition: width 0.5s ease;
}

.comparison-bar.positive {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.comparison-bar.negative {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

/* ==========================================
   KEY INSIGHTS SECTION
   ========================================== */

.key-insights-section {
    padding: 3rem 0;
    background: white;
}

.key-insights-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 2rem;
    text-align: center;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 992px) {
    .insights-grid {
        grid-template-columns: 1fr;
    }
}

.insight-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e2e8f0 100%);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #e1e8ed;
    transition: all 0.3s ease;
}

.insight-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.insight-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.insight-box h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 1rem;
}

.insight-highlight {
    font-size: 2rem;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.insight-detail {
    font-size: 0.9375rem;
    color: #6c757d;
    margin: 0;
}

/* ==========================================
   RELATED LINKS SECTION
   ========================================== */

.related-links {
    padding: 3rem 0;
    background: #f8f9fa;
}

.related-links h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 2rem;
    text-align: center;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 768px) {
    .links-grid {
        grid-template-columns: 1fr;
    }
}

.related-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e1e8ed;
    transition: all 0.3s ease;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.related-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 0.75rem;
}

.related-card p {
    font-size: 0.9375rem;
    color: #6c757d;
    line-height: 1.5;
    margin: 0;
}

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */

@media (max-width: 768px) {
    .trends-hero .hero-content h1 {
        font-size: 1.75rem;
    }

    .trend-chart-section h2,
    .sector-comparison-section h2,
    .key-insights-section h2,
    .related-links h2 {
        font-size: 1.5rem;
    }

    .chart-label {
        font-size: 0.75rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
}
