
/* CSS per Progetti Impact Manager - Frontend */

.pim-project-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.pim-project-header {
    text-align: center;
    margin-bottom: 30px;
}

.pim-project-header h2 {
    margin-bottom: 10px;
    color: #333;
}

.project-excerpt {
    font-size: 18px;
    color: #666;
    line-height: 1.6;
}

/* Accordion Styles */
.pim-accordion {
    margin-bottom: 30px;
}

.pim-accordion-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pim-accordion-header {
    padding: 0;
    margin: 0;
}

.pim-accordion-button {
    width: 100%;
    padding: 15px 20px;
    background: none;
    border: none;
    color: white;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.pim-accordion-button:hover {
    opacity: 0.9;
}

.pim-accordion-button.collapsed::after {
    content: "+";
    font-size: 20px;
}

.pim-accordion-button:not(.collapsed)::after {
    content: "−";
    font-size: 20px;
}

.dimension-score-badge {
    background: rgba(255,255,255,0.2);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
}

.pim-accordion-collapse {
    display: none;
}

.pim-accordion-collapse.show {
    display: block;
}

.pim-accordion-body {
    padding: 20px;
    background: white;
    border-top: 1px solid #eee;
}

/* Project Details */
.pim-project-details {
    margin-bottom: 20px;
}

.pim-detail-field {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.pim-detail-field:last-child {
    border-bottom: none;
}

.pim-detail-field h5 {
    margin: 0 0 5px 0;
    color: #333;
    font-weight: bold;
}

.pim-detail-field p {
    margin: 0;
    color: #666;
    line-height: 1.5;
}

/* Section Scores */
.pim-section-scores {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.pim-section-score {
    margin-bottom: 15px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
}

.pim-section-score h5 {
    margin: 0 0 5px 0;
    color: #333;
}

.score-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.score-badge {
    background: #0073aa;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
}

.score-info p {
    margin: 0;
    flex: 1;
    font-size: 14px;
    color: #666;
}

/* Chart Styles */
.pim-chart-container {
    text-align: center;
}

.pim-circular-chart {
    width: 120px;
    height: 120px;
    margin: 0 auto 10px;
}

.pim-chart-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.pim-progress-circle {
    transition: stroke-dashoffset 1s ease-out;
}

.pim-chart-text {
    font-size: 18px;
    font-weight: bold;
    transform: rotate(90deg);
    text-anchor: middle;
    dominant-baseline: central;
}

.pim-chart-label {
    font-size: 14px;
    color: #666;
    font-weight: bold;
}

/* Final Summary */
.pim-final-summary {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-top: 30px;
}

.pim-final-summary h3 {
    margin-bottom: 20px;
    color: #333;
}

.pim-horizontal-charts {
    margin-bottom: 20px;
}

.pim-horizontal-chart {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 15px;
}

.chart-label {
    min-width: 200px;
    font-weight: bold;
    color: #333;
    text-align: left;
}

.chart-bar {
    flex: 1;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.chart-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease-out;
}

.chart-value {
    min-width: 40px;
    text-align: right;
    font-weight: bold;
    color: #333;
}

.pim-final-score {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.final-score-display {
    font-size: 48px;
    font-weight: bold;
    color: #333;
    margin: 10px 0;
}

.final-score-number {
    color: #0073aa;
}

.final-score-max {
    color: #666;
    font-size: 24px;
}

/* Form Styles */
.pim-project-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.pim-form-section {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pim-dimension-section {
    border-left: 4px solid #0073aa;
    padding-left: 16px;
}

.pim-form-section h3 {
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.pim-form-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.pim-form-field {
    margin-bottom: 15px;
}

.pim-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.pim-form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.pim-form-control:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

/* Scoring Sections */
.pim-scoring-sections {
    margin-top: 20px;
}

.pim-scoring-section {
    background: #f9f9f9;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    border-left: 3px solid #0073aa;
}

.pim-scoring-section h4 {
    margin-bottom: 15px;
    color: #333;
}

.pim-score-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pim-score-option {
    background: white;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pim-score-option:hover {
    border-color: #0073aa;
    background: #f0f8ff;
}

.pim-score-option label {
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-weight: normal;
}

.pim-score-option input[type="radio"] {
    margin: 0;
    flex-shrink: 0;
}

.score-number {
    font-weight: bold;
    color: #0073aa;
    min-width: 15px;
}

.score-description {
    flex: 1;
    line-height: 1.4;
}

.pim-form-submit {
    text-align: center;
    margin-top: 30px;
}

.pim-submit-button {
    background: #0073aa;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.pim-submit-button:hover {
    background: #005a87;
}

/* Success Message */
.pim-success-message {
    background: #d1edff;
    border: 1px solid #0073aa;
    color: #0073aa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

/* Lista Progetti */
.pim-progetti-lista {
    display: grid;
    gap: 20px;
}

.pim-progetto-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pim-progetto-item h3 {
    margin-bottom: 10px;
}

.pim-progetto-item h3 a {
    text-decoration: none;
    color: #0073aa;
}

.pim-progetto-item h3 a:hover {
    text-decoration: underline;
}

.pim-progetto-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    color: #666;
    font-size: 14px;
}

.pim-read-more {
    display: inline-block;
    margin-top: 10px;
    color: #0073aa;
    text-decoration: none;
    font-weight: bold;
}

.pim-read-more:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .pim-form-fields-grid {
        grid-template-columns: 1fr;
    }
    
    .pim-horizontal-chart {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .chart-label {
        min-width: auto;
        margin-bottom: 5px;
    }
    
    .final-score-display {
        font-size: 36px;
    }
}

/* Utility Classes */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col-md-4,
.col-md-8 {
    padding-right: 15px;
    padding-left: 15px;
}

.col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.col-md-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
}

@media (max-width: 768px) {
    .col-md-4,
    .col-md-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}
        