/* ============================
   FORMULARIOS (ESTILO PRO + UI VALIDATIONS)
   ============================ */

/* Reset y base */
*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  background: #ece9f3;
}

/* Contenedor principal */
.form-shell {
  max-width: 780px;
  margin: 32px auto 40px;
  padding: 0 10px 24px;
  background: transparent;
  border: none;
  box-shadow: none;
}

/* Header */
.form-bar {
  background: linear-gradient(90deg, rgba(231,34,133,1) 0%, rgba(71,12,157,1) 70%);
  color: #fff;
  padding: 52px 20px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.form-bar img { height: 64px; width: auto; }
.form-hero-img {
  height: 68px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}
.section-hero-img {
  display: block;
  max-width: 340px;
  width: 90%;
  height: auto;
  margin: 12px auto 0;
  object-fit: contain;
}
#medioambienteLogoDenuncia,
#medioambienteLogoResiduos,
#discapacidadLogo {
  max-width: 380px;
  width: 100%;
}

.form-bar h2 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 700;
  text-align: center;
  flex: 1;
}

/* Bloque formulario */
.secretaria-form {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 20px 10px;
  background: transparent;
  border-radius: 12px;
}

/* Encabezado interno */
.secretaria-header {
  background: #ffffff;
  border-radius: 12px 12px 0 0;
  border: 1px solid #e8eaed;
  padding: 22px 24px 18px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  position: relative;
  text-align: center;
}

.secretaria-header::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  border-radius: 12px 12px 0 0;
  background: #673ab7;
}

.secretaria-header h3 {
  margin: 12px 0 6px 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: #202124;
}

.secretaria-header p {
  margin: 0;
  color: #5f6368;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Form */
.secretaria-form form {
  background: #ffffff;
  border: 1px solid #e8eaed;
  border-top: none;
  padding: 22px 24px 22px;
  border-radius: 0 0 12px 12px;
}

/* GRID: SIEMPRE 1 COLUMNA (uno debajo del otro) */
.secretaria-form .form-grid {
  display: grid;
  grid-template-columns: 1fr !important;
  gap: 18px;
  max-width: 720px;
  margin: 0 auto;
}

/* Labels */
.secretaria-form form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #202124;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.25;
  margin: 0;
}
.label-title,
.radio-label-title {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  flex-wrap: wrap;
  white-space: normal;
  line-height: 1.35;
}
.required-star {
  display: inline;
  color: #c62828;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1;
  flex: 0 0 auto;
}
.required-star::before { content: "\00A0"; }

/* Inputs / Select / Textarea */
.secretaria-form input,
.secretaria-form select,
.secretaria-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #dadce0;
  background: #fff;
  color: #202124;
  font-size: 0.96rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.secretaria-form input,
.secretaria-form select {
  height: 44px;
}

.secretaria-form textarea {
  resize: vertical;
  min-height: 130px;
  line-height: 1.45;
}

.secretaria-form input::placeholder,
.secretaria-form textarea::placeholder { color: #9aa0a6; }

.secretaria-form input:focus,
.secretaria-form select:focus,
.secretaria-form textarea:focus {
  border-color: #673ab7;
  box-shadow: 0 0 0 3px rgba(103,58,183,0.15);
  background-color: #fff;
}

/* =========================
   Radios (tipo denunciante / infractor)
   ========================= */
.radio-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start !important;
  margin-top: 6px;
  padding: 16px 18px;
  border-radius: 10px;
  border: 1px solid #e8eaed;
  background: #f8f9fb;
}

.radio-label-title {
  font-weight: 700;
  margin-bottom: 4px;
  color: #37474f;
  font-size: 0.95rem;
}

.radio-stack label {
  width: 100%;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  font-weight: 500 !important;
  margin: 0;
  line-height: 1.35;
  color: #37474f;
  font-size: 0.95rem;
  white-space: normal !important;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background-color .18s ease, transform .12s ease;
}

.radio-stack label:hover {
  background: rgba(103,58,183,0.06);
}

.radio-stack input[type="radio"],
.radio-stack input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0 !important;
  accent-color: #673ab7;
  flex-shrink: 0;
}

/* Botones */
.step-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
}

.btn-primary,
.btn-secondary {
  border: none;
  padding: 10px 22px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.08s ease;
  font-size: 0.93rem;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
}

.btn-primary { background: #673ab7; color: #ffffff; }
.btn-primary:hover { background: #5e35b1; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transform: translateY(-1px); }

.btn-secondary { background: #f1f3f4; color: #1f1f1f; }
.btn-secondary:hover { background: #e4e6e8; }

/* Feedback */
.form-feedback { margin-top: 10px; font-weight: 500; font-size: 0.9rem; }
.form-feedback.sending { color: #c17d00; }
.form-feedback.success { color: #1b8a4a; }
.form-feedback.error { color: #c62828; }

.d-none { display: none !important; }

/* Footer */
.form-footer {
  margin-top: 10px;
  background: linear-gradient(90deg, rgba(231,34,133,1) 0%, rgba(71,12,157,1) 70%);
  color: #fff;
  text-align: center;
  padding: 14px 14px;
  border-radius: 10px;
  font-size: 0.95rem;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.12);
}

/* ============================
   VALIDACIÓN VISUAL + ANIMACIONES
   ============================ */

/* Estado inválido (borde rojo + glow) */
.is-invalid{
  border-color: #d93025 !important;
  box-shadow: 0 0 0 3px rgba(217,48,37,0.16) !important;
}

/* Mensaje error bajo el campo */
.field-error{
  margin-top: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #d93025;
  opacity: 0;
  transform: translateY(-4px);
  animation: fadeDown .18s ease forwards;
}

/* Radios inválidos (borde rojo del bloque) */
.radio-stack.is-invalid{
  border-color: #d93025 !important;
  box-shadow: 0 0 0 3px rgba(217,48,37,0.12) !important;
}

/* Animación suave entrada del mensaje */
@keyframes fadeDown{
  to { opacity: 1; transform: translateY(0); }
}

/* Pequeño “shake” al fallar */
.shake{
  animation: shake .22s ease;
}

@keyframes shake{
  0%{ transform: translateX(0); }
  25%{ transform: translateX(-4px); }
  50%{ transform: translateX(4px); }
  75%{ transform: translateX(-3px); }
  100%{ transform: translateX(0); }
}

/* ============================
   Modo oscuro
   ============================ */
.dark-mode .secretaria-form form { background: #1f2333; border-color: #2f3447; }
.dark-mode .secretaria-form .secretaria-header { background: #1f2333; border-color: #2f3447; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
.dark-mode .secretaria-form .secretaria-header::before { background: linear-gradient(90deg, #b86bff 0%, #7c4dff 60%, #5d35b1 100%); }
.dark-mode .secretaria-form .secretaria-header h3 { color: #f8f9fb; }
.dark-mode .secretaria-form .secretaria-header p { color: #d1d5e1; }
.dark-mode .secretaria-form form label { color: #e8eaf1; }

.dark-mode .secretaria-form input,
.dark-mode .secretaria-form select,
.dark-mode .secretaria-form textarea {
  background: #15192b;
  color: #f8f9fb;
  border: 1px solid #3a3f52;
}

.dark-mode .secretaria-form input:focus,
.dark-mode .secretaria-form select:focus,
.dark-mode .secretaria-form textarea:focus {
  border-color: #8ab4f8;
  box-shadow: 0 0 0 3px rgba(138, 180, 248, 0.18);
}

.dark-mode .radio-stack {
  background: rgba(255,255,255,0.04);
  border-color: #2f3447;
}

.dark-mode .radio-label-title { color: #dfe3f2; }
.dark-mode .radio-stack label { color: #dfe3f2; }