/* ============================================================
   housing-market.css
   Page-specific styles for the Jacksonville Housing Market page.
   Loads alongside index.css. Contains only styles NOT already
   defined in index.css (nav, hero, footer, process-section,
   cta-section, and global resets all live in index.css).
   ============================================================ */


/* ----------------------------------------------------------
   Last Updated Banner
   ---------------------------------------------------------- */
.hm-banner {
    background: linear-gradient(135deg, #0076d2, #005a9e);
    color: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 3rem;
    text-align: center;
}

.hm-banner p {
    font-size: 1.125rem;
    margin: 0;
}


/* ----------------------------------------------------------
   Key Market Stats Grid
   ---------------------------------------------------------- */
.hm-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.hm-stat-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 0.75rem;
    text-align: center;
}

.hm-stat-card--blue   { border-left: 4px solid #0076d2; }
.hm-stat-card--green  { border-left: 4px solid #10b981; }
.hm-stat-card--yellow { border-left: 4px solid #f59e0b; }
.hm-stat-card--red    { border-left: 4px solid #ef4444; }

.hm-stat-label {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hm-stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #0076d2;
    margin-bottom: 0.25rem;
}

.hm-stat-change              { font-size: 0.875rem; }
.hm-stat-change--up          { color: #10b981; }
.hm-stat-change--down        { color: #ef4444; }
.hm-stat-change--neutral     { color: #666; }


/* ----------------------------------------------------------
   Section headings
   ---------------------------------------------------------- */
.hm-heading-xl {
    font-size: 2.25rem;
    margin-bottom: 2rem;
    text-align: center;
}

.hm-heading-lg {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #0076d2;
}

.hm-heading-lg--center {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #0076d2;
    text-align: center;
}

.hm-heading-lg--buysell {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #0076d2;
    text-align: center;
}


/* ----------------------------------------------------------
   Chart cards
   ---------------------------------------------------------- */
.hm-chart-card {
    background: white;
    padding: 2.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 3rem;
}

.hm-chart-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #0076d2;
}

/* Fix chart canvas sizing */
canvas {
    width: 100% !important;
    height: auto !important;
}

#priceChart,
#salesChart,
#neighborhoodChart { max-height: 400px; }

#daysChart,
#inventoryChart    { max-height: 300px; }


/* ----------------------------------------------------------
   Two-column chart grid (Days on Market + Inventory)
   ---------------------------------------------------------- */
.hm-chart-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}


/* ----------------------------------------------------------
   Market Analysis section
   ---------------------------------------------------------- */
.hm-analysis-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 3rem;
    border-radius: 0.75rem;
    margin-bottom: 3rem;
}

.hm-analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.hm-analysis-grid h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.hm-analysis-grid p {
    line-height: 1.8;
    color: #666;
}


/* ----------------------------------------------------------
   White card sections (Forecast, Buy/Sell)
   ---------------------------------------------------------- */
.hm-white-card {
    background: white;
    padding: 3rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 3rem;
}


/* ----------------------------------------------------------
   Forecast info boxes
   ---------------------------------------------------------- */
.hm-forecast-intro {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    padding: 2rem;
    border-radius: 0.5rem;
    border-left: 4px solid #0076d2;
    margin-bottom: 2rem;
}

.hm-forecast-intro p {
    line-height: 1.8;
    color: #1e40af;
    font-size: 1.0625rem;
    font-weight: 500;
    margin: 0;
}

.hm-forecast-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.hm-forecast-box {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 0.5rem;
}

.hm-forecast-box h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #0076d2;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hm-forecast-box h4 .hm-icon { font-size: 1.5rem; }

.hm-forecast-box p {
    line-height: 1.8;
    color: #666;
    margin-bottom: 1rem;
}

.hm-forecast-box p:last-child { margin-bottom: 0; }

/* Fed Policy box — amber */
.hm-forecast-box--amber {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-left: 4px solid #f59e0b;
    margin-bottom: 2rem;
}

.hm-forecast-box--amber h4 { color: #92400e; }
.hm-forecast-box--amber p  { color: #78350f; }

/* Key Backdrops box — sky blue */
.hm-forecast-box--sky {
    background: #e0f2fe;
    border-left: 4px solid #0369a1;
}

.hm-forecast-box--sky h4 { color: #0369a1; }
.hm-forecast-box--sky p  { color: #075985; margin: 0; }


/* ----------------------------------------------------------
   Buy / Sell section
   ---------------------------------------------------------- */
.hm-buysell-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

.hm-buysell-col-heading {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #0076d2;
    text-align: center;
    border-bottom: 3px solid #0076d2;
    padding-bottom: 0.75rem;
}

/* Decision box — shared base */
.hm-decision-box {
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.hm-decision-box:last-child { margin-bottom: 0; }

.hm-decision-box li         { margin-bottom: 0.75rem; }
.hm-decision-box li:last-child { margin-bottom: 0; }

/* Green "Buy/Sell Now" */
.hm-decision-box--green {
    background: #dcfce7;
    border-left: 4px solid #10b981;
}

.hm-decision-box--green h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: #065f46;
    font-weight: 700;
}

.hm-decision-box--green ul {
    margin: 0;
    padding-left: 1.25rem;
    color: #047857;
    line-height: 1.8;
}

/* Red "Consider Waiting" */
.hm-decision-box--red {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
}

.hm-decision-box--red h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: #991b1b;
    font-weight: 700;
}

.hm-decision-box--red ul {
    margin: 0;
    padding-left: 1.25rem;
    color: #b91c1c;
    line-height: 1.8;
}

/* Blue "Pro Tip" */
.hm-decision-box--blue {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border-left: 4px solid #2563eb;
}

.hm-decision-box--blue h4 {
    font-size: 1.0625rem;
    margin-bottom: 0.75rem;
    color: #1e40af;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hm-decision-box--blue p {
    margin: 0;
    color: #1e3a8a;
    line-height: 1.8;
    font-weight: 500;
}


/* ----------------------------------------------------------
   Footer — second .footer-grid row spacing
   index.css does not set margin-top on individual footer-grid
   rows, so this small override lives here.
   ---------------------------------------------------------- */
.hm-footer-grid-second {
    margin-top: 2rem;
}


/* ----------------------------------------------------------
   Responsive overrides
   ---------------------------------------------------------- */

/* Tablet (≤ 968px) */
@media (max-width: 968px) {
    .process-container {
        padding: 2rem 1.5rem !important;
    }

    .hm-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hm-chart-grid-2col,
    .hm-analysis-grid,
    .hm-forecast-grid,
    .hm-buysell-grid {
        grid-template-columns: 1fr;
    }
}

/* Large mobile (≤ 640px) */
@media (max-width: 640px) {
    .process-container {
        padding: 1.5rem 1rem !important;
    }

    .hm-stats-grid {
        grid-template-columns: 1fr;
    }

    .hm-stat-card {
        padding: 1.5rem;
    }

    .hm-stat-value {
        font-size: 2rem;
    }

    .hm-chart-card {
        padding: 1.25rem;
    }

    .hm-chart-card h3 {
        font-size: 1.125rem;
        margin-bottom: 1rem;
    }

    .hm-heading-xl {
        font-size: 1.75rem;
    }

    .hm-heading-lg,
    .hm-heading-lg--center,
    .hm-heading-lg--buysell {
        font-size: 1.5rem;
    }

    .hm-analysis-section {
        padding: 2rem 1.5rem;
    }

    .hm-analysis-grid h4 {
        font-size: 1.125rem;
    }

    .hm-forecast-box {
        padding: 1.5rem;
    }

    .hm-banner p {
        font-size: 1rem;
    }
}

/* Small mobile (≤ 480px) */
@media (max-width: 480px) {
    .hm-stat-value {
        font-size: 1.75rem;
    }

    .hm-chart-card {
        padding: 1rem;
    }

    .hm-chart-card h3 {
        font-size: 1rem;
    }
}
