/* audace/expertise-showcase — front + editor styles */

.audace-expertise-showcase {
    display: grid;
    grid-template-columns: var(--audace-expertise-left, 40%) 1fr;
    gap: var(--audace-expertise-gap, var(--wp--preset--spacing--60, 2rem));
    align-items: stretch;
    box-sizing: border-box;
    min-height: var(--audace-viewport-h, 70vh);
}

/* When the block is a slide, the slides-container sets the outer height. */
.wp-block-audace-expertise-showcase.is-style-slide.audace-expertise-showcase {
    height: var(--audace-viewport-h, 70vh);
    min-height: 0;
}

.audace-expertise-showcase.is-empty {
    display: block;
    opacity: .6;
    font-style: italic;
}

.audace-expertise-showcase__left,
.audace-expertise-showcase__right {
    box-sizing: border-box;
}

.audace-expertise-showcase__left {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    height: 100%;
}

.audace-expertise-showcase__heading {
    margin: 0;
    font-weight: 700;
    line-height: 1;
    font-size: 3rem;
}

.audace-expertise-showcase__count {
    margin: 0;
    font-weight: 700;
    font-size: 1rem;
}

.audace-expertise-tabs {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    margin-top:auto;
    font-size: 3rem;
    font-style: italic;
    line-height: 1;
}

.audace-expertise-tab {
    appearance: none;
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
    color: color-mix(in srgb, currentColor 25%, transparent);
    transition: color .2s ease;
    line-height: 1;
    font-size: 1rem;
}

.audace-expertise-tab:hover,
.audace-expertise-tab:focus-visible {
    color: color-mix(in srgb, currentColor 60%, transparent);
    outline: none;
}

.audace-expertise-tab.is-active {
    color: inherit;
}

/* Right column: stage fills, arrows pinned at bottom-right. */
.audace-expertise-showcase__right {
    position: relative;
    min-width: 0;
    min-height: 0;
    height: 100%;
    padding-bottom: 4rem; /* reserve room for absolute-positioned arrows */
}

.audace-expertise-stage {
    position: relative;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.audace-expertise-panel {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: var(--audace-expertise-panel-gap, 1.5rem);
    padding: var(--audace-expertise-panel-padding, 0);
    box-sizing: border-box;
    transform: translate3d(100%, 0, 0);
    transition: transform .55s cubic-bezier(.7, .05, .25, 1);
    will-change: transform;
    background: inherit;
    overflow: auto;
}

/* First-paint: before JS runs, only the active panel is visible. */
.audace-expertise-panel.is-active {
    transform: translate3d(0, 0, 0);
}

.audace-expertise-panel__figure {
    margin: 0;
}

.audace-expertise-panel__figure img,
.audace-expertise-panel__thumb {
    display: block;
    width: 100%;
    height: auto;
    max-height: 55%;
    object-fit: cover;
}

.audace-expertise-panel__content > :first-child { margin-top: 0; }
.audace-expertise-panel__content > :last-child  { margin-bottom: 0; }

.audace-expertise-arrows {
    position: absolute;
    bottom: 0;
    right: 0;
    display: flex;
    gap: 1rem;
    z-index: 5;
}

.audace-expertise-arrow {
    appearance: none;
    background: transparent;
    border: 0;
    padding: 0.25em 0.5em;
    font: inherit;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    transition: opacity .2s ease, transform .2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.audace-expertise-arrow img {
    display: block;
    width: 2rem;
    height: auto;
}

.audace-expertise-arrow:hover,
.audace-expertise-arrow:focus-visible {
    outline: none;
    transform: translateY(-2px);
}

.audace-expertise-arrow[disabled] {
    opacity: .25;
    cursor: not-allowed;
    transform: none;
}

/* Mobile: stack columns. */
@media (max-width: 782px) {
    .audace-expertise-showcase {
        grid-template-columns: 1fr;
    }
    .audace-expertise-stage {
        min-height: 60vh;
    }
}

/* Editor preview niceties */
.wp-block-audace-expertise-showcase .audace-expertise-panel {
    position: static;
    transform: none;
    transition: none;
}
.wp-block-audace-expertise-showcase .audace-expertise-panel:not(.is-active) {
    display: none;
}
.wp-block-audace-expertise-showcase .audace-expertise-stage {
    min-height: auto;
    overflow: visible;
}
