:root {
  --hg-verde: #2ab975;
  --hg-verde-oscuro: #07b075;
  --hg-azul: #29448e;
  --hg-azul-oscuro: #11264c;
  --hg-gris: #f4f7fb;
  --hg-texto: #2c3440;
  --hg-borde: #dfe7f1;
  --hg-blanco: #ffffff;
  --hg-error: #d92d20;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Poppins", Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(42, 185, 117, 0.12), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, var(--hg-gris) 100%);
  color: var(--hg-texto);
}

.hg-form-page {
  width: 100%;
  min-height: 100vh;
  padding: 34px 18px;
}

.hg-form-wrapper {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.hg-form-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 28px;
  align-items: center;
  background:
    radial-gradient(circle at 90% 20%, rgba(255, 255, 255, 0.20), transparent 28%),
    linear-gradient(135deg, var(--hg-azul-oscuro) 0%, #0b65c8 65%, #1eb8ee 100%);
  border-radius: 24px;
  padding: 34px;
  color: #ffffff;
  box-shadow: 0 18px 45px rgba(17, 38, 76, 0.22);
  margin-bottom: 24px;
}

.hg-form-hero::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  left: -120px;
  top: -120px;
  background: rgba(255, 255, 255, 0.10);
}

.hg-form-hero-content {
  position: relative;
  z-index: 2;
}

.hg-form-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 17px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 18px;
}

.hg-form-hero h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -1.5px;
  color: #ffffff;
}

.hg-form-hero p {
  max-width: 740px;
  margin: 18px 0 0;
  font-size: 17px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.84);
}

.hg-form-hero-card {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 20px;
  padding: 24px;
  backdrop-filter: blur(5px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.20);
}

.hg-form-hero-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hg-form-hero-card li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 700;
  margin-bottom: 12px;
  color: #ffffff;
}

.hg-form-hero-card li:last-child {
  margin-bottom: 0;
}

.hg-form-hero-card i {
  color: #7cffbd;
  margin-top: 4px;
}

.hg-form-shell {
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 14px 34px rgba(41, 68, 142, 0.13);
  border-top: 6px solid var(--hg-verde);
  overflow: hidden;
}

.hg-form-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 26px 30px;
  border-bottom: 1px solid var(--hg-borde);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.hg-form-header h2 {
  margin: 0;
  color: var(--hg-azul-oscuro);
  font-size: 27px;
  line-height: 1.2;
  font-weight: 900;
}

.hg-form-header p {
  margin: 8px 0 0;
  color: #637083;
  font-weight: 600;
}

.hg-form-meta {
  display: grid;
  gap: 8px;
  min-width: 240px;
  padding: 14px 16px;
  background: #f7f9fc;
  border: 1px solid var(--hg-borde);
  border-radius: 14px;
  font-size: 14px;
}

.hg-form-meta span {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.hg-form-meta strong {
  color: var(--hg-azul-oscuro);
}

.hg-form-meta em {
  color: var(--hg-azul-oscuro);
}

.hg-form {
  padding: 30px;
}

.hg-section {
  margin-bottom: 26px;
  border: 1px solid var(--hg-borde);
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
}

.hg-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(90deg, var(--hg-azul) 0%, #3555a3 100%);
  color: #ffffff;
}

.hg-section-title i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.hg-section-title h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
}

.hg-section-body {
  padding: 22px;
}

.hg-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.hg-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hg-field-full {
  grid-column: 1 / -1;
}

.hg-label,
.hg-field label,
.hg-section-body label {
  font-weight: 800;
  color: var(--hg-azul-oscuro) !important;
  margin-bottom: 8px;
  font-size: 14px;
}

.hg-label small {
  color: #637083 !important;
  font-weight: 600;
}

.hg-required {
  color: var(--hg-error) !important;
}

.hg-input,
.hg-select,
.hg-textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--hg-borde);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--hg-azul-oscuro) !important;
  background: #ffffff !important;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hg-textarea {
  min-height: 130px;
  resize: vertical;
  line-height: 1.6;
}

.hg-input::placeholder,
.hg-textarea::placeholder {
  color: #7a8699 !important;
  opacity: 1 !important;
}

.hg-select option {
  color: var(--hg-azul-oscuro) !important;
  background: #ffffff !important;
}

.hg-select option:checked {
  color: #ffffff !important;
  background: var(--hg-azul) !important;
}

.hg-input:focus,
.hg-select:focus,
.hg-textarea:focus {
  border-color: var(--hg-verde);
  box-shadow: 0 0 0 4px rgba(42, 185, 117, 0.14);
  background: #ffffff !important;
  color: var(--hg-azul-oscuro) !important;
}

.hg-help {
  margin-top: 7px;
  color: #637083 !important;
  font-size: 13px;
  line-height: 1.45;
}

.hg-counter {
  margin-top: 6px;
  text-align: right;
  color: #637083 !important;
  font-size: 12px;
  font-weight: 700;
}

.hg-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.hg-choice-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hg-choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 14px;
  border: 1px solid var(--hg-borde);
  border-radius: 12px;
  cursor: pointer;
  background: #ffffff;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.hg-choice:hover {
  transform: translateY(-2px);
  border-color: rgba(42, 185, 117, 0.60);
  box-shadow: 0 8px 18px rgba(41, 68, 142, 0.10);
}

.hg-choice input {
  width: 18px;
  height: 18px;
  accent-color: var(--hg-verde);
}

.hg-choice span {
  font-weight: 800;
  color: var(--hg-azul-oscuro) !important;
}

.hg-choice small {
  display: block;
  margin-top: 2px;
  color: #637083 !important;
  font-weight: 600;
}

.hg-choice:has(input:checked) {
  border-color: var(--hg-verde);
  background: #eefaf5;
  box-shadow: 0 10px 24px rgba(7, 176, 117, 0.14);
}

.hg-file-box {
  border: 2px dashed #b8c7da;
  border-radius: 14px;
  padding: 18px;
  background: #f8fbff;
}

.hg-file-box input[type="file"] {
  width: 100%;
  color: var(--hg-azul-oscuro);
}

.hg-file-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.hg-file-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin-top: 7px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--hg-borde);
  font-size: 13px;
  font-weight: 700;
  color: var(--hg-texto);
}

.hg-file-list i {
  color: var(--hg-verde);
}

.hg-privacy {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #eefaf5 !important;
  border-left: 5px solid var(--hg-verde);
  border-radius: 12px;
  padding: 16px;
  margin-top: 10px;
  color: var(--hg-texto) !important;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 600;
}

.hg-privacy span {
  color: var(--hg-texto) !important;
}

.hg-privacy input {
  margin-top: 5px;
  width: 18px;
  height: 18px;
  accent-color: var(--hg-verde);
  flex: 0 0 auto;
}

.hg-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.hg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 13px 20px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hg-btn:hover {
  transform: translateY(-2px);
}

.hg-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none;
}

.hg-btn-primary {
  background: var(--hg-verde);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(7, 176, 117, 0.24);
}

.hg-btn-primary:hover {
  background: var(--hg-verde-oscuro);
}

.hg-btn-secondary {
  background: var(--hg-azul);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(41, 68, 142, 0.18);
}

.hg-btn-light {
  background: #f2f5fa;
  color: var(--hg-azul-oscuro);
  border: 1px solid var(--hg-borde);
}

.hg-alert {
  display: none;
  margin-top: 18px;
  padding: 15px 16px;
  border-radius: 10px;
  font-weight: 800;
  line-height: 1.5;
}

.hg-alert.show {
  display: block;
}

.hg-alert-success {
  background: #ecfdf3;
  color: #05603a;
  border: 1px solid #abefc6;
}

.hg-alert-error {
  background: #fef3f2;
  color: #b42318;
  border: 1px solid #fecdca;
}

.hg-form-shell,
.hg-form-shell * {
  text-shadow: none !important;
}

@media (max-width: 900px) {
  .hg-form-hero {
    grid-template-columns: 1fr;
  }

  .hg-grid {
    grid-template-columns: 1fr;
  }

  .hg-choice-grid {
    grid-template-columns: 1fr;
  }

  .hg-choice-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hg-form-header {
    padding: 22px;
  }

  .hg-form {
    padding: 22px;
  }
}

@media (max-width: 520px) {
  .hg-form-page {
    padding: 18px 10px;
  }

  .hg-form-hero {
    padding: 24px 18px;
    border-radius: 18px;
  }

  .hg-form-hero h1 {
    font-size: 30px;
  }

  .hg-form-shell {
    border-radius: 16px;
  }

  .hg-form-header,
  .hg-form,
  .hg-section-body {
    padding: 16px;
  }

  .hg-section-title {
    padding: 14px;
  }

  .hg-section-title h3 {
    font-size: 16px;
  }

  .hg-actions {
    flex-direction: column;
  }

  .hg-btn {
    width: 100%;
  }

  .hg-choice-grid-two {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   IMPRESIÓN: SOLO FORMULARIO, SIN ESPACIOS SUPERIORES
   ========================================================== */

@page {
  size: A4 portrait;
  margin: 6mm;
}

@media print {
  html,
  body {
    width: 210mm !important;
    min-height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    overflow: visible !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .topbar,
  .topbar-hermes,
  .navbar,
  .menu-hermes-wrap,
  .menu-hermes,
  .hg-form-hero,
  .scrollup,
  footer,
  .hg-footer,
  .hg-sub-footer,
  #sub-footer,
  nav,
  .hg-actions,
  .hg-alert,
  .hg-help,
  .hg-file-list,
  .hg-counter {
    display: none !important;
  }

  body > *:not(#wrapper):not(.hg-form-page) {
    display: none !important;
  }

  #wrapper {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-height: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    overflow: visible !important;
  }

  #wrapper > *:not(.hg-form-page) {
    display: none !important;
  }

  .hg-form-page,
  .hg-form-wrapper {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-height: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    overflow: visible !important;
  }

  .hg-form-wrapper > *:not(.hg-form-shell) {
    display: none !important;
  }

  .hg-form-shell {
    display: block !important;
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #d0d5dd !important;
    border-top: 4px solid #2ab975 !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    overflow: visible !important;
    background: #ffffff !important;
    zoom: 0.60;
  }

  .hg-form-header {
    display: grid !important;
    grid-template-columns: 1.15fr 0.85fr !important;
    gap: 8px !important;
    padding: 9px 10px !important;
    border-bottom: 1px solid #d0d5dd !important;
    background: #ffffff !important;
  }

  .hg-form-header h2 {
    font-size: 18px !important;
    line-height: 1.1 !important;
    margin: 0 0 3px !important;
    color: #11264c !important;
    text-transform: uppercase !important;
  }

  .hg-form-header p {
    font-size: 10px !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    color: #111827 !important;
  }

  .hg-form-meta {
    min-width: 0 !important;
    gap: 3px !important;
    padding: 7px 9px !important;
    border-radius: 7px !important;
    font-size: 9px !important;
    background: #ffffff !important;
    border: 1px solid #d0d5dd !important;
  }

  .hg-form-meta span {
    gap: 8px !important;
    line-height: 1.15 !important;
  }

  .hg-form {
    padding: 8px 10px !important;
  }

  .hg-section {
    margin-bottom: 7px !important;
    border-radius: 7px !important;
    border: 1px solid #d0d5dd !important;
    overflow: hidden !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .hg-section-title {
    padding: 5px 8px !important;
    gap: 6px !important;
    background: #29448e !important;
    color: #ffffff !important;
  }

  .hg-section-title i {
    width: 18px !important;
    height: 18px !important;
    font-size: 9px !important;
  }

  .hg-section-title h3 {
    font-size: 11px !important;
    line-height: 1.1 !important;
    margin: 0 !important;
    color: #ffffff !important;
  }

  .hg-section-body {
    padding: 7px 9px !important;
  }

  .hg-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px 9px !important;
  }

  .hg-field-full {
    grid-column: 1 / -1 !important;
  }

  .hg-label {
    font-size: 9px !important;
    margin-bottom: 2px !important;
    line-height: 1.1 !important;
    color: #11264c !important;
  }

  .hg-label small {
    font-size: 7.5px !important;
  }

  .hg-input,
  .hg-select,
  .hg-textarea {
    min-height: 22px !important;
    height: 22px !important;
    padding: 3px 5px !important;
    border-radius: 5px !important;
    font-size: 9px !important;
    line-height: 1.1 !important;
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
    box-shadow: none !important;
  }

  .hg-textarea {
    resize: none !important;
  }

  #detalle {
    min-height: 48px !important;
    height: 48px !important;
  }

  #solucion {
    min-height: 38px !important;
    height: 38px !important;
  }

  .hg-choice-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  .hg-choice-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .hg-choice {
    min-height: 31px !important;
    padding: 5px 7px !important;
    gap: 5px !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    transform: none !important;
  }

  .hg-choice input {
    width: 10px !important;
    height: 10px !important;
  }

  .hg-choice span {
    font-size: 9.5px !important;
    line-height: 1.1 !important;
  }

  .hg-choice small {
    font-size: 7.5px !important;
    line-height: 1.1 !important;
    margin-top: 1px !important;
  }

  .hg-file-box {
    padding: 6px !important;
    border-radius: 6px !important;
    border: 1px dashed #b8c7da !important;
    background: #ffffff !important;
  }

  .hg-file-box input[type="file"] {
    font-size: 8.5px !important;
  }

  .hg-privacy {
    gap: 6px !important;
    padding: 7px 9px !important;
    margin: 0 !important;
    border-radius: 6px !important;
    font-size: 9px !important;
    line-height: 1.2 !important;
    background: #eefaf5 !important;
    border-left: 4px solid #2ab975 !important;
  }

  .hg-privacy input {
    width: 11px !important;
    height: 11px !important;
    margin-top: 2px !important;
  }

  * {
    box-shadow: none !important;
    text-shadow: none !important;
  }
}

@media print {
  @page {
    size: A4;
    margin: 10mm;
  }

  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
  }

  body * {
    visibility: hidden;
  }

  #hgFormularioReclamos,
  #hgFormularioReclamos * {
    visibility: visible;
  }

  #hgFormularioReclamos {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    box-shadow: none !important;
    border: 0 !important;
  }

  #wrapper,
  .home-page,
  .hg-form-page,
  .hg-form-wrapper,
  .hg-form-shell,
  .container,
  .row,
  .col-md-12,
  .col-lg-12,
  .col-sm-12 {
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    box-shadow: none !important;
    border: 0 !important;
  }

  .topbar,
  .navbar,
  .menu-hermes-wrap,
  .menu-hermes,
  .hamburger,
  .scrollup,
  .hg-form-hero,
  .hg-contact-info-grid,
  .hg-actions,
  .hg-alert,
  footer,
  #sub-footer,
  .hg-footer,
  .hg-footer-main,
  .hg-sub-footer {
    display: none !important;
  }

  .hg-form-header {
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  .hg-form-meta {
    margin-top: 10px !important;
  }

  .hg-section {
    margin: 0 0 12px 0 !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .hg-section-title {
    margin: 0 0 8px 0 !important;
    padding: 8px 10px !important;
  }

  .hg-section-body {
    padding: 10px !important;
  }

  .hg-grid {
    gap: 8px !important;
  }

  .hg-field {
    margin-bottom: 8px !important;
  }

  .hg-input,
  .hg-select,
  .hg-textarea {
    border: 1px solid #bfc7d1 !important;
    background: #ffffff !important;
    box-shadow: none !important;
    color: #000000 !important;
  }

  .hg-textarea {
    min-height: 90px !important;
  }

  .hg-counter,
  .lista-archivos-wrap,
  #listaArchivos {
    display: none !important;
  }

  .hg-privacy {
    margin-top: 10px !important;
    padding: 10px !important;
    border: 1px solid #cfd8e3 !important;
    background: #ffffff !important;
  }

  input[type="radio"],
  input[type="checkbox"] {
    transform: scale(0.9);
  }
}

.hg-form-page,
.hg-form-wrapper,
.hg-form-shell {
  margin-top: 0;
}

/* 1. Definir los colores base al inicio del archivo */
:root {
  --color-texto-dinamico: #505663; /* Color por defecto para fondos claros */
}

/* Identificadores de secciones con fondo azul u oscuro */
.hg-form-hero, .topbar, .menu-hermes-wrap {
  --color-texto-dinamico: #ffffff !important;
}

/* 2. Tu regla modificada */
p {
  color: var(--color-texto-dinamico) !important;
  font-size: 15.5px;
  line-height: 1.75;
}
@media print {
  /* Permitir que el cuerpo y los contenedores ocupen el 100% del ancho disponible */
  html, body, .hg-form-page, .hg-form-wrapper {
    background: #ffffff !important;
    color: #000000 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
  }

  /* Ocultar ÚNICAMENTE elementos de navegación que no pertenecen al documento imprimible */
  .topbar, 
  .navbar, 
  .menu-hermes-wrap, 
  .hamburger, 
  .scrollup, 
  footer, 
  #sub-footer {
    display: none !important;
  }

  /* Asegurar que el hero y el cuerpo del formulario sigan visibles y fluyan de forma natural */
  .hg-form-hero {
    background: #11264c !important; /* Fondo sólido oscuro para una impresión limpia */
    color: #ffffff !important;
    padding: 20px !important;
    border-radius: 8px !important;
    display: block !important;
  }

  .hg-section {
    margin: 15px 0 !important;
    page-break-inside: avoid; /* Previene que una sección se parta a la mitad entre dos páginas */
    break-inside: avoid;
  }
}