/* ============================================================
   Wilderness Health — Workforce Infographic Shortcode
   ============================================================ */

/* ── Section wrapper ───────────────────────────────────────── */
.wh-infographic {
    padding: 4rem 1rem 3rem;
    background: #fff;
    font-family: Arial, Verdana, sans-serif;
}

.wh-infographic__inner {
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
}

.wh-infographic__title {
    font-family: Arial, Verdana, sans-serif;
    font-size: clamp(1.6rem, 3.6vw, 2.6rem);
    font-weight: 700;
    color: var(--wh-green-dark);
    line-height: 1.2;
}

/* ── Stage ─────────────────────────────────────────────────── */
/*
 * Height = center triangle height.
 * SVG proportions:
 *   side   (triangle-left/right.svg): 353 × 374  → h/w ratio = 1.059
 *   center (triangle-center.svg):     380 × 483  → h/w ratio = 1.271
 *
 * At stage max-width 800px, center is 44% = 352px wide → 447px tall.
 * Side items (38% = 304px wide → 322px tall) are anchored to bottom:0
 * and sit naturally within the taller stage.
 */
.wh-infographic__stage {
    position: relative;
    width: min(800px, 96vw);
    height: clamp(280px, 55.9vw, 447px); /* 44% × 800 × 1.271 */
    margin: 0 auto;
    overflow: visible;
}

/* ── Individual items ──────────────────────────────────────── */
.wh-infographic__item {
    position: absolute;
    bottom: 0;
    cursor: pointer;
    outline: none;
    transition:
        left  0.55s cubic-bezier(0.4, 0, 0.2, 1),
        width 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.wh-infographic__item[data-pos="0"] { left: 0;   width: 38%; z-index: 1; }
.wh-infographic__item[data-pos="1"] { left: 28%; width: 44%; z-index: 2; }
.wh-infographic__item[data-pos="2"] { left: 62%; width: 38%; z-index: 1; }

/* Focus ring */
.wh-infographic__item:focus-visible .wh-infographic__tri-img {
    filter: brightness(1.12) drop-shadow(0 0 6px var(--wh-green));
}

/* Hover hint for side items */
.wh-infographic__item[data-pos="0"]:hover .wh-infographic__tri-img,
.wh-infographic__item[data-pos="2"]:hover .wh-infographic__tri-img {
    filter: brightness(1.08);
}

/* ── Triangle SVG image ────────────────────────────────────── */
.wh-infographic__tri-img {
    display: block;
    width: 100%;
    height: auto;
    transition: filter 0.25s ease;
}

/* ── Text overlay ──────────────────────────────────────────── */
/*
 * Covers the bottom 52% of the item box (triangle is widest here).
 * Content is vertically centred within that zone.
 */
.wh-infographic__tri-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 52%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 11%;
    text-align: center;
    pointer-events: none;
}

/* ── Headline ───────────────────────────────────────────────── */
.wh-infographic__headline {
    font-family: Arial, Verdana, sans-serif;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    white-space: normal;
}

.wh-infographic__item[data-pos="0"] .wh-infographic__headline,
.wh-infographic__item[data-pos="2"] .wh-infographic__headline {
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
}

.wh-infographic__item[data-pos="1"] .wh-infographic__headline {
    font-size: clamp(1.15rem, 2.4vw, 1.5rem);
}

/* ── Active-only content (GOAL + sub) ─────────────────────── */
.wh-infographic__active-content {
    display: none;
    flex-direction: column;
    align-items: center;
    margin-top: 0.3rem;
}

.wh-infographic__item[data-pos="1"] .wh-infographic__active-content {
    display: flex;
    animation: wh-ig-fadein 0.4s ease both;
}

@keyframes wh-ig-fadein {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── GOAL label ─────────────────────────────────────────────── */
.wh-infographic__label {
    font-family: Arial, Verdana, sans-serif;
    font-size: clamp(0.78rem, 1.4vw, 0.92rem);
    font-weight: 700;
    color: var(--wh-green);
    text-transform: uppercase;
}

/* ── Subheadline ────────────────────────────────────────────── */
.wh-infographic__sub {
    margin: 0.25rem 0 0;
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.75rem, 1.3vw, 0.9rem);
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    text-align: center;
}

/* ── INITIATIVES bar ────────────────────────────────────────── */
.wh-infographic__initiatives-bar {
    position: relative; /* anchor for absolute dropdown */
    margin-top: 1.8rem;
    text-align: center;
}

.wh-infographic__initiatives-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: Arial, Verdana, sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--wh-green-dark);
    text-transform: uppercase;
    padding: 0.3rem 0.5rem;
    transition: color 0.2s ease;
    position: relative;
    z-index: 2;
}

.wh-infographic__initiatives-toggle:hover {
    color: color-mix(in srgb, var(--wh-green-dark) 70%, var(--wh-green) 30%);
}

/* CSS solid right-pointing triangle arrow */
.wh-infographic__initiatives-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 8px solid var(--wh-green);
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.wh-infographic__initiatives-toggle[aria-expanded="true"] .wh-infographic__initiatives-arrow {
    transform: rotate(90deg);
}

/* Divider line — sits below button, above dropdown */
.wh-infographic__initiatives-divider {
    height: 1px;
    background: var(--wh-green);
}

/* ── INITIATIVES dropdown panel ─────────────────────────────── */
.wh-infographic__initiatives-content {
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 50%;
    transform: translateX(-50%);
    min-width: 260px;
    background: #fff;
    border: 1px solid color-mix(in srgb, var(--wh-green) 40%, #fff 60%);
    border-top: 3px solid var(--wh-green-dark);
    border-radius: 0 0 6px 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.wh-infographic__initiatives-content.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.wh-infographic__initiatives-list {
    display: block;
    list-style: disc;
    margin: 0;
    padding: 0.7rem 1.2rem 0.7rem 2rem;
    text-align: left;
}

.wh-infographic__initiatives-list li {
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    color: #2a2a2a;
    padding: 0.24rem 0;
    line-height: 1.45;
}

/* ── Reduced motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .wh-infographic__item            { transition: none !important; }
    .wh-infographic__active-content  { animation: none !important; }
    .wh-infographic__initiatives-content { transition: none !important; }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 540px) {
    .wh-infographic__initiatives-content {
        min-width: 200px;
    }
}

