/* Reset básico */
* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: #222;
  background: #f5f5f7;
  padding: 20px;
}

/* Contenedor principal */
.container {
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

h1, h2, h3 {
  margin-bottom: 20px;
  color: #111;
}

a {
  color: #0066cc;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Tablas del admin index.php */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}
th, td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid #e5e5e5;
}
th {
  background: #f8f8f8;
  font-weight: 600;
}
tr:hover {
  background: #fafafa;
}

/* Botones y acciones */
.btn {
  display: inline-block;
  padding: 10px 18px;
  background: #0066cc;
  color: #fff;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 14px;
}
.btn:hover {
  background: #0052a3;
  text-decoration: none;
}
.btn-danger {
  background: #d92d20;
}
.btn-danger:hover {
  background: #b42318;
}
.acciones a {
  margin-right: 10px;
  font-size: 14px;
}

/* Formularios crear.php y actualizar.php */
label {
  display: block;
  margin: 15px 0 5px;
  font-weight: 600;
}
input[type="text"], 
input[type="file"], 
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  font-size: 15px;
}
input[type="text"]:focus, 
textarea:focus {
  outline: none;
  border-color: #0066cc;
  box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}
textarea {
  min-height: 300px;
  resize: vertical;
}
input[type="checkbox"] {
  margin-right: 8px;
}

/* Imágenes */
img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
.post-imagen-destacada {
  margin: 20px 0;
}
.img-preview {
  width: 200px;
  margin: 10px 0;
  border: 1px solid #e5e5e5;
  padding: 5px;
}

/* Posts en el front post.php */
.post-contenido img {
  margin: 20px 0;
}
.post-contenido p {
  margin-bottom: 15px;
}

/* Responsive */
@media (max-width: 600px) {
  body { padding: 10px; }
  .container { padding: 20px; }
  th, td { padding: 8px; }
  .btn { width: 100%; text-align: center; margin-bottom: 10px; }
}