/* Stili specifici per il comparatore */

.container {
    padding: 2rem;
}

h1 {
    color: #000000;
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: #64748b;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.search-section {
    margin-bottom: 30px;
    position: relative;
}

.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto 20px;
}

#search-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 8px 0 0 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

#search-input:focus {
    border-color: #4361ee;
}

#search-btn {
    padding: 12px 20px;
    background: #4361ee;
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

#search-btn:hover {
    background: #3a0ca3;
}

.search-results {
    max-width: 600px;
    margin: 0 auto;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    z-index: 100;
    background: white;
}

.school-item {
    padding: 12px 20px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.2s;
}

.school-item:hover {
    background: #f8fafc;
}

.school-item:last-child {
    border-bottom: none;
}

.school-item h3 {
    color: #1e293b;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.school-item p {
    color: #64748b;
    font-size: 0.9rem;
}

.comparison-section {
    margin-top: 40px;
}

.school-cards {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.school-card {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
}

.school-card:hover {
    border-color: #94a3b8;
    background-color: #f1f5f9;
}

.card-placeholder {
    text-align: center;
    color: #94a3b8;
}

.card-placeholder i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.school-card.selected {
    border: 2px solid #4361ee;
    background-color: #f0f7ff;
}

.school-content {
    width: 100%;
}

.school-content h2 {
    color: #1e293b;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
    font-size: 1.3rem;
}

.school-detail {
    margin-bottom: 10px;
    display: flex;
}

.detail-label {
    font-weight: 600;
    color: #475569;
    min-width: 120px;
}

.detail-value {
    color: #1e293b;
}

.remove-btn {
    margin-top: 15px;
    padding: 8px 15px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 0.9rem;
}

.remove-btn:hover {
    background: #dc2626;
}

.vs-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    padding: 0 20px;
    border-radius: 50%;
    height: 60px;
    width: 60px;
    align-self: center;
}

.comparison-results {
    display: none;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e2e8f0;
}

.comparison-results h2 {
    text-align: center;
    color: #3a0ca3;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.comparison-table {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #1e293b;
}

tr:hover {
    background-color: #f1f5f9;
}

.better {
    color: #10b981;
    font-weight: 600;
}

.worse {
    color: #ef4444;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .school-cards {
        flex-direction: column;
        align-items: center;
    }
    
    .vs-separator {
        margin: 20px 0;
        transform: rotate(90deg);
    }
    
    .search-results {
        width: 90%;
    }
    
    h1 {
        font-size: 1.8rem;
    }
}