/* Estilos gerais */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1, h2, h3 {
    color: #2c3e50;
}

/* Formulário */
form {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="text"],
input[type="file"],
textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Botões */
.btn-salvar, .btn-listar, .btn-cadastrar, .btn-voltar {
    display: inline-block;
    padding: 10px 15px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
}

.btn-salvar:hover, .btn-listar:hover, .btn-cadastrar:hover, .btn-voltar:hover {
    background: #2980b9;
}

.btn-listar, .btn-cadastrar, .btn-voltar {
    background: #2ecc71;
}

.btn-listar:hover, .btn-cadastrar:hover, .btn-voltar:hover {
    background: #27ae60;
}

/* Mensagens */
.mensagem {
    padding: 10px;
    background: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Lista de materiais */
.materiais-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.material-card {
    background: #fff;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.material-card:hover {
    transform: translateY(-5px);
}

.material-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.material-card .sem-foto {
    width: 100%;
    height: 200px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
}

.material-card h3 {
    margin: 10px;
    font-size: 18px;
}

.material-card p {
    margin: 0 10px 10px;
    color: #666;
    font-size: 14px;
}

.material-card a {
    text-decoration: none;
    color: inherit;
}

/* Detalhes do material */
.material-detalhes {
    display: flex;
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.material-foto {
    flex: 1;
    margin-right: 20px;
}

.material-foto img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.material-info {
    flex: 2;
}

.material-info p {
    margin-bottom: 10px;
}

.material-info strong {
    color: #2c3e50;
}

@media (max-width: 768px) {
    .material-detalhes {
        flex-direction: column;
    }
    
    .material-foto {
        margin-right: 0;
        margin-bottom: 20px;
    }
}