/* --- LAYOUT GENERALE CONVENZIONI --- */
.conv-layout {
    display: grid;
    grid-template-columns: 1fr clamp(280px, 30%, 350px);
    gap: 30px;
    margin: 40px auto;
    max-width: 1200px;
    padding: 0 20px;
}

/* --- SLIDER (MODERNO & CLEAN) --- */
.conv-slider {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    height: 400px;
}
.slider-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}
.slide {
    min-width: 100%;
    position: relative;
}
.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 25px 20px;
    background: linear-gradient(transparent, rgba(0, 38, 77, 0.9));
    color: white;
    font-size: 1.5rem;
    font-weight: 800;
}
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    background: #004080;
    font-size: 2rem;
    padding: 10px 15px;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: 0.3s;
    z-index: 5;
}
.slider-btn:hover { background: #d32f2f; }
.prev { left: 10px; border-radius: 0 10px 10px 0; }
.next { right: 10px; border-radius: 10px 0 0 10px; }

/* --- SEARCH BAR --- */
.conv-search {
    width: 100%;
    padding: 15px 25px;
    border-radius: 50px;
    border: 2px solid #eef2f6;
    margin-bottom: 30px;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
}
.conv-search:focus {
    border-color: #004080;
    box-shadow: 0 5px 20px rgba(0, 64, 128, 0.1);
}

/* --- GRID & CARDS --- */
.conv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}
.conv-card {
    background: white;
    border-radius: 18px;
    padding: 20px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}
.conv-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    border-color: #d32f2f;
}
.conv-card img {
    width: 100%;
    height: 160px;
    object-fit: contain;
    border-radius: 12px;
    background: #f8fafc;
    margin-bottom: 15px;
}
.conv-card h3 {
    color: #004080;
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 800;
}
.conv-card p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    flex-grow: 1;
    margin-bottom: 20px;
}
.conv-card a {
    display: inline-block;
    padding: 10px 20px;
    background: #004080;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    text-align: center;
    transition: 0.3s;
}
.conv-card a:hover {
    background: #d32f2f;
}

/* --- SIDEBAR --- */
.conv-sidebar {
    position: sticky;
    top: 20px;
    align-self: start;
}
.sidebar-box {
    background: #f8fafc;
    padding: 25px;
    border-radius: 18px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}
.sidebar-box h4 {
    color: #004080;
    margin-bottom: 15px;
    font-weight: 800;
    border-bottom: 2px solid #d32f2f;
    display: inline-block;
}
.image-box { padding: 0; overflow: hidden; background: none; border: none; }
.image-box img { width: 100%; border-radius: 18px; }

/* FILTRI */
.filter-list { list-style: none; }
.filter-list li {
    padding: 10px 15px;
    margin-bottom: 5px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.2s;
    color: #444;
}
.filter-list li:hover { background: #eef2f6; color: #004080; }
.filter-list li.active {
    background: #004080;
    color: white;
}

/* HOW TO */
.howto ol { padding-left: 20px; }
.howto li {
    font-size: 0.85rem;
    margin-bottom: 12px;
    color: #555;
    font-weight: 600;
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .conv-layout { grid-template-columns: 1fr; }
    .conv-sidebar { position: static; }
    .conv-slider { height: 300px; }
}

@media (max-width: 767px) {
    .slide-caption { font-size: 1.1rem; }
    .conv-grid { grid-template-columns: 1fr; }
}