/*
 * Custom CSS
 * Add your custom styles here
 * This file is loaded after all theme styles
 */

/* Prevent horizontal overflow on mobile */
/* html, body {
    overflow-x: hidden !important;
} */

/* Topbar and Navbar */
.topbar, .navbar {
    z-index: 1000 !important;
}

/* Content Section - Remove padding (only on homepage) */
.home .content-section{
    padding: 0px !important;
}

/* Home Post Grid Button */
 div.home-post-grid .vc_btn3{
     background: #1F73BE !important;
 }

/* Home Image Carousel - Center text vertically over images */
.home-image-carousel {
    position: relative;
    overflow: hidden;
}

.home-image-carousel .wpb_images_carousel,
.home-image-carousel .wpb_wrapper {
    margin: 0 !important;
    padding: 0 !important;
}

.home-image-carousel .vc_slide {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
}

.home-image-carousel .vc_carousel-inner {
    margin: 0 !important;
    padding: 0 !important;
}

.home-image-carousel .vc_carousel-slideline {
    margin: 0 !important;
    padding: 0 !important;
}

.home-image-carousel .wpb_text_column {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    width: 100%;
    text-align: center;
    z-index: 1;
}

.home-image-carousel .wpb_text_column h1,
.home-image-carousel .wpb_text_column p {
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Home Image Carousel - Responsive font sizes for carousel text */
.home-image-carousel .wpb_text_column h1{
    font-size: 75px;
}

.home-image-carousel .wpb_text_column p{
    font-size: 25px;
}

/* Home Image Carousel - Tablet adjustments */
@media only screen and (max-width: 1024px) and (min-width: 768px) {
    .home-image-carousel .wpb_text_column h1 {
        font-size: 55px;
    }
    
    .home-image-carousel .wpb_text_column p {
        font-size: 20px;
    }
}

/* Home Image Carousel - Mobile adjustments */
@media only screen and (max-width: 767px) {
    .home-image-carousel .wpb_text_column h1 {
        font-size: 32px;
    }
    
    .home-image-carousel .wpb_text_column p {
        font-size: 16px;
    }
}

/* Home Image Carousel - Allow clicks on interactive elements */
.home-image-carousel .wpb_text_column a:not(.carousel-btn),
.home-image-carousel .wpb_text_column button,
.home-image-carousel .wpb_text_column input,
.home-image-carousel .wpb_text_column [onclick] {
    pointer-events: auto;
    position: relative;
    z-index: 11;
}

/* Home Image Carousel - Carousel button hover effect */
.home-image-carousel .wpb_text_column a.carousel-btn,
.home-image-carousel .wpb_text_column .carousel-btn {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 11 !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    vertical-align: middle !important;
    float: none !important;
    clear: none !important;
    margin: 0 12px !important;
}

.home-image-carousel .wpb_text_column .carousel-btn:hover {
    background-color: #3a5a8a !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Home Image Carousel - Hide hardcoded "LA MAPPA" link in hero slider */
.main-slider .slide-inner a[href*="sentieroitaliamappe.cai.it"] {
    display: none !important;
}

/* Home Image Carousel - Hide navigation arrows in hero slider */
.main-slider .button-prev,
.main-slider .button-next {
    display: none !important;
}

/* Home Events Content - Add padding */
.home-events-content{
    padding: 0px 340px 0px 340px;
}

/* Home Events Content - Mobile and Tablet padding */
@media only screen and (max-width: 1024px) {
    .home-events-content{
        padding: 20px;
    }
}

/* Custom styles for Contact Form 7 validation messages */
.wpcf7-not-valid-tip {
    background-color: white;
    padding: 3px;
}

/* MEC Single Sidebar - Force all divs to 100% width */
.mec-single-event .sidebar.widget-area div,
.mec-wrap .sidebar.widget-area div {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box;
}

/* Post Single Sidebar - Force all divs to 100% width (same as MEC) */
.single-post .sidebar.widget-area div,
.single .sidebar.widget-area div {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box;
}

/* SICAI Project Single Sidebar - Force all divs to 100% width (same as MEC) */
.single-sicai_project .sidebar.widget-area div {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box;
}

/* MEC Events Meta Group Tags - Add margin bottom with more specific selectors */
.mec-single-event .mec-events-meta-group-tags,
.single-sicai_project .mec-events-meta-group-tags,
.mec-wrap .mec-events-meta-group-tags,
.mec-events-meta-group.mec-events-meta-group-tags,
div.mec-events-meta-group-tags,
body .mec-events-meta-group-tags {
    margin-bottom: 20px !important;
}

/* MEC Sidebar - Remove margin bottom and padding left */
.sidebar.widget-area {
    margin-bottom: 30px;
}

@media only screen and (max-width: 767px) {
    .sidebar.widget-area{
        margin-top: 0px;
        padding-left: 0px;
    }
}
/* MEC Calendar - Remove min-height in event page*/
.mec-event-calendar-classic .mec-calendar-side .mec-calendar-table {
    min-height: 0px;
}

/* MEC Container - Remove width on mobile */
@media only screen and (max-width: 767px) {
    .mec-container {
        width: 100%;
    }
}

/* Hide "Parti con noi" map widget on taxonomy-mec-category pages (Regioni) - handled via PHP filter */
/* Mappa Italia - Style for sidebar (same as MEC sidebar) */
.sidebar.widget-area .mappa_italia,
.sidebar .mappa_italia,
.col-lg-4 .mappa_italia,
.taxonomy-mec-category .col-lg-4 .mappa_italia {
    width: 100% !important;
    display: block !important;
    margin-bottom: 50px !important;
    background: #fff !important;
    padding: 30px !important;
    padding-top: 0 !important;
    border: 1px solid #e2e2e2 !important;
    position: relative !important;
    box-shadow: 6px 6px 0 #f5f5f5 !important;
}

/* Mappa Italia - Style for h3 title (same as MEC sidebar) */
.sidebar.widget-area .mappa_italia h3,
.sidebar .mappa_italia h3,
.col-lg-4 .mappa_italia h3,
.taxonomy-mec-category .col-lg-4 .mappa_italia h3 {
    width: 100% !important;
    display: block !important;
    border-bottom: 4px solid #eee !important;
    line-height: 1 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    padding: 25px 0 !important;
    padding-top: 30px !important;
    margin-bottom: 25px !important;
    color: #0b0b0b !important;
    position: relative !important;
}

.sidebar.widget-area .mappa_italia h3:after,
.sidebar .mappa_italia h3:after,
.col-lg-4 .mappa_italia h3:after,
.taxonomy-mec-category .col-lg-4 .mappa_italia h3:after {
    content: "" !important;
    width: 70px !important;
    height: 4px !important;
    background: #fbc50b !important;
    position: absolute !important;
    left: 0 !important;
    bottom: -4px !important;
}

/* Post Grid - Hide loader and show "Nessun articolo trovato" message when no posts */
.post-grid .vc_grid-loading {
    display: none !important;
}

.post-grid-empty-message {
    text-align: center ;
    padding: 40px 20px ;
    color: #666 ;
    font-size: 16px ;
    font-weight: normal t;
    margin: 20px 0 ;
}

/* Single Post - Align with MEC Events structure */
.single-post.mec-single-event,
.single-sicai_project .blog-post.mec-single-event {
    margin-bottom: 40px;
}

.single-post .mec-events-event-image,
.single-sicai_project .mec-events-event-image {
    margin-bottom: 0px;
    width: 100%;
}

.single-post .mec-events-event-image img,
.single-sicai_project .mec-events-event-image img {
    width: 100%;
    height: auto;
    display: block;
}

.single-post .mec-event-content,
.single-sicai_project .mec-event-content {
    margin-bottom: 30px;
}

.single-post .mec-single-title,
.single-sicai_project .mec-single-title {
    font-size: 32px;
    font-weight: 700;
    margin-top: 30px;
    margin-bottom: 20px;
    line-height: 1.3;
}

.single-post .mec-single-event-description,
.single-sicai_project .mec-single-event-description {
    margin-bottom: 30px;
}

.single-post .post-date,
.single-sicai_project .post-date {
    display: block !important;
    float: none !important;
    margin-top: 0 !important;
    margin-left: 0 !important;
    margin-bottom: 15px !important;
    margin-right: 0 !important;
    color: #fff !important;
    background: var(--color-second) !important;
    padding: 0 15px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    height: 26px !important;
    line-height: 28px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    width: auto !important;
    clear: both !important;
}

/* Single Post - Gallery Styles */
.single-post .mec-events-meta-group-gallery,
.single-sicai_project .mec-events-meta-group-gallery,
.mec-single-event .mec-events-meta-group-gallery,
.mec-wrap .mec-events-meta-group-gallery {
    margin-bottom: 40px;
    padding-top: 30px;
    border-top: 1px solid #e2e2e2;
}

.single-post .mec-events-meta-group-gallery .mec-events-single-section-title,
.single-sicai_project .mec-events-meta-group-gallery .mec-events-single-section-title,
.mec-single-event .mec-events-meta-group-gallery .mec-events-single-section-title,
.mec-wrap .mec-events-meta-group-gallery .mec-events-single-section-title {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 4px solid #eee;
    position: relative;
    color: #0b0b0b;
}

.single-post .mec-events-meta-group-gallery .mec-events-single-section-title:after,
.single-sicai_project .mec-events-meta-group-gallery .mec-events-single-section-title:after,
.mec-single-event .mec-events-meta-group-gallery .mec-events-single-section-title:after,
.mec-wrap .mec-events-meta-group-gallery .mec-events-single-section-title:after {
    content: "";
    width: 70px;
    height: 4px;
    background: #fbc50b;
    position: absolute;
    left: 0;
    bottom: -4px;
}

.single-post .mec-gallery-grid,
.single-sicai_project .mec-gallery-grid,
.mec-single-event .mec-gallery-grid,
.mec-wrap .mec-gallery-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.single-post .mec-gallery-item,
.single-sicai_project .mec-gallery-item,
.mec-single-event .mec-gallery-item,
.mec-wrap .mec-gallery-item {
    width: calc(33.333% - 20px);
    margin: 0 10px 20px;
    position: relative;
}

.single-post .mec-gallery-item a,
.single-sicai_project .mec-gallery-item a,
.mec-single-event .mec-gallery-item a,
.mec-wrap .mec-gallery-item a {
    display: block;
    width: 100%;
    overflow: hidden;
    border-radius: 4px;
}

.single-post .mec-gallery-item img,
.single-sicai_project .mec-gallery-item img,
.mec-single-event .mec-gallery-item img,
.mec-wrap .mec-gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.single-post .mec-gallery-item:hover img,
.single-sicai_project .mec-gallery-item:hover img,
.mec-single-event .mec-gallery-item:hover img,
.mec-wrap .mec-gallery-item:hover img {
    transform: scale(1.05);
}

@media only screen and (max-width: 768px) {
    .single-post .mec-gallery-item,
    .single-sicai_project .mec-gallery-item,
    .mec-single-event .mec-gallery-item,
    .mec-wrap .mec-gallery-item {
        width: calc(50% - 20px);
    }
}

@media only screen and (max-width: 480px) {
    .single-post .mec-gallery-item,
    .single-sicai_project .mec-gallery-item,
    .mec-single-event .mec-gallery-item,
    .mec-wrap .mec-gallery-item {
        width: calc(100% - 20px);
    }
}

/* Single Post - Taxonomies Styles */
.single-post .mec-events-meta-group-taxonomies,
.single-sicai_project .mec-events-meta-group-taxonomies {
    margin-bottom: 40px;
    padding-top: 30px;
    border-top: 1px solid #e2e2e2;
}

.single-post .mec-single-event-category,
.single-sicai_project .mec-single-event-category {
    margin-bottom: 25px;
}

.single-post .mec-single-event-category i,
.single-sicai_project .mec-single-event-category i {
    margin-right: 10px;
    color: #666;
}

.single-post .mec-single-event-category dt,
.single-sicai_project .mec-single-event-category dt {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
    color: #0b0b0b;
}

.single-post .mec-single-event-category dl,
.single-sicai_project .mec-single-event-category dl {
    margin: 0;
    padding: 0;
}

.single-post .mec-single-event-category dd,
.single-sicai_project .mec-single-event-category dd {
    margin: 0 0 10px 0;
    padding: 0;
}

.single-post .mec-events-event-categories a,
.single-sicai_project .mec-events-event-categories a {
    display: inline-block;
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.single-post .mec-events-event-categories a:hover,
.single-sicai_project .mec-events-event-categories a:hover {
    color: #009a4e;
}

.single-post .mec-events-meta-group-tags,
.single-sicai_project .mec-events-meta-group-tags {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e2e2;
    font-size: 14px;
}

.single-post .mec-events-meta-group-tags a,
.single-sicai_project .mec-events-meta-group-tags a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.single-post .mec-events-meta-group-tags a:hover,
.single-sicai_project .mec-events-meta-group-tags a:hover {
    color: #009a4e;
}

/* Post Single Sidebar Items, Press Review, Ambassador Award & SICAI Project Single Sidebar Widget Styles - Match MEC Events style */
/* Widget container - same as sidebar widgets */
.seodo_post_single_sidebar_widget-class,
.seodo_press_review_single_sidebar_widget-class,
.seodo_ambassador_award_single_sidebar_widget-class,
.seodo_sicai_project_single_sidebar_widget-class {
    width: 100% !important;
    display: block !important;
    margin-bottom: 50px !important;
    background: #fff !important;
    padding: 30px !important;
    padding-top: 0 !important;
    border: 1px solid #e2e2e2 !important;
    position: relative !important;
    box-shadow: 6px 6px 0 #f5f5f5 !important;
}

/* Match MEC single event category style - same as in MEC sidebar */
.seodo_post_single_sidebar_widget-class .mec-single-event-category,
.seodo_press_review_single_sidebar_widget-class .mec-single-event-category,
.seodo_ambassador_award_single_sidebar_widget-class .mec-single-event-category,
.seodo_sicai_project_single_sidebar_widget-class .mec-single-event-category {
    margin-bottom: 12px;
    background: #f7f7f7;
    padding: 12px 14px 8px;
    position: relative;
    vertical-align: baseline;
}

/* Only the first taxonomy (from top) has margin-top */
.seodo_post_single_sidebar_widget-class .mec-single-event-category:first-of-type,
.seodo_press_review_single_sidebar_widget-class .mec-single-event-category:first-of-type,
.seodo_ambassador_award_single_sidebar_widget-class .mec-single-event-category:first-of-type,
.seodo_sicai_project_single_sidebar_widget-class .mec-single-event-category:first-of-type {
    margin-top: 20px;
}

/* Align icon and label on the same line */
.seodo_post_single_sidebar_widget-class .mec-single-event-category i,
.seodo_press_review_single_sidebar_widget-class .mec-single-event-category i,
.seodo_ambassador_award_single_sidebar_widget-class .mec-single-event-category i,
.seodo_sicai_project_single_sidebar_widget-class .mec-single-event-category i {
    display: inline-block;
    margin-right: 10px;
    margin-left: 0;
    font-size: 25px;
    color: #104778;
}

.seodo_post_single_sidebar_widget-class .mec-single-event-category dt,
.seodo_press_review_single_sidebar_widget-class .mec-single-event-category dt,
.seodo_ambassador_award_single_sidebar_widget-class .mec-single-event-category dt,
.seodo_sicai_project_single_sidebar_widget-class .mec-single-event-category dt {
    display: inline-block;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
    margin-left: 0;
    color: #0b0b0b;
    line-height: 1;
    vertical-align: middle;
}

.seodo_post_single_sidebar_widget-class .mec-single-event-category dl,
.seodo_press_review_single_sidebar_widget-class .mec-single-event-category dl,
.seodo_ambassador_award_single_sidebar_widget-class .mec-single-event-category dl,
.seodo_sicai_project_single_sidebar_widget-class .mec-single-event-category dl {
    margin: -5px;
    padding: 0;
}

.seodo_post_single_sidebar_widget-class .mec-single-event-category dd,
.seodo_press_review_single_sidebar_widget-class .mec-single-event-category dd,
.seodo_ambassador_award_single_sidebar_widget-class .mec-single-event-category dd,
.seodo_sicai_project_single_sidebar_widget-class .mec-single-event-category dd {
    margin: 0;
    padding: 0;
    padding-left: 35px;
    min-height: 35px;
    line-height: 35px;
}

.seodo_post_single_sidebar_widget-class .mec-single-event-category dd:first-of-type,
.seodo_press_review_single_sidebar_widget-class .mec-single-event-category dd:first-of-type,
.seodo_ambassador_award_single_sidebar_widget-class .mec-single-event-category dd:first-of-type,
.seodo_sicai_project_single_sidebar_widget-class .mec-single-event-category dd:first-of-type {
    padding-top: 5px;
}

.seodo_post_single_sidebar_widget-class .mec-single-event-category dd:last-of-type,
.seodo_press_review_single_sidebar_widget-class .mec-single-event-category dd:last-of-type,
.seodo_ambassador_award_single_sidebar_widget-class .mec-single-event-category dd:last-of-type,
.seodo_sicai_project_single_sidebar_widget-class .mec-single-event-category dd:last-of-type {
    border-bottom: 0;
}

/* Match MEC event categories link style - same as MEC sidebar */
.seodo_post_single_sidebar_widget-class .mec-events-event-categories a,
.seodo_press_review_single_sidebar_widget-class .mec-events-event-categories a,
.seodo_ambassador_award_single_sidebar_widget-class .mec-events-event-categories a,
.seodo_sicai_project_single_sidebar_widget-class .mec-events-event-categories a {
    font-size: 14px;
    color: #8d8d8d;
    text-decoration: none;
    transition: all 0.2s ease;
    word-wrap: break-word;
    display: inline-block;
}

/* Match hover color - uses #104778 on hover */
.seodo_post_single_sidebar_widget-class .mec-events-event-categories a.mec-color-hover:hover,
.seodo_post_single_sidebar_widget-class .mec-events-event-categories a:hover,
.seodo_press_review_single_sidebar_widget-class .mec-events-event-categories a.mec-color-hover:hover,
.seodo_press_review_single_sidebar_widget-class .mec-events-event-categories a:hover,
.seodo_ambassador_award_single_sidebar_widget-class .mec-events-event-categories a.mec-color-hover:hover,
.seodo_ambassador_award_single_sidebar_widget-class .mec-events-event-categories a:hover,
.seodo_sicai_project_single_sidebar_widget-class .mec-events-event-categories a.mec-color-hover:hover,
.seodo_sicai_project_single_sidebar_widget-class .mec-events-event-categories a:hover {
    color: #104778;
}

/* Match icon color on hover */
.seodo_post_single_sidebar_widget-class .mec-events-event-categories a.mec-color-hover:hover .mec-color,
.seodo_post_single_sidebar_widget-class .mec-events-event-categories a.mec-color-hover:hover .mec-fa-angle-right,
.seodo_post_single_sidebar_widget-class .mec-events-event-categories a:hover .mec-color,
.seodo_post_single_sidebar_widget-class .mec-events-event-categories a:hover .mec-fa-angle-right,
.seodo_press_review_single_sidebar_widget-class .mec-events-event-categories a.mec-color-hover:hover .mec-color,
.seodo_press_review_single_sidebar_widget-class .mec-events-event-categories a.mec-color-hover:hover .mec-fa-angle-right,
.seodo_press_review_single_sidebar_widget-class .mec-events-event-categories a:hover .mec-color,
.seodo_press_review_single_sidebar_widget-class .mec-events-event-categories a:hover .mec-fa-angle-right,
.seodo_ambassador_award_single_sidebar_widget-class .mec-events-event-categories a.mec-color-hover:hover .mec-color,
.seodo_ambassador_award_single_sidebar_widget-class .mec-events-event-categories a.mec-color-hover:hover .mec-fa-angle-right,
.seodo_ambassador_award_single_sidebar_widget-class .mec-events-event-categories a:hover .mec-color,
.seodo_ambassador_award_single_sidebar_widget-class .mec-events-event-categories a:hover .mec-fa-angle-right,
.seodo_sicai_project_single_sidebar_widget-class .mec-events-event-categories a.mec-color-hover:hover .mec-color,
.seodo_sicai_project_single_sidebar_widget-class .mec-events-event-categories a.mec-color-hover:hover .mec-fa-angle-right,
.seodo_sicai_project_single_sidebar_widget-class .mec-events-event-categories a:hover .mec-color,
.seodo_sicai_project_single_sidebar_widget-class .mec-events-event-categories a:hover .mec-fa-angle-right {
    color: #104778;
}

/* Match MEC icon style */
.seodo_post_single_sidebar_widget-class .mec-events-event-categories .mec-fa-angle-right,
.seodo_press_review_single_sidebar_widget-class .mec-events-event-categories .mec-fa-angle-right,
.seodo_ambassador_award_single_sidebar_widget-class .mec-events-event-categories .mec-fa-angle-right,
.seodo_sicai_project_single_sidebar_widget-class .mec-events-event-categories .mec-fa-angle-right {
    color: #8d8d8d;
    transition: all 0.2s ease;
}

.seodo_post_single_sidebar_widget-class .mec-events-event-categories .mec-color,
.seodo_press_review_single_sidebar_widget-class .mec-events-event-categories .mec-color,
.seodo_ambassador_award_single_sidebar_widget-class .mec-events-event-categories .mec-color,
.seodo_sicai_project_single_sidebar_widget-class .mec-events-event-categories .mec-color {
    color: #8d8d8d;
    transition: all 0.2s ease;
}

.seodo_post_single_sidebar_widget-class .mec-events-meta-group-tags,
.seodo_press_review_single_sidebar_widget-class .mec-events-meta-group-tags,
.seodo_ambassador_award_single_sidebar_widget-class .mec-events-meta-group-tags,
.seodo_sicai_project_single_sidebar_widget-class .mec-events-meta-group-tags {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e2e2;
    font-size: 14px;
    color: #8d8d8d;
}

.seodo_post_single_sidebar_widget-class .mec-events-meta-group-tags a,
.seodo_press_review_single_sidebar_widget-class .mec-events-meta-group-tags a,
.seodo_ambassador_award_single_sidebar_widget-class .mec-events-meta-group-tags a,
.seodo_sicai_project_single_sidebar_widget-class .mec-events-meta-group-tags a {
    color: #8d8d8d;
    text-decoration: none;
    transition: all 0.2s ease;
}

.seodo_post_single_sidebar_widget-class .mec-events-meta-group-tags a:hover,
.seodo_press_review_single_sidebar_widget-class .mec-events-meta-group-tags a:hover,
.seodo_ambassador_award_single_sidebar_widget-class .mec-events-meta-group-tags a:hover,
.seodo_sicai_project_single_sidebar_widget-class .mec-events-meta-group-tags a:hover {
    color: #104778;
}

/* Archive Posts - Post date text color white */
.blog-post .post-content .post-inner .post-date {
    color: #fff !important;
}

/* Archive Posts - Add spacing between "Approfondisci" button and posts below on desktop */
.blog-post .post-content .post-inner .custom-button {
    margin-bottom: 30px !important;
}

/* Archive Posts - Move pagination to bottom on desktop */
@media only screen and (min-width: 768px) {
    /* Force flexbox on row containers */
    .col-lg-8 > .row,
    .col-lg-10 > .row,
    div.col-lg-8 > div.row,
    div.col-lg-10 > div.row,
    section.content-section .container .row .col-lg-8 .row,
    section.content-section .container .row .col-lg-10 .row {
        display: flex !important;
        flex-wrap: wrap !important;
        flex-direction: row !important;
        position: relative !important;
    }
    
    /* Ensure posts come first */
    .col-lg-8 .row .col-md-4,
    .col-lg-10 .row .col-md-4,
    .col-lg-8 > .row > .col-md-4,
    .col-lg-10 > .row > .col-md-4 {
        order: 1 !important;
        flex: 0 0 auto !important;
    }
    
    /* Pagination wrapper - ALWAYS goes to bottom, forces line break */
    .col-lg-8 .row .pagination-wrapper,
    .col-lg-10 .row .pagination-wrapper,
    .col-lg-8 > .row > .pagination-wrapper,
    .col-lg-10 > .row > .pagination-wrapper,
    div.col-lg-8 > div.row > div.pagination-wrapper,
    div.col-lg-10 > div.row > div.pagination-wrapper {
        flex-basis: 100% !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        order: 99999 !important;
        margin-top: 40px !important;
        margin-bottom: 20px !important;
        clear: both !important;
        display: block !important;
        float: none !important;
    }
    
    /* Pagination container - if directly in row, also move to bottom */
    .col-lg-8 .row .pagination-container,
    .col-lg-10 .row .pagination-container,
    .col-lg-8 > .row > .pagination-container,
    .col-lg-10 > .row > .pagination-container,
    div.col-lg-8 > div.row > div.pagination-container,
    div.col-lg-10 > div.row > div.pagination-container,
    section.content-section .container .row .col-lg-8 .row .pagination-container,
    section.content-section .container .row .col-lg-10 .row .pagination-container {
        flex-basis: 100% !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        order: 99999 !important;
        margin-top: 40px !important;
        margin-bottom: 20px !important;
        clear: both !important;
        display: block !important;
        float: none !important;
        text-align: left !important;
        position: relative !important;
    }
    
    /* Pagination container - aligns tasti to left, keeps them inline */
    .pagination-wrapper .pagination-container,
    div.pagination-wrapper div.pagination-container {
        text-align: left !important;
        display: block !important;
        width: 100% !important;
    }
    
    /* Page-numbers inside container stay inline one next to the other */
    .pagination-container .page-numbers,
    div.pagination-container .page-numbers {
        display: inline-block !important;
        width: auto !important;
        flex-basis: auto !important;
    }
    
    /* Direct page-numbers in row (if not in wrapper/container) - move to bottom, keep original style */
    .col-lg-8 .row > .page-numbers,
    .col-lg-10 .row > .page-numbers {
        order: 999;
        flex: 0 0 auto !important;
        flex-basis: auto !important;
        flex-grow: 0 !important;
        flex-shrink: 0 !important;
        width: auto !important;
        max-width: none !important;
        min-width: auto !important;
        display: inline-block !important;
        margin-top: 40px;
        margin-bottom: 20px;
        margin-left: 0;
    }
    
    /* Force line break before first page-number if not in wrapper */
    .col-lg-8 .row > .page-numbers:first-of-type,
    .col-lg-10 .row > .page-numbers:first-of-type {
        flex-basis: 100% !important;
        width: 100% !important;
        text-align: left;
    }
    
    /* Reset for siblings */
    .col-lg-8 .row > .page-numbers:not(:first-of-type),
    .col-lg-10 .row > .page-numbers:not(:first-of-type) {
        flex-basis: auto !important;
        width: auto !important;
    }
}

/* Archive Posts - Add spacing between "Approfondisci" button and sidebar map on mobile */
@media only screen and (max-width: 767px) {
    .blog-post .post-content .post-inner .custom-button {
        margin-bottom: 40px !important;
    }
    
    /* Also add margin-top to sidebar widget on mobile for extra spacing */
    .sidebar.widget-area .widget {
        margin-top: 20px;
    }
}

/* Yoast SEO Breadcrumb - Styling aligned with theme */
.breadcrumb-wrapper {
    margin-top: 60px;
    margin-bottom: 30px;
}

#breadcrumbs.yoast-breadcrumb {
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    line-height: 1.8;
    color: var(--color-dark);
    padding: 0;
    margin: 0;
    background: none;
    border: none;
}

/* Breadcrumb wrapper spans */
#breadcrumbs.yoast-breadcrumb span {
    display: inline-block;
    vertical-align: middle;
}

/* Breadcrumb links */
#breadcrumbs.yoast-breadcrumb a {
    color: var(--color-main);
    text-decoration: none;
    transition: all 0.35s ease-in-out;
    position: relative;
    display: inline-block;
}

#breadcrumbs.yoast-breadcrumb a:hover {
    color: var(--color-second);
    text-decoration: none;
}

#breadcrumbs.yoast-breadcrumb a:hover:after {
    content: "";
    width: 100%;
    height: 3px;
    background: var(--color-second);
    position: absolute;
    left: 0;
    bottom: -2px;
    -webkit-transition: all .35s ease-in-out;
    -moz-transition: all .35s ease-in-out;
    -ms-transition: all .35s ease-in-out;
    -o-transition: all .35s ease-in-out;
    transition: all .35s ease-in-out;
}

/* Last breadcrumb item (current page) */
#breadcrumbs.yoast-breadcrumb .breadcrumb_last {
    color: var(--color-dark);
    opacity: 1;
    font-weight: 600;
}

#breadcrumbs.yoast-breadcrumb .breadcrumb_last strong {
    font-weight: 600;
    color: var(--color-dark);
}

/* Breadcrumb separator styling (text between spans) */
#breadcrumbs.yoast-breadcrumb {
    color: var(--color-dark);
}

/* Style the separator character (» or other) */
#breadcrumbs.yoast-breadcrumb {
    word-spacing: 0.3em;
}

/* Responsive adjustments */
@media only screen and (max-width: 767px) {
    .breadcrumb-wrapper {
        margin-top: 40px;
        margin-bottom: 20px;
    }
    
    #breadcrumbs.yoast-breadcrumb {
        font-size: 13px;
        line-height: 1.6;
    }
}

/* Content Section - Remove top padding for specific templates */
/* Template tag dei post articoli */
body.tag .content-section,
.tag .content-section {
    padding-top: 0px !important;
}

/* Template singolo evento */
body.single-mec-events .content-section,
.single-mec-events .content-section,
body.single .content-section.single-mec-events,
body.single-mec-events .mec-container,
.single-mec-events .mec-container {
    padding-top: 0px !important;
}

/* Template tassonomie regioni articoli */
body.taxonomy-regioni_articoli .content-section,
.taxonomy-regioni_articoli .content-section,
body.tax-regioni_articoli .content-section,
.tax-regioni_articoli .content-section {
    padding-top: 0px !important;
}

/* Template tassonomie regioni eventi (MEC category) */
body.taxonomy-mec-category .content-section,
.taxonomy-mec-category .content-section,
body.tax-mec-category .content-section,
.tax-mec-category .content-section {
    padding-top: 0px !important;
}

/* Template categorie articoli */
body.category .content-section,
.category .content-section {
    padding-top: 0px !important;
}

/* Template singoli post articoli (con tassonomia regioni) */
body.single-post .content-section,
.single-post .content-section,
body.single .content-section {
    padding-top: 0px !important;
}

/* Breadcrumb allineamento per singoli eventi - allineare a sinistra con featured image */
body.single-mec-events .mec-container .container .row .col-12 .breadcrumb-wrapper,
.single-mec-events .mec-container .container .row .col-12 .breadcrumb-wrapper {
    text-align: left !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Allinea il container della breadcrumb come la featured image */
body.single-mec-events .mec-container .container .row,
.single-mec-events .mec-container .container .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.single-mec-events .mec-container .container .row .col-12,
.single-mec-events .mec-container .container .row .col-12 {
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* Assicura che la breadcrumb sia allineata a sinistra come la featured image MEC */
body.single-mec-events .mec-container .breadcrumb-wrapper,
.single-mec-events .mec-container .breadcrumb-wrapper {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Allinea la breadcrumb con la featured image MEC */
body.single-mec-events .mec-container .container,
.single-mec-events .mec-container .container {
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* Assicura che la featured image e la breadcrumb abbiano lo stesso allineamento */
body.single-mec-events .mec-events-event-image,
.single-mec-events .mec-events-event-image {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Template archivio news degli articoli */
body.blog .content-section,
.blog .content-section,
body.archive .content-section:not(.home),
.archive .content-section:not(.home),
body.home.blog .content-section,
.home.blog .content-section {
    padding-top: 0px !important;
}

/* Template archivio events per gli eventi */
body.post-type-archive-mec-events .content-section,
.post-type-archive-mec-events .content-section,
body.archive-mec-events .content-section,
.archive-mec-events .content-section {
    padding-top: 0px !important;
}

/* WM Package - Featured Image Width 100% */
.wm_featured_image img {
    width: 100% !important;
}

/* Hide Italy map in sidebar on track pages */
.single-track .sidebar .mappa_italia,
.single-track .sidebar.widget-area .mappa_italia,
.single-track .col-lg-4 .mappa_italia,
.post-type-track .sidebar .mappa_italia,
.post-type-track .sidebar.widget-area .mappa_italia,
.post-type-track .col-lg-4 .mappa_italia {
    display: none !important;
}


/* Track pages - h3 margin-top rule */
body.single-track .post-content .inner .container .row .col-md-12 h3,
body.post-type-track .post-content .inner .container .row .col-md-12 h3 {
    margin-top: 20px !important;
}

.wm_technical_details_title, .wm_info_details_title, .wm_taxonomy_item, .wm_download_link, .wm_grid_track_view_button, .wm_grid_poi_view_button, .wm_reset_filters_button{
    color: white !important;
    background-color: var(--color-main) !important;
}

.wm_technical_detail_value, .wm_info_detail_value, .wm_download_links, .wm_filter_range, .wm_technical_detail_value a{
    color: var(--color-main) !important;
}

.wm_download_link{
    background-color: var(--color-main);
}

.wm_download_link:hover{
    color: white;
    background-color: var(--color-main);
}

.wm-poi-marker-image {
height: 150px !important;
}

/* Ambassador Award (Past) year filter - aligned with SICAI Project filters */
.ambassador-award-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

/* Ambassador Award grid: anno/data in bianco sul badge */
.seodo-ambassador-award-posts .post-date,
.seodo-ambassador-award-posts .post-content .post-inner .post-date {
    color: #fff !important;
}
.seodo-ambassador-award-posts .post-date a {
    color: #fff !important;
}

/* SICAI Project Posts (WPBakery): taxonomy filters and grid */
.sicai-project-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}
.sicai-project-filter-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.sicai-project-filter-label {
    margin: 0;
    font-weight: 600;
}
.sicai-project-filter-select {
    padding: 0.35rem 2rem 0.35rem 0.75rem;
    width: 180px;
    min-width: 180px;
    max-width: 180px;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 0.65rem;
}
.sicai-project-filter-select::-ms-expand {
    display: none;
}
.seodo-sicai-project-posts .sicai-project-posts-title {
    margin-bottom: 1rem;
}
.seodo-sicai-project-posts .post-date,
.seodo-sicai-project-posts .post-content .post-inner .post-date {
    color: #fff !important;
}
.seodo-sicai-project-posts .post-date a {
    color: #fff !important;
}

/* SICAI Project Posts - Load more */
.sicai-project-load-more-wrapper {
    margin-top: 1.5rem;
    text-align: center;
}
.sicai-project-load-more-btn {
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    border: 1px solid currentColor;
    background: transparent;
    font-size: 1rem;
}
.sicai-project-load-more-btn:hover:not(:disabled) {
    opacity: 0.85;
}
.sicai-project-load-more-btn:disabled,
.sicai-project-load-more-btn.loading {
    opacity: 0.7;
    cursor: wait;
}

/* Ambassador Award archivio e tassonomie: anno/data in bianco sul badge */
.post-type-archive-ambassador_award .blog-post .post-content .post-inner .post-date,
.post-type-archive-ambassador_award .blog-post .post-content .post-inner .post-date a,
.tax-ambassador_award_category .blog-post .post-content .post-inner .post-date,
.tax-ambassador_award_category .blog-post .post-content .post-inner .post-date a,
.tax-ambassador_award_tag .blog-post .post-content .post-inner .post-date,
.tax-ambassador_award_tag .blog-post .post-content .post-inner .post-date a,
.tax-ambassador_award_year .blog-post .post-content .post-inner .post-date,
.tax-ambassador_award_year .blog-post .post-content .post-inner .post-date a {
    color: #fff !important;
}

/* SICAI Project archive and taxonomies - date badge in white (same as Ambassador Award) */
.post-type-archive-sicai_project .blog-post .post-content .post-inner .post-date,
.post-type-archive-sicai_project .blog-post .post-content .post-inner .post-date a,
.tax-sicai_project_category .blog-post .post-content .post-inner .post-date,
.tax-sicai_project_category .blog-post .post-content .post-inner .post-date a,
.tax-sicai_project_area .blog-post .post-content .post-inner .post-date,
.tax-sicai_project_area .blog-post .post-content .post-inner .post-date a,
.tax-sicai_project_level .blog-post .post-content .post-inner .post-date,
.tax-sicai_project_level .blog-post .post-content .post-inner .post-date a,
.tax-sicai_project_tag .blog-post .post-content .post-inner .post-date,
.tax-sicai_project_tag .blog-post .post-content .post-inner .post-date a {
    color: #fff !important;
}