/* ==========================================================================
   CoreForm — pagina /valutazione-cfu
   ========================================================================== */
/* Progress Section */
.progress-section {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    z-index: 1020;
}

.progress-container {
    max-width: 600px;
    margin: 0 auto;
}

.progress-bar-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.progress-bar-custom::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 15%;
    right: 15%;
    height: 3px;
    background: rgba(255,255,255,0.3);
    z-index: 1;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    border: 2px solid rgba(255,255,255,0.3);
}

.step-indicator.active .step-circle,
.step-indicator.completed .step-circle {
    background: white;
    color: var(--primary);
    border-color: white;
}

.step-label {
    font-size: 0.8rem;
    text-align: center;
    color: rgba(255,255,255,0.8);
    font-weight: 500;
}

.step-indicator.active .step-label,
.step-indicator.completed .step-label {
    color: white;
    font-weight: 600;
}

/* Form Section */
.form-section {
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
    padding: 4rem 0;
}

/* Step Sections */
.step-section {
    margin-bottom: 6rem;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 0.8s ease forwards;
}

.step-section:nth-child(2) { animation-delay: 0.2s; }
.step-section:nth-child(3) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}

/* Step Header */
.step-header {
    display: flex;
    align-items: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    position: relative;
    overflow: hidden;
}

.step-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(45deg, rgba(255,255,255,0.1), transparent);
    transform: skewX(-20deg);
}

.step-number {
    font-size: 3rem;
    font-weight: 900;
    margin-right: 1.5rem;
    opacity: 0.9;
    line-height: 1;
}

.step-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
}

.step-description {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
}

/* Step Content */
.step-content {
    padding: 3rem;
}

/* Form Styles */
.form-label {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.form-control, .form-select {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(209, 24, 79, 0.15);
    transform: translateY(-1px);
}

.required {
    color: #dc3545;
    font-weight: bold;
}

.optional {
    color: #28a745;
    font-size: 0.85rem;
}

/* Banner Styles */
.info-banner, .tip-banner {
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    border-left: 4px solid;
}

.info-banner {
    background: #e3f2fd;
    border-color: #2196f3;
    color: #1565c0;
}

.tip-banner {
    background: #fff3e0;
    border-color: #ff9800;
    color: #e65100;
}

.info-banner i, .tip-banner i {
    margin-right: 1rem;
    font-size: 1.2rem;
    margin-top: 0.1rem;
}

/* University Grid */
.university-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.university-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    border: 2px solid #f0f0f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.university-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.university-card.pegaso {
    border-color: #c53c5c;
}

.university-card.mercatorum {
    border-color: #2196f3;
}

.university-card.sanraffaele {
    border-color: #4caf50;
}

.university-logo {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.logo-img {
    max-height: 100%;
    max-width: 150px;
    object-fit: contain;
}

.university-name {
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.university-description {
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.download-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.download-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    text-decoration: none;
    color: var(--dark);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.download-item:hover {
    background: #e9ecef;
    color: var(--primary);
    text-decoration: none;
    transform: translateX(5px);
}

.download-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    margin-right: 1rem;
    font-size: 1.2rem;
}

.university-card.pegaso .download-icon {
    background: #c53c5c;
}

.university-card.mercatorum .download-icon {
    background: #2196f3;
}

.university-card.sanraffaele .download-icon {
    background: #4caf50;
}

.download-info {
    flex: 1;
}

.download-title {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
}

.download-subtitle {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.2rem;
}

.download-action {
    color: #6c757d;
    font-size: 1.1rem;
}

/* Upload Styles */
.upload-section {
    margin-bottom: 3rem;
}

.upload-label {
    display: block;
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--dark);
}

.upload-area {
    border: 3px dashed #dee2e6;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    position: relative;
}

.upload-area:hover {
    border-color: var(--primary);
    background: #f0f8ff;
}

.upload-area.optional {
    border-color: #28a745;
}

.upload-area.optional:hover {
    border-color: #28a745;
    background: #f0fff4;
}

.file-input {
    display: none;
}

.upload-trigger {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    margin-bottom: 1rem;
}

.upload-trigger:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.upload-area.optional .upload-trigger {
    background: #28a745;
}

.upload-area.optional .upload-trigger:hover {
    background: #218838;
}

.upload-trigger i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.upload-info {
    color: #6c757d;
    font-size: 0.9rem;
}

.upload-info p {
    margin: 0.25rem 0;
}

.file-selected {
    color: #28a745;
    font-weight: 600;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: #d4edda;
    border-radius: 8px;
    display: none;
}

/* Privacy Section */
.privacy-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid #dee2e6;
}

.privacy-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.privacy-item:last-child {
    margin-bottom: 0;
}

.privacy-checkbox {
    margin-right: 1rem;
    margin-top: 0.25rem;
    transform: scale(1.2);
}

.privacy-label {
    display: flex;
    align-items: flex-start;
    font-size: 0.95rem;
    line-height: 1.5;
    cursor: pointer;
}

.privacy-label i {
    margin-right: 0.75rem;
    margin-top: 0.1rem;
    color: var(--primary);
}

/* Step Navigation */
.step-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #dee2e6;
}

.step-navigation.final {
    justify-content: space-between;
}

.step-navigation .btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.step-navigation .btn-lg {
    padding: 1rem 3rem;
    font-size: 1.1rem;
}

/* Scroll Animation */
html {
    scroll-behavior: smooth;
}

/* Responsive */
@media (max-width: 768px) {
    .step-header {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .step-number {
        margin-right: 0;
        margin-bottom: 1rem;
        font-size: 2.5rem;
    }

    .step-content {
        padding: 2rem 1.5rem;
    }

    .university-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .step-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .step-navigation .btn {
        width: 100%;
    }

    .progress-bar-custom {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }

    .progress-bar-custom::before {
        display: none;
    }

    .step-circle {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .step-label {
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .step-section {
        margin-bottom: 4rem;
    }

    .step-card {
        border-radius: 15px;
        margin: 0 -15px;
    }

    .upload-area {
        padding: 1.5rem 1rem;
    }

    .privacy-section {
        padding: 1.5rem;
        margin: 1.5rem -15px;
    }

    .download-item {
        padding: 0.75rem;
    }

    .download-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .download-title {
        font-size: 0.85rem;
    }

    .download-subtitle {
        font-size: 0.75rem;
    }
}

/* Descrizione step e submit brand (contrasto su header rosa) */
.step-header .step-description { color: rgba(255,255,255,.9); margin-bottom: 0; }
.cfu-submit {
    background: var(--cf-primary);
    border-color: var(--cf-primary);
    color: #fff;
    font-weight: 700;
    border-radius: 50px;
}
.cfu-submit:hover { background: var(--cf-primary-dark); border-color: var(--cf-primary-dark); color: #fff; }
