/* wml-elements-pro/assets/css/the-spotlight-stage.css */

.wml-spotlight-stage {
    --bg-color: #d6d6d6;
    --text-off: #888888;
    --text-on: #000000;
    --accent: #ff0000;

    background-color: var(--bg-color);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.wml-spotlight-stage * {
    box-sizing: border-box;
}

.wml-spotlight-inner {
    display: flex;
    width: 100%;
    max-width: 1100px;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
    /* Allows stacking if 100% width is used */
}

.wml-spotlight-viewport {
    position: relative;
    width: 420px;
    height: 520px;
    /* These can be overridden cleanly via bricks ui */
    max-width: 100%;
    overflow: hidden;
    border-radius: 4px;
    background: transparent;
    flex-shrink: 0;
    /* Important so it respects Bricks width values precisely */
    /* Enable 3D space */
    perspective: 1000px;
}

.wml-spotlight-viewport img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    /* Default visibility is handled by JS but fallback */
    opacity: 0;
    will-change: transform, opacity, filter, clip-path;
}

/* Active class applied instantly without JS transitions. 
   GSAP handles the rest, but this ensures the 1st one is visible before JS runs 
   and gives a fallback state */
.wml-spotlight-viewport img.active {
    opacity: 1;
    z-index: 2;
    transform: none;
    filter: none;
    clip-path: none;
}

.wml-spotlight-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1 1 auto;
}

.wml-spotlight-nav-item {
    position: relative;
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 700;
    color: var(--text-off);
    cursor: pointer;
    padding: 8px 0;
    transition: color 0.3s ease;
    line-height: 1.2;
}

.wml-spotlight-nav-item.active {
    color: var(--text-on);
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .wml-spotlight-inner {
        flex-direction: column-reverse;
        /* List on bottom, image top */
        gap: 20px;
        text-align: center;
    }

    .wml-spotlight-viewport {
        width: 100% !important;
        /* Force full width wrapper on mobile */
        max-width: 500px;
        /* Optional cap so it doesn't get ridiculously wide on large tablets */
        height: auto !important;
        aspect-ratio: 4 / 5;
        /* Maintain beautiful proportion instead of fixed height */
        max-height: 60vh;
        /* Prevent overflowing viewport height entirely */
    }

    .wml-spotlight-nav-item {
        padding: 10px 0;
        display: inline-block;
        margin: 0 10px;
    }
}