/* Repository File Tecnici - Frontend Styles */

.repository-file-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header */
.repo-header {
    background: #006400;
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 100, 0, 0.3);
}

.repo-header-content {
    max-width: 600px;
    margin: 0 auto;
}

.repo-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

.repo-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    color: white;
}

.repo-subtitle {
    font-size: 1.2rem;
    margin: 0;
    color: #fff900;
    opacity: 1;
}

/* Barra di ricerca */
.search-container {
    margin-bottom: 2rem;
}

.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #7f8c8d;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #ecf0f1;
    border-radius: 50px;
    font-size: 1.1rem;
    background: #c6ffc8;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #006400;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 100, 0, 0.1);
}

/* Griglia categorie */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.category-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #ecf0f1;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.category-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.category-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.category-title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    flex-grow: 1;
}

.file-count {
    background: #ecf0f1;
    color: #7f8c8d;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Lista file */
.files-list {
    margin-bottom: 1.5rem;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 0.8rem;
    transition: all 0.2s ease;
}

.file-item:hover {
    background: #e9ecef;
}

.file-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.file-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

.file-size {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.file-actions {
    display: flex;
    gap: 0.5rem;
}

.download-btn, .delete-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.download-btn {
    background: #007bff;
    color: white;
}

.download-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.delete-btn {
    background: #dc3545;
    color: white;
}

.delete-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.btn-icon {
    font-size: 1rem;
}

/* Sezione aggiungi file */
.add-file-section {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    background: #f8f9fa;
}

.add-file-placeholder {
    margin-bottom: 1rem;
}

.placeholder-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.placeholder-text {
    color: #6c757d;
    font-size: 0.9rem;
}

.add-file-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-file-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

/* Modal */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: #6c757d;
    line-height: 1;
}

.close:hover {
    color: #343a40;
}

.modal-content h2 {
    margin: 0 0 1.5rem 0;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #006400;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.button-primary {
    background: #007bff;
    color: white;
}

.button-primary:hover {
    background: #0056b3;
}

.button-secondary {
    background: #6c757d;
    color: white;
}

.button-secondary:hover {
    background: #545b62;
}

/* Responsive */
@media (max-width: 768px) {
    .repo-header {
        padding: 2rem 1rem;
    }
    
    .repo-title {
        font-size: 2rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .category-card {
        padding: 1rem;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .file-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

/* Animazioni */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-card {
    animation: fadeIn 0.6s ease-out;
}

.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }
.category-card:nth-child(4) { animation-delay: 0.4s; }
.category-card:nth-child(5) { animation-delay: 0.5s; }
.category-card:nth-child(6) { animation-delay: 0.6s; }
