/*
The following styles get applied both on the front of your site and in the editor. Replace them with your own styles or remove the file completely.
*/

:root {
    --sponsored-border-color: black;
    --sponsored-padding: 10px;
    --live-background-color: #d93025;
    --color-gray: #d4d4d8;
    --color-gray-light: #ebebeb;
    --layout-gap: 20px;
    --bc-block-article-gap: 20px;
    --font-size-huge: 40px;
    --section-margin: 80px;
}

/* ============================================
    LAYOUT & TYPOGRAPHY
*/

.dh-main {
    box-sizing: border-box;
    font-weight: 500 !important;
    *,
    *:before,
    *:after {
        box-sizing: inherit;
    }
    & > section:has(*) {
        margin: calc(var(--section-margin) / 2) 0;
        @media (min-width: 600px) {
            margin: var(--section-margin) 0;
        }
        & > .dh-cols {
            margin-bottom: var(--layout-gap);
        }
    }
    & > .dh-opening {
        margin-top: 0;
    }

    .disabled {
        pointer-events: none;
        cursor: default;
    }
    a {
        display: block;
    }
    h3 {
        font-size: 24px;
        font-weight: 500 !important;
        color: var(--wp--preset--color--white);
        background: var(--wp--preset--color--secondary);
        padding-left: var(--layout-gap);
    }
}

.dh-section {
    display: flex;
    flex-wrap: wrap;
    gap: var(--bc-block-article-gap);
    /*justify-content: space-between;*/
    & > * {
        width: 100%;
        @media (min-width: 600px) {
            flex: 1 0;
        }
    }
}

.dh-main section:first-child {
    margin-top: 0;
}

.dh-section + .dh-section {
    margin-top: calc(var(--layout-gap) * 2);
}

/* ============================================
    ULTIME NEWS
*/

.dh-latest-news {
    h3 {
        background: transparent !important;
        color: var(--wp--preset--color--black) !important;
        border-bottom: 1px solid var(--wp--preset--color--secondary);
        padding-left: 0 !important;
    }
}

/* ============================================
    BREAKING NEWS
*/

.dh-breaking-news {
    background: var(--wp--preset--color--black);
    color: var(--wp--preset--color--white);
    padding: 6px 6px 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: "Archivo Narrow", sans-serif;
    font-weight: 300;
    .dh-breaking-news__title {
        display: flex;
        align-items: center;
        span {
            margin-left: 6px;
            position: relative;
            &::after {
                content: "";
                position: absolute;
                top: 50%;
                right: -20px;
                transform: translateY(-50%) !important;
                width: 10px;
                height: 10px;
                background: var(--wp--preset--color--secondary);
                border-radius: 50%;
                animation: pulse 1.5s infinite;
            }
        }
    }
    .dh-breaking-news__link {
        border: 1px solid var(--wp--preset--color--white);
        svg {
            display: block;
        }
        a {
            color: var(--wp--preset--color--white);
        }
    }
}

/* ============================================
    ULTIME NEWS
*/

.ultime-news {
    padding-bottom: var(--layout-gap);
    border-bottom: 1px solid var(--color-gray);
}

/* ============================================
    OPENING
*/

.dh-opening > .dh-cols {
    & > :nth-child(1) {
        order: 2;
        @media (min-width: 600px) {
            order: 1;
        }
    }
    & > :nth-child(2) {
        order: 1;
        @media (min-width: 600px) {
            order: 2;
        }
    }
    & > :nth-child(3) {
        order: 3;
        @media (min-width: 600px) {
            order: 3;
        }
    }
}

/* ============================================
    ULTIMO VIDEO
*/

.ultimo-video.bc-card.bc-card--stack.bc-card--small.bc-card--video {
    h2 {
        a {
            color: var(--wp--preset--color--black) !important;
        }
    }
}

/* ============================================
    CRONACA
*/

.cronaca-1.bc-card.bc-card--stack.bc-card--small,
.cronaca-2.bc-card.bc-card--stack.bc-card--small {
    h2 a {
        font-size: 22px !important;
    }
}

/* ============================================
    VIDEO
*/

.dh-video {
    background: var(--wp--preset--color--black);
    display: block !important;
    padding-bottom: var(--layout-gap);
    .dh-cols {
        padding: 0 var(--layout-gap);
    }
    .video-1 {
        h2 {
            a {
                font-size: 26px !important;
            }
        }
    }
    .video-2 {
        display: block;
    }
    .dh-video__title {
        text-transform: uppercase;
        display: flex;
        justify-content: space-between;
        margin-bottom: calc(var(--layout-gap) * 2);
        & > * {
            margin: 0;
            background: var(--wp--preset--color--secondary);
        }
        & > h3 {
            font-size: 24px;
            color: var(--wp--preset--color--white);
            padding: 0 20px;
            font-weight: 500 !important;
        }
        & > a {
            display: flex;
            align-items: center;
            padding: 0 4px;
        }
    }
}

/* ============================================
    ESTERI
*/

.esteri-1.bc-card.bc-card--stack.bc-card--small {
    h2 a {
        font-size: 22px !important;
    }
}

/* ============================================
    GREEN
*/

.dh-green {
    .dh-section + .dh-section {
        margin-top: 0;
    }
    h3 {
        background: var(--wp--preset--color--custom-1) !important;
    }
}

.green-1.bc-card.bc-card--inline.bc-card--huge {
    background: var(--wp--preset--color--custom-1);
    h2 {
        a {
            font-size: 32px !important;
            font-weight: 500 !important;
        }
    }
    & > .block-group {
        display: flex !important;
        flex-direction: column;
        /*padding: calc(var(--layout-gap) * 2) 0;*/
        @media (min-width: 600px) {
            padding: 0;
            flex-direction: row;
        }
        & > *:first-child {
            order: 2;
            padding: calc(var(--layout-gap) * 4) calc(var(--layout-gap) * 2);
            flex: 0 1 calc(50% - calc(var(--layout-gap) * 2));
            @media (min-width: 600px) {
                order: 1;
            }
        }
        & > *:last-child {
            order: 1;
            @media (min-width: 600px) {
                order: 2;
            }
        }
    }
    h2,
    .bc-single-category,
    .bc-single-author {
        a,
        p {
            color: var(--wp--preset--color--white) !important;
            &:hover {
                color: var(--wp--preset--color--white) !important;
            }
        }
    }
    .bc-card.bc-card--inline.bc-card--huge {
        & > .block-group {
            gap: 0 !important;
        }
    }
}

.green-2.bc-card.bc-card--stack.bc-card--small,
.green-3.bc-card.bc-card--stack.bc-card--small {
    h2 a {
        font-size: 22px !important;
    }
    .bc-single-category {
        a {
            color: var(--wp--preset--color--custom-1) !important;
        }
    }
}

.green-3 {
    & > div {
        margin-left: 20px;
    }
}

/* ============================================
    PHOTOGALLERY
*/

.dh-photogallery {
    background: var(--color-gray-light);
    padding-bottom: var(--layout-gap);
    display: block !important;
    .dh-cols {
        padding: 0 var(--layout-gap);
    }
    .dh-photogallery__title {
        text-transform: uppercase;
        display: flex;
        justify-content: space-between;
        margin-bottom: calc(var(--layout-gap) * 2);
        & > * {
            margin: 0;
            background: var(--wp--preset--color--black);
        }
        & > h2 {
            font-size: 24px;
            color: var(--wp--preset--color--white);
            padding: 0 20px;
            font-weight: 500 !important;
        }
        & > a {
            display: flex;
            align-items: center;
            padding: 0 4px;
        }
    }
    .bc-article {
        h2 {
            a {
                font-size: 20px !important;
            }
        }
        & .bc-single-category {
            a {
                color: var(--wp--preset--color--black) !important;
            }
        }
    }
}

/* ============================================
    SPORT
*/

.dh-sport {
    .bc-article {
        @media (min-width: 600px) {
            flex: 1 0 calc(50% - calc(var(--layout-gap) / 2));
        }
    }
}

/* ============================================
    PODCAST
*/

.dh-podcast {
    display: block !important;
    background: var(--color-gray-light) !important;
    padding-bottom: var(--layout-gap) !important;
    .dh-cols {
        padding: 0 var(--layout-gap);
    }
    .dh-podcast__title {
        text-transform: uppercase;
        display: flex;
        justify-content: space-between;
        margin-bottom: calc(var(--layout-gap) * 2);
        & > * {
            margin: 0;
            background: var(--wp--preset--color--black);
        }
        & > h2 {
            font-size: 24px;
            color: var(--wp--preset--color--white);
            padding: 0 20px;
            font-weight: 500 !important;
        }
        & > a {
            display: flex;
            align-items: center;
            padding: 0 4px;
        }
    }
    .bc-article {
        & .bc-single-category {
            a {
                color: var(--wp--preset--color--black) !important;
                font-size: 12px;
            }
        }
        a.bc-podcast {
            font-family: "Archivo Narrow", sans-serif;
            font-size: 12px !important;
        }
        h2 {
            a {
                font-size: 16px !important;
            }
        }
    }
}

.dh-podcast .bc-article.bc-card--inline.bc-card--small {
    & h2 {
        & a {
            -webkit-line-clamp: 3 !important;
            line-clamp: 3 !important;
        }
    }
}

/* ============================================
    ANIMALI
*/

.dh-animali-2 {
    display: block;
}

.dh-animali-1--3 {
    .bc-card.bc-card--stack.bc-card--small {
        h2 a {
            font-size: 22px !important;
        }
    }
}

/* ============================================
    FOOTER (REGIONE MARCHE + ABBONATI)
*/

section.footer {
    .dh-cols {
        div {
            text-align: center;
            &:first-child {
                @media (min-width: 680px) {
                    text-align: right;
                }
            }
            &:last-child {
                @media (min-width: 680px) {
                    text-align: left;
                }
            }
            img {
                width: 320px;
                height: 320px;
            }
        }
    }
}

/* ============================================
    COLUMNS
*/

.dh-cols {
    display: flex;
    flex-wrap: wrap;
    gap: var(--bc-block-article-gap);
    & > * {
        width: 100%;
        @media (min-width: 600px) {
            flex: 1 0;
        }
    }
}

.dh-cols.dh-cols--40-60-40 {
    flex-wrap: wrap;
    @media (min-width: 600px) {
        flex-wrap: nowrap;
    }
    & > div:nth-child(1) {
        width: 100%;
        @media (min-width: 600px) {
            flex: 1 0 calc(30% - var(--layout-gap));
        }
    }
    & > div:nth-child(2) {
        width: 100%;
        @media (min-width: 600px) {
            flex: 1 0 40%;
        }
    }
    & > div:nth-child(3) {
        width: 100%;
        @media (min-width: 600px) {
            flex: 1 0 calc(30% - var(--layout-gap));
        }
    }
}

.dh-cols.dh-cols--66-33 {
    flex-wrap: wrap;
    @media (min-width: 600px) {
        flex-wrap: nowrap;
    }
    & > div:first-child {
        width: 100%;
        @media (min-width: 600px) {
            flex: 1 0 calc(66% - var(--layout-gap));
        }
    }
    & > div:last-child {
        width: 100%;
        @media (min-width: 600px) {
            flex: 1 0 33%;
        }
    }
}

.dh-cols.dh-cols--33-66 {
    flex-wrap: wrap;
    @media (min-width: 600px) {
        flex-wrap: nowrap;
    }
    & > div:first-child {
        width: 100%;
        @media (min-width: 600px) {
            flex: 1 0 33%;
        }
    }
    & > div:last-child {
        width: 100%;
        @media (min-width: 600px) {
            flex: 1 0 calc(66% - var(--layout-gap));
        }
    }
}

/*
.dh-section + .dh-section {
    margin-top: var(--layout-gap);
}
*/

/* ============================================
    ARTICLE ATOMIC CARDS
    rules from blockcraft/src/blocks/blockcraft-article/style-index.css
*/

/* main article rules */
.bc-article {
    margin-bottom: var(--wp--preset--spacing--40);
    & > .block-group {
        gap: var(--wp--preset--spacing--40);
    }
    &.bc-featured {
        img {
            aspect-ratio: 16 / 9 !important;
        }
    }
    h2,
    p {
        margin: 0;
    }
    .bc-single-category {
        color: var(--wp--preset--color--secondary);
        a {
            color: var(--wp--preset--color--secondary);
            &:hover {
                border-color: var(--wp--preset--color--white);
            }
        }
    }
    ul {
        margin: 0;
        padding: 0;
        list-style-type: none;
        display: flex;
        gap: var(--wp--preset--spacing--20);
        /*
        li::after {
            content: ", ";
        }
        li:last-child::after {
            content: "";
        }
        */
    }
    img {
        display: block;
        width: 100%;
        object-fit: cover;
    }
    .bc-single-date {
        font-family: "Archivo Narrow", sans-serif;
    }
}

.bc-article--warning {
    color: red;
    background: #ebeef0;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    padding: 20px 0;
    text-align: center;
}

/* card-inline-small */
.bc-card.bc-card--inline.bc-card--small {
    .block-group {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: center;
        & > .block-group {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: var(--wp--preset--spacing--40);
            width: 66.33%;
        }
        & > a {
            width: 33.34%;
        }
    }
    h2 {
        font-size: var(--wp--preset--font-size--large);
    }
    img {
        aspect-ratio: 1 / 1;
        width: 100%;
        height: auto;
        object-fit: cover;
    }
    .bc-single-category {
        font-size: var(--wp--preset--font-size--x-small);
    }
    .bc-single-date {
        font-size: var(--wp--preset--font-size--x-small);
    }
}

/* card-inline-medium */
.bc-card.bc-card--inline.bc-card--medium {
    .block-group {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        align-items: center;
        @media (min-width: 600px) {
            flex-wrap: nowrap;
        }
        & > .block-group {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: var(--wp--preset--spacing--40);
            width: 100%;
            @media (min-width: 600px) {
                width: 50%;
            }
        }
        & > a {
            width: 100%;
            @media (min-width: 600px) {
                width: 50%;
            }
        }
    }
    h2 {
        font-size: var(--wp--preset--font-size--large);
    }
    img {
        aspect-ratio: 1 / 1;
        width: 100%;
        height: auto;
        object-fit: cover;
    }
    .bc-single-category {
        font-size: var(--wp--preset--font-size--x-small);
    }
    .bc-single-date {
        font-size: var(--wp--preset--font-size--x-small);
    }
}

/* card-inline-small-flipped */
.bc-card.bc-card--inline.bc-card--small.bc-card-flipped {
    .block-group {
        justify-content: space-between;
        & > .block-group {
            width: 66.33%;
        }
        & > a {
            width: 33.34%;
        }
    }
    .bc-single-date {
        font-size: var(--wp--preset--font-size--x-small);
    }
    img {
        aspect-ratio: 1 / 1;
        width: 100%;
        height: auto;
        object-fit: cover;
    }
}

/* card-overlay-medium */
.bc-card.bc-card--overlay.bc-card--medium {
    height: 100%;
    .block-group {
        display: flex;
        flex-direction: column;
        color: var(--wp--preset--color--white);
    }
    .wp-block-cover {
        height: 100%;
        position: relative;
        &::before {
            content: "";
            position: absolute;
            inset: 0;
            background: #000;
            opacity: 0.2;
        }
        .wp-block-cover__inner-container {
            position: absolute;
            inset: 0;
            display: flex;
            flex-direction: column;
            justify-content: center;
            margin-left: var(--wp--preset--spacing--40);
            width: calc(100% - (var(--wp--preset--spacing--40) * 2));
        }
        img {
            display: block;
            width: 100%;
        }
    }
    a {
        color: var(--wp--preset--color--white);
        &:hover {
            border-color: var(--wp--preset--color--white);
        }
    }
    h2 {
        font-size: var(--wp--preset--font-size--4-x-large);
    }
    .bc-single-category {
        font-size: var(--wp--preset--font-size--small);
    }
    .bc-single-author {
        font-size: var(--wp--preset--font-size--x-small);
        display: flex;
        align-items: center;
        a {
            display: block;
            &:nth-child(1) {
                order: 2;
            }
            &:nth-child(2) {
                order: 1;
            }
        }
    }
}

/* card-stack-medium */
.bc-card.bc-card--stack.bc-card--medium {
    .block-group {
        display: flex;
        flex-direction: column;
    }
    h2 {
        font-size: var(--wp--preset--font-size--4-x-large);
    }
    p {
        font-size: var(--wp--preset--font-size--large);
    }
    img {
        aspect-ratio: 16 / 9;
        width: 100%;
        height: auto;
        object-fit: cover;
    }
    .bc-single-category {
        font-size: var(--wp--preset--font-size--small);
    }
    .bc-single-author {
        font-size: var(--wp--preset--font-size--x-small);
        display: flex;
        align-items: center;
        a {
            display: block;
            &:nth-child(1) {
                order: 2;
            }
            &:nth-child(2) {
                order: 1;
            }
        }
    }
    .bc-single-date {
        font-size: var(--wp--preset--font-size--x-small);
    }
}

/* card-text-extrasmall */
.bc-card.bc-card--text.bc-card--extrasmall {
    display: flex;
    flex-direction: column;
    h2 a {
        font-size: 20px;
    }
    .bc-single-category {
        font-size: var(--wp--preset--font-size--x-small);
    }
    .bc-single-author {
        font-size: var(--wp--preset--font-size--x-small);
        display: flex;
        align-items: center;
        a {
            display: block;
            &:nth-child(1) {
                order: 2;
            }
            &:nth-child(2) {
                order: 1;
            }
        }
    }
    .bc-single-date {
        font-size: var(--wp--preset--font-size--small) !important;
    }
}

/* card-stack-huge */
.bc-card.bc-card--stack.bc-card--huge {
    h2 {
        a {
            font-size: var(--font-size-huge);
            line-height: 1.2;
        }
    }
    img {
        aspect-ratio: 16 / 9 !important;
    }
    p {
        line-height: 1.5;
    }
}

/* card-inline-huge */
.bc-card.bc-card--inline.bc-card--huge {
    & > .block-group {
        display: block;
        @media (min-width: 600px) {
            display: flex;
            gap: calc(var(--layout-gap) * 3) !important;
        }
        & > * {
            flex: 1;
        }
        & > .block-group {
            flex-direction: column;
            justify-content: center;
            gap: var(--layout-gap) !important;
        }
    }
    img {
        aspect-ratio: auto;
    }
    h2 {
        a {
            font-size: 36px;
            font-weight: 700 !important;
        }
    }
    .bc-single-category {
        margin-top: var(--layout-gap);
        margin-bottom: 0;
        @media (min-width: 600px) {
            margin-top: 0;
            /*margin-bottom: var(--layout-gap);*/
        }
    }
    a.bc-button {
        font-family: "Archivo Narrow", sans-serif;
        font-weight: 600;
        font-size: 14px;
        text-transform: uppercase;
        width: 156px;
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--wp--preset--color--white) !important;
        border: 1px solid var(--wp--preset--color--white);
        &:hover {
            border: 1px solid var(--wp--preset--color--white) !important;
        }
        svg {
            fill: var(--wp--preset--color--white);
            width: 20px;
        }
    }
}

/* card-stack-small-video */
.bc-card.bc-card--stack.bc-card--small.bc-card--video {
    h2 {
        a {
            color: var(--wp--preset--color--white) !important;
            font-size: 22px;
        }
    }
    .bc-single-category {
        a:hover {
            color: var(--wp--preset--color--hover-secondary) !important;
        }
    }
}

/* card-inline-small-video */
.bc-card.bc-card--inline.bc-card--small.bc-card--video {
    h2 {
        a {
            color: var(--wp--preset--color--white) !important;
            font-size: 18px;
        }
    }
    a.bc-featured {
        position: relative;
        &::after {
            display: block;
            content: "";
            position: absolute;
            z-index: 1;
            width: 40px;
            height: 40px;
            background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTIwLjUgMzUuMzc2YTE1IDE1IDAgMSAwIDAtMzAuMDAyIDE1IDE1IDAgMCAwIDAgMzAuMDAybS0yLjAyOC0yMS42ODMgOS40MDYgNS4yMjZhMS42NjcgMS42NjcgMCAwIDEgMCAyLjkxNGwtOS40MDYgNS4yMjZhMiAyIDAgMCAxLTIuOTcyLTEuNzV2LTkuODY2YTIgMiAwIDAgMSAyLjk3Mi0xLjc1IiBmaWxsPSIjZmZmIi8+PC9zdmc+") !important;
            left: 6px;
            bottom: 6px;
            opacity: 1;
        }
    }
    .bc-single-category {
        a:hover {
            color: var(--wp--preset--color--hover-secondary) !important;
        }
    }
}

/* card-inline-small-podcast */
.bc-card.bc-card--inline.bc-card--small.bc-card--podcast {
    h2 {
        a {
            font-weight: 700 !important;
        }
    }
}

/* card-stack-small-photogallery */
.bc-card.bc-card--stack.bc-card--small.bc-card--photogallery {
    a.bc-featured {
        position: relative;
        &::after {
            display: block;
            content: "";
            position: absolute;
            z-index: 1;
            width: 30px !important;
            height: 30px !important;
            background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHZpZXdCb3g9IjAgMCAzMCAzMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHJ4PSIxNSIgZmlsbD0iIzAwMCIvPjxtYXNrIGlkPSJhIiBzdHlsZT0ibWFzay10eXBlOmFscGhhIiBtYXNrVW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4PSI1IiB5PSI1IiB3aWR0aD0iMjEiIGhlaWdodD0iMjAiPjxwYXRoIGZpbGw9IiNEOUQ5RDkiIGQ9Ik01LjAwMSA1aDIwdjIwaC0yMHoiLz48L21hc2s+PGcgbWFzaz0idXJsKCNhKSI+PHBhdGggZD0iTTE1IDE5LjU4M3ExLjU2MyAwIDIuNjU3LTEuMDkzIDEuMDkzLTEuMDk0IDEuMDkzLTIuNjU3dC0xLjA5My0yLjY1NlQxNSAxMi4wODN0LTIuNjU2IDEuMDk0cS0xLjA5NSAxLjA5NS0xLjA5NCAyLjY1NiAwIDEuNTYzIDEuMDk0IDIuNjU3UTEzLjQ0IDE5LjU4MyAxNSAxOS41ODNtMC0xLjY2NmEyIDIgMCAwIDEtMS40NzktLjYwNSAyIDIgMCAwIDEtLjYwNC0xLjQ3OXEwLS44NzQuNjA0LTEuNDc5YTIgMiAwIDAgMSAxLjQ4LS42MDRxLjg3NCAwIDEuNDc5LjYwNC42MDQuNjA0LjYwNCAxLjQ4IDAgLjg3NC0uNjA0IDEuNDc5YTIgMiAwIDAgMS0xLjQ4LjYwNE04LjMzNCAyMi41cS0uNjg4IDAtMS4xNzctLjQ5YTEuNiAxLjYgMCAwIDEtLjQ5LTEuMTc3di0xMHEwLS42ODcuNDktMS4xNzcuNDg5LS40OSAxLjE3Ny0uNDloMi42MjVMMTIuNSA3LjVoNWwxLjU0MiAxLjY2N2gyLjYyNXEuNjg3IDAgMS4xNzcuNDkuNDkuNDg5LjQ5IDEuMTc2djEwcTAgLjY4OC0uNDkgMS4xNzd0LTEuMTc3LjQ5eiIgZmlsbD0iI0VCRUJFQiIvPjwvZz48L3N2Zz4=") !important;
            left: 6px;
            bottom: 6px;
            opacity: 1;
        }
    }
}

/* ============================================
    OVERWRITE ATOMIC CARD RULES (ARTICLES)
*/

.bc-article {
    .bc-single-category {
        font-family: "Archivo Narrow", sans-serif;
        margin-bottom: calc(var(--layout-gap) / 2);
        li {
            font-size: 14px;
            color: var(--wp--preset--color--secondary) !important;
            font-weight: 700 !important;
        }
        a {
            color: var(--wp--preset--color--secondary) !important;
            font-size: 14px;
            &:hover {
                color: var(--wp--preset--color--hover-secondary) !important;
            }
        }
    }
    h2 {
        a {
            font-size: 16px;
            font-weight: 500 !important;
            line-height: 1.4;
            display: block;
            -webkit-box-orient: unset;
            -webkit-line-clamp: unset !important;
            line-clamp: unset !important;
        }
    }
    .block-group {
        display: flex;
        gap: calc(var(--layout-gap) / 2) !important;
    }
    & > a > img {
        margin-bottom: var(--layout-gap) !important;
    }
    .bc-single-author p {
        /*font-weight: 700 !important;*/
        font-family: "Archivo Narrow", sans-serif;
        font-style: normal !important;
    }
}

.bc-article.bc-card--stack.bc-card--small {
    h2 {
        a {
            font-size: 26px;
        }
    }
}

.bc-article.bc-card--inline.bc-card--small {
    h2 {
        a {
            font-size: 18px;
            -webkit-line-clamp: 2 !important;
            line-clamp: 2 !important;
        }
    }
}

/* ============================================
    LIVE EVENT ARTICLE
*/

.bc-article.live {
    .bc-single-category {
        position: relative;
        & > ul {
            display: inline-block;
        }
        &::before {
            content: "IN DIRETTA";
            display: inline-block;
            font-size: var(--wp--preset--font-size--x-small);
            background: var(--live-background-color);
            color: white;
            font-weight: 700;
            padding: 5px 8px;
            margin-right: 6px;
            border-radius: 2px;
            padding-left: 20px;
        }
        &::after {
            content: "";
            position: absolute;
            top: 50%;
            left: 8px;
            transform: translateY(-50%) !important;
            width: 4px;
            height: 4px;
            background: #fff;
            border-radius: 50%;
            animation: pulse 1.5s infinite;
        }
    }
}

@keyframes pulse {
    0% {
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateY(-50%) scale(1.6);
        opacity: 0.3;
    }
    100% {
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }
}

/* ============================================
    SPONSORED ARTICLE
*/

.bc-article.sponsored {
    overflow: hidden;
    .bc-single-sponsor {
        display: flex;
        gap: calc(var(--bc-block-article-gap) / 2);
        align-items: center;
        p {
            margin-top: 0 !important;
            font-size: var(--wp--preset--font-size--x-small);
            text-decoration: underline;
        }
        span {
            height: 30px;
        }
        img {
            width: 100% !important;
            height: 100% !important;
            object-fit: cover !important;
            aspect-ratio: auto !important;
        }
    }
}

.bc-article.bc-card--stack.sponsored {
    outline: 1px solid var(--sponsored-border-color);
    & > * {
        padding-left: var(--sponsored-padding);
        padding-right: var(--sponsored-padding);
    }
    & > *:first-child {
        padding-top: var(--sponsored-padding);
    }
    & > *:last-child {
        padding-bottom: var(--sponsored-padding);
    }
}
.bc-article.bc-card--inline.sponsored {
    outline: 1px solid var(--sponsored-border-color);
    & > * {
        padding-left: var(--sponsored-padding);
        padding-right: var(--sponsored-padding);
    }
    & > *:first-child {
        padding-top: var(--sponsored-padding);
    }
    & > *:last-child {
        padding-bottom: var(--sponsored-padding);
    }
}

/* ============================================
    SPECIAL ARTICLE
*/

.bc-article.bc-special {
    background: var(--wp--preset--color--black);
    padding: calc(var(--layout-gap) * 1.5) var(--layout-gap);
    & > .block-group {
        display: block;
        @media (min-width: 600px) {
            display: flex;
            gap: calc(var(--layout-gap) * 3) !important;
        }
        & > .block-group {
            flex-direction: column;
            justify-content: center;
            gap: var(--layout-gap) !important;
            p {
                margin-top: var(--layout-gap);
                @media (min-width: 600px) {
                    margin-top: 0;
                }
            }
        }
        & > * {
            flex: 1 !important;
        }
    }
    img {
        aspect-ratio: auto;
    }
    p {
        color: var(--wp--preset--color--white);
        font-family: "Archivo Narrow", sans-serif;
    }
    h2 {
        a {
            color: var(--wp--preset--color--white) !important;
            font-size: 36px;
            font-weight: 700 !important;
            &:hover {
                color: var(--wp--preset--color--white) !important;
            }
        }
    }
}

/* ============================================
    BANNER
*/

.static-banner-masthead {
    text-align: center;
}

/* ============================================
    SWIPER
*/

.dh-swiper-container {
    position: relative;
    @media (min-width: 600px) {
        padding: 0 40px;
    }
    .swiper-button-next,
    .swiper-button-prev {
        color: var(--wp--preset--color--custom-1);
        &::after {
            font-size: 26px;
        }
    }
    .swiper-button-next {
        right: -16px;
        display: none;
        @media (min-width: 600px) {
            display: block;
        }
    }
    .swiper-button-prev {
        left: 0;
        display: none;
        @media (min-width: 600px) {
            display: block;
        }
    }
}

.dh-swiper {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.dh-swiper.dh-swiper--elite-authors {
    .swiper-slide {
        width: 80%;
        @media (min-width: 768px) {
            width: 28%;
        }
    }
}

/* ============================================
    HACK
*/

/* force inline template on mobile */
.dh-force-inline-on-mobile {
    @media (max-width: 599px) {
        .bc-article {
            display: flex;
            gap: 1rem;
            align-items: center;
            margin: 1rem 0;
            & h2 {
                line-height: normal;
            }
            & h2 > a {
                font-size: var(--wp--preset--font-size--medium) !important;
            }
            & > a {
                width: 145px;
                min-width: 145px;
                aspect-ratio: 16 / 9;
            }
            & > .block-group {
                width: calc(66.66% - (var(--bc-article-margin) / 2));
                display: flex;
                flex-direction: column;
                align-items: flex-start;
                justify-content: center;
                gap: calc(var(--bc-article-margin) / 4) !important;
            }
            .bc-single-category {
                margin: 0;
                font-size: var(--wp--preset--font-size--x-small);
                @media (min-width: 600px) {
                    font-size: var(--wp--preset--font-size--small);
                }
            }
            .bc-single-author a {
                display: flex;
                p {
                    font-size: var(--wp--preset--font-size--x-small);
                    @media (min-width: 600px) {
                        font-size: var(--wp--preset--font-size--small);
                    }
                }
            }
        }
    }
}

/* force inline template on mobile */
.dh-force-inline-on-mobile {
    @media (max-width: 599px) {
        .bc-article.sponsored {
            & > * {
                padding-left: 0;
                padding-right: 0;
            }
            & > *:first-child {
                padding-top: var(--sponsored-padding);
                padding-bottom: var(--sponsored-padding);
                padding-left: var(--sponsored-padding);
            }
            & > *:last-child {
                margin-top: 0;
                padding-top: var(--sponsored-padding);
                padding-bottom: var(--sponsored-padding);
                padding-right: var(--sponsored-padding);
            }
        }
    }
}

/* force horizontal overflow on mobile */
.dh-force-overflow-on-mobile .dh-cols {
    @media (max-width: 599px) {
        overflow-x: auto;
        display: flex;
        flex-wrap: nowrap;
        gap: var(--bc-article-margin);
        & > * {
            flex: 0 0 auto;
            width: 330px;
        }
    }
}
