/*
 * Mid Penn Market Pulse — Section Styles
 *
 * Paste this file into your WordPress theme's CSS or upload it alongside
 * the plugin. Works inside Avada Builder pages.
 *
 * Color variables — adjust to match your brand:
 *   --mp-primary:      your main brand color (used for headings, CTA button)
 *   --mp-accent:       a lighter tint used for stat values and borders
 *   --mp-text:         main body text color
 *   --mp-muted:        secondary text (labels, eyebrow, notes)
 *   --mp-background:   section background
 *   --mp-border:       subtle border color
 */

:root {
    --mp-primary:    #1a3d6e;   /* deep navy — update to match Mid Penn brand */
    --mp-accent:     #2a6496;   /* medium blue */
    --mp-text:       #1a1a1a;
    --mp-muted:      #5a6474;
    --mp-background: #f8f9fb;
    --mp-border:     #dde3ea;
    --mp-white:      #ffffff;
    --mp-radius:     4px;
    --mp-spacing:    1.5rem;
}

/* ---------------------------------------------------------------------------
   Wrapper
   --------------------------------------------------------------------------- */

.mp-market-pulse-wrapper {
    margin: 2rem 0;
}

/* ---------------------------------------------------------------------------
   Section container
   --------------------------------------------------------------------------- */

.mp-market-pulse {
    background: var(--mp-background);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius);
    padding: var(--mp-spacing) calc(var(--mp-spacing) * 1.5);
    font-family: inherit;
    color: var(--mp-text);
}

/* ---------------------------------------------------------------------------
   Header
   --------------------------------------------------------------------------- */

.mp-market-pulse__header {
    margin-bottom: var(--mp-spacing);
    padding-bottom: var(--mp-spacing);
    border-bottom: 2px solid var(--mp-border);
}

.mp-market-pulse__eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mp-accent);
    margin: 0 0 0.4rem;
}

.mp-market-pulse__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--mp-primary);
    margin: 0 0 0.35rem;
    line-height: 1.25;
}

.mp-market-pulse__date {
    font-size: 0.85rem;
    color: var(--mp-muted);
    margin: 0;
}

/* ---------------------------------------------------------------------------
   Stats grid
   --------------------------------------------------------------------------- */

.mp-market-pulse__stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: var(--mp-spacing);
    padding-bottom: var(--mp-spacing);
    border-bottom: 1px solid var(--mp-border);
}

.mp-stat {
    background: var(--mp-white);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius);
    padding: 1rem;
    text-align: center;
}

.mp-stat__value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--mp-primary);
    line-height: 1.1;
    margin-bottom: 0.3rem;
}

.mp-stat__label {
    display: block;
    font-size: 0.75rem;
    color: var(--mp-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ---------------------------------------------------------------------------
   Summary text
   --------------------------------------------------------------------------- */

.mp-market-pulse__summary {
    margin-bottom: var(--mp-spacing);
}

.mp-market-pulse__summary p {
    font-size: 0.97rem;
    line-height: 1.7;
    color: var(--mp-text);
    margin: 0 0 0.85rem;
}

.mp-market-pulse__summary p:last-child {
    margin-bottom: 0;
}

/* ---------------------------------------------------------------------------
   Insight section ("How This Compares to Normal")
   --------------------------------------------------------------------------- */

.mp-market-pulse__insight {
    background: var(--mp-white);
    border-left: 3px solid var(--mp-accent);
    border-radius: 0 var(--mp-radius) var(--mp-radius) 0;
    padding: 1rem var(--mp-spacing);
    margin-bottom: var(--mp-spacing);
}

.mp-market-pulse__insight h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--mp-primary);
    margin: 0 0 0.6rem;
}

.mp-market-pulse__insight p {
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--mp-text);
    margin: 0 0 0.75rem;
}

.mp-market-pulse__insight p:last-child {
    margin-bottom: 0;
}

/* ---------------------------------------------------------------------------
   Related links
   --------------------------------------------------------------------------- */

.mp-market-pulse__links {
    margin-bottom: var(--mp-spacing);
    padding-bottom: var(--mp-spacing);
    border-bottom: 1px solid var(--mp-border);
}

.mp-market-pulse__links h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--mp-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.6rem;
}

.mp-market-pulse__links ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mp-market-pulse__links li {
    margin: 0 0 0.3rem;
    padding-left: 1rem;
    position: relative;
}

.mp-market-pulse__links li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--mp-accent);
    font-size: 0.8rem;
}

.mp-market-pulse__links a {
    font-size: 0.9rem;
    color: var(--mp-accent);
    text-decoration: none;
}

.mp-market-pulse__links a:hover {
    text-decoration: underline;
    color: var(--mp-primary);
}

/* ---------------------------------------------------------------------------
   CTA
   --------------------------------------------------------------------------- */

.mp-market-pulse__cta {
    text-align: center;
    padding-top: 0.5rem;
}

.mp-btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: var(--mp-radius);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.2;
    transition: background 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
    border: none;
}

.mp-btn--primary {
    background: var(--mp-primary);
    color: var(--mp-white);
}

.mp-btn--primary:hover {
    opacity: 0.88;
    color: var(--mp-white);
    text-decoration: none;
}

.mp-market-pulse__cta-note {
    font-size: 0.8rem;
    color: var(--mp-muted);
    margin: 0.75rem 0 0;
    line-height: 1.5;
}

/* ---------------------------------------------------------------------------
   Responsive — tablet
   --------------------------------------------------------------------------- */

@media (max-width: 900px) {
    .mp-market-pulse__stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .mp-market-pulse__title {
        font-size: 1.3rem;
    }
}

/* ---------------------------------------------------------------------------
   Responsive — mobile
   --------------------------------------------------------------------------- */

@media (max-width: 540px) {
    .mp-market-pulse {
        padding: 1rem;
    }

    .mp-market-pulse__stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }

    .mp-stat__value {
        font-size: 1.2rem;
    }

    .mp-market-pulse__title {
        font-size: 1.15rem;
    }

    .mp-btn {
        width: 100%;
        text-align: center;
        padding: 0.85rem 1rem;
    }
}
