/* =========================================================
   PROVIDENCE INTERACTIVE HOTSPOTS
   ========================================================= */

/* =========================================================
   ELEMENTOR WRAPPER STABILITY
   Keep the widget full-width even when the active panel has
   very short content. This prevents flex/grid intrinsic sizing
   from shrinking the whole component when switching items.
   ========================================================= */

.elementor-widget-providence-interactive-hotspots {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    align-self: stretch !important;
}

.elementor-widget-providence-interactive-hotspots > .elementor-widget-container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

.providence-hotspots-widget {
    --pih-stage-height: 620px;
    --pih-tablet-ratio: 16 / 9;
    --pih-mobile-ratio: 4 / 3;
    --pih-object-x: 50%;
    --pih-object-y: 50%;
    --pih-panel-width: 38%;
    --pih-panel-left: 58px;
    --pih-panel-bg: rgba(255, 255, 255, 0.82);
    --pih-responsive-panel-bg: rgba(255, 255, 255, 0.96);
    --pih-panel-radius: 24px;
    --pih-panel-blur: 8px;
    --pih-accent: #08727A;
    --pih-number-bg: #D99B1C;
    --pih-number-color: #fff;
    --pih-number-size: 32px;
    --pih-heading-gap: 10px;
    --pih-heading-content-gap: 16px;
    --pih-body-color: #202020;
    --pih-hotspot-size: 34px;
    --pih-hotspot-bg: #08727A;
    --pih-hotspot-color: #fff;
    --pih-hotspot-active-bg: #D99B1C;

    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* =========================================================
   IMAGE STAGE
   Hotspots are always positioned inside this element.
   ========================================================= */

.providence-hotspots-stage {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: var(--pih-stage-height);
    min-height: var(--pih-stage-height);
    overflow: hidden;
    isolation: isolate;
    box-sizing: border-box;
}

/* Elementor applies generic image rules such as height:auto.
   Keep this selector intentionally stronger so the source image
   always fills the interactive stage. */
.providence-hotspots-stage > .providence-hotspots-image {
    position: absolute !important;
    inset: 0 !important;
    z-index: 0;

    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    object-fit: cover !important;
    object-position: var(--pih-object-x) var(--pih-object-y) !important;
}

.providence-hotspots-layer {
    position: absolute;
    inset: 0;
    z-index: 4;
    overflow: hidden;
    pointer-events: none;
}

/* =========================================================
   HOTSPOTS
   44px touch target with independently controlled visible circle.
   ========================================================= */

.providence-hotspot {
    --pih-x: 50%;
    --pih-y: 50%;

    position: absolute;
    top: 0;
    left: 0;
    z-index: 5;

    display: grid;
    place-items: center;

    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;

    appearance: none;
    border: 0;
    border-radius: 999px;
    background: transparent;
    box-shadow: none;

    cursor: pointer;
    pointer-events: auto;
    transform: translate(-50%, -50%);
    transition: transform 180ms ease;
    -webkit-tap-highlight-color: transparent;
}

.providence-hotspot-visible {
    display: grid;
    place-items: center;

    width: var(--pih-hotspot-size);
    height: var(--pih-hotspot-size);

    border-radius: 999px;
    background: var(--pih-hotspot-bg);
    color: var(--pih-hotspot-color);

    font-family: Arial, sans-serif;
    font-size: calc(var(--pih-hotspot-size) * 0.68);
    font-weight: 300;
    line-height: 1;

    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    transition:
        background-color 180ms ease,
        transform 180ms ease,
        box-shadow 180ms ease;
}

.providence-hotspot:hover .providence-hotspot-visible,
.providence-hotspot:focus-visible .providence-hotspot-visible {
    transform: scale(1.08);
}

.providence-hotspot:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.providence-hotspot.is-active .providence-hotspot-visible {
    background: var(--pih-hotspot-active-bg);
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
}

/* =========================================================
   CONTENT PANEL - DESKTOP
   The panel overlays the image and the JS expands the stage if
   a long item needs more vertical room.
   ========================================================= */

.providence-hotspots-panel {
    position: absolute;
    top: 50%;
    left: var(--pih-panel-left);
    z-index: 6;

    width: var(--pih-panel-width);
    max-width: calc(100% - (var(--pih-panel-left) * 2));
    padding: 24px;

    border: 0;
    border-radius: var(--pih-panel-radius);
    background: var(--pih-panel-bg);
    color: var(--pih-body-color);

    backdrop-filter: blur(var(--pih-panel-blur));
    -webkit-backdrop-filter: blur(var(--pih-panel-blur));

    transform: translateY(-50%);
    overflow: hidden;
    box-sizing: border-box;
}

.providence-hotspots-panel-content {
    position: relative;
    width: 100%;
    transition: height 360ms cubic-bezier(.22, 1, .36, 1);
}

.providence-hotspots-panel-item {
    width: 100%;
    opacity: 0;
    transform: translateY(6px);
    transition:
        opacity 220ms ease,
        transform 280ms cubic-bezier(.22, 1, .36, 1);
}

.providence-hotspots-panel-item.is-active {
    opacity: 1;
    transform: translateY(0);
}

.providence-hotspots-panel-item[hidden] {
    display: none !important;
}

.providence-hotspots-heading-row {
    display: flex;
    align-items: center;
    gap: var(--pih-heading-gap);
    margin: 0 0 var(--pih-heading-content-gap);
}

.providence-hotspots-number {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;

    width: var(--pih-number-size);
    min-width: var(--pih-number-size);
    height: var(--pih-number-size);
    padding: 0;

    border-radius: 50%;
    background: var(--pih-number-bg);
    color: var(--pih-number-color);

    font-size: 16px;
    line-height: 1;
}

.providence-hotspots-title {
    margin: 0;
    color: var(--pih-accent);
    font-size: 17px;
    line-height: 1.25;
    text-transform: uppercase;
}

.providence-hotspots-body {
    color: var(--pih-body-color);
    font-size: 14px;
    line-height: 1.5;
}

.providence-hotspots-body > :first-child {
    margin-top: 0 !important;
    margin-block-start: 0 !important;
}

.providence-hotspots-body > :last-child {
    margin-bottom: 0 !important;
    margin-block-end: 0 !important;
}

.providence-hotspots-body ul,
.providence-hotspots-body ol {
    margin-top: 10px;
    margin-bottom: 0;
    padding-left: 1.25em;
}

/* =========================================================
   NUMBER NAVIGATION
   Hidden on desktop; visible on tablet/mobile when enabled.
   ========================================================= */

.providence-hotspots-mobile-nav {
    display: none;
}

/* =========================================================
   TABLET
   Image is its own stage. Navigation and content move below it.
   ========================================================= */

@media (max-width: 1024px) {

    .providence-hotspots-stage {
        height: auto !important;
        min-height: 0 !important;
        aspect-ratio: var(--pih-tablet-ratio);
    }

    .providence-hotspots-panel {
        position: relative;
        top: auto;
        left: auto;

        width: calc(100% - 48px);
        max-width: 760px;
        margin: 20px auto 0;

        background: var(--pih-responsive-panel-bg);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        transform: none;
    }

    .providence-hotspots-widget.has-mobile-nav .providence-hotspots-mobile-nav {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;

        width: 100%;
        margin: 0;
        padding: 20px 24px 0;
        box-sizing: border-box;
    }

    .providence-hotspots-mobile-button {
        display: grid;
        place-items: center;

        min-width: 44px;
        height: 44px;
        padding: 0 12px;
        margin: 0;

        appearance: none;
        border: 1px solid rgba(8, 114, 122, 0.25);
        border-radius: 999px;
        background: #fff;
        color: var(--pih-accent);
        box-shadow: none;

        font: inherit;
        line-height: 1;
        cursor: pointer;
        transition:
            background-color 180ms ease,
            color 180ms ease,
            border-color 180ms ease,
            transform 180ms ease;
        -webkit-tap-highlight-color: transparent;
    }

    .providence-hotspots-mobile-button:hover,
    .providence-hotspots-mobile-button:focus-visible {
        transform: translateY(-1px);
    }

    .providence-hotspots-mobile-button:focus-visible {
        outline: 2px solid var(--pih-accent);
        outline-offset: 2px;
    }

    .providence-hotspots-mobile-button.is-active {
        border-color: var(--pih-hotspot-active-bg);
        background: var(--pih-hotspot-active-bg);
        color: #fff;
    }
}

/* =========================================================
   MOBILE
   4:3 by default, compact spacing, same 44px touch targets.
   ========================================================= */

@media (max-width: 767px) {

    .providence-hotspots-widget,
    .providence-hotspots-stage,
    .providence-hotspots-mobile-nav,
    .providence-hotspots-panel {
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    .providence-hotspots-widget {
        width: 100% !important;
    }

    .providence-hotspots-stage {
        width: 100% !important;
        aspect-ratio: var(--pih-mobile-ratio);
    }

    .providence-hotspots-widget.has-mobile-nav .providence-hotspots-mobile-nav {
        gap: 8px;
        padding: 18px 16px 0;
    }

    .providence-hotspots-panel {
        width: calc(100% - 32px);
        max-width: none;
        margin-top: 18px;
        border-radius: min(var(--pih-panel-radius), 24px);
    }

    .providence-hotspots-heading-row {
        align-items: flex-start;
        margin-bottom: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .providence-hotspot,
    .providence-hotspot-visible,
    .providence-hotspots-panel-content,
    .providence-hotspots-panel-item,
    .providence-hotspots-mobile-button {
        transition: none !important;
    }
}
