:root {
    --item-categories-margin-lg: 50px 0 80px 0;
    --item-categories-margin-md: 40px 0 65px 0;
    --item-categories-margin-sm: 50px 0 50px 0;
    --item-categories-margin-xs: 50px 0 50px 0;

    --items-wrappers-gap-lg: 0 150px;
    --items-wrappers-gap-md: 0 100px;
    --items-wrappers-gap-sm: 30px 70px;
    --items-wrappers-gap-xs: 0 0;

    --item-grid-template-lg:    'header image' 'content image';
    --item-grid-template-md:    'header image' 'content image';
    --item-grid-template-sm:    'header image' 'content content';
    --item-grid-template-xs:    'header' 'image' 'content';

    --grid-template-columns-lg: 3fr 2fr;
    --grid-template-columns-md: 3fr 2fr;
    --grid-template-columns-sm: 3fr 2fr;
    --grid-template-columns-xs: 1fr;

    --item-image-max-width-lg: none;
    --item-image-max-width-md: none;
    --item-image-max-width-sm: none;
    --item-image-max-width-xs: 300px;

    --item-image-margin-xs: 0 0 0 0;
    --item-image-margin-xs: 0 0 0 0;
    --item-image-margin-xs: 0 0 0 0;
    --item-image-margin-xs: 0 auto 40px auto;


    --item-categories-margin: var(--item-categories-margin-xs);
    --items-wrappers-gap: var(--items-wrappers-gap-xs);
    --item-grid-template: var(--item-grid-template-xs);
    --grid-template-columns: var(--grid-template-columns-xs);
    --item-image-max-width: var(--item-image-max-width-xs);
    --item-image-margin: var(--item-image-margin-xs);
}

@media (min-width: 768px) {
    :root {
        --item-categories-margin: var(--item-categories-margin-sm);
        --items-wrappers-gap: var(--items-wrappers-gap-sm);
        --item-grid-template: var(--item-grid-template-sm);
        --grid-template-columns: var(--grid-template-columns-sm);
        --item-image-max-width: var(--item-image-max-width-xs);
        --item-image-margin: var(--item-image-margin-sm);
    }
}
@media (min-width: 960px) {
    :root {
        --item-categories-margin: var(--item-categories-margin-md);
        --items-wrappers-gap: var(--items-wrappers-gap-md);
        --item-grid-template: var(--item-grid-template-md);
        --grid-template-columns: var(--grid-template-columns-md);
        --item-image-max-width: var(--item-image-max-width-md);
        --item-image-margin: var(--item-image-margin-md);
    }
}
@media (min-width: 1200px) {
    :root {
        --item-categories-margin: var(--item-categories-margin-lg);
        --items-wrappers-gap: var(--items-wrappers-gap-lg);
        --item-grid-template: var(--item-grid-template-lg);
        --grid-template-columns: var(--grid-template-columns-lg);
        --item-image-max-width: var(--item-image-max-width-lg);
        --item-image-margin: var(--item-image-margin-lg);
    }
}


.wp-block-group.libro-grid-wrapper {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    gap: var(--items-wrappers-gap);
    justify-content: space-between;
    align-items: stretch;
}
.wp-block-group.libro-grid-wrapper>.wp-block-group.items-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0;
    order: 0;
    width: 100%;
    flex: 0 0 calc(60% - (var(--items-wrappers-gap) / 2));
    max-width: calc(60% - (var(--items-wrappers-gap) / 2));
}
.wp-block-group.libro-grid-wrapper>.wp-block-group.item-image {
    order: 1;
    width: 100%;
    flex: 0 0 calc(40% - (var(--items-wrappers-gap) / 2));
    max-width: calc(40% - (var(--items-wrappers-gap) / 2));
}

.wp-block-group.libro-grid-wrapper>.wp-block-group.item-image figure {
    width: 100%;
    max-width: var(--item-image-max-width);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px 0;
    border-radius: var(--border-radius-box);
    background-color: var(--nv-light-bg) !important;
    margin: var(--item-image-margin);
}
.wp-block-group.libro-grid-wrapper>.wp-block-group.item-image figure img {
    width: 60%;
    max-width: 300px;
    box-shadow: 0 0 30px rgba(0, 0, 0, .3);
}
.wp-block-group.libro-grid-wrapper>.wp-block-group>.item-categories-wrapper {
    margin: var(--item-categories-margin);
}
.wp-block-group.libro-grid-wrapper>.wp-block-group>.item-content>.item-consigliato {
    margin: 0 0 15px 0;
}
.wp-block-group.libro-grid-wrapper>.wp-block-group>.item-content>.item-consigliato>span {
    line-height: 1;
    padding: 3px 20px;
    border-radius: 10rem;
    margin: 0 0 0 0;
    background-color: var(--nv-light-bg) !important;
}
.wp-block-group.libro-grid-wrapper>.wp-block-group>.item-content>h1.wp-block-post-title {
    margin: 0 0 15px 0;
}
.wp-block-group.libro-grid-wrapper>.wp-block-group>.item-content>h2.wp-block-post-subtitle {
    margin: 0 0 20px 0;
    transform: translateY(-5px);
}
.wp-block-group.libro-grid-wrapper>.wp-block-group>.item-content>h2.wp-block-heading {
    font-size: 1.5rem;
    font-weight: 400;
    margin: 0 0 0 0;
}
.detail-button-arrow a ,
.wp-block-group.libro-grid-wrapper>.wp-block-group>.item-content>.wp-block-buttons a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    font-size: 1.25rem;
    line-height: var(--btnlineheight, 1.6);
    text-align: left;
    padding: 1.5rem 2.75rem;
    background-color: var(--primary-bg-color);
    color: var(--primary-text-color);
}
.detail-button-arrow a::after ,
.wp-block-group.libro-grid-wrapper>.wp-block-group>.item-content>.wp-block-buttons a::after {
    content: "";
    background-image: var(--bg-image-arrow-right);
    background-repeat: no-repeat;
    background-size: contain;
    width: 1.5rem;
    height: 1.25rem;
    filter: invert(97%) sepia(97%) saturate(0%) hue-rotate(10deg) brightness(102%) contrast(100%);
}
.detail-button-arrow a[target="_blank"]::after ,
.wp-block-group.libro-grid-wrapper>.wp-block-group>.item-content>.wp-block-buttons a[target="_blank"]::after {
    background-image: var(--bg-image-external);
}
.wp-block-group.libro-grid-wrapper>.wp-block-group>.item-content {
    display: block;
}

.wp-block-group.libro-grid-wrapper>.items-wrapper {
    grid-area: header;
}
.wp-block-group.libro-grid-wrapper>.content-wrapper {
    grid-area: content;
}
.wp-block-group.libro-grid-wrapper>.item-image {
    grid-area: image;
}
.wp-block-group.libro-grid-wrapper {
    display: grid;
    grid-template: var(--item-grid-template);
    grid-gap: var(--items-wrappers-gap);
    grid-template-columns: var(--grid-template-columns);
    grid-template-rows: 1fr auto;
}


.evento-indirizzo-mappa {
    display: flex;
    position: relative !important;
    padding-bottom: 100px !important;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}
.evento-indirizzo-mappa h2 {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    max-width: var(--site-width);
    margin: 0 0 .75rem 0;
    font-size: 2rem;
    font-weight: 700;
    gap: .5rem;
    color: var(--nv-primary-accent);
}
.evento-indirizzo-mappa h2::before {
    content: "";
    background-image: var(--icon-map-marker);
    background-repeat: no-repeat;
    width: 1.75rem;
    height: 2.25rem;
    display: flex;
    justify-content: center;
    align-items: center;
    filter: invert(16%) sepia(71%) saturate(2997%) hue-rotate(335deg) brightness(92%) contrast(101%);
}
.evento-indirizzo-mappa iframe {
    --border-radius-half: calc(var(--border-radius-box) / 2);
    width: 100%;
    height: 400px;
    max-width: var(--site-width);
    border-radius: var(--border-radius-half);
    box-shadow: 0 0 30px rgba(0, 0, 0, .1);
    border: solid 1px rgba(0, 0, 0, .075) !important;
}
.item-categories-wrapper .taxonomy-category {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: .5rem;
}
.item-categories-wrapper .taxonomy-category a {
    display: inline-block;
    border-radius: 50rem;
}
.item-categories-wrapper .taxonomy-category a[href] {
    padding: .25rem 2rem;
    background-color: var(--nv-primary-accent);
    color: var(--nv-text-dark-bg);
}
.item-categories-wrapper .taxonomy-category a:not([href]) {
    line-height: normal;
    padding: 3px 20px;
    background-color: var(--nv-light-bg);
    pointer-events: none;
}

.item-categories {
    padding: 60px 0 40px 0;
}
.item-categories .taxonomy-category {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 1.5rem;
}
.item-categories .taxonomy-category a[href] {
    display: inline-block;
    padding: .25rem 2rem;
    background-color: var(--nv-primary-accent);
    color: #fff;
    border-radius: 50rem;
}
.item-categories .taxonomy-category a:not(href) {
    display: inline-block;
    padding: .25rem 2rem;
    background-color: var(--nv-light-bg);
    border-radius: 50rem;
}


.event-wrapper .items-wrapper {
    width: 100%;
}
.event-wrapper .items-wrapper .item-categories {
    width: 100%;

}
.event-wrapper .items-wrapper .item-content {
    width: 100%;

}

@media (max-width: 574px) {
    .detail-button-arrow a ,
    .wp-block-group.libro-grid-wrapper>.wp-block-group>.item-content>.wp-block-buttons a {
        padding: 1rem 2rem;
        font-size: 1.125rem;
    }
}


/* .wp-block-group.libro-grid-wrapper .item-spacer {
    grid-area: spacer;
}
.wp-block-group.libro-grid-wrapper .item-categgories {
    grid-area: categgories;
}
.wp-block-group.libro-grid-wrapper .item-title {
    grid-area: title;
}
.wp-block-group.libro-grid-wrapper .item-image {
    grid-area: image;
}
.wp-block-group.libro-grid-wrapper .item-content {
    grid-area: content;
}

.wp-block-group.libro-grid-wrapper {
    display: grid;
    grid-template-areas:
        'spacer image'
        'categgories image'
        'title image'
        'content image'
    ;
    grid-auto-rows: minmax(100px, auto);
    align-items: start;
    row-gap: 30px;
    column-gap: 100px;
    background-color: #2196F3;
    padding: 0 0 0 0;
}

.wp-block-group.libro-grid-wrapper>.wp-block-group {
    background-color: #ddd;
    text-align: center;
    padding: 0 0 0 0;
    font-size: 30px;
    max-height: none;
}
.wp-block-group.libro-grid-wrapper .item-image {
    grid-area: image;
} */
