/* Homepage blocks styles - Extracted from front-page.php for better performance */

.sec-stile-2 {
    padding: 40px 0;
}

.sec-stile-2 .post-item h2 a {
    color: #ffffff;
}

.sec-stile-2 .section-left {
    width: 75%;
}

.sec-stile-2 .section-left {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    padding-right: 20px;
    gap: 20px;
    border-right: 1px solid #e0e0e0;
}

.sec-stile-2 .section-left .post-item {
    display: flex;
    flex-direction: column;
    width: calc(33.33% - 15px);
    border-top: none;
}

.sec-stile-2 .section-left .post-item h2 {
    font-family: var(--title-font), serif;
    font-size: 1.5rem;
    padding-left: 0;
}

.sec-stile-2 .section-left .post-item .post-thumbnail {
    width: 100%;
}

.sec-stile-2 .section-left .post-item .post-thumbnail img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.sec-stile-2 .section-left .post-item:first-child {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    border-bottom: 1px solid #e0e0e0;
}

.sec-stile-2 .section-left .post-item:nth-child(2),
.sec-stile-2 .section-left .post-item:nth-child(3),
.sec-stile-2 .section-left .post-item:nth-child(4) {
    padding: 0;
}

.sec-stile-2 .section-left .post-item .post-thumbnail {
    margin-bottom: 10px;
}

.sec-stile-2 .section-left .post-item:first-child .post-thumbnail {
    order: 2;
    width: calc(66.66%);
    margin-bottom: 0;
}

.sec-stile-2 .section-left .post-item:first-child .post-thumbnail img {
    width: 100%;
    max-width: unset;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.sec-stile-2 .section-left .post-item:first-child .main-post-container {
    order: 1;
    width: 33.33%;
    padding-right: 20px;
    box-sizing: border-box;
}

.sec-stile-2 .section-left .post-item:first-child .main-post-container .post-content {
    color: white;
}

.sec-stile-2 .section-right {
    padding-left: 20px;
}

.sec-stile-2 .section-right h2 {
    font-family: var(--title-font), serif;
    padding-left: 0;
}

.sec-stile-2 .section-right .post-item .post-thumbnail {
    display: none;
}

.section .post-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 15px 0;
    border-top: 1px solid #e0e0e0;
}

.section .post-item h2 {
    font-family: var(--title-font), serif;
    font-size: 1.125rem;
    line-height: 1.1;
    margin: 0;
    padding-left: 10px;
}

.section .post-item h2 a {
    color: black;
}

img {
    width: 100%;
    height: auto;
}

.section .post-item .post-thumbnail img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    max-width: unset;
    border-radius: 10px;
}

.sec-stile-1 .section-block-left .sec-1-left .post-item:first-child,
.sec-stile-1 .section-block-middle .sec-1-middle .post-item:first-child {
    flex-direction: column;
    padding-top: 0;
    border-top: none;
}

.sec-stile-1 .section-block-left .sec-1-left .post-item:nth-child(2) {
    border-top: none;
}

.sec-stile-1 .section-block-left .sec-1-left .post-item:first-child h2,
.sec-stile-1 .section-block-left .sec-1-middle .post-item h2 {
    font-family: var(--title-font), serif;
    font-size: 1.5rem;
    padding-left: 0;
}

.sec-stile-1 .section-block-middle .sec-1-middle .post-item:first-child h2 {
    padding-left: 0;
    font-size: 2rem;
}

.sec-stile-2 .section-left .post-item h2 a, .sec-stile-2 .section-right .post-item h2 a {
    color: #ffffff;
}

.sec-stile-1 .section-block-middle .sec-1-middle .post-item .post-content {
    width: 100%;
}

.sec-stile-1 .section-block-left .sec-1-left .post-item:first-child .post-thumbnail,
.sec-stile-1 .section-block-middle .sec-1-middle .post-item:first-child .post-thumbnail {
    width: 100%;
    aspect-ratio:
}

.sec-stile-1 .section-block-left .sec-1-left .post-item:first-child img,
.sec-stile-1 .section-block-middle .sec-1-middle .post-item:first-child img {
    width: 100%;
    height: auto;
    margin-bottom: 10px;
}

.sec-stile-2 .section-right .post-item:first-child {
    display: flex;
    flex-direction: column;
    border-top: none;
}

.sec-stile-2 .section-right .post-item:first-child .post-thumbnail {
    width: 100%;
    display: block;
    margin-bottom: 10px;
}

.sec-stile-2 .section-right .post-item:first-child .post-thumbnail img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.sec-stile-1 .section-block-left {
    width: 25%;
    border-right: 1px solid;
    padding-right: 20px;
}

.sec-stile-1 .section-block-middle {
    width: 50%;
    padding: 0 20px;
}

.sec-stile-1 .sec-1-middle .post-thumbnail img, .sec-stile-1 .sec-1-left .post-item:first-child .post-thumbnail img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.sec-stile-1 .section-block-right {
    width: 25%;
    border-left: 1px solid;
    padding-left: 20px;
}

.sec-stile-1 .section-block-middle .sec-1-middle .post-item:nth-child(2) {
    border-top: 1px solid;
}

.sec-stile-1 .section-block-left .sec-1-left .post-item:first-child {
    padding-bottom: 20px;
    border-bottom: 1px solid;
}

.section .sec-stile-1 {
    display: flex;
    flex-direction: row;
    border-bottom: 1px solid;
    margin: 20px;
    padding-bottom: 20px;
    gap: 0;
}

.sec-stile-2 .section-left {
    width: 75%;
    padding-right: 20px;
}

.sec-stile-2 .section-right {
    width: calc(25% - 15px);
    padding-left: 20px;
}

.section .sec-stile-2 {
    display: flex;
    flex-direction: row;
    margin: 20px;
    gap: 0;
}

.post-date-badge, .post-category-badge {
    display: inline-block;
    font-size: 0.8em;
    padding: 3px 8px;
    margin-right: 8px;
    margin-bottom: 5px;
    border-radius: 3px;
    text-decoration: none;
    font-weight: 500;
}

.post-category-badge {
    background-color: var(--primary-color, #bb1919);
    color: white;
}

.post-category-badge a {
    color: white !important;
    text-decoration: none;
}

.post-date-badge {
    background-color: #6c757d;
    color: white;
}

.list-item-badges {
    margin-bottom: 8px;
}

.post-date {
    font-size: 1.2em;
    font-weight: bold;
    margin: 20px 0 15px 0;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--primary-color, #bb1919);
    color: var(--primary-color, #bb1919);
}

@media (max-width: 767px) {
    .sec-stile-2 .section-left {
        order: 2;
        padding-right: 0;
        padding: 20px 0;
    }

    .sec-stile-2 .section-right {
        order: 1;
        padding-left: 0;
        padding-bottom: 20px;
    }
}

@media (max-width: 767px) {
    .sec-stile-1 .section-block-left {
        border-right: none;
        padding-right: 0;
        padding: 20px 0;
        order: 2;
        border-bottom: 1px solid;
    }

    .sec-stile-1 .section-block-middle {
        padding: 0;
        order: 1;
        padding-bottom: 20px;
        border-right: 0;
        border-bottom: 1px solid;
    }
}

.ribbon-container {
    overflow: hidden;
}

.ribbon-rail {
    padding: 20px 20px 70px 20px;
    margin-right: -40px;
    overflow: hidden;
}

.ribbon-rail .slick-list::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 200px;
    background: linear-gradient(to left, rgba(255, 255, 255, 1) 20%, rgba(255, 255, 255, 0) 80%);
    pointer-events: none;
}

.ribbon-rail .slick-prev, .ribbon-rail .slick-next {
    position: absolute;
    bottom: 20px;
    right: 100px;
    border-radius: 0 !important;
    background-color: var(--primary-color, #bb1919) !important;
}

.ribbon-rail .slick-next {
    right: 70px;
}

.ribbon-rail .slick-prev,
.ribbon-rail .slick-next {
    background-color: #333;
    color: #fff;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.ribbon-rail .slick-prev:hover,
.ribbon-rail .slick-next:hover {
    background-color: #555;
}

.ribbon-rail .carousel-item {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    aspect-ratio: 1 / 1;
}

.ribbon-rail .slick-slide {
    margin-right: 15px;
}

@media (max-width: 767px) {
    .section .sec-stile-1, .section .sec-stile-2 {
        flex-direction: column;
    }

    .sec-stile-1 .section-block-left, .sec-stile-1 .section-block-middle, .sec-stile-1 .section-block-right, .sec-stile-2 .section-left, .sec-stile-2 .section-right {
        width: 100%;
    }

    .sec-stile-2 .section-left {
        padding-left: 0;
        padding-right: 0;
        flex-direction: column;
        border-right: none;
    }

    .sec-stile-2 .section-left .post-item {
        width: 100%;
        padding: 10px 0 !important;
    }

    .sec-stile-2 .section-left .post-item:first-child {
        flex-direction: column;
        padding-bottom: 20px;
        margin-bottom: 20px;
    }

    .sec-stile-2 .section-left .post-item .post-thumbnail {
        width: 100%;
    }

    .sec-stile-2 .section-left .post-item:first-child .post-thumbnail {
        order: 1;
        width: 100%;
    }

    .sec-stile-2 .section-left .post-item:first-child .main-post-container {
        order: 2;
        width: 100%;
    }

    .sec-stile-1 .section-block-right {
        padding-left: 0;
        border-left: none;
        order: 3;
    }

    .sec-stile-2 .section-right {
        padding-left: 0;
    }

    .ribbon-rail .slick-slide {
        margin-right: 5px;
    }
}

@media (min-width: 768px) {
    .sec-stile-1 .section-block-middle .sec-1-middle .post-item:not(:first-child) .post-thumbnail {
        order: 2;
    }

    .sec-stile-1 .section-block-middle .sec-1-middle .post-item:not(:first-child) .post-thumbnail img {
        height: 110px;
        width: auto;
        aspect-ratio: 16 / 9;
        object-fit: cover;
    }
}
