html, body {
    font-family: Mulish,"sans-serif";
}

.header-logo img{
    width: 280px;
    margin-top: 15px;
    margin-left: 20px;
    margin-bottom: 15px;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

.header-nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    margin-right: 10px;
    position: absolute;
    top: 20px;
    right: 20px;
}

.header-menu {
    display: flex !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 2px;
}

.header-menu li {
    margin: 0px !important;
    padding: 7px 10px!important;
}


.header-title {
    font-weight: bold;
    color: #FFF;
    width: 200px;
    margin-left: 20px;
    line-height: 18px;
}

.header-menu a {
    text-decoration: none !important;
    color: #333 !important;
    font-weight: 500 !important;
    transition: color 0.3s !important;
    font-size: 18px;
}



@media (max-width: 768px) {
        .menu-toggle {
            display: flex !important;
            z-index: 10001 !important;
            position: absolute;
            right: 10px;
            top: 10px;
        }

        .menu-toggle.active span:nth-child(1) {
            transform: rotate(45deg) translate(5px, 5px);
        }

        .menu-toggle.active span:nth-child(2) {
            opacity: 0;
        }

        .menu-toggle.active span:nth-child(3) {
            transform: rotate(-45deg) translate(7px, -6px);
        }

        .header-nav {
            position: fixed !important;
            top: 0 !important;
            right: -100% !important;
            width: 80% !important;
            max-width: 300px !important;
            height: 100vh !important;
            background: #fff !important;
            transition: right 0.3s !important;
            z-index: 10000 !important;
            padding: 80px 20px 20px !important;
            overflow-y: auto !important;
            box-shadow: -2px 0 5px rgba(0,0,0,0.1) !important;
        }

        .header-nav.active {
            right: 0 !important;
        }

        .header-menu {
            flex-direction: column !important;
            gap: 0 !important;
        }

        .header-menu a {
            display: block !important;
            padding: 15px 0 !important;
            border-bottom: 1px solid #eee !important;
            color: #333 !important;
        }

        .header-menu .sub-menu {
            position: static !important;
            box-shadow: none !important;
            padding-left: 20px !important;
            display: none !important;
        }

        .header-menu li.menu-item-has-children > a::after {
            content: ' ▼';
            font-size: 0.8em;
        }
}



    
    @media (max-width: 900px) {
        .ac-grid { grid-template-columns: repeat(2, 1fr); }
    }
    @media (max-width: 580px) {
        .ac-grid { grid-template-columns: 1fr; }
    }
 
   
    .ac-card {
        position: relative;
        background: #ffffff;
        border-radius: 18px;
        overflow: hidden;
        box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2) !important;
        display: flex;
        flex-direction: column;
        transition: box-shadow .22s ease, transform .22s ease;
        text-decoration: none;
        color: inherit;
        border: 1px solid #AAA;
    }
    .ac-card:hover {
        box-shadow: 0 8px 30px rgba(0,0,0,.13);
        transform: translateY(-3px);
    }
 
    /* ── Immagine ── */
    .ac-thumb {
        width: 100%;
        /*aspect-ratio: 16 / 9;*/
        object-fit: cover;
        display: block;
        background: #f0f0f0;
    }
    .ac-thumb-placeholder {
        width: 100%;
        aspect-ratio: 16 / 9;
        background: linear-gradient(135deg, #e8eaf0 0%, #d0d4e0 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #aab;
        font-size: 38px;
    }
 
    /* ── Ribbon tag ── */
    .ac-ribbon {
        position: absolute;
        top: 16px;
        right: -30px;
        background: #e63946;
        color: #fff;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: .06em;
        text-transform: uppercase;
        padding: 5px 38px;
        transform: rotate(45deg);
        transform-origin: center center;
        box-shadow: 0 2px 8px rgba(230,57,70,.35);
        pointer-events: none;
        white-space: nowrap;
        z-index: 2;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
 
    /* ── Corpo card ── */
    .ac-body {
        padding: 18px 20px 22px;
        display: flex;
        flex-direction: column;
        flex: 1;
        gap: 6px;
    }
 
    /* ── Categoria (super-titolo) ── */
    .ac-category {
        font-size: 20px;
        font-weight: 900;
        color: #000;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }
   
 
    /* ── Titolo ── */
    .ac-title {
        font-size: 16px;
        line-height: 1.35;
        color: #1a1a2e;
        margin: 4px 0 0;
        display: -webkit-box;
        -webkit-line-clamp: 5;
        -webkit-box-orient: vertical;
    }
 
    /* ── Excerpt ── */
    .ac-excerpt {
        font-size: 14px;
        color: #000;
        flex: 1;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-top: 0px;
        white-space: pre-line;
        font-style: oblique;
    }
 
    /* ── Footer card ── */
    .ac-footer {
        margin-top: 0px;
        padding-top: 12px;
        border-top: 1px solid #f0f0f4;
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 12px;
        color: #888;
        gap: 8px;
    }
    .ac-date { white-space: nowrap; }
    .ac-read-more {
        font-size: 12px;
        font-weight: 700;
        color: #5a7ef5;
        text-decoration: none;
        white-space: nowrap;
    }
    .ac-read-more:hover { text-decoration: underline; }




.ac-grid.ac-col-4 {
    grid-template-columns: repeat(4, 1fr);
    display: grid;
    gap: 20px;
}

.ribbon-background {
  top: 3.23em;
  right: -3.73em;
  width: 16.38em;
  height: 1.54em;
  content: "";
  display: block;
  padding: .38em 0;
  position: absolute;
  transform: rotate(45deg);
  box-shadow: 0 .15em .23em 0 rgba(0, 0, 0, 0.5);
  box-sizing: content-box;
  transition: background-color 2s;
  pointer-events: auto;
  background-color: #192b4d;
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
}

.ribbon-content {
  top: 3.23em;
  color: #fff;
  right: -3.23em;
  width: 15.38em;
  height: 1.54em;
  margin: .15em 0;
  display: block;
  padding: .12em 0;
  position: absolute;
  transform: rotate(45deg);
  box-sizing: content-box;
  text-align: center;
  font-weight: 700;
  line-height: 1.54em;
  text-indent: 0;
  text-shadow: 0 -.08em rgba(0, 0, 0, 0.5);
  border-style: solid;
  border-width: .08em 0;
  text-decoration: none;
}

.ribbon-box {
  top: 0;
  right: 0;
  width: 12.1em;
  height: 12.1em;
  z-index: 90;
  overflow: hidden;
  position: absolute;
  font-size: 13px;
  text-indent: -999999px;
  pointer-events: none;
  text-decoration: none;
}

.ribbon-background.In.scadenza {
  background-color: rgb(170, 108, 0);
}

.ribbon-background.Scaduto {
  background-color: #a00;
}

@media (max-width: 900px) {
    
    .ac-grid.ac-col-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    
    .ac-grid.ac-col-4 {
        grid-template-columns: repeat(1, 1fr);
    }
}

strong {
  font-weight: 900;
}
