/* Estilo general */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f3f4f6;
  color: #1f2937;
  margin: 0;
  padding: 0;
}

/* Contenedor principal */
.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 1rem;
}

/* Título principal */
.title {
  text-align: center;
  color: #2563eb;
  font-size: 2rem;
  margin-bottom: 2rem;
}

/* Botón */
.button {
  background-color: #3b82f6;
  color: white;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 1rem;
  transition: background-color 0.3s ease;
}

.button:hover {
  background-color: #2563eb;
}

/* Grid de posts */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.post-card {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.2s ease;
}

.post-card:hover {
  transform: translateY(-3px);
  background-color: #f9fafb;
}

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

.post-card-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #2563eb;
  margin: 1rem;
}

/* Formulario */
.form {
  background-color: #ffffff;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.form-group {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}

label {
  margin-bottom: 0.5rem;
  font-weight: 600;
}

input[type="text"],
textarea,
input[type="file"] {
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  font-size: 1rem;
}

/* Botón submit del formulario */
.submit-btn {
  background-color: #3b82f6;
  color: white;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.submit-btn:hover {
  background-color: #2563eb;
}

/* Mensaje de error */
.error {
  color: red;
  font-size: 0.9rem;
}

/* Paginación */
.pagination {
  text-align: center;
  margin-top: 2rem;
}

/* Responsive */
@media (max-width: 600px) {
  .container {
      margin: 1rem;
      padding: 1rem;
  }

  .post-card img {
      height: 150px;
  }

  .title {
      font-size: 1.5rem;
  }
}

.post-container {
  background-color: #fff;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.post-container h1 {
  color: #2563eb;
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.post-container p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.post-container strong {
  color: #333;
}

.back-link,
.edit-link {
  display: inline-block;
  margin-bottom: 1rem;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

.back-link {
  color: #2563eb;
}

.back-link:hover {
  color: #1e40af;
}

.edit-link {
  color: #facc15;
}

.edit-link:hover {
  color: #d97706;
}

.delete-button {
  background-color: #ef4444;
  color: white;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.delete-button:hover {
  background-color: #b91c1c;
}

img.post-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 10px;
}

