/* Container principale */
.custom-kb-wrapper {
    width: 100%;
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    box-sizing: border-box;
}

.custom-kb-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
}

/* Struttura della Card ORIZZONTALE */
.custom-kb-card.horizontal {
    position: relative;
    text-decoration: none;
    color: inherit;
    background-color: #f2f2f2;
    border: 3px solid #000000;
    border-radius: 30px; 
    width: 380px;  
    height: 120px; /* Altezza leggermente ridotta */
    display: flex;
    flex-direction: row; 
    align-items: center;
    justify-content: flex-start;
    padding: 0 25px;
    cursor: pointer;
    overflow: hidden;
    box-sizing: border-box;
    z-index: 1;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.3s ease, 
                background-color 0.3s ease;
}

/* LA SCIA BLU SOTTILE */
.custom-kb-card::before {
    content: '';
    position: absolute;
    width: 220%; 
    height: 350%; 
    background: conic-gradient(
        from 0deg,
        transparent 0%,
        transparent 80%,
        #3b82f6 95%,
        #ffffff 100%
    );
    top: -125%;
    left: -60%;
    z-index: -1;
    opacity: 0;
    pointer-events: none;
}

/* Copertura interna */
.custom-kb-card::after {
    content: '';
    position: absolute;
    inset: 3px; 
    background: #f2f2f2;
    border-radius: 26px;
    z-index: -1;
    transition: background-color 0.3s ease;
}

/* --- STATI HOVER --- */
.custom-kb-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.1);
}

.custom-kb-card:hover::before {
    animation: singleFlashBlu 1.2s ease-out forwards;
}

.custom-kb-card:hover::after {
    background-color: #ffffff;
}

/* Keyframes Flash Singolo */
@keyframes singleFlashBlu {
    0% { transform: rotate(0deg); opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { transform: rotate(360deg); opacity: 0; }
}

/* --- LOGO A SINISTRA --- */
.custom-kb-icon-box {
    width: 80px; /* Dimensioni più contenute */
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.custom-kb-icon-box img {
    max-width: 100%;
    max-height: 70%;
    object-fit: contain;
}

/* --- TESTO A DESTRA (Piccolo e allineato a sinistra) --- */
.custom-kb-content-right {
    margin-left: 20px;
    text-align: left; /* Allineamento testo a sinistra */
    z-index: 2;
}

.custom-kb-text {
    font-family: 'Arial Black', sans-serif;
    font-size: 13px; /* Testo rimpicciolito */
    font-weight: 900;
    color: #000;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.custom-kb-card:hover .custom-kb-icon-box {
    transform: translateX(5px);
}

/* Responsive Mobile */
@media (max-width: 500px) {
    .custom-kb-card.horizontal {
        width: 100%;
        max-width: 300px;
        height: 100px;
    }
    .custom-kb-icon-box { width: 60px; height: 60px; }
    .custom-kb-text { font-size: 11px; }
}