/**
 * FIFE Core — Content Hub widget styles.
 *
 * Scoped under .fifecore-content-hub* — literal color values only (no
 * var(--...) tokens): this plugin is designed to keep working even if the
 * FIFE theme is ever replaced/deactivated, so it cannot depend on the
 * theme's style.css custom properties. Editor-facing colors/spacing are
 * exposed as CSS custom properties on the root (--fifecore-hub-*), set via
 * this widget's own Elementor Style controls (class-widget-content-hub.php).
 *
 * Native `[hidden]` (set by fifecore-content-hub.js on inactive panels) is
 * never overridden here, so hidden panels default to `display: none` and
 * contribute no layout height — no extra CSS needed for "no excess
 * whitespace".
 */

.fifecore-content-hub {
    /* Values below default-match page-our-impact.php's .impact-tab-btn/
       .impact-tab-icon exactly (icon-tile design, active ring-shadow),
       still overridable via this widget's own Elementor Style controls. */
    --fifecore-hub-active-bg: hsl(310, 58%, 35%);
    --fifecore-hub-inactive-bg: rgba(255, 255, 255, 0.8);
    --fifecore-hub-active-text: #ffffff;
    --fifecore-hub-inactive-text: hsl(0, 0%, 32%);
    --fifecore-hub-radius: 0.75rem;
    --fifecore-hub-gap: 1.5rem;
    --fifecore-hub-section-bg: hsl(0, 0%, 83%);
}

.fifecore-content-hub--section-bg {
    background-color: var(--fifecore-hub-section-bg);
    padding: 4rem 0;
}

.fifecore-content-hub__heading {
    margin: 0 0 24px;
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    line-height: 1.2;
    color: #1a1a2e;
}

.fifecore-content-hub__tablist {
    display: flex;
    justify-content: center;
    gap: var(--fifecore-hub-gap);
}

.fifecore-content-hub__tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.fifecore-content-hub__tab:hover,
.fifecore-content-hub__tab[aria-selected="true"] {
    transform: scale(1.05);
}

.fifecore-content-hub__tab:focus-visible {
    outline: 2px solid var(--fifecore-hub-active-bg);
    outline-offset: 4px;
    border-radius: var(--fifecore-hub-radius);
}

.fifecore-content-hub__tab-icon {
    width: 5rem;
    height: 5rem;
    border-radius: var(--fifecore-hub-radius);
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--fifecore-hub-inactive-bg);
    opacity: 0.8;
    transition: all 0.3s ease;
}

@media (min-width: 768px) {
    .fifecore-content-hub__tab-icon {
        width: 6rem;
        height: 6rem;
    }
}

.fifecore-content-hub__tab[aria-selected="true"] .fifecore-content-hub__tab-icon {
    opacity: 1;
    background: var(--fifecore-hub-active-bg);
    box-shadow: 0 0 0 4px var(--fifecore-hub-active-bg), 0 0 0 6px white;
}

.fifecore-content-hub__tab-icon svg {
    width: 2.5rem;
    height: 2.5rem;
    color: var(--fifecore-hub-active-bg);
    fill: none;
    stroke: currentColor;
}

@media (min-width: 768px) {
    .fifecore-content-hub__tab-icon svg {
        width: 3rem;
        height: 3rem;
    }
}

.fifecore-content-hub__tab[aria-selected="true"] .fifecore-content-hub__tab-icon svg {
    color: var(--fifecore-hub-active-text);
}

.fifecore-content-hub__tab-label {
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    color: var(--fifecore-hub-inactive-text);
    transition: color 0.3s ease;
    /* Legacy markup hardcodes the literal text as uppercase ("PROJECTS",
       etc.) rather than transforming it in CSS — reproduced here as a
       transform instead so editor-typed labels (title case in the repeater
       UI) still render correctly without requiring all-caps input. */
    text-transform: uppercase;
}

@media (min-width: 768px) {
    .fifecore-content-hub__tab-label {
        font-size: 1rem;
    }
}

.fifecore-content-hub__tab[aria-selected="true"] .fifecore-content-hub__tab-label {
    color: var(--fifecore-hub-active-bg);
}

.fifecore-content-hub__panels {
    margin-top: 24px;
}

.fifecore-content-hub--section-bg .fifecore-content-hub__panels {
    background: white;
    padding: 3rem 0;
    margin-top: 1rem;
}

.fifecore-content-hub__panel {
    /* Matches page-our-impact.php's .impact-tab-content: max-width:72rem,
       centered, independent of whatever width the surrounding Elementor
       section happens to be set to — confirmed against the reference
       screenshot (search bar edges measure ~1150px wide, not full-bleed). */
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
    overflow-x: hidden;
}

.fifecore-content-hub__notice {
    padding: 1.5rem;
    background-color: #fff8e6;
    color: #7a5c00;
    border: 1px solid #f0d98c;
    border-radius: 0.5rem;
    font-size: 0.9rem;
}

/* No further breakpoint-driven shrinking below — page-our-impact.php's
   .impact-tabs-nav only changes at the 768px breakpoint already applied
   above (gap, icon size, svg size, label size). Matched exactly, not
   "improved", per the 1:1 migration requirement. */

@media (prefers-reduced-motion: reduce) {
    .fifecore-content-hub__tab {
        transition-duration: 0.01ms !important;
    }

    .fifecore-content-hub__tab:hover {
        transform: none;
    }
}
