/* FILTERS BOX COLLAPSIBLE */
.filters-container {
    margin-bottom: 3rem;
}

.filters-toggle {
    background: rgba(255,255,255,0.05);
    padding: 0.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s;
}

.filters-toggle:hover {
    background: rgba(255,255,255,0.08);
}

.filters-toggle h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
}

.toggle-icon {
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.filters-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

.filters-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-top: none;
}

.filters-content.active {
    max-height: 1000px;
}

.filters-inner {
    padding: 2rem;
}

/* SEARCH */
.search-box {
    margin-bottom: 2.5rem;
}

.search-box input {
    width: 100%;
    padding: 1.2rem 1.5rem;
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 0;
    color: white;
    font-family: 'Urbanist', sans-serif;
    font-size: 1rem;
    transition: all 0.3s;
}

.search-box input::placeholder {
    color: rgba(255,255,255,0.4);
}

.search-box input:focus {
    outline: none;
    border-color: var(--green);
    background: rgba(255,255,255,0.08);
}

/* FILTER SECTIONS */
.filter-grid {
    display:grid;
    grid-template-columns: repeat(2, 1fr);
    gap:20px;
}

@media (max-width:960px) {.filter-grid {grid-template-columns: 1fr;}}

.filter-section {
    margin-bottom: 2rem;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-label {
    display: block;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* PILLS CATEGORIA (Single Select) */
.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.pill {
    padding: 0.7rem 1.5rem;
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 0;
    color: rgba(255,255,255,0.8);
    font-family: 'Urbanist', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.pill:hover {
    background: rgba(255,255,255,0.12);
    border-color: var(--green-l);
}

.pill.active {
    background: var(--green);
    border-color: var(--green);
    color: white;
}

/* TAG ACCORDION */
.tag-accordion {
    margin-top: 0;
}

.accordion-trigger {
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 0;
    color: white;
    font-family: 'Urbanist', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
    text-align: left;
}

.accordion-trigger:hover {
    background: rgba(255,255,255,0.12);
    border-color: var(--green-l);
}

.accordion-trigger.active {
    border-color: var(--green);
}

.accordion-icon {
    transition: transform 0.3s;
}

.accordion-trigger.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: rgba(255,255,255,0.03);
    border: 2px solid rgba(255,255,255,0.1);
    border-top: none;
    border-radius: 0;
}

.accordion-content.active {
    max-height: 500px;
}

.accordion-inner {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
}

/* TAG PILLS (Multi Select) - STILE FOTO */
.tag-pill {
    padding: 0.6rem 1.2rem;    
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 0;
    color: rgba(255,255,255,0.8);
    font-family: 'Urbanist', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.tag-pill:hover {
    background: rgba(255,255,255,0.15);
    border-color: var(--green-l);
}

.tag-pill.active {
    background: var(--green);
    border-color: var(--green);
    color: white;
}

.tag-count {
    opacity: 0.7;
    font-size: 0.8rem;
}

/* RESET BUTTON */
.filter-actions {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.btn-reset {    
    padding: 0.8rem 2rem;   
    font-family: 'Urbanist', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;    
}


/* ARTICLES GRID */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

.article-card {
    background: rgba(255,255,255,0.03);
    border: 2px solid var(--green-l);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-card:hover {
    border-color: var(--green);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    background: rgba(255,255,255,0.05);
}

.article-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #555;
    position: relative;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

/* RIBBON SOTTO IMMAGINE */
.article-type-ribbon {
    background: var(--green);
    color: white;
    padding: 0.5rem 1.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

.article-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-tag {
    display: inline-block;
    background: rgba(255,255,255,0.1);
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--green-l);
    margin-bottom: 1rem;
    align-self: flex-start;
}

.article-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
    line-height: 1.3;
}

.article-date {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 1.5rem;
}

.btn-read {
    
    padding: 0.8rem 1.5rem;    
    font-size: 0.95rem;
    font-weight: 600;    
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    align-self: flex-start;
}



/* PAGINATION */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.pagination button {
    padding: 0.8rem 1.2rem;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 0;
    background: rgba(255,255,255,0.05);
    color: white;
    font-family: 'Urbanist', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination button:hover:not(:disabled) {
    border-color: var(--green);
    background: var(--green);
}

.pagination button.active {
    background: var(--green);
    border-color: var(--green);
}

.pagination button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: rgba(255,255,255,0.5);
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: white;
}

/* NEWSLETTER BANNER */
.newsletter-banner {
    background: var(--green);
    padding: 3rem 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

.newsletter-banner h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: white;
}

.newsletter-banner p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.95);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.newsletter-form {
    display: flex;
    justify-content: center;
    gap: 1rem;
    max-width: 700px;
    margin: 0 auto;
}

.newsletter-input {
    flex: 1;
    padding: 1.2rem 1.5rem;
    border: none;
    background: rgba(255,255,255,0.2);
    color: white;
    font-family: 'Urbanist', sans-serif;
    font-size: 1.05rem;
    border-radius: 0;
}

.newsletter-input::placeholder {
    color: rgba(255,255,255,0.7);
}

.newsletter-input:focus {
    outline: none;
    background: rgba(255,255,255,0.3);
}

.newsletter-btn {
    padding: 1.2rem 3rem;
    background: var(--antracite);
    color: white;
    border: none;
    font-family: 'Urbanist', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 0;
    transition: all 0.3s;
}

.newsletter-btn:hover {
    background: var(--bianco-sporco);
    color:var(--antracite);    
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .accordion-inner {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) { 
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-pills {
        flex-direction: column;
    }
    
    .pill {
        text-align: center;
    }
    
    .accordion-inner {
        grid-template-columns: 1fr;
    }
    .newsletter-banner h3 {
        font-size: 1.6rem;
    }

    .newsletter-banner p {
        font-size: 1rem;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-btn {
        padding: 1rem;
    }
}