/* Base Layout */
.lgms-13476 {
    position: relative;
    width: 100%;
}

.lgms-13476__grid {
    display: grid;
    /* Columns handled by widget control */
    width: 100%;
    /* Drag/Scroll behaviors */
    -webkit-overflow-scrolling: touch;
    user-select: none; /* Prevent text selection while dragging */
}

/* Add grab cursor when content overflows (handled via JS detection or general mobile style) */
.lgms-13476__grid.is-draggable {
    cursor: grab;
}

.lgms-13476__grid.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto !important; /* Disable smooth scroll during drag for immediate response */
    scroll-snap-type: none !important; /* Disable snap during drag */
}

/* Card Styles */
.lgms-13476__card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    box-sizing: border-box;
    cursor: pointer;
    transition: transform 0.3s ease;
    /* Default flex settings for grid mode */
    width: 100%; 
}

.lgms-13476__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Default - overridden by controls */
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
    z-index: 1;
}

.lgms-13476__card:hover .lgms-13476__bg {
    transform: scale(1.05);
}

.lgms-13476__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    /* Controls handle color/opacity/transition */
}

.lgms-13476__content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
    pointer-events: none; /* Let clicks pass through to full-link */
}

/* Re-enable pointer events for button if needed, though full-link covers card */
.lgms-13476__btn {
    pointer-events: auto; 
}

.lgms-13476__title {
    margin: 0;
    line-height: 1.2;
}

.lgms-13476__desc {
    margin: 0;
    line-height: 1.5;
}

.lgms-13476__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    cursor: pointer;
}

.lgms-13476__btn-icon {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.lgms-13476__card:hover .lgms-13476__btn-icon {
    transform: translateX(5px);
}

.lgms-13476__full-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
}

/* Mobile Slider Styles */
.lgms-13476__nav {
    display: none; /* Hidden on desktop */
    justify-content: flex-end; /* Default, overridden by control */
    gap: 15px; /* Default, overridden by control */
    margin-top: 20px;
    pointer-events: none; /* Container passes clicks */
}

/* Flexible Icon Button */
.lgms-13476__nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
    pointer-events: auto; /* Enable clicks on buttons */
    z-index: 10;
    /* Default sizing is auto, overridden by controls if set */
    width: auto;
    height: auto;
}

.lgms-13476__nav-btn:focus {
    outline: none;
}

.lgms-13476__nav-btn:hover {
    opacity: 0.8; 
}

.lgms-13476__nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    filter: grayscale(100%);
}

/* Ensure SVG fills the container defined by font-size */
.lgms-13476__nav-btn i,
.lgms-13476__nav-btn svg {
    display: block;
    width: 1em; 
    height: 1em;
    font-size: inherit; /* Inherit font-size from button */
    fill: currentColor; /* Inherits from color control */
    color: currentColor;
}

/* Mobile & Tablet Responsive Behavior */
@media (max-width: 1024px) { /* Adjust breakpoint if needed */
    .lgms-13476__grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 15px !important; /* Force gap for slider */
        padding-bottom: 20px;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }

    .lgms-13476__grid::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

    /* Cards in slider mode */
    .lgms-13476__card {
        /* Default mobile width, overridden by controls */
        flex: 0 0 85%; 
        width: 85%;
        scroll-snap-align: start;
    }
    
    .lgms-13476__nav {
        display: flex; /* Show nav on mobile/tablet */
    }
}
