/* ============================================================
   JDServer.es — PARTICIPA
   Página informativa + formulario
   ============================================================ */

/* Fondo general (reutiliza el esquema de home) */

.jd-body {
  background-color: #020617;
  color: #e5e7eb;
}

/* Modo claro: override sobre el body */
:root[data-theme="light"] .jd-body {
  background-color: #f1f5f9;
  color: #020617;
}

.jd-main {
  padding: 26px 22px 56px;
}

/* Secciones base */

.jd-section {
  margin-top: 28px;
  margin-bottom: 18px;
}

.jd-section-header {
  margin-bottom: 14px;
}

.jd-section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #e0f2fe;
}

.jd-section-subtitle {
  margin-top: 4px;
  font-size: 0.9rem;
  color: rgba(148, 163, 184, 0.96);
}

/* Contenedor suave fondo */

.jd-participa-section {
  position: relative;
}

.jd-participa-soft {
  background: radial-gradient(
      900px 300px at 0% 0%,
      rgba(30, 64, 175, 0.16),
      transparent
    );
  padding: 18px 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(30, 64, 175, 0.5);
}

/* Hero */

.jd-participa-hero {
  margin-top: 18px;
  margin-bottom: 24px;
}

.jd-participa-hero-text {
  max-width: 760px;
}

.jd-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: #e5e7eb;
}

.jd-hero-title {
  margin-top: 10px;
  font-size: 2.1rem;
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #a5f3fc;
}

.jd-hero-subtitle {
  margin-top: 10px;
  font-size: 0.98rem;
  color: rgba(226, 232, 240, 0.92);
  max-width: 42rem;
}

.jd-participa-note {
  margin-top: 10px;
  font-size: 0.9rem;
  color: rgba(148, 163, 184, 0.96);
  max-width: 44rem;
}

/* Columnas de texto */

.jd-participa-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  font-size: 0.9rem;
  color: rgba(226, 232, 240, 0.96);
}

/* Lista de requisitos */

.jd-participa-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9rem;
  color: rgba(226, 232, 240, 0.96);
}

.jd-participa-list li {
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(55, 65, 81, 0.9);
}

.jd-participa-list li strong {
  font-weight: 600;
  color: #e0f2fe;
}

/* Tarjetas beneficios */

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

.jd-participa-card {
  border-radius: 18px;
  padding: 14px 14px 16px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(51, 65, 85, 0.9);
}

.jd-participa-card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: #bfdbfe;
}

.jd-participa-card p {
  font-size: 0.88rem;
  color: rgba(209, 213, 219, 0.96);
}

/* Bloque de texto final */

.jd-participa-textblock {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
  color: rgba(226, 232, 240, 0.96);
}

/* ============================================================
   Formulario PARTICIPA
   ============================================================ */

.jd-participa-contact {
  margin-top: 28px;
}

.jd-participa-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}

.jd-hp-wrapper {
  position: absolute;
  left: -9999px;
  top: -9999px;
  visibility: hidden;
}

.jd-participa-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}

.jd-form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.9rem;
}

.jd-form-field-wide {
  grid-column: 1 / -1;
}

.jd-form-field label {
  font-weight: 500;
  color: rgba(226, 232, 240, 0.96);
}

.jd-form-field input,
.jd-form-field select,
.jd-form-field textarea {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.9);
  padding: 7px 10px;
  font-size: 0.9rem;
  color: #e5e7eb;
  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.jd-form-field input::placeholder,
.jd-form-field textarea::placeholder {
  color: rgba(148, 163, 184, 0.9);
}

.jd-form-field input:focus,
.jd-form-field select:focus,
.jd-form-field textarea:focus {
  border-color: #22d3ee;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.7);
  background: rgba(15, 23, 42, 0.98);
}

/* Consentimiento */

.jd-participa-consent {
  margin-top: 4px;
}

.jd-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.96);
}

/* Enlace dentro del texto legal */
.jd-consent-label a {
  text-decoration: underline;
  color: inherit;
}
.jd-consent-label a:hover {
  text-decoration: none;
}

/* Checkbox visible y personalizado */
.jd-consent-label input[type="checkbox"] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  min-width: 16px;
  border-radius: 4px;
  border: 1px solid rgba(148, 163, 184, 0.9);
  background: rgba(15, 23, 42, 0.95);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  display: inline-block;
  position: relative;
}

.jd-consent-label input[type="checkbox"]:focus-visible {
  outline: 2px solid #22d3ee;
  outline-offset: 2px;
}

.jd-consent-label input[type="checkbox"]:checked {
  background: #22c55e;
  border-color: #22c55e;
}

.jd-consent-label input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: 2px solid #0f172a;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

/* Estado de error para consentimiento */

.jd-consent-label.is-error {
  color: #f97373;
}

.jd-consent-label.is-error input[type="checkbox"] {
  border-color: #f97373;
  box-shadow: 0 0 0 1px rgba(248, 115, 115, 0.7);
}

/* Acciones + estado */

.jd-participa-actions {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.jd-form-status {
  min-height: 1.2em;
  font-size: 0.82rem;
  color: rgba(148, 163, 184, 0.96);
}

.jd-form-status.is-pending {
  color: #fbbf24;
}

.jd-form-status.is-success {
  color: #22c55e;
}

.jd-form-status.is-error {
  color: #f97373;
}

/* Botón ya hereda .jd-btn / .jd-btn-primary de home.css */

/* ============================================================
   Tema CLARO — overrides
   ============================================================ */

:root[data-theme="light"] .jd-section-title {
  color: #0f172a;
}

:root[data-theme="light"] .jd-section-subtitle {
  color: #4b5563;
}

:root[data-theme="light"] .jd-participa-soft {
  background: radial-gradient(
      900px 280px at 0% 0%,
      rgba(37, 99, 235, 0.06),
      #e5edf7
    );
  border-color: rgba(148, 163, 184, 0.7);
}

:root[data-theme="light"] .jd-badge {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(148, 163, 184, 0.7);
  color: #0f172a;
}

:root[data-theme="light"] .jd-hero-title {
  color: #0f172a;
}

:root[data-theme="light"] .jd-hero-subtitle {
  color: #4b5563;
}

:root[data-theme="light"] .jd-participa-note,
:root[data-theme="light"] .jd-participa-columns,
:root[data-theme="light"] .jd-participa-textblock {
  color: #1f2937;
}

/* 💡 Aquí arreglamos las “pastillas” de requisitos en modo claro */
:root[data-theme="light"] .jd-participa-list {
  color: #111827; /* texto principal bien oscuro */
}

:root[data-theme="light"] .jd-participa-list li {
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.7);
}

:root[data-theme="light"] .jd-participa-list li strong {
  color: #0f172a;
}

:root[data-theme="light"] .jd-participa-card {
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.7);
}

:root[data-theme="light"] .jd-participa-card h3 {
  color: #0f172a;
}

:root[data-theme="light"] .jd-participa-card p {
  color: #4b5563;
}

:root[data-theme="light"] .jd-form-field input,
:root[data-theme="light"] .jd-form-field select,
:root[data-theme="light"] .jd-form-field textarea {
  background: #f9fafb;
  color: #0f172a;
  border-color: rgba(148, 163, 184, 0.8);
}

:root[data-theme="light"] .jd-form-field input:focus,
:root[data-theme="light"] .jd-form-field select:focus,
:root[data-theme="light"] .jd-form-field textarea:focus {
  background: #ffffff;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.7);
}

:root[data-theme="light"] .jd-consent-label {
  color: #4b5563;
}

:root[data-theme="light"] .jd-consent-label input[type="checkbox"] {
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.8);
}

:root[data-theme="light"] .jd-consent-label.is-error {
  color: #b91c1c;
}

:root[data-theme="light"] .jd-consent-label.is-error input[type="checkbox"] {
  border-color: #f97373;
  box-shadow: 0 0 0 1px rgba(248, 115, 115, 0.7);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 960px) {
  .jd-main {
    padding: 22px 16px 40px;
  }

  .jd-participa-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .jd-participa-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .jd-participa-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .jd-form-field-wide {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .jd-hero-title {
    font-size: 1.8rem;
  }

  .jd-participa-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .jd-main {
    padding: 20px 14px 36px;
  }
}
