/* ── design tokens ── */
:root {
  --primary: #0f766e;
  --primary-strong: #0a4d48;
  --accent: #0284c7;
  --surface: #ffffff;
  --surface-soft: #f3f7fb;
  --text-main: #1e293b;
  --text-muted: #526071;
  --border-soft: #dbe7f0;
  --danger: #ef4444;
  --shadow-lg: 0 18px 40px rgba(2, 6, 23, 0.12);
  --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.08);
}

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  background:
    radial-gradient(
      circle at 10% 10%,
      rgba(2, 132, 199, 0.09),
      transparent 35%
    ),
    radial-gradient(
      circle at 95% 15%,
      rgba(15, 118, 110, 0.12),
      transparent 32%
    ),
    linear-gradient(180deg, #f8fbff 0%, #eef6fb 100%);
  color: var(--text-main);
  min-height: 100vh;
}

/* ── header ── */
.req-header {
  background: linear-gradient(125deg, #0f766e 0%, #0ea5e9 60%, #22c55e 100%);
  color: #fff;
  border-radius: 0 0 28px 28px;
  padding: 28px 24px 24px;
  box-shadow: var(--shadow-lg);
}

.req-header .brand-title {
  font-family: "Outfit", sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

.req-header h1 {
  font-family: "Outfit", sans-serif;
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  font-weight: 700;
}

.req-header p {
  opacity: 0.9;
  font-size: 0.94rem;
}

/* ── section cards ── */
.sec-card {
  background: var(--surface);
  border: 1.5px solid var(--border-soft);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  margin-bottom: 22px;
  overflow: hidden;
}

.sec-card .sec-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: linear-gradient(90deg, #f0faf8 0%, #eef6fb 100%);
  border-bottom: 1.5px solid var(--border-soft);
}

.sec-card .sec-head .sec-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.sec-card .sec-head h5 {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  margin: 0;
  color: var(--primary-strong);
}

.sec-card .sec-body {
  padding: 22px 20px 18px;
}

/* ── modalidad selector ── */
.mod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.mod-card {
  border: 2px solid var(--border-soft);
  border-radius: 16px;
  padding: 18px 14px 14px;
  cursor: pointer;
  text-align: center;
  transition: all 0.22s ease;
  background: var(--surface);
}

.mod-card:hover {
  border-color: var(--primary);
  background: #f0faf8;
}

.mod-card.active {
  border-color: var(--primary);
  background: linear-gradient(135deg, #f0faf8, #e0f5f3);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.mod-card .mod-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
}

.mod-card .mod-icon.emp {
  background: linear-gradient(135deg, #0f766e, #0ea5e9);
}

.mod-card .mod-icon.pas {
  background: linear-gradient(135deg, #7c3aed, #0ea5e9);
}

.mod-card .mod-icon.prac {
  background: linear-gradient(135deg, #f97316, #eab308);
}

.mod-card h6 {
  font-weight: 700;
  margin: 0 0 4px;
  font-size: 0.93rem;
}

.mod-card small {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.mod-card input[type="checkbox"] {
  display: none;
}

.mod-card .mod-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #fff;
  opacity: 0;
  transition: all 0.18s;
}

.mod-card {
  position: relative;
}

.mod-card.active .mod-check {
  opacity: 1;
  background: var(--primary);
}

/* ── form helpers ── */
.form-label {
  font-weight: 600;
  font-size: 0.87rem;
  color: var(--text-main);
  margin-bottom: 5px;
}

.form-label .req {
  color: var(--danger);
  margin-left: 2px;
}

.form-control,
.form-select {
  border-color: var(--border-soft);
  border-radius: 10px;
  font-size: 0.9rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.form-check-label {
  font-size: 0.88rem;
}

/* ── tipo de entidad (radios en chips) ── */
.tipo-entidad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.tipo-entidad-grid .form-check {
  margin: 0;
  padding: 0;
  min-height: 0;
  position: relative;
}

.tipo-entidad-grid .form-check-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tipo-entidad-grid .form-check-label {
  display: block;
  width: 100%;
  background: var(--surface-soft);
  border: 1.5px solid var(--border-soft);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  cursor: pointer;
  transition: all 0.18s ease;
}

.tipo-entidad-grid .form-check-label:hover {
  border-color: var(--primary);
  color: var(--primary-strong);
  background: #eefaf8;
}

.tipo-entidad-grid .form-check-input:checked + .form-check-label {
  border-color: var(--primary);
  background: #e6f7f5;
  color: var(--primary-strong);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.tipo-entidad-grid .form-check-input:focus-visible + .form-check-label {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18);
}

/* ── requerimiento row (pasantía/práctica) ── */
.req-row {
  background: var(--surface-soft);
  border: 1.5px solid var(--border-soft);
  border-radius: 14px;
  padding: 16px 14px 12px;
  margin-bottom: 14px;
  position: relative;
}

.req-row .btn-remove-row {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 0.85rem;
}

/* ── función/actividad row ── */
.func-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.func-row input {
  flex: 1;
}

/* ── beneficios chips ── */
.benefit-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.benefit-checks .form-check {
  background: var(--surface-soft);
  border: 1.5px solid var(--border-soft);
  border-radius: 20px;
  padding: 6px 14px 6px 34px;
  margin: 0;
  cursor: pointer;
  transition: all 0.18s;
}

.benefit-checks .form-check:has(input:checked) {
  border-color: var(--primary);
  background: #e6f7f5;
}

.benefit-checks .form-check-label {
  cursor: pointer;
}

/* ── competencias grid ── */
.comp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

.comp-grid .form-check {
  background: var(--surface-soft);
  border: 1.5px solid var(--border-soft);
  border-radius: 10px;
  padding: 8px 12px 8px 34px;
  transition: all 0.18s;
}

.comp-grid .form-check:has(input:checked) {
  border-color: var(--accent);
  background: #e8f4fd;
}

/* ── submit btn ── */
.btn-submit {
  background: linear-gradient(135deg, var(--primary), #0ea5e9);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 13px 40px;
  box-shadow: 0 6px 20px rgba(15, 118, 110, 0.3);
  transition: all 0.2s;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(15, 118, 110, 0.35);
  color: #fff;
}

/* ── accordion indicaciones ── */
.indicaciones-acc .accordion-button:not(.collapsed) {
  background: #f0faf8;
  color: var(--primary-strong);
}

.indicaciones-acc .accordion-button {
  font-weight: 700;
  font-size: 0.9rem;
}

.indicaciones-acc .accordion-body {
  font-size: 0.87rem;
  color: var(--text-muted);
}

/* ── conditional sections ── */
.sec-cond {
  display: none;
}

.sec-cond.visible {
  display: block;
}

/* ── hint text ── */
.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ── secciones con error ── */
.sec-card.has-error {
  border-color: var(--danger) !important;
  background: linear-gradient(
    135deg,
    var(--surface) 0%,
    rgba(239, 68, 68, 0.03) 100%
  );
  box-shadow:
    0 0 0 3px rgba(239, 68, 68, 0.1),
    var(--shadow-md);
  animation: pulse-error 0.5s ease-out;
}

.sec-card.has-error .sec-head {
  background: linear-gradient(
    90deg,
    rgba(239, 68, 68, 0.05) 0%,
    rgba(239, 68, 68, 0.08) 100%
  );
  border-bottom-color: var(--danger);
}

.sec-card.has-error .sec-head::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--danger);
  border-radius: 10px 0 0 0;
}

.sec-card.has-error .sec-head {
  position: relative;
}

.sec-card.has-error .sec-icon {
  color: var(--danger);
}

@keyframes pulse-error {
  0% {
    box-shadow:
      0 0 0 0 rgba(239, 68, 68, 0.4),
      var(--shadow-md);
  }
  70% {
    box-shadow:
      0 0 0 8px rgba(239, 68, 68, 0),
      var(--shadow-md);
  }
  100% {
    box-shadow:
      0 0 0 0 rgba(239, 68, 68, 0),
      var(--shadow-md);
  }
}

/* ── badge de modalidad en cabecera de sección ── */
.modal-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1.5px solid;
  white-space: nowrap;
  margin-left: 10px;
  vertical-align: middle;
}

.modal-tag-emp {
  color: #0f766e;
  background: #e6f7f5;
  border-color: #0f766e;
}

.modal-tag-pas {
  color: #7c3aed;
  background: #f3eeff;
  border-color: #7c3aed;
}

/* ══════════════════════════════════════
           ANIMACIONES DE ENTRADA
        ═════════════════════════════════════════ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translate3d(0, -20px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  60% {
    opacity: 1;
    transform: scale(1.02);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(15, 118, 110, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(15, 118, 110, 0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* Clases de animación con delays escalonados */
.animate-fade-up {
  animation: fadeInUp 0.6s ease-out both;
}

.animate-slide-down {
  animation: slideInDown 0.5s ease-out both;
}

.animate-pop {
  animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Delays para efecto escalonado */
.delay-1 {
  animation-delay: 0.1s;
}
.delay-2 {
  animation-delay: 0.2s;
}
.delay-3 {
  animation-delay: 0.3s;
}
.delay-4 {
  animation-delay: 0.4s;
}
.delay-5 {
  animation-delay: 0.5s;
}
.delay-6 {
  animation-delay: 0.6s;
}
.delay-7 {
  animation-delay: 0.7s;
}
.delay-8 {
  animation-delay: 0.8s;
}
.delay-9 {
  animation-delay: 0.9s;
}
.delay-10 {
  animation-delay: 1s;
}

/* Animación de header */
.req-header {
  animation: slideInDown 0.7s ease-out;
}

/* Animación flotante en botones */
.btn-submit {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.3);
}

.btn-submit:active {
  transform: translateY(-1px);
}

/* Efecto ripple para clics */
.btn-submit::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.btn-submit:active::after {
  animation: ripple 0.6s ease-out;
}

@keyframes ripple {
  to {
    width: 300px;
    height: 300px;
    opacity: 0;
  }
}

/* Suavidad en form inputs al entrar */
.form-control,
.form-select {
  transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  transform: translateY(-2px);
}

/* Efecto hover en tarjetas de sección */
.sec-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sec-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(15, 118, 110, 0.15);
}

/* Animación para elementos de modalidad */
.mod-card {
  animation: fadeInUp 0.6s ease-out backwards;
}

.mod-card:nth-child(1) {
  animation-delay: 0.1s;
}
.mod-card:nth-child(2) {
  animation-delay: 0.2s;
}
.mod-card:nth-child(3) {
  animation-delay: 0.3s;
}

/* Animación de acordeón */
.accordion-button {
  transition: all 0.3s ease;
}

.accordion-button:not(.collapsed) {
  background: #e6f7f5;
  color: var(--primary-strong);
}

/* Animación de checkbox y radio */
.form-check-input {
  transition: all 0.2s ease;
}

.form-check-input:checked {
  animation: popIn 0.3s ease;
}

/* Spinner de carga suave */
.spinner-fade {
  animation: pulse 1.5s ease-in-out infinite;
}

/* Efecto de brillo en elementos nuevos */
.shimmer-loading {
  background: linear-gradient(90deg, #f0faf8 25%, #eef6fb 50%, #f0faf8 75%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

/* Animación staggered para listas dinámicas */
.stagger-item {
  animation: fadeInUp 0.5s ease-out backwards;
}

.stagger-item:nth-child(1) {
  animation-delay: 0.05s;
}
.stagger-item:nth-child(2) {
  animation-delay: 0.1s;
}
.stagger-item:nth-child(3) {
  animation-delay: 0.15s;
}
.stagger-item:nth-child(4) {
  animation-delay: 0.2s;
}
.stagger-item:nth-child(5) {
  animation-delay: 0.25s;
}
.stagger-item:nth-child(6) {
  animation-delay: 0.3s;
}
.stagger-item:nth-child(7) {
  animation-delay: 0.35s;
}
.stagger-item:nth-child(8) {
  animation-delay: 0.4s;
}
.stagger-item:nth-child(n + 9) {
  animation-delay: 0.45s;
}
