/* =========================================================
   UNIFIED ARCHIVE CALENDAR
   I SOLISTI AQUILANI
========================================================= */


/* =========================================================
   VARIABLES
========================================================= */

.uac-container {
    --uac-accent: #e30613;
    --uac-text: #ffffff;
    --uac-muted: rgba(255, 255, 255, 0.38);
    --uac-muted-light: rgba(255, 255, 255, 0.62);
    --uac-line: rgba(255, 255, 255, 0.22);

    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;

    font-family: inherit;
    color: var(--uac-text);

    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}


/* =========================================================
   MONTH NAVIGATION
========================================================= */

.uac-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;

    width: 100%;
    min-height: 78px;

    padding: 0 4px;

    border-top: 1px solid var(--uac-line);
}


.uac-month-nav {
    appearance: none !important;
    -webkit-appearance: none !important;

    display: inline-flex !important;
    align-items: center;
    gap: 8px;

    width: auto !important;
    min-width: 0 !important;
    height: auto !important;

    margin: 0 !important;
    padding: 10px 0 !important;

    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: 1 !important;

    color: var(--uac-text) !important;

    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;

    cursor: pointer;

    transition:
        color 0.2s ease,
        opacity 0.2s ease;
}


.uac-prev-month {
    justify-self: start;
}


.uac-next-month {
    justify-self: end;
}


.uac-month-nav:hover:not(:disabled),
.uac-month-nav:focus:not(:disabled) {
    color: var(--uac-accent) !important;
    background: transparent !important;
    outline: 0;
}


.uac-month-nav:disabled {
    opacity: 0.2;
    cursor: default;
}


.uac-nav-arrow {
    display: inline-block;

    font-size: 18px;
    font-weight: 300;
    line-height: 1;
}


.uac-prev-label,
.uac-next-label {
    white-space: nowrap;
}


/* =========================================================
   CURRENT MONTH
========================================================= */

.uac-current-month {
    justify-self: center;

    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 150px;

    text-align: center;
}


.uac-current-month-label {
    font-size: 19px;
    font-weight: 600;
    line-height: 1;

    color: var(--uac-text);
}


/* =========================================================
   YEAR NAVIGATION
========================================================= */

.uac-year-navigation {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    width: 100%;

    margin: -4px 0 18px;
}


.uac-year-nav {
    appearance: none !important;
    -webkit-appearance: none !important;

    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    width: 26px !important;
    min-width: 26px !important;
    height: 26px !important;

    margin: 0 !important;
    padding: 0 !important;

    font-family: inherit !important;
    font-size: 19px !important;
    font-weight: 400 !important;
    line-height: 1 !important;

    color: var(--uac-accent) !important;

    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;

    cursor: pointer;

    transition:
        color 0.2s ease,
        opacity 0.2s ease;
}


.uac-year-nav:hover:not(:disabled),
.uac-year-nav:focus:not(:disabled) {
    color: #ffffff !important;

    background: transparent !important;

    outline: 0;
}


.uac-year-nav:disabled {
    opacity: 0.18;
    cursor: default;
}


.uac-current-year-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 44px;

    font-size: 13px;
    font-weight: 600;
    line-height: 1;

    color: #ffffff;
}


/* =========================================================
   CALENDAR STRIP
========================================================= */

.uac-calendar-strip {
    position: relative;

    width: 100%;

    padding: 7px 0 20px;

    overflow-x: auto;
    overflow-y: hidden;

    border-bottom: 1px solid var(--uac-line);

    scrollbar-width: thin;
    scrollbar-color:
        rgba(255, 255, 255, 0.25)
        transparent;
}


.uac-calendar-strip::-webkit-scrollbar {
    height: 3px;
}


.uac-calendar-strip::-webkit-scrollbar-track {
    background: transparent;
}


.uac-calendar-strip::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 10px;
}


/* =========================================================
   DAYS ROW
========================================================= */

.uac-days-body {
    display: grid;

    grid-template-columns:
        repeat(
            31,
            minmax(28px, 1fr)
        );

    align-items: start;

    width: 100%;
    min-width: 980px;

    margin: 0;
    padding: 0;
}


/* =========================================================
   SINGLE DAY
========================================================= */

.uac-day {
    appearance: none !important;
    -webkit-appearance: none !important;

    position: relative;

    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;

    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 66px;

    margin: 0 !important;
    padding: 5px 1px 12px !important;

    font-family: inherit !important;
    line-height: 1 !important;

    color: var(--uac-muted) !important;

    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;

    cursor: default;

    transition:
        color 0.2s ease,
        opacity 0.2s ease;
}


.uac-day:disabled {
    opacity: 1 !important;

    background: transparent !important;
}


.uac-day-week {
    display: block;

    margin: 0 0 8px;

    font-size: 11px;
    font-weight: 600;
    line-height: 1;

    text-transform: uppercase;

    color: inherit;
}


.uac-day-number {
    display: block;

    font-size: 15px;
    font-weight: 400;
    line-height: 1;

    color: inherit;
}


/* =========================================================
   DAY WITH CONTENT
========================================================= */

.uac-day.has-events {
    color: var(--uac-text) !important;

    cursor: pointer;
}


.uac-day.has-events .uac-day-week {
    font-size: 12px;
    font-weight: 700;
}


.uac-day.has-events .uac-day-number {
    font-size: 16px;
    font-weight: 600;
}


.uac-day.has-events:hover,
.uac-day.has-events:focus {
    color: var(--uac-accent) !important;

    background: transparent !important;

    outline: none;
}


/* =========================================================
   EVENT DOT
========================================================= */

.uac-day-dot {
    display: block;

    width: 5px;
    height: 5px;

    margin-top: 8px;

    background: var(--uac-accent);

    border-radius: 50%;

    transition:
        transform 0.2s ease;
}


/* =========================================================
   SELECTED DAY
========================================================= */

.uac-day.selected-day {
    color: var(--uac-text) !important;
}


.uac-day.selected-day .uac-day-number {
    font-weight: 700;

    color: var(--uac-text);
}


.uac-day.selected-day .uac-day-dot {
    transform: scale(1.4);
}


/* =========================================================
   EVENTS SECTION
========================================================= */

.uac-events-section {
    width: 100%;

    margin: 0;
    padding: 20px 0 0;

    border: 0;
}


/* =========================================================
   RESULTS HEADER
========================================================= */

.uac-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    width: 100%;

    margin: 0 0 24px;
}


.uac-events-title {
    margin: 0 !important;
    padding: 0 !important;

    font-family: inherit;
    font-size: 22px;
    font-weight: 400;
    line-height: 1.2;

    color: var(--uac-text);
}


/* =========================================================
   SHOW WHOLE MONTH BUTTON
========================================================= */

.uac-show-month {
    appearance: none !important;
    -webkit-appearance: none !important;

    width: auto !important;
    height: auto !important;

    margin: 0 !important;
    padding: 0 !important;

    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;

    color: var(--uac-text) !important;

    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;

    cursor: pointer;

    transition:
        color 0.2s ease;
}


.uac-show-month:hover,
.uac-show-month:focus {
    color: var(--uac-accent) !important;

    background: transparent !important;

    outline: 0;
}


.uac-show-month[hidden] {
    display: none !important;
}


/* =========================================================
   EVENTS GRID
========================================================= */

.uac-events-list {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 42px 24px;

    width: 100%;

    margin: 0;
    padding: 0;
}


/* =========================================================
   EVENT CARD
========================================================= */

.uac-event-card {
    display: block !important;

    width: 100%;
    min-width: 0;

    margin: 0 !important;
    padding: 0 !important;

    color: var(--uac-text) !important;
    text-decoration: none !important;

    background: transparent !important;

    border: 0 !important;
    border-radius: 0 !important;

    box-shadow: none !important;

    overflow: visible;

    cursor: pointer;
}


/* =========================================================
   EVENT IMAGE
========================================================= */

.uac-event-image-wrap {
    position: relative;

    display: block;

    width: 100%;

    margin: 0 0 16px;

    overflow: hidden;

    background: #111111;
}


.uac-event-image-wrap::after {
    content: "";

    position: absolute;
    inset: 0;

    pointer-events: none;

    background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.08) 0%,
    rgba(0, 0, 0, 0.18) 40%,
    rgba(0, 0, 0, 0.40) 75%,
    rgba(0, 0, 0, 0.65) 100%
);

    z-index: 2;
}


.uac-event-image {
    display: block;

    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;

    margin: 0;

    object-fit: contain;

    border: 0 !important;
    border-radius: 0 !important;

    transition:
        transform 0.45s ease,
        opacity 0.45s ease;
}


.uac-event-card:hover .uac-event-image {
    transform: scale(0.985);
}


/* =========================================================
   EVENT DETAILS
========================================================= */

.uac-event-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;

    width: 100%;

    margin: 0;
    padding: 0;
}


/* =========================================================
   BADGE
========================================================= */

.uac-event-badge {
    display: inline-block;

    align-self: flex-start;

    margin: 0 0 9px;
    padding: 0;

    font-family: inherit;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.05em;

    text-transform: uppercase;

    color: var(--uac-accent);

    background: transparent;

    border: 0;
    border-radius: 0;
}


/* =========================================================
   DATE
========================================================= */

.uac-event-date {
    display: block;

    margin: 0 0 7px;

    font-size: 12px;
    font-weight: 400;
    line-height: 1.3;

    color: var(--uac-muted-light);
}


/* =========================================================
   TITLE
========================================================= */

.uac-event-card-title {
    margin: 0 !important;
    padding: 0 !important;

    font-family: inherit;
    font-size: clamp(
        20px,
        1.7vw,
        28px
    );
    font-weight: 500;
    line-height: 1.1;

    color: var(--uac-text);

    transition:
        color 0.2s ease;
}


.uac-event-card:hover
.uac-event-card-title {
    color: var(--uac-accent);
}


/* =========================================================
   EVENT META
========================================================= */

.uac-event-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    gap: 0;

    margin: 10px 0 0;

    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;

    color: var(--uac-muted-light);
}


.uac-meta-time,
.uac-meta-location {
    color: inherit;
}


.uac-meta-separator {
    padding: 0 6px;

    color: var(--uac-muted);
}


/* =========================================================
   LOADER / EMPTY / ERROR
========================================================= */

.uac-loader,
.uac-no-events-placeholder,
.uac-error {
    grid-column: 1 / -1;

    width: 100%;

    margin: 0 !important;
    padding: 20px 0 !important;

    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    font-style: normal;
    line-height: 1.4;

    text-align: left;

    color: var(--uac-muted-light);

    background: transparent !important;

    border: 0 !important;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1024px) {

    .uac-header {
        min-height: 72px;
    }


    .uac-days-body {
        min-width: 960px;
    }


    .uac-events-list {
        gap: 34px 20px;
    }


    .uac-event-card-title {
        font-size: 21px;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {

    .uac-header {
        grid-template-columns:
            minmax(0, 1fr)
            auto
            minmax(0, 1fr);

        min-height: 64px;

        padding: 0;
    }


    .uac-month-nav {
        gap: 5px;

        font-size: 13px !important;
    }


    .uac-prev-label,
    .uac-next-label {
        white-space: nowrap;
    }


    .uac-nav-arrow {
        font-size: 16px;
    }


    .uac-current-month {
        min-width: 100px;
    }


    .uac-current-month-label {
        font-size: 18px;
    }


    .uac-year-navigation {
        gap: 7px;

        margin:
            -2px
            0
            15px;
    }


    .uac-year-nav {
        width: 24px !important;
        min-width: 24px !important;
        height: 24px !important;

        font-size: 17px !important;
    }


    .uac-current-year-label {
        min-width: 40px;

        font-size: 12px;

        color: #ffffff;
    }


    .uac-calendar-strip {
        padding-bottom: 16px;
    }


    .uac-days-body {
        grid-template-columns:
            repeat(
                31,
                31px
            );

        min-width: max-content;
    }


    .uac-day {
        min-height: 60px;

        padding-top: 4px !important;
    }


    .uac-day-week {
        margin-bottom: 7px;

        font-size: 10px;
    }


    .uac-day-number {
        font-size: 14px;
    }


    .uac-day.has-events .uac-day-week {
        font-size: 11px;
    }


    .uac-day.has-events .uac-day-number {
        font-size: 15px;
    }


    .uac-day-dot {
        width: 4px;
        height: 4px;

        margin-top: 7px;
    }


    .uac-events-section {
        padding-top: 18px;
    }


    .uac-results-header {
        flex-direction: column;
        align-items: flex-start;

        gap: 10px;

        margin-bottom: 20px;
    }


    .uac-events-title {
        font-size: 20px;
    }


    .uac-events-list {
        grid-template-columns: 1fr;

        gap: 34px;
    }


    .uac-event-image-wrap {
        margin-bottom: 14px;
    }


    .uac-event-card-title {
        font-size: 21px;
    }
}


/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    .uac-prev-label,
    .uac-next-label {
        font-size: 12px;
    }


    .uac-current-month-label {
        font-size: 17px;
    }


    .uac-events-title {
        font-size: 19px;
    }
}
/* =========================================================
   DESKTOP MASONRY / MOSAICO
   NON MODIFICA IL CALENDARIO
========================================================= */

@media (min-width: 768px) {

    .uac-events-list {
        display: grid;

        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );

        /*
         * Righe molto piccole:
         * il JS calcola quante deve occuparne ogni card.
         */
        grid-auto-rows: 8px;

        /*
         * Lo spazio verticale viene calcolato dal JS.
         */
        row-gap: 0;

        /*
         * Un po' più aria rispetto ai 24px precedenti.
         */
        column-gap: 40px;

        align-items: start;
    }


    .uac-event-card {
        width: 100%;
        min-width: 0;

        margin: 0 !important;
    }


    /* -----------------------------------------
       IMMAGINI
    ----------------------------------------- */

    .uac-event-image-wrap {
        overflow: hidden;

        background: #000000;
    }


    .uac-event-image {
        display: block;

        width: 100% !important;
        height: auto !important;

        transform: scale(1);

        transform-origin: center center;

        transition:
            transform 0.35s ease;
    }
}


/* =========================================================
   HOVER SOLO SU DESKTOP CON MOUSE
========================================================= */

@media
    (min-width: 768px)
    and (hover: hover)
    and (pointer: fine) {

    .uac-event-card:hover
    .uac-event-image {

        /*
         * Leggerissimo rimpicciolimento.
         */
        transform: scale(0.985);
    }
}


/* =========================================================
   TABLET / MOBILE
   NIENTE MASONRY JS
========================================================= */

@media (max-width: 767px) {

    .uac-event-card {
        grid-row-end: auto !important;
    }
}
