
/* === Theme === */
:root {
  --primary: #182958;
  --secondary: #EF4123;
  --bg: #f4f6f9;
  --card: #f7f8fc;
}

/* === Base === */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: #333;
}

/* Header */
.site-header {
  position: relative;
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 40px 20px;
}
.brand-logo {
  position: absolute;
  left: 20px;
  top: 18px;
  width: 140px;
  height: auto;
  object-fit: contain;
}
.site-header p {
  max-width: 780px;
  margin: 12px auto 0;
  opacity: 0.9;
}

.site-main { padding: 32px 24px; }
.section-title { color: var(--primary); margin-bottom: 12px; }

/* === Mapa + Overlay === */
.map-section {
  background: #fff;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.map-wrapper {
  position: relative;
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  aspect-ratio: 16 / 9; /* Mantener 1920x1080 */
  border-radius: 12px;
  overflow: hidden;
  background: #e9ecf4; /* fallback */
}

.world-map {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Capa encima del mapa para hotspots */
.map-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* === Hotspots (clic) === */
.hotspot {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 2px solid var(--secondary);
  background: rgba(239, 65, 35, 0.18);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  z-index: 2; /* encima de la imagen */
}
.hotspot:hover { transform: scale(1.15); background: rgba(239, 65, 35, 0.3); }
.hotspot:focus { outline: none; box-shadow: 0 0 0 3px rgba(24,41,88,0.25); }

/* Posiciones iniciales por defecto (aproximadas; las reales se aplican desde JSON) */
.aw { top: 47%; left: 34%; }   /* Aruba */
.CO { top: 60%; left: 31%; }   /* Colombia */
.CR { top: 52%; left: 27%; }   /* Costa Rica */
.SV { top: 50%; left: 26.5%; } /* El Salvador */
.GT { top: 51%; left: 26.8%; } /* Guatemala */
.HN { top: 49%; left: 27.2%; } /* Honduras */
.JM { top: 45%; left: 29.5%; } /* Jamaica */
.NI { top: 53%; left: 27.8%; } /* Nicaragua */
.PA { top: 57%; left: 29.0%; } /* Panamá */
.TT { top: 63%; left: 34.5%; } /* Trinidad & Tobago */
.US { top: 38%; left: 22%; }   /* Estados Unidos */
.VI { top: 45.5%; left: 30.8%; }/* US Virgin Islands (aprox. Caribe) */
.DO { top: 47%; left: 32.5%; } /* República Dominicana (aprox.) */

/* === Panel secreto de edición === */
.edit-panel {
  position: fixed;
  top: 16px;
  right: 16px;
  background: #fff;
  border: 1px solid #cfd7e6;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border-radius: 12px;
  padding: 10px;
  z-index: 9999;
}
.edit-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.edit-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 10px;
  font-weight: 600;
  cursor: pointer;
}
.edit-btn.secondary { background: #4a5b8c; }
.edit-btn.danger { background: #b00020; }

.editing .hotspot {
  background: rgba(239, 65, 35, 0.4);
  cursor: move;
}

/* Toast (mensajes cortos) */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #182958;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
  font-size: 14px;
  z-index: 9999;
}

/* === MODAL / POPUP === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
/* ✅ Ocultar si tiene atributo hidden */
[hidden] { display: none !important; }

.modal {
  background: #fff;
  width: 90%;
  max-width: 720px;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 20px 48px rgba(0,0,0,0.25);
  position: relative;
}

.modal h2 {
  margin-top: 0;
  color: var(--primary);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: transparent;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #666;
}
.modal-close:hover { color: var(--secondary); }

/* Tarjeta de cada vacante */
.job-card {
  background: var(--card);
  border-left: 4px solid var(--secondary);
  padding: 16px;
  border-radius: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.job-title { font-weight: 700; }
.job-location { font-size: 13px; color: #666; }

/* Botón aplicar por cada plaza */
.apply-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--primary);
  border: 1px solid #cfd7e6;
  border-radius: 8px;
  padding: 8px 12px;
  text-decoration: none;
  font-weight: 600;
}
.apply-btn:hover { border-color: var(--secondary); color: var(--secondary); }
.apply-btn .icon { font-size: 16px; }

/* Acciones del modal (LinkedIn + Email) */
.modal-actions {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid #e0e4ef;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.modal-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--primary);
  border: 1px solid #cfd7e6;
  border-radius: 8px;
  padding: 10px 14px;
  text-decoration: none;
  font-weight: 600;
}
.modal-action:hover { border-color: var(--secondary); color: var(--secondary); }
.modal-action .icon { font-size: 16px; }
