/* 11. Stats Bar (for Cards)
 --------------------------------------------------------------------------------*/

/* Outer container with the top border separator */
.stats-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  text-align: center;
  border-top: 1px solid #ddd;
  margin-top: 1rem; /* Adds a little space above the bar */
  padding-top: 1rem; /* Adds space between border and content */
}

/* Individual stat column */
.stats-bar .stat {
  flex: 1; 
  display: flex;
  flex-direction: column;
  padding: 0 10px;
}

/* Large, bold numbers */
.stats-bar .stat-value {
  font-size: 1.5rem;
  font-weight: bold;
  display: block;
  line-height: 1.2;
  color: inherit; /* Inherits white in Dark mode, or primary in light mode */
}

/* Smaller, muted labels */
.stats-bar .stat-label {
  font-size: 0.9rem;
  color: #555;
  display: block;
}

/* Ensure labels are readable in Dark/High Contrast cards */
.bg-dark .stats-bar .stat-label {
  color: #ccc;
}

/* 12. Infographic & Dashboard Components
--------------------------------------------------------------------------------*/

/* --- THE BASE CARD: Core structure for ALL cards --- */
.info-card {
    display: block !important;
    background-color: #ffffff !important;
    padding: 1.5rem !important;
    border-radius: 12px !important;
    border: none !important; 
    outline: none !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
    height: 100% !important;
    margin-bottom: 24px;
    transition: all 0.3s ease !important;
    position: relative;
    overflow: hidden;
    text-decoration: none !important;
}

/* --- MODIFIERS: Accents & Colors --- */
.info-card.accent-left { border-left: 6px solid !important; }
.info-card.accent-top  { border-top: 6px solid !important; }

.info-card.blue   { border-color: #3b82f6 !important; background-color: #eff6ff !important; }
.info-card.red    { border-color: #ef4444 !important; background-color: #fef2f2 !important; }
.info-card.green  { border-color: #10b981 !important; background-color: #ecfdf5 !important; }
.info-card.indigo { border-color: #6366f1 !important; background-color: #f5f3ff !important; }
.info-card.lime   { border-color: #8AC926 !important; background-color: #ffffff !important; }
.info-card.brand  { border-color: #7fbfaf !important; background-color: #e5f2ef !important; }

/* --- MODIFIERS: Interactions --- */
.info-card.hover-lift:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1) !important; 
}
.info-card.hover-zoom:hover { 
    transform: scale(1.05); 
    z-index: 10; 
}

/* --- INTERNAL ELEMENTS: Shared Typography --- */
.info-card .card-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: #94a3b8; margin-bottom: 0.5rem; display: block; }
.info-card .card-value { font-size: 2rem; font-weight: 900; line-height: 1.1; color: #1e293b; display: block; }
.info-card .card-value.large { font-size: 3rem; color: #1982C4; } /* Hero Style */
.info-card .card-detail { font-size: 0.875rem; color: #64748b; margin-top: 0.5rem; margin-bottom: 0; display: block; }

/* --- INTERNAL ELEMENTS: Highlight Layout Support --- */
.info-card .highlight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.info-card .icon-box {
    padding: 0.5rem !important;
    background-color: #f8fafc !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.25rem;
}

.info-card .highlight-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a202c;
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
    display: block;
}

/* Horizontal Bar Chart Container */
.bar-chart-container {
    background: #ffffff !important;
    padding: 2rem !important;
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    margin-bottom: 24px;
}

.bar-row {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1.5rem;
}

.bar-label {
    width: 160px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: #406058;
    text-align: right;
    line-height: 1.2;
    flex-shrink: 0;
}

.bar-row .progress {
    flex-grow: 1;
    margin-bottom: 0 !important;
}

.bar-value {
    width: 60px;
    font-weight: 800;
    color: #292929;
    font-size: 16px;
    flex-shrink: 0;
}

/* Responsive Bar Chart Styles */
@media (max-width: 767px) {
    .bar-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 2rem;
    }
    .bar-label {
        width: 100%;
        text-align: left;
        font-size: 12px;
    }
    .bar-row .progress {
        width: 100%;
        height: 24px;
    }
    .bar-value {
        width: 100%;
        text-align: right;
        font-size: 14px;
        margin-top: -5px;
    }
} 

/* Typography & Utility */
.text-display {
    font-weight: 900;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    font-style: italic;
}

.text-subtle {
    color: #718096;
    font-size: 0.9rem;
}

/* Icon Circles */
.icon-circle {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 1rem !important;
    flex-shrink: 0;
}
.icon-circle.blue { background-color: #dbeafe !important; color: #1e40af !important; }
.icon-circle.red { background-color: #fee2e2 !important; color: #991b1b !important; }
.icon-circle.green { background-color: #d1fae5 !important; color: #065f46 !important; }

/* Pocket Impact Container (Comparison Foundation)
 --------------------------------------------------------------------------------*/
.pocket-impact-container {
    background-color: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
    padding: 2rem !important;
    margin-bottom: 24px;
    border: 1px solid #f1f5f9 !important;
}

.impact-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.impact-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.impact-row:last-child { border-bottom: none; }

/* The 'Pocket' Highlight (Uses red/danger to show cost increase) */
.impact-row.highlight-row {
    background-color: #fef2f2 !important; /* Soft red bg */
    margin: 0 -2rem; /* Pulls background to edges of container */
    padding: 1rem 2rem;
    border-bottom: none;
}

.impact-label { 
    font-weight: 600; 
    color: #4a5568; 
    font-size: 0.95rem; 
}

.impact-value { 
    font-weight: 700; 
    color: #2d3748; 
}

.impact-value.danger { 
    color: #ef4444 !important; 
    font-size: 1.25rem; 
}

/* Mobile Adjustments for the Comparison Table */
@media (max-width: 767px) {
    .pocket-impact-container {
        padding: 1.5rem !important;
    }
    .impact-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .impact-row.highlight-row {
        margin: 0 -1.5rem; /* Matches the tighter mobile padding */
        padding: 1rem 1.5rem;
    }
    .impact-value {
        width: 100%;
        text-align: right;
    }
}

/* Step-by-Step Timeline
 --------------------------------------------------------------------------------*/
.timeline-container {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 24px;
}

/* The vertical line */
.timeline-container::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background-color: #edf2f7;
}

.timeline-step {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-step:last-child {
    margin-bottom: 0;
}

/* The indicator dot */
.timeline-dot {
    position: absolute;
    left: -2rem;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #fff;
    border: 3px solid #7fbfaf; /* Your primary brand color */
    z-index: 2;
}

.timeline-step.completed .timeline-dot {
    background-color: #7fbfaf;
}

.timeline-step.active .timeline-dot {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px #dbeafe;
}

.timeline-content {
    background: #ffffff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.timeline-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #2d3748;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.timeline-date {
    font-size: 0.75rem;
    font-weight: 600;
    color: #7fbfaf; /* Brand color */
    margin-bottom: 0.5rem;
    display: block;
}

.timeline-body {
    font-size: 0.875rem;
    color: #718096;
    line-height: 1.5;
    margin-bottom: 0;
}

/* Infographic CTA Banner
 --------------------------------------------------------------------------------*/
.report-cta-banner {
    background: linear-gradient(135deg, #406058 0%, #20302c 100%) !important;
    border-radius: 12px !important;
    padding: 3rem !important;
    color: #ffffff !important;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

/* Decorative background circle */
.report-cta-banner::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(127, 191, 175, 0.1);
    border-radius: 50%;
    z-index: 1;
}

.report-cta-banner .cta-content {
    position: relative;
    z-index: 2;
}

.report-cta-banner h3 {
    color: #ffffff !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.report-cta-banner p {
    color: #b2d9cf !important;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
}

/* Button with Flexbox centering fix */
.report-cta-banner .btn-infographic {
    background-color: #7fbfaf !important; /* Brand color */
    color: #20302c !important;
    border: none !important;
    font-weight: 700;
    min-width: 200px;
    height: 50px;
    display: inline-flex !important; /* Enables vertical alignment */
    align-items: center !important;  /* Centers text vertically */
    justify-content: center !important; /* Centers text horizontally */
    border-radius: 6px !important;
    text-transform: uppercase;
    transition: all 0.3s ease;
    margin-bottom: 0 !important;
}

.report-cta-banner .btn-infographic:hover {
    background-color: #ffffff !important;
    color: #20302c !important;
    transform: translateY(-2px);
}

/* Mobile Responsive Adjustments */
@media (max-width: 767px) {
    .report-cta-banner {
        padding: 2rem !important;
        text-align: center;
    }
    
    .report-cta-banner p {
        font-size: 1rem;
        margin-left: auto;
        margin-right: auto;
    }

    .report-cta-banner .btn-infographic {
        width: 100% !important; /* Forces full width on mobile */
        display: flex !important; /* Ensures centering still works at full width */
    }
}

/* Advanced Dashboard Utilities 
 --------------------------------------------------------------------------------*/

/* Badge Indicators for Stats and Lists */
.stat-badge {
    font-size: 0.7rem !important;
    font-weight: 800 !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 50px !important; /* Forces pill shape */
    text-transform: uppercase;
    display: inline-flex !important; /* Use flex to control internal alignment */
    align-items: center;
    justify-content: center;
    line-height: 1 !important; /* Prevents vertical stretching/bloating */
    height: 22px !important; /* Fixed height ensures circular ends */
    white-space: nowrap;
}
.stat-badge.trend-up { background-color: #ecfdf5 !important; color: #059669 !important; }
.stat-badge.type-label { background-color: #f1f5f9 !important; color: #475569 !important; }

/* Spotlight/Hero Cards (The Dark Blue/Black cards) */
.spotlight-card {
    background: #20302c !important; 
    border-radius: 16px !important;
    padding: 2.5rem !important;
    position: relative;
    overflow: hidden;
    color: #ffffff !important;
}

/* Fixed White Button for Dark Backgrounds */
.spotlight-card .btn-white {
    background-color: transparent !important;
    color: #ffffff !important;
    border: 2px solid #ffffff !important; /* Forces visibility on desktop */
    font-weight: 700;
    padding: 8px 20px !important;
    display: inline-flex !important;
    align-items: center;
    border-radius: 6px !important;
    transition: all 0.3s ease;
}
.spotlight-card .btn-white:hover {
    background-color: #ffffff !important;
    color: #20302c !important;
    transform: translateY(-2px);
}
.spotlight-card .spotlight-bg-icon {
    position: absolute;
    bottom: -20px;
    right: -20px;
    font-size: 8rem;
    opacity: 0.05;
    transform: rotate(-15deg);
}

/* Strategy/Priority Cards (Centered Content) */
.strategy-card {
    text-align: center;
    padding: 2.5rem 1.5rem !important;
}

.strategy-card .icon-pill {
    width: 64px;
    height: 64px;
    background-color: #e5f2ef;
    color: #7fbfaf;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
}

.strategy-card ul {
    text-align: left;
    margin-top: auto;
}

.strategy-card ul li {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.strategy-card ul li::before {
    content: '';
    width: 6px;
    height: 6px;
    background-color: #7fbfaf;
    border-radius: 50%;
    display: inline-block;
}

/* 2030 Vision Gradient Container */
.vision-banner {
    background: linear-gradient(135deg, #7fbfaf 0%, #406058 100%) !important;
    border-radius: 24px !important;
    padding: 2rem !important;
    color: #ffffff !important;
}
.vision-banner .stat-badge {
    align-self: center; /* Prevents flexbox stretching it to container height */
}
.vision-stat-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Compact Trend Cards (Economic Stats)
 --------------------------------------------------------------------------------*/
.trend-card {
    background-color: #ffffff !important;
    padding: 1.5rem !important;
    border-radius: 16px !important; /* Replicates rounded-2xl */
    border: 1px solid #f1f5f9 !important; /* Replicates border-slate-100 */
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
    transition: all 0.3s ease !important;
    height: 100%;
}

.trend-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1) !important;
}

/* Icon Box - Larger and more squared */
.trend-icon-box {
    padding: 12px !important;
    border-radius: 12px !important; /* Replicates rounded-xl */
    color: #ffffff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Color variations for Gem usage */
.trend-icon-box.blue { background-color: #3b82f6 !important; }
.trend-icon-box.purple { background-color: #a855f7 !important; }
.trend-icon-box.emerald { background-color: #10b981 !important; }
.trend-icon-box.amber { background-color: #f59e0b !important; }

/* The Trend Badge (Upper Right) */
.trend-badge {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    padding: 4px 8px !important;
    border-radius: 50px !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.trend-badge.positive {
    color: #059669 !important; /* Replicates text-emerald-600 */
    background-color: #ecfdf5 !important; /* Replicates bg-emerald-50 */
}

/* Text Overrides for Citydunf compatibility */
.trend-card .trend-label {
    color: #64748b !important; /* Replicates text-slate-500 */
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    margin-bottom: 4px;
}

.trend-card .trend-value {
    color: #0f172a !important; /* Replicates text-slate-900 */
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    margin-bottom: 0;
}

/* Data Distribution Grid (Dual-Gradient Heatmap)
 --------------------------------------------------------------------------------*/
.data-dist-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 15px;
    margin-bottom: 24px;
}

.dist-node {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 1.25rem !important;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 120px;
    text-align: center;
}

.dist-node .node-label { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; color: #4a5568; letter-spacing: 0.05em; margin-bottom: 8px; }
.dist-node .node-data { font-size: 1.25rem; font-weight: 800; color: #1a202c; }

/* --- THE RED GRADIENT (Concern/Alert: #d43d51) --- */
.dist-node.alert-low  { background-color: #fce8eb !important; border-color: #f9d1d7 !important; }
.dist-node.alert-med  { background-color: #f3aeb7 !important; border-color: #ed8795 !important; }
.dist-node.alert-high { background-color: #d43d51 !important; border-color: #ba2b3e !important; color: white !important; }
.dist-node.alert-high .node-label, .dist-node.alert-high .node-data { color: white !important; }

/* --- THE GREEN GRADIENT (Performance/Growth: #c4e69a) --- */
.dist-node.growth-low  { background-color: #f4faed !important; border-color: #e9f5dc !important; }
.dist-node.growth-med  { background-color: #dcedc4 !important; border-color: #cce3a8 !important; }
.dist-node.growth-high { background-color: #c4e69a !important; border-color: #accf81 !important; }

/* Responsive adjustments */
@media (max-width: 991px) { .data-dist-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .data-dist-grid { grid-template-columns: 1fr; } }

/* Ranked Metric Card (Horizontal List)
 --------------------------------------------------------------------------------*/
.metric-list-card {
    background-color: #ffffff !important;
    padding: 1rem !important;
    border-radius: 16px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 12px;
    cursor: pointer;
}

.metric-list-card:hover {
    border-color: #7fbfaf !important; /* blue-300 */
}

/* The Index/Rank Box */
.metric-list-card .rank-box {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
    color: #94a3b8;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

/* Hover effect on index box triggered by parent hover */
.metric-list-card:hover .rank-box {
    background-color: #7fbfaf !important; /* blue-600 */
    color: #ffffff !important;
}

.metric-list-card .card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0;
    line-height: 1.2;
}

.metric-list-card .card-subtitle {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 0.05em;
    margin-top: 2px;
    margin-bottom: 0;
}

.metric-list-card .card-value {
    font-size: 1.125rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1;
    margin-bottom: 2px;
}

.metric-list-card .trend-text {
    font-size: 10px;
    font-weight: 700;
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
}

.metric-list-card .chevron-icon {
    color: #cbd5e1;
    font-size: 16px;
    margin-left: 1.5rem;
}

/* Citations & Data Sources
 --------------------------------------------------------------------------------*/
.reference-block {
    background-color: #f8fafc !important; /* Subtle slate background */
    border-radius: 12px !important;
    padding: 2rem !important;
    border: 1px dashed #cbd5e1 !important; /* Dashed border indicates 'sources' */
    margin-top: 3rem;
}

.reference-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.75rem;
}

.reference-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.reference-item {
    font-size: 0.85rem;
    color: #475569;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.5;
}

.reference-item:last-child {
    margin-bottom: 0;
}

.reference-item i {
    color: #94a3b8;
    margin-top: 3px;
    font-size: 1rem;
}

.reference-item a {
    color: #3b82f6 !important;
    text-decoration: none !important;
    font-weight: 700;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.reference-item a:hover {
    border-bottom-color: #3b82f6;
}

.reference-item .cite-tag {
    font-weight: 800;
    color: #94a3b8;
    min-width: 25px;
}