/* Container holds all image strips */
.ita-container {
    display: flex;
    flex-direction: row;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
}

.ita-container::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari/Opera */
}

.ita-item {
    flex: 0 0 85px; /* Sensible minimum width for inactive panels */
    width: 85px;
    height: 100%;
    display: flex;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: flex 0.6s cubic-bezier(0.25, 1, 0.5, 1), width 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.ita-item.is-active {
    flex: 0 0 320px; /* Expands wider to reveal details */
    width: 320px;
    cursor: default;
}

/* Grayscale state transitions */
.ita-item .ita-image-wrapper {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.ita-item .ita-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.ita-item.is-active .ita-image {
    filter: grayscale(0%);
}

/* Info Overlay directly on top of bottom 25-30% */
.ita-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 35%;
    z-index: 2;
    background: linear-gradient(to top, rgba(10, 25, 47, 0.95) 0%, rgba(10, 25, 47, 0.5) 80%, transparent 100%);
    display: flex;
    align-items: flex-end;
    box-sizing: border-box;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(15px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.ita-item.is-active .ita-content {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Smooth Fade/Slide for active meta info */
.ita-meta-wrapper {
    width: 100%;
}

.ita-name {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
    line-height: 1.2;
}

.ita-title {
    font-size: 13px;
    color: #64ffda; /* Light cyan / bright accent blue */
    display: block;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
    line-height: 1.3;
}

/* Reduced Motion Compatibility */
@media (prefers-reduced-motion: reduce) {
    .ita-item, .ita-image, .ita-content {
        transition: none !important;
    }
}

/* Mobile Stack */
@media (max-width: 767px) {
    .ita-container {
        flex-direction: column;
        height: auto !important;
        overflow-x: hidden;
    }

    .ita-item {
        flex: none;
        width: 100% !important;
        height: 120px;
        transition: height 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    }

    .ita-item.is-active {
        height: 300px;
    }

    .ita-item.is-active .ita-content {
        height: 45%;
    }
}
