/* Frontend Styles for Animated Event Images */
.aei-gallery {
    display: grid;
    /* grid-template-columns and gap are overridden by Elementor settings */
    grid-template-columns: repeat(2, 1fr);
    grid-auto-flow: dense;
    gap: 20px;
    width: 100%;
}

.aei-item {
    position: relative;
    width: 100%;
    height: 100%; /* Important for grid items to fill space */
    border-radius: 15px;
    overflow: hidden;
}

.shape-portrait {
    grid-row: span 2;
}

.shape-wide {
    grid-column: span 2;
}

.aei-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Important when grid cells have different aspect ratios */
    display: block;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
}

/* Initial hidden states based on direction */
.aei-animate-left img { transform: translateX(-100%); }
.aei-animate-right img { transform: translateX(100%); }
.aei-animate-top img { transform: translateY(-100%); }
.aei-animate-bottom img { transform: translateY(100%); }

/* Visible state triggered by JS */
.aei-item.is-visible img {
    transform: translate(0, 0);
    opacity: 1;
}

/* Hover effect for a premium feel */
.aei-item:hover img {
    transform: scale(1.05);
}
