/* General */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  font-family: 'Poppins', sans-serif;
  background-color: #f4f4f4;
}

main {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
  color: #333;
  line-height: 1.6;
}

/* Títulos */
main h1, main h2, main h3 {
  font-family: 'Poppins', sans-serif;
  color: #2a7;
  margin-bottom: 10px;
}

/* Párrafos */
main p {
  text-align: justify;
  margin-bottom: 16px;
}

/* Enlaces */
a {
  color: #2a7;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Imagen destacada del post */
main img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin-top: 10px;
  margin-bottom: 20px;
  display: block;
}

/* Área de comentarios */
main textarea {
  width: 100%;
  font-family: 'Helvetica', sans-serif;
  font-size: 1rem;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  resize: vertical;
  box-sizing: border-box;
}

main button[type="submit"] {
  background-color: #2a7;
  color: #fff;
  border: none;
  padding: 10px 16px;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s;
}

main button[type="submit"]:hover {
  background-color: #1f5e5a;
}

/* Botón */
button {
  padding: 10px 20px;
  background-color: #2E7D32;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #004225;
}


/* Comentarios */
.comentario {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 18px;
  background-color: #f9f9f9;
}

.comentario-contenido {
  margin-bottom: 10px;
}

.comentario strong {
  font-weight: bold;
  color: #2a7;
}

.comentario-fecha {
  font-size: 0.9em;
  color: #666;
  margin-left: 6px;
}

.comentario-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

/* Reacciones */
.post-ratings-container {
  display: flex;
  gap: 14px;
  align-items: center;
}

.post-rating {
  display: flex;
  align-items: center;
}

.post-rating-button {
  margin-right: 4px;
  cursor: pointer;
  color: #555;
}

.post-rating-selected > .post-rating-button,
.post-rating-selected > .post-rating-count {
  color: #009578;
}

.post-rating-button:hover {
  color: #000;
}

/* Botón eliminar */
.eliminar-btn {
  background-color: transparent;
  color: #d00;
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.eliminar-btn:hover {
  background-color: #ffe6e6;
  text-decoration: none;
}

/* Botones de navegación */
.volver-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.volver-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #2e7d32;
  color: white;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.3s ease;
  font-weight: 500;
  font-size: 0.95rem;
}

.volver-btn:hover {
  background-color: #256429;
}

/* Formulario de comentario */
.form-comentario {
  margin-bottom: 30px;
}

.menu-hidden {
  position: fixed;
  top: 70px;
  left: 0;
  width: 250px;
  height: calc(100% - 70px);
  background-color: white;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.2);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 1000;
  padding: 1rem;
  overflow-y: auto;
}

.menu-visible {
  transform: translateX(0);
}

.menu-toggle {
  background: none;
  border: none;
  font-size: 24px;
  margin-left: auto;
  cursor: pointer;
}


/* Estilo para los enlaces del menú */
#mobile-menu ul {
  list-style: none;
  padding: 0;
}

#mobile-menu ul li {
  margin: 10px 0;
}

#mobile-menu a {
  color: #212121;
  text-decoration: none;
  font-weight: 500;
}

#mobile-menu a:hover {
  color: #2e7d32;
}

/* Estilo para input y botón en móvil */
.search-mobile input[type="text"] {
  width: 100%;
  padding: 8px;
  border: 2px solid #2e7d32;
  border-radius: 6px;
  font-family: 'Poppins', sans-serif;
}

.search-mobile button {
  margin-top: 8px;
  width: 100%;
  background-color: #2e7d32;
  color: #fff;
  font-weight: bold;
  padding: 8px 0;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
}

.search-mobile button:hover {
  background-color: #256429;
}

/* Estilo para barra de búsqueda principal */
input[type="text"] {
  padding: 10px 14px;
  border-radius: 10px;
  border: 2px solid #2E7D32;
  background-color: #fff;
  color: #212121;
  font-size: 16px;
  width: 270px;
  outline: none;
  transition: border-color 0.3s ease;
  box-shadow: none;
}

input[type="text"]::placeholder {
  color: #999;
  font-style: italic;
}

input[type="text"]:focus {
  border-color: #FF5722;
  box-shadow: none;
}



/* Responsive para pantallas pequeñas */
@media (max-width: 600px) {
  main {
    padding: 1rem;
  }

  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .volver-btn {
    width: 100%;
    justify-content: center;
  }
}
