/* ============= CARDS - INDEX ============= */

.card-container-index {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0;
}

.card-index {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 10px;
    border-radius: 8px;
    border: dotted #48ff00 1px;
    background: rgba(26,255,0,0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.card-index h5 { 
    font-size: 16px; 
    margin: 6px 0 0; 
    letter-spacing: 1px; 
    font-family: "Handjet", sans-serif;
    color: #48ff00;
    transition: all 0.3s ease;
    text-align: center;
}

.card-index .img-wrapper { 
    position: relative; 
    width: 100%; 
    height: 50px; 
    margin-bottom: 5px; 
}

.card-index .img-wrapper .card-default,
.card-index .img-wrapper .card-hover {
    position: absolute; 
    top: 0; 
    left: 0;
    width: 100%; 
    height: 50px; 
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.card-index .img-wrapper .card-hover { 
    opacity: 0; 
}

.card-index:hover .img-wrapper .card-default { 
    opacity: 0; 
}

.card-index:hover .img-wrapper .card-hover { 
    opacity: 1; 
}

.card-index:hover { 
    border-color: #aa00ff; 
    transform: scale(1.05) translateX(5px); 
    background-color: #aa00ff45;
}

.card-index:hover h5 { 
    color: #aa00ff; 
}

/* ========== LAYOUT A 2 COLONNE (PC) ========== */
.two-columns {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 30px;
}

/* COLONNA SINISTRA: CARDS (PC) */
.sidebar-cards {
    flex: 0 0 200px;
    position: sticky;
    top: 20px;
}

/* COLONNA DESTRA: BLOG (PC) */
.main-blog {
    flex: 1;
    min-width: 0;
}

/* ========== SEZIONE ULTIMI POST ========== */
.recent-posts-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    border-bottom: 1px dotted #48ff00;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.recent-posts-header h2 {
    color: #48ff00;
    font-family: "Handjet", sans-serif;
    font-size: 24px;
    margin: 0;
    transition: all 0.3s ease;
}

.recent-posts-header:hover h2 {
    color: #aa00ff;
}

.btn-view-all {
    color: #48ff00;
    font-family: "Handjet", sans-serif;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-view-all:hover {
    color: #aa00ff;
    transform: translateX(5px);
}

.recent-posts-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.recent-post-card {
    background: #000;
    border: 1px dotted #48ff00;
    padding: 18px;
    transition: all 0.3s ease;
    font-family: "Handjet", sans-serif;
    cursor: pointer;
    box-sizing: border-box;
}

.recent-post-card:hover {
    border-color: #aa00ff;
    transform: translateX(5px);
}

.recent-post-card:hover .recent-post-title {
    color: #aa00ff;
}

.recent-post-title {
    color: #48ff00;
    font-size: 20px;
    margin: 0 0 10px 0;
    transition: all 0.3s ease;
    line-height: 1.3;
    word-break: break-word;
}

.recent-post-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 12px;
    color: #48ff00;
    opacity: 0.8;
    flex-wrap: wrap;
}

.recent-post-author {
    display: flex;
    align-items: center;
    gap: 6px;
}

.recent-post-author img {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

.recent-post-excerpt {
    color: #48ff00;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 10px;
    opacity: 0.9;
    word-break: break-word;
}

.recent-post-stats {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #48ff00;
    opacity: 0.7;
    border-top: 1px dotted #48ff00;
    padding-top: 8px;
    margin-top: 5px;
}

.recent-post-skeleton {
    color: #48ff00;
    font-family: "Handjet", sans-serif;
    text-align: center;
    padding: 40px;
    opacity: 0.6;
}

/* ========== RESPONSIVE MOBILE ========== */
/* Su mobile: cards divise in 2 colonne (ai lati) */
@media (max-width: 768px) {
    .two-columns {
        flex-direction: column;
        gap: 30px;
        padding: 0 15px;
    }
    
    /* Cards: due colonne ai lati */
    .sidebar-cards {
        flex: none;
        width: 100%;
        position: static;
    }
    
    .card-container-index {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .card-index {
        width: 100%;
        padding: 10px 5px;
    }
    
    .card-index h5 {
        font-size: 12px;
    }
    
    .card-index .img-wrapper {
        height: 40px;
    }
    
    .card-index .img-wrapper .card-default,
    .card-index .img-wrapper .card-hover {
        height: 40px;
    }
    
    /* Blog sotto, occupa tutta la larghezza */
    .main-blog {
        width: 100%;
    }
    
    .recent-post-title {
        font-size: 18px;
    }
    
    .recent-posts-header h2 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .card-container-index {
        gap: 8px;
    }
    
    .card-index {
        padding: 8px 4px;
    }
    
    .card-index h5 {
        font-size: 10px;
    }
    
    .card-index .img-wrapper {
        height: 32px;
    }
    
    .card-index .img-wrapper .card-default,
    .card-index .img-wrapper .card-hover {
        height: 32px;
    }
    
    .recent-post-title {
        font-size: 16px;
    }
    
    .recent-post-excerpt {
        font-size: 13px;
    }
}