/* Grid Layout */
.ag-grid-container-2d5e4ff5 {
    display: grid;
    width: 100%;
}

.ag-grid-item-2d5e4ff5 {
    display: flex;
    flex-direction: column;
}

.ag-item-link-2d5e4ff5 {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

/* Base Hover Effect - applies globally if no other opacity applied */
.ag-item-link-2d5e4ff5:hover {
    /* Kept intentionally empty to avoid overriding specific opacity settings from controls */
}

.ag-item-figure-2d5e4ff5 {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Image Container - handles border and box shadow */
.ag-item-image-container-2d5e4ff5 {
    position: relative;
    width: 100%;
    transition: box-shadow 0.3s ease;
    overflow: hidden; /* ensures inner shadow and border radius apply nicely */
    /* Base height auto, aspect ratio controlled dynamically */
}

/* Inner Shadow Overlay using pseudo-element */
.ag-item-image-container-2d5e4ff5::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Allows clicks to pass through */
    z-index: 1; /* Above image, below overlay caption */
    transition: box-shadow 0.3s ease;
    border-radius: inherit; /* Inherits from container */
}

/* Inner Image wrapper */
.ag-item-image-2d5e4ff5 {
    position: relative;
    width: 100%;
    height: 100%; /* Fill container */
    line-height: 0;
    flex-grow: 1;
}

.ag-item-image-2d5e4ff5 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease, filter 0.3s ease;
}

/* Captions */
.ag-item-caption-2d5e4ff5 {
    text-align: center;
    padding: 10px;
    margin: 0;
}

/* Overlay positions */
.ag-item-caption-2d5e4ff5.pos-overlay_bottom,
.ag-item-caption-2d5e4ff5.pos-overlay_center {
    position: absolute;
    left: 0;
    width: 100%;
    z-index: 2;
    box-sizing: border-box;
}

.ag-item-caption-2d5e4ff5.pos-overlay_bottom {
    bottom: 0;
}

.ag-item-caption-2d5e4ff5.pos-overlay_center {
    top: 50%;
    transform: translateY(-50%);
}

/* Button */
.ag-item-button-wrapper-2d5e4ff5 {
    text-align: center;
    margin-top: auto; /* Pushes button to bottom if images vary in height */
    padding: 10px 0;
}

.ag-item-button-2d5e4ff5 {
    display: inline-block;
    padding: 12px 24px;
    background-color: #000;
    color: #fff;
    text-align: center;
    transition: all 0.3s ease;
    border-radius: 4px;
    font-weight: 500;
}
