/* List Reveals v2.0.5 */

.lr-wrapper {
    position: relative;
}

.lr-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* ═══════════════════════════════════════════════════════════════ */
/* ITEM - Heading position is FIXED, not affected by other elements */
/* ═══════════════════════════════════════════════════════════════ */

.lr-item {
    position: relative;
    display: flex;
    align-items: center;
    cursor: default;
    transition: background-color 0.3s ease;
    gap: 0;
}

.lr-item a {
    cursor: pointer;
}

/* Click-show elements - only show on explicit click, not hover */
.lr-click-show {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lr-item.lr-clicked .lr-click-show {
    opacity: 1;
    pointer-events: auto;
}

/* ═══════════════════════════════════════════════════════════════ */
/* ADDITIONAL (Always on LEFT, independent position) */
/* ═══════════════════════════════════════════════════════════════ */

.lr-additional {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    font-weight: bold;
    line-height: 1;
    flex-shrink: 0;
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.lr-additional.lr-hover-show {
    opacity: 0;
    transform: translateX(-10px);
}

.lr-item:hover .lr-additional.lr-hover-show,
.lr-item.active .lr-additional.lr-hover-show {
    opacity: 1;
    transform: translateX(0);
}

.lr-additional.lr-has-border {
    border-left-style: solid;
    padding-left: 1em;
}

/* ═══════════════════════════════════════════════════════════════ */
/* HEADING WRAP - Contains heading and inline description */
/* ═══════════════════════════════════════════════════════════════ */

.lr-heading-wrap {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    position: relative;
    z-index: 2;
}

.lr-heading-wrap.lr-desc-position-below {
    flex-direction: column;
    align-items: flex-start;
}

/* ═══════════════════════════════════════════════════════════════ */
/* HEADING - Position independent of description */
/* ═══════════════════════════════════════════════════════════════ */

.lr-heading {
    display: inline;
    text-decoration: none;
    transition: color 0.3s ease;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════ */
/* DESCRIPTION - Position relative to heading, doesn't push heading */
/* ═══════════════════════════════════════════════════════════════ */

.lr-desc {
    display: inline-block;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    transition: opacity 0.4s ease, transform 0.4s ease, max-height 0.4s ease, margin 0.4s ease;
    vertical-align: middle;
}

/* Description that hides - doesn't take space when hidden */
.lr-desc.lr-hover-show,
.lr-desc.lr-click-show {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    margin-left: 0 !important;
    margin-top: 0 !important;
}

.lr-item:hover .lr-desc.lr-hover-show,
.lr-item.active .lr-desc.lr-hover-show {
    opacity: 1;
    max-height: 500px;
    overflow: visible;
}

.lr-item.lr-clicked .lr-desc.lr-click-show {
    opacity: 1;
    max-height: 500px;
    overflow: visible;
}

.lr-desc-below {
    display: block;
    width: 100%;
}

.lr-desc.lr-nowrap {
    white-space: nowrap;
    overflow: visible;
}

/* Description right position - restore margin when visible */
.lr-item:hover .lr-desc-right.lr-hover-show,
.lr-item.active .lr-desc-right.lr-hover-show,
.lr-item.lr-clicked .lr-desc-right.lr-click-show {
    margin-left: 15px !important;
}

.lr-item:hover .lr-desc-below.lr-hover-show,
.lr-item.active .lr-desc-below.lr-hover-show,
.lr-item.lr-clicked .lr-desc-below.lr-click-show {
    margin-top: 10px !important;
}

/* ═══════════════════════════════════════════════════════════════ */
/* SEPARATOR */
/* ═══════════════════════════════════════════════════════════════ */

.lr-sep {
    display: inline-block;
    transition: transform 0.3s ease, color 0.3s ease, opacity 0.3s ease, max-width 0.3s ease, margin 0.3s ease;
}

.lr-sep.lr-hover-show {
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
}

.lr-item:hover .lr-sep.lr-hover-show,
.lr-item.active .lr-sep.lr-hover-show {
    opacity: 1;
    max-width: 50px;
    margin: 0 10px !important;
}

/* Separator animations */
.lr-item:hover .lr-sep.lr-sep-anim-rotate,
.lr-item.active .lr-sep.lr-sep-anim-rotate {
    transform: rotate(15deg);
}

.lr-item:hover .lr-sep.lr-sep-anim-scale,
.lr-item.active .lr-sep.lr-sep-anim-scale {
    transform: scale(1.3);
}

.lr-item:hover .lr-sep.lr-sep-anim-bounce,
.lr-item.active .lr-sep.lr-sep-anim-bounce {
    animation: lr-bounce 0.5s ease;
}

@keyframes lr-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* ═══════════════════════════════════════════════════════════════ */
/* IMAGE - Fixed position, respects BOTH max-width AND max-height */
/* ═══════════════════════════════════════════════════════════════ */

.lr-image {
    position: fixed;
    pointer-events: none;
    opacity: 0;
    overflow: hidden;
    will-change: opacity;
    top: 0;
    left: 0;
    width: auto;
    height: auto;
}

.lr-image img {
    display: block;
    width: auto;
    height: auto;
    max-width: inherit;
    max-height: inherit;
    object-fit: contain;
}

/* Z-Index control */
.lr-image-over .lr-image {
    z-index: 9999;
}

.lr-image-under .lr-image {
    z-index: 1;
}

.lr-image-under .lr-heading-wrap,
.lr-image-under .lr-additional {
    position: relative;
    z-index: 10;
}

/* Text inversion when image is under - ONLY when item is active */
/* White text + difference = black on white bg, light on dark image */
.lr-image-under.lr-invert-text .lr-item.active .lr-heading-wrap,
.lr-image-under.lr-invert-text .lr-item.active .lr-heading-wrap *,
.lr-image-under.lr-invert-text .lr-item.active .lr-additional {
    color: #ffffff !important;
    mix-blend-mode: difference;
}

/* Line separator between items */
.lr-item.lr-has-line::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    opacity: 0.3;
    transition: opacity 0.3s ease, width 0.3s ease;
}

.lr-item.lr-has-line.lr-line-hover::after {
    opacity: 0;
    width: 0;
}

.lr-item.lr-has-line.lr-line-hover:hover::after {
    opacity: 0.3;
    width: 100%;
}

/* Glitch effect */
.lr-image.lr-glitch {
    animation: lr-glitch 0.3s ease;
}

@keyframes lr-glitch {
    0% { filter: hue-rotate(0deg); }
    10% { transform: translate(-5px, 2px); filter: hue-rotate(90deg); }
    20% { transform: translate(5px, -2px); filter: hue-rotate(180deg); }
    30% { transform: translate(-3px, 1px); filter: hue-rotate(270deg); }
    40% { transform: translate(3px, -1px); filter: hue-rotate(360deg); }
    50% { transform: translate(-2px, 2px); }
    60% { transform: translate(2px, -2px); }
    70% { transform: translate(-1px, 1px); }
    80% { transform: translate(1px, -1px); }
    90%, 100% { transform: translate(0); filter: hue-rotate(0deg); }
}

/* ═══════════════════════════════════════════════════════════════ */
/* MOBILE */
/* ═══════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
    .lr-image {
        max-width: 70vw !important;
        max-height: 50vh !important;
    }
}
