

:root{

    --pas: 5mm;
    --grid-x-width: 5mm;
    --grid-x: 25;
    --grid-y-height: 5mm;
    --grid-y: 38;
    --grid-border: #cfcfcf;
}


body{
    line-height: 0;
}

@page{
    size: A5;
    margin-left: 10mm;
    margin-right: 10mm;
    margin-top: 10mm;
    margin-bottom: 10mm;
}

@page:left{
    @bottom-left{
        content: counter(page);
        font-size: 11px;
        font-family: sans-serif;
        height: 5mm;
        width: 5mm;
        text-align: center;
        position: relative;
        top: -5mm;
    }
}


@page:right{
    @bottom-right{
        content: counter(page);
        font-size: 11px;
        font-family: sans-serif;
        height: 5mm;
        width: 5mm;
        text-align: center;
        position: relative;
        top: -5mm;
        left: -11px;
    }
}

.pagedjs_area {
    display: grid;
    width: calc(var(--grid-x)*(--grid-x-width))!important;
    height: calc(var(--grid-y)*var(--grid-y-height))!important;
    grid-template-columns: repeat(var(--grid-x), var(--grid-x-width) );
    grid-template-rows: repeat(var(--grid-y), var(--grid-y-height) );

}

.pagedjs_page_content {
    grid-column: 1/26;
    grid-row: 1/39;
}

.grid-item-x{
    width: 100%;
    height: 100%;
    grid-row: 1/39;
    border-left: 1px solid var(--grid-border);
    z-index: -1;

}


.grid-item-y{
    width: 100%;
    height: 100%;
    grid-column: 1/26;
    border-top: 1px solid var(--grid-border);
    z-index: -1;

}

[data-column="last"]{
    border-right: 1px solid var(--grid-border);
}

[data-row="last"]{
    border-bottom: 1px solid var(--grid-border);
}


.pas-in-px{
    position: absolute;
    top: 0;
    left: 0;
    width: var(--pas);
    height: var(--pas);
    background-color: red;
}


h1{
    break-after: page;
}

.mix-container{
    break-before: page;
}

.container-img {
   display: block;
   margin-bottom: 5mm;
   margin-right: var(--pas);
}

.container-img img{
    width: 100%;
    object-fit: cover;

}


