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

body {
  font-family: 'Helvetica Neue Light', 'Helvetica Neue', Arial, sans-serif;
}

/* ─── VIEWS ─── */
.view {
  display: none;
  flex-direction: column;
}

.view.active {
  display: flex;
}

/* view-list no necesita min-height, crece con el contenido */
#view-list {
  min-height: 0;
}

/* views con formulario sí ocupan pantalla completa */
#view-apply,
#view-cv {
  /* Naranja a pantalla completa bajo el header; el footer queda debajo */
  min-height: calc(100vh - var(--hh, 58px));
  min-height: calc(100dvh - var(--hh, 58px));
}

/* ─── SHARED LAYOUT ─── */
.page-pm {
  padding-left: clamp(140px, 18vw, 340px);
  padding-right: clamp(140px, 18vw, 340px);
}

/* ─── LEFT TITLE COLUMN ─── */
.left-title {
  font-family: 'Cocogoose', 'Poppins', sans-serif;
  font-size: clamp(28px, 3.8vw, 60px);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.0;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  width: clamp(180px, 22vw, 300px);
}

/* ─── VIEW 1: LISTA ─── */
#view-list {
  background: #EC690D;
  /* Ocupa todo el alto bajo el header para que la barra negra quede pegada abajo */
  min-height: calc(100vh - var(--hh, 58px));
  min-height: calc(100dvh - var(--hh, 58px));
}
#view-list .list-body { flex: 1; }

/* Entrada de la página */
@keyframes opFadeUp { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: none; } }
#view-list .left-title  { animation: opFadeUp 900ms cubic-bezier(.22,1,.36,1) 100ms both; }
#view-list .filters-row { animation: opFadeUp 900ms cubic-bezier(.22,1,.36,1) 250ms both; }
#view-list .white-card  { animation: opFadeUp 900ms cubic-bezier(.22,1,.36,1) 400ms both; }
#view-list .cv-bar      { animation: opFadeUp 900ms cubic-bezier(.22,1,.36,1) 550ms both; }
/* Al abrir los formularios: el botón volver, el título y el formulario aparecen con fade */
#view-apply.active > .page-pm:first-child,
#view-cv.active > .page-pm:first-child { animation: opFadeUp 800ms cubic-bezier(.22,1,.36,1) 50ms both; }
#view-apply.active > .page-pm + .page-pm > *,
#view-cv.active > .page-pm + .page-pm > * { animation: opFadeUp 900ms cubic-bezier(.22,1,.36,1) both; }
#view-apply.active > .page-pm + .page-pm > *:nth-child(1),
#view-cv.active > .page-pm + .page-pm > *:nth-child(1) { animation-delay: 150ms; }
#view-apply.active > .page-pm + .page-pm > *:nth-child(2),
#view-cv.active > .page-pm + .page-pm > *:nth-child(2) { animation-delay: 320ms; }
@media (prefers-reduced-motion: reduce) {
  #view-apply.active .page-pm, #view-apply.active .page-pm > *,
  #view-cv.active .page-pm, #view-cv.active .page-pm > * { animation: none !important; }
  #view-list .left-title, #view-list .filters-row, #view-list .white-card, #view-list .cv-bar { animation: none; }
}

.list-body {
  display: flex;
  align-items: flex-start;
  gap: clamp(24px, 3.5vw, 48px);
  padding-top: clamp(65px, 10vh, 115px);
  padding-bottom: 100px;
}

/* Left title — view-list específico */
#view-list .left-title {
  font-size: clamp(24px, 2.8vw, 38px);
  width: clamp(160px, 20vw, 260px);
  line-height: 1.05;
}

.white-card {
  flex: 1;
  background: #fff;
  border-radius: 13px;
  padding: 6px clamp(16px, 2vw, 24px) clamp(16px, 2vw, 24px);
  box-shadow: none;
}

/* ── FILTROS: grid 2×3 — fuera de la tarjeta, sobre fondo naranja ── */
.filters-outer {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.filters-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 10px;
  margin-bottom: 14px;
}

.f-select {
  width: 100%;
  height: 49px;
  min-width: 0;
  border: none;
  border-radius: 9px;
  padding: 0 40px 0 18px;
  font-family: 'Helvetica Neue Light', 'Helvetica Neue', Arial, sans-serif;
  font-size: 13px;
  color: #272022;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23272022'/%3E%3C/svg%3E") no-repeat right 16px center;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  cursor: pointer;
}

.f-search-wrapper {
  position: relative;
  width: 100%;
}

.f-search {
  width: 100%;
  height: 49px;
  border: none;
  border-radius: 9px;
  padding: 0 48px 0 18px;
  font-family: 'Helvetica Neue Light', 'Helvetica Neue', Arial, sans-serif;
  font-size: 13px;
  color: #272022;
  background: #fff;
  outline: none;
}

.f-search::placeholder {
  color: #272022;
  opacity: 0.55;
}

/* Lupa CSS pura */
.search-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-52%);
  pointer-events: none;
}

.search-icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

/* ── VACANTES ── */
.job-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #ececec;
}

.job-row:last-child {
  border-bottom: none;
}

.job-row-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.job-icon {
  flex-shrink: 0;
  margin-top: 2px;
  color: #272022;
  opacity: 0.45;
}

.job-info {
  flex: 1;
  min-width: 0;
}

.job-title {
  font-family: 'Helvetica Neue Roman', 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #272022;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job-meta {
  font-size: 13px;
  color: #888;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.job-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.job-meta-item svg {
  flex-shrink: 0;
  opacity: 0.5;
}

.btn-apply {
  flex-shrink: 0;
  width: 89px;
  height: 30px;
  border: 1.5px solid #EC690D;
  border-radius: 9px;
  background: transparent;
  color: #EC690D;
  font-family: 'Helvetica Neue Roman', 'Helvetica Neue', Arial, sans-serif;
  font-size: 11px;
  font-weight: 400;
  cursor: pointer;
  transition: background 180ms, color 180ms;
  white-space: nowrap;
}

.btn-apply:hover {
  background: #EC690D;
  color: #fff;
}

/* ── PAGINACIÓN ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding-top: 18px;
}

.pag-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  font-size: 12px;
  color: #272022;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 180ms, color 180ms;
  font-family: 'Helvetica Neue Light', 'Helvetica Neue', Arial, sans-serif;
}

.pag-btn.active {
  background: #272022;
  color: #fff;
}

.pag-btn:hover:not(.active) {
  background: rgba(39, 32, 34, 0.08);
}

.pag-arrow {
  width: 24px;
  height: 28px;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #aaa;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.pag-arrow:hover {
  color: #272022;
}

/* ── RESPONSIVE VIEW-LIST ── */
@media (max-width: 779px) {
  .list-body {
    flex-direction: column;
  }

  #view-list .left-title {
    width: 100%;
    font-size: clamp(22px, 6vw, 32px);
  }

  .filters-outer {
    width: 100%;
  }

  .filters-row {
    grid-template-columns: 1fr;
  }

  .job-title {
    white-space: normal;
  }
}

/* Enviar CV bar */
.cv-bar {
  background: #272022;
  margin-top: 0;
  padding: 20px clamp(60px, 9vw, 160px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cv-bar-text {
  font-family: 'Cocogoose', 'Poppins', sans-serif;
  font-size: clamp(14px, 1.3vw, 20px);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.cv-bar-text span {
  color: #EC690D;
}

/* ─── VIEW 2: POSTULA ─── */
#view-apply {
  background: #272022;
}

.apply-meta-chip {
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  font-family: 'Helvetica Neue Light', 'Helvetica Neue', Arial, sans-serif;
}

/* Campos blancos del formulario de postulación */
.ap-field {
  width: 100%;
  height: 50px;
  background: #fff;
  border: none;
  border-radius: 10px;
  padding: 0 16px;
  font-family: 'Helvetica Neue Light', 'Helvetica Neue', Arial, sans-serif;
  font-size: 13px;
  color: #272022;
  outline: none;
  transition: box-shadow 180ms;
}

.ap-field::placeholder {
  color: #272022;
  opacity: 0.5;
}

.ap-field:focus {
  box-shadow: 0 0 0 2px #EC690D;
}

textarea.ap-field {
  padding: 14px 16px;
  height: auto;
}

.ap-select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23272022'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-color: #fff;
  cursor: pointer;
}

.ap-select option {
  background: #fff;
  color: #272022;
}

.apply-body {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: clamp(28px, 4vw, 56px);
  padding: clamp(36px, 5vh, 64px) 0;
}

.dark-card {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  padding: clamp(20px, 2.5vw, 36px);
}

/* Dark form fields */
.fd-label {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  font-family: 'Helvetica Neue Roman', 'Helvetica Neue', Arial, sans-serif;
}

.fd-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  color: #fff;
  outline: none;
  transition: border-color 180ms;
}

.fd-input::placeholder {
  color: #EC690D;
  opacity: 0.7;
}

.fd-input:focus {
  border-color: #EC690D;
}

.fd-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.07) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M0 0l6 7 6-7z' fill='%23EC690D'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  cursor: pointer;
  transition: border-color 180ms;
}

.fd-select:focus {
  border-color: #EC690D;
}

.fd-select option {
  background: #272022;
  color: #fff;
}

.fd-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  color: #fff;
  outline: none;
  resize: vertical;
  min-height: 100px;
  transition: border-color 180ms;
}

.fd-textarea::placeholder {
  color: #EC690D;
  opacity: 0.7;
}

.fd-textarea:focus {
  border-color: #EC690D;
}

/* ─── VIEW 3: ENVÍA CV ─── */
#view-cv {
  background: #EC690D;
}

/* Campos del formulario CV — blancos sobre naranja */
.cv-field {
  width: 100%;
  height: 50px;
  background: #fff;
  border: none;
  border-radius: 10px;
  padding: 0 16px;
  font-family: 'Helvetica Neue Light', 'Helvetica Neue', Arial, sans-serif;
  font-size: 13px;
  color: #272022;
  outline: none;
}

#view-apply .left-title {
  font-family: 'Cocogoose', 'Poppins', sans-serif;
  font-size: clamp(24px, 2.8vw, 38px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  width: clamp(160px, 20vw, 260px);
  flex-shrink: 0;
}

.cv-field::placeholder {
  color: #272022;
  opacity: 0.6;
}

.cv-field:focus {
  box-shadow: 0 0 0 2px rgba(39, 32, 34, 0.15);
}

textarea.cv-field {
  padding: 14px 16px;
  height: auto;
}

.cv-select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23272022'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

#view-cv .left-title {
  font-family: 'Cocogoose', 'Poppins', sans-serif;
  font-size: clamp(24px, 2.8vw, 38px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  width: clamp(160px, 20vw, 260px);
  flex-shrink: 0;
  text-align: right;
}

/* White form fields */
.fw-label {
  display: block;
  font-size: 12px;
  color: #272022;
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  font-family: 'Helvetica Neue Roman', 'Helvetica Neue', Arial, sans-serif;
}

.fw-input {
  width: 100%;
  background: #fff;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  color: #272022;
  outline: none;
  transition: border-color 180ms;
}

.fw-input::placeholder {
  color: #EC690D;
  opacity: 0.6;
}

.fw-input:focus {
  border-color: #EC690D;
}

.fw-select {
  width: 100%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M0 0l6 7 6-7z' fill='%23272022'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  color: #272022;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  cursor: pointer;
  transition: border-color 180ms;
}

.fw-select:focus {
  border-color: #EC690D;
}

.fw-textarea {
  width: 100%;
  background: #fff;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  color: #272022;
  outline: none;
  resize: vertical;
  min-height: 100px;
  transition: border-color 180ms;
}

.fw-textarea::placeholder {
  color: #EC690D;
  opacity: 0.6;
}

.fw-textarea:focus {
  border-color: #EC690D;
}

/* Upload box */
.upload-box {
  border: 2px dashed rgba(39, 32, 34, 0.25);
  border-radius: 10px;
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: border-color 180ms;
}

.upload-box:hover {
  border-color: #272022;
}

.upload-box input[type=file] {
  display: none;
}

.upload-box-dark {
  border: 2px dashed rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: border-color 180ms;
}

.upload-box-dark:hover {
  border-color: #EC690D;
}

.upload-box-dark input[type=file] {
  display: none;
}

/* Shared btn styles */
.btn-dark {
  border: none;
  border-radius: 28px;
  padding: 13px 36px;
  background: #272022;
  color: #fff;
  font-family: 'Cocogoose', 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 180ms;
}

.btn-dark:hover {
  opacity: 0.80;
}

.btn-orange {
  border: none;
  border-radius: 28px;
  padding: 13px 36px;
  background: #EC690D;
  color: #fff;
  font-family: 'Cocogoose', 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 180ms;
}

.btn-orange:hover {
  opacity: 0.85;
}

.btn-outline-white {
  border: 1.5px solid #fff;
  border-radius: 28px;
  padding: 12px 32px;
  background: transparent;
  color: #fff;
  font-family: 'Cocogoose', 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 180ms, color 180ms;
}

.btn-outline-white:hover {
  background: #fff;
  color: #272022;
}

/* Back link */
.back-link {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  text-decoration: none;
  transition: color 180ms;
  font-family: 'Helvetica Neue Roman', 'Helvetica Neue', Arial, sans-serif;
}

.back-link:hover {
  color: #fff;
}

.back-link-dark {
  font-size: 13px;
  color: rgba(39, 32, 34, 0.55);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  text-decoration: none;
  transition: color 180ms;
  font-family: 'Helvetica Neue Roman', 'Helvetica Neue', Arial, sans-serif;
}

.back-link-dark:hover {
  color: #272022;
}

/* grid 2 cols */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 16px;
}

.col-span-2 {
  grid-column: span 2;
}

/* Header top bar */
.page-header {
  padding: clamp(28px, 4vh, 48px) 0 0;
}
