/* List Hover Gallery Widget Styles - All scoped to .aura-list-hover-gallery container */
.aura-list-hover-gallery {
    position: relative;
    z-index: 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: none; /* Hide default cursor when using custom cursor dot */
}

/* Gallery Title */
.aura-list-hover-gallery .aura-list-hover-gallery-title {
    margin: 0 0 20px 0;
    padding: 0;
    position: relative;
    z-index: 10;
    width: 100%;
}

/* Background Mode - Image as widget background */
.aura-list-hover-gallery[data-hover-mode="background"] {
    background-size: cover;
    background-position: center;
    min-height: 400px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    background-repeat: no-repeat;
}

/* Transition layer for smooth background changes */
.aura-list-hover-gallery[data-hover-mode="background"]::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--after-bg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease-in-out;
    z-index: 0;
}

.aura-list-hover-gallery[data-hover-mode="background"].transitioning::after {
    opacity: 1;
}

/* Overlay for background mode - only shows when image is active */
.aura-list-hover-gallery.has-active-image[data-hover-mode="background"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0); /* Controlled by Elementor setting */
    pointer-events: none; /* Don't block clicks */
    transition: background-color 0.3s ease;
    z-index: 1;
}

.aura-list-hover-gallery .aura-list-hover-gallery-list {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 10;
    text-align: var(--list-align, left);
}

.aura-list-hover-gallery .aura-list-hover-gallery-item {
    margin-bottom: 20px;
    transition: color 0.1s ease;
    position: relative;
    z-index: 10;
    line-height: 1;
}

.aura-list-hover-gallery .aura-list-hover-gallery-item:last-child {
    margin-bottom: 0;
}

/* Inline Layout */
.aura-list-hover-gallery .aura-list-hover-gallery-list.inline-layout {
    display: flex;
    flex-wrap: wrap;
    line-height: 1;
    justify-content: var(--list-align, flex-start);
}

/* Convert text-align values to flex values for inline layout */
.aura-list-hover-gallery .aura-list-hover-gallery-list.inline-layout[style*="--list-align: left"] {
    justify-content: flex-start;
}

.aura-list-hover-gallery .aura-list-hover-gallery-list.inline-layout[style*="--list-align: center"] {
    justify-content: center;
}

.aura-list-hover-gallery .aura-list-hover-gallery-list.inline-layout[style*="--list-align: right"] {
    justify-content: flex-end;
}

.aura-list-hover-gallery .aura-list-hover-gallery-item.inline-layout {
    display: inline-flex;
    margin-bottom: 0 !important;
    margin-right: 0;
    line-height: 1;
}

.aura-list-hover-gallery .aura-list-hover-gallery-item.inline-layout:not(:last-child)::after {
    content: var(--separator-content, '|');
    display: inline-block;
    margin-left: 15px;
    margin-right: 15px;
    font-size: 16px;
    color: currentColor;
    vertical-align: middle;
}

.aura-list-hover-gallery .aura-list-hover-gallery-item a,
.aura-list-hover-gallery .aura-list-hover-gallery-item > span {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    cursor: none !important;
    transition: color 0.1s ease;
    position: relative;
    z-index: 10;
}

.aura-list-hover-gallery .aura-list-item-content {
    display: inline-flex;
    flex-direction: column;
}

.aura-list-hover-gallery .aura-list-item-title {
    display: block;
}

.aura-list-hover-gallery .aura-list-item-subtitle {
    display: inline-block;
    font-size: 0.85em;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

/* Show description on item hover - always below, animate from above */
.aura-list-hover-gallery .aura-list-hover-gallery-item:hover .aura-list-item-subtitle {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Image Container */
.aura-list-hover-gallery .aura-list-hover-gallery-image-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.aura-list-hover-gallery .aura-list-hover-gallery-image {
    position: absolute;
    width: 400px;
    height: 300px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 5;
    transition:
        opacity 0.4s ease,
        clip-path 0.6s cubic-bezier(0.785, 0.135, 0.15, 0.86),
        transform 0.6s cubic-bezier(0.785, 0.135, 0.15, 0.86);

}

/* Background Mode Specific Styles */
.aura-list-hover-gallery[data-hover-mode="background"] .aura-list-hover-gallery-image-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    z-index: 5;
}

.aura-list-hover-gallery[data-hover-mode="background"] .aura-list-hover-gallery-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

/* Cursor Following Mode Specific Styles */
.aura-list-hover-gallery[data-hover-mode="cursor"] .aura-list-hover-gallery-image-container {
    position: fixed;
    z-index: 5;
}

.aura-list-hover-gallery[data-hover-mode="cursor"] .aura-list-hover-gallery-image {
    position: fixed;
    transform: translate(-50%, -50%);
    z-index: 5;
}

/* Custom Cursor Dot */
.aura-list-hover-gallery .aura-list-hover-gallery-cursor-dot {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #000000;
    pointer-events: none;
    z-index: 8;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.2s ease;
    mix-blend-mode: difference;
}

.aura-list-hover-gallery:hover .aura-list-hover-gallery-cursor-dot {
    opacity: 1;
}

/* Hide default cursor when hovering the widget */
.aura-list-hover-gallery[data-hover-mode="cursor"] {
    cursor: none;
}

.aura-list-hover-gallery[data-hover-mode="cursor"] * {
    cursor: none;
}

/* Hover State */
.aura-list-hover-gallery .aura-list-hover-gallery-item:hover ~ .aura-list-hover-gallery-image-container .aura-list-hover-gallery-image {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .aura-list-hover-gallery[data-hover-mode="background"] .aura-list-hover-gallery-image-container {
        width: 100%;
        position: relative;
        margin-top: 20px;
    }
    
    .aura-list-hover-gallery .aura-list-hover-gallery-image {
        width: 100%;
        height: 250px;
    }
}
