/* AION Three Column Blocks — frontend styles v5 */

/* ─── Grid container: always 3 equal columns ─── */
.aion-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    width: 100%;
    margin: 0 !important;
    padding: 0;
}

/* Kill WordPress default block spacing */
[class*="wp-block-aion-"] {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* ─── Each cell: forced square via padding trick ─── */
.aion-cell {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* height = width = square */
    overflow: hidden;
}

.aion-cell-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ─── Text cells ─── */
.aion-cell--text .aion-cell-inner {
    background-color: #f0f0f0;
    padding: 24px;
    box-sizing: border-box;
    font-family: 'Barlow', sans-serif;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow: hidden;
}

.aion-cell--text .aion-cell-inner > * {
    width: 100%;
}

/* ─── Image cells ─── */
.aion-cell--image .aion-cell-inner {
    background: #f0f0f0;
}

.aion-cell--image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* ─── Empty placeholder ─── */
.aion-cell--empty .aion-cell-inner {
    background: #e8e8e8;
}

/* ─── Mobile: single column, cells still square ─── */
@media (max-width: 768px) {
    .aion-3col {
        grid-template-columns: 1fr;
    }
}
