/* CSS per rendere la tabella completamente responsive su mobile */
@media (max-width: 768px) {
    /* Rimuovi il min-width e overflow-x dal container */
    .table-container {
        overflow-x: visible !important;
    }
    
    /* Trasforma la tabella in layout a blocchi */
    table, thead, tbody, th, td, tr {
        display: block !important;
        width: 100% !important;
        min-width: auto !important;
    }
    
    /* Nascondi l'header originale */
    thead tr {
        display: flex;
        flex-wrap: wrap;
    }
    
    /* Styling per le righe */
    tbody tr {
        border: 2px solid #e5e7eb !important;
        border-radius: 8px !important;
        margin-bottom: 20px !important;
        padding: 15px !important;
        background: white !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    }
    
    /* Styling per le celle */
    tbody td {
        border: none !important;
        border-bottom: 1px solid #f3f4f6 !important;
        position: relative !important;
        padding: 12px 15px 12px 45% !important;
        text-align: left !important;
        background: transparent !important;
    }
    
    /* Aggiungi le etichette prima di ogni cella */
    tbody td:nth-of-type(1):before { content: "Features: "; }
    tbody td:nth-of-type(2):before { content: "FREE: "; }
    tbody td:nth-of-type(3):before { content: "Academia: "; }
    tbody td:nth-of-type(4):before { content: "Biotech: "; }
    tbody td:nth-of-type(5):before { content: "Custom: "; }
    
    /* Styling per le etichette */
    tbody td:before {
        content: attr(data-label) ": ";
        position: absolute !important;
        left: 15px !important;
        width: 40% !important;
        padding-right: 10px !important;
        white-space: nowrap !important;
        font-weight: 600 !important;
        color: #374151 !important;
        font-size: 14px !important;
    }
    
    /* Prima cella (Features) in evidenza */
    tbody td:nth-of-type(1) {
        background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
        font-weight: 600 !important;
        border-bottom: 2px solid #cbd5e1 !important;
        padding-left: 15px !important;
    }
    
    tbody td:nth-of-type(1):before {
        display: none !important;
    }
    
    /* Celle con checkmark/x più grandi su mobile */
    tbody td:nth-of-type(2),
    tbody td:nth-of-type(3),
    tbody td:nth-of-type(4),
    tbody td:nth-of-type(5) {
        font-size: 18px !important;
    }
    
    /* Styling speciale per badge "View Only" */
    tbody td span[style*="background: #fef3c7"] {
        font-size: 11px !important;
        padding: 3px 6px !important;
        display: inline-block !important;
        margin-bottom: 5px !important;
    }
    
    /* Riduci padding generale su mobile */
    tbody td {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }
    
    /* Ultima cella senza border-bottom */
    tbody td:last-child {
        border-bottom: none !important;
    }
}

/* CSS aggiuntivo per migliorare la leggibilità */
@media (max-width: 480px) {
    /* Per schermi molto piccoli */
    tbody td {
        padding-left: 40% !important;
        font-size: 14px !important;
    }
    
    tbody td:before {
        font-size: 12px !important;
        width: 35% !important;
    }
    
    /* Testo più piccolo per descriptions */
    tbody td span[style*="font-size: 14px"] {
        font-size: 12px !important;
    }
}