/*
 * Mid Penn Community Happenings — Section Styles
 *
 * Sibling to market-pulse.css; mirrors the same design tokens and BEM conventions.
 * Paste into your WordPress theme's CSS or upload alongside the plugin.
 * Works inside Avada Builder pages.
 *
 * Color variables — kept identical to the Market Pulse system for a consistent look:
 *   --mph-primary:    Mid Penn dark teal (headings, day labels, CTA)
 *   --mph-accent:     Mid Penn gold (eyebrow, links, highlights)
 *   --mph-background: warm off-white cream (section background)
 *   --mph-border:     muted sage border
 */

:root {
    --mph-primary:    #153E44;   /* Mid Penn dark teal */
    --mph-accent:     #9B7E2C;   /* Mid Penn gold */
    --mph-text:       #1a1a1a;
    --mph-muted:      #6b7a6e;
    --mph-background: #F5F3EF;   /* warm off-white, close to brand cream */
    --mph-border:     #C5CEC9;   /* muted sage-based border */
    --mph-white:      #ffffff;
    --mph-radius:     4px;
    --mph-spacing:    1.5rem;
    --mph-free:       #2a7a2a;   /* green used for FREE tags */
}

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

.mph-happenings-wrapper {
    margin: 2rem 0;
}

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

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

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

.mph-happenings__header {
    margin-bottom: var(--mph-spacing);
    padding-bottom: var(--mph-spacing);
    border-bottom: 2px solid var(--mph-border);
}

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

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

.mph-happenings__dates {
    font-size: 0.85rem;
    color: var(--mph-muted);
    margin: 0;
}

/* --------------------------------------------------------------------------
   Intro
   -------------------------------------------------------------------------- */

.mph-happenings__intro {
    margin-bottom: var(--mph-spacing);
}

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

.mph-happenings__intro p:last-child {
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   "Don't Miss This Week" — top picks (3 highlighted cards)
   -------------------------------------------------------------------------- */

.mph-happenings__picks-heading {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--mph-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 1rem;
}

.mph-picks {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: var(--mph-spacing);
    padding-bottom: var(--mph-spacing);
    border-bottom: 1px solid var(--mph-border);
}

.mph-pick {
    background: var(--mph-white);
    border: 1px solid var(--mph-border);
    border-top: 3px solid var(--mph-accent);
    border-radius: var(--mph-radius);
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.mph-pick__day {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--mph-accent);
    margin: 0 0 0.35rem;
}

.mph-pick__name {
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 0.45rem;
}

.mph-pick__name a {
    color: var(--mph-primary);
    text-decoration: none;
}

.mph-pick__name a:hover {
    text-decoration: underline;
    color: var(--mph-accent);
}

.mph-pick__why {
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--mph-muted);
    margin: 0 0 0.75rem;
    flex: 1;
}

.mph-pick__meta {
    font-size: 0.78rem;
    color: var(--mph-muted);
    margin: 0;
}

/* --------------------------------------------------------------------------
   Full calendar — grouped by day
   -------------------------------------------------------------------------- */

.mph-happenings__calendar {
    margin-bottom: var(--mph-spacing);
}

.mph-day {
    margin-bottom: 1.1rem;
}

.mph-day:last-child {
    margin-bottom: 0;
}

.mph-day__heading {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--mph-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.55rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--mph-border);
}

.mph-event {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--mph-border);
}

.mph-event:last-child {
    border-bottom: none;
}

.mph-event__name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--mph-primary);
    text-decoration: none;
}

.mph-event__name:hover {
    text-decoration: underline;
    color: var(--mph-accent);
}

.mph-event__meta {
    font-size: 0.82rem;
    color: var(--mph-muted);
    margin: 0.15rem 0 0;
    line-height: 1.5;
}

.mph-event__cost {
    font-weight: 600;
    color: var(--mph-text);
}

.mph-tag-free {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: #e8f5e8;
    color: var(--mph-free);
    padding: 0.1rem 0.45rem;
    border-radius: 3px;
    margin-left: 0.35rem;
    vertical-align: middle;
}

/* --------------------------------------------------------------------------
   "Also Nearby" — county spillover (mirrors Market Pulse insight block)
   -------------------------------------------------------------------------- */

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

.mph-nearby__heading {
    font-size: 1rem;
    font-weight: 700;
    color: var(--mph-primary);
    margin: 0 0 0.6rem;
}

.mph-nearby ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mph-nearby li {
    margin: 0 0 0.4rem;
    padding-left: 1rem;
    position: relative;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--mph-text);
}

.mph-nearby li:last-child {
    margin-bottom: 0;
}

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

.mph-nearby a {
    color: var(--mph-primary);
    text-decoration: none;
    font-weight: 600;
}

.mph-nearby a:hover {
    text-decoration: underline;
    color: var(--mph-accent);
}

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

.mph-happenings__cta {
    text-align: center;
    padding-top: 0.5rem;
}

.mph-btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: var(--mph-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;
}

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

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

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

/* --------------------------------------------------------------------------
   Lead capture form (GHL) — appended to each section by the push script
   -------------------------------------------------------------------------- */

.mph-lead {
    background: var(--mph-background);
    border: 1px solid var(--mph-border);
    border-top: 3px solid var(--mph-accent);
    border-radius: var(--mph-radius);
    padding: var(--mph-spacing) calc(var(--mph-spacing) * 1.5);
    margin: 2rem 0 0;
}

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

.mph-lead__title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--mph-primary);
    margin: 0 0 0.35rem;
    line-height: 1.25;
}

.mph-lead__sub {
    font-size: 0.9rem;
    color: var(--mph-muted);
    margin: 0 0 1.1rem;
    line-height: 1.5;
}

.mph-lead__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.mph-lead__field {
    display: flex;
    flex-direction: column;
}

.mph-lead__full {
    margin-bottom: 0.75rem;
}

.mph-lead label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--mph-primary);
    margin: 0 0 0.3rem;
}

.mph-lead input {
    font: inherit;
    font-size: 0.95rem;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--mph-border);
    border-radius: var(--mph-radius);
    background: var(--mph-white);
    color: var(--mph-text);
}

.mph-lead input:focus {
    outline: none;
    border-color: var(--mph-accent);
    box-shadow: 0 0 0 2px rgba(155, 126, 44, 0.18);
}

.mph-lead__btn {
    display: inline-block;
    width: 100%;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: var(--mph-radius);
    background: var(--mph-primary);
    color: var(--mph-white);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.mph-lead__btn:hover {
    opacity: 0.88;
}

.mph-lead__btn:disabled {
    opacity: 0.55;
    cursor: default;
}

.mph-lead__fine {
    font-size: 0.72rem;
    color: var(--mph-muted);
    margin: 0.7rem 0 0;
    line-height: 1.5;
}

.mph-lead__msg {
    display: none;
    margin-top: 0.9rem;
    padding: 0.7rem 0.8rem;
    border-radius: var(--mph-radius);
    font-size: 0.9rem;
    line-height: 1.5;
}

.mph-lead__msg--ok {
    background: #e8f5e8;
    color: var(--mph-free);
    border-left: 3px solid var(--mph-free);
}

.mph-lead__msg--err {
    background: #fbeaea;
    color: #9a2b2b;
    border-left: 3px solid #9a2b2b;
}

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

@media (max-width: 900px) {
    .mph-picks {
        grid-template-columns: 1fr;
    }

    .mph-happenings__title {
        font-size: 1.3rem;
    }
}

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

@media (max-width: 540px) {
    .mph-happenings {
        padding: 1rem;
    }

    .mph-happenings__title {
        font-size: 1.15rem;
    }

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

    .mph-lead {
        padding: 1rem;
    }

    .mph-lead__row {
        grid-template-columns: 1fr;
    }
}
