@charset "UTF-8";

:root {
  --mh-bg-overlay: rgba(12, 18, 28, 0.72);
  --mh-surface: rgba(255, 255, 255, 0.08);
  --mh-surface-input: rgba(173, 216, 230, 0.35);
  --mh-text: #f8f6f2;
  --mh-text-muted: rgba(248, 246, 242, 0.75);
  --mh-accent: #c9a962;
  --mh-accent-hover: #dfc07a;
  --mh-error: #ff8a8a;
  --mh-radius: 6px;
  --mh-font-display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --mh-font-ui: "Source Sans 3", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.portal-body {
  margin: 0;
  min-height: 100vh;
  color: var(--mh-text);
  font-family: var(--mh-font-ui);
  background:
    linear-gradient(165deg, rgba(8, 14, 24, 0.55), rgba(8, 14, 24, 0.85)),
    url("https://images.unsplash.com/photo-1600585154340-be6161a56a0c?auto=format&fit=crop&w=1920&q=80")
    center / cover fixed no-repeat;
  background-color: #0a0f16;
}

body.portal-body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--mh-bg-overlay);
  pointer-events: none;
  z-index: 0;
}

.portal-wrap {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.portal-brand {
  text-align: center;
  margin-bottom: 2rem;
}

.portal-brand h1 {
  font-family: var(--mh-font-display);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 2.75rem);
  letter-spacing: 0.04em;
  margin: 0 0 0.35rem;
}

.portal-brand p {
  margin: 0;
  color: var(--mh-text-muted);
}

.portal-form section {
  margin-bottom: 2.25rem;
}

.portal-form h2 {
  font-family: var(--mh-font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.field {
  margin-bottom: 1.1rem;
}

.field label,
.field legend {
  display: block;
  font-family: var(--mh-font-display);
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.req {
  color: #ff6b6b;
}

.field-hint {
  font-size: 0.85rem;
  color: var(--mh-text-muted);
  margin-top: 0.35rem;
}

.grid-2 {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="file"],
select,
textarea {
  width: 100%;
  font: inherit;
  color: #0f1720;
  background: var(--mh-surface-input);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--mh-radius);
  padding: 0.65rem 0.75rem;
}

input.underline,
select.underline {
  background: transparent;
  color: var(--mh-text);
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 0;
  padding-left: 0;
}

/* El listado nativo del <select> suele tener fondo claro; sin esto las opciones heredan texto claro. */
select.underline option {
  color: #0f1720;
  background-color: #fff;
}

textarea {
  min-height: 110px;
  resize: vertical;
  background: rgba(255, 255, 255, 0.06);
  color: var(--mh-text);
  border-color: rgba(255, 255, 255, 0.35);
}

.multi-check {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--mh-radius);
  max-height: 220px;
  overflow: auto;
  padding: 0.5rem;
}

.multi-check label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mh-font-ui);
  font-size: 0.95rem;
  padding: 0.35rem 0.25rem;
  cursor: pointer;
}

.multi-check input {
  width: auto;
}

/* Multi-select desplegable (zonas de actuación, estilo Zoho Forms) */
.multi-select {
  position: relative;
}

.multi-select__box {
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.55);
  border-radius: var(--mh-radius);
}

.multi-select__control {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.5rem 0.65rem;
  text-align: left;
  font: inherit;
  color: var(--mh-text);
  background: transparent;
  border: none;
  cursor: pointer;
}

.multi-select__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-height: 0;
}

.multi-select__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.9);
  padding: 0.15rem 0.4rem;
  font-size: 0.9rem;
  line-height: 1.3;
}

.multi-select__chip-remove {
  cursor: pointer;
  opacity: 0.9;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.1rem;
  margin: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
}

.multi-select__chip-remove:hover {
  opacity: 1;
}

.multi-select__hint {
  display: block;
  margin-top: 0.35rem;
  color: var(--mh-text-muted);
  font-size: 0.95rem;
}

.multi-select__panel {
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  max-height: 220px;
  overflow: auto;
  padding: 0.35rem 0.5rem 0.5rem;
}

.multi-select__option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mh-font-ui);
  font-size: 0.95rem;
  padding: 0.35rem 0.25rem;
  cursor: pointer;
}

.multi-select__option input {
  width: auto;
  accent-color: #fff;
}

.radio-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mh-font-ui);
  cursor: pointer;
}

.radio-table {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.5rem 1rem;
  align-items: center;
  max-width: 280px;
}

.radio-table .head {
  font-size: 0.85rem;
  text-align: center;
  color: var(--mh-text-muted);
}

.file-drop {
  border: 2px dashed rgba(255, 255, 255, 0.45);
  border-radius: var(--mh-radius);
  padding: 1rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.25);
}

.file-drop input[type="file"] {
  background: transparent;
  border: none;
  color: var(--mh-text);
}

.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--mh-radius);
  margin-bottom: 1.25rem;
}

.alert-error {
  background: rgba(255, 80, 80, 0.2);
  border: 1px solid rgba(255, 120, 120, 0.5);
}

.alert-success {
  background: rgba(80, 200, 120, 0.2);
  border: 1px solid rgba(120, 220, 150, 0.45);
}

.form-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  border-radius: var(--mh-radius);
  border: 1px solid transparent;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}

.btn-primary {
  background: var(--mh-accent);
  color: #1a1205;
}

.btn-primary:hover {
  background: var(--mh-accent-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--mh-text);
  border-color: rgba(255, 255, 255, 0.35);
}

.portal-landing {
  text-align: center;
  padding: 3rem 0 2rem;
}

.portal-landing .cards {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

@media (min-width: 640px) {
  .portal-landing .cards {
    grid-template-columns: 1fr 1fr;
  }
}

.card-link {
  display: block;
  padding: 1.5rem;
  border-radius: var(--mh-radius);
  background: var(--mh-surface);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}

.card-link:hover {
  border-color: var(--mh-accent);
  transform: translateY(-2px);
}

.card-link h3 {
  font-family: var(--mh-font-display);
  margin: 0 0 0.5rem;
}

.card-link p {
  margin: 0;
  color: var(--mh-text-muted);
  font-size: 0.95rem;
}

.card-link.disabled {
  opacity: 0.55;
  pointer-events: none;
}

.portal-wrap--wizard {
  max-width: 1040px;
}

.wizard-steps {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.25rem;
  position: relative;
}

.wizard-steps::before {
  content: "";
  position: absolute;
  top: 1.1rem;
  left: 8%;
  right: 8%;
  height: 2px;
  background: rgba(255, 255, 255, 0.35);
  z-index: 0;
}

.wizard-steps li {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.wizard-steps button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--mh-text);
  font: inherit;
  cursor: default;
}

.wizard-steps li.is-done button {
  cursor: pointer;
}

.wizard-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  font-weight: 600;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.35);
  color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.wizard-steps li.is-active .wizard-step-num {
  background: #2b8cff;
  box-shadow: 0 0 0 3px rgba(43, 140, 255, 0.35);
}

.wizard-steps li.is-done .wizard-step-num {
  background: rgba(43, 140, 255, 0.55);
}

.wizard-step-label {
  font-family: var(--mh-font-display);
  font-size: clamp(0.55rem, 1.4vw, 0.72rem);
  letter-spacing: 0.06em;
  line-height: 1.25;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  max-width: 11rem;
  margin: 0 auto;
}

.wizard-steps li.is-active .wizard-step-label {
  color: #6eb8ff;
  font-weight: 600;
}

.wizard-panel[hidden] {
  display: none !important;
}

.portal-wizard--sections-visible .wizard-panel {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.portal-wizard--sections-visible .wizard-panel:last-of-type {
  border-bottom: none;
  margin-bottom: 1rem;
}

.wizard-steps--many {
  overflow-x: auto;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 0.5rem;
  padding-bottom: 0.35rem;
  -webkit-overflow-scrolling: touch;
}

.wizard-steps--many li {
  flex: 0 0 auto;
  min-width: 4.25rem;
}

.wizard-steps--many .wizard-step-label {
  max-width: 5.5rem;
  font-size: 0.5rem;
}

.wizard-steps--many button {
  cursor: pointer;
}

.portal-wizard--sections-visible .wizard-actions {
  position: sticky;
  bottom: 0;
  z-index: 20;
  margin-top: 1rem;
  padding: 1rem 0 1.25rem;
  background: linear-gradient(
    to top,
    rgba(10, 15, 22, 0.98) 70%,
    rgba(10, 15, 22, 0.85) 90%,
    transparent
  );
  backdrop-filter: blur(6px);
}

.wizard-actions [hidden] {
  display: none !important;
}

.wizard-substep {
  font-size: 0.9rem;
  color: var(--mh-text-muted);
  margin: -0.5rem 0 1rem;
}

.wizard-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.wizard-actions .actions-right {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.wizard-steps--7 .wizard-step-label {
  font-size: clamp(0.48rem, 1.1vw, 0.62rem);
  max-width: 6.5rem;
}

.wizard-steps--7 .wizard-step-num {
  width: 1.9rem;
  height: 1.9rem;
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .wizard-steps::before {
    display: none;
  }

  .wizard-step-label {
    font-size: 0.5rem;
    max-width: 4.5rem;
  }

  .wizard-steps--7 .wizard-step-label {
    font-size: 0.42rem;
    max-width: 2.75rem;
  }
}
