/* ============================================
   Bloque Preguntas y Respuestas – 2 columnas,
   botones y paginación con hover/focus consistentes
=============================================== */

:root {
  --nutri-primary: #0b3557;
  --nutri-secondary: #007b9e;
  --nutri-muted: #e5e9f2;
}

/* Contenedor */
.nutri-qa {
  margin-top: 50px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  padding: 28px;
}

/* Layout 2 columnas */
.nutri-qa.twocol {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 28px;
}
@media (max-width: 992px){
  .nutri-qa.twocol { grid-template-columns: 1fr; }
}

/* Título e intro */
.nutri-qa__intro h2 {
  color: var(--nutri-primary);
  margin: 0 0 6px 0;
  font-size: 1.6em;
}
.nutri-qa__desc { color: #546; margin: 2px 0 14px; }
.nutri-qa__count { color: #789; margin: 0 0 10px; }

/* ==========================================================
   BOTONES PRINCIPALES – color primario + hover/focus refinado
========================================================== */
.nutri-qa .nutri-btn,
.nutri-qa__toggle,
.nutri-qa__reply-btn,
.nutri-qa__loadmore,
.nutri-pagination .nutri-page-btn,
.nutri-qa-pagination .nutri-qa-page-btn {
  display: inline-block;
  background: var(--nutri-primary);
  color: #fff;
  border: 1px solid var(--nutri-primary);
  border-radius: 9999px;
  padding: 8px 18px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(11, 53, 87, 0.18);
  transition: background 0.25s ease, transform 0.15s ease, filter 0.25s ease, box-shadow 0.25s ease;
}

.nutri-qa .nutri-btn.small,
.nutri-pagination .nutri-page-btn,
.nutri-qa__loadmore,
.nutri-qa-pagination .nutri-qa-page-btn.small {
  padding: 7px 14px;
  font-size: 0.85rem;
}

/* Hover */
.nutri-qa .nutri-btn:hover,
.nutri-qa__toggle:hover,
.nutri-qa__reply-btn:hover,
.nutri-qa__loadmore:hover,
.nutri-pagination .nutri-page-btn:hover:not(:disabled),
.nutri-qa-pagination .nutri-qa-page-btn:hover:not(:disabled) {
  background: var(--nutri-secondary);
  border-color: var(--nutri-secondary);
  color: #fff;
  transform: translateY(-1px);
  filter: brightness(0.97);
  box-shadow: 0 10px 22px rgba(0, 123, 158, 0.25);
}

/* Focus (sin gris, con contorno azul claro) */
.nutri-qa .nutri-btn:focus,
.nutri-qa__toggle:focus,
.nutri-qa__reply-btn:focus,
.nutri-qa__loadmore:focus,
.nutri-pagination .nutri-page-btn:focus,
.nutri-qa-pagination .nutri-qa-page-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 123, 158, 0.35);
  background: var(--nutri-primary);
  border-color: var(--nutri-primary);
  color: #fff;
}

/* Active (click) */
.nutri-qa .nutri-btn:active,
.nutri-qa__toggle:active,
.nutri-qa__reply-btn:active,
.nutri-qa__loadmore:active,
.nutri-pagination .nutri-page-btn:active,
.nutri-qa-pagination .nutri-qa-page-btn:active {
  transform: scale(0.98);
  filter: brightness(0.93);
}

/* Deshabilitados */
.nutri-pagination .nutri-page-btn:disabled,
.nutri-qa-pagination .nutri-qa-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  background: var(--nutri-primary);
  border-color: var(--nutri-primary);
}

/* ==========================================================
   FORMULARIOS DE PREGUNTAS Y RESPUESTAS
========================================================== */
.nutri-qa__form,
.nutri-qa__form-answer {
  display: none;
  background: #f8fafc;
  border: 1px solid var(--nutri-muted);
  border-radius: 12px;
  padding: 16px;
  margin: 12px 0 14px;
}
.nutri-qa__form.open,
.nutri-qa__form-answer.open { display: block; }

.nutri-qa__form textarea,
.nutri-qa__form-answer textarea {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #ccd3da;
  padding: 10px;
  min-height: 80px;
  resize: vertical;
}

/* Legal */
.nutri-qa__legal {
  margin: 10px 0 12px;
  font-size: 0.92em;
  color: #444;
}
.nutri-qa__legal a { color: var(--nutri-secondary); text-decoration: underline; }

/* Mensajes */
.nutri-form-message,
.nutri-qa__flash {
  margin-top: 8px;
  font-size: 0.92em;
  border-radius: 8px;
  padding: 8px 10px;
}
.nutri-form-message.success,
.nutri-qa__flash.success { background: #e8f7ef; color: #165f2b; }
.nutri-form-message.error,
.nutri-qa__flash.error { background: #fde8e8; color: #a30000; }

/* ==========================================================
   PREGUNTAS Y RESPUESTAS
========================================================== */
.nutri-qa__item {
  border: 1px solid var(--nutri-muted);
  border-radius: 12px;
  padding: 16px;
  background: #f9fbfd;
  margin-bottom: 16px;
}
.nutri-qa__q-text { color: var(--nutri-primary); font-weight: 600; margin: 0 0 4px; }
.nutri-qa__meta { color: #7a8794; font-size: 0.9em; }

/* Acciones */
.nutri-qa__actions {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Respuestas */
.nutri-qa__answers {
  margin-top: 12px;
  padding-left: 0;
  border-left: 2px solid transparent;
}
.nutri-qa__answers.open { border-left: 2px solid #007b9e22; padding-left: 16px; }

.nutri-qa__answer {
  background: #fff;
  border: 1px solid var(--nutri-muted);
  border-radius: 10px;
  padding: 12px;
  margin: 10px 0;
}
.nutri-qa__a-text { margin: 0 0 6px; }
.nutri-qa__verified {
  display: inline-block;
  margin-left: 8px;
  background: #e6f5ff;
  color: #0b5780;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: .85em;
}

/* ==========================================================
   PAGINACIÓN (antigua y nueva nomenclatura)
========================================================== */
.nutri-pagination,
.nutri-qa-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.nutri-page-indicator,
.nutri-qa-page-indicator {
  color: var(--nutri-primary);
  font-weight: 600;
  font-size: 0.95rem;
}

/* ==========================================================
   RESPONSIVE
========================================================== */
@media (max-width:768px){
  .nutri-qa { padding:18px 16px; border-radius:10px; box-shadow:none; }
  .nutri-qa__intro h2 { font-size:1.3em; }
  .nutri-qa__item { padding:14px; }
}
