.aifi-event-hero,
.aifi-event-orbits {
    --aifi-event-orbit-line: #ffffff15;
    --aifi-event-orbit-accent: #e8af9733;
    background-image:
        radial-gradient(circle at 84% 45%, var(--aifi-event-orbit-accent) 0 2px, transparent 3px),
        radial-gradient(ellipse at 91% 94%, transparent 0 41%, var(--aifi-event-orbit-line) 41.3% 41.7%, transparent 42% 47%, var(--aifi-event-orbit-line) 47.3% 47.7%, transparent 48% 53%, var(--aifi-event-orbit-accent) 53.3% 53.7%, transparent 54%);
    background-repeat: no-repeat;
    background-position: right center;
    background-size: min(44%, 38rem) 100%;
}

.aifi-event-orbits--light {
    --aifi-event-orbit-line: #08304814;
    --aifi-event-orbit-accent: #9e670927;
}

.aifi-event-heading {
    display: flex;
    align-items: center;
    gap: .45em;
}

.aifi-event-heading::before {
    content: "";
    flex: 0 0 1.12em;
    height: 1.12em;
    background-color: #efd0bd;
    border-radius: .28em;
    background-image: var(--aifi-event-icon);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 66%;
}

.aifi-event-heading--about {
    --aifi-event-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2368382c' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5m0-8h.01'/%3E%3C/svg%3E");
}

.aifi-event-heading--topics {
    --aifi-event-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2368382c' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='m3 8 9-5 9 5-9 5-9-5Zm0 4 9 5 9-5M3 16l9 5 9-5'/%3E%3C/svg%3E");
}

.aifi-event-heading--programme {
    --aifi-event-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2368382c' stroke-width='2' stroke-linecap='round'%3E%3Crect x='4' y='6' width='16' height='15' rx='2'/%3E%3Cpath d='M8 3v6m8-6v6M4 12h16m-12 4h3'/%3E%3C/svg%3E");
}

.aifi-event-heading--registration {
    --aifi-event-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2368382c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18v4a2 2 0 0 0 0 4v4H3v-4a2 2 0 0 0 0-4V6Zm11 3v1m0 4v1'/%3E%3C/svg%3E");
}

.aifi-event-heading--venue {
    --aifi-event-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2368382c' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M19 10c0 5-7 11-7 11S5 15 5 10a7 7 0 1 1 14 0Z'/%3E%3Ccircle cx='12' cy='10' r='2'/%3E%3C/svg%3E");
}

.aifi-event-heading--partners {
    --aifi-event-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2368382c' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='9' cy='8' r='3'/%3E%3Cpath d='M3 20v-2a5 5 0 0 1 5-5h2a5 5 0 0 1 5 5v2m1-15a3 3 0 0 1 0 6m2 3a5 5 0 0 1 3 4v2'/%3E%3C/svg%3E");
}

.aifi-event-menu .wp-block-button__link {
    white-space: nowrap;
}

.aifi-event-home-link > .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.aifi-event-home-link > .wp-block-button__link::before {
    content: "";
    display: inline-block;
    flex: 0 0 .95rem;
    width: .95rem;
    height: .95rem;
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23083048' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 11 9-8 9 8M5 10v10h5v-6h4v6h5V10'/%3E%3C/svg%3E");
    vertical-align: -.12em;
}

.aifi-event-menu-mobile {
    display: none;
}

@media (max-width: 1024px) {
    .aifi-event-menu.wp-block-buttons {
        display: none;
    }

    .aifi-event-menu-mobile {
        display: block;
        border: 1px solid #08304840;
        border-radius: .55rem;
        background: #fffaf3;
        color: #083048;
    }

    .aifi-event-menu-mobile summary {
        padding: .75rem 1rem;
        cursor: pointer;
        font-weight: 700;
    }

    .aifi-event-menu-mobile summary::marker {
        color: #083048;
    }

    .aifi-event-menu-mobile[open] summary {
        border-bottom: 1px solid #08304826;
    }

    .aifi-event-menu-mobile .wp-block-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: .125rem;
        margin: 0;
        padding: .35rem .5rem;
    }

    .aifi-event-menu-mobile .wp-block-button__link.has-background {
        display: block;
        background-color: transparent !important;
        border-radius: .3rem;
        text-align: left;
    }

    .aifi-event-menu-mobile .wp-block-button__link:hover,
    .aifi-event-menu-mobile .wp-block-button__link:focus-visible {
        text-decoration: underline;
    }
}

.aifi-event-topics.wp-block-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    align-items: stretch !important;
}

.aifi-event-topics > .wp-block-column {
    display: flex;
}

.aifi-event-topic.wp-block-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .75rem;
    width: 100%;
    min-height: 13rem;
    box-sizing: border-box;
    border-radius: .75rem;
    text-align: center;
}

.aifi-event-topic > :is(h3, p) {
    margin-block: 0;
}

@media (max-width: 781px) {
    .aifi-event-topics.wp-block-columns {
        grid-template-columns: minmax(0, 1fr);
    }
}

.aifi-event-heading--speakers {
    --aifi-event-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2368382c' stroke-width='2' stroke-linecap='round'%3E%3Crect x='9' y='3' width='6' height='12' rx='3'/%3E%3Cpath d='M5 11a7 7 0 0 0 14 0m-7 7v3m-3 0h6'/%3E%3C/svg%3E");
}

.aifi-event-speakers .wp-block-post-template {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: clamp(1rem, 2vw, 1.5rem);
}

.aifi-event-speakers .wp-block-post-template > li {
    display: flex;
    min-width: 0;
}

.aifi-event-speaker.wp-block-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    background: #f2e8dc;
    border: 1px solid #08304820;
    border-radius: .85rem;
}

.aifi-event-speaker .wp-block-post-featured-image {
    aspect-ratio: 16 / 10;
    margin: 0;
    background: #e5eff2;
}

.aifi-event-speaker .wp-block-post-featured-image a,
.aifi-event-speaker .wp-block-post-featured-image img {
    display: block;
    width: 100%;
    height: 100%;
}

.aifi-event-speaker .wp-block-post-featured-image img {
    object-fit: cover;
    object-position: center 32%;
}

.aifi-event-speaker__body,
.aifi-event-speaker__summary {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: .65rem;
}

.aifi-event-speaker__body {
    padding: clamp(1rem, 2vw, 1.5rem);
}

.aifi-event-speaker__body > *,
.aifi-event-speaker__summary > * {
    margin-block: 0;
}

.aifi-event-speaker__name {
    font-size: 1.3rem;
    line-height: 1.2;
}

.aifi-event-speaker__body a {
    color: #083048;
    text-underline-offset: .18em;
}

.aifi-event-speaker__summary .wp-block-post-excerpt__more-text {
    margin-top: auto;
    padding-top: .5rem;
    font-weight: 700;
}

@media (max-width: 900px) {
    .aifi-event-speakers .wp-block-post-template {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .aifi-event-speakers .wp-block-post-template {
        grid-template-columns: minmax(0, 1fr);
    }
}

.aifi-event-speaker:not(:has(.wp-block-post-featured-image))::before {
    content: "";
    display: block;
    aspect-ratio: 16 / 10;
    background: #e5eff2;
}

.aifi-event-venue-media .wp-block-image,
.aifi-event-venue-map {
    margin: 0;
}

.aifi-event-venue-media .wp-block-image img,
.aifi-event-venue-map {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 1rem;
    box-sizing: border-box;
}

.aifi-event-venue-media .wp-block-image img {
    object-fit: cover;
}

.aifi-event-venue-map {
    min-height: 16rem;
    overflow: hidden;
    background: #e5eff2;
    isolation: isolate;
    border: 1px solid #08304833;
}

.aifi-event-venue-media .wp-element-caption {
    color: #35515d;
    font-size: .8rem;
}

.aifi-event-venue-media .wp-element-caption a {
    color: #083048;
}

.aifi-event-price-period {
    color: #68382c;
}

.aifi-event-prices.wp-block-table {
    border: 1px solid #d4bbae;
    border-radius: 1rem;
    background: #fffdfb;
}

.aifi-event-prices.wp-block-table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    line-height: 1.25;
}

.aifi-event-prices.wp-block-table :is(th, td) {
    padding: clamp(.6rem, 2vw, 1.25rem);
    border: 0;
}

.aifi-event-prices.wp-block-table thead th {
    color: #fff;
    background: #083048;
    font-weight: 700;
}

.aifi-event-prices.wp-block-table thead th:nth-child(2) {
    background: #8d402f;
}

.aifi-event-prices.wp-block-table tbody td {
    border-top: 1px solid #e8d5ca;
}

.aifi-event-prices.wp-block-table tbody td:first-child {
    font-weight: 650;
}

.aifi-event-prices.wp-block-table :is(th, td):nth-child(n + 2) {
    text-align: center;
}

.aifi-event-prices.wp-block-table tbody td:nth-child(2) {
    color: #68382c;
    background: #f8e7de;
    font-size: clamp(1.125rem, 2.3vw, 1.65rem);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.aifi-event-checkout {
    padding: clamp(1rem, 3vw, 1.75rem);
    border: 1px solid #e0c5b6;
    border-radius: 1rem;
    background: #fcf3ee;
    color: #38251f;
}

.aifi-event-checkout > :first-child {
    margin-block-start: 0;
}

.aifi-event-checkout > :last-child {
    margin-block-end: 0;
}

.aifi-event-checkout .aifi-event-checkout-status {
    color: #68382c;
    font-size: .95rem;
}

.aifi-event-checkout .aifi-event-ticket {
    --ticket-bg: #fffdfb;
    --ticket-ink: #083048;
    --ticket-muted: #4e3c35;
    --ticket-stub: #f8e7de;
    --ticket-line: #b48c7c;
    --ticket-accent: #8d402f;
    margin: .85rem 0 0;
    border: 1px solid #d4bbae;
    border-radius: .85rem;
    background: var(--ticket-bg);
    box-shadow: none;
}

.aifi-event-checkout .aifi-event-ticket::after,
.aifi-event-checkout .aifi-event-ticket .aifi-ticket__stub::before,
.aifi-event-checkout .aifi-event-ticket .aifi-ticket__stub::after {
    display: none;
}

.aifi-event-checkout .aifi-event-ticket .aifi-ticket__title {
    font-size: clamp(1.2rem, 2vw, 1.65rem);
    letter-spacing: -.02em;
    text-transform: none;
}

.aifi-event-checkout .aifi-event-ticket .aifi-iscrizione__price {
    color: #68382c;
    opacity: 1;
}

.aifi-event-checkout .aifi-event-ticket .aifi-iscrizione__button {
    display: inline-block;
    padding: .55rem 1.05rem;
    border: 1px solid #b98771;
    border-radius: 999px;
    background: #efd0bd;
    color: #38251f;
    box-shadow: none;
    text-decoration: none;
}

.aifi-event-checkout .aifi-event-ticket .aifi-iscrizione__button[href]:hover,
.aifi-event-checkout .aifi-event-ticket .aifi-iscrizione__button[href]:focus-visible {
    background: #8d402f;
    color: #fff;
}

.aifi-event-checkout .aifi-event-ticket .aifi-iscrizione__button[aria-disabled="true"] {
    cursor: default;
}

@media (max-width: 680px) {
    .aifi-event-checkout .aifi-event-ticket {
        grid-template-columns: minmax(0, 1fr);
    }

    .aifi-event-checkout .aifi-event-ticket .aifi-ticket__stub {
        border-top: 2px dashed var(--ticket-line);
        border-left: 0;
    }
}

.aifi-event-overview.wp-block-columns {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: clamp(1.75rem, 4vw, 3.5rem);
    margin-block-end: 0;
}

.aifi-event-overview > .wp-block-column {
    min-width: 0;
}

.aifi-event-overview > #about > p {
    font-size: clamp(1.075rem, 1.45vw, 1.25rem);
    line-height: 1.7;
}

.aifi-event-overview > #about > .aifi-event-about-lead {
    color: #68382c;
    font-size: clamp(1.2rem, 2vw, 1.65rem);
    line-height: 1.5;
}

.aifi-event-overview .aifi-event-topics.wp-block-columns {
    grid-template-columns: minmax(0, 1fr);
    gap: .8rem;
    margin-block-end: 0;
}

.aifi-event-overview .aifi-event-topic.wp-block-group {
    min-height: 8.5rem;
}

.aifi-event-overview .aifi-event-topic h3 {
    line-height: 1.25;
}

@media (max-width: 900px) {
    .aifi-event-overview.wp-block-columns {
        grid-template-columns: minmax(0, 1fr);
    }
}

.aifi-event-pitch.wp-block-group {
    padding: clamp(1rem, 2.2vw, 1.5rem);
    border-inline-start: 4px solid #8d402f;
    border-radius: .75rem;
    background: #f8e7de;
    color: #38251f;
}

.aifi-event-pitch h3 {
    margin-block: 0 .4rem;
    color: #68382c;
}

.aifi-event-pitch p {
    margin-block: 0;
}

main .wp-block-post-content [id] {
    scroll-margin-block-start: var(--aifi-event-anchor-offset, calc(150px + var(--aifi27-admin-offset, 0px)));
}

.aifi-event-venue-pin::before {
    content: "";
    position: absolute;
    inset: 2px;
    border: 2px solid #fff;
    border-radius: 50% 50% 50% 0;
    background: #8d402f;
    box-shadow: 0 1px 4px #08304877;
    transform: rotate(-45deg);
}

.aifi-event-canvas .post-password-form {
    box-sizing: border-box;
    width: min(calc(100% - 2rem), 42rem);
    margin: clamp(2rem, 8vw, 7rem) auto;
    padding: clamp(1.25rem, 4vw, 2.5rem);
    color: #083048;
    background: #fffdfb;
    border-radius: 1rem;
}

.aifi-event-canvas .post-password-form input {
    max-width: 100%;
}

.aifi-event-canvas .post-password-form input[type="submit"] {
    padding: .5rem .85rem;
    color: #fff;
    background: #083048;
    border: 1px solid #083048;
    border-radius: .35rem;
}

.aifi-event-account-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.aifi-event-account-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .75rem;
    padding: clamp(1rem, 2vw, 1.5rem);
    border: 1px solid #d4bbae;
    border-radius: .75rem;
    background: #fffdfb;
}

.aifi-event-account-option > :is(h4, p) {
    margin: 0;
}

.aifi-event-account-option .wp-element-button {
    margin-top: auto;
    padding: .55rem 1rem;
    color: #fff;
    background: #8d402f;
    text-decoration: none;
}

.aifi-event-account-option .wp-element-button:hover,
.aifi-event-account-option .wp-element-button:focus-visible {
    background: #68382c;
}

@media (max-width: 640px) {
    .aifi-event-account-options {
        grid-template-columns: minmax(0, 1fr);
    }
}
