/* â”€â”€ Outer layout â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.hover-tabs-ci {
    display: grid;
    grid-template-columns: 30% 1fr;
    column-gap: 1.5rem;
    align-items: stretch;
}

.hover-tabs-ci__panels {
    min-width: 0;
}

/* â”€â”€ Nav â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.hover-tabs-ci__nav {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    height: 100%;
}

.hover-tabs-ci__nav-item {
    position: relative;
    cursor: pointer;
    border: 1px solid #eaeaea;
    padding: 10px 24px 10px 16px;
    background: #fff;
    transition: opacity 300ms ease, box-shadow 300ms ease;
    opacity: 0.65;
    flex: 1;
    display: flex;
    align-items: center;
}

.hover-tabs-ci__nav-item.active {
    box-shadow: 0px 0px 16px rgba(0, 0, 0, 0.125);
    opacity: 1;
}

/* Yellow indicator â€” grows from vertical center outward on active */
.hover-tabs-ci__nav-item::after {
    content: '';
    position: absolute;
    right: -1px;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--hover-tabs-indicator-color, var(--wp--color--accent, #F4AF00));
    transform: scaleY(0);
    transform-origin: center;
    transition: transform 400ms ease;
    z-index: 1;
}

.hover-tabs-ci__nav-item.active::after {
    transform: scaleY(1);
}

/* Content nudge on active */
.hover-tabs-ci__nav-content {
    transition: transform 300ms ease;
}

.hover-tabs-ci__nav-item .hover-tabs-ci__nav-content {
    transform: translateX(0);
}

.hover-tabs-ci__nav-item.active .hover-tabs-ci__nav-content {
    transform: translateX(8px);
}

/* Tab title */
.hover-tabs-ci__tab-title {
    display: block;
    font-size: 1.25rem;
    font-family: var(--wp--font--primary);
    font-weight: 400 !important;
    text-transform: none;
    color: #000;
}

.hover-tabs-ci__nav-item.active .hover-tabs-ci__tab-title {
    font-weight: 700 !important;
}

/* Tab description */
.hover-tabs-ci__tab-desc {
    font-family: var(--wp--font--primary);
    line-height: 1.45;
    color: var(--wp--color--dark-gray, #262626);
    margin: 0;
    font-size: .875rem;
}

/* â”€â”€ Panels â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.hover-tabs-ci__panel {
    display: none;
}

.hover-tabs-ci__panel.active {
    display: grid;
    grid-template-columns: 60fr 40fr;
    gap: 1.5rem;
    align-items: stretch;
}

/* Desktop: keep every panel rendered and stacked so its image stays decoded.
   Switching tabs crossfades between already-painted panels instead of revealing
   a display:none panel whose image must decode first (the "pop in from white").

   Panels are stacked in a SINGLE grid cell (grid-column/grid-row: 1) rather than
   absolutely positioned. Inactive panels stay laid out via visibility:hidden
   (not display:none), so every panel keeps contributing its height to the cell.
   The cell — and therefore the whole component — is always as tall as the
   TALLEST tab's content, so switching tabs never resizes the block or shifts
   the layout beneath it. */
@media (min-width: 782px) {
    .hover-tabs-ci__panels {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hover-tabs-ci__panel {
        grid-column: 1;
        grid-row: 1;
        display: grid;
        grid-template-columns: 60fr 40fr;
        gap: 1.5rem;
        align-items: stretch;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 300ms ease, visibility 0s 300ms;
    }

    .hover-tabs-ci__panel.has-no-image {
        grid-template-columns: 1fr;
    }

    /* Active panel fades in on top; the rest remain stacked in the same cell at
       opacity 0, fully laid out and decoded, holding the container's height. */
    .hover-tabs-ci__panel.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        z-index: 1;
        transition: opacity 300ms ease, visibility 0s 0s;
    }
}

.hover-tabs-ci__panel.active.has-no-image {
    grid-template-columns: 1fr;
}

/* â”€â”€ Content column â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
/* Columns are pinned by grid-column/grid-row (not DOM order) so the image can
   come first in the markup â€” that lets the mobile accordion slide image +
   content as one. grid-row:1 keeps both in the same row despite the image being
   first in the DOM (otherwise auto-placement pushes the content to row 2). */
.hover-tabs-ci__panel-content {
    min-width: 0;
    grid-column: 1;
    grid-row: 1;
}

.hover-tabs-ci__panel-content h3 {
    font-family: var(--wp--font--primary);
    font-weight: 700;
    color: #000;
    text-transform:capitalize;
    font-size: 1.25rem;
    line-height: 1.2;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

/* â”€â”€ Image column â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.hover-tabs-ci__panel-image {
    position: relative;
    overflow: hidden;
    min-height: 200px;
    grid-column: 2;
    grid-row: 1;
}

/* Absolutely positioned so the image never pushes the panel row taller than the content column.
   The panel-image container stretches to match content height via grid align-items:stretch,
   then the image fills that container. */
.hover-tabs-ci__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--hover-tabs-ci-focal, 50% 50%);
}

/* When a plugin wraps the <img> in a <picture>, target the inner <img>.
   Focal point is passed via --hover-tabs-ci-focal (inheritable custom property). */
.hover-tabs-ci__img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--hover-tabs-ci-focal, 50% 50%);
}

/* â”€â”€ Mid breakpoint (â‰¤1080px): reduce tab title size â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 1080px) {
    .hover-tabs-ci__tab-title {
        font-size: 1rem;
    }
}

/* â”€â”€ Mobile (â‰¤781px) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 781px) {
    /* Convert to flex column; display:contents makes nav/panels transparent
       to the flex layout so children interleave via CSS order */
    .hover-tabs-ci {
        display: flex;
        flex-direction: column;
    }

    .hover-tabs-ci__nav,
    .hover-tabs-ci__panels {
        display: contents;
    }

    /* Indicator: switch from right/scaleY (desktop) to bottom/scaleX on mobile */
    .hover-tabs-ci__nav-item::after {
        right: 0;
        top: auto;
        bottom: -1px;
        width: 100%;
        height: 4px;
        transform: scaleX(0);
    }

    .hover-tabs-ci__nav-item.active::after {
        transform: scaleX(1);
    }

    /* Interleave: each nav item immediately above its panel, for any number of
       tabs. PHP sets --m-order per element (nav = index*2, panel = index*2+1)
       so the nav/panel pairs stay correctly ordered no matter how many tabs. */
    .hover-tabs-ci__nav-item { order: var(--m-order, 0); }
    .hover-tabs-ci__panel    { order: var(--m-order, 0); }

    /* Active panel: switch from grid to flex-column; image first, content second */
    .hover-tabs-ci__panel.active {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        padding-bottom: 0.75rem;
    }

    /* Image: landscape aspect ratio. Image is first in the DOM, so no flex order
       reversal is needed â€” the panel slides image + content down as one unit. */
    .hover-tabs-ci__panel-image {
        width: 100%;
        aspect-ratio: 2 / 1;
        min-height: unset;
    }

    .hover-tabs-ci__panel-content {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }

    /* Reset desktop flex:1 stretch â€” nav items stack naturally on mobile */
    .hover-tabs-ci__nav-item {
        flex: none;
    }

    .hover-tabs-ci__nav-item.active {
        /* padding-bottom: 20px; */
    }
}

/* â”€â”€ Check-list overrides (scoped to this block) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.hover-tabs-ci__panel-content ul.wp-block-list.check-list {
    margin-bottom:1.5rem;
}
.hover-tabs-ci__panel-content ul.wp-block-list.check-list li {
    border-bottom: none;
    padding-left:28px;
}

.hover-tabs-ci__panel-content ul.wp-block-list.check-list li:last-child{
    padding-bottom:0;
    margin-bottom:0;
}

.hover-tabs-ci__panel-content ul.wp-block-list.check-list li:before {
    background: url(/wp-content/uploads/check-yellow.svg) no-repeat center / contain;
    margin-right:0;
    width:18px;
    min-width:18px;
    height:18px;
    top:4px;
}

/* â”€â”€ Buttons: black with white text, grey with black text on hover â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.hover-tabs-ci .hover-tabs-ci__panel-content a.wp-block-button__link.wp-element-button {
    background-color: #000 !important;
    color: #fff !important;
}

.hover-tabs-ci .hover-tabs-ci__panel-content a.wp-block-button__link.wp-element-button:hover,
.hover-tabs-ci .hover-tabs-ci__panel-content a.wp-block-button__link.wp-element-button:focus {
    background-color: var(--wp--color--light-gray) !important;
    color: #000 !important;
}